This patch should be applied to an un-modified XFree86 version 4.1.0 source tree. It is the third of four patches that will will convert the source tree to XFree86 version 4.2.0. To apply this patch, run the following from the directory containing your 'xc' directory: patch -p0 -E < 4.1.0-4.2.0.diff1 patch -p0 -E < 4.1.0-4.2.0.diff2 patch -p0 -E < 4.1.0-4.2.0.diff3 patch -p0 -E < 4.1.0-4.2.0.diff4 rm -f xc/extras/freetype2/builds/mac/ftlib.prj rm -fr xc/extras/freetype2/docs/design rm -fr xc/extras/freetype2/docs/glyphs rm -fr xc/extras/freetype2/docs/image rm -fr xc/extras/freetype2/docs/tutorial rm -f xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib rm -f xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Localizable.strings rm -f xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib gzip -d < 4.2.0.tgz | tar vxf - ------------------------------------------------------------------------------- Index: xc/include/DECkeysym.h diff -u xc/include/DECkeysym.h:1.1.1.3 xc/include/DECkeysym.h:1.2 --- xc/include/DECkeysym.h:1.1.1.3 Tue Jan 16 17:04:37 2001 +++ xc/include/DECkeysym.h Fri Dec 14 14:53:24 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DECkeysym.h,v 1.3 2000/08/18 04:05:43 coskrey Exp $ */ +/* $Xorg: DECkeysym.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /*********************************************************** Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/HPkeysym.h diff -u xc/include/HPkeysym.h:3.3 xc/include/HPkeysym.h:3.4 --- xc/include/HPkeysym.h:3.3 Wed Jan 17 12:53:07 2001 +++ xc/include/HPkeysym.h Fri Dec 14 14:53:25 2001 @@ -1,9 +1,13 @@ -/* $Xorg: HPkeysym.h,v 1.4 2000/08/18 04:05:43 coskrey Exp $ */ +/* $Xorg: HPkeysym.h,v 1.5 2001/02/09 02:03:22 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/Imakefile diff -u xc/include/Imakefile:3.28 xc/include/Imakefile:3.29 --- xc/include/Imakefile:3.28 Sat Apr 28 19:52:31 2001 +++ xc/include/Imakefile Mon Aug 27 13:40:56 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/include/Imakefile,v 3.28 2001/04/28 23:52:31 dawes Exp $ +XCOMM $XFree86: xc/include/Imakefile,v 3.29 2001/08/27 17:40:56 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags /**/ @@ -50,7 +50,9 @@ BuildIncludes($(HEADERS),X11,..) +#if BuildLibraries InstallMultipleFlags($(HEADERS),$(INCDIR)/X11,$(INSTINCFLAGS)) +#endif MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) Index: xc/include/Sunkeysym.h diff -u xc/include/Sunkeysym.h:1.1.1.3 xc/include/Sunkeysym.h:1.2 --- xc/include/Sunkeysym.h:1.1.1.3 Tue Jan 16 17:04:38 2001 +++ xc/include/Sunkeysym.h Fri Dec 14 14:53:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Sunkeysym.h,v 1.3 2000/08/18 04:05:43 coskrey Exp $ */ +/* $Xorg: Sunkeysym.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /************************************************************ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/X.h diff -u xc/include/X.h:1.4 xc/include/X.h:1.5 --- xc/include/X.h:1.4 Wed Jan 17 12:53:09 2001 +++ xc/include/X.h Fri Dec 14 14:53:25 2001 @@ -1,5 +1,5 @@ /* - * $Xorg: X.h,v 1.3 2000/08/18 04:05:43 coskrey Exp $ + * $Xorg: X.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /* Definitions for the X window system likely to be used by applications */ @@ -11,7 +11,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -49,7 +53,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/X.h,v 1.4 2001/01/17 17:53:09 dawes Exp $ */ +/* $XFree86: xc/include/X.h,v 1.5 2001/12/14 19:53:25 dawes Exp $ */ #define X_PROTOCOL 11 /* current protocol version */ #define X_PROTOCOL_REVISION 0 /* current minor version */ Index: xc/include/XF86keysym.h diff -u xc/include/XF86keysym.h:1.11 xc/include/XF86keysym.h:1.12 --- xc/include/XF86keysym.h:1.11 Thu Apr 5 22:16:21 2001 +++ xc/include/XF86keysym.h Wed Dec 26 17:28:25 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/XF86keysym.h,v 1.11 2001/04/06 02:16:21 dawes Exp $ */ +/* $XFree86: xc/include/XF86keysym.h,v 1.12 2001/12/26 22:28:25 dawes Exp $ */ /* * XFree86 vendor specific keysyms. @@ -75,7 +75,9 @@ #define XF86XK_AddFavorite 0x1008FF39 #define XF86XK_HotLinks 0x1008FF3A #define XF86XK_BrightnessAdjust 0x1008FF3B -/* Allocate 0x1008FF3C-F next */ +#define XF86XK_Finance 0x1008FF3C +#define XF86XK_Community 0x1008FF3D +/* Allocate 0x1008FF3E-F next */ #define XF86XK_Launch0 0x1008FF40 #define XF86XK_Launch1 0x1008FF41 #define XF86XK_Launch2 0x1008FF42 Index: xc/include/XWDFile.h diff -u xc/include/XWDFile.h:1.1.1.4 xc/include/XWDFile.h:1.2 --- xc/include/XWDFile.h:1.1.1.4 Tue Jan 16 17:04:39 2001 +++ xc/include/XWDFile.h Fri Dec 14 14:53:25 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XWDFile.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: XWDFile.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/Xalloca.h diff -u xc/include/Xalloca.h:3.9 xc/include/Xalloca.h:3.10 --- xc/include/Xalloca.h:3.9 Wed Jan 17 12:53:10 2001 +++ xc/include/Xalloca.h Fri Dec 14 14:53:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xalloca.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: Xalloca.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /* Copyright 1995, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/include/Xalloca.h,v 3.9 2001/01/17 17:53:10 dawes Exp $ */ +/* $XFree86: xc/include/Xalloca.h,v 3.10 2001/12/14 19:53:25 dawes Exp $ */ /* * The purpose of this header is to define the macros ALLOCATE_LOCAL and Index: xc/include/Xdefs.h diff -u xc/include/Xdefs.h:1.2 xc/include/Xdefs.h:1.3 --- xc/include/Xdefs.h:1.2 Sun Aug 22 02:21:20 1999 +++ xc/include/Xdefs.h Tue Jul 24 04:32:53 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/Xdefs.h,v 1.2 1999/08/22 06:21:20 dawes Exp $ */ +/* $XFree86: xc/include/Xdefs.h,v 1.3 2001/07/24 08:32:53 alanh Exp $ */ /*********************************************************** @@ -31,7 +31,7 @@ #define _XDEFS_H #ifdef _XSERVER64 -#include +#include #endif #ifndef _XTYPEDEF_ATOM Index: xc/include/Xfuncproto.h diff -u xc/include/Xfuncproto.h:3.2 xc/include/Xfuncproto.h:3.5 --- xc/include/Xfuncproto.h:3.2 Wed Jan 17 12:53:10 2001 +++ xc/include/Xfuncproto.h Wed Dec 19 16:37:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xfuncproto.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: Xfuncproto.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /* * Copyright 1989, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,6 +24,7 @@ in this Software without prior written authorization from The Open Group. * */ +/* $XFree86: xc/include/Xfuncproto.h,v 3.5 2001/12/19 21:37:28 dawes Exp $ */ /* Definitions to make function prototypes manageable */ @@ -27,37 +32,21 @@ #define _XFUNCPROTO_H_ #ifndef NeedFunctionPrototypes -#if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) #define NeedFunctionPrototypes 1 -#else -#define NeedFunctionPrototypes 0 -#endif #endif /* NeedFunctionPrototypes */ #ifndef NeedVarargsPrototypes -#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&2) #define NeedVarargsPrototypes 1 -#else -#define NeedVarargsPrototypes 0 -#endif #endif /* NeedVarargsPrototypes */ #if NeedFunctionPrototypes #ifndef NeedNestedPrototypes -#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&8) #define NeedNestedPrototypes 1 -#else -#define NeedNestedPrototypes 0 -#endif #endif /* NeedNestedPrototypes */ #ifndef _Xconst -#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&4) #define _Xconst const -#else -#define _Xconst -#endif #endif /* _Xconst */ #ifndef NeedWidePrototypes @@ -71,7 +60,7 @@ #endif /* NeedFunctionPrototypes */ #ifndef _XFUNCPROTOBEGIN -#ifdef __cplusplus /* for C++ V2.0 */ +#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ #define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ #define _XFUNCPROTOEND } #else Index: xc/include/Xfuncs.h diff -u xc/include/Xfuncs.h:3.7 xc/include/Xfuncs.h:3.9 --- xc/include/Xfuncs.h:3.7 Wed Jan 17 12:53:11 2001 +++ xc/include/Xfuncs.h Fri Dec 14 14:53:25 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Xfuncs.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ + * $Xorg: Xfuncs.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ * * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. * */ -/* $XFree86: xc/include/Xfuncs.h,v 3.7 2001/01/17 17:53:11 dawes Exp $ */ +/* $XFree86: xc/include/Xfuncs.h,v 3.9 2001/12/14 19:53:25 dawes Exp $ */ #ifndef _XFUNCS_H_ #define _XFUNCS_H_ @@ -36,34 +40,22 @@ void bzero(); int bcmp(); #else -#if (__STDC__ && !defined(X_NOT_STDC_ENV) && !defined(sun) && !defined(macII) && !defined(apollo)) || defined(SVR4) || defined(hpux) || defined(_IBMR2) || defined(_SEQUENT_) -#include -#define _XFUNCS_H_INCLUDED_STRING_H -#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) -#define bzero(b,len) memset(b, 0, (size_t)(len)) -#define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len)) -#else -#ifdef sgi -#include -#else -#ifdef SYSV +#if defined(SYSV) #include void bcopy(); #define bzero(b,len) memset(b, 0, len) #define bcmp(b1,b2,len) memcmp(b1, b2, len) -#else -#ifdef __EMX__ +#elif defined(__EMX__) #include -#define _XFUNCS_H_INCLUDED_STRING_H /* bcopy, bcmp, bzero declared */ -#else /* bsd */ -void bcopy(); -void bzero(); -int bcmp(); +#define _XFUNCS_H_INCLUDED_STRING_H +#else +#include +#define _XFUNCS_H_INCLUDED_STRING_H +#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) +#define bzero(b,len) memset(b, 0, (size_t)(len)) +#define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len)) #endif -#endif /* SYSV */ -#endif /* sgi */ -#endif /* __STDC__ and relatives */ #endif /* X_USEBFUNCS */ /* the new Xfuncs.h */ Index: xc/include/Xmd.h diff -u xc/include/Xmd.h:3.9.2.1 xc/include/Xmd.h:3.14 --- xc/include/Xmd.h:3.9.2.1 Wed May 30 10:29:30 2001 +++ xc/include/Xmd.h Fri Dec 14 14:53:25 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/include/Xmd.h,v 3.9.2.1 2001/05/30 14:29:30 alanh Exp $ */ +/* $XFree86: xc/include/Xmd.h,v 3.14 2001/12/14 19:53:25 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ ******************************************************************/ #ifndef XMD_H #define XMD_H 1 -/* $Xorg: Xmd.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: Xmd.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /* * Xmd.h: MACHINE DEPENDENT DECLARATIONS. */ @@ -55,7 +59,10 @@ #define WORD64 /* 64-bit architecture */ #endif #if defined(__alpha) || defined(__alpha__) || \ - defined(__ia64__) || defined(ia64) + defined(__ia64__) || defined(ia64) || \ + defined(__sparc64__) || \ + defined(__s390x__) || \ + (defined(__hppa__) && defined(__LP64__)) #define LONG64 /* 32/64-bit architecture */ #endif #ifdef __sgi Index: xc/include/Xos.h diff -u xc/include/Xos.h:3.33 xc/include/Xos.h:3.36 --- xc/include/Xos.h:3.33 Mon Apr 16 16:33:08 2001 +++ xc/include/Xos.h Fri Dec 14 14:53:26 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Xos.h,v 1.5 2000/08/18 04:05:44 coskrey Exp $ + * $Xorg: Xos.h,v 1.6 2001/02/09 02:03:22 xorgcvs Exp $ * * Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * The X Window System is a Trademark of The Open Group. * */ -/* $XFree86: xc/include/Xos.h,v 3.33 2001/04/16 20:33:08 tsi Exp $ */ +/* $XFree86: xc/include/Xos.h,v 3.36 2001/12/14 19:53:26 dawes Exp $ */ /* This is a collection of things to try and minimize system dependencies * in a "signficant" number of source files. @@ -47,7 +51,7 @@ #define __TYPES__ #endif /* __TYPES__ */ #else /* USG */ -#if defined(_POSIX_SOURCE) && (defined(MOTOROLA) || defined(AMOEBA)) +#if defined(_POSIX_SOURCE) && defined(MOTOROLA) #undef _POSIX_SOURCE #include #define _POSIX_SOURCE @@ -129,7 +133,7 @@ /* * Get open(2) constants */ -#if defined(X_NOT_POSIX) && !defined(__CYGWIN__) +#if defined(X_NOT_POSIX) #include #if defined(USL) || defined(CRAY) || defined(MOTOROLA) || (defined(i386) && (defined(SYSV) || defined(SVR4))) || defined(__sxg__) #include @@ -212,11 +216,8 @@ (t)->tv_sec = _gtodtmp.time; \ (t)->tv_usec = _gtodtmp.millitm * 1000; \ } -#elif defined(AMOEBA) +#elif defined(_SEQUENT_) || defined(Lynx) #include -#include -#elif defined(MINIX) || defined(_SEQUENT_) || defined(Lynx) -#include #elif defined (__QNX__) typedef unsigned long fd_mask; /* Make sure we get 256 bit select masks */ @@ -242,39 +243,6 @@ #endif #endif /* XPG4 else */ -#ifdef MINIX -#include -#include -#include -#include -#include - -struct sockaddr -{ - u16_t sa_family; - char sa_data[14]; -}; - -struct sockaddr_in -{ - u16_t sin_family; - u16_t sin_port; - struct - { - ipaddr_t s_addr; - } sin_addr; - char sin_zero[8]; -}; - -struct in_addr -{ - ipaddr_t s_addr; -}; - -typedef char *caddr_t; -typedef unsigned char u_char; -#endif /* MINIX */ - #ifdef __EMX__ typedef unsigned long fd_mask; #include @@ -300,8 +268,7 @@ #if defined(ISC) || \ (defined(linux) && !defined(__GLIBC__)) || \ - (defined(__QNX__) && !defined(UNIXCONN)) || \ - defined(__CYGWIN__) + (defined(__QNX__) && !defined(UNIXCONN)) /* * Some OS's may not have this */ Index: xc/include/Xos_r.h diff -u xc/include/Xos_r.h:1.10 xc/include/Xos_r.h:1.15 --- xc/include/Xos_r.h:1.10 Sat Mar 3 04:53:00 2001 +++ xc/include/Xos_r.h Fri Dec 14 14:53:26 2001 @@ -1,8 +1,12 @@ -/* $Xorg: Xos_r.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: Xos_r.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -18,7 +22,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/Xos_r.h,v 1.10 2001/03/03 09:53:00 herrb Exp $ */ +/* $XFree86: xc/include/Xos_r.h,v 1.15 2001/12/14 19:53:26 dawes Exp $ */ /* * Various and sundry Thread-Safe functions used by X11, Motif, and CDE. @@ -146,7 +150,9 @@ # endif # endif # elif defined(XOS_USE_XT_LOCKING) +# ifndef _XtThreadsI_h extern void (*_XtProcessLock)(void); +# endif # ifndef _XtintrinsicP_h # include /* for NeedFunctionPrototypes */ extern void XtProcessLock( @@ -249,7 +255,7 @@ */ #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) -__inline__ void _Xpw_copyPasswd(_Xgetpwparams p) +static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) { memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)); @@ -309,12 +315,12 @@ #endif # define _XGetpwuid(u,p) \ ( (_Xos_processLock), \ - (((p).pwp = getpwuid((u))) ? _Xpw_copyPasswd(p) : 0), \ + (((p).pwp = getpwuid((u))) ? _Xpw_copyPasswd(p), 0 : 0), \ (_Xos_processUnlock), \ (p).pwp ) # define _XGetpwnam(u,p) \ ( (_Xos_processLock), \ - (((p).pwp = getpwnam((u))) ? _Xpw_copyPasswd(p) : 0), \ + (((p).pwp = getpwnam((u))) ? _Xpw_copyPasswd(p), 0 : 0), \ (_Xos_processUnlock), \ (p).pwp ) @@ -392,6 +398,7 @@ * _Xgetservbynameparams); */ +#undef XTHREADS_NEEDS_BYNAMEPARAMS #if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H) \ && !defined(WIN32) # include @@ -430,6 +437,9 @@ char s_proto[255]; struct servent *sptr; } _Xgetservbynameparams; + +# define XTHREADS_NEEDS_BYNAMEPARAMS + # define _Xg_copyHostent(hp) \ (memcpy(&(hp).hent, (hp).hptr, sizeof(struct hostent)), \ strcpy((hp).h_name, (hp).hptr->h_name), \ @@ -476,6 +486,8 @@ # define X_POSIX_THREAD_SAFE_FUNCTIONS 1 # endif +# define XTHREADS_NEEDS_BYNAMEPARAMS + # ifndef X_POSIX_THREAD_SAFE_FUNCTIONS typedef struct { struct hostent hent; @@ -821,7 +833,8 @@ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ typedef int _Xstrtokparams; /* dummy */ -# define _XStrtok(s1,s2,p) strtok((s1),(s2)) +# define _XStrtok(s1,s2,p) \ + ( (void)(p), strtok((s1),(s2)) ) #elif !defined(XOS_USE_MTSAFE_STRINGAPI) || defined(XNO_MTSAFE_STRINGAPI) /* Systems with thread support but no _r API. */ Index: xc/include/Xosdefs.h diff -u xc/include/Xosdefs.h:3.17 xc/include/Xosdefs.h:3.19 --- xc/include/Xosdefs.h:3.17 Wed Mar 7 10:54:11 2001 +++ xc/include/Xosdefs.h Wed Dec 19 16:37:28 2001 @@ -1,11 +1,15 @@ /* * O/S-dependent (mis)feature macro definitions * - * $Xorg: Xosdefs.h,v 1.4 2000/08/18 04:05:44 coskrey Exp $ + * $Xorg: Xosdefs.h,v 1.5 2001/02/09 02:03:23 xorgcvs Exp $ * Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/Xosdefs.h,v 3.17 2001/03/07 15:54:11 dawes Exp $ */ +/* $XFree86: xc/include/Xosdefs.h,v 3.19 2001/12/19 21:37:28 dawes Exp $ */ #ifndef _XOSDEFS_H_ #define _XOSDEFS_H_ @@ -93,6 +97,12 @@ #endif #ifdef sun +/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4 + * This check allows non-Imake configured programs to build correctly. + */ +#if defined(__SVR4) && !defined(SVR4) +#define SVR4 +#endif #ifdef SVR4 /* define this to whatever it needs to be */ #define X_POSIX_C_SOURCE 199300L Index: xc/include/Xpoll.h diff -u xc/include/Xpoll.h:3.8 xc/include/Xpoll.h:3.9 --- xc/include/Xpoll.h:3.8 Wed Jan 17 12:53:11 2001 +++ xc/include/Xpoll.h Fri Dec 14 14:53:26 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xpoll.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: Xpoll.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/include/Xpoll.h,v 3.8 2001/01/17 17:53:11 dawes Exp $ */ +/* $XFree86: xc/include/Xpoll.h,v 3.9 2001/12/14 19:53:26 dawes Exp $ */ #ifndef _XPOLL_H_ #define _XPOLL_H_ Index: xc/include/Xproto.h diff -u xc/include/Xproto.h:1.1.1.5 xc/include/Xproto.h:1.2 --- xc/include/Xproto.h:1.1.1.5 Tue Jan 16 17:04:42 2001 +++ xc/include/Xproto.h Fri Dec 14 14:53:26 2001 @@ -1,5 +1,5 @@ /* - * $Xorg: Xproto.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ + * $Xorg: Xproto.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /* Definitions for the X window system used by server and c bindings */ @@ -30,7 +30,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/Xprotostr.h diff -u xc/include/Xprotostr.h:1.1.1.3 xc/include/Xprotostr.h:1.2 --- xc/include/Xprotostr.h:1.1.1.3 Tue Jan 16 17:04:42 2001 +++ xc/include/Xprotostr.h Fri Dec 14 14:53:26 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Xprotostr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: Xprotostr.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ #ifndef XPROTOSTRUCTS_H #define XPROTOSTRUCTS_H @@ -6,7 +6,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/Xthreads.h diff -u xc/include/Xthreads.h:3.8 xc/include/Xthreads.h:3.10 --- xc/include/Xthreads.h:3.8 Wed Jan 17 12:53:12 2001 +++ xc/include/Xthreads.h Fri Dec 14 14:53:26 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Xthreads.h,v 1.4 2000/08/18 04:05:44 coskrey Exp $ + * $Xorg: Xthreads.h,v 1.5 2001/02/09 02:03:23 xorgcvs Exp $ * * Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. * * */ -/* $XFree86: xc/include/Xthreads.h,v 3.8 2001/01/17 17:53:12 dawes Exp $ */ +/* $XFree86: xc/include/Xthreads.h,v 3.10 2001/12/14 19:53:26 dawes Exp $ */ #ifndef _XTHREADS_H_ #define _XTHREADS_H_ @@ -78,7 +82,6 @@ #endif #define xthread_set_specific(k,v) thr_setspecific(k,v) #define xthread_get_specific(k,vp) thr_getspecific(k,vp) -#define XMUTEX_INITIALIZER {0} #define xmutex_init(m) mutex_init(m,USYNC_THREAD,0) #define xmutex_clear(m) mutex_destroy(m) #define xmutex_lock(m) mutex_lock(m) Index: xc/include/Xwinsock.h diff -u xc/include/Xwinsock.h:1.1.1.3 xc/include/Xwinsock.h:1.2 --- xc/include/Xwinsock.h:1.1.1.3 Tue Jan 16 17:04:44 2001 +++ xc/include/Xwinsock.h Fri Dec 14 14:53:26 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xwinsock.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: Xwinsock.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/keysym.h diff -u xc/include/keysym.h:1.3 xc/include/keysym.h:1.4 --- xc/include/keysym.h:1.3 Wed Jan 17 12:53:12 2001 +++ xc/include/keysym.h Fri Dec 14 14:53:26 2001 @@ -1,10 +1,14 @@ -/* $Xorg: keysym.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: keysym.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/keysym.h,v 1.3 2001/01/17 17:53:12 dawes Exp $ */ +/* $XFree86: xc/include/keysym.h,v 1.4 2001/12/14 19:53:26 dawes Exp $ */ /* default keysyms */ #define XK_MISCELLANY Index: xc/include/keysymdef.h diff -u xc/include/keysymdef.h:1.11 xc/include/keysymdef.h:1.12 --- xc/include/keysymdef.h:1.11 Wed Jan 17 12:53:12 2001 +++ xc/include/keysymdef.h Fri Dec 14 14:53:26 2001 @@ -1,9 +1,13 @@ -/* $Xorg: keysymdef.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: keysymdef.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/include/keysymdef.h,v 1.11 2001/01/17 17:53:12 dawes Exp $ */ +/* $XFree86: xc/include/keysymdef.h,v 1.12 2001/12/14 19:53:26 dawes Exp $ */ #define XK_VoidSymbol 0xFFFFFF /* void symbol */ Index: xc/include/DPS/dpsclient.h diff -u xc/include/DPS/dpsclient.h:1.3 xc/include/DPS/dpsclient.h:1.4 --- xc/include/DPS/dpsclient.h:1.3 Wed Jun 7 18:02:56 2000 +++ xc/include/DPS/dpsclient.h Tue Jul 31 20:44:34 2001 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/include/DPS/dpsclient.h,v 1.3 2000/06/07 22:02:56 tsi Exp $ */ +/* $XFree86: xc/include/DPS/dpsclient.h,v 1.4 2001/08/01 00:44:34 tsi Exp $ */ #ifndef DPSCLIENT_H #define DPSCLIENT_H @@ -296,16 +296,6 @@ the context has terminated in the server, the dps_err_invalidContext error will be reported via ctxt's error proc. */ -extern void DPSWaitContext(DPSContext ctxt); - - /* Waits until the PostScript interpreter is ready for more input to - this context. This is useful for synchronizing an application - with the DPS server. - - If 'ctxt' represents an invalid context, for example because - the context has terminated in the server, the dps_err_invalidContext - error will be reported via ctxt's error proc. */ - extern void DPSInterruptContext(DPSContext ctxt); /* Sends a request to the server to interrupt execution of the context. Index: xc/include/DPS/dpsconfig.h diff -u xc/include/DPS/dpsconfig.h:1.3 xc/include/DPS/dpsconfig.h:1.5 --- xc/include/DPS/dpsconfig.h:1.3 Thu Aug 31 15:03:54 2000 +++ xc/include/DPS/dpsconfig.h Thu Nov 1 18:35:26 2001 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/include/DPS/dpsconfig.h,v 1.3 2000/08/31 19:03:54 tsi Exp $ */ +/* $XFree86: xc/include/DPS/dpsconfig.h,v 1.5 2001/11/01 23:35:26 dawes Exp $ */ #ifndef DPSCONFIG_H #define DPSCONFIG_H @@ -87,7 +87,8 @@ #endif /* _IBMR2 */ #if defined(__alpha) || defined(__alpha__) || \ - defined(__ia64__) || defined(ia64) + defined(__ia64__) || defined(ia64) || \ + defined(__s390x__) #define IEEEFLOAT 1 #endif /* __alpha */ @@ -118,7 +119,7 @@ * when manipulating external binary representations. * * SWAPBITS should be true (1) for: - * Alpha, VAX, i80x86 series, MIPS little-endian (e.g. DEC version) + * Alpha, VAX, i80x86 series, ia64, MIPS little-endian (e.g. DEC version) * SWAPBITS should be false (0) for: * mc680x0 series, IBM R6000, MIPS big-endian (e.g. SGI version), SPARC, * HPPA @@ -127,7 +128,7 @@ #ifndef SWAPBITS #if defined(__alpha) || defined(__alpha__) || \ - defined(__ia64__) || defined(ia64) + defined(__ia64__) || defined(ia64) #define SWAPBITS 1 #endif /* __alpha */ @@ -151,6 +152,10 @@ #define SWAPBITS 0 #endif /* mc68000 */ +#if defined(__s390x__) || defined (__s390__) +#define SWAPBITS 0 +#endif /* s390 and s390x */ + #if (defined(_IBMR2) || defined(_POWER)) && defined(AIXV3) #define SWAPBITS 0 #endif /* _IBMR2 */ @@ -172,7 +177,7 @@ * MIN_POINTER_ALIGN. MIN_POINTER_ALIGN must be a power of 2. * * MIN_POINTER_ALIGN must be 8 on - * Alpha, IA-64 + * Alpha, IA-64, hppa64 (aka hppa2.0 in wide mode) * MIN_POINTER_ALIGN must be 4 on * VAX, i80x86 series, MIPS, mc680x0 series, IBM R6000, SPARC, HPPA */ @@ -180,9 +185,18 @@ #ifndef MIN_POINTER_ALIGN #if defined(__alpha) || defined(__alpha__) || \ - defined(__ia64__) || defined(ia64) + defined(__ia64__) || defined(ia64) || \ + defined(__s390x__) #define MIN_POINTER_ALIGN 8 #endif /* __alpha */ + +#if defined(__hppa__) +#if defined(__LP64__) +#define MIN_POINTER_ALIGN 8 +#else +#define MIN_POINTER_ALIGN 4 +#endif +#endif #ifdef vax #define MIN_POINTER_ALIGN 4 Index: xc/include/DPS/dpsfriends.h diff -u xc/include/DPS/dpsfriends.h:1.3 xc/include/DPS/dpsfriends.h:1.4 --- xc/include/DPS/dpsfriends.h:1.3 Wed Jun 7 18:02:56 2000 +++ xc/include/DPS/dpsfriends.h Tue Jul 31 20:44:34 2001 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/include/DPS/dpsfriends.h,v 1.3 2000/06/07 22:02:56 tsi Exp $ */ +/* $XFree86: xc/include/DPS/dpsfriends.h,v 1.4 2001/08/01 00:44:34 tsi Exp $ */ #ifndef DPSFRIENDS_H #define DPSFRIENDS_H @@ -464,6 +464,16 @@ /* This procedure generates a unique extension record id. */ +extern void DPSWaitContext(DPSContext ctxt); + + /* Waits until the PostScript interpreter is ready for more input to + this context. This is useful for synchronizing an application + with the DPS server. + + If 'ctxt' represents an invalid context, for example because + the context has terminated in the server, the dps_err_invalidContext + error will be reported via ctxt's error proc. */ + #if defined(__cplusplus) || defined(c_plusplus) } #endif Index: xc/include/GL/glxint.h diff -u xc/include/GL/glxint.h:1.3 xc/include/GL/glxint.h:1.4 --- xc/include/GL/glxint.h:1.3 Sat Nov 18 14:37:04 2000 +++ xc/include/GL/glxint.h Tue Jul 31 20:44:34 2001 @@ -1,7 +1,7 @@ #ifndef __GLX_glxint_h__ #define __GLX_glxint_h__ -/* $XFree86: xc/include/GL/glxint.h,v 1.3 2000/11/18 19:37:04 tsi Exp $ */ +/* $XFree86: xc/include/GL/glxint.h,v 1.4 2001/08/01 00:44:34 tsi Exp $ */ /* ** The contents of this file are subject to the GLX Public License Version 1.0 ** (the "License"). You may not use this file except in compliance with the @@ -23,8 +23,8 @@ ** $SGI$ */ -#include "X.h" -#include "Xdefs.h" +#include +#include typedef struct __GLXvisualConfigRec __GLXvisualConfig; Index: xc/include/GL/glxproto.h diff -u xc/include/GL/glxproto.h:1.4 xc/include/GL/glxproto.h:1.5 --- xc/include/GL/glxproto.h:1.4 Tue Apr 10 12:07:49 2001 +++ xc/include/GL/glxproto.h Tue Jul 31 20:44:34 2001 @@ -1,7 +1,7 @@ #ifndef _GLX_glxproto_h_ #define _GLX_glxproto_h_ -/* $XFree86: xc/include/GL/glxproto.h,v 1.4 2001/04/10 16:07:49 dawes Exp $ */ +/* $XFree86: xc/include/GL/glxproto.h,v 1.5 2001/08/01 00:44:34 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -36,7 +36,7 @@ ** compliant with the OpenGL(R) version 1.2.1 Specification. */ -#include "GL/glxmd.h" +#include /*****************************************************************************/ Index: xc/include/bitmaps/Imakefile diff -u xc/include/bitmaps/Imakefile:1.1.1.3 xc/include/bitmaps/Imakefile:1.3 --- xc/include/bitmaps/Imakefile:1.1.1.3 Tue Jan 16 17:04:48 2001 +++ xc/include/bitmaps/Imakefile Tue Aug 28 12:48:08 2001 @@ -1,5 +1,9 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:43 coskrey Exp $ + + +XCOMM $XFree86: xc/include/bitmaps/Imakefile,v 1.3 2001/08/28 16:48:08 tsi Exp $ + HEADERS = \ 1x1 \ 2x2 \ @@ -76,4 +80,7 @@ BuildIncludes($(HEADERS),X11/bitmaps,../..) +#if BuildLibraries InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/bitmaps,$(INSTINCFLAGS)) +#endif + Index: xc/include/extensions/Imakefile diff -u xc/include/extensions/Imakefile:3.41 xc/include/extensions/Imakefile:3.47 --- xc/include/extensions/Imakefile:3.41 Sat Apr 28 19:52:32 2001 +++ xc/include/extensions/Imakefile Sun Dec 16 13:19:50 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.41 2001/04/28 23:52:32 dawes Exp $ +XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.47 2001/12/16 18:19:50 keithp Exp $ #if BuildScreenSaverExt || BuildScreenSaveLibrary SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h @@ -21,8 +21,9 @@ #if BuildXF86DGA || BuildXF86DGALibrary XF86DGAHEADERS = xf86dga.h xf86dgastr.h xf86dga1.h xf86dga1str.h #endif -#if BuildLBX -LBXHEADERS = lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h lbxopts.h lbxstr.h lbxzlib.h +#if BuildLBX || BuildXextLib +LBXHEADERS = XLbx.h lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h lbxopts.h \ + lbxstr.h lbxzlib.h #endif #if BuildXvExt || BuildXvLibrary XVHEADERS = Xv.h Xvlib.h Xvproto.h @@ -40,11 +41,19 @@ #if BuildRender || BuildXftLibrary RENDERHEADERS = render.h renderproto.h #endif +#if BuildRandR || BuildRandRLibrary +RANDRHEADERS = randr.h randrproto.h +#endif +#if BuildXTrap || BuildXTrapLibrary +XTRAPHEADERS = xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h \ + xtraplibp.h xtrapproto.h +#endif EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \ $(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \ $(LBXHEADERS) $(XVHEADERS) $(XVMCHEADERS) $(XF86RUSHHEADERS) \ - $(FONTCACHEHEADERS) $(RENDERHEADERS) + $(FONTCACHEHEADERS) $(RENDERHEADERS) $(RANDRHEADERS) \ + $(XTRAPHEADERS) @@ -68,7 +77,10 @@ all:: BuildIncludes($(HEADERS),X11/extensions,../..) + +#if BuildLibraries InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/extensions,$(INSTINCFLAGS)) +#endif InstallDriverSDKNonExecFile(XI.h,$(DRIVERSDKINCLUDEDIR)/extensions) InstallDriverSDKNonExecFile(XIproto.h,$(DRIVERSDKINCLUDEDIR)/extensions) Index: xc/include/extensions/MITMisc.h diff -u xc/include/extensions/MITMisc.h:1.1.1.3 xc/include/extensions/MITMisc.h:1.2 --- xc/include/extensions/MITMisc.h:1.1.1.3 Tue Jan 16 17:05:08 2001 +++ xc/include/extensions/MITMisc.h Fri Dec 14 14:53:28 2001 @@ -2,7 +2,11 @@ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ -/* $Xorg: MITMisc.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: MITMisc.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ #ifndef _XMITMISC_H_ #define _XMITMISC_H_ Index: xc/include/extensions/Printstr.h diff -u xc/include/extensions/Printstr.h:1.4 xc/include/extensions/Printstr.h:1.6 --- xc/include/extensions/Printstr.h:1.4 Wed Jan 17 12:53:16 2001 +++ xc/include/extensions/Printstr.h Thu Aug 23 08:46:11 2001 @@ -43,7 +43,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/include/extensions/Printstr.h,v 1.4 2001/01/17 17:53:16 dawes Exp $ */ +/* $XFree86: xc/include/extensions/Printstr.h,v 1.6 2001/08/23 12:46:11 alanh Exp $ */ #ifndef _XpPrintstr_H_ @@ -662,9 +662,8 @@ extern char *_xp_hinter_desc; extern int _xp_hinter_init; -#endif /* _XP_PRINT_SERVER_ */ +#else /* _XP_PRINT_SERVER_ */ -#ifdef _XP_PRINT_SERVER_ /*********************************************************************** * * Server-only definitions shared between the extension and DDX layers. @@ -775,7 +774,7 @@ extern int XpRehashPrinterList(void); extern void XpSetFontResFunc(ClientPtr); extern void XpUnsetFontResFunc(ClientPtr); - +extern void XpRegisterInitFunc(ScreenPtr, char *, int (*)(struct _XpContext *)); #endif /* _XP_PRINT_SERVER_ */ Index: xc/include/extensions/XEVIstr.h diff -u xc/include/extensions/XEVIstr.h:3.4 xc/include/extensions/XEVIstr.h:3.5 --- xc/include/extensions/XEVIstr.h:3.4 Wed Jan 17 12:53:16 2001 +++ xc/include/extensions/XEVIstr.h Tue Jul 31 20:44:35 2001 @@ -21,15 +21,21 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/include/extensions/XEVIstr.h,v 3.5 2001/08/01 00:44:35 tsi Exp $ */ + #ifndef _EVISTR_H_ #define _EVISTR_H_ -#include "XEVI.h" + +#include + #define VisualID CARD32 #define EVINAME "Extended-Visual-Information" #define XEVI_MAJOR_VERSION 1 /* current version numbers */ #define XEVI_MINOR_VERSION 0 + typedef CARD32 VisualID32; #define sz_VisualID32 4 + typedef struct _xExtendedVisualInfo { VisualID core_visual_id B32; INT8 screen; @@ -42,12 +48,14 @@ CARD16 num_colormap_conflicts B16; } xExtendedVisualInfo; #define sz_xExtendedVisualInfo 16 + typedef struct _XEVIQueryVersion { CARD8 reqType; /* always XEVIReqCode */ CARD8 xeviReqType; /* always X_EVIQueryVersion */ CARD16 length B16; } xEVIQueryVersionReq; #define sz_xEVIQueryVersionReq 4 + typedef struct { BYTE type; /* X_Reply */ CARD8 unused; @@ -62,6 +70,7 @@ CARD32 pad4 B32; } xEVIQueryVersionReply; #define sz_xEVIQueryVersionReply 32 + typedef struct _XEVIGetVisualInfoReq { CARD8 reqType; /* always XEVIReqCode */ CARD8 xeviReqType; /* always X_EVIGetVisualInfo */ @@ -69,6 +78,7 @@ CARD32 n_visual B32; } xEVIGetVisualInfoReq; #define sz_xEVIGetVisualInfoReq 8 + typedef struct _XEVIGetVisualInfoReply { BYTE type; /* X_Reply */ CARD8 unused; @@ -82,5 +92,7 @@ CARD32 pad3 B32; } xEVIGetVisualInfoReply; #define sz_xEVIGetVisualInfoReply 32 + #undef VisualID + #endif /* _EVISTR_H_ */ Index: xc/include/extensions/XI.h diff -u xc/include/extensions/XI.h:1.4 xc/include/extensions/XI.h:1.5 --- xc/include/extensions/XI.h:1.4 Wed Jan 17 12:53:16 2001 +++ xc/include/extensions/XI.h Fri Dec 14 14:53:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: XI.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XI.h,v 1.4 2001/01/17 17:53:16 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XI.h,v 1.5 2001/12/14 19:53:28 dawes Exp $ */ /* Definitions used by the server, library and client */ Index: xc/include/extensions/XIE.h diff -u xc/include/extensions/XIE.h:1.1.1.3 xc/include/extensions/XIE.h:1.2 --- xc/include/extensions/XIE.h:1.1.1.3 Tue Jan 16 17:05:11 2001 +++ xc/include/extensions/XIE.h Fri Dec 14 14:53:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XIE.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: XIE.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/XIEproto.h diff -u xc/include/extensions/XIEproto.h:1.1.1.3 xc/include/extensions/XIEproto.h:1.2 --- xc/include/extensions/XIEproto.h:1.1.1.3 Tue Jan 16 17:05:12 2001 +++ xc/include/extensions/XIEproto.h Fri Dec 14 14:53:28 2001 @@ -1,8 +1,12 @@ -/* $Xorg: XIEproto.h,v 1.5 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: XIEproto.h,v 1.6 2001/02/09 02:03:23 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/XIEprotost.h diff -u xc/include/extensions/XIEprotost.h:1.1.1.3 xc/include/extensions/XIEprotost.h:1.2 --- xc/include/extensions/XIEprotost.h:1.1.1.3 Tue Jan 16 17:05:12 2001 +++ xc/include/extensions/XIEprotost.h Fri Dec 14 14:53:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XIEprotost.h,v 1.6 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: XIEprotost.h,v 1.7 2001/02/09 02:03:23 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/XInput.h diff -u xc/include/extensions/XInput.h:1.1.1.4 xc/include/extensions/XInput.h:1.3 --- xc/include/extensions/XInput.h:1.1.1.4 Tue Jan 16 17:05:13 2001 +++ xc/include/extensions/XInput.h Fri Dec 14 14:53:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XInput.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: XInput.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,19 +45,15 @@ SOFTWARE. ********************************************************/ +/* $XFree86: xc/include/extensions/XInput.h,v 1.3 2001/12/14 19:53:28 dawes Exp $ */ /* Definitions used by the library and client */ #ifndef _XINPUT_H_ #define _XINPUT_H_ -#ifndef _XLIB_H_ #include -#endif - -#ifndef _XI_H_ -#include "XI.h" -#endif +#include #define _deviceKeyPress 0 #define _deviceKeyRelease 1 Index: xc/include/extensions/XIproto.h diff -u xc/include/extensions/XIproto.h:1.4 xc/include/extensions/XIproto.h:1.5 --- xc/include/extensions/XIproto.h:1.4 Wed Jan 17 12:53:17 2001 +++ xc/include/extensions/XIproto.h Fri Dec 14 14:53:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XIproto.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: XIproto.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XIproto.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XIproto.h,v 1.5 2001/12/14 19:53:28 dawes Exp $ */ #ifndef _XIPROTO_H #define _XIPROTO_H Index: xc/include/extensions/XKBgeom.h diff -u xc/include/extensions/XKBgeom.h:3.7 xc/include/extensions/XKBgeom.h:3.8 --- xc/include/extensions/XKBgeom.h:3.7 Wed Jan 17 12:53:17 2001 +++ xc/include/extensions/XKBgeom.h Tue Jul 31 20:44:35 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.7 2001/01/17 17:53:17 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.8 2001/08/01 00:44:35 tsi Exp $ */ #ifndef _XKBGEOM_H_ #define _XKBGEOM_H_ @@ -66,8 +66,8 @@ #define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys #define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows #define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays -#define XkbFreeGeomKeys SrvXKbFreeGeomKeys -#define XkbFreeGeomRows SrvXKbFreeGeomRows +#define XkbFreeGeomKeys SrvXkbFreeGeomKeys +#define XkbFreeGeomRows SrvXkbFreeGeomRows #define XkbFreeGeomSections SrvXkbFreeGeomSections #define XkbFreeGeomPoints SrvXkbFreeGeomPoints #define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines Index: xc/include/extensions/XKBsrv.h diff -u xc/include/extensions/XKBsrv.h:3.19 xc/include/extensions/XKBsrv.h:3.21 --- xc/include/extensions/XKBsrv.h:3.19 Sun Mar 25 00:31:59 2001 +++ xc/include/extensions/XKBsrv.h Thu Aug 23 10:46:27 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.19 2001/03/25 05:31:59 tsi Exp $ */ +/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.21 2001/08/23 14:46:27 alanh Exp $ */ #ifndef _XKBSRV_H_ #define _XKBSRV_H_ @@ -313,6 +313,20 @@ _XFUNCPROTOBEGIN +extern void XkbUseMsg( +#if NeedFunctionPrototypes + void +#endif +); + +extern int XkbProcessArguments( +#if NeedFunctionPrototypes + int /* argc */, + char ** /* argv */, + int /* i */ +#endif +); + extern void XkbFreeCompatMap( #if NeedFunctionPrototypes XkbDescPtr /* xkb */, @@ -1156,15 +1170,134 @@ #endif ); -extern int XkbFinishDeviceInit(DeviceIntPtr); -extern void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr); -extern void XkbFreeInfo(XkbSrvInfoPtr); +extern int XkbFinishDeviceInit( +#if NeedFunctionPrototypes + DeviceIntPtr /* pXDev */ +#endif +); +extern void XkbFreeSrvLedInfo( +#if NeedFunctionPrototypes + XkbSrvLedInfoPtr /* sli */ +#endif +); + +extern void XkbFreeInfo( +#if NeedFunctionPrototypes + XkbSrvInfoPtr /* xkbi */ +#endif +); + +extern Status XkbChangeTypesOfKey( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + int /* key */, + int /* nGroups */, + unsigned int /* groups */, + int * /* newTypesIn */, + XkbMapChangesPtr /* changes */ +#endif +); + +extern XkbKeyTypePtr XkbAddKeyType( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + Atom /* name */, + int /* map_count */, + Bool /* want_preserve */, + int /* num_lvls */ +#endif +); + +extern Status XkbInitCanonicalKeyTypes( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + unsigned int /* which */, + int /* keypadVMod */ +#endif +); + +extern int XkbKeyTypesForCoreSymbols( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + int /* map_width */, + KeySym * /* core_syms */, + unsigned int /* protected */, + int * /* types_inout */, + KeySym * /* xkb_syms_rtrn */ +#endif +); + +extern Bool XkbApplyCompatMapToKey( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + KeyCode /* key */, + XkbChangesPtr /* changes */ +#endif +); + +extern Bool XkbUpdateMapFromCore( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + KeyCode /* first_key */, + int /* num_keys */, + int /* map_width */, + KeySym * /* core_keysyms */, + XkbChangesPtr /* changes */ +#endif +); + +extern void XkbFreeControls( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + unsigned int /* which */, + Bool /* freeMap */ +#endif +); + +extern void XkbFreeIndicatorMaps( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */ +#endif +); + +extern Bool XkbApplyVirtualModChanges( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + unsigned int /* changed */, + XkbChangesPtr /* changes */ +#endif +); + +extern Bool XkbUpdateActionVirtualMods( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + XkbAction * /* act */, + unsigned int /* changed */ +#endif +); + +extern void XkbUpdateKeyTypeVirtualMods( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + XkbKeyTypePtr /* type */, + unsigned int /* changed */, + XkbChangesPtr /* changes */ +#endif +); + +extern void XkbSendNewKeyboardNotify( +#if NeedFunctionPrototypes + DeviceIntPtr /* kbd */, + xkbNewKeyboardNotify * /* pNKN */ +#endif +); + #ifdef XKBSRV_NEED_FILE_FUNCS -#include "extensions/XKMformat.h" -#include "extensions/XKBfile.h" -#include "extensions/XKBrules.h" +#include +#include +#include #define _XkbListKeymaps 0 #define _XkbListKeycodes 1 @@ -1250,20 +1383,6 @@ XkbRF_VarDefsPtr /* defs */, XkbComponentNamesPtr /* names */, DeviceIntPtr /* dev */ -#endif -); - -extern int XkbDDXUsesSoftRepeat( -#if NeedFunctionPrototypes - DeviceIntPtr /* pXDev */ -#endif -); - -extern void XkbDDXFakePointerMotion( -#if NeedFunctionPrototypes - unsigned int /* flags */, - int /* x */, - int /* y */ #endif ); Index: xc/include/extensions/XLbx.h diff -u xc/include/extensions/XLbx.h:1.1.1.2 xc/include/extensions/XLbx.h:1.2 --- xc/include/extensions/XLbx.h:1.1.1.2 Tue Jan 16 17:05:17 2001 +++ xc/include/extensions/XLbx.h Tue Jul 31 20:44:35 2001 @@ -20,6 +20,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/include/extensions/XLbx.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ #ifndef _XLBX_H_ #define _XLBX_H_ @@ -127,7 +128,19 @@ #ifndef _XLBX_SERVER_ +#include +#include + _XFUNCPROTOBEGIN + +Bool XLbxQueryExtension( +#if NeedFunctionPrototypes + Display* /* dpy */, + int* /* requestp */, + int* /* event_basep */, + int* /* error_basep */ +#endif +); Bool XLbxQueryVersion( #if NeedFunctionPrototypes Index: xc/include/extensions/XShm.h diff -u xc/include/extensions/XShm.h:1.5 xc/include/extensions/XShm.h:1.8 --- xc/include/extensions/XShm.h:1.5 Wed Jan 17 12:53:19 2001 +++ xc/include/extensions/XShm.h Fri Dec 14 14:53:28 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/include/extensions/XShm.h,v 1.5 2001/01/17 17:53:19 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XShm.h,v 1.8 2001/12/14 19:53:28 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ -/* $Xorg: XShm.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: XShm.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ #ifndef _XSHM_H_ #define _XSHM_H_ @@ -73,6 +77,12 @@ #endif ); +int XShmGetEventBase( +#if NeedFunctionPrototypes + Display* /* dpy */ +#endif +); + Bool XShmQueryVersion( #if NeedFunctionPrototypes Display* /* dpy */, @@ -155,6 +165,16 @@ ); _XFUNCPROTOEND + +#else /* _XSHM_SERVER_ */ + +#include "screenint.h" + +extern void ShmRegisterFbFuncs( +#if NeedFunctionPrototypes + ScreenPtr /* pScreen */ +#endif +); #endif Index: xc/include/extensions/XTest.h diff -u xc/include/extensions/XTest.h:3.2 xc/include/extensions/XTest.h:3.3 --- xc/include/extensions/XTest.h:3.2 Wed Jan 17 12:53:19 2001 +++ xc/include/extensions/XTest.h Fri Dec 14 14:53:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XTest.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: XTest.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/XTest.h,v 3.2 2001/01/17 17:53:19 dawes Exp $ */ +/* $XFree86: xc/include/extensions/XTest.h,v 3.3 2001/12/14 19:53:28 dawes Exp $ */ #ifndef _XTEST_H_ #define _XTEST_H_ Index: xc/include/extensions/Xag.h diff -u xc/include/extensions/Xag.h:1.1.1.3 xc/include/extensions/Xag.h:1.5 --- xc/include/extensions/Xag.h:1.1.1.3 Tue Jan 16 17:05:18 2001 +++ xc/include/extensions/Xag.h Mon Dec 17 15:52:24 2001 @@ -1,7 +1,12 @@ +/* $XFree86: xc/include/extensions/Xag.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +24,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $Xorg: Xag.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: Xag.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ #ifndef _XAG_H_ #define _XAG_H_ @@ -37,7 +42,7 @@ #define XagBadAppGroup 0 #define XagNumberErrors (XagBadAppGroup + 1) -#define XagNsingleScreen 0 +#define XagNsingleScreen 7 #define XagNdefaultRoot 1 #define XagNrootVisual 2 #define XagNdefaultColormap 3 @@ -47,11 +52,7 @@ #ifndef _XAG_SERVER_ -#if NeedVarargsPrototypes #include -#else -#include -#endif _XFUNCPROTOBEGIN Index: xc/include/extensions/Xagsrv.h diff -u xc/include/extensions/Xagsrv.h:1.1.1.3 xc/include/extensions/Xagsrv.h:1.4 --- xc/include/extensions/Xagsrv.h:1.1.1.3 Tue Jan 16 17:05:18 2001 +++ xc/include/extensions/Xagsrv.h Thu Dec 20 14:25:43 2001 @@ -1,7 +1,12 @@ +/* $XFree86: xc/include/extensions/Xagsrv.h,v 1.4 2001/12/20 19:25:43 tsi Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,11 +24,15 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $Xorg: Xagsrv.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: Xagsrv.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ #ifndef _XAGSRV_H_ #define _XAGSRV_H_ +#include + +_XFUNCPROTOBEGIN + extern void XagExtensionInit( #if NeedFunctionPrototypes void @@ -82,6 +91,8 @@ CARD32* /* buf */ #endif ); + +_XFUNCPROTOEND #endif /* _XAGSRV_H_ */ Index: xc/include/extensions/Xagstr.h diff -u xc/include/extensions/Xagstr.h:1.1.1.3 xc/include/extensions/Xagstr.h:1.5 --- xc/include/extensions/Xagstr.h:1.1.1.3 Tue Jan 16 17:05:19 2001 +++ xc/include/extensions/Xagstr.h Mon Dec 17 15:52:24 2001 @@ -1,7 +1,12 @@ +/* $XFree86: xc/include/extensions/Xagstr.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */ /* -Copyright 1996, 1998 The Open Group +Copyright 1996, 1998, 2001 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,12 +24,12 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $Xorg: Xagstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */ #ifndef _XAGSTR_H_ /* { */ #define _XAGSTR_H_ -#include "Xag.h" +#include #define XAppGroup CARD32 @@ -38,6 +43,17 @@ #define XagWindowTypeWin32 2 #define XagWindowTypeWin16 3 +/* +* Redefine some basic types used by structures defined herein. This allows +* both the library and server to view communicated data as 32-bit entities, +* thus preventing problems on 64-bit architectures where libXext sees this +* data as 64 bits and the server sees it as 32 bits. +*/ + +#define Colormap CARD32 +#define VisualID CARD32 +#define Window CARD32 + typedef struct _XagQueryVersion { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagQueryVersion */ @@ -63,7 +79,7 @@ #define sz_xXagQueryVersionReply 32 /* Set AppGroup Attributes masks */ -#define XagSingleScreenMask 1 << XagNsingleScreen +#define XagSingleScreenMask 1 << 0 #define XagDefaultRootMask 1 << XagNdefaultRoot #define XagRootVisualMask 1 << XagNrootVisual #define XagDefaultColormapMask 1 << XagNdefaultColormap @@ -153,6 +169,14 @@ #define sz_xXagDestroyAssocReq 8 #undef XAppGroup +/* + * Cancel the previous redefinition of the basic types, thus restoring their + * X.h definitions. + */ + +#undef Window +#undef Colormap +#undef VisualID #endif /* } _XAGSTR_H_ */ Index: xc/include/extensions/Xcup.h diff -u xc/include/extensions/Xcup.h:3.4 xc/include/extensions/Xcup.h:3.5 --- xc/include/extensions/Xcup.h:3.4 Wed Jan 17 12:53:19 2001 +++ xc/include/extensions/Xcup.h Fri Dec 14 14:53:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xcup.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: Xcup.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/Xcupstr.h diff -u xc/include/extensions/Xcupstr.h:3.4 xc/include/extensions/Xcupstr.h:3.6 --- xc/include/extensions/Xcupstr.h:3.4 Wed Jan 17 12:53:19 2001 +++ xc/include/extensions/Xcupstr.h Fri Dec 14 14:53:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xcupstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: Xcupstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,11 +25,12 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/include/extensions/Xcupstr.h,v 3.6 2001/12/14 19:53:28 dawes Exp $ */ #ifndef _XCUPSTR_H_ /* { */ #define _XCUPSTR_H_ -#include "Xcup.h" +#include #define XCUPNAME "TOG-CUP" Index: xc/include/extensions/Xdbe.h diff -u xc/include/extensions/Xdbe.h:3.1 xc/include/extensions/Xdbe.h:3.2 --- xc/include/extensions/Xdbe.h:3.1 Wed Jan 17 12:53:20 2001 +++ xc/include/extensions/Xdbe.h Tue Jul 31 20:44:35 2001 @@ -30,8 +30,8 @@ * Header file for Xlib-related DBE * *****************************************************************************/ +/* $XFree86: xc/include/extensions/Xdbe.h,v 3.2 2001/08/01 00:44:35 tsi Exp $ */ - #ifndef XDBE_H #define XDBE_H @@ -39,7 +39,7 @@ /* INCLUDES */ #include -#include "Xdbeproto.h" +#include /* DEFINES */ Index: xc/include/extensions/Xext.h diff -u xc/include/extensions/Xext.h:1.3 xc/include/extensions/Xext.h:1.4 --- xc/include/extensions/Xext.h:1.3 Sun Apr 1 09:59:59 2001 +++ xc/include/extensions/Xext.h Fri Dec 14 14:53:28 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Xext.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ + * $Xorg: Xext.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/Xext.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */ +/* $XFree86: xc/include/extensions/Xext.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ #ifndef _XEXT_H_ #define _XEXT_H_ Index: xc/include/extensions/XvMC.h diff -u xc/include/extensions/XvMC.h:1.3 xc/include/extensions/XvMC.h:1.8 --- xc/include/extensions/XvMC.h:1.3 Sun Apr 1 09:59:59 2001 +++ xc/include/extensions/XvMC.h Tue Jan 15 20:15:45 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/XvMC.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */ +/* $XFree86: xc/include/extensions/XvMC.h,v 1.8 2002/01/16 01:15:45 mvojkovi Exp $ */ #ifndef _XVMC_H_ #define _XVMC_H_ @@ -9,8 +9,8 @@ #define XvMCName "XVideo-MotionCompensation" #define XvMCNumEvents 0 #define XvMCNumErrors 3 -#define XvMCVersion 0 -#define XvMCRevision 1 +#define XvMCVersion 1 +#define XvMCRevision 0 #define XvMCBadContext 0 #define XvMCBadSurface 1 @@ -25,8 +25,10 @@ #define XVMC_OVERLAID_SURFACE 0x00000001 #define XVMC_BACKEND_SUBPICTURE 0x00000002 #define XVMC_SUBPICTURE_INDEPENDENT_SCALING 0x00000004 +#define XVMC_INTRA_UNSIGNED 0x00000008 /* Motion Compensation types */ +#define XVMC_MOCOMP 0x00000000 #define XVMC_IDCT 0x00010000 #define XVMC_MPEG_1 0x00000001 @@ -34,7 +36,6 @@ #define XVMC_H263 0x00000003 #define XVMC_MPEG_4 0x00000004 -#define XVMC_MB_TYPE_QUANT 0x01 #define XVMC_MB_TYPE_MOTION_FORWARD 0x02 #define XVMC_MB_TYPE_MOTION_BACKWARD 0x04 #define XVMC_MB_TYPE_PATTERN 0x08 @@ -57,15 +58,10 @@ #define XVMC_TOP_FIELD 0x00000001 #define XVMC_BOTTOM_FIELD 0x00000002 #define XVMC_FRAME_PICTURE (XVMC_TOP_FIELD | XVMC_BOTTOM_FIELD) -#define XVMC_TOP_FIELD_FIRST 0x00000001 -#define XVMC_PROGRESSIVE_FRAME 0x00000002 -#define XVMC_DIRECT 0x00000001 +#define XVMC_SECOND_FIELD 0x00000004 -#define XVMC_SCAN_ORDER_ZIG_ZAG 0x00000000 -#define XVMC_SCAN_ORDER_ALTERNATIVE_HORIZONTAL 0x00000001 -#define XVMC_SCAN_ORDER_ALTERNATIVE_VERTICAL 0x00000002 -#define XVMC_SCAN_ORDER_RASTER 0x00000003 +#define XVMC_DIRECT 0x00000001 #define XVMC_RENDERING 0x00000001 #define XVMC_DISPLAYING 0x00000002 @@ -74,7 +70,6 @@ typedef struct { int surface_type_id; int chroma_format; - int color_description; unsigned short max_width; unsigned short max_height; unsigned short subpicture_max_width; @@ -113,5 +108,33 @@ char component_order[4]; void *privData; /* private to the library */ } XvMCSubpicture; + +typedef struct { + unsigned int num_blocks; + XID context_id; + void *privData; + short *blocks; +} XvMCBlockArray; + +typedef struct { + unsigned short x; + unsigned short y; + unsigned char macroblock_type; + unsigned char motion_type; + unsigned char motion_vertical_field_select; + unsigned char dct_type; + short PMV[2][2][2]; + unsigned int index; + unsigned short coded_block_pattern; + unsigned short pad0; +} XvMCMacroBlock; + + +typedef struct { + unsigned int num_blocks; + XID context_id; + void *privData; + XvMCMacroBlock *macro_blocks; +} XvMCMacroBlockArray; #endif Index: xc/include/extensions/XvMClib.h diff -u xc/include/extensions/XvMClib.h:1.3 xc/include/extensions/XvMClib.h:1.6 --- xc/include/extensions/XvMClib.h:1.3 Sun Apr 1 09:59:59 2001 +++ xc/include/extensions/XvMClib.h Wed Nov 14 16:54:37 2001 @@ -1,11 +1,14 @@ -/* $XFree86: xc/include/extensions/XvMClib.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */ +/* $XFree86: xc/include/extensions/XvMClib.h,v 1.6 2001/11/14 21:54:37 mvojkovi Exp $ */ #ifndef _XVMCLIB_H_ #define _XVMCLIB_H_ +#include #include #include +_XFUNCPROTOBEGIN + Bool XvMCQueryExtension (Display *display, int *eventBase, int *errBase); Status XvMCQueryVersion (Display *display, int *major, int *minor); @@ -137,9 +140,70 @@ Status XvMCFlushSurface (Display *display, XvMCSurface *surface); Status XvMCGetSurfaceStatus (Display *display, XvMCSurface *surface, int *stat); +Status XvMCRenderSurface ( + Display *display, + XvMCContext *context, + unsigned int picture_structure, + XvMCSurface *target_surface, + XvMCSurface *past_surface, + XvMCSurface *future_surface, + unsigned int flags, + unsigned int num_macroblocks, + unsigned int first_macroblock, + XvMCMacroBlockArray *macroblock_array, + XvMCBlockArray *blocks +); + + Status XvMCSyncSubpicture (Display *display, XvMCSubpicture *subpicture); Status XvMCFlushSubpicture (Display *display, XvMCSubpicture *subpicture); Status XvMCGetSubpictureStatus (Display *display, XvMCSubpicture *subpic, int *stat); + +Status XvMCCreateBlocks ( + Display *display, + XvMCContext *context, + unsigned int num_blocks, + XvMCBlockArray *block +); + +Status XvMCDestroyBlocks (Display *display,XvMCBlockArray *block); + +Status XvMCCreateMacroBlocks ( + Display *display, + XvMCContext *context, + unsigned int num_blocks, + XvMCMacroBlockArray *blocks +); + +Status XvMCDestroyMacroBlocks ( + Display *display, + XvMCMacroBlockArray *block +); + +XvAttribute * +XvMCQueryAttributes ( + Display *display, + XvMCContext *context, + int *number +); + +Status +XvMCSetAttribute ( + Display *display, + XvMCContext *context, + Atom attribute, + int value +); + +Status +XvMCGetAttribute ( + Display *display, + XvMCContext *context, + Atom attribute, + int *value +); + +_XFUNCPROTOEND #endif Index: xc/include/extensions/XvMCproto.h diff -u xc/include/extensions/XvMCproto.h:1.4 xc/include/extensions/XvMCproto.h:1.5 --- xc/include/extensions/XvMCproto.h:1.4 Mon Apr 9 20:28:24 2001 +++ xc/include/extensions/XvMCproto.h Wed Nov 14 16:54:37 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/XvMCproto.h,v 1.4 2001/04/10 00:28:24 mvojkovi Exp $ */ +/* $XFree86: xc/include/extensions/XvMCproto.h,v 1.5 2001/11/14 21:54:37 mvojkovi Exp $ */ #ifndef _XVMCPROTO_H_ #define _XVMCPROTO_H_ @@ -20,7 +20,7 @@ typedef struct { CARD32 surface_type_id B32; CARD16 chroma_format B16; - CARD16 color_description B16; + CARD16 pad0 B16; CARD16 max_width B16; CARD16 max_height B16; CARD16 subpicture_max_width B16; Index: xc/include/extensions/bigreqstr.h diff -u xc/include/extensions/bigreqstr.h:1.1.1.4 xc/include/extensions/bigreqstr.h:1.2 --- xc/include/extensions/bigreqstr.h:1.1.1.4 Tue Jan 16 17:05:21 2001 +++ xc/include/extensions/bigreqstr.h Fri Dec 14 14:53:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: bigreqstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: bigreqstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/extutil.h diff -u xc/include/extensions/extutil.h:1.5 xc/include/extensions/extutil.h:1.9 --- xc/include/extensions/extutil.h:1.5 Wed Jan 17 12:53:20 2001 +++ xc/include/extensions/extutil.h Fri Dec 14 14:53:28 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: extutil.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ + * $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -27,10 +31,12 @@ * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND * ARE SUBJECT TO CHANGE! */ -/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */ +/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */ #ifndef _EXTUTIL_H_ #define _EXTUTIL_H_ + +#include /* * We need to keep a list of open displays since the Xlib display list isn't Index: xc/include/extensions/fontcache.h diff -u xc/include/extensions/fontcache.h:1.2 xc/include/extensions/fontcache.h:1.3 --- xc/include/extensions/fontcache.h:1.2 Wed Feb 23 15:29:31 2000 +++ xc/include/extensions/fontcache.h Tue Jul 31 20:44:35 2001 @@ -27,14 +27,13 @@ * * Id: fontcache.h,v 1.6 1999/01/31 12:41:32 akiyama Exp $ */ +/* $XFree86: xc/include/extensions/fontcache.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ -#ifndef _FONTCACHE_H_ -#define _FONTCACHE_H_ +#ifndef _EXT_FONTCACHE_H_ +#define _EXT_FONTCACHE_H_ -#include - #define X_FontCacheQueryVersion 0 #define X_FontCacheGetCacheSettings 1 #define X_FontCacheChangeCacheSettings 2 @@ -46,16 +45,11 @@ #define FontCacheCannotAllocMemory 1 #define FontCacheNumberErrors (FontCacheCannotAllocMemory + 1) -#ifndef _FONTCACHE_SERVER_ - -_XFUNCPROTOBEGIN - -/* XXX */ typedef struct { long himark; long lowmark; long balance; -} FontCacheSettings; +} FontCacheSettings, *FontCacheSettingsPtr; struct cacheinfo { long hits; @@ -70,8 +64,13 @@ long balance; struct cacheinfo f; struct cacheinfo v; -} FontCacheStatistics; -/* XXX */ +} FontCacheStatistics, *FontCacheStatisticsPtr; + +#ifndef _FONTCACHE_SERVER_ + +#include + +_XFUNCPROTOBEGIN Bool FontCacheQueryVersion( #if NeedFunctionPrototypes @@ -112,6 +111,6 @@ _XFUNCPROTOEND -#endif /* _FONTCACHE_SERVER_ */ +#endif /* !_FONTCACHE_SERVER_ */ -#endif /* _FONTCACHE_H_ */ +#endif /* _EXT_FONTCACHE_H_ */ Index: xc/include/extensions/fontcacheP.h diff -u xc/include/extensions/fontcacheP.h:1.4 xc/include/extensions/fontcacheP.h:1.5 --- xc/include/extensions/fontcacheP.h:1.4 Tue Feb 29 20:04:21 2000 +++ xc/include/extensions/fontcacheP.h Tue Jul 31 20:44:35 2001 @@ -26,34 +26,12 @@ * * Id: fontcacheP.h,v 1.6 1999/01/31 12:43:53 akiyama Exp $ */ -/* $XFree86: xc/include/extensions/fontcacheP.h,v 1.4 2000/03/01 01:04:21 dawes Exp $ */ +/* $XFree86: xc/include/extensions/fontcacheP.h,v 1.5 2001/08/01 00:44:35 tsi Exp $ */ #ifndef _FONTCACHEP_H_ #define _FONTCACHEP_H_ -struct fc_cache_settings { - long himark; - long lowmark; - long balance; -}; - -struct fc_cache_stat { - long hits; - long misshits; - long purged; - long usage; -}; - -struct fc_cache_statistics { - long purge_runs; - long purge_stat; - long balance; - struct fc_cache_stat f; - struct fc_cache_stat v; -}; - -typedef struct fc_cache_settings FontCacheSettings, *FontCacheSettingsPtr; -typedef struct fc_cache_statistics FontCacheStatistics, *FontCacheStatisticsPtr; +#include int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */); void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */); Index: xc/include/extensions/fontcachstr.h diff -u xc/include/extensions/fontcachstr.h:1.2 xc/include/extensions/fontcachstr.h:1.3 --- xc/include/extensions/fontcachstr.h:1.2 Wed Feb 23 15:29:31 2000 +++ xc/include/extensions/fontcachstr.h Tue Jul 31 20:44:35 2001 @@ -27,13 +27,14 @@ * * Id: fontcachstr.h,v 1.7 1999/01/31 14:58:40 akiyama Exp $ */ +/* $XFree86: xc/include/extensions/fontcachstr.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ #ifndef _FONTCACHESTR_H_ #define _FONTCACHESTR_H_ -#include "fontcache.h" +#include #define FONTCACHENAME "FontCache" Index: xc/include/extensions/lbxbuf.h diff -u xc/include/extensions/lbxbuf.h:1.3 xc/include/extensions/lbxbuf.h:1.4 --- xc/include/extensions/lbxbuf.h:1.3 Wed Jan 17 12:53:20 2001 +++ xc/include/extensions/lbxbuf.h Wed Dec 19 16:37:29 2001 @@ -38,8 +38,14 @@ typedef struct _zlibbuffer *ZlibBufferPtr; +#include + +_XFUNCPROTOBEGIN + extern int InitZlibBuffer(ZlibBufferPtr b, int size); extern void FreeZlibBuffer(ZlibBufferPtr b); extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen); + +_XFUNCPROTOEND #endif /* _BUFFER_H_ */ Index: xc/include/extensions/lbxbufstr.h diff -u xc/include/extensions/lbxbufstr.h:1.1.1.2 xc/include/extensions/lbxbufstr.h:1.2 --- xc/include/extensions/lbxbufstr.h:1.1.1.2 Tue Jan 16 17:05:23 2001 +++ xc/include/extensions/lbxbufstr.h Tue Jul 31 20:44:35 2001 @@ -22,10 +22,12 @@ * SOFTWARE. * */ +/* $XFree86: xc/include/extensions/lbxbufstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ + #ifndef _BUFFERSTR_H_ #define _BUFFERSTR_H_ -#include "lbxbuf.h" +#include /* * ZLIB Input/Output buffer Index: xc/include/extensions/lbximage.h diff -u xc/include/extensions/lbximage.h:1.1.1.3 xc/include/extensions/lbximage.h:1.4 --- xc/include/extensions/lbximage.h:1.1.1.3 Tue Jan 16 17:05:23 2001 +++ xc/include/extensions/lbximage.h Thu Dec 20 14:28:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: lbximage.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /****************************************************************************** Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,10 +25,15 @@ in this Software without prior written authorization from The Open Group. ******************************************************************************/ +/* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */ #ifndef _LBX_IMAGE_H_ #define _LBX_IMAGE_H_ +#include + +_XFUNCPROTOBEGIN + typedef struct _LbxBitmapCompMethod { char *methodName; @@ -106,7 +115,6 @@ } LbxPixmapCompMethod; - extern int LbxImageEncodePackBits ( #if NeedFunctionPrototypes char * /* inbuf */, @@ -153,6 +161,7 @@ #endif ); +_XFUNCPROTOEND #define LBX_IMAGE_COMPRESS_SUCCESS 0 #define LBX_IMAGE_COMPRESS_NO_SUPPORT 1 Index: xc/include/extensions/lbxopts.h diff -u xc/include/extensions/lbxopts.h:1.5 xc/include/extensions/lbxopts.h:1.6 --- xc/include/extensions/lbxopts.h:1.5 Wed Jan 17 12:53:21 2001 +++ xc/include/extensions/lbxopts.h Sat Oct 27 23:32:26 2001 @@ -21,7 +21,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */ +/* $XFree86: xc/include/extensions/lbxopts.h,v 1.6 2001/10/28 03:32:26 tsi Exp $ */ #ifndef _LBX_OPTS_H_ #define _LBX_OPTS_H_ @@ -52,7 +52,7 @@ (size) = LBX_OPT_SMALLLEN_SIZE; \ } \ else { \ - (len) = LBX_OPT_BIGLEN_MIN + (p)[1] << 8 | (p)[2]; \ + (len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \ (size) = LBX_OPT_BIGLEN_SIZE; \ } Index: xc/include/extensions/lbxstr.h diff -u xc/include/extensions/lbxstr.h:1.1.1.2 xc/include/extensions/lbxstr.h:1.3 --- xc/include/extensions/lbxstr.h:1.1.1.2 Tue Jan 16 17:05:24 2001 +++ xc/include/extensions/lbxstr.h Fri Nov 23 14:21:30 2001 @@ -1,4 +1,4 @@ -/* $Xorg: lbxstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: lbxstr.h,v 1.4 2001/02/13 20:14:04 pookie Exp $ */ /* * Copyright 1992 Network Computing Devices * @@ -20,17 +20,31 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ +/* $XFree86: xc/include/extensions/lbxstr.h,v 1.3 2001/11/23 19:21:30 dawes Exp $ */ #ifndef _LBXSTR_H_ #define _LBXSTR_H_ -#include "XLbx.h" +#include #define LBXNAME "LBX" #define LBX_MAJOR_VERSION 1 #define LBX_MINOR_VERSION 0 +/* + * Redefine some basic types used by structures defined herein. This removes + * any possibility on 64-bit architectures of one entity viewing communicated + * data as 32-bit quantities and another entity viewing the same data as 64-bit + * quantities. + */ +#define XID CARD32 +#define Atom CARD32 +#define Colormap CARD32 +#define Drawable CARD32 +#define VisualID CARD32 +#define Window CARD32 + typedef struct { BOOL success; /* TRUE */ BOOL changeType; @@ -905,5 +919,17 @@ #else #define DBG(n,m) #endif + +/* + * Cancel the previous redefinition of the basic types, thus restoring their + * X.h definitions. + */ + +#undef XID +#undef Atom +#undef Colormap +#undef Drawable +#undef VisualID +#undef Window #endif /* _LBXSTR_H_ */ Index: xc/include/extensions/mitmiscstr.h diff -u xc/include/extensions/mitmiscstr.h:1.1.1.3 xc/include/extensions/mitmiscstr.h:1.2 --- xc/include/extensions/mitmiscstr.h:1.1.1.3 Tue Jan 16 17:05:25 2001 +++ xc/include/extensions/mitmiscstr.h Fri Dec 14 14:53:28 2001 @@ -2,7 +2,11 @@ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ -/* $Xorg: mitmiscstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $Xorg: mitmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ #include "MITMisc.h" Index: xc/include/extensions/multibuf.h diff -u xc/include/extensions/multibuf.h:3.3 xc/include/extensions/multibuf.h:3.4 --- xc/include/extensions/multibuf.h:3.3 Wed Jan 17 12:53:21 2001 +++ xc/include/extensions/multibuf.h Fri Dec 14 14:53:28 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: multibuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ + * $Xorg: multibuf.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/multibuf.h,v 3.3 2001/01/17 17:53:21 dawes Exp $ */ +/* $XFree86: xc/include/extensions/multibuf.h,v 3.4 2001/12/14 19:53:28 dawes Exp $ */ #ifndef _MULTIBUF_H_ #define _MULTIBUF_H_ Index: xc/include/extensions/multibufst.h diff -u xc/include/extensions/multibufst.h:3.5 xc/include/extensions/multibufst.h:3.8 --- xc/include/extensions/multibufst.h:3.5 Wed Jan 17 12:53:22 2001 +++ xc/include/extensions/multibufst.h Wed Dec 19 16:37:29 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: multibufst.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ + * $Xorg: multibufst.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/extensions/multibufst.h,v 3.5 2001/01/17 17:53:22 dawes Exp $ */ +/* $XFree86: xc/include/extensions/multibufst.h,v 3.8 2001/12/19 21:37:29 dawes Exp $ */ #ifndef _MULTIBUFST_H_ #define _MULTIBUFST_H_ @@ -34,7 +38,7 @@ #include "inputstr.h" #endif -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define MbufGetReq(name,req,info) GetReq (name, req); \ req->reqType = info->codes->major_opcode; \ req->mbufReqType = X_##name; @@ -261,7 +265,11 @@ CARD16 width B16; CARD16 height B16; CARD16 borderWidth B16; +#if defined(__cplusplus) || defined(c_plusplus) + CARD16 c_class B16; +#else CARD16 class B16; +#endif VisualID visual B32; CARD32 mask B32; } xMbufCreateStereoWindowReq; /* followed by value list */ @@ -301,7 +309,7 @@ pSTRUCT2->FUNC_NAME = tmpFn; \ } -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \ { \ if ((pPRIV->funcsWrapped & FUNC_NAME##Mask) == 0) \ Index: xc/include/extensions/randr.h diff -u /dev/null xc/include/extensions/randr.h:1.4 --- /dev/null Fri Jan 18 15:22:44 2002 +++ xc/include/extensions/randr.h Sat Nov 24 02:24:58 2001 @@ -0,0 +1,58 @@ +/* + * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $ + * + * Copyright © 2000 Compaq Computer Corporation, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Compaq not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Compaq makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Jim Gettys, Compaq Computer Corporation, Inc. + */ + +#ifndef _RANDR_H_ +#define _RANDR_H_ + +typedef unsigned short Rotation; +typedef unsigned short VisualGroupID; +typedef unsigned short GroupOfVisualGroupID; +typedef unsigned short SizeID; + +#define RANDR_NAME "RANDR" +#define RANDR_MAJOR 0 +#define RANDR_MINOR 0 + +#define RRNumberErrors 0 +#define RRNumberEvents 1 + +#define X_RRQueryVersion 0 +#define X_RRGetScreenInfo 1 +#define X_RRSetScreenConfig 2 +#define X_RRScreenChangeSelectInput 3 + +#define RRScreenChangeNotify 0 + +#define RR_Rotate_0 1 +#define RR_Rotate_90 2 +#define RR_Rotate_180 4 +#define RR_Rotate_270 8 + +#define RRSetConfigSuccess 0 +#define RRSetConfigInvalidConfigTime 1 +#define RRSetConfigInvalidTime 2 +#define RRSetConfigFailed 3 + +#endif /* _RANDR_H_ */ Index: xc/include/extensions/randrproto.h diff -u /dev/null xc/include/extensions/randrproto.h:1.5 --- /dev/null Fri Jan 18 15:22:44 2002 +++ xc/include/extensions/randrproto.h Tue Jul 31 20:44:35 2001 @@ -0,0 +1,193 @@ +/* + * $XFree86: xc/include/extensions/randrproto.h,v 1.5 2001/08/01 00:44:35 tsi Exp $ + * + * Copyright © 2000 Compaq Computer Corporation + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Compaq not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Compaq makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Jim Gettys, Compaq Computer Corporation, Inc. + */ + +#ifndef _XRANDRP_H_ +#define _XRANDRP_H_ + +#include + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + +#define Rotation CARD16 +#define VisualGroupID CARD16 +#define GroupOfVisualGroupID CARD16 +#define SizeID CARD16 + +/* + * data structures + */ + +typedef struct { + CARD16 widthInPixels B16; + CARD16 heightInPixels B16; + CARD16 widthInMillimeters B16; + CARD16 heightInMillimeters B16; + GroupOfVisualGroupID visualGroup B16; + CARD16 pad1 B16; +} xScreenSizes; +#define sz_xScreenSizes 12 + + + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xRRQueryVersionReq; +#define sz_xRRQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRRQueryVersionReply; +#define sz_xRRQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; +} xRRGetScreenInfoReq; +#define sz_xRRGetScreenInfoReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE setOfRotations; + CARD16 sequenceNumber B16; + CARD32 length B32; + Window root B32; + Time timestamp B32; + Time configTimestamp B32; + CARD16 nVisualGroups B16; + CARD16 nGroupsOfVisualGroups B16; + CARD16 nSizes B16; + SizeID sizeID B16; + VisualGroupID visualGroupID B16; + Rotation rotation B16; +} xRRGetScreenInfoReply; +#define sz_xRRGetScreenInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Drawable drawable B32; + Time timestamp B32; + Time configTimestamp B32; + SizeID sizeID B16; + Rotation rotation B16; + VisualGroupID visualGroupID B16; + CARD16 pad B16; +} xRRSetScreenConfigReq; +#define sz_xRRSetScreenConfigReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time newTimestamp B32; + Time newConfigTimestamp B32; + Window root; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRSetScreenConfigReply; +#define sz_xRRSetScreenConfigReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + BYTE enable; /* xTrue -> send events */ + BYTE pad1; + CARD16 pad2 B16; +} xRRScreenChangeSelectInputReq; +#define sz_xRRScreenChangeSelectInputReq 12 + +/* + * event + */ +typedef struct { + CARD8 type; /* always evBase + ScreenChangeNotify */ + CARD8 rotation; /* new rotation */ + CARD16 sequenceNumber B16; + Time timestamp B32; /* time screen was changed */ + Time configTimestamp B32; /* time config data was changed */ + Window root B32; /* root window */ + Window window B32; /* window requesting notification */ + SizeID sizeID B16; /* new size ID */ + VisualGroupID visualGroupID B16; /* new visual group ID */ + CARD16 widthInPixels B16; /* new size */ + CARD16 heightInPixels B16; + CARD16 widthInMillimeters B16; + CARD16 heightInMillimeters B16; +} xRRScreenChangeNotifyEvent; +#define sz_xRRScreenChangeNotifyEvent 32 + +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym +#undef Rotation +#undef VisualGroupID +#undef GroupOfVisualGroupID +#undef SizeID + +#endif /* _XRANDRP_H_ */ Index: xc/include/extensions/recordstr.h diff -u xc/include/extensions/recordstr.h:1.1.1.3 xc/include/extensions/recordstr.h:1.2 --- xc/include/extensions/recordstr.h:1.1.1.3 Tue Jan 16 17:05:28 2001 +++ xc/include/extensions/recordstr.h Tue Jul 31 20:44:35 2001 @@ -24,9 +24,13 @@ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. **************************************************************************/ +/* $XFree86: xc/include/extensions/recordstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ -#include "record.h" +#ifndef _RECORDSTR_H_ +#define _RECORDSTR_H_ +#include + #define RECORD_NAME "RECORD" #define RECORD_MAJOR_VERSION 1 #define RECORD_MINOR_VERSION 13 @@ -314,5 +318,5 @@ #undef RECORD_XIDBASE #undef RECORD_ELEMENT_HEADER #undef RECORD_CLIENTSPEC - +#endif Index: xc/include/extensions/render.h diff -u xc/include/extensions/render.h:1.3 xc/include/extensions/render.h:1.4 --- xc/include/extensions/render.h:1.3 Mon Nov 20 02:13:09 2000 +++ xc/include/extensions/render.h Thu Aug 16 04:03:25 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/include/extensions/render.h,v 1.3 2000/11/20 07:13:09 keithp Exp $ + * $XFree86: xc/include/extensions/render.h,v 1.4 2001/08/16 08:03:25 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -33,7 +33,7 @@ #define RENDER_NAME "RENDER" #define RENDER_MAJOR 0 -#define RENDER_MINOR 1 +#define RENDER_MINOR 2 #define X_RenderQueryVersion 0 #define X_RenderQueryPictFormats 1 @@ -73,6 +73,7 @@ #define PictTypeIndexed 0 #define PictTypeDirect 1 +#define PictOpMinimum 0 #define PictOpClear 0 #define PictOpSrc 1 #define PictOpDst 2 @@ -88,6 +89,39 @@ #define PictOpAdd 12 #define PictOpSaturate 13 #define PictOpMaximum 13 + +/* + * Operators only available in version 0.2 + */ +#define PictOpDisjointMinimum 0x10 +#define PictOpDisjointClear 0x10 +#define PictOpDisjointSrc 0x11 +#define PictOpDisjointDst 0x12 +#define PictOpDisjointOver 0x13 +#define PictOpDisjointOverReverse 0x14 +#define PictOpDisjointIn 0x15 +#define PictOpDisjointInReverse 0x16 +#define PictOpDisjointOut 0x17 +#define PictOpDisjointOutReverse 0x18 +#define PictOpDisjointAtop 0x19 +#define PictOpDisjointAtopReverse 0x1a +#define PictOpDisjointXor 0x1b +#define PictOpDisjointMaximum 0x1b + +#define PictOpConjointMinimum 0x20 +#define PictOpConjointClear 0x20 +#define PictOpConjointSrc 0x21 +#define PictOpConjointDst 0x22 +#define PictOpConjointOver 0x23 +#define PictOpConjointOverReverse 0x24 +#define PictOpConjointIn 0x25 +#define PictOpConjointInReverse 0x26 +#define PictOpConjointOut 0x27 +#define PictOpConjointOutReverse 0x28 +#define PictOpConjointAtop 0x29 +#define PictOpConjointAtopReverse 0x2a +#define PictOpConjointXor 0x2b +#define PictOpConjointMaximum 0x2b #define PolyEdgeSharp 0 #define PolyEdgeSmooth 1 Index: xc/include/extensions/renderproto.h diff -u xc/include/extensions/renderproto.h:1.6 xc/include/extensions/renderproto.h:1.9 --- xc/include/extensions/renderproto.h:1.6 Sun Jan 21 16:19:08 2001 +++ xc/include/extensions/renderproto.h Fri Sep 7 12:21:15 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/include/extensions/renderproto.h,v 1.6 2001/01/21 21:19:08 tsi Exp $ + * $XFree86: xc/include/extensions/renderproto.h,v 1.9 2001/09/07 16:21:15 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -27,7 +27,7 @@ #define _XRENDERP_H_ #include -#include "render.h" +#include #define Window CARD32 #define Drawable CARD32 @@ -74,7 +74,7 @@ Colormap colormap; } xPictFormInfo; -#define sz_xPictFormInfo 16 +#define sz_xPictFormInfo 28 typedef struct { VisualID visual; Index: xc/include/extensions/saverproto.h diff -u xc/include/extensions/saverproto.h:3.0 xc/include/extensions/saverproto.h:3.1 --- xc/include/extensions/saverproto.h:3.0 Tue Jun 28 08:18:37 1994 +++ xc/include/extensions/saverproto.h Tue Jul 31 20:44:35 2001 @@ -26,10 +26,12 @@ * * Author: Keith Packard, MIT X Consortium */ +/* $XFree86: xc/include/extensions/saverproto.h,v 3.1 2001/08/01 00:44:35 tsi Exp $ */ #ifndef _SAVERPROTO_H_ #define _SAVERPROTO_H_ -#include "saver.h" + +#include #define X_ScreenSaverQueryVersion 0 Index: xc/include/extensions/security.h diff -u xc/include/extensions/security.h:1.1.1.3 xc/include/extensions/security.h:1.3 --- xc/include/extensions/security.h:1.1.1.3 Tue Jan 16 17:05:28 2001 +++ xc/include/extensions/security.h Fri Dec 14 14:53:29 2001 @@ -1,8 +1,12 @@ -/* $Xorg: security.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: security.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,6 +24,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ #ifndef _SECURITY_H #define _SECURITY_H @@ -149,6 +154,12 @@ Bool fromRequest); extern void SecurityAudit(char *format, ...); + +#ifdef LBX +extern Bool SecuritySameLevel(ClientPtr client, XID authId); +#endif + +extern int XSecurityOptions(int argc, char **argv, int i); /* Give this value or higher to the -audit option to get security messages */ #define SECURITY_AUDIT_LEVEL 4 Index: xc/include/extensions/securstr.h diff -u xc/include/extensions/securstr.h:1.1.1.3 xc/include/extensions/securstr.h:1.3 --- xc/include/extensions/securstr.h:1.1.1.3 Tue Jan 16 17:05:29 2001 +++ xc/include/extensions/securstr.h Fri Dec 14 14:53:29 2001 @@ -1,8 +1,12 @@ -/* $Xorg: securstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: securstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,11 +24,12 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/include/extensions/securstr.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ #ifndef _SECURSTR_H #define _SECURSTR_H -#include "security.h" +#include #define SECURITY_EXTENSION_NAME "SECURITY" #define SECURITY_MAJOR_VERSION 1 Index: xc/include/extensions/shape.h diff -u xc/include/extensions/shape.h:1.1.1.3.2.1 xc/include/extensions/shape.h:1.3 --- xc/include/extensions/shape.h:1.1.1.3.2.1 Fri May 25 14:50:07 2001 +++ xc/include/extensions/shape.h Fri Dec 14 14:53:29 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/include/extensions/shape.h,v 1.1.1.3.2.1 2001/05/25 18:50:07 dawes Exp $ */ +/* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ ********************************************************/ -/* $Xorg: shape.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ #ifndef _SHAPE_H_ #define _SHAPE_H_ Index: xc/include/extensions/shapestr.h diff -u xc/include/extensions/shapestr.h:1.1.1.3 xc/include/extensions/shapestr.h:1.2 --- xc/include/extensions/shapestr.h:1.1.1.3 Tue Jan 16 17:05:30 2001 +++ xc/include/extensions/shapestr.h Fri Dec 14 14:53:29 2001 @@ -2,7 +2,11 @@ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ ********************************************************/ -/* $Xorg: shapestr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: shapestr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ #ifndef _SHAPESTR_H_ #define _SHAPESTR_H_ Index: xc/include/extensions/shmstr.h diff -u xc/include/extensions/shmstr.h:3.2 xc/include/extensions/shmstr.h:3.3 --- xc/include/extensions/shmstr.h:3.2 Wed Jan 17 12:53:22 2001 +++ xc/include/extensions/shmstr.h Fri Dec 14 14:53:29 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/include/extensions/shmstr.h,v 3.2 2001/01/17 17:53:22 dawes Exp $ */ +/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26,7 +30,7 @@ #ifndef _SHMSTR_H_ #define _SHMSTR_H_ -/* $Xorg: shmstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ #include "XShm.h" Index: xc/include/extensions/sync.h diff -u xc/include/extensions/sync.h:1.1.1.3 xc/include/extensions/sync.h:1.4 --- xc/include/extensions/sync.h:1.1.1.3 Tue Jan 16 17:05:31 2001 +++ xc/include/extensions/sync.h Thu Dec 20 14:40:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: sync.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: sync.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1991, 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,10 +48,15 @@ PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ +/* $XFree86: xc/include/extensions/sync.h,v 1.4 2001/12/20 19:40:59 tsi Exp $ */ #ifndef _SYNC_H_ #define _SYNC_H_ +#include + +_XFUNCPROTOBEGIN + #define SYNC_NAME "SYNC" #define SYNC_MAJOR_VERSION 3 @@ -239,6 +248,8 @@ #endif ); +_XFUNCPROTOEND + /* The _XSync macros below are for library internal use only. They exist * so that if we have to make a fix, we can change it in this one place * and have both the macro and function variants inherit the fix. @@ -390,6 +401,8 @@ * Prototypes */ +_XFUNCPROTOBEGIN + extern Status XSyncQueryExtension( #if NeedFunctionPrototypes Display* /*dpy*/, @@ -514,5 +527,7 @@ ); #endif /* _SYNC_SERVER */ + +_XFUNCPROTOEND #endif /* _SYNC_H_ */ Index: xc/include/extensions/syncstr.h diff -u xc/include/extensions/syncstr.h:1.1.1.3 xc/include/extensions/syncstr.h:1.2 --- xc/include/extensions/syncstr.h:1.1.1.3 Tue Jan 16 17:05:31 2001 +++ xc/include/extensions/syncstr.h Fri Dec 14 14:53:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: syncstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: syncstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1991, 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/xcmiscstr.h diff -u xc/include/extensions/xcmiscstr.h:1.1.1.3 xc/include/extensions/xcmiscstr.h:1.2 --- xc/include/extensions/xcmiscstr.h:1.1.1.3 Tue Jan 16 17:05:32 2001 +++ xc/include/extensions/xcmiscstr.h Fri Dec 14 14:53:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: xcmiscstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: xcmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/xf86bigfont.h diff -u xc/include/extensions/xf86bigfont.h:1.1 xc/include/extensions/xf86bigfont.h:1.2 --- xc/include/extensions/xf86bigfont.h:1.1 Tue Feb 8 12:18:25 2000 +++ xc/include/extensions/xf86bigfont.h Tue Jul 31 20:44:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86bigfont.h,v 1.1 2000/02/08 17:18:25 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86bigfont.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ /* * Declarations for the BIGFONT extension. * @@ -20,11 +20,15 @@ #define XF86BigfontNumberErrors 0 -#ifndef _XF86BIGFONT_SERVER_ +#ifdef _XF86BIGFONT_SERVER_ _XFUNCPROTOBEGIN -/* No function prototypes for now. */ +#include "font.h" + +extern void XFree86BigfontExtensionInit(void); +extern void XF86BigfontFreeFontShm(FontPtr); +extern void XF86BigfontCleanup(void); _XFUNCPROTOEND Index: xc/include/extensions/xf86bigfstr.h diff -u xc/include/extensions/xf86bigfstr.h:1.2 xc/include/extensions/xf86bigfstr.h:1.3 --- xc/include/extensions/xf86bigfstr.h:1.2 Mon Feb 28 22:09:00 2000 +++ xc/include/extensions/xf86bigfstr.h Tue Jul 31 20:44:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86bigfstr.h,v 1.2 2000/02/29 03:09:00 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86bigfstr.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */ /* * Declarations of request structures for the BIGFONT extension. * @@ -11,7 +11,7 @@ #ifndef _XF86BIGFSTR_H_ #define _XF86BIGFSTR_H_ -#include "xf86bigfont.h" +#include #define XF86BIGFONTNAME "XFree86-Bigfont" Index: xc/include/extensions/xf86dga.h diff -u xc/include/extensions/xf86dga.h:3.20 xc/include/extensions/xf86dga.h:3.21 --- xc/include/extensions/xf86dga.h:3.20 Wed Oct 13 00:20:48 1999 +++ xc/include/extensions/xf86dga.h Tue Jul 31 20:44:36 2001 @@ -1,13 +1,13 @@ /* Copyright (c) 1999 XFree86 Inc */ -/* $XFree86: xc/include/extensions/xf86dga.h,v 3.20 1999/10/13 04:20:48 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86dga.h,v 3.21 2001/08/01 00:44:36 tsi Exp $ */ #ifndef _XF86DGA_H_ #define _XF86DGA_H_ #include -#include "xf86dga1.h" +#include #define X_XDGAQueryVersion 0 Index: xc/include/extensions/xf86dgastr.h diff -u xc/include/extensions/xf86dgastr.h:3.13 xc/include/extensions/xf86dgastr.h:3.14 --- xc/include/extensions/xf86dgastr.h:3.13 Tue Dec 19 19:19:41 2000 +++ xc/include/extensions/xf86dgastr.h Tue Jul 31 20:44:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.13 2000/12/20 00:19:41 mvojkovi Exp $ */ +/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.14 2001/08/01 00:44:36 tsi Exp $ */ /* Copyright (c) 1995 Jon Tombs @@ -9,7 +9,7 @@ #ifndef _XF86DGASTR_H_ #define _XF86DGASTR_H_ -#include "xf86dga1str.h" +#include #define XF86DGANAME "XFree86-DGA" Index: xc/include/extensions/xf86misc.h diff -u xc/include/extensions/xf86misc.h:3.13 xc/include/extensions/xf86misc.h:3.14 --- xc/include/extensions/xf86misc.h:3.13 Mon Apr 17 12:29:48 2000 +++ xc/include/extensions/xf86misc.h Wed Aug 15 12:25:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86misc.h,v 3.13 2000/04/17 16:29:48 eich Exp $ */ +/* $XFree86: xc/include/extensions/xf86misc.h,v 3.14 2001/08/15 16:25:20 paulo Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -20,6 +20,7 @@ #define X_XF86MiscGetKbdSettings 4 #define X_XF86MiscSetMouseSettings 5 #define X_XF86MiscSetKbdSettings 6 +#define X_XF86MiscSetGrabKeysState 7 #define XF86MiscNumberEvents 0 @@ -72,6 +73,13 @@ #ifndef _XF86MISC_SERVER_ +/* return values for XF86MiscSetGrabKeysState */ +#define MiscExtGrabStateSuccess 0 /* No errors */ +#define MiscExtGrabStateLocked 1 /* A client already requested that + * grabs cannot be removed/killed */ +#define MiscExtGrabStateAlready 2 /* Request for enabling/disabling + * grab removeal/kill already done */ + _XFUNCPROTOBEGIN typedef struct { @@ -124,6 +132,11 @@ Status XF86MiscSetKbdSettings( Display* /* dpy */, XF86MiscKbdSettings* /* keyboard info */ +); + +int XF86MiscSetGrabKeysState( + Display* /* dpy */, + Bool /* enabled */ ); _XFUNCPROTOEND Index: xc/include/extensions/xf86mscstr.h diff -u xc/include/extensions/xf86mscstr.h:3.8 xc/include/extensions/xf86mscstr.h:3.10 --- xc/include/extensions/xf86mscstr.h:3.8 Sat Jun 27 23:52:34 1998 +++ xc/include/extensions/xf86mscstr.h Wed Aug 15 12:25:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86mscstr.h,v 3.8 1998/06/28 03:52:34 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86mscstr.h,v 3.10 2001/08/15 16:25:20 paulo Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -9,12 +9,12 @@ #ifndef _XF86MISCSTR_H_ #define _XF86MISCSTR_H_ -#include "xf86misc.h" +#include #define XF86MISCNAME "XFree86-Misc" #define XF86MISC_MAJOR_VERSION 0 /* current version numbers */ -#define XF86MISC_MINOR_VERSION 4 +#define XF86MISC_MINOR_VERSION 5 typedef struct _XF86MiscQueryVersion { CARD8 reqType; /* always XF86MiscReqCode */ @@ -152,5 +152,29 @@ CARD16 pad2 B16; } xXF86MiscSetKbdSettingsReq; #define sz_xXF86MiscSetKbdSettingsReq 20 + +typedef struct _XF86MiscSetGrabKeysState { + CARD8 reqType; /* always XF86MiscReqCode */ + CARD8 xf86miscReqType; /* always X_XF86MiscSetKbdSettings */ + CARD16 length B16; + BOOL enable; + BOOL pad1; + CARD16 pad2 B16; +} xXF86MiscSetGrabKeysStateReq; +#define sz_xXF86MiscSetGrabKeysStateReq 8 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXF86MiscSetGrabKeysStateReply; +#define sz_xXF86MiscSetGrabKeysStateReply 32 #endif /* _XF86MISCSTR_H_ */ Index: xc/include/extensions/xf86rushstr.h diff -u xc/include/extensions/xf86rushstr.h:1.4 xc/include/extensions/xf86rushstr.h:1.5 --- xc/include/extensions/xf86rushstr.h:1.4 Mon Feb 28 22:09:02 2000 +++ xc/include/extensions/xf86rushstr.h Tue Jul 31 20:44:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86rushstr.h,v 1.4 2000/02/29 03:09:02 dawes Exp $ */ +/* $XFree86: xc/include/extensions/xf86rushstr.h,v 1.5 2001/08/01 00:44:36 tsi Exp $ */ /* Copyright (c) 1998 Daryll Strauss @@ -8,7 +8,7 @@ #ifndef _XF86RUSHSTR_H_ #define _XF86RUSHSTR_H_ -#include "xf86rush.h" +#include #define XF86RUSHNAME "XFree86-Rush" Index: xc/include/extensions/xf86vmstr.h diff -u xc/include/extensions/xf86vmstr.h:3.26 xc/include/extensions/xf86vmstr.h:3.27 --- xc/include/extensions/xf86vmstr.h:3.26 Sun May 6 17:59:47 2001 +++ xc/include/extensions/xf86vmstr.h Tue Jul 31 20:44:36 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.26 2001/05/06 21:59:47 mvojkovi Exp $ */ +/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.27 2001/08/01 00:44:36 tsi Exp $ */ /* Copyright 1995 Kaleb S. KEITHLEY @@ -35,7 +35,7 @@ #ifndef _XF86VIDMODESTR_H_ #define _XF86VIDMODESTR_H_ -#include "xf86vmode.h" +#include #define XF86VIDMODENAME "XFree86-VidModeExtension" Index: xc/include/extensions/xtestext1.h diff -u xc/include/extensions/xtestext1.h:1.1.1.3 xc/include/extensions/xtestext1.h:1.2 --- xc/include/extensions/xtestext1.h:1.1.1.3 Tue Jan 16 17:05:33 2001 +++ xc/include/extensions/xtestext1.h Fri Dec 14 14:53:29 2001 @@ -1,4 +1,4 @@ -/* $Xorg: xtestext1.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: xtestext1.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* * xtestext1.h * @@ -10,7 +10,11 @@ Copyright 1986, 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/xteststr.h diff -u xc/include/extensions/xteststr.h:1.1.1.3 xc/include/extensions/xteststr.h:1.2 --- xc/include/extensions/xteststr.h:1.1.1.3 Tue Jan 16 17:05:34 2001 +++ xc/include/extensions/xteststr.h Fri Dec 14 14:53:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: xteststr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ +/* $Xorg: xteststr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/include/extensions/xtrapbits.h diff -u /dev/null xc/include/extensions/xtrapbits.h:1.1 --- /dev/null Fri Jan 18 15:22:45 2002 +++ xc/include/extensions/xtrapbits.h Fri Nov 2 18:29:26 2001 @@ -0,0 +1,83 @@ +/* $XFree86: xc/include/extensions/xtrapbits.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ +/* + * This include file is designed to be a portable way for systems to define + * bit field manipulation of arrays of bits. + */ +#ifndef __XTRAPBITS__ +#define __XTRAPBITS__ "@(#)xtrapbits.h 1.6 - 90/09/18 " + +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1994 by Digital Equipment Corporation, +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + */ +typedef unsigned char *UByteP; /* Pointer to an unsigned byte array */ +#define BitsInByte 8L /* The number of bits in a byte */ + +#define BitInByte(bit) /* Returns the bit mask of a byte */ \ + (1L << (((bit) % BitsInByte))) + +#define BitInWord(bit) /* Returns the bit mask of a word */ \ + (1L << (((bit) % (BitsInByte * 2L)))) + +#define BitInLong(bit) /* Returns the bit mask of a long */ \ + (1L << (((bit) % (BitsInByte * 4L)))) + +#define ByteInArray(array,bit) /* Returns the byte offset to get to a bit */ \ + (((UByteP)(array))[(bit) / BitsInByte]) + +#define BitIsTrue(array,bit) /* Test to see if a specific bit is True */ \ + (ByteInArray(array,bit) & BitInByte(bit)) + +#define BitIsFalse(array,bit) /* Test to see if a specific bit is False */ \ + (!(BitIsTrue(array,bit))) + +#define BitTrue(array,bit) /* Set a specific bit to be True */ \ + (ByteInArray(array,bit) |= BitInByte(bit)) + +#define BitFalse(array,bit) /* Set a specific bit to be False */ \ + (ByteInArray(array,bit) &= ~BitInByte(bit)) + +#define BitToggle(array,bit) /* Toggle a specific bit */ \ + (ByteInArray(array,bit) ^= BitInByte(bit)) + +#define BitCopy(dest,src,bit) /* Copy a specific bit */ \ + BitIsTrue((src),(bit)) ? BitTrue((dest),(bit)) : BitFalse((dest),(bit)) + +#define BitValue(array,bit) /* Return True or False depending on bit */ \ + (BitIsTrue((array),(bit)) ? True : False) + +#define BitSet(array,bit,value) /* Set bit to given value in array */ \ + (value) ? BitTrue((array),(bit)) : BitFalse((array),(bit)) + +#endif /* __XTRAPBITS__ */ Index: xc/include/extensions/xtrapddmi.h diff -u /dev/null xc/include/extensions/xtrapddmi.h:1.1 --- /dev/null Fri Jan 18 15:22:45 2002 +++ xc/include/extensions/xtrapddmi.h Fri Nov 2 18:29:26 2001 @@ -0,0 +1,115 @@ +/* $XFree86: xc/include/extensions/xtrapddmi.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ + +#ifndef __XTRAPDDMI__ +#define __XTRAPDDMI__ + +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + * DESCRIPTION: + * This header file is used by the XTrap server extension only + * (not used by clients or the XTrap Toolkit). Information + * contained herein should *not* be visible to clients (xtrapdi.h + * is used for this). The name is historical. + */ +#include +#include +#include "dix.h" + +#ifndef MIN +# define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef MAX +# define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#define XETrapNumEvents 1L /* constants used for AddExtension */ + +/* Other constants used within the extension code */ +#define XETrapMinRepSize 32L /* Minimum number of longs */ + +/* This structure will be globally declared to provide storage to hold + * the various extension wide configuration information. Allocated on + * a per-client basis. + */ +typedef struct +{ + ClientPtr client; /* Multi-client support and error handling */ + xXTrapGetCurReply cur; /* Struct of Miscellaneous state info */ + xXTrapGetStatsReply *stats; /* Pointer to stat's, malloc'd if requested */ + CARD32 last_input_time B32; /* last timestamp from input event */ + CARD16 protocol B16; /* current communication protocol */ +} XETrapEnv; + +#define XETrapSetHeaderEvent(phdr) ((phdr)->type = 0x1L) +#define XETrapSetHeaderRequest(phdr) ((phdr)->type = 0x2L) +#define XETrapSetHeaderSpecial(phdr) ((phdr)->type = 0x3L) +#define XETrapSetHeaderCursor(phdr) ((phdr)->type = 0x4L) +#define XETrapSetHeaderReply(phdr) ((phdr)->type = 0x5L) + +#ifndef vaxc +#define globaldef +#define globalref extern +#endif + +/* Extension platform identifier (conditionally defined) */ +#if ( defined (__osf__) && defined(__alpha) ) +# define XETrapPlatform PF_DECOSF1 +#endif +#ifdef ultrix +# define XETrapPlatform PF_DECUltrix +#endif +#ifdef vms +#ifdef VAXELN +# define XETrapPlatform PF_DECELN +#else +# define XETrapPlatform PF_DECVMS +#endif +#endif +#ifdef VT1000 +# define XETrapPlatform PF_DECVT1000 +#endif +#ifdef VXT +# define XETrapPlatform PF_DECXTerm +#endif +#ifdef PC +# define XETrapPlatform PF_IBMAT +#endif +#ifdef sun +# define XETrapPlatform PF_SunSparc +#endif +#ifndef XETrapPlatform +# define XETrapPlatform PF_Other +#endif /* XETrapPlatform */ + +#endif /* __XTRAPDDMI__ */ Index: xc/include/extensions/xtrapdi.h diff -u /dev/null xc/include/extensions/xtrapdi.h:1.1 --- /dev/null Fri Jan 18 15:22:45 2002 +++ xc/include/extensions/xtrapdi.h Fri Nov 2 18:29:26 2001 @@ -0,0 +1,507 @@ +/* $XFree86: xc/include/extensions/xtrapdi.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ +#ifndef __XTRAPDI__ +#define __XTRAPDI__ + +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1994 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + * DESCRIPTION: + * This header file defines the common structures/constants + * between the XTrap extension and clients. All protocol + * definitions between XTrap extension/clients can be found + * here. + */ + +#define NEED_REPLIES +#define NEED_EVENTS +#ifndef IN_MODULE +#include +#endif +#include +#include +#ifdef SMT +#define NEED_EVENTS +#define NEED_REPLIES +#endif +#include +#include +#define XTrapExtName "DEC-XTRAP" +/* Current Release, Version, and Revision of the XTrap Extension */ +#define XETrapRelease 3L +#define XETrapVersion 4L +#ifndef XETrapRevision /* Changed from the Makefile by users */ +# define XETrapRevision 0L +#endif /* XETrapRevision */ +#define XETrapProtocol 32L + +#ifndef SIZEOF +# ifdef __STDC__ +# define SIZEOF(x) sz_##x +# else +# define SIZEOF(x) sz_/**/x +# endif /* if ANSI C compiler else not */ +#endif +#ifndef sz_CARD32 +#define sz_CARD32 4L +#endif +#ifndef sz_CARD8 +#define sz_CARD8 1L +#endif +#ifndef True +# define True 1L +# define False 0L +#endif + +typedef int (*int_function)(); +typedef void (*void_function)(); + +/* This is used as flags to indicate desired request traps + * Note: This has been padded to a CARD32 to keep structure aligned + */ +#define XETrapMaxRequest (((SIZEOF(CARD32)+((256L-1L) / \ + (BitsInByte*SIZEOF(CARD8))))/SIZEOF(CARD32))*SIZEOF(CARD32)) +typedef CARD8 ReqFlags[XETrapMaxRequest]; + +/* This is used as flags to indicate desired event traps + * Until events become *fully vectored*, we'll have to fake it + * by defining an array of 5 events (KeyPress, KeyRelease, + * ButtonPress, ButtonRelease, and MotionNotify. The extra 2 + * are required as the event types start with "2" (errors and + * replies are 0 & 1). The event type is the index into the + * bits. + * Note: This has been padded to a longword to keep structure aligned + */ +#ifndef VECTORED_EVENTS +#define XETrapCoreEvents (2L+5L) +#else +#define XETrapCoreEvents 128L +#endif +#define XETrapMaxEvent (((SIZEOF(CARD32)+((XETrapCoreEvents-1L) / \ + (BitsInByte*SIZEOF(CARD8))))/SIZEOF(CARD32))*SIZEOF(CARD32)) +typedef CARD8 EventFlags[XETrapMaxEvent]; + +/* This structure is used in a request to specify the types of + * configuration information that should be changed or updated. + */ +typedef struct +{ + CARD8 valid[4L]; /* Bits TRUE indicates data field is used */ + CARD8 data[4L]; /* Bits looked at if corresponding valid bit set */ + ReqFlags req; /* Bits coorespond to core requests */ + EventFlags event; /* Bits correspond to core events */ +} XETrapFlags; + +/* Bit definitions for the above XETrapFlags structure. */ +#define XETrapTimestamp 0L /* hdr timestamps desired */ +#define XETrapCmd 1L /* command key specified */ +#define XETrapCmdKeyMod 2L /* cmd key is a modifier */ +#define XETrapRequest 3L /* output requests array */ +#define XETrapEvent 4L /* future output events array */ +#define XETrapMaxPacket 5L /* Maximum packet length set */ +#define XETrapTransOut 6L /* obsolete */ +#define XETrapStatistics 7L /* collect counts on requests */ +#define XETrapWinXY 8L /* Fill in Window (X,Y) in hdr */ +#define XETrapTransIn 9L /* obsolete */ +#define XETrapCursor 10L /* Trap cursor state changes */ +#define XETrapXInput 11L /* Use XInput extension */ +#define XETrapVectorEvents 12L /* Use Vectored Events (128) */ +#define XETrapColorReplies 13L /* Return replies with Color Req's */ +#define XETrapGrabServer 14L /* Disables client GrabServers */ + +typedef struct /* used by XEConfigRequest */ +{ + XETrapFlags flags; /* Flags to specify what should be chg'd */ + CARD16 max_pkt_size B16; /* Maximum number of bytes in a packet */ + CARD8 cmd_key; /* Keyboard command_key (KeyCode) */ +/* + * cmd_key is intentionally *not* defined KeyCode since it's definition is + * ambiguous (int in Intrinsic.h and unsigned char in X.h. + */ + CARD8 pad[1L]; /* pad out to a quadword */ +} XETrapCfg; + +/* These structures are used within the Xtrap request structure for + * the various types of xtrap request + */ +#ifndef _XINPUT +/* (see the definition of XEvent as a reference) */ +typedef struct /* used by XESimulateXEventRequest for synthesizing core evts */ +{ + CARD8 type; /* (must be first) as in XEvent */ + CARD8 detail; /* Detail keycode/button as in XEvent */ + CARD8 screen; /* screen number (0 to n) */ + CARD8 pad; /* pad to longword */ + INT16 x B16; /* X & Y coord as in XEvent */ + INT16 y B16; +} XETrapInputReq; +#endif + +/* These are constants that refer to the extension request vector table. + * A request will use these values as minor opcodes. + */ +#define XETrap_Reset 0L /* set to steady state */ +#define XETrap_GetAvailable 1L /* get available funct from ext */ +#define XETrap_Config 2L /* configure extension */ +#define XETrap_StartTrap 3L /* use Trapping */ +#define XETrap_StopTrap 4L /* stop using Trapping */ +#define XETrap_GetCurrent 5L /* get current info from ext */ +#define XETrap_GetStatistics 6L /* get count statistics from ext */ +#ifndef _XINPUT +#define XETrap_SimulateXEvent 7L /* async input simulation */ +#endif +#define XETrap_GetVersion 8L /* Get (Just) Version */ +#define XETrap_GetLastInpTime 9L /* Get Timestamp of last client input */ + +/* The following are formats of a request to the XTRAP + * extension. The data-less XTrap requests all use xXTrapReq + */ +typedef struct +{ + CARD8 reqType; + CARD8 minor_opcode; + CARD16 length B16; + CARD32 pad B32; /* Maintain quadword alignment */ +} xXTrapReq; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapReq (sizeof(xXTrapReq)) +/* For retrieving version/available info (passes lib-side protocol number) */ +typedef struct +{ + CARD8 reqType; + CARD8 minor_opcode; + CARD16 length B16; + CARD16 protocol B16; /* The xtrap extension protocol number */ + CARD16 pad B16; /* Maintain quadword alignment */ +} xXTrapGetReq; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapGetReq (sizeof(xXTrapGetReq)) + +typedef struct +{ + CARD8 reqType; + CARD8 minor_opcode; + CARD16 length B16; + /* + * The follwing is done so that structure padding wont be + * a problem. The request structure contains a shadow for + * the XETrapCfg structure. Since the XETrapCfg also has a + * substructure (XETrapFlags) this structure is also shadowed. + * + * The following are a shadow of the XETrapFlags + * structure. + */ + CARD8 config_flags_valid[4L]; + CARD8 config_flags_data[4L]; + ReqFlags config_flags_req; + EventFlags config_flags_event; + /* End Shadow (XETrapFlags)*/ + CARD16 config_max_pkt_size B16; /* Max number of bytes in a packet */ + CARD8 config_cmd_key; /* Keyboard command_key (KeyCode) */ +/* + * cmd_key is intentionally *not* defined KeyCode since it's definition is + * ambiguous (int in Intrinsic.h and unsigned char in X.h. + */ + CARD8 config_pad[1L]; /* pad out to a quadword */ + /* End Shadow (XETrapCfg) */ + CARD32 pad B32; /* Maintain quadword alignment */ +} xXTrapConfigReq; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapConfigReq (sizeof(xXTrapConfigReq)) + +#ifndef _XINPUT +typedef struct +{ + CARD8 reqType; + CARD8 minor_opcode; + CARD16 length B16; + CARD32 pad B32; /* Maintain quadword alignment */ + XETrapInputReq input; +} xXTrapInputReq; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapInputReq (sizeof(xXTrapInputReq)) +#endif + + +/* The following structures are used by the server extension to send + * information and replies to the client. + */ + +/* header for all X replies */ +typedef struct +{ + CARD8 type; + CARD8 detail; + CARD16 sequenceNumber B16; + CARD32 length B32; +} XETrapRepHdr; + +/* Structure of Get Available Functionality reply */ +typedef struct +{ + CARD32 pf_ident B32; /* Contains constant identifying the platform */ + CARD16 xtrap_release B16; /* The xtrap extension release number */ + CARD16 xtrap_version B16; /* The xtrap extension version number */ + CARD16 xtrap_revision B16; /* The xtrap extension revision number */ + CARD16 max_pkt_size B16; /* Maximum number of bytes in a packet */ + CARD8 valid[4]; /* What specific configuration flags are valid */ + CARD32 major_opcode B32; /* The major opcode identifying xtrap */ + CARD32 event_base B32; /* The event value we start at */ + CARD32 pad0 B32; /* obsolete field */ + CARD16 pad1 B16, pad2 B16, pad3 B16; /* obsolete field */ + CARD16 xtrap_protocol B16; /* The xtrap extension protocol number */ + INT16 cur_x B16; /* Current X & Y coord for relative motion */ + INT16 cur_y B16; +} XETrapGetAvailRep; + +typedef struct +{ + CARD16 xtrap_release B16; /* The xtrap extension release number */ + CARD16 xtrap_version B16; /* The xtrap extension version number */ + CARD16 xtrap_revision B16; /* The xtrap extension revision number */ + CARD16 xtrap_protocol B16; /* The xtrap extension protocol number */ +} XETrapGetVersRep; + +typedef struct +{ + CARD32 last_time B32; /* Timestamp of last input time */ +} XETrapGetLastInpTimeRep; + +/* Structure of Get Current Configuration Information reply */ +typedef struct +{ + CARD8 state_flags[2]; /* Miscelaneous flags, see below #define's */ + CARD16 pad0 B16; /* Assure quadword alignment */ + XETrapCfg config; /* Current Config information */ + CARD32 pad1 B32; +} XETrapGetCurRep; + +/* Mask definitions for the above flags. */ +#define XETrapTrapActive 0L /* If sending/receiving between client/ext */ + +/* Structure of Get Statistics Information reply */ +typedef struct +{ + CARD32 requests[256L]; /* Array containing request counts if trapped */ + CARD32 events[XETrapCoreEvents]; /* Array containing event stats */ +#ifndef VECTORED_EVENTS + CARD32 pad B32; /* Pad out to a quadword */ +#endif +} XETrapGetStatsRep; + +#define PF_Other 0L /* server not one of the below */ +#define PF_Apollo 10L /* server on Apollo system */ +#define PF_ATT 20L /* server on AT&T system */ +#define PF_Cray1 30L /* server on Cray 1 system */ +#define PF_Cray2 31L /* server on Cray 2 system */ +#define PF_DECUltrix 40L /* server on DEC ULTRIX system */ +#define PF_DECVMS 41L /* server on DEC VMS system */ +#define PF_DECVT1000 42L /* server on DEC-VT1000-terminal */ +#define PF_DECXTerm 43L /* server on DEC-X-terminal */ +#define PF_DECELN 44L /* server on DEC VAXELN X terminal */ +#define PF_DECOSF1 45L /* server on DEC's OSF/1 system */ +#define PF_HP9000s800 50L /* server on HP 9000/800 system */ +#define PF_HP9000s300 51L /* server on HP 9000/300 system */ +#define PF_IBMAT 60L /* server on IBM/AT system */ +#define PF_IBMRT 61L /* server on IBM/RT system */ +#define PF_IBMPS2 62L /* server on IBM/PS2 system */ +#define PF_IBMRS 63L /* server on IBM/RS system */ +#define PF_MacII 70L /* server on Mac II system */ +#define PF_Pegasus 80L /* server on Tektronix Pegasus system */ +#define PF_SGI 90L /* server on Silicon Graphcis system */ +#define PF_Sony 100L /* server on Sony system */ +#define PF_Sun3 110L /* server on Sun 3 system */ +#define PF_Sun386i 111L /* server on Sun 386i system */ +#define PF_SunSparc 112L /* server on Sun Sparc system */ + +/* reply sent back by XETrapGetAvailable request */ +typedef struct +{ + XETrapRepHdr hdr; + XETrapGetAvailRep data; +} xXTrapGetAvailReply; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapGetAvailReply sizeof(xXTrapGetAvailReply) + +/* reply sent back by XETrapGetVersion request */ +typedef struct +{ + XETrapRepHdr hdr; + XETrapGetVersRep data; + CARD32 pad0 B32; /* pad out to 32 bytes */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXTrapGetVersReply; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapGetVersReply sizeof(xXTrapGetVersReply) + +/* reply sent back by XETrapGetLastInpTime request */ +typedef struct +{ + XETrapRepHdr hdr; + /* + * The following is a shadow of the XETrapGetLastInpTimeRep + * structure. This is done to avoid structure padding. + */ + CARD32 data_last_time B32; /* Timestamp of last input time */ + CARD32 pad0 B32; /* pad out to 32 bytes */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xXTrapGetLITimReply; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapGetLITimReply sizeof(xXTrapGetLITimReply) + +/* reply sent back by XETrapGetCurrent request */ +typedef struct +{ + XETrapRepHdr hdr; + /* + * The following is a shadow of the XETrapGetCurRep + * structure. This is done to avoid structure padding. + * Since the XETrapGetCurRep structure contains a sub-structure + * (XETrapCfg) there is a shadow for that as well.*/ + CARD8 data_state_flags[2]; /* Misc flags, see below #define's */ + CARD16 data_pad0 B16; /* Assure quadword alignment */ + /* XETrapCfg Shadow Starts */ + CARD8 data_config_flags_valid[4L]; + CARD8 data_config_flags_data[4L]; + ReqFlags data_config_flags_req; + EventFlags data_config_flags_event; + CARD16 data_config_max_pkt_size B16; /* Max num of bytes in a pkt */ + CARD8 data_config_cmd_key; /* Keyboard cmd_key (KeyCode) */ +/* + * cmd_key is intentionally *not* defined KeyCode since it's definition is + * ambiguous (int in Intrinsic.h and unsigned char in X.h. + */ + CARD8 data_config_pad[1L]; /* pad out to a quadword */ + /* End Shadow (XETrapCfg) */ + CARD32 pad1 B32; +} xXTrapGetCurReply; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_xXTrapGetCurReply sizeof(xXTrapGetCurReply) + +/* reply sent back by XETrapGetStatistics request */ +/* Note: + * The following does *not* use the standard XETrapRepHdr, but instead + * one which is padded out to 32-bytes. This is because Cray's have a problem + * reading arrays of CARD32s without using the _Read32 macro (see XERqsts.c). + * This requires that none of the data be in the _Reply area. + */ +typedef struct +{ + CARD8 type; + CARD8 detail; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + XETrapGetStatsRep data; +} xXTrapGetStatsReply; +#define sz_xXTrapGetStatsReply 1088 + +typedef struct /* the XTrap Output header (for output from ext to client) */ +{ /* this must be quadword aligned for portability */ + CARD32 count B32; /* Length including this header */ + CARD32 timestamp B32; /* timestamp if desired */ + CARD8 type; /* event id, request id, special id */ + CARD8 screen; /* screen number (0 to n) */ + INT16 win_x B16; /* X coord of drawable, if any */ + INT16 win_y B16; /* X coord of drawable, if any */ + CARD16 client B16; /* to distinguish requests */ +} XETrapHeader; +/* the following works because all fields are defined as bit (Bnn) fields */ +#define sz_XETrapHeader sizeof(XETrapHeader) + +#define XETrapHeaderIsEvent(phdr) (XETrapGetHeaderType(phdr) == 0x1L) +#define XETrapHeaderIsRequest(phdr) (XETrapGetHeaderType(phdr) == 0x2L) +#define XETrapHeaderIsSpecial(phdr) (XETrapGetHeaderType(phdr) == 0x3L) +#define XETrapHeaderIsCursor(phdr) (XETrapGetHeaderType(phdr) == 0x4L) +#define XETrapHeaderIsReply(phdr) (XETrapGetHeaderType(phdr) == 0x5L) + +/* Define a structure used for reading/writing datum of type XTrap */ +typedef struct +{ + XETrapHeader hdr; + union + { + xEvent event; + xResourceReq req; + xGenericReply reply; + /* special? */ + } u; +} XETrapDatum; + +/* this doesn't get picked up for VMS server builds (different Xproto.h) */ +#ifndef sz_xEvent +#define sz_xEvent 32 +#endif +/* Minimum size of a packet from the server extension */ +#define XETrapMinPktSize (SIZEOF(XETrapHeader) + SIZEOF(xEvent)) + +/* Constants used with the XLIB transport */ +#define XETrapDataStart 0L /* Used in the detail field */ +#define XETrapDataContinued 1L /* Used in the detail field */ +#define XETrapDataLast 2L /* Used in the detail field */ +#define XETrapData 0L /* Used in the type field */ +#define XETrapNumberEvents 1L +/* This is the representation on the wire(see also XLib.h) */ +#define sz_EventData 24L /* 32 bytes - type, detail, seq, index */ +typedef struct { + CARD8 type; + CARD8 detail; + CARD16 sequenceNumber B16; + CARD32 idx B32; + CARD8 data[sz_EventData]; +} xETrapDataEvent; + +/* Error message indexes added to X for extension */ +#define BadIO 2L /* Can't read/write */ +#define BadStatistics 4L /* Stat's not avail. */ +#define BadDevices 5L /* Devices not vectored */ +#define BadScreen 7L /* Can't send event to given screen */ +#define BadSwapReq 8L /* Can't send swapped extension requests */ +#define XETrapNumErrors (BadSwapReq + 1) + + +#define XEKeyIsClear 0 +#define XEKeyIsEcho 1 +#define XEKeyIsOther 2 + +#endif /* __XTRAPDI__ */ Index: xc/include/extensions/xtrapemacros.h diff -u /dev/null xc/include/extensions/xtrapemacros.h:1.2 --- /dev/null Fri Jan 18 15:22:45 2002 +++ xc/include/extensions/xtrapemacros.h Wed Nov 21 18:06:58 2001 @@ -0,0 +1,387 @@ +/* $XFree86: xc/include/extensions/xtrapemacros.h,v 1.2 2001/11/21 23:06:58 tsi Exp $ */ +#ifndef __XTRAPEMACROS__ +#define __XTRAPEMACROS__ "@(#)xtrapemacros.h 1.9 - 90/09/18 " + +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + * DESCRIPTION: + * This include file is designed to provide the *visible* + * interface to XTrap data structures. Fields can be set + * using these macros by client programs unless otherwise + * specified; however, use of Trap Context convenience + * routines is strongly encouraged (XETrapContext.c) + */ +#include +#include + +/* msleep macro to replace msleep() for portability reasons */ +#define msleep(m) usleep((m)*1000) + +/* Copying TC's assumes that the new TC must be created */ +#define XECopyTC(src,mask,dest) \ + (dest = XECreateTC(((src)->dpy), (mask), (&((src)->values)))) + +/* Expands to SET each element of the TCValues structure + * Returns the TCValues Mask so that the Set can be entered + * as an argument to the XEChangeTC() routine call + */ +/* Note: req_cb & evt_cb would only be used if you wanted to + * *share* callbacks between Trap Contexts. Normally, + * XEAddRequestCB() and XEAddEventCB() would be used. + */ +#define XETrapSetCfgReqCB(tcv,x) ((tcv)->req_cb = (x)) +#define XETrapSetCfgEvtCB(tcv,x) ((tcv)->evt_cb = (x)) +#define XETrapSetCfgMaxPktSize(tcv,x) ((tcv)->v.max_pkt_size = (x)) +#define XETrapSetCfgCmdKey(tcv,x) ((tcv)->v.cmd_key = (x)) +/* Note: e is only pertinent for "valid" or "data" */ +#define XETrapSetCfgFlags(tcv,e,a) \ + memcpy((tcv)->v.flags.e, (a), sizeof((tcv)->v.flags.e)) +#define XETrapSetCfgFlagTimestamp(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapTimestamp, (x)) +#define XETrapSetCfgFlagCmd(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapCmd, (x)) +#define XETrapSetCfgFlagCmdKeyMod(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapCmdKeyMod, (x)) +#define XETrapSetCfgFlagRequest(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapRequest, (x)) +#define XETrapSetCfgFlagEvent(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapEvent, (x)) +#define XETrapSetCfgFlagMaxPacket(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapMaxPacket, (x)) +#define XETrapSetCfgFlagStatistics(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapStatistics, (x)) +#define XETrapSetCfgFlagWinXY(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapWinXY, (x)) +#define XETrapSetCfgFlagCursor(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapCursor, (x)) +#define XETrapSetCfgFlagReq(tcv,request,x) \ + BitSet((tcv)->v.flags.req, (request), (x)) +#define XETrapSetCfgFlagXInput(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapXInput, (x)) +#define XETrapSetCfgFlagColorReplies(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapColorReplies, (x)) +#define XETrapSetCfgFlagGrabServer(tcv,e,x) \ + BitSet((tcv)->v.flags.e, XETrapGrabServer, (x)) +#define XETrapSetCfgFlagEvt(tcv,evt,x) \ + BitSet((tcv)->v.flags.event, (evt), (x)) + +#define XETrapSetValFlagDeltaTimes(tcv,x) \ + BitSet((tcv)->tc_flags, XETCDeltaTimes, (x)) + +/* Fields returned in the "GetAvailable" request */ +#define XETrapGetAvailPFIdent(avail) ((avail)->pf_ident) +#define XETrapGetAvailRelease(avail) ((avail)->xtrap_release) +#define XETrapGetAvailVersion(avail) ((avail)->xtrap_version) +#define XETrapGetAvailRevision(avail) ((avail)->xtrap_revision) +#define XETrapGetAvailMaxPktSize(avail) ((avail)->max_pkt_size) +#define XETrapGetAvailFlags(avail,a) \ + memcpy((a), (avail)->valid, sizeof((avail)->valid)) +#define XETrapGetAvailFlagTimestamp(avail) \ + (BitValue((avail)->valid, XETrapTimestamp)) +#define XETrapGetAvailFlagCmd(avail) \ + (BitValue((avail)->valid, XETrapCmd)) +#define XETrapGetAvailFlagCmdKeyMod(avail) \ + (BitValue((avail)->valid, XETrapCmdKeyMod)) +#define XETrapGetAvailFlagRequest(avail) \ + (BitValue((avail)->valid, XETrapRequest)) +#define XETrapGetAvailFlagEvent(avail) \ + (BitValue((avail)->valid, XETrapEvent)) +#define XETrapGetAvailFlagMaxPacket(avail) \ + (BitValue((avail)->valid, XETrapMaxPacket)) +#define XETrapGetAvailFlagStatistics(avail) \ + (BitValue((avail)->valid, XETrapStatistics)) +#define XETrapGetAvailFlagWinXY(avail) \ + (BitValue((avail)->valid, XETrapWinXY)) +#define XETrapGetAvailFlagCursor(avail) \ + (BitValue((avail)->valid, XETrapCursor)) +#define XETrapGetAvailFlagXInput(avail) \ + (BitValue((avail)->valid, XETrapXInput)) +#define XETrapGetAvailFlagVecEvt(avail) \ + (BitValue((avail)->valid, XETrapVectorEvents)) +#define XETrapGetAvailFlagColorReplies(avail) \ + (BitValue((avail)->valid, XETrapColorReplies)) +#define XETrapGetAvailFlagGrabServer(avail) \ + (BitValue((avail)->valid, XETrapGrabServer)) +#define XETrapGetAvailOpCode(avail) ((avail)->major_opcode) +/* Macro's for creating current request and trap context macros */ +#define XETrapGetCfgMaxPktSize(cfg) ((cfg)->max_pkt_size) +#define XETrapGetCfgCmdKey(cfg) ((cfg)->cmd_key) +#define XETrapGetCfgFlags(cfg,e,a) \ + memcpy((a), (cfg)->flags.e, sizeof((cfg)->flags.e)) +#define XETrapGetCfgFlagTimestamp(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapTimestamp)) +#define XETrapGetCfgFlagCmd(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapCmd)) +#define XETrapGetCfgFlagCmdKeyMod(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapCmdKeyMod)) +#define XETrapGetCfgFlagRequest(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapRequest)) +#define XETrapGetCfgFlagEvent(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapEvent)) +#define XETrapGetCfgFlagMaxPacket(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapMaxPacket)) +#define XETrapGetCfgFlagStatistics(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapStatistics)) +#define XETrapGetCfgFlagWinXY(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapWinXY)) +#define XETrapGetCfgFlagCursor(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapCursor)) +#define XETrapGetCfgFlagXInput(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapXInput)) +#define XETrapGetCfgFlagColorReplies(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapColorReplies)) +#define XETrapGetCfgFlagGrabServer(cfg,e) \ + (BitValue((cfg)->flags.e, XETrapGrabServer)) +/* Request values are in "Xproto.h" of the flavor X_RequestType */ +#define XETrapGetCfgFlagReq(cfg,request) \ + (BitValue((cfg)->flags.req, (request))) +/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ +#define XETrapGetCfgFlagEvt(cfg,evt) \ + (BitValue((cfg)->flags.event, (evt))) + +/* Fields returned int the "GetCurrent" Request */ +#define XETrapGetCurX(avail) ((avail)->cur_x) +#define XETrapGetCurY(avail) ((avail)->cur_y) +#define XETrapGetCurSFlags(cur,a) \ + memcpy((a), (cur)->state_flags, sizeof((cur)->state_flags)) +#define XETrapGetCurMaxPktSize(cur) (XETrapGetCfgMaxPktSize(&((cur)->config))) +#define XETrapGetCurCmdKey(cur) (XETrapGetCfgCmdKey(&((cur)->config))) +/* Note: e is only pertinent for "valid" or "data" */ +#define XETrapGetCurCFlags(cur,e,a) (XETrapGetCfgFlags(&((cur)->config),e,a)) +#define XETrapGetCurFlagTimestamp(cur,e) \ + (XETrapGetCfgFlagTimestamp(&((cur)->config),e)) +#define XETrapGetCurFlagCmd(cur,e) (XETrapGetCfgFlagCmd(&((cur)->config),e)) +#define XETrapGetCurFlagCmdKeyMod(cur,e) \ + (XETrapGetCfgFlagCmdKeyMod(&((cur)->config),e)) +#define XETrapGetCurFlagRequest(cur,r) \ + (XETrapGetCfgFlagRequest(&((cur)->config),r)) +#define XETrapGetCurFlagEvent(cur,e) \ + (XETrapGetCfgFlagEvent(&((cur)->config),e)) +#define XETrapGetCurFlagMaxPacket(cur,e) \ + (XETrapGetCfgFlagMaxPacket(&((cur)->config),e)) +#define XETrapGetCurFlagStatistics(cur,e) \ + (XETrapGetCfgFlagStatistics(&((cur)->config),e)) +#define XETrapGetCurFlagWinXY(cur,e) \ + (XETrapGetCfgFlagWinXY(&((cur)->config),e)) +#define XETrapGetCurFlagCursor(cur,e) \ + (XETrapGetCfgFlagCursor(&((cur)->config),e)) +#define XETrapGetCurFlagXInput(cur,e) \ + (XETrapGetCfgFlagXInput(&((cur)->config),e)) +#define XETrapGetCurFlagColorReplies(cur,e) \ + (XETrapGetCfgFlagColorReplies(&((cur)->config),e)) +#define XETrapGetCurFlagGrabServer(cur,e) \ + (XETrapGetCfgFlagGrabServer(&((cur)->config),e)) +/* Request values are in "Xproto.h" of the flavor X_RequestType */ +#define XETrapGetCurFlagReq(cur,r) (XETrapGetCfgFlagReq(&((cur)->config),r)) +/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ +#define XETrapGetCurFlagEvt(cur,e) (XETrapGetCfgFlagEvt(&((cur)->config),e)) + +/* Fields returned int the "GetStatistics" Request */ +#define XETrapGetStatsReq(stat,e) ((stat)->requests[(e)]) +#define XETrapGetStatsEvt(stat,e) ((stat)->events[(e)]) + +/* Fields returned in the "GetVersion" request */ +#define XETrapGetVersRelease(vers) ((vers)->xtrap_release) +#define XETrapGetVersVersion(vers) ((vers)->xtrap_version) +#define XETrapGetVersRevision(vers) ((vers)->xtrap_revision) + +/* Fields returned in the "GetLastInpTime" request */ +#define XETrapGetLastInpTime(time_rep) ((time_rep)->last_time) + +/* Expands to GET each element of the TCValues structure */ +#define XETrapGetTCReqCB(tc) ((tc)->values.req_cb) +#define XETrapGetTCEvtCB(tc) ((tc)->values.evt_cb) +#define XETrapGetTCTime(tc) ((tc)->values.last_time) +/* TC specific flags */ +#define XETrapGetTCLFlags(tc,a) \ + memcpy((a), (tc)->values.tc_flags, sizeof((tc)->values.tc_flags)) +#define XETrapGetTCFlagDeltaTimes(tc) \ + (BitValue((tc)->values.tc_flags, XETCDeltaTimes)) +#define XETrapGetTCFlagTrapActive(tc) \ + (BitValue((tc)->values.tc_flags, XETCTrapActive)) +#define XETrapGetTCMaxPktSize(tc) (XETrapGetCfgMaxPktSize(&((tc)->values.v))) +#define XETrapGetTCCmdKey(tc) (XETrapGetCfgCmdKey(&((tc)->values.v))) +/* Note: e is only pertinent for "valid" or "data" */ +#define XETrapGetTCFlags(tc,e,a) (XETrapGetCfgFlags(&((tc)->values.v),e,a)) +#define XETrapGetTCFlagTimestamp(tc,e) \ + (XETrapGetCfgFlagTimestamp(&((tc)->values.v),e)) +#define XETrapGetTCFlagCmd(tc,e) \ + (XETrapGetCfgFlagCmd(&((tc)->values.v),e)) +#define XETrapGetTCFlagCmdKeyMod(tc,e) \ + (XETrapGetCfgFlagCmdKeyMod(&((tc)->values.v),e)) +#define XETrapGetTCFlagRequest(tc,r) \ + (XETrapGetCfgFlagRequest(&((tc)->values.v),r)) +#define XETrapGetTCFlagEvent(tc,e) \ + (XETrapGetCfgFlagEvent(&((tc)->values.v),e)) +#define XETrapGetTCFlagMaxPacket(tc,e) \ + (XETrapGetCfgFlagMaxPacket(&((tc)->values.v),e)) +#define XETrapGetTCFlagStatistics(tc,e) \ + (XETrapGetCfgFlagStatistics(&((tc)->values.v),e)) +#define XETrapGetTCFlagWinXY(tc,e) \ + (XETrapGetCfgFlagWinXY(&((tc)->values.v),e)) +#define XETrapGetTCFlagCursor(tc,e) \ + (XETrapGetCfgFlagCursor(&((tc)->values.v),e)) +#define XETrapGetTCFlagXInput(tc,e) \ + (XETrapGetCfgFlagXInput(&((tc)->values.v),e)) +#define XETrapGetTCFlagColorReplies(tc,e) \ + (XETrapGetCfgFlagColorReplies(&((tc)->values.v),e)) +#define XETrapGetTCFlagGrabServer(tc,e) \ + (XETrapGetCfgFlagGrabServer(&((tc)->values.v),e)) +/* Request values are in "Xproto.h" of the flavor X_RequestType */ +#define XETrapGetTCFlagReq(tc,r) \ + (XETrapGetCfgFlagReq(&((tc)->values.v),r)) +/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ +#define XETrapGetTCFlagEvt(tc,e) \ + (XETrapGetCfgFlagEvt(&((tc)->values.v),e)) +/* The following can/should *not* be set directly! */ +#define XETrapGetNext(tc) ((tc)->next) +#define XETrapGetDpy(tc) ((tc)->dpy) +#define XETrapGetEventBase(tc) ((tc)->eventBase) +#define XETrapGetErrorBase(tc) ((tc)->errorBase) +#define XETrapGetExtOpcode(tc) ((tc)->extOpcode) +#define XETrapGetXBuff(tc) ((tc)->xbuff) +#define XETrapGetXMaxSize(tc) ((tc)->xmax_size) +#define XETrapGetExt(tc) ((tc)->ext_data) +#define XETrapGetDirty(tc) ((tc)->dirty) +#define XETrapGetValues(tc) memcpy((x),(tc)->values,sizeof((tc)->values)) +#define XETrapGetEventFunc(tc) ((tc)->eventFunc) + +#define XETrapGetHeaderCount(phdr) ((phdr)->count) +#define XETrapGetHeaderTimestamp(phdr) ((phdr)->timestamp) +#define XETrapGetHeaderType(phdr) ((phdr)->type) +#define XETrapGetHeaderScreen(phdr) ((phdr)->screen) +#define XETrapGetHeaderWindowX(phdr) ((phdr)->win_x) +#define XETrapGetHeaderWindowY(phdr) ((phdr)->win_y) +#define XETrapGetHeaderClient(phdr) ((phdr)->client) + +#define XEGetRelease(tc) ((tc)->release) +#define XEGetVersion(tc) ((tc)->version) +#define XEGetRevision(tc) ((tc)->revision) + +/* Condition handling macros */ +#if !defined(vms) && \ + (!defined(_InitExceptionHandling) || !defined(_ClearExceptionHandling)) +# ifndef _SetSIGBUSHandling +# ifdef SIGBUS +# define _SetSIGBUSHandling(rtn) (void)signal(SIGBUS, rtn) +# else +# define _SetSIGBUSHandling(rtn) /* */ +# endif +# endif +# ifndef _SetSIGSEGVHandling +# ifdef SIGSEGV +# define _SetSIGSEGVHandling(rtn) (void)signal(SIGSEGV, rtn) +# else +# define _SetSIGSEGVHandling(rtn) /* */ +# endif +# endif +# ifndef _SetSIGFPEHandling +# ifdef SIGFPE +# define _SetSIGFPEHandling(rtn) (void)signal(SIGFPE, rtn) +# else +# define _SetSIGFPEHandling(rtn) /* */ +# endif +# endif +# ifndef _SetSIGILLHandling +# ifdef SIGILL +# define _SetSIGILLHandling(rtn) (void)signal(SIGILL, rtn) +# else +# define _SetSIGILLHandling(rtn) /* */ +# endif +# endif +# ifndef _SetSIGSYSHandling +# ifdef SIGSYS +# define _SetSIGSYSHandling(rtn) (void)signal(SIGSYS, rtn) +# else +# define _SetSIGSYSHandling(rtn) /* */ +# endif +# endif +# ifndef _SetSIGHUPHandling +# ifdef SIGHUP +# define _SetSIGHUPHandling(rtn) (void)signal(SIGHUP, rtn) +# else +# define _SetSIGHUPHandling(rtn) /* */ +# endif +# endif +# ifndef _SetSIGPIPEHandling +# ifdef SIGPIPE +# define _SetSIGPIPEHandling(rtn) (void)signal(SIGPIPE, rtn) +# else +# define _SetSIGPIPEHandling(rtn) /* */ +# endif +# endif +# ifndef _SetSIGTERMHandling +# ifdef SIGTERM +# define _SetSIGTERMHandling(rtn) (void)signal(SIGTERM, rtn) +# else +# define _SetSIGTERMHandling(rtn) /* */ +# endif +# endif +#endif +#ifndef _InitExceptionHandling +#ifdef vms +#define _InitExceptionHandling(rtn) \ + VAXC$ESTABLISH(rtn) /* VMS exception handler */ +#else /* vms */ +#define _InitExceptionHandling(rtn) \ + _SetSIGBUSHandling(rtn); /* Bus error */ \ + _SetSIGSEGVHandling(rtn); /* Accvio/Segment error */ \ + _SetSIGFPEHandling(rtn); /* Floating point exception */ \ + _SetSIGILLHandling(rtn); /* Illegal instruction */ \ + _SetSIGSYSHandling(rtn); /* Param error in sys call */ \ + _SetSIGHUPHandling(rtn); \ + _SetSIGPIPEHandling(rtn); \ + _SetSIGTERMHandling(rtn) +#endif /* vms */ +#endif /* _InitExceptionHandling */ + +#ifndef _ClearExceptionHandling +#ifdef vms +#define _ClearExceptionHandling() \ + LIB$REVERT() +#else +#define _ClearExceptionHandling() \ + _SetSIGBUSHandling(SIG_DFL); /* Bus error */ \ + _SetSIGSEGVHandling(SIG_DFL); /* Accvio/Segment error */ \ + _SetSIGFPEHandling(SIG_DFL); /* Floating point exception */ \ + _SetSIGILLHandling(SIG_DFL); /* Illegal instruction */ \ + _SetSIGSYSHandling(SIG_DFL); /* Param error in sys call */ \ + _SetSIGHUPHandling(SIG_DFL); \ + _SetSIGPIPEHandling(SIG_DFL); \ + _SetSIGTERMHandling(SIG_DFL) +#endif /* vms */ +#endif /* _ClearExceptionHandling */ + +#endif /* __XTRAPEMACROS__ */ Index: xc/include/extensions/xtraplib.h diff -u /dev/null xc/include/extensions/xtraplib.h:1.1 --- /dev/null Fri Jan 18 15:22:45 2002 +++ xc/include/extensions/xtraplib.h Fri Nov 2 18:29:26 2001 @@ -0,0 +1,128 @@ +/* $XFree86: xc/include/extensions/xtraplib.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ +#ifndef __XTRAPLIB__ +#define __XTRAPLIB__ + + +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + * DESCRIPTION: + * This header file describes all the structures/constants required + * for interfacing with the client toolkit *except* the common + * client/extension definitions in xtrapdi.h. Namely, *no* extension- + * only information or client/extension information can be found here. + */ +#ifdef SMT +#define NEED_EVENTS +#define NEED_REPLIES +#endif +#include +#include +#include +#include + +typedef struct /* Callback structure */ +{ + void_function func; + BYTE *data; +} XETrapCB; + +/* Data structure for setting trap context */ +typedef struct +{ + CARD8 tc_flags[2L]; /* Toolkit-side specific flags */ + XETrapCfg v; /* XTrap configuration values */ + XETrapCB *req_cb; /* Pointer to Request Callbacks */ + XETrapCB *evt_cb; /* Pointer to Event Callbacks (starting at 2) */ + CARD32 last_time B32; /* Last (delta) timestamp */ +} XETCValues; + + /* bits 0 thru 6 are formerly "families" (now obsolete) */ +#define XETCDeltaTimes 7 +#define XETCTrapActive 8 + /* bits 9 thru 15 are reserved for future expansion */ + +/* Values bit masks (used when determining what's dirty */ +#define TCStatistics (1L<<0L) +#define TCRequests (1L<<1L) +#define TCEvents (1L<<2L) +#define TCMaxPacket (1L<<3L) +#define TCCmdKey (1L<<4L) +#define TCTimeStamps (1L<<5L) +#define TCWinXY (1L<<6L) +#define TCXInput (1L<<7L) +#define TCReqCBs (1L<<8L) +#define TCEvtCBs (1L<<9L) +#define TCCursor (1L<<10L) +#define TCColorReplies (1L<<11L) +#define TCGrabServer (1L<<12L) + +/* This is the representation we use in the library code for XLib transport */ +typedef struct { + int type; + unsigned long serial; + Bool synthetic; + Display *display; + int detail; + unsigned long idx; + unsigned char data[sz_EventData]; +} XETrapDataEvent; + +/* Trap Context structure for maintaining XTrap State for client */ +typedef struct _XETC +{ + struct _XETC *next; /* Ptr to next linked-listed TC */ + Display *dpy; /* Display ptr of current TC */ + INT32 eventBase /*B32*/; /* First event value */ + INT32 errorBase /*B32*/; /* First error value */ + INT32 extOpcode /*B32*/; /* Major opcode of the extension */ + BYTE *xbuff; /* Pointer to buffer for XLib Communications */ + CARD16 xmax_size /*B16*/; /* Max Size of a request */ + XExtData *ext_data; /* hook for extension to hang data */ + /* + * The following are initialized with the client-side version number + * However, when either a GetAvailable or GetVersion reply is received, + * these values are updated with the *oldest* version numbers. + */ + CARD16 release /*B16*/; /* The extension release number */ + CARD16 version /*B16*/; /* The xtrap extension version number */ + CARD16 revision /*B16*/; /* The xtrap extension revision number */ + CARD16 protocol /*B16*/; /* The xtrap extension protocol number */ + unsigned dirty /*B32*/; /* cache dirty bits */ + XETCValues values; /* shadow structure of values */ + Boolean (*eventFunc[XETrapNumberEvents])(XETrapDataEvent *event, struct _XETC *tc); +} XETC; + + +#endif /* __XTRAPLIB__ */ Index: xc/include/extensions/xtraplibp.h diff -u /dev/null xc/include/extensions/xtraplibp.h:1.1 --- /dev/null Fri Jan 18 15:22:45 2002 +++ xc/include/extensions/xtraplibp.h Fri Nov 2 18:29:26 2001 @@ -0,0 +1,142 @@ +/* $XFree86: xc/include/extensions/xtraplibp.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ +#ifndef __XTRAPLIBP__ +#define __XTRAPLIBP__ + + +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + * DESCRIPTION: + * This header file contains the function prototypes for client/toolkit + * routines sorted by module (globally defined routines *only*). + */ + +/* XEConTxt.c */ +XETC *XECreateTC (Display *dpy , CARD32 valuemask , XETCValues *value ); +int XEChangeTC (XETC *tc , CARD32 mask , XETCValues *values ); +void XEFreeTC (XETC *tc ); +int XETrapSetMaxPacket (XETC *tc , Bool set_flag , CARD16 size ); +int XETrapSetCommandKey (XETC *tc , Bool set_flag , KeySym cmd_key , + Bool mod_flag ); +int XETrapSetTimestamps (XETC *tc , Bool set_flag , Bool delta_flag ); +int XETrapSetWinXY (XETC *tc , Bool set_flag ); +int XETrapSetCursor (XETC *tc , Bool set_flag ); +int XETrapSetXInput (XETC *tc , Bool set_flag ); +int XETrapSetColorReplies (XETC *tc , Bool set_flag ); +int XETrapSetGrabServer (XETC *tc , Bool set_flag ); +int XETrapSetStatistics (XETC *tc , Bool set_flag ); +int XETrapSetRequests (XETC *tc , Bool set_flag , ReqFlags requests ); +int XETrapSetEvents (XETC *tc , Bool set_flag , EventFlags events ); +Bool XESetCmdGateState (XETC *tc , CARD8 type, Bool *gate_closed , + CARD8 *next_key , Bool *key_ignore ); + +/* XERqsts.c */ +int XEFlushConfig (XETC *tc ); +int XEResetRequest (XETC *tc ); +int XEGetVersionRequest (XETC *tc , XETrapGetVersRep *ret ); +int XEGetLastInpTimeRequest (XETC *tc , XETrapGetLastInpTimeRep *ret ); +int XEGetAvailableRequest (XETC *tc , XETrapGetAvailRep *ret ); +int XEStartTrapRequest (XETC *tc ); +int XEStopTrapRequest (XETC *tc ); +int XESimulateXEventRequest (XETC *tc , CARD8 type , CARD8 detail , + CARD16 x , CARD16 y , CARD8 screen ); +int XEGetCurrentRequest (XETC *tc , XETrapGetCurRep *ret ); +int XEGetStatisticsRequest (XETC *tc , XETrapGetStatsRep *ret ); + +/* XECallBcks.c */ +int XEAddRequestCB (XETC *tc , CARD8 req , void_function func , BYTE *data ); +int XEAddRequestCBs (XETC *tc , ReqFlags req_flags , void_function func , + BYTE *data ); +int XEAddEventCB (XETC *tc , CARD8 evt , void_function func , BYTE *data ); +int XEAddEventCBs (XETC *tc , EventFlags evt_flags , void_function func , + BYTE *data ); + +/* The following seem to never be used. Perhaps they should be removed */ +void XERemoveRequestCB (XETC *tc, CARD8 req); +void XERemoveRequestCBs (XETC *tc, ReqFlags req_flags); +void XERemoveAllRequestCBs (XETC *tc); +void XERemoveEventCB (XETC *tc, CARD8 evt); +void XERemoveEventCBs (XETC *tc, EventFlags evt_flags); +void XERemoveAllEventCBs (XETC *tc); + + +/* XEDsptch.c */ +Boolean XETrapDispatchXLib (XETrapDataEvent *event , XETC *tc); + +/* XEWrappers.c */ +Boolean XETrapDispatchEvent (XEvent *pevent , XETC *tc ); +XtInputMask XETrapAppPending (XtAppContext app); +void XETrapAppMainLoop (XtAppContext app , XETC *tc ); +int XETrapAppWhileLoop (XtAppContext app , XETC *tc , Bool *done ); +int XETrapWaitForSomething (XtAppContext app ); +Boolean (*XETrapSetEventHandler(XETC *tc, CARD32 id, Boolean (*pfunc)(XETrapDataEvent *event, XETC *tc))) (XETrapDataEvent *event, XETC *tc); + +/* XEPrInfo.c */ +void XEPrintRelease (FILE *ofp , XETrapGetAvailRep *pavail ); +void XEPrintTkRelease ( FILE *ofp, XETC *tc); +void XEPrintPlatform (FILE *ofp , XETrapGetAvailRep *pavail ); +void XEPrintAvailFlags (FILE *ofp , XETrapGetAvailRep *pavail ); +void XEPrintAvailPktSz (FILE *ofp , XETrapGetAvailRep *pavail ); +void XEPrintStateFlags (FILE *ofp , XETrapGetCurRep *pcur ); +void XEPrintMajOpcode (FILE *ofp , XETrapGetAvailRep *pavail ); +void XEPrintCurXY (FILE *ofp , XETrapGetAvailRep *pavail ); +void XEPrintTkFlags (FILE *ofp , XETC *tc ); +void XEPrintLastTime (FILE *ofp , XETC *tc ); +void XEPrintCfgFlags (FILE *ofp , XETrapGetCurRep *pcur ); +void XEPrintRequests (FILE *ofp , XETrapGetCurRep *pcur ); +void XEPrintEvents (FILE *ofp , XETrapGetCurRep *pcur ); +void XEPrintCurPktSz (FILE *ofp , XETrapGetCurRep *pcur ); +void XEPrintCmdKey (FILE *ofp , XETrapGetCurRep *pcur ); +void XEPrintEvtStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); +void XEPrintReqStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); +void XEPrintAvail (FILE *ofp , XETrapGetAvailRep *pavail ); +void XEPrintTkState (FILE *ofp , XETC *tc ); +void XEPrintCurrent (FILE *ofp , XETrapGetCurRep *pcur ); +void XEPrintStatistics (FILE *ofp , XETrapGetStatsRep *pstats, XETC *tc ); + +/* XEStrMap.c */ +INT16 XEEventStringToID (char *string ); +INT16 XERequestStringToID (char *string ); +CARD32 XEPlatformStringToID (char *string ); +char *XEEventIDToString (CARD8 id , XETC *tc); +char *XERequestIDToExtString (register CARD8 id , XETC *tc); +char *XERequestIDToString (CARD8 id , XETC *tc); +char *XEPlatformIDToString (CARD32 id ); + +/* XETrapInit.c */ +Bool XETrapQueryExtension (Display *dpy,INT32 *event_base_return, + INT32 *error_base_return, INT32 *opcode_return); + + +#endif /* __XTRAPLIBP__ */ Index: xc/include/extensions/xtrapproto.h diff -u /dev/null xc/include/extensions/xtrapproto.h:1.1 --- /dev/null Fri Jan 18 15:22:45 2002 +++ xc/include/extensions/xtrapproto.h Fri Nov 2 18:29:26 2001 @@ -0,0 +1,169 @@ +/* $XFree86: xc/include/extensions/xtrapproto.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ + +#ifndef __XTRAPPROTO__ +#define __XTRAPPROTO__ +/* RCSID = $Header$" */ + +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + * DESCRIPTION: + * This header file contains the function prototypes for extension + * routines sorted by module (globally defined routines *only*). + */ +#ifndef Bool +# define Bool int +#endif +/* xtrapdi.c */ +int XETrapDestroyEnv (pointer value , XID id ); +void XETrapCloseDown ( ExtensionEntry *extEntry ); +Bool XETrapRedirectDevices (void ); +void DEC_XTRAPInit (void ); +int XETrapCreateEnv (ClientPtr client ); +int XETrapDispatch (ClientPtr client ); +int sXETrapDispatch (ClientPtr client ); +int XETrapReset (xXTrapReq *request , ClientPtr client ); +int XETrapGetAvailable (xXTrapGetReq *request , ClientPtr client ); +int XETrapGetCurrent (xXTrapReq *request , ClientPtr client ); +int XETrapGetStatistics (xXTrapReq *request , ClientPtr client ); +int XETrapConfig (xXTrapConfigReq *request , ClientPtr client ); +int XETrapStartTrap (xXTrapReq *request , ClientPtr client ); +int XETrapStopTrap (xXTrapReq *request , ClientPtr client ); +int XETrapGetVersion (xXTrapGetReq *request , ClientPtr client ); +int XETrapGetLastInpTime (xXTrapReq *request , ClientPtr client ); +int XETrapRequestVector (ClientPtr client ); +int XETrapKeyboard (xEvent *x_event , DevicePtr keybd , int count ); +#ifndef VECTORED_EVENTS +int XETrapPointer (xEvent *x_event , DevicePtr ptrdev , int count ); +#else +int XETrapEventVector (ClientPtr client , xEvent *x_event ); +#endif +void XETrapStampAndMail (xEvent *x_event ); +void sReplyXTrapDispatch (ClientPtr client , int size , char *reply ); +int XETrapWriteXLib (XETrapEnv *penv , BYTE *data , CARD32 nbytes ); + +/* xtrapddmi.c */ +void XETrapPlatformSetup (void ); +int XETrapSimulateXEvent (xXTrapInputReq *request , ClientPtr client ); + +/* xtrapdiswap.c */ +int sXETrapReset (xXTrapReq *request , ClientPtr client ); +int sXETrapGetAvailable (xXTrapGetReq *request , ClientPtr client ); +int sXETrapConfig (xXTrapConfigReq *request , ClientPtr client ); +int sXETrapStartTrap (xXTrapReq *request , ClientPtr client ); +int sXETrapStopTrap (xXTrapReq *request , ClientPtr client ); +int sXETrapGetCurrent (xXTrapReq *request , ClientPtr client ); +int sXETrapGetStatistics (xXTrapReq *request , ClientPtr client ); +int sXETrapSimulateXEvent (xXTrapInputReq *request , ClientPtr client ); +int sXETrapGetVersion (xXTrapGetReq *request , ClientPtr client ); +int sXETrapGetLastInpTime (xXTrapReq *request , ClientPtr client ); +void sReplyXETrapGetAvail (ClientPtr client , int size , char *reply ); +void sReplyXETrapGetVers (ClientPtr client , int size , char *reply ); +void sReplyXETrapGetLITim (ClientPtr client , int size , char *reply ); +void sReplyXETrapGetCur (ClientPtr client , int size , char *reply ); +void sReplyXETrapGetStats (ClientPtr client , int size , char *reply ); +void sXETrapHeader (XETrapHeader *hdr ); +void XETSwSimpleReq (xReq *data ); +void XETSwResourceReq (xResourceReq *data ); +void XETSwCreateWindow (xCreateWindowReq *data , ClientPtr client ); +void XETSwChangeWindowAttributes (xChangeWindowAttributesReq *data , ClientPtr client ); +void XETSwReparentWindow (xReparentWindowReq *data ); +void XETSwConfigureWindow (xConfigureWindowReq *data , ClientPtr client ); +void XETSwInternAtom (xInternAtomReq *data ); +void XETSwChangeProperty (xChangePropertyReq *data ); +void XETSwDeleteProperty (xDeletePropertyReq *data ); +void XETSwGetProperty (xGetPropertyReq *data ); +void XETSwSetSelectionOwner (xSetSelectionOwnerReq *data ); +void XETSwConvertSelection (xConvertSelectionReq *data ); +void XETSwSendEvent (xSendEventReq *data ); +void XETSwGrabPointer (xGrabPointerReq *data ); +void XETSwGrabButton (xGrabButtonReq *data ); +void XETSwUngrabButton (xUngrabButtonReq *data ); +void XETSwChangeActivePointerGrab (xChangeActivePointerGrabReq *data ); +void XETSwGrabKeyboard (xGrabKeyboardReq *data ); +void XETSwGrabKey (xGrabKeyReq *data ); +void XETSwUngrabKey (xUngrabKeyReq *data ); +void XETSwGetMotionEvents (xGetMotionEventsReq *data ); +void XETSwTranslateCoords (xTranslateCoordsReq *data ); +void XETSwWarpPointer (xWarpPointerReq *data ); +void XETSwSetInputFocus (xSetInputFocusReq *data ); +void XETSwOpenFont (xOpenFontReq *data ); +void XETSwListFonts (xListFontsReq *data ); +void XETSwListFontsWithInfo (xListFontsWithInfoReq *data ); +void XETSwSetFontPath (xSetFontPathReq *data ); +void XETSwCreatePixmap (xCreatePixmapReq *data ); +void XETSwCreateGC (xCreateGCReq *data , ClientPtr client ); +void XETSwChangeGC (xChangeGCReq *data , ClientPtr client ); +void XETSwCopyGC (xCopyGCReq *data ); +void XETSwSetDashes (xSetDashesReq *data ); +void XETSwSetClipRectangles (xSetClipRectanglesReq *data , ClientPtr client ); +void XETSwClearToBackground (xClearAreaReq *data ); +void XETSwCopyArea (xCopyAreaReq *data ); +void XETSwCopyPlane (xCopyPlaneReq *data ); +void XETSwPoly (xPolyPointReq *data , ClientPtr client ); +void XETSwFillPoly (xFillPolyReq *data , ClientPtr client ); +void XETSwPutImage (xPutImageReq *data ); +void XETSwGetImage (xGetImageReq *data ); +void XETSwPolyText (xPolyTextReq *data ); +void XETSwImageText (xImageTextReq *data ); +void XETSwCreateColormap (xCreateColormapReq *data ); +void XETSwCopyColormapAndFree (xCopyColormapAndFreeReq *data ); +void XETSwAllocColor (xAllocColorReq *data ); +void XETSwAllocNamedColor (xAllocNamedColorReq *data ); +void XETSwAllocColorCells (xAllocColorCellsReq *data ); +void XETSwAllocColorPlanes (xAllocColorPlanesReq *data ); +void XETSwFreeColors (xFreeColorsReq *data , ClientPtr client ); +void XETSwStoreColors (xStoreColorsReq *data , ClientPtr client ); +void XETSwStoreNamedColor (xStoreNamedColorReq *data ); +void XETSwQueryColors (xQueryColorsReq *data , ClientPtr client ); +void XETSwLookupColor (xLookupColorReq *data ); +void XETSwCreateCursor (xCreateCursorReq *data ); +void XETSwCreateGlyphCursor (xCreateGlyphCursorReq *data ); +void XETSwRecolorCursor (xRecolorCursorReq *data ); +void XETSwQueryBestSize (xQueryBestSizeReq *data ); +void XETSwQueryExtension (xQueryExtensionReq *data ); +void XETSwChangeKeyboardMapping (xChangeKeyboardMappingReq *data ); +void XETSwChangeKeyboardControl (xChangeKeyboardControlReq *data , ClientPtr client ); +void XETSwChangePointerControl (xChangePointerControlReq *data ); +void XETSwSetScreenSaver (xSetScreenSaverReq *data ); +void XETSwChangeHosts (xChangeHostsReq *data ); +void XETSwRotateProperties (xRotatePropertiesReq *data , ClientPtr client ); +void XETSwNoOperation (xReq *data ); +#ifdef vms +void SwapLongs (long *list , unsigned long count ); +void SwapShorts (short *list , unsigned long count ); +int SwapColorItem (xColorItem *pItem ); +#endif /* vms */ + + +#endif /* __XTRAPPROTO__ */ Index: xc/include/fonts/FS.h diff -u xc/include/fonts/FS.h:1.6 xc/include/fonts/FS.h:1.8 --- xc/include/fonts/FS.h:1.6 Wed Jan 17 12:53:25 2001 +++ xc/include/fonts/FS.h Fri Dec 14 14:53:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FS.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: FS.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; @@ -29,7 +29,11 @@ Portions Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,13 +50,13 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/include/fonts/FS.h,v 1.6 2001/01/17 17:53:25 dawes Exp $ */ +/* $XFree86: xc/include/fonts/FS.h,v 1.8 2001/12/14 19:53:31 dawes Exp $ */ #ifndef _FS_H_ #define _FS_H_ -#include "X11/Xdefs.h" -#include "fsmasks.h" +#include +#include #define FS_PROTOCOL 2 #define FS_PROTOCOL_MINOR 0 Index: xc/include/fonts/FSproto.h diff -u xc/include/fonts/FSproto.h:1.1.1.3 xc/include/fonts/FSproto.h:1.3 --- xc/include/fonts/FSproto.h:1.1.1.3 Tue Jan 16 17:05:04 2001 +++ xc/include/fonts/FSproto.h Fri Dec 14 14:53:31 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FSproto.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: FSproto.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -39,11 +43,12 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ +/* $XFree86: xc/include/fonts/FSproto.h,v 1.3 2001/12/14 19:53:31 dawes Exp $ */ #ifndef _FS_PROTO_H_ #define _FS_PROTO_H_ -#include "FS.h" +#include #define sz_fsPropOffset 20 #define sz_fsPropInfo 8 Index: xc/include/fonts/Imakefile diff -u xc/include/fonts/Imakefile:3.7 xc/include/fonts/Imakefile:3.8 --- xc/include/fonts/Imakefile:3.7 Wed Jan 17 12:53:26 2001 +++ xc/include/fonts/Imakefile Mon Aug 27 13:40:57 2001 @@ -3,14 +3,17 @@ -XCOMM $XFree86: xc/include/fonts/Imakefile,v 3.7 2001/01/17 17:53:26 dawes Exp $ +XCOMM $XFree86: xc/include/fonts/Imakefile,v 3.8 2001/08/27 17:40:57 dawes Exp $ HEADERS = FS.h FSproto.h fsmasks.h all:: BuildIncludes($(HEADERS),X11/fonts,../..) + +#if BuildLibraries InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/fonts,$(INSTINCFLAGS)) +#endif InstallDriverSDKNonExecFile(font.h,$(DRIVERSDKINCLUDEDIR)) Index: xc/include/fonts/fsmasks.h diff -u xc/include/fonts/fsmasks.h:1.1.1.3 xc/include/fonts/fsmasks.h:1.2 --- xc/include/fonts/fsmasks.h:1.1.1.3 Tue Jan 16 17:05:07 2001 +++ xc/include/fonts/fsmasks.h Fri Dec 14 14:53:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: fsmasks.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/* $Xorg: fsmasks.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -28,7 +28,11 @@ Portions Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Imakefile diff -u xc/lib/Imakefile:3.52 xc/lib/Imakefile:3.58 --- xc/lib/Imakefile:3.52 Tue Apr 3 13:36:28 2001 +++ xc/lib/Imakefile Fri Nov 2 18:29:26 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/Imakefile,v 3.52 2001/04/03 17:36:28 dawes Exp $ +XCOMM $XFree86: xc/lib/Imakefile,v 3.58 2001/11/02 23:29:26 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -20,7 +20,7 @@ BERKDIR = Xbsd #endif -#if BuildXKBlib +#if BuildXKBfilelib || BuildXKB XKBLIBDIR = xkbfile #endif @@ -75,6 +75,9 @@ #if BuildGLXLibrary GLXLIBDIR = GL +#endif + +#if BuildGLwLibrary GLWLIBDIR = GLw #endif @@ -106,6 +109,14 @@ FREETYPE2BUILDDIR = freetype2 #endif +#if BuildRandRLibrary +RANDRLIBDIR = Xrandr +#endif + +#if BuildXTrapLibrary +XTRAPLIBDIR = XTrap +#endif + XF86EXTLIBS = $(XF86MISCLIBDIR) $(XF86VMLIBDIR) \ $(XF86DGALIBDIR) $(XF86RUSHLIBDIR) @@ -135,11 +146,23 @@ FONTSUBDIR = font +#if BuildFontEncLib +FONTENCSUBDIR = fontenc +#endif + +#if BuildXauLib XAULIBDIR = Xau +#endif + +#if BuildXdmcpLib XDMCPLIBDIR = Xdmcp +#endif + +#if BuildX11Lib X11LIBDIR = X11 +#endif -#if BuildLibraries || XnestServer || BuildGLXLibrary +#if BuildXextLib XEXTLIBDIR = Xext #endif @@ -167,9 +190,10 @@ $(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \ $(DPSLIBDIR) $(DPSTKLIBDIR) $(PSRESLIBDIR) $(XINERAMADIR) \ $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \ - $(XFTLIBDIR) $(XVMCLIBDIR) + $(XFTLIBDIR) $(XVMCLIBDIR) $(RANDRLIBDIR) $(XTRAPLIBDIR) -SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTCACHELIBDIR) +SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTENCSUBDIR) \ + $(FONTCACHELIBDIR) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) Index: xc/lib/FS/FSClServ.c diff -u xc/lib/FS/FSClServ.c:1.4 xc/lib/FS/FSClServ.c:1.5 --- xc/lib/FS/FSClServ.c:1.4 Wed Jan 17 14:41:27 2001 +++ xc/lib/FS/FSClServ.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSClServ.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ +/* $Xorg: FSClServ.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSClServ.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSClServ.c,v 1.4 2001/01/17 19:41:27 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSClServ.c,v 1.5 2001/12/14 19:53:32 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSCloseFt.c diff -u xc/lib/FS/FSCloseFt.c:1.1.1.4 xc/lib/FS/FSCloseFt.c:1.2 --- xc/lib/FS/FSCloseFt.c:1.1.1.4 Tue Jan 16 17:05:37 2001 +++ xc/lib/FS/FSCloseFt.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSCloseFt.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ +/* $Xorg: FSCloseFt.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSCloseFt.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSConnServ.c diff -u xc/lib/FS/FSConnServ.c:3.7 xc/lib/FS/FSConnServ.c:3.11 --- xc/lib/FS/FSConnServ.c:3.7 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSConnServ.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSConnServ.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ +/* $Xorg: FSConnServ.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSConnServ.c,v 3.7 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSConnServ.c,v 3.11 2001/12/14 19:53:32 dawes Exp $ */ #include #include "FSlibint.h" @@ -64,11 +68,6 @@ #endif #endif -#ifdef MINIX -#include -#define select(n,r,w,x,t) nbio_select(n,r,w,x,t) -#endif - /* * Attempts to connect to server, given server name. Returns transport * connection object or NULL if connection fails. @@ -80,7 +79,7 @@ _FSConnectServer(server_name) char *server_name; { - XtransConnInfo trans_conn; /* transport connection object */ + XtransConnInfo trans_conn = NULL; /* transport connection object */ int retry, connect_stat; int madeConnection = 0; @@ -140,10 +139,7 @@ (void) _FSTransClose(trans_conn); } -#ifndef __NetBSD__ -#undef NULL -#define NULL ((char *) 0) -#endif + /* * This is an OS dependent routine which: * 1) returns as soon as the connection can be written on.... @@ -165,20 +161,7 @@ FD_SET(svr->fd, &w_mask); do { -#ifndef AMOEBA nfound = Select(svr->fd + 1, &r_mask, &w_mask, NULL, NULL); -#else /* AMOEBA */ - if (_FSTransAmSelect(svr->fd, 0) > 0) { - BITSET(r_mask, svr->fd); - } else { - CLEARBITS(r_mask); - } - /* Always immediately writable because data is enqueued to be - * written by separate virtual circuit threads. - */ - nfound = 1; - BITSET(w_mask, svr->fd); -#endif /* AMOEBA */ if (nfound < 0 && !ECHECK(EINTR)) (*_FSIOErrorFunction) (svr); } while (nfound <= 0); @@ -235,15 +218,7 @@ FD_ZERO(&r_mask); do { FD_SET(svr->fd, &r_mask); -#ifndef AMOEBA result = Select(svr->fd + 1, &r_mask, NULL, NULL, NULL); -#else - if ((result = _FSTransAmSelect(svr->fd, 0)) > 0) { - BITSET(r_mask, svr->fd); - } else { - CLEARBITS(r_mask); - } -#endif if (result == -1 && !ECHECK(EINTR)) (*_FSIOErrorFunction) (svr); } while (result <= 0); Index: xc/lib/FS/FSErrDis.c diff -u xc/lib/FS/FSErrDis.c:1.1.1.4 xc/lib/FS/FSErrDis.c:1.2 --- xc/lib/FS/FSErrDis.c:1.1.1.4 Tue Jan 16 17:05:38 2001 +++ xc/lib/FS/FSErrDis.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSErrDis.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ +/* $Xorg: FSErrDis.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSErrDis.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSErrHndlr.c diff -u xc/lib/FS/FSErrHndlr.c:1.4 xc/lib/FS/FSErrHndlr.c:1.5 --- xc/lib/FS/FSErrHndlr.c:1.4 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSErrHndlr.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSErrHndlr.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ +/* $Xorg: FSErrHndlr.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSErrHndlr.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSErrHndlr.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSErrHndlr.c,v 1.5 2001/12/14 19:53:32 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSFlush.c diff -u xc/lib/FS/FSFlush.c:1.1.1.4 xc/lib/FS/FSFlush.c:1.2 --- xc/lib/FS/FSFlush.c:1.1.1.4 Tue Jan 16 17:05:39 2001 +++ xc/lib/FS/FSFlush.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSFlush.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ +/* $Xorg: FSFlush.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSFlush.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSFontInfo.c diff -u xc/lib/FS/FSFontInfo.c:1.1.1.4 xc/lib/FS/FSFontInfo.c:1.2 --- xc/lib/FS/FSFontInfo.c:1.1.1.4 Tue Jan 16 17:05:39 2001 +++ xc/lib/FS/FSFontInfo.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSFontInfo.c,v 1.3 2000/08/17 19:44:01 cpqbld Exp $ */ +/* $Xorg: FSFontInfo.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -28,7 +28,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSFtNames.c diff -u xc/lib/FS/FSFtNames.c:1.1.1.4 xc/lib/FS/FSFtNames.c:1.2 --- xc/lib/FS/FSFtNames.c:1.1.1.4 Tue Jan 16 17:05:39 2001 +++ xc/lib/FS/FSFtNames.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSFtNames.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ +/* $Xorg: FSFtNames.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSGetCats.c diff -u xc/lib/FS/FSGetCats.c:1.1.1.3 xc/lib/FS/FSGetCats.c:1.2 --- xc/lib/FS/FSGetCats.c:1.1.1.3 Tue Jan 16 17:05:40 2001 +++ xc/lib/FS/FSGetCats.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSGetCats.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ +/* $Xorg: FSGetCats.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSListCats.c diff -u xc/lib/FS/FSListCats.c:1.1.1.4 xc/lib/FS/FSListCats.c:1.2 --- xc/lib/FS/FSListCats.c:1.1.1.4 Tue Jan 16 17:05:41 2001 +++ xc/lib/FS/FSListCats.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSListCats.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ +/* $Xorg: FSListCats.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSListExt.c diff -u xc/lib/FS/FSListExt.c:1.1.1.5 xc/lib/FS/FSListExt.c:1.2 --- xc/lib/FS/FSListExt.c:1.1.1.5 Tue Jan 16 17:05:41 2001 +++ xc/lib/FS/FSListExt.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSListExt.c,v 1.3 2000/08/17 19:44:02 cpqbld Exp $ */ +/* $Xorg: FSListExt.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSListExt.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSMisc.c diff -u xc/lib/FS/FSMisc.c:1.1.1.3 xc/lib/FS/FSMisc.c:1.2 --- xc/lib/FS/FSMisc.c:1.1.1.3 Tue Jan 16 17:05:42 2001 +++ xc/lib/FS/FSMisc.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSMisc.c,v 1.3 2000/08/17 19:44:03 cpqbld Exp $ */ +/* $Xorg: FSMisc.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSMisc.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSNextEv.c diff -u xc/lib/FS/FSNextEv.c:1.1.1.4 xc/lib/FS/FSNextEv.c:1.2 --- xc/lib/FS/FSNextEv.c:1.1.1.4 Tue Jan 16 17:05:42 2001 +++ xc/lib/FS/FSNextEv.c Fri Dec 14 14:53:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSNextEv.c,v 1.3 2000/08/17 19:44:03 cpqbld Exp $ */ +/* $Xorg: FSNextEv.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSNextEv.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSOpenFont.c diff -u xc/lib/FS/FSOpenFont.c:1.5 xc/lib/FS/FSOpenFont.c:1.6 --- xc/lib/FS/FSOpenFont.c:1.5 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSOpenFont.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSOpenFont.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ +/* $Xorg: FSOpenFont.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSOpenFont.c,v 1.5 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSOpenFont.c,v 1.6 2001/12/14 19:53:33 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSOpenServ.c diff -u xc/lib/FS/FSOpenServ.c:1.4 xc/lib/FS/FSOpenServ.c:1.6 --- xc/lib/FS/FSOpenServ.c:1.4 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSOpenServ.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSOpenServ.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ +/* $Xorg: FSOpenServ.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSOpenServ.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSOpenServ.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSOpenServ.c,v 1.6 2001/12/14 19:53:33 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -115,9 +119,6 @@ int altlen; char *vendor_string; long setuplength; -#ifdef X_NOT_STDC_ENV - extern char *getenv(); -#endif if (server == NULL || *server == '\0') { if ((server = getenv("FONTSERVER")) == NULL) { Index: xc/lib/FS/FSQGlyphs.c diff -u xc/lib/FS/FSQGlyphs.c:1.1.1.3 xc/lib/FS/FSQGlyphs.c:1.2 --- xc/lib/FS/FSQGlyphs.c:1.1.1.3 Tue Jan 16 17:05:44 2001 +++ xc/lib/FS/FSQGlyphs.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSQGlyphs.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ +/* $Xorg: FSQGlyphs.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSQXExt.c diff -u xc/lib/FS/FSQXExt.c:1.4 xc/lib/FS/FSQXExt.c:1.5 --- xc/lib/FS/FSQXExt.c:1.4 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSQXExt.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSQXExt.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ +/* $Xorg: FSQXExt.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSQXExt.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSQXExt.c,v 1.5 2001/12/14 19:53:33 dawes Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSQXInfo.c diff -u xc/lib/FS/FSQXInfo.c:1.1.1.3 xc/lib/FS/FSQXInfo.c:1.2 --- xc/lib/FS/FSQXInfo.c:1.1.1.3 Tue Jan 16 17:05:45 2001 +++ xc/lib/FS/FSQXInfo.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSQXInfo.c,v 1.3 2000/08/17 19:44:04 cpqbld Exp $ */ +/* $Xorg: FSQXInfo.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSQuExt.c diff -u xc/lib/FS/FSQuExt.c:1.1.1.3 xc/lib/FS/FSQuExt.c:1.2 --- xc/lib/FS/FSQuExt.c:1.1.1.3 Tue Jan 16 17:05:46 2001 +++ xc/lib/FS/FSQuExt.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSQuExt.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ +/* $Xorg: FSQuExt.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSServName.c diff -u xc/lib/FS/FSServName.c:1.1.1.3 xc/lib/FS/FSServName.c:1.4 --- xc/lib/FS/FSServName.c:1.1.1.3 Tue Jan 16 17:05:46 2001 +++ xc/lib/FS/FSServName.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSServName.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ +/* $Xorg: FSServName.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSServName.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,12 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ +/* $XFree86: xc/lib/FS/FSServName.c,v 1.4 2001/12/14 19:53:33 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,13 +53,8 @@ */ #include - -#include -#ifndef X_NOT_STDC_ENV -#include -#else -char *getenv(); -#endif +#include +#include char * FSServerName(server) Index: xc/lib/FS/FSSetCats.c diff -u xc/lib/FS/FSSetCats.c:1.4 xc/lib/FS/FSSetCats.c:1.5 --- xc/lib/FS/FSSetCats.c:1.4 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSSetCats.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSSetCats.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ +/* $Xorg: FSSetCats.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSFlush.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSSetCats.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSSetCats.c,v 1.5 2001/12/14 19:53:33 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSSync.c diff -u xc/lib/FS/FSSync.c:1.1.1.4 xc/lib/FS/FSSync.c:1.2 --- xc/lib/FS/FSSync.c:1.1.1.4 Tue Jan 16 17:05:47 2001 +++ xc/lib/FS/FSSync.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSSync.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ +/* $Xorg: FSSync.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSSynchro.c diff -u xc/lib/FS/FSSynchro.c:1.4 xc/lib/FS/FSSynchro.c:1.5 --- xc/lib/FS/FSSynchro.c:1.4 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSSynchro.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSSynchro.c,v 1.3 2000/08/17 19:44:05 cpqbld Exp $ */ +/* $Xorg: FSSynchro.c,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSSynchro.c 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSSynchro.c,v 1.4 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSSynchro.c,v 1.5 2001/12/14 19:53:33 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/FS/FSlib.h diff -u xc/lib/FS/FSlib.h:1.5 xc/lib/FS/FSlib.h:1.7 --- xc/lib/FS/FSlib.h:1.5 Thu Apr 5 13:42:26 2001 +++ xc/lib/FS/FSlib.h Wed Dec 19 16:37:29 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSlib.h,v 1.4 2000/08/17 19:44:05 cpqbld Exp $ */ +/* $Xorg: FSlib.h,v 1.5 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -24,13 +24,17 @@ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/FS/FSlib.h,v 1.5 2001/04/05 17:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSlib.h,v 1.7 2001/12/19 21:37:29 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -55,6 +59,8 @@ #ifndef _FSLIB_H_ #define _FSLIB_H_ +#include + #include #include @@ -237,6 +243,8 @@ /* function decls */ +_XFUNCPROTOBEGIN + extern FSServer * FSOpenServer ( char *server ); extern FSSyncHandler FSSynchronize(FSServer *, int); @@ -300,5 +308,6 @@ extern int FSFree ( char *data ); extern unsigned char * FSMalloc ( unsigned size ); +_XFUNCPROTOEND #endif /* _FSLIB_H_ */ Index: xc/lib/FS/FSlibInt.c diff -u xc/lib/FS/FSlibInt.c:3.9 xc/lib/FS/FSlibInt.c:3.10 --- xc/lib/FS/FSlibInt.c:3.9 Thu Apr 5 13:42:26 2001 +++ xc/lib/FS/FSlibInt.c Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSlibInt.c,v 1.4 2000/08/17 19:44:05 cpqbld Exp $ */ +/* $Xorg: FSlibInt.c,v 1.5 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSlibInt.c,v 3.9 2001/04/05 17:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSlibInt.c,v 3.10 2001/12/14 19:53:33 dawes Exp $ */ /* * FSlibInt.c - Internal support routines for the C subroutine Index: xc/lib/FS/FSlibint.h diff -u xc/lib/FS/FSlibint.h:3.5 xc/lib/FS/FSlibint.h:3.7 --- xc/lib/FS/FSlibint.h:3.5 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSlibint.h Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSlibint.h,v 1.3 2000/08/17 19:44:06 cpqbld Exp $ */ +/* $Xorg: FSlibint.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSlibint.h,v 3.5 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSlibint.h,v 3.7 2001/12/14 19:53:33 dawes Exp $ */ /* * FSlib internal decls @@ -71,15 +75,8 @@ #include "FSproto.h" #include "FSlibos.h" #include +#include -#ifndef NULL -#define NULL 0 -#endif - -#ifdef X_NOT_STDC_ENV -extern int errno; /* Internal system error number. */ -#endif - typedef int (* FSIOErrorHandler)(FSServer *); typedef int (* FSErrorHandler)(FSServer *, FSErrorEvent *); @@ -160,7 +157,7 @@ * */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetReq(name, req) \ WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fs##name##Req)) > svr->bufmax)\ @@ -187,7 +184,7 @@ /* GetReqExtra is the same as GetReq, but allocates "n" additional bytes after the request. "n" must be a multiple of 4! */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetReqExtra(name, n, req) \ WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fs##name##Req) + n) > svr->bufmax)\ @@ -216,7 +213,7 @@ * "rid" is the name of the resource. */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetResReq(name, rid, req) \ WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fsResourceReq)) > svr->bufmax)\ @@ -245,7 +242,7 @@ * at all. */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetEmptyReq(name, req) \ WORD64ALIGN\ if ((svr->bufptr + SIZEOF(fsReq)) > svr->bufmax)\ @@ -355,7 +352,7 @@ * don't line up with proto */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define FSCat(x,y) x##_##y #else #define FSCat(x,y) x/**/_/**/y Index: xc/lib/FS/FSlibos.h diff -u xc/lib/FS/FSlibos.h:3.6 xc/lib/FS/FSlibos.h:3.8 --- xc/lib/FS/FSlibos.h:3.6 Wed Jan 17 14:41:28 2001 +++ xc/lib/FS/FSlibos.h Fri Dec 14 14:53:33 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSlibos.h,v 1.3 2000/08/17 19:44:06 cpqbld Exp $ */ +/* $Xorg: FSlibos.h,v 1.4 2001/02/09 02:03:25 xorgcvs Exp $ */ /* @(#)FSlibos.h 4.1 91/05/02 * Copyright 1990 Network Computing Devices; @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/FS/FSlibos.h,v 3.6 2001/01/17 19:41:28 dawes Exp $ */ +/* $XFree86: xc/lib/FS/FSlibos.h,v 3.8 2001/12/14 19:53:33 dawes Exp $ */ /* * FSlib networking & os include file @@ -252,18 +256,8 @@ #endif #include -#ifndef X_NOT_STDC_ENV #include #include -#else -char *malloc(), *realloc(), *calloc(); -void exit(); -#ifdef SYSV -#include -#else -#include -#endif -#endif /* * The following definitions can be used for locking requests in multi-threaded Index: xc/lib/GL/GL/Imakefile diff -u xc/lib/GL/GL/Imakefile:1.7 xc/lib/GL/GL/Imakefile:1.10 --- xc/lib/GL/GL/Imakefile:1.7 Mon Apr 2 22:29:31 2001 +++ xc/lib/GL/GL/Imakefile Sat Nov 24 06:22:35 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/GL/Imakefile,v 1.7 2001/04/03 02:29:31 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/GL/Imakefile,v 1.10 2001/11/24 11:22:35 herrb Exp $ #include @@ -108,6 +108,19 @@ DRVPOBJS = $(I810POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) \ $(DRMPOBJS) +#elif GlxBuiltInI830 +#define MesaDrvI830BuildDir $(GLXLIBSRC)/mesa/src/drv/i830/ +#include "../mesa/src/drv/i830/Imakefile.inc" + + DRVOBJS = $(I830OBJS) $(COMMONOBJS) $(MESAOBJS) $(DRIMESAOBJS) \ + $(DRMOBJS) + DRVUOBJS = $(I830UOBJS) $(COMMONUOBJS) $(MESAUOBJS) $(DRIMESAUOBJS) \ + $(DRMUOBJS) + DRVDOBJS = $(I830DOBJS) $(COMMONDOBJS) $(MESADOBJS) $(DRIMESADOBJS) \ + $(DRMDOBJS) + DRVPOBJS = $(I830POBJS) $(COMMONPOBJS) $(MESAPOBJS) $(DRIMESAPOBJS) \ + $(DRMPOBJS) + #elif GlxBuiltInMga #define MesaDrvMgaBuildDir $(GLXLIBSRC)/mesa/src/drv/mga/ @@ -206,7 +219,11 @@ POBJS = $(GLXPOBJS) $(DRIPOBJS) $(DRVPOBJS) #if LocalThreads +#if NeedUIThrStubs + THREADOBJS = $(LDPRELIB) $(XTHRSTUBLIB) +#else THREADOBJS = $(THREADS_LIBS) +#endif #endif #include Index: xc/lib/GL/dri/XF86dri.c diff -u xc/lib/GL/dri/XF86dri.c:1.11 xc/lib/GL/dri/XF86dri.c:1.12 --- xc/lib/GL/dri/XF86dri.c:1.11 Thu Dec 7 15:26:02 2000 +++ xc/lib/GL/dri/XF86dri.c Mon Aug 27 13:40:57 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.11 2000/12/07 20:26:02 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.12 2001/08/27 17:40:57 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -38,9 +38,9 @@ /* THIS IS NOT AN X CONSORTIUM STANDARD */ #define NEED_REPLIES -#include "Xlibint.h" +#include #include "xf86dristr.h" -#include "Xext.h" +#include #include "extutil.h" static XExtensionInfo _xf86dri_info_data; Index: xc/lib/GL/dri/dri_glx.c diff -u xc/lib/GL/dri/dri_glx.c:1.8 xc/lib/GL/dri/dri_glx.c:1.10 --- xc/lib/GL/dri/dri_glx.c:1.8 Tue Apr 10 12:07:49 2001 +++ xc/lib/GL/dri/dri_glx.c Mon Aug 27 13:40:57 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.8 2001/04/10 16:07:49 dawes Exp $ */ +/* $XFree86: xc/lib/GL/dri/dri_glx.c,v 1.10 2001/08/27 17:40:57 dawes Exp $ */ /* * Authors: @@ -36,9 +36,9 @@ #ifdef GLX_DIRECT_RENDERING #include -#include -#include -#include +#include +#include +#include "extutil.h" #include "glxclient.h" #include "xf86dri.h" #include "sarea.h" @@ -94,6 +94,7 @@ } } +#if 0 static void PrintF(const char *f, ...) { va_list args; @@ -105,6 +106,7 @@ va_end(args); } } +#endif static void ErrorMessage(const char *msg) { @@ -224,7 +226,7 @@ if (!libDir[0]) return NULL; snprintf(realDriverName, 200, "%s/%s_dri.so", libDir, driverName); - InfoMessageF("trying %s\n", realDriverName); + InfoMessageF("OpenDriver: trying %s\n", realDriverName); handle = dlopen(realDriverName, RTLD_NOW | RTLD_GLOBAL); if (handle) { return handle; @@ -434,8 +436,8 @@ return; } else { - InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s\n", driverMajor, - driverMinor, driverPatch, driverName); + InfoMessageF("XF86DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n", + driverMajor, driverMinor, driverPatch, driverName, scrNum); } /* Index: xc/lib/GL/dri/dri_tmm.c diff -u xc/lib/GL/dri/dri_tmm.c:1.2 xc/lib/GL/dri/dri_tmm.c:1.3 --- xc/lib/GL/dri/dri_tmm.c:1.2 Tue Feb 22 23:46:34 2000 +++ xc/lib/GL/dri/dri_tmm.c Mon Aug 27 13:40:57 2001 @@ -24,7 +24,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * $XFree86: xc/lib/GL/dri/dri_tmm.c,v 1.2 2000/02/23 04:46:34 martin Exp $ + * $XFree86: xc/lib/GL/dri/dri_tmm.c,v 1.3 2001/08/27 17:40:57 dawes Exp $ * * * DESCRIPTION @@ -39,7 +39,7 @@ */ #include -#include +#include #include "xf86drm.h" #include "dri_tmm.h" Index: xc/lib/GL/dri/drm/Imakefile diff -u xc/lib/GL/dri/drm/Imakefile:1.16 xc/lib/GL/dri/drm/Imakefile:1.18 --- xc/lib/GL/dri/drm/Imakefile:1.16 Mon Apr 23 15:02:11 2001 +++ xc/lib/GL/dri/drm/Imakefile Thu Oct 4 14:28:21 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.16 2001/04/23 19:02:11 alanh Exp $ +XCOMM $XFree86: xc/lib/GL/dri/drm/Imakefile,v 1.18 2001/10/04 18:28:21 alanh Exp $ #if GlxUseBuiltInDRIDriver #define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) @@ -37,10 +37,6 @@ OS_SUBDIR = bsd OS_SUBDIR2 = linux #endif -#if defined(cygwinArchitecture) && 0 /* XXX FIX ME */ -OS_SUBDIR = cygwin -OS_SUBDIR2 = cygwin -#endif LinkSourceFile(xf86drm.c,$(XF86OSSRC)/$(OS_SUBDIR2)/drm) @@ -53,6 +49,7 @@ LinkSourceFile(drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(i810_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) +LinkSourceFile(i830_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(mga_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(r128_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) LinkSourceFile(radeon_drm.h,$(XF86OSSRC)/$(OS_SUBDIR2)/drm/kernel) Index: xc/lib/GL/glx/pixel.c diff -u xc/lib/GL/glx/pixel.c:1.4 xc/lib/GL/glx/pixel.c:1.5 --- xc/lib/GL/glx/pixel.c:1.4 Wed Mar 21 11:04:39 2001 +++ xc/lib/GL/glx/pixel.c Sat Oct 27 23:32:27 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/pixel.c,v 1.4 2001/03/21 16:04:39 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/pixel.c,v 1.5 2001/10/28 03:32:27 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -199,7 +199,6 @@ GLubyte *destImage) { GLint rowLength = gc->state.storeUnpack.rowLength; - GLint imageHeight = gc->state.storeUnpack.imageHeight; GLint alignment = gc->state.storeUnpack.alignment; GLint skipPixels = gc->state.storeUnpack.skipPixels; GLint skipRows = gc->state.storeUnpack.skipRows; @@ -277,7 +276,6 @@ { GLint rowLength = gc->state.storeUnpack.rowLength; GLint imageHeight = gc->state.storeUnpack.imageHeight; - GLint imageDepth = gc->state.storeUnpack.imageDepth; GLint alignment = gc->state.storeUnpack.alignment; GLint skipPixels = gc->state.storeUnpack.skipPixels; GLint skipRows = gc->state.storeUnpack.skipRows; @@ -507,13 +505,12 @@ { GLint rowLength = gc->state.storePack.rowLength; GLint imageHeight = gc->state.storePack.imageHeight; - GLint imageDepth = gc->state.storePack.imageDepth; GLint alignment = gc->state.storePack.alignment; GLint skipPixels = gc->state.storePack.skipPixels; GLint skipRows = gc->state.storePack.skipRows; GLint skipImages = gc->state.storePack.skipImages; GLint components, elementSize, rowSize, padding, groupsPerRow, groupSize; - GLint elementsPerRow, sourceRowSize, sourcePadding, g, h, i; + GLint elementsPerRow, sourceRowSize, sourcePadding, h, i; GLint imageSize, rowsPerImage; GLubyte *start, *iter, *itera; Index: xc/lib/GL/glx/xfont.c diff -u xc/lib/GL/glx/xfont.c:1.6 xc/lib/GL/glx/xfont.c:1.7 --- xc/lib/GL/glx/xfont.c:1.6 Wed May 2 11:06:02 2001 +++ xc/lib/GL/glx/xfont.c Sat Oct 27 23:32:27 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/glx/xfont.c,v 1.6 2001/05/02 15:06:02 dawes Exp $ */ +/* $XFree86: xc/lib/GL/glx/xfont.c,v 1.7 2001/10/28 03:32:27 tsi Exp $ */ /* * Mesa 3-D graphics library * Version: 3.1 @@ -171,7 +171,7 @@ static XCharStruct *isvalid(XFontStruct *fs, int which) { unsigned int rows,pages; - int byte1,byte2; + int byte1 = 0, byte2 = 0; int i,valid = 1; rows = fs->max_byte1 - fs->min_byte1 + 1; Index: xc/lib/GL/mesa/dri/dri_mesa.c diff -u xc/lib/GL/mesa/dri/dri_mesa.c:1.16 xc/lib/GL/mesa/dri/dri_mesa.c:1.17 --- xc/lib/GL/mesa/dri/dri_mesa.c:1.16 Tue Apr 10 12:07:49 2001 +++ xc/lib/GL/mesa/dri/dri_mesa.c Mon Aug 27 13:40:57 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.16 2001/04/10 16:07:49 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/dri/dri_mesa.c,v 1.17 2001/08/27 17:40:57 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -56,16 +56,16 @@ #ifdef GLX_DIRECT_RENDERING #include -#include -#include -#include +#include +#include +#include "extutil.h" #include "glxclient.h" #include "xf86dri.h" #include "sarea.h" #include "dri_mesaint.h" #include "dri_xmesaapi.h" -#include "../src/context.h" -#include "../src/mmath.h" +#include "context.h" +#include "mmath.h" /* Context binding */ Index: xc/lib/GL/mesa/src/OSmesa/Imakefile diff -u xc/lib/GL/mesa/src/OSmesa/Imakefile:1.10 xc/lib/GL/mesa/src/OSmesa/Imakefile:1.11 --- xc/lib/GL/mesa/src/OSmesa/Imakefile:1.10 Mon Apr 2 22:29:33 2001 +++ xc/lib/GL/mesa/src/OSmesa/Imakefile Mon Jun 4 16:43:30 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/OSmesa/Imakefile,v 1.10 2001/04/03 02:29:33 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/OSmesa/Imakefile,v 1.11 2001/06/04 20:43:30 dawes Exp $ #include @@ -64,7 +64,7 @@ InstallLibrary($(LIBNAME),$(USRLIBDIR)) #endif -#if DoSharedLib +#if SharedLibGlx SharedLibraryTarget($(LIBNAME),$(SOREV), $(OBJS), ., .) InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) #endif Index: xc/lib/GL/mesa/src/drv/common/hwlog.c diff -u xc/lib/GL/mesa/src/drv/common/hwlog.c:1.2 xc/lib/GL/mesa/src/drv/common/hwlog.c:1.3 --- xc/lib/GL/mesa/src/drv/common/hwlog.c:1.2 Thu Jun 22 12:59:23 2000 +++ xc/lib/GL/mesa/src/drv/common/hwlog.c Fri Aug 17 22:51:03 2001 @@ -24,7 +24,7 @@ * * Wittawat Yamwong */ -/* $XFree86: xc/lib/GL/mesa/src/drv/common/hwlog.c,v 1.2 2000/06/22 16:59:23 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/common/hwlog.c,v 1.3 2001/08/18 02:51:03 dawes Exp $ */ #include "hwlog.h" hwlog_t hwlog = { 0,0,0, "[???] "}; @@ -33,6 +33,7 @@ /* Should be shared, but is this a good place for it? */ #include +#include int usec( void ) Index: xc/lib/GL/mesa/src/drv/common/hwlog.h diff -u xc/lib/GL/mesa/src/drv/common/hwlog.h:1.3 xc/lib/GL/mesa/src/drv/common/hwlog.h:1.5 --- xc/lib/GL/mesa/src/drv/common/hwlog.h:1.3 Sat Nov 18 14:37:05 2000 +++ xc/lib/GL/mesa/src/drv/common/hwlog.h Wed Oct 31 18:22:57 2001 @@ -24,7 +24,7 @@ * * Wittawat Yamwong */ -/* $XFree86: xc/lib/GL/mesa/src/drv/common/hwlog.h,v 1.3 2000/11/18 19:37:05 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/common/hwlog.h,v 1.5 2001/10/31 23:22:57 tsi Exp $ */ /* Usage: * - use mgaError for error messages. Always write to X error and log file. @@ -57,15 +57,15 @@ /* open and close log file. */ int hwOpenLog(const char *filename, char *prefix); -void hwCloseLog(); +void hwCloseLog(void); /* return 1 if log file is succesfully opened */ -int hwIsLogReady(); +int hwIsLogReady(void); /* set current log level to 'level'. Messages with level less than or equal the current log level will be written to the log file. */ void hwSetLogLevel(int level); -int hwGetLogLevel(); +int hwGetLogLevel(void); /* hwLog and hwLogv write a message to the log file. */ /* do not call these directly, use hwMsg() instead */ @@ -82,11 +82,11 @@ static __inline__ int hwOpenLog(const char *f, char *prefix) { hwlog.prefix=prefix; return -1; } -static __inline__ int hwIsLogReady( void ) { return 0; } -static __inline__ int hwGetLogLevel( void ) { return -1; } -static __inline__ int hwLogLevel(int level) { return 0; } -static void hwLog(int level, const char *format, ...) {} -static void hwMsg(int level, const char *format, ...) {} +#define hwIsLogReady() (0) +#define hwGetLogLevel() (-1) +#define hwLogLevel(n) (0) +#define hwLog() +#define hwMsg() #define hwCloseLog() #define hwSetLogLevel(x) Index: xc/lib/GL/mesa/src/drv/common/mm.c diff -u xc/lib/GL/mesa/src/drv/common/mm.c:1.2 xc/lib/GL/mesa/src/drv/common/mm.c:1.3 --- xc/lib/GL/mesa/src/drv/common/mm.c:1.2 Thu Jun 22 12:59:23 2000 +++ xc/lib/GL/mesa/src/drv/common/mm.c Fri Aug 17 22:51:03 2001 @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/common/mm.c,v 1.2 2000/06/22 16:59:23 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/common/mm.c,v 1.3 2001/08/18 02:51:03 dawes Exp $ */ #include #include @@ -106,6 +106,8 @@ /* break left */ if (startofs > p->ofs) { newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); + if (!newblock) + return NULL; newblock->ofs = startofs; newblock->size = p->size - (startofs - p->ofs); newblock->free = 1; @@ -118,6 +120,8 @@ /* break right */ if (size < p->size) { newblock = (TMemBlock*) calloc(1,sizeof(TMemBlock)); + if (!newblock) + return NULL; newblock->ofs = startofs + size; newblock->size = p->size - size; newblock->free = 1; Index: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.1.4.1 xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.2 --- xc/lib/GL/mesa/src/drv/ffb/ffb_state.c:1.1.4.1 Thu May 24 12:35:38 2001 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_state.c Thu May 24 12:34:49 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.1.4.1 2001/05/24 16:35:38 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_state.c,v 1.2 2001/05/24 16:34:49 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller Index: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c:1.2 xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c:1.3 --- xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c:1.2 Sun Sep 24 09:51:03 2000 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c Wed Nov 7 23:00:12 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c,v 1.2 2000/09/24 13:51:03 alanh Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_vb.c,v 1.3 2001/11/08 04:00:12 tsi Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller @@ -180,9 +180,11 @@ void ffbDDPartialRasterSetup(struct vertex_buffer *VB) { +#if 0 ffbContextPtr fmesa = FFB_CONTEXT(VB->ctx); GLuint new = VB->pipeline->new_outputs; GLuint available = VB->pipeline->outputs; +#endif GLuint ind = 0; #if 1 Index: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c diff -u xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.2.4.1 xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.3 --- xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c:1.2.4.1 Tue May 29 18:28:17 2001 +++ xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c Tue May 29 18:24:01 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.2.4.1 2001/05/29 22:28:17 dawes Exp $ +/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_xmesa.c,v 1.3 2001/05/29 22:24:01 dawes Exp $ * * GLX Hardware Device Driver for Sun Creator/Creator3D * Copyright (C) 2000 David S. Miller Index: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:1.9 xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:1.10 --- xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c:1.9 Wed Feb 7 08:26:16 2001 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c Fri Aug 17 22:51:04 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.9 2001/02/07 13:26:16 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_gl.c,v 1.10 2001/08/18 02:51:04 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -64,32 +64,32 @@ #endif if (debug) { - char errstr[1000]; + const char *errstr; switch (error) { case GL_NO_ERROR: - strcpy( errstr, "GL_NO_ERROR" ); + errstr = "GL_NO_ERROR"; break; case GL_INVALID_VALUE: - strcpy( errstr, "GL_INVALID_VALUE" ); + errstr = "GL_INVALID_VALUE"; break; case GL_INVALID_ENUM: - strcpy( errstr, "GL_INVALID_ENUM" ); + errstr = "GL_INVALID_ENUM"; break; case GL_INVALID_OPERATION: - strcpy( errstr, "GL_INVALID_OPERATION" ); + errstr = "GL_INVALID_OPERATION"; break; case GL_STACK_OVERFLOW: - strcpy( errstr, "GL_STACK_OVERFLOW" ); + errstr = "GL_STACK_OVERFLOW"; break; case GL_STACK_UNDERFLOW: - strcpy( errstr, "GL_STACK_UNDERFLOW" ); + errstr = "GL_STACK_UNDERFLOW"; break; case GL_OUT_OF_MEMORY: - strcpy( errstr, "GL_OUT_OF_MEMORY" ); + errstr = "GL_OUT_OF_MEMORY"; break; default: - strcpy( errstr, "unknown" ); + errstr = "unknown"; break; } fprintf( stderr, "Mesa user error: %s in %s\n", errstr, s ); Index: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c diff -u xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c:1.3 xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c:1.4 --- xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c:1.3 Fri Jun 16 20:02:56 2000 +++ xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c Mon Aug 27 13:40:57 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c,v 1.3 2000/06/17 00:02:56 martin Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/gamma/gamma_texture.c,v 1.4 2001/08/27 17:40:57 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -34,7 +34,7 @@ #ifdef GLX_DIRECT_RENDERING -#include +#include #include #include "gamma_init.h" #include Index: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c diff -u xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.12 xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.14 --- xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c:1.12 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c Tue Oct 2 07:44:13 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c,v 1.12 2001/03/21 16:14:21 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c,v 1.14 2001/10/02 11:44:13 alanh Exp $ */ /* * Authors: @@ -155,9 +155,9 @@ /* Check that the DRM driver version is compatible */ if (sPriv->drmMajor != 1 || - sPriv->drmMinor < 1) { + sPriv->drmMinor < 2) { char msg[1000]; - sprintf(msg, "i810 DRI driver expected DRM driver version 1.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); + sprintf(msg, "i810 DRI driver expected DRM driver version 1.2 or greater but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); __driMesaMessage(msg); return GL_FALSE; } Index: xc/lib/GL/mesa/src/drv/i810/i810context.h diff -u xc/lib/GL/mesa/src/drv/i810/i810context.h:1.5 xc/lib/GL/mesa/src/drv/i810/i810context.h:1.6 --- xc/lib/GL/mesa/src/drv/i810/i810context.h:1.5 Sun Aug 27 22:43:11 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810context.h Mon Aug 27 17:12:19 2001 @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810context.h,v 1.5 2000/08/28 02:43:11 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810context.h,v 1.6 2001/08/27 21:12:19 dawes Exp $ */ #ifndef I810CONTEXT_INC #define I810CONTEXT_INC @@ -200,15 +200,6 @@ #define DEBUG_VERBOSE_LRU 0x1000 #define DEBUG_VERBOSE_DRI 0x2000 #define DEBUG_VERBOSE_IOCTL 0x4000 - - - -extern GLuint i810DDRegisterPipelineStages( struct gl_pipeline_stage *out, - const struct gl_pipeline_stage *in, - GLuint nr ); - -extern GLboolean i810DDBuildPrecalcPipeline( GLcontext *ctx ); - #endif Index: xc/lib/GL/mesa/src/drv/i810/i810fastpath.c diff -u xc/lib/GL/mesa/src/drv/i810/i810fastpath.c:1.5 xc/lib/GL/mesa/src/drv/i810/i810fastpath.c:1.6 --- xc/lib/GL/mesa/src/drv/i810/i810fastpath.c:1.5 Mon Nov 13 18:31:27 2000 +++ xc/lib/GL/mesa/src/drv/i810/i810fastpath.c Mon Aug 27 17:12:19 2001 @@ -21,7 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810fastpath.c,v 1.5 2000/11/13 23:31:27 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810fastpath.c,v 1.6 2001/08/27 21:12:19 dawes Exp $ */ #include @@ -37,12 +37,9 @@ #include "i810tris.h" #include "i810state.h" #include "i810vb.h" +#include "vbcull.h" -extern void i810DDResizeVB( struct vertex_buffer *VB, GLuint size ); - -extern void gl_fast_copy_vb( struct vertex_buffer *VB ); - struct i810_fast_tab { void (*build_vertices)( struct vertex_buffer *VB, GLuint do_cliptest ); void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); Index: xc/lib/GL/mesa/src/drv/i810/i810tex.c diff -u xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.6 xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.7 --- xc/lib/GL/mesa/src/drv/i810/i810tex.c:1.6 Wed Mar 21 11:14:21 2001 +++ xc/lib/GL/mesa/src/drv/i810/i810tex.c Wed Oct 31 17:50:24 2001 @@ -21,6 +21,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +/* $XFree86: xc/lib/GL/mesa/src/drv/i810/i810tex.c,v 1.7 2001/10/31 22:50:24 tsi Exp $ */ #include #include @@ -363,7 +364,6 @@ { GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); GLubyte *src = (GLubyte *)image->Data; - i810Msg(10," CopyRGB: %p %p\n", dst, src); for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { for (i = 0 ; i < image->Width ; i++) { @@ -378,7 +378,6 @@ { GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); GLubyte *src = (GLubyte *)image->Data; - i810Msg(10," CopyRGBA: %p %p\n", dst, src); for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { for (i = 0 ; i < image->Width ; i++) { @@ -393,7 +392,6 @@ { GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); GLubyte *src = (GLubyte *)image->Data; - i810Msg(10," CopyL: %p %p\n", dst, src); for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { for (i = 0 ; i < image->Width ; i++) { @@ -409,7 +407,6 @@ GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); GLubyte *src = (GLubyte *)image->Data; int i; - i810Msg(10," CopyI: %p %p\n", dst, src); for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { for (i = 0 ; i < image->Width ; i++) { @@ -424,7 +421,6 @@ { GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); GLubyte *src = (GLubyte *)image->Data; - i810Msg(10," CopyLA: %p %p\n", dst, src); for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { for (i = 0 ; i < image->Width ; i++) { @@ -439,7 +435,6 @@ { GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); GLubyte *src = (GLubyte *)image->Data; - i810Msg(10," CopyA: %p %p\n", dst, src); for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { for (i = 0 ; i < image->Width ; i++) { @@ -456,7 +451,6 @@ { GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[level].offset); GLubyte *src = (GLubyte *)image->Data; - i810Msg(10," CopyIndex: %p %p\n", dst, src); for (j = 0 ; j < image->Height ; j++, dst += t->Pitch) { for (i = 0 ; i < image->Width ; i++) { @@ -1304,9 +1298,6 @@ i810ContextPtr imesa = I810_CONTEXT( ctx ); i810TextureObjectPtr t; - i810Msg(10,"i810TexImage(%d): level %d internalFormat %x\n", - tObj->Name, level, internalFormat); - if (target != GL_TEXTURE_2D) return; @@ -1332,10 +1323,6 @@ { i810ContextPtr imesa = I810_CONTEXT( ctx ); i810TextureObjectPtr t; - i810Msg(10,"i810TexSubImage():\n"); - i810Msg(10," Size: %d,%d of %d,%d; Level %d\n", - width, height, image->Width,image->Height, - level); if ( target != GL_TEXTURE_2D ) return; Index: xc/lib/GL/mesa/src/drv/i830/Imakefile diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/Imakefile:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/Imakefile Thu Oct 4 14:28:21 2001 @@ -0,0 +1,71 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i830/Imakefile,v 1.1 2001/10/04 18:28:21 alanh Exp $ + +#include + +#if GlxUseBuiltInDRIDriver +#define DoNormalLib (NormalLibGlx || SharedLibGlxWithoutPIC) +#define DoSharedLib (SharedLibGlx && !SharedLibGlxWithoutPIC) +#define DoExtraLib SharedLibGlx +#define DoDebugLib DebugLibGlx +#define DoProfileLib ProfileLibGlx +#else +#define DoNormalLib SharedLibGlxWithoutPIC +#define DoSharedLib !SharedLibGlxWithoutPIC +#define DoExtrasLib NO +#define DoDebugLib NO +#define DoProfileLib NO +#endif + +#include "../common/Imakefile.inc" +#include "Imakefile.inc" +#include "../../Imakefile.inc" +#ifdef i386Architecture +#include "../../X86/Imakefile.inc" +#endif + + DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) + INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) + + DRIOBJS = $(GLXLIBSRC)/mesa/dri/dri_mesa.o \ + $(GLXLIBSRC)/dri/dri_tmm.o + + DRMOBJS = $(GLXLIBSRC)/dri/drm/xf86drm.o \ + $(GLXLIBSRC)/dri/drm/xf86drmHash.o \ + $(GLXLIBSRC)/dri/drm/xf86drmRandom.o \ + $(GLXLIBSRC)/dri/drm/xf86drmSL.o + +#ifdef GlxSoProf + LOSRCS = ../../../../lowpc.c + HISRCS = ../../../../highpc.c + + LOOBJS = ../../../../lowpc.o + HIOBJS = ../../../../highpc.o +#endif + + SRCS = $(I830SRCS) + OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ + $(MESA_ASM_OBJS) $(COMMONOBJS) $(I830OBJS) $(HIOBJS) + +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) + +#include + +LibraryObjectRule() + +SubdirLibraryRule($(I830OBJS)) +NormalLintTarget($(SRCS)) + +#if !GlxUseBuiltInDRIDriver +LIBNAME = i830_dri.so +SharedDriModuleTarget($(LIBNAME),DONE,$(OBJS)) +InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) + +#ifdef GlxSoProf +SOPROF_LIBNAME = _i830_dri_p +NormalDepLibraryTarget($(SOPROF_LIBNAME),DONE,$(ALL_OBJS)) +InstallLibrary($(SOPROF_LIBNAME),$(MODULEDIR)/dri) +#endif +#endif + +DependTarget() + Index: xc/lib/GL/mesa/src/drv/i830/Imakefile.inc diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/Imakefile.inc:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/Imakefile.inc Thu Oct 4 14:28:21 2001 @@ -0,0 +1,100 @@ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/i830/Imakefile.inc,v 1.1 2001/10/04 18:28:21 alanh Exp $ + +#ifndef MesaDrvSrcDir +#define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv +#endif + +MESADRVSRCDIR = MesaDrvSrcDir + +#ifndef MesaDrvI830BuildDir +#define MesaDrvI830BuildDir /**/ +#endif +MESADRVI830BUILDDIR = MesaDrvI830BuildDir + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + +#if BuildXF86DRI + DRI_DEFINES = GlxDefines + DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ + -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ + -I$(GLXLIBSRC)/mesa/dri \ + -I$(SERVERSRC)/GL/dri \ + -I$(XF86OSSRC) \ + -I$(XF86DRIVERSRC)/i810 \ + -I$(GLXLIBSRC)/dri/drm +#endif + +MESA_INCLUDES = -I$(MESASRCDIR)/src -I$(MESADRVSRCDIR)/common \ + -I$(MESADRVSRCDIR)/i830 + X_INCLUDES = -I$(XINCLUDESRC) -I$(EXTINCSRC) + + I830SRCS = $(MESADRVI830BUILDDIR)i830_xmesa.c \ + $(MESADRVI830BUILDDIR)i830_dd.c \ + $(MESADRVI830BUILDDIR)i830_pipeline.c \ + $(MESADRVI830BUILDDIR)i830_span.c \ + $(MESADRVI830BUILDDIR)i830_state.c \ + $(MESADRVI830BUILDDIR)i830_tex.c \ + $(MESADRVI830BUILDDIR)i830_tris.c \ + $(MESADRVI830BUILDDIR)i830_vb.c \ + $(MESADRVI830BUILDDIR)i830_fastpath.c \ + $(MESADRVI830BUILDDIR)i830_ioctl.c + + I830OBJS = $(MESADRVI830BUILDDIR)i830_xmesa.o \ + $(MESADRVI830BUILDDIR)i830_dd.o \ + $(MESADRVI830BUILDDIR)i830_pipeline.o \ + $(MESADRVI830BUILDDIR)i830_span.o \ + $(MESADRVI830BUILDDIR)i830_state.o \ + $(MESADRVI830BUILDDIR)i830_tex.o \ + $(MESADRVI830BUILDDIR)i830_tris.o \ + $(MESADRVI830BUILDDIR)i830_vb.o \ + $(MESADRVI830BUILDDIR)i830_fastpath.o \ + $(MESADRVI830BUILDDIR)i830_ioctl.o + + I830UOBJS = $(MESADRVI830BUILDDIR)unshared/i830_xmesa.o \ + $(MESADRVI830BUILDDIR)unshared/i830_dd.o \ + $(MESADRVI830BUILDDIR)unshared/i830_pipeline.o \ + $(MESADRVI830BUILDDIR)unshared/i830_span.o \ + $(MESADRVI830BUILDDIR)unshared/i830_state.o \ + $(MESADRVI830BUILDDIR)unshared/i830_tex.o \ + $(MESADRVI830BUILDDIR)unshared/i830_tris.o \ + $(MESADRVI830BUILDDIR)unshared/i830_vb.o \ + $(MESADRVI830BUILDDIR)unshared/i830_fastpath.o \ + $(MESADRVI830BUILDDIR)unshared/i830_ioctl.o + + I830DOBJS = $(MESADRVI830BUILDDIR)unshared/i830_xmesa.o \ + $(MESADRVI830BUILDDIR)unshared/i830_dd.o \ + $(MESADRVI830BUILDDIR)unshared/i830_pipeline.o \ + $(MESADRVI830BUILDDIR)unshared/i830_span.o \ + $(MESADRVI830BUILDDIR)unshared/i830_state.o \ + $(MESADRVI830BUILDDIR)unshared/i830_tex.o \ + $(MESADRVI830BUILDDIR)unshared/i830_tris.o \ + $(MESADRVI830BUILDDIR)unshared/i830_vb.o \ + $(MESADRVI830BUILDDIR)unshared/i830_fastpath.o \ + $(MESADRVI830BUILDDIR)unshared/i830_ioctl.o + + I830POBJS = $(MESADRVI830BUILDDIR)unshared/i830_xmesa.o \ + $(MESADRVI830BUILDDIR)unshared/i830_dd.o \ + $(MESADRVI830BUILDDIR)unshared/i830_pipeline.o \ + $(MESADRVI830BUILDDIR)unshared/i830_span.o \ + $(MESADRVI830BUILDDIR)unshared/i830_state.o \ + $(MESADRVI830BUILDDIR)unshared/i830_tex.o \ + $(MESADRVI830BUILDDIR)unshared/i830_tris.o \ + $(MESADRVI830BUILDDIR)unshared/i830_vb.o \ + $(MESADRVI830BUILDDIR)unshared/i830_fastpath.o \ + $(MESADRVI830BUILDDIR)unshared/i830_ioctl.o + +#ifdef NeedToLinkMesaSrc +LinkSourceFile(i830_xmesa.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_dd.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_pipeline.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_span.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_state.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_tex.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_tris.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_vb.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_fastpath.c, $(MESADRVSRCDIR)/i830) +LinkSourceFile(i830_ioctl.c, $(MESADRVSRCDIR)/i830) +#endif + Index: xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h:1.2 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h Thu Oct 4 14:31:38 2001 @@ -0,0 +1,778 @@ +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_3d_reg.h,v 1.2 2001/10/04 18:31:38 alanh Exp $ */ +#define I830_SET_FIELD( var, mask, value ) (var &= ~(mask), var |= value) + +#define CMD_3D (0x3<<29) + +/* 3DPRIMITIVE, p104 */ +#define PRIM3D_INLINE (CMD_3D | (0x1f<<24)) +#define PRIM3D_INDIRECT_SEQ ((1<<23) | PRIM3D_INLINE) +#define PRIM3D_INDICES ((1<<23) | PRIM3D_INLINE | (1<<17)) + +#define PRIM3D_INLINE_CNT(used) ((used / 4) - 2) +#define PRIM3D_INDICES_CNT(num_indices) ((num_indices + 1) / 2) +#define PRIM3D_INDIRECT_CNT(verts) (verts) + +#define PRIM3D_TRILIST 0 +#define PRIM3D_TRISTRIP (0x1<<18) +#define PRIM3D_TRISTRIP_RVRSE (0x2<<18) +#define PRIM3D_TRIFAN (0x3<<18) +#define PRIM3D_POLY (0x4<<18) +#define PRIM3D_LINELIST (0x5<<18) +#define PRIM3D_LINESTRIP (0x6<<18) +#define PRIM3D_RECTLIST (0x7<<18) +#define PRIM3D_POINTLIST (0x8<<18) +#define PRIM3D_DIB (0x9<<18) + +/* STATE3D_ANTI_ALIASING, p 123 */ +#define STATE3D_AA_CMD (CMD_3D | (0x06<<24)) + +#define AA_LINE_ECAAR_WIDTH_ENABLE (1<<16) +#define AA_LINE_ECAAR_WIDTH_0_5 0 +#define AA_LINE_ECAAR_WIDTH_1_0 (1<<14) +#define AA_LINE_ECAAR_WIDTH_2_0 (2<<14) +#define AA_LINE_ECAAR_WIDTH_4_0 (3<<14) + +#define AA_LINE_REGION_WIDTH_ENABLE (1<<8) +#define AA_LINE_REGION_WIDTH_0_5 0 +#define AA_LINE_REGION_WIDTH_1_0 (1<<6) +#define AA_LINE_REGION_WIDTH_2_0 (2<<6) +#define AA_LINE_REGION_WIDTH_4_0 (3<<6) + +#define AA_LINE_ENABLE ((1<<1) | 1) +#define AA_LINE_DISABLE (1<<1) + +/* STATE3D_BUFFER_INFO, p 124 */ +#define STATE3D_BUF_INFO_CMD (CMD_3D | (0x1d<<24) | (0x8e<<16) | 1) +/* Dword 1 */ +#define BUF_3D_ID_COLOR_BACK (0x3<<24) +#define BUF_3D_ID_DEPTH (0x7<<24) +#define BUF_3D_USE_FENCE (1<<23) +#define BUF_3D_TILED_SURFACE (1<<22) +#define BUF_3D_TILE_WALK_X 0 +#define BUF_3D_TILE_WALK_Y (1<<21) +#define BUF_3D_PITCH(x) ((x)<<2) +/* Dword 2 */ +#define BUF_3D_ADDR(x) ((x) & ~0x3) + +/* STATE3D_COLOR_FACTOR_0, p127 */ +#define STATE3D_COLOR_FACTOR_CMD(stage) (CMD_3D | (0x1d<<24) | ((0x90 + (stage))<<16)) + +/* STATE3D_CONSTANT_BLEND_COLOR, p128 */ +#define STATE3D_CONST_BLEND_COLOR_CMD (CMD_3D | (0x1d<<24) | (0x88<<16)) + +/* STATE3D_DEFAULT_DIFFUSE, p128 */ +#define STATE3D_DFLT_DIFFUSE_CMD (CMD_3D | (0x1d<<24) | (0x99<<16)) + +/* STATE3D_DEFAULT_SPECULAR, p129 */ +#define STATE3D_DFLT_SPEC_CMD (CMD_3D | (0x1d<<24) | (0x9a<<16)) + +/* STATE3D_DEFAULT_Z, p129 */ +#define STATE3D_DFLT_Z_CMD (CMD_3D | (0x1d<<24) | (0x98<<16)) + +/* STATE3D_DEST_BUFFER_VARIABLES, p130 */ +#define STATE3D_DST_BUF_VARS_CMD (CMD_3D | (0x1d<<24) | (0x85<<16)) +/* Dword 1 */ +#define DSTORG_HORT_BIAS(x) ((x)<<20) +#define DSTORG_VERT_BIAS(x) ((x)<<16) +#define COLOR_4_2_2_CHNL_WRT_ALL 0 +#define COLOR_4_2_2_CHNL_WRT_Y (1<<12) +#define COLOR_4_2_2_CHNL_WRT_CR (2<<12) +#define COLOR_4_2_2_CHNL_WRT_CB (3<<12) +#define COLOR_4_2_2_CHNL_WRT_CRCB (4<<12) +#define COLR_BUF_8BIT 0 +#define COLR_BUF_RGB555 (1<<8) +#define COLR_BUF_RGB565 (2<<8) +#define COLR_BUF_ARGB8888 (3<<8) +#define DEPTH_IS_Z 0 +#define DEPTH_IS_W (1<<6) +#define DEPTH_FRMT_16_FIXED 0 +#define DEPTH_FRMT_16_FLOAT (1<<2) +#define DEPTH_FRMT_24_FIXED_8_OTHER (2<<2) +#define DEPTH_FRMT_24_FLOAT_8_OTHER (3<<2) +#define VERT_LINE_STRIDE_1 (1<<1) +#define VERT_LINE_STRIDE_0 0 +#define VERT_LINE_STRIDE_OFS_1 1 +#define VERT_LINE_STRIDE_OFS_0 0 + +/* STATE3D_DRAWING_RECTANGLE, p133 */ +#define STATE3D_DRAW_RECT_CMD (CMD_3D|(0x1d<<24)|(0x80<<16)|3) +/* Dword 1 */ +#define DRAW_RECT_DIS_DEPTH_OFS (1<<30) +#define DRAW_DITHER_OFS_X(x) ((x)<<26) +#define DRAW_DITHER_OFS_Y(x) ((x)<<24) +/* Dword 2 */ +#define DRAW_YMIN(x) ((x)<<16) +#define DRAW_XMIN(x) (x) +/* Dword 3 */ +#define DRAW_YMAX(x) ((x)<<16) +#define DRAW_XMAX(x) (x) +/* Dword 4 */ +#define DRAW_YORG(x) ((x)<<16) +#define DRAW_XORG(x) (x) + +/* STATE3D_ENABLES_1, p136 */ +#define STATE3D_ENABLES_1_CMD (CMD_3D|(0x3<<24)) +#define ENABLE_LOGIC_OP_MASK ((1<<23)|(1<<22)) +#define ENABLE_LOGIC_OP ((1<<23)|(1<<22)) +#define DISABLE_LOGIC_OP (1<<23) +#define ENABLE_STENCIL_TEST ((1<<21)|(1<<20)) +#define DISABLE_STENCIL_TEST (1<<21) +#define ENABLE_DEPTH_BIAS ((1<<11)|(1<<10)) +#define DISABLE_DEPTH_BIAS (1<<11) +#define ENABLE_SPEC_ADD_MASK ((1<<9)|(1<<8)) +#define ENABLE_SPEC_ADD ((1<<9)|(1<<8)) +#define DISABLE_SPEC_ADD (1<<9) +#define ENABLE_DIS_FOG_MASK ((1<<7)|(1<<6)) + /* prefixed I830 because ENABLE_FOG defined elsewhere */ +#define I830_ENABLE_FOG ((1<<7)|(1<<6)) +#define I830_DISABLE_FOG (1<<7) +#define ENABLE_DIS_ALPHA_TEST_MASK ((1<<5)|(1<<4)) +#define ENABLE_ALPHA_TEST ((1<<5)|(1<<4)) +#define DISABLE_ALPHA_TEST (1<<5) +#define ENABLE_DIS_CBLEND_MASK ((1<<3)|(1<<2)) +#define ENABLE_COLOR_BLEND ((1<<3)|(1<<2)) +#define DISABLE_COLOR_BLEND (1<<3) +#define ENABLE_DIS_DEPTH_TEST_MASK ((1<<1)|1) +#define ENABLE_DEPTH_TEST ((1<<1)|1) +#define DISABLE_DEPTH_TEST (1<<1) + +/* STATE3D_ENABLES_2, p138 */ +#define STATE3D_ENABLES_2_CMD (CMD_3D|(0x4<<24)) +#define ENABLE_STENCIL_WRITE ((1<<21)|(1<<20)) +#define DISABLE_STENCIL_WRITE (1<<21) +#define ENABLE_TEX_CACHE ((1<<17)|(1<<16)) +#define DISABLE_TEX_CACHE (1<<17) +#define ENABLE_DITHER ((1<<9)|(1<<8)) +#define DISABLE_DITHER (1<<9) +#define ENABLE_COLOR_MASK (1<<10) +#define WRITEMASK_ALPHA (1<<7) +#define WRITEMASK_ALPHA_SHIFT 7 +#define WRITEMASK_RED (1<<6) +#define WRITEMASK_RED_SHIFT 6 +#define WRITEMASK_GREEN (1<<5) +#define WRITEMASK_GREEN_SHIFT 5 +#define WRITEMASK_BLUE (1<<4) +#define WRITEMASK_BLUE_SHIFT 4 +#define WRITEMASK_MASK ((1<<4)|(1<<5)|(1<<6)|(1<<7)) +#define ENABLE_COLOR_WRITE ((1<<3)|(1<<2)) +#define DISABLE_COLOR_WRITE (1<<3) +#define ENABLE_DIS_DEPTH_WRITE_MASK 0x3 +#define ENABLE_DEPTH_WRITE ((1<<1)|1) +#define DISABLE_DEPTH_WRITE (1<<1) + +/* STATE3D_FOG_COLOR, p139 */ +#define STATE3D_FOG_COLOR_CMD (CMD_3D|(0x15<<24)) +#define FOG_COLOR_RED(x) ((x)<<16) +#define FOG_COLOR_GREEN(x) ((x)<<8) +#define FOG_COLOR_BLUE(x) (x) + +/* STATE3D_FOG_MODE, p140 */ +#define STATE3D_FOG_MODE_CMD (CMD_3D|(0x1d<<24)|(0x89<<16)|2) +/* Dword 1 */ +#define FOGFUNC_ENABLE (1<<31) +#define FOGFUNC_VERTEX 0 +#define FOGFUNC_PIXEL_EXP (1<<28) +#define FOGFUNC_PIXEL_EXP2 (2<<28) +#define FOGFUNC_PIXEL_LINEAR (3<<28) +#define FOGSRC_INDEX_Z (1<<27) +#define FOGSRC_INDEX_W ((1<<27)|(1<<25)) +#define FOG_LINEAR_CONST (1<<24) +#define FOG_CONST_1(x) ((x)<<4) +#define ENABLE_FOG_DENSITY (1<<23) +/* Dword 2 */ +#define FOG_CONST_2(x) (x) +/* Dword 3 */ +#define FOG_DENSITY(x) (x) + +/* STATE3D_INDEPENDENT_ALPHA_BLEND, p142 */ +#define STATE3D_INDPT_ALPHA_BLEND_CMD (CMD_3D|(0x0b<<24)) +#define ENABLE_INDPT_ALPHA_BLEND ((1<<23)|(1<<22)) +#define DISABLE_INDPT_ALPHA_BLEND (1<<23) +#define ALPHA_BLENDFUNC_MASK 0x3f0000 +#define ENABLE_ALPHA_BLENDFUNC (1<<21) +#define ABLENDFUNC_ADD 0 +#define ABLENDFUNC_SUB (1<<16) +#define ABLENDFUNC_RVSE_SUB (2<<16) +#define ABLENDFUNC_MIN (3<<16) +#define ABLENDFUNC_MAX (4<<16) +#define SRC_DST_ABLEND_MASK 0xfff +#define ENABLE_SRC_ABLEND_FACTOR (1<<11) +#define SRC_ABLEND_FACT(x) ((x)<<6) +#define ENABLE_DST_ABLEND_FACTOR (1<<5) +#define DST_ABLEND_FACT(x) (x) + +#define BLENDFACT_ZERO 0x01 +#define BLENDFACT_ONE 0x02 +#define BLENDFACT_SRC_COLR 0x03 +#define BLENDFACT_INV_SRC_COLR 0x04 +#define BLENDFACT_SRC_ALPHA 0x05 +#define BLENDFACT_INV_SRC_ALPHA 0x06 +#define BLENDFACT_DST_ALPHA 0x07 +#define BLENDFACT_INV_DST_ALPHA 0x08 +#define BLENDFACT_DST_COLR 0x09 +#define BLENDFACT_INV_DST_COLR 0x0a +#define BLENDFACT_SRC_ALPHA_SATURATE 0x0b +#define BLENDFACT_CONST_COLOR 0x0c +#define BLENDFACT_INV_CONST_COLOR 0x0d +#define BLENDFACT_CONST_ALPHA 0x0e +#define BLENDFACT_INV_CONST_ALPHA 0x0f + +/* STATE3D_MAP_BLEND_ARG, p152 */ +#define STATE3D_MAP_BLEND_ARG_CMD(stage) (CMD_3D|(0x0e<<24)|((stage)<<20)) + +#define TEXPIPE_COLOR 0 +#define TEXPIPE_ALPHA (1<<18) +#define TEXPIPE_KILL (2<<18) +#define TEXBLEND_ARG0 0 +#define TEXBLEND_ARG1 (1<<15) +#define TEXBLEND_ARG2 (2<<15) +#define TEXBLEND_ARG3 (3<<15) +#define TEXBLENDARG_MODIFY_PARMS (1<<6) +#define TEXBLENDARG_REPLICATE_ALPHA (1<<5) +#define TEXBLENDARG_INV_ARG (1<<4) +#define TEXBLENDARG_ONE 0 +#define TEXBLENDARG_FACTOR 0x01 +#define TEXBLENDARG_ACCUM 0x02 +#define TEXBLENDARG_DIFFUSE 0x03 +#define TEXBLENDARG_SPEC 0x04 +#define TEXBLENDARG_CURRENT 0x05 +#define TEXBLENDARG_TEXEL0 0x06 +#define TEXBLENDARG_TEXEL1 0x07 +#define TEXBLENDARG_TEXEL2 0x08 +#define TEXBLENDARG_TEXEL3 0x09 +#define TEXBLENDARG_FACTOR_N 0x0e + +/* STATE3D_MAP_BLEND_OP, p155 */ +#define STATE3D_MAP_BLEND_OP_CMD(stage) (CMD_3D|(0x0d<<24)|((stage)<<20)) +#if 0 +#define TEXPIPE_COLOR 0 +#define TEXPIPE_ALPHA (1<<18) +#define TEXPIPE_KILL (2<<18) +#endif +#define ENABLE_TEXOUTPUT_WRT_SEL (1<<17) +#define TEXOP_OUTPUT_CURRENT 0 +#define TEXOP_OUTPUT_ACCUM (1<<15) +#define ENABLE_TEX_CNTRL_STAGE ((1<<12)|(1<<11)) +#define DISABLE_TEX_CNTRL_STAGE (1<<12) +#define TEXOP_SCALE_1X 0 +#define TEXOP_SCALE_2X (1<<9) +#define TEXOP_SCALE_4X (2<<9) +#define TEXOP_MODIFY_PARMS (1<<8) +#define TEXOP_LAST_STAGE (1<<7) +#define TEXBLENDOP_KILLPIXEL 0x02 +#define TEXBLENDOP_ARG1 0x01 +#define TEXBLENDOP_ARG2 0x02 +#define TEXBLENDOP_MODULATE 0x03 +#define TEXBLENDOP_ADD 0x06 +#define TEXBLENDOP_ADDSIGNED 0x07 +#define TEXBLENDOP_BLEND 0x08 +#define TEXBLENDOP_BLEND_AND_ADD 0x09 +#define TEXBLENDOP_SUBTRACT 0x0a +#define TEXBLENDOP_DOT3 0x0b +#define TEXBLENDOP_DOT4 0x0c +#define TEXBLENDOP_MODULATE_AND_ADD 0x0d +#define TEXBLENDOP_MODULATE_2X_AND_ADD 0x0e +#define TEXBLENDOP_MODULATE_4X_AND_ADD 0x0f + +/* STATE3D_MAP_BUMP_TABLE, p160 TODO */ +/* STATE3D_MAP_COLOR_CHROMA_KEY, p161 TODO */ + +/* STATE3D_MAP_COORD_SET_BINDINGS, p162 */ +#define STATE3D_MAP_COORD_SETBIND_CMD (CMD_3D|(0x1d<<24)|(0x02<<16)) +#define TEXBIND_MASK3 ((1<<15)|(1<<14)|(1<<13)|(1<<12)) +#define TEXBIND_MASK2 ((1<<11)|(1<<10)|(1<<9)|(1<<8)) +#define TEXBIND_MASK1 ((1<<7)|(1<<6)|(1<<5)|(1<<4)) +#define TEXBIND_MASK0 ((1<<3)|(1<<2)|(1<<1)|1) + +#define TEXBIND_SET3(x) ((x)<<12) +#define TEXBIND_SET2(x) ((x)<<8) +#define TEXBIND_SET1(x) ((x)<<4) +#define TEXBIND_SET0(x) (x) + +#define TEXCOORDSRC_KEEP 0 +#define TEXCOORDSRC_DEFAULT 0x01 +#define TEXCOORDSRC_VTXSET_0 0x08 +#define TEXCOORDSRC_VTXSET_1 0x09 +#define TEXCOORDSRC_VTXSET_2 0x0a +#define TEXCOORDSRC_VTXSET_3 0x0b +#define TEXCOORDSRC_VTXSET_4 0x0c +#define TEXCOORDSRC_VTXSET_5 0x0d +#define TEXCOORDSRC_VTXSET_6 0x0e +#define TEXCOORDSRC_VTXSET_7 0x0f + +#define MAP_UNIT(unit) ((unit)<<16) +#define MAP_UNIT_MASK (3<<16) + +/* STATE3D_MAP_COORD_SETS, p164 */ +#define STATE3D_MAP_COORD_SET_CMD (CMD_3D|(0x1c<<24)|(0x01<<19)) +#define ENABLE_TEXCOORD_PARAMS (1<<15) +#define TEXCOORDS_ARE_NORMAL (1<<14) +#define TEXCOORDS_ARE_IN_TEXELUNITS 0 +#define TEXCOORDTYPE_CARTESIAN 0 +#define TEXCOORDTYPE_HOMOGENEOUS (1<<11) +#define TEXCOORDTYPE_VECTOR (2<<11) +#define ENABLE_ADDR_V_CNTL (1<<7) +#define ENABLE_ADDR_U_CNTL (1<<3) +#define TEXCOORD_ADDR_V_MODE(x) ((x)<<4) +#define TEXCOORD_ADDR_U_MODE(x) (x) +#define TEXCOORDMODE_WRAP 0 +#define TEXCOORDMODE_MIRROR 1 +#define TEXCOORDMODE_CLAMP 2 +#define TEXCOORDMODE_WRAP_SHORTEST 3 +#define TEXCOORDMODE_CLAMP_BORDER 4 +#define TEXCOORD_ADDR_V_MASK 0x70 +#define TEXCOORD_ADDR_U_MASK 0x7 + +/* STATE3D_MAP_CUBE, p168 TODO */ + +/* STATE3D_MAP_FILTER, p169 */ +#define STATE3D_MAP_FILTER_CMD (CMD_3D|(0x1c<<24)|(0x02<<19)) +#define ENABLE_CHROMA_KEY_PARAMS (1<<15) +#define ENABLE_TEXCOLOR_KEY (1<<14) +#define ENABLE_TEXCHROMA_KEY (1<<13) +#define ENABLE_TEXKILLPIX_KEY (1<<12) +#define KEYFILTER_KILL_ON_ANY_MATCH 0 +#define KEYFILTER_KILL_ON_ANY_MISMATCH (1<<11) +#define KEYFILTER_REPLACE_BLACK 0 +#define KEYFILTER_REPLACE_NEAREST (1<<11) +#define ENABLE_MIP_MODE_FILTER (1<<9) +#define MIPFILTER_NONE 0 +#define MIPFILTER_NEAREST (1<<6) +#define MIPFILTER_LINEAR (3<<6) +#define ENABLE_MAG_MODE_FILTER (1<<5) +#define ENABLE_MIN_MODE_FILTER (1<<2) +#define MAG_FILTER(x) ((x)<<3) +#define MIN_FILTER(x) (x) +#define MIP_FILTER_MASK (0x3<<6) +#define MAG_FILTER_MASK (0x3<<3) +#define MIN_FILTER_MASK (0x3<<0) + +#define FILTER_NEAREST 0 +#define FILTER_LINEAR 1 +#define FILTER_ANISOTROPIC 2 + +/* STATE3D_MAP_INFO, p172 */ +#define STATE3D_MAP_INFO_NOCOLR_CMD (CMD_3D|(0x1d<<24)|3) + +#define STATE3D_MAP_INFO_COLR_CMD (CMD_3D|(0x1d<<24)|4) + +/* Dword 1 */ +#define MAP_INFO_TEX(unit) ((unit)<<28) +#define MAP_INFO_MASK (3<<28) + +#define MI_FORMAT_MASK ((1<<26)|(1<<25)|(1<<24)|(1<<23)|(1<<22)|(1<<21)) + +#define MAPSURF_8BIT_INDEXED 0 +#define MAPSURF_8BIT (1<<24) +#define MAPSURF_16BIT (2<<24) +#define MAPSURF_32BIT (3<<24) +#define MAPSURF_411 (4<<24) +#define MAPSURF_422 (5<<24) +#define MAPSURF_COMPRESSED (6<<24) +#define MAPSURF_4BIT_INDEXED (7<<24) + +/* Texel formats */ +/* MAPSURF_4BIT_INDEXED */ +#define MT_4BIT_IDX_ARGB8888 (7<<21) + +/* MAPSURF_8BIT_INDEXED */ +#define MT_8BIT_IDX_RGB565 0 +#define MT_8BIT_IDX_ARGB1555 (1<<21) +#define MT_8BIT_IDX_ARGB4444 (2<<21) +#define MT_8BIT_IDX_AY88 (3<<21) +#define MT_8BIT_IDX_ABGR8888 (4<<21) +#define MT_8BIT_IDX_BUMP_88DVDU (5<<21) +#define MT_8BIT_IDX_BUMP_655LDVDU (6<<21) +#define MT_8BIT_IDX_ARGB8888 (7<<21) + +/* MAPSURF_8BIT */ +#define MT_8BIT_I8 0 +#define MT_8BIT_L8 (1<<21) + +/* MAPSURF_16BIT */ +#define MT_16BIT_RGB565 0 +#define MT_16BIT_ARGB1555 (1<<21) +#define MT_16BIT_ARGB4444 (2<<21) +#define MT_16BIT_AY88 (3<<21) +#define MT_16BIT_DIB_ARGB1555_8888 (4<<21) +#define MT_16BIT_BUMP_88DVDU (5<<21) +#define MT_16BIT_BUMP_655LDVDU (6<<21) +#define MT_16BIT_DIB_RGB565_8888 (7<<21) + +/* MAPSURF_32BIT */ +#define MT_32BIT_ARGB8888 0 +#define MT_32BIT_ABGR8888 (1<<21) +#define MT_32BIT_BUMP_XLDVDU_8888 (6<<21) +#define MT_32BIT_DIB_8888 (7<<21) + +/* MAPSURF_411 */ +#define MT_411_YUV411 0 + +/* MAPSURF_422 */ +#define MT_422_YCRCB_SWAPY 0 +#define MT_422_YCRCB_NORMAL (1<<21) +#define MT_422_YCRCB_SWAPUV (2<<21) +#define MT_422_YCRCB_SWAPUVY (3<<21) + +/* MAPSURF_COMPRESSED */ +#define MT_COMPRESS_DXT1 0 +#define MT_COMPRESS_DXT2_3 (1<<21) +#define MT_COMPRESS_DXT4_5 (2<<21) +#define MT_COMPRESS_FXT1 (3<<21) + +#define MAP_INFO_OUTMUX_F0F1F2F3 0 +#define MAP_INFO_OUTMUX_XXF0XXF3 (1<<19) +#define MAP_INFO_OUTMUX_XXF2XXF3 (2<<19) + +#define ENABLE_TEX_COLORSPACE_CONV (1<<18) +#define MAP_INFO_VERTLINESTRIDE_0 0 +#define MAP_INFO_VERTLINESTRIDE_1 (1<<17) +#define MAP_INFO_VERTLINESTRIDEOFS_0 0 +#define MAP_INFO_VERTLINESTRIDEOFS_1 (1<<16) +#define MAP_INFO_FORMAT_2D 0 +#define MAP_INFO_FORMAT_3D (1<<11) +#define MAP_INFO_USE_FENCE (1<<10) +#define MAP_INFO_IS_TILED (1<<9) +#define MAP_INFO_IS_LINEAR 0 +#define MAP_INFO_TILEWALK_XMAJOR 0 +#define MAP_INFO_TILEWALK_YMAJOR (1<<8) +#define MAP_INFO_USE_PALETTE_0 0 +#define MAP_INFO_USE_PALETTE_1 (1<<4) +#define MAP_INFO_USE_PALETTE_N(x) ((x<<4) & (1<<4)) + +/* Dword 2 */ +#define MAP_INFO_HEIGHT(x) ((x)<<16) +#define MAP_INFO_WIDTH(x) (x) + +/* Dword 3 */ +#define MAP_INFO_BASEADDR(x) ((x)&0x3) + +/* Dword 4 */ +#define MAP_INFO_DWORD_PITCH(x) ((x)<<2) + +/* Dword 5 */ +#define MAP_INFO_DFLT_COLR(x) (x) + +/* STATE3D_MAP_LOD_CONTROL, p180 */ +#define STATE3D_MAP_LOD_CNTL_CMD (CMD_3D|(0x1c<<24)|(0x04<<19)) +#define ENABLE_TEXLOD_BIAS (1<<7) +#define MAP_LOD_MASK (0x7f) +#define MAP_LOD_BIAS(x) (x) + +/* STATE3D_MAP_LOD_LIMITS, p181 */ +#define STATE3D_MAP_LOD_LIMITS_CMD (CMD_3D|(0x1c<<24)|(0x03<<19)) +#define ENABLE_MAX_MIP_LVL (1<<13) +#define ENABLE_MIN_MIP_LVL (1<<4) +#define LOD_MAX(x) ((x)<<5) +#define LOD_MIN(x) (x) +#define LOD_MAX_MASK (0x1fe0) +#define LOD_MIN_MASK (0xf) + +/* STATE3D_MAP_PALETTE_LOAD, p183 TODO */ +/* STATE3D_MAP_PALETTE_LOAD_32, p184 TODO */ +/* STATE3D_MAP_STREAM_MODIFIER, p186 TODO */ + +/* STATE3D_MAP_TEXEL_STREAM, p188 */ +#define STATE3D_MAP_TEX_STREAM_CMD (CMD_3D|(0x1c<<24)|(0x05<<19)) +#define DISABLE_TEX_STREAM_BUMP (1<<12) +#define ENABLE_TEX_STREAM_BUMP ((1<<12)|(1<<11)) +#define TEX_MODIFY_UNIT_0 0 +#define TEX_MODIFY_UNIT_1 (1<<8) +#define ENABLE_TEX_STREAM_COORD_SET (1<<7) +#define TEX_STREAM_COORD_SET(x) ((x)<<4) +#define ENABLE_TEX_STREAM_MAP_IDX (1<<3) +#define TEX_STREAM_MAP_IDX(x) (x) + +/* STATE3D_MODES_1, p190 */ +#define STATE3D_MODES_1_CMD (CMD_3D|(0x08<<24)) +#define BLENDFUNC_MASK 0x3f0000 +#define ENABLE_COLR_BLND_FUNC (1<<21) +#define BLENDFUNC_ADD 0 +#define BLENDFUNC_SUB (1<<16) +#define BLENDFUNC_RVRSE_SUB (2<<16) +#define BLENDFUNC_MIN (3<<16) +#define BLENDFUNC_MAX (4<<16) +#define SRC_DST_BLND_MASK 0xfff +#define ENABLE_SRC_BLND_FACTOR (1<<11) +#define ENABLE_DST_BLND_FACTOR (1<<5) +#define SRC_BLND_FACT(x) ((x)<<6) +#define DST_BLND_FACT(x) (x) + +/* Use the blendfact defines for BLND_FACTOR macros */ +#if 0 +#define BLENDFACT_ZERO 0x01 +#define BLENDFACT_ONE 0x02 +#define BLENDFACT_SRC_COLR 0x03 +#define BLENDFACT_INV_SRC_COLR 0x04 +#define BLENDFACT_SRC_ALPHA 0x05 +#define BLENDFACT_INV_SRC_ALPHA 0x06 +#define BLENDFACT_DST_ALPHA 0x07 +#define BLENDFACT_INV_DST_ALPHA 0x08 +#define BLENDFACT_CONST_ALPHA 0x0e +#define BLENDFACT_INV_CONST_ALPHA 0x0f +#endif + +/* STATE3D_MODES_2, p192 */ +#define STATE3D_MODES_2_CMD (CMD_3D|(0x0f<<24)) +#define ENABLE_GLOBAL_DEPTH_BIAS (1<<22) +#define GLOBAL_DEPTH_BIAS(x) ((x)<<14) +#define ENABLE_ALPHA_TEST_FUNC (1<<13) +#define ENABLE_ALPHA_REF_VALUE (1<<8) +#define ALPHA_TEST_FUNC(x) ((x)<<9) +#define ALPHA_REF_VALUE(x) (x) + +#define ALPHA_TEST_REF_MASK 0x3fff +#define COMPAREFUNC_ALWAYS 0 +#define COMPAREFUNC_NEVER 0x1 +#define COMPAREFUNC_LESS 0x2 +#define COMPAREFUNC_EQUAL 0x3 +#define COMPAREFUNC_LEQUAL 0x4 +#define COMPAREFUNC_GREATER 0x5 +#define COMPAREFUNC_NOTEQUAL 0x6 +#define COMPAREFUNC_GEQUAL 0x7 + +/* STATE3D_MODES_3, p193 */ +#define STATE3D_MODES_3_CMD (CMD_3D|(0x02<<24)) +#define DEPTH_TEST_FUNC_MASK 0x1f0000 +#define ENABLE_DEPTH_TEST_FUNC (1<<20) +/* Uses COMPAREFUNC */ +#define DEPTH_TEST_FUNC(x) ((x)<<16) +#define ENABLE_ALPHA_SHADE_MODE (1<<11) +#define ENABLE_FOG_SHADE_MODE (1<<9) +#define ENABLE_SPEC_SHADE_MODE (1<<7) +#define ENABLE_COLOR_SHADE_MODE (1<<5) +#define ALPHA_SHADE_MODE(x) ((x)<<10) +#define FOG_SHADE_MODE(x) ((x)<<8) +#define SPEC_SHADE_MODE(x) ((x)<<6) +#define COLOR_SHADE_MODE(x) ((x)<<4) +#define CULLMODE_MASK 0xf +#define ENABLE_CULL_MODE (1<<3) +#define CULLMODE_BOTH 0 +#define CULLMODE_NONE 1 +#define CULLMODE_CW 2 +#define CULLMODE_CCW 3 + +#define SHADE_MODE_LINEAR 0 +#define SHADE_MODE_FLAT 0x1 + +/* STATE3D_MODES_4, p195 */ +#define STATE3D_MODES_4_CMD (CMD_3D|(0x16<<24)) +#define ENABLE_LOGIC_OP_FUNC (1<<23) +#define LOGIC_OP_FUNC(x) ((x)<<18) +#define LOGICOP_MASK ((1<<18)|(1<<19)|(1<<20)|(1<<21)) +#define LOGICOP_CLEAR 0 +#define LOGICOP_NOR 0x1 +#define LOGICOP_AND_INV 0x2 +#define LOGICOP_COPY_INV 0x3 +#define LOGICOP_AND_RVRSE 0x4 +#define LOGICOP_INV 0x5 +#define LOGICOP_XOR 0x6 +#define LOGICOP_NAND 0x7 +#define LOGICOP_AND 0x8 +#define LOGICOP_EQUIV 0x9 +#define LOGICOP_NOOP 0xa +#define LOGICOP_OR_INV 0xb +#define LOGICOP_COPY 0xc +#define LOGICOP_OR_RVRSE 0xd +#define LOGICOP_OR 0xe +#define LOGICOP_SET 0xf +#define MODE4_ENABLE_STENCIL_MASK ((1<<17)|(1<<16)|(0xffff)) +#define ENABLE_STENCIL_TEST_MASK (1<<17) +#define ENABLE_STENCIL_WRITE_MASK (1<<16) +#define STENCIL_TEST_MASK(x) ((x)<<8) +#define STENCIL_WRITE_MASK(x) (x) + +/* STATE3D_MODES_5, p196 */ +#define STATE3D_MODES_5_CMD (CMD_3D|(0x0c<<24)) +#define ENABLE_SPRITE_POINT_TEX (1<<23) +#define SPRITE_POINT_TEX_ON (1<<22) +#define SPRITE_POINT_TEX_OFF 0 +#define FLUSH_RENDER_CACHE (1<<18) +#define FLUSH_TEXTURE_CACHE (1<<16) +#define FIXED_LINE_WIDTH_MASK 0xfc00 +#define ENABLE_FIXED_LINE_WIDTH (1<<15) +#define FIXED_LINE_WIDTH(x) ((x)<<10) +#define FIXED_POINT_WIDTH_MASK 0x3ff +#define ENABLE_FIXED_POINT_WIDTH (1<<9) +#define FIXED_POINT_WIDTH(x) (x) + +/* STATE3D_RASTERIZATION_RULES, p198 */ +#define STATE3D_RASTER_RULES_CMD (CMD_3D|(0x07<<24)) +#define ENABLE_POINT_RASTER_RULE (1<<15) +#define OGL_POINT_RASTER_RULE (1<<13) +#define ENABLE_LINE_STRIP_PROVOKE_VRTX (1<<8) +#define ENABLE_TRI_FAN_PROVOKE_VRTX (1<<5) +#define ENABLE_TRI_STRIP_PROVOKE_VRTX (1<<2) +#define LINE_STRIP_PROVOKE_VRTX(x) ((x)<<6) +#define TRI_FAN_PROVOKE_VRTX(x) ((x)<<3) +#define TRI_STRIP_PROVOKE_VRTX(x) (x) + +/* STATE3D_SCISSOR_ENABLE, p200 */ +#define STATE3D_SCISSOR_ENABLE_CMD (CMD_3D|(0x1c<<24)|(0x10<<19)) +#define ENABLE_SCISSOR_RECT ((1<<1) | 1) +#define DISABLE_SCISSOR_RECT (1<<1) + +/* STATE3D_SCISSOR_RECTANGLE_0, p201 */ +#define STATE3D_SCISSOR_RECT_0_CMD (CMD_3D|(0x1d<<24)|(0x81<<16)|1) +/* Dword 1 */ +#define SCISSOR_RECT_0_YMIN(x) ((x)<<16) +#define SCISSOR_RECT_0_XMIN(x) (x) +/* Dword 2 */ +#define SCISSOR_RECT_0_YMAX(x) ((x)<<16) +#define SCISSOR_RECT_0_XMAX(x) (x) + +/* STATE3D_STENCIL_TEST, p202 */ +#define STATE3D_STENCIL_TEST_CMD (CMD_3D|(0x09<<24)) +#define ENABLE_STENCIL_PARMS (1<<23) +#define STENCIL_OPS_MASK (0xffc000) +#define STENCIL_FAIL_OP(x) ((x)<<20) +#define STENCIL_PASS_DEPTH_FAIL_OP(x) ((x)<<17) +#define STENCIL_PASS_DEPTH_PASS_OP(x) ((x)<<14) + +#define STENCILOP_KEEP 0 +#define STENCILOP_ZERO 0x1 +#define STENCILOP_REPLACE 0x2 +#define STENCILOP_INCRSAT 0x3 +#define STENCILOP_DECRSAT 0x4 +#define STENCILOP_INCR 0x5 +#define STENCILOP_DECR 0x6 +#define STENCILOP_INVERT 0x7 + +#define ENABLE_STENCIL_TEST_FUNC_MASK ((1<<13)|(1<<12)|(1<<11)|(1<<10)|(1<<9)) +#define ENABLE_STENCIL_TEST_FUNC (1<<13) +/* Uses COMPAREFUNC */ +#define STENCIL_TEST_FUNC(x) ((x)<<9) +#define STENCIL_REF_VALUE_MASK ((1<<8)|0xff) +#define ENABLE_STENCIL_REF_VALUE (1<<8) +#define STENCIL_REF_VALUE(x) (x) + +/* STATE3D_VERTEX_FORMAT, p204 */ +#define STATE3D_VERTEX_FORMAT_CMD (CMD_3D|(0x05<<24)) +#define VRTX_HAS_POINT_WIDTH (1<<12) +#define VRTX_TEX_COORD_COUNT(x) ((x)<<8) +#define VRTX_HAS_SPEC (1<<7) +#define VRTX_HAS_DIFFUSE (1<<6) +#define VRTX_HAS_DEPTH_OFS (1<<5) +#define VRTX_HAS_XYZ (1<<1) +#define VRTX_HAS_XYZW (2<<1) +#define VRTX_HAS_XY (3<<1) +#define VRTX_HAS_XYW (4<<1) + +/* grantham - POINT_WIDTH for later implementation of GL_EXT_point_parameters; + need to uncomment point_width in vb.h and add point copy to SETUPFUNC */ +#define VRTX_FORMAT_NTEX(n) (STATE3D_VERTEX_FORMAT_CMD | \ + VRTX_TEX_COORD_COUNT(n) | \ + VRTX_HAS_SPEC | \ + /* VRTX_HAS_POINT_WIDTH | */ \ + VRTX_HAS_DIFFUSE | \ + VRTX_HAS_XYZW) + +/* STATE3D_VERTEX_FORMAT_2, p206 */ +#define STATE3D_VERTEX_FORMAT_2_CMD (CMD_3D|(0x0a<<24)) +#define VRTX_TEX_SET_7_FMT(x) ((x)<<14) +#define VRTX_TEX_SET_6_FMT(x) ((x)<<12) +#define VRTX_TEX_SET_5_FMT(x) ((x)<<10) +#define VRTX_TEX_SET_4_FMT(x) ((x)<<8) +#define VRTX_TEX_SET_3_FMT(x) ((x)<<6) +#define VRTX_TEX_SET_2_FMT(x) ((x)<<4) +#define VRTX_TEX_SET_1_FMT(x) ((x)<<2) +#define VRTX_TEX_SET_0_FMT(x) (x) + +#define TEXCOORDFMT_2D 0 +#define TEXCOORDFMT_3D 1 +#define TEXCOORDFMT_4D 2 +#define TEXCOORDFMT_1D 3 + +/* STATE3D_VERTEX_TRANSFORM, p207 */ +#define STATE3D_VERTEX_TRANS_CMD (CMD_3D|(0x1d<<24)|(0x8b<<16)|0) +#define STATE3D_VERTEX_TRANS_MTX_CMD (CMD_3D|(0x1d<<24)|(0x8b<<16)|6) +/* Dword 1 */ +#define ENABLE_VIEWPORT_TRANSFORM ((1<<31)|(1<<30)) +#define DISABLE_VIEWPORT_TRANSFORM (1<<31) +#define ENABLE_PERSP_DIVIDE ((1<<29)|(1<<28)) +#define DISABLE_PERSP_DIVIDE (1<<29) +#define VRTX_TRANS_LOAD_MATRICES 0x7421 +#define VRTX_TRANS_NO_LOAD_MATRICES 0x0000 +/* Dword 2 -> 7 are matrix elements */ + +/* STATE3D_W_STATE, p209 */ +#define STATE3D_W_STATE_CMD (CMD_3D|(0x1d<<24)|(0x8d<<16)|1) +/* Dword 1 */ +#define MAGIC_W_STATE_DWORD1 0x00000008 +/* Dword 2 */ +#define WFAR_VALUE(x) (x) + +/* if defining I830_ENABLE_4_TEXTURES, do it in i830_drm.h, too */ + +#define I830PACKCOLOR4444(r,g,b,a) \ + ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4)) + +#define I830PACKCOLOR1555(r,g,b,a) \ + ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \ + ((a) ? 0x8000 : 0)) + +#define I830PACKCOLOR565(r,g,b) \ + ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3)) + +#define I830PACKCOLOR8888(r,g,b,a) \ + ((a<<24) | (r<<16) | (g<<8) | b) + +#if 0 +/* We wont ever use this format, since we will never be using + * more then 4 texture coords. It is here for reference. + */ + +typedef struct { + float x; + float y; + float z; + float z_bias; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + float t_4_0; + + float tu1; + float tv1; + float tq1; + float t_4_1; + + float tu2; + float tv2; + float tq2; + float t_4_2; + + float tu3; + float tv3; + float tq3; + float t_4_3; + + float tu4; + float tv4; + float tq4; + float t_4_4; + + float tu5; + float tv5; + float tq5; + float t_4_5; + + float tu6; + float tv6; + float tq6; + float t_4_6; + + float tu7; + float tv7; + float tq7; + float t_4_7; +} i830_full_vertex; +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_dd.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_dd.c:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_dd.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,158 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_dd.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include "types.h" +#include "vbrender.h" + +#include + +#include "mm.h" +#include "extensions.h" +#include "vb.h" +#include "dd.h" + +#include "i830_drv.h" +#include "i830_ioctl.h" + +extern int xf86VTSema; + + +/*************************************** + * Mesa's Driver Functions + ***************************************/ + + +static const GLubyte *i830DDGetString( GLcontext *ctx, GLenum name ) +{ + switch (name) { + case GL_VENDOR: + return (GLubyte *)"VA Linux Systems"; + case GL_RENDERER: + return (GLubyte *)"Mesa DRI I830 20001127"; + default: + return 0; + } +} + +static GLint i830GetParameteri(const GLcontext *ctx, GLint param) +{ + switch (param) { + case DD_HAVE_HARDWARE_FOG: + return 1; + default: + return 0; + } +} + + + +static void i830BufferSize(GLcontext *ctx, GLuint *width, GLuint *height) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + /* Need to lock to make sure the driDrawable is uptodate. This + * information is used to resize Mesa's software buffers, so it has + * to be correct. + */ + LOCK_HARDWARE(imesa); + *width = imesa->driDrawable->w; + *height = imesa->driDrawable->h; + UNLOCK_HARDWARE(imesa); +} + + + + +void i830DDExtensionsInit( GLcontext *ctx ) +{ + gl_extensions_enable( ctx, "GL_EXT_blend_color" ); + gl_extensions_enable( ctx, "GL_EXT_blend_minmax" ); + gl_extensions_enable( ctx, "GL_EXT_blend_subtract" ); + gl_extensions_enable( ctx, "GL_EXT_blend_logic_op" ); + + gl_extensions_enable( ctx, "GL_EXT_blend_func_separate" ); + gl_extensions_enable( ctx, "GL_ARB_texture_env_add" ); + gl_extensions_enable( ctx, "GL_EXT_texture_env_add" ); + gl_extensions_enable( ctx, "GL_EXT_texture_env_combine" ); + +#if 0 + /* These need a little work, the code is there, but some applications + * don't render correctly. + */ + + gl_extensions_enable( ctx, "GL_EXT_shared_texture_palette" ); + gl_extensions_enable( ctx, "GL_EXT_paletted_texture" ); +#else + gl_extensions_disable( ctx, "GL_EXT_shared_texture_palette" ); + gl_extensions_disable( ctx, "GL_EXT_paletted_texture" ); +#endif + + /* This should be easy to add */ + gl_extensions_disable( ctx, "GL_EXT_texture_lod_bias" ); + + /* Planned extensions */ + gl_extensions_disable( ctx, "GL_ARB_texture_compression" ); + gl_extensions_disable( ctx, "GL_ARB_texture_cube_map" ); + + /* we don't support point parameters in hardware yet */ + gl_extensions_disable( ctx, "GL_EXT_point_parameters" ); + + /* The imaging subset of 1.2 isn't supported by any mesa driver. + */ + gl_extensions_disable( ctx, "ARB_imaging" ); + gl_extensions_disable( ctx, "GL_EXT_convolution" ); + gl_extensions_disable( ctx, "GL_MESA_resize_buffers" ); + gl_extensions_disable( ctx, "GL_SGIX_pixel_texture" ); + gl_extensions_disable( ctx, "GL_SGI_color_matrix" ); + gl_extensions_disable( ctx, "GL_SGI_color_table" ); +} + + + + +void i830DDInitDriverFuncs( GLcontext *ctx ) +{ + ctx->Driver.GetBufferSize = i830BufferSize; + ctx->Driver.GetString = i830DDGetString; + ctx->Driver.GetParameteri = i830GetParameteri; + ctx->Driver.RegisterVB = i830DDRegisterVB; + ctx->Driver.UnregisterVB = i830DDUnregisterVB; + ctx->Driver.Clear = i830Clear; + + + ctx->Driver.BuildPrecalcPipeline = i830DDBuildPrecalcPipeline; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_drv.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_drv.h:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_drv.h Thu Oct 4 14:28:21 2001 @@ -0,0 +1,503 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_drv.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#ifndef __I830_MESA_DRV_H__ +#define __I830_MESA_DRV_H__ + +#include + +#include "dri_tmm.h" +#include "dri_mesaint.h" +#include "dri_mesa.h" + +#include "types.h" +#include "mm.h" +#include "context.h" +#include "mmath.h" +#include "vb.h" + +#include + +#include "xf86drm.h" +#include "xf86drmI830.h" +#include "i830_dri.h" + +#include "i830_3d_reg.h" + +/* To remove all debugging, make sure I830_DEBUG is defined as a + * preprocessor symbol, and equal to zero. + */ +#define I830_DEBUG 0 +#ifndef I830_DEBUG +#warning "Debugging enabled - expect reduced performance" +extern int I830_DEBUG; +#endif + +#define DEBUG_VERBOSE_2D 0x1 +#define DEBUG_VERBOSE_RING 0x8 +#define DEBUG_VERBOSE_OUTREG 0x10 +#define DEBUG_ALWAYS_SYNC 0x40 +#define DEBUG_VERBOSE_MSG 0x80 +#define DEBUG_NO_OUTRING 0x100 +#define DEBUG_NO_OUTREG 0x200 +#define DEBUG_VERBOSE_API 0x400 +#define DEBUG_VALIDATE_RING 0x800 +#define DEBUG_VERBOSE_LRU 0x1000 +#define DEBUG_VERBOSE_DRI 0x2000 +#define DEBUG_VERBOSE_IOCTL 0x4000 +#define DEBUG_VERBOSE_TRACE 0x8000 +#define DEBUG_VERBOSE_STATE 0x10000 + +#define DV_PF_555 (1<<8) +#define DV_PF_565 (2<<8) +#define DV_PF_8888 (3<<8) + +/* Reasons to fallback on all primitives. (see also + * imesa->IndirectTriangles). + */ +#define I830_FALLBACK_TEXTURE 0x1 +#define I830_FALLBACK_DRAW_BUFFER 0x2 +#define I830_FALLBACK_READ_BUFFER 0x4 +#define I830_FALLBACK_STIPPLE 0x8 +#define I830_FALLBACK_SPECULAR 0x10 +#define I830_FALLBACK_STENCIL 0x20 +#define I830_FALLBACK_COLORMASK 0x40 + + +/* for i830ctx.new_state - manage GL->driver state changes + */ +#define I830_NEW_TEXTURE 0x1 + +#define I830_TEX_MAXLEVELS 10 + + +#define I830_NO_PALETTE 0x0 +#define I830_USE_PALETTE 0x1 +#define I830_UPDATE_PALETTE 0x2 +#define I830_FALLBACK_PALETTE 0x4 + +#define I830_SPEC_BIT 0x1 +#define I830_FOG_BIT 0x2 +#define I830_ALPHA_BIT 0x4 /* GL_BLEND, not used */ +#define I830_TEX0_BIT 0x8 +#define I830_TEX1_BIT 0x10 +#define I830_RGBA_BIT 0x20 +#define I830_WIN_BIT 0x40 + +/* All structures go here */ +typedef struct { + GLubyte blue; + GLubyte green; + GLubyte red; + GLubyte alpha; +} i830_color; + +/* A basic fixed format vertex to kick things off. Move to dynamic + * layouts later on. (see also the i830_full_vertex struct in + * i830_3d_reg.h) + */ +typedef struct { + float x; + float y; + float z; + float oow; + /* float point_width; */ + i830_color color; + i830_color specular; + + float tu0; + float tv0; + /* q only if TEXCOORDTYPE_HOMOGENEOUS (projective) or _VECTOR (cube map)*/ + /* when q is desired, need to change VRTX_TEX_SET_0_FMT(TEXCOORDFMT_2D) + to VRTX_TEX_SET_0_FMT(TEXCOORDFMT_3D); same for other texcoords */ + /* float tq0; */ + + float tu1; + float tv1; + /* float tq1; */ + +#if defined(I830_ENABLE_4_TEXTURES) /* see i830_3d_reg.h */ + float tu2; + float tv2; + /* float tq2; */ + + float tu3; + float tv3; + /* float tq3; */ +#endif /* I830_ENABLE_4_TEXTURES */ +} i830_vertex; + +/* Unfortunately only have assembly for 16-stride vertices. + */ +union i830_vertex_t { + i830_vertex v; + float f[16]; + GLuint ui[16]; +}; + +typedef union i830_vertex_t i830Vertex; +typedef union i830_vertex_t *i830VertexPtr; + +struct i830_vertex_buffer_t { + GLvector1ui clipped_elements; + i830VertexPtr verts; + int last_vert; + GLuint *primitive; + GLuint *next_primitive; + void *vert_store; + GLuint size; +}; + +typedef struct i830_vertex_buffer_t *i830VertexBufferPtr; + + +/* For shared texture space managment, these texture objects may also + * be used as proxies for regions of texture memory containing other + * client's textures. Such proxy textures (not to be confused with GL + * proxy textures) are subject to the same LRU aging we use for our + * own private textures, and thus we have a mechanism where we can + * fairly decide between kicking out our own textures and those of + * other clients. + * + * Non-local texture objects have a valid MemBlock to describe the + * region managed by the other client, and can be identified by + * 't->globj == 0' + */ +#define TEX_0 1 +#define TEX_1 2 + +struct i830_texture_object_t { + struct i830_texture_object_t *next, *prev; + + GLuint age; + struct gl_texture_object *globj; + + int Pitch; + int Height; + int texelBytes; + int totalSize; + int bound; + + PMemBlock MemBlock; + char *BufAddr; + + GLuint min_level; + GLuint max_level; + GLuint dirty_images; + + GLenum palette_format; + GLuint palette[256]; + + struct { + const struct gl_texture_image *image; + int offset; /* into BufAddr */ + int height; + int internalFormat; + } image[I830_TEX_MAXLEVELS]; + + /* Support for multitexture. + */ + GLuint current_unit; + GLuint Setup[I830_TEX_SETUP_SIZE]; +}; + +typedef struct { + drmHandle handle; + drmSize size; + char *map; +} i830Region, *i830RegionPtr; + +typedef struct { + i830Region front; + i830Region back; + i830Region depth; + i830Region tex; + + int deviceID; + int width; + int height; + int mem; + + int cpp; /* for front and back buffers */ + int bitsPerPixel; + + int fbFormat; + int fbOffset; + int fbStride; + + int backOffset; + int depthOffset; + + int backPitch; + int backPitchBits; + + int textureOffset; + int textureSize; + int logTextureGranularity; + + __DRIscreenPrivate *driScrnPriv; + drmBufMapPtr bufs; + int use_copy_buf; + unsigned int sarea_priv_offset; +} i830ScreenPrivate; + +typedef struct i830_context_t i830Context; +typedef struct i830_context_t *i830ContextPtr; +typedef struct i830_texture_object_t *i830TextureObjectPtr; + +typedef void (*i830_interp_func)( GLfloat t, + GLfloat *result, + const GLfloat *in, + const GLfloat *out ); + + + +struct i830_context_t { + GLint refcount; + + GLcontext *glCtx; + + i830TextureObjectPtr CurrentTexObj[2]; + + struct i830_texture_object_t TexObjList; + struct i830_texture_object_t SwappedOut; + + int TextureMode; + + /* Hardware state + */ + GLuint Setup[I830_CTX_SETUP_SIZE]; + GLuint BufferSetup[I830_DEST_SETUP_SIZE]; + GLuint TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; + GLuint TexBlendWordsUsed[I830_TEXBLEND_COUNT]; + GLuint TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; + GLuint LastTexEnabled; + GLuint TexEnabledMask; + int vertsize; + + /* Initial GL state, stored here so we can easily access it to draw + * quads to do clears. + */ + GLuint Init_Setup[I830_CTX_SETUP_SIZE]; + GLuint Init_BufferSetup[I830_DEST_SETUP_SIZE]; + GLuint Init_TexBlend[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE]; + GLuint Init_TexBlendWordsUsed[I830_TEXBLEND_COUNT]; + GLuint Init_TexBlendColorPipeNum[I830_TEXBLEND_COUNT]; + + /* Support for CVA and the fast paths. + */ + GLuint setupdone; + GLuint setupindex; + GLuint renderindex; + GLuint using_fast_path; + i830_interp_func interp; + + /* Shortcircuit some state changes. + */ + points_func PointsFunc; + line_func LineFunc; + triangle_func TriangleFunc; + quad_func QuadFunc; + + /* Manage our own state */ + GLuint new_state; + + /* Manage hardware state */ + GLuint dirty; + memHeap_t *texHeap; + + /* One of the few bits of hardware state that can't be calculated + * completely on the fly: + */ + GLuint LcsCullMode; + + /* Funny mesa mirrors + */ + GLuint MonoColor; + GLuint ClearColor; + + /* DRI stuff + */ + drmBufPtr vertex_dma_buffer; + GLuint vertex_prim; + + GLframebuffer *glBuffer; + + /* Two flags to keep track of fallbacks. + */ + GLuint IndirectTriangles; + GLuint Fallback; + + + GLuint needClip; + + /* These refer to the current draw (front vs. back) buffer: + */ + char *drawMap; /* draw buffer address in virtual mem */ + char *readMap; + int drawX; /* origin of drawable in draw buffer */ + int drawY; + GLuint numClipRects; /* cliprects for that buffer */ + XF86DRIClipRectPtr pClipRects; + + int lastSwap; + int secondLastSwap; + int texAge; + int ctxAge; + int dirtyAge; + int any_contend; /* throttle me harder */ + + XF86DRIClipRectRec draw_rect; + + drmContext hHWContext; + drmLock *driHwLock; + int driFd; + Display *display; + + int hw_stencil; + + GLfloat depth_scale; + int depth_clear_mask; + int stencil_clear_mask; + int ClearDepth; + + GLboolean mask_red; + GLboolean mask_green; + GLboolean mask_blue; + GLboolean mask_alpha; + + GLubyte clear_red; + GLubyte clear_green; + GLubyte clear_blue; + GLubyte clear_alpha; + + GLenum palette_format; + GLuint palette[256]; + + __DRIdrawablePrivate *driDrawable; + __DRIscreenPrivate *driScreen; + i830ScreenPrivate *i830Screen; + I830SAREAPtr sarea; +}; + +extern void i830GetLock(i830ContextPtr imesa, GLuint flags); +extern void i830EmitHwStateLocked(i830ContextPtr imesa); +extern void i830EmitScissorValues(i830ContextPtr imesa, int box_nr, + int emit); +extern void i830EmitDrawingRectangle(i830ContextPtr imesa); +extern void i830XMesaSetBackClipRects(i830ContextPtr imesa); +extern void i830XMesaSetFrontClipRects(i830ContextPtr imesa); +extern void i830DestroyTexObj(i830ContextPtr imesa, + i830TextureObjectPtr t); +extern int i830UploadTexImages(i830ContextPtr imesa, + i830TextureObjectPtr t); +extern void i830ResetGlobalLRU(i830ContextPtr imesa); +extern void i830TexturesGone(i830ContextPtr imesa, + GLuint start, GLuint end, GLuint in_use); +extern void i830PrintLocalLRU(i830ContextPtr imesa); +extern void i830PrintGlobalLRU(i830ContextPtr imesa); +extern void i830ChooseRasterSetupFunc(GLcontext *ctx); +extern void i830PrintSetupFlags(char *msg, GLuint flags); +extern void i830UpdateTextureState(GLcontext *ctx); + + + +extern void i830DDFastPath(struct vertex_buffer *VB); +extern void i830DDFastPathInit(void); +extern void i830DDExtensionsInit(GLcontext *ctx); +extern void i830DDInitDriverFuncs(GLcontext *ctx); +extern void i830DDInitSpanFuncs(GLcontext *ctx); +extern void i830DDUpdateHwState(GLcontext *ctx); +extern void i830DDUpdateState(GLcontext *ctx); +extern void i830DDInitState(i830ContextPtr imesa); +extern void i830DDInitStateFuncs(GLcontext *ctx); +extern void i830DDInitTextureFuncs(GLcontext *ctx); +extern void i830DDDoRasterSetup(struct vertex_buffer *VB); +extern void i830DDPartialRasterSetup(struct vertex_buffer *VB); +extern void i830DDCheckPartialRasterSetup(GLcontext *ctx, + struct gl_pipeline_stage *d); +extern void i830DDViewport(GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height); +extern void i830DDDepthRange(GLcontext *ctx, GLclampd nearval, + GLclampd farval); +extern void i830DDUnregisterVB(struct vertex_buffer *VB); +extern void i830DDRegisterVB(struct vertex_buffer *VB); +extern void i830DDResizeVB(struct vertex_buffer *VB, GLuint size); +extern void i830DDSetupInit(void); +extern GLboolean i830DDBuildPrecalcPipeline(GLcontext *ctx); +extern GLuint i830DDRegisterPipelineStages(struct gl_pipeline_stage *out, + const struct gl_pipeline_stage *in, + GLuint nr); + +#define I830_TEX_UNIT_ENABLED(unit) (1<DriverCtx)) +#define I830_DRIVER_DATA(vb) ((i830VertexBufferPtr)((vb)->driver_data)) +#define GET_DISPATCH_AGE(imesa) imesa->sarea->last_dispatch +#define GET_ENQUEUE_AGE(imesa) imesa->sarea->last_enqueue + +/* Lock the hardware and validate our state. + */ +#define LOCK_HARDWARE( imesa ) \ + do { \ + char __ret=0; \ + DRM_CAS(imesa->driHwLock, imesa->hHWContext, \ + (DRM_LOCK_HELD|imesa->hHWContext), __ret); \ + if (__ret) \ + i830GetLock( imesa, 0 ); \ + } while (0) + + + +/* Unlock the hardware using the global current context + */ +#define UNLOCK_HARDWARE(imesa) \ + DRM_UNLOCK(imesa->driFd, imesa->driHwLock, imesa->hHWContext); + + +/* This is the wrong way to do it, I'm sure. Otherwise the drm + * bitches that I've already got the heavyweight lock. At worst, + * this is 3 ioctls. The best solution probably only gets me down + * to 2 ioctls in the worst case. + */ +#define LOCK_HARDWARE_QUIESCENT( imesa ) do { \ + LOCK_HARDWARE( imesa ); \ + i830RegetLockQuiescent( imesa ); \ +} while(0) + +#endif /* __I830_MESA_DRV_H__ */ Index: xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,535 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_fastpath.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include + +#include "types.h" +#include "enums.h" +#include "cva.h" +#include "vertices.h" + +/* #include "mmath.h" */ + +#include "i830_drv.h" +#include "i830_tris.h" + + +extern void gl_fast_copy_vb( struct vertex_buffer *VB ); + +struct i830_fast_tab { + void (*build_vertices)( struct vertex_buffer *VB, GLuint do_cliptest ); + void (*interp)( GLfloat t, GLfloat *O, const GLfloat *I, const GLfloat *J ); +}; + + + + +#define POINT(x) i830_draw_point(imesa, &ivert[x], psize) +#define LINE(x,y) i830_draw_line(imesa, &ivert[x], &ivert[y] ) +#define TRI(x,y,z) i830_draw_triangle(imesa, &ivert[x], &ivert[y], &ivert[z]) + + + + +/* Direct, and no clipping required. I haven't written the clip funcs + * yet, so this is only useful for the fast path. + */ +#define RENDER_POINTS( start, count ) \ +do { \ + GLuint e; \ + for(e=start;everts; \ + const GLuint *elt = VB->EltPtr->data; \ + GLcontext *ctx = VB->ctx; \ + i830ContextPtr imesa = I830_CONTEXT(ctx); \ + const GLfloat psize = ctx->Point.Size; \ + (void)psize; (void) ivert; + + +#define TAG(x) x##_i830_smooth_indirect +#include "render_tmp.h" + + + +static void i830_render_elements_direct( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + i830ContextPtr imesa = I830_CONTEXT( ctx ); + GLenum prim = ctx->CVA.elt_mode; + GLuint nr = VB->EltPtr->count; + render_func func = render_tab_i830_smooth_indirect[prim]; + GLuint p = 0; + + if (imesa->new_state) + i830DDUpdateHwState( ctx ); + + do { + func( VB, 0, nr, 0 ); + } while (ctx->Driver.MultipassFunc && + ctx->Driver.MultipassFunc( VB, ++p )); +} + + + +#define NEGATIVE(f) (f < 0) +#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) +#define LINTERP( T, A, B ) ( (A) + (T) * ( (B) - (A) ) ) + + +#define INTERP_RGBA(t, out, a, b) { \ + int i; \ + for (i = 0; i < 4; i++) { \ + GLfloat fa = UBYTE_COLOR_TO_FLOAT_COLOR(a[i]); \ + GLfloat fb = UBYTE_COLOR_TO_FLOAT_COLOR(b[i]); \ + GLfloat fo = LINTERP(t, fa, fb); \ + FLOAT_COLOR_TO_UBYTE_COLOR(out[i], fo); \ + } \ +} + + +#define CLIP(SGN,V,PLANE) \ +if (mask & PLANE) { \ + GLuint *indata = inlist[in]; \ + GLuint *outdata = inlist[in ^= 1]; \ + GLuint nr = n; \ + GLfloat *J = verts[indata[nr-1]].f; \ + GLfloat dpJ = (SGN J[V]) + J[3]; \ + \ + inlist[0] = vlist1; \ + for (i = n = 0 ; i < nr ; i++) { \ + GLuint elt_i = indata[i]; \ + GLfloat *I = verts[elt_i].f; \ + GLfloat dpI = (SGN I[V]) + I[3]; \ + \ + if (DIFFERENT_SIGNS(dpI, dpJ)) { \ + \ + GLfloat *O = verts[next_vert].f; \ + GLfloat t, *in, *out; \ + \ + if (NEGATIVE(dpI)) { \ + t = dpI / (dpI - dpJ); \ + in = I; \ + out = J; \ + } \ + else \ + { \ + t = dpJ / (dpJ - dpI); \ + in = J; \ + out = I; \ + } \ + \ + interp(t, O, in, out); \ + \ + clipmask[next_vert] = 0; \ + outdata[n++] = next_vert++; \ + } \ + \ + clipmask[elt_i] |= PLANE; /* don't set up */ \ + \ + if (!NEGATIVE(dpI)) { \ + outdata[n++] = elt_i; \ + clipmask[elt_i] &= ~PLANE; /* set up after all */ \ + } \ + \ + J = I; \ + dpJ = dpI; \ + } \ + \ + if (n < 3) return; \ +} + +#define LINE_CLIP(x,y,z,w,PLANE) \ +if (mask & PLANE) { \ + GLfloat dpI = DOT4V(I,x,y,z,w); \ + GLfloat dpJ = DOT4V(J,x,y,z,w); \ + \ + if (DIFFERENT_SIGNS(dpI, dpJ)) { \ + GLfloat *O = verts[next_vert].f; \ + GLfloat t = dpI / (dpI - dpJ); \ + \ + interp(t, O, I, J); \ + \ + clipmask[next_vert] = 0; \ + \ + if (NEGATIVE(dpI)) { \ + clipmask[elts[0]] |= PLANE; \ + I = O; elts[0] = next_vert++; \ + } else { \ + clipmask[elts[1]] |= PLANE; \ + J = O; elts[1] = next_vert++; \ + } \ + } \ + else if (NEGATIVE(dpI)) \ + return; \ +} + + +static __inline void i830_tri_clip( GLuint **p_elts, + i830Vertex *verts, + GLubyte *clipmask, + GLuint *p_next_vert, + GLubyte mask, + i830_interp_func interp ) +{ + GLuint *elts = *p_elts; + GLuint next_vert = *p_next_vert; + GLuint vlist1[VB_MAX_CLIPPED_VERTS]; + GLuint vlist2[VB_MAX_CLIPPED_VERTS]; + GLuint *inlist[2]; + GLuint *out; + GLuint in = 0; + GLuint n = 3; + GLuint i; + + inlist[0] = elts; + inlist[1] = vlist2; + + CLIP(-,0,CLIP_RIGHT_BIT); + CLIP(+,0,CLIP_LEFT_BIT); + CLIP(-,1,CLIP_TOP_BIT); + CLIP(+,1,CLIP_BOTTOM_BIT); + CLIP(-,2,CLIP_FAR_BIT); + CLIP(+,2,CLIP_NEAR_BIT); + + /* Convert the planar polygon to a list of triangles. + */ + out = inlist[in]; + + for (i = 2 ; i < n ; i++) { + elts[0] = out[0]; + elts[1] = out[i-1]; + elts[2] = out[i]; + elts += 3; + } + + *p_next_vert = next_vert; + *p_elts = elts; +} + + +static __inline void i830_line_clip( GLuint **p_elts, + i830Vertex *verts, + GLubyte *clipmask, + GLuint *p_next_vert, + GLubyte mask, + i830_interp_func interp ) +{ + GLuint *elts = *p_elts; + GLfloat *I = verts[elts[0]].f; + GLfloat *J = verts[elts[1]].f; + GLuint next_vert = *p_next_vert; + + LINE_CLIP(1,0,0,-1,CLIP_LEFT_BIT); + LINE_CLIP(-1,0,0,1,CLIP_RIGHT_BIT); + LINE_CLIP(0,1,0,-1,CLIP_TOP_BIT); + LINE_CLIP(0,-1,0,1,CLIP_BOTTOM_BIT); + LINE_CLIP(0,0,1,-1,CLIP_FAR_BIT); + LINE_CLIP(0,0,-1,1,CLIP_NEAR_BIT); + + *p_next_vert = next_vert; + *p_elts += 2; +} + + + +#define CLIP_POINT( e ) \ + if (mask[e]) \ + *out++ = e + +#define CLIP_LINE( e1, e0 ) \ +do { \ + GLubyte ormask = mask[e0] | mask[e1]; \ + out[0] = e1; \ + out[1] = e0; \ + out+=2; \ + if (ormask) { \ + out-=2; \ + if (!(mask[e0] & mask[e1])) { \ + i830_line_clip( &out, verts, mask, &next_vert, ormask, interp); \ + } \ + } \ +} while (0) + +#define CLIP_TRIANGLE( e2, e1, e0 ) \ +do { \ + GLubyte ormask; \ + out[0] = e2; \ + out[1] = e1; \ + out[2] = e0; \ + out += 3; \ + ormask = mask[e2] | mask[e1] | mask[e0]; \ + if (ormask) { \ + out -= 3; \ + if ( !(mask[e2] & mask[e1] & mask[e0])) { \ + i830_tri_clip( &out, verts, mask, &next_vert, ormask, interp ); \ + } \ + } \ +} while (0) + + + + + + +/* Build a table of functions to clip each primitive type. These + * produce a list of elements in the appropriate 'reduced' primitive, + * ie (points, lines, triangles) containing all the clipped and + * unclipped primitives from the original list. + */ +#define LOCAL_VARS \ + i830ContextPtr imesa = I830_CONTEXT( VB->ctx ); \ + GLuint *elt = VB->EltPtr->data; \ + i830Vertex *verts = I830_DRIVER_DATA(VB)->verts; \ + GLuint next_vert = I830_DRIVER_DATA(VB)->last_vert; \ + GLuint *out = I830_DRIVER_DATA(VB)->clipped_elements.data; \ + GLubyte *mask = VB->ClipMask; \ + i830_interp_func interp = imesa->interp; \ + (void) interp; (void) verts; + +#define POSTFIX \ + I830_DRIVER_DATA(VB)->clipped_elements.count = \ + out - I830_DRIVER_DATA(VB)->clipped_elements.data; \ + I830_DRIVER_DATA(VB)->last_vert = next_vert; + + +#define INIT(x) + +#define RENDER_POINTS(start, count) \ +do { \ + GLuint i; \ + for (i = start ; i < count ; i++ ) \ + CLIP_POINT( elt[i] ); \ +} while (0) + +#define RENDER_LINE(i1, i0) \ + CLIP_LINE(elt[i1], elt[i0]) + +#define RENDER_TRI(i2, i1, i0, pv, parity) \ +do { \ + GLuint e2 = elt[i2], e1 = elt[i1], e0 = elt[i0]; \ + if (parity) e2 = elt[i1], e1 = elt[i2]; \ + CLIP_TRIANGLE( e2, e1, e0 ); \ +} while (0) + +#define RENDER_QUAD(i3, i2, i1, i0, pv ) \ + CLIP_TRIANGLE(elt[i3], elt[i2], elt[i0]); \ + CLIP_TRIANGLE(elt[i2], elt[i1], elt[i0]) + +#define TAG(x) i830_clip_##x##_elt +#include "render_tmp.h" + + + +static void i830_project_vertices( struct vertex_buffer *VB ) +{ + i830VertexBufferPtr i830VB = I830_DRIVER_DATA(VB); + GLcontext *ctx = VB->ctx; + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLmatrix *mat = &ctx->Viewport.WindowMap; + GLfloat m[16]; + + m[MAT_SX] = mat->m[MAT_SX]; + m[MAT_TX] = mat->m[MAT_TX] - .5; + m[MAT_SY] = (- mat->m[MAT_SY]); + m[MAT_TY] = (- mat->m[MAT_TY]) + I830_CONTEXT(ctx)->driDrawable->h - .5; + m[MAT_SZ] = mat->m[MAT_SZ] * imesa->depth_scale; + m[MAT_TZ] = mat->m[MAT_TZ] * imesa->depth_scale; + + gl_project_v16( i830VB->verts[VB->CopyStart].f, + i830VB->verts[i830VB->last_vert].f, + m, + 16 * 4 ); +} + +static void i830_project_clipped_vertices( struct vertex_buffer *VB ) +{ + i830VertexBufferPtr i830VB = I830_DRIVER_DATA(VB); + GLcontext *ctx = VB->ctx; + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLmatrix *mat = &ctx->Viewport.WindowMap; + GLfloat m[16]; + + m[MAT_SX] = mat->m[MAT_SX]; + m[MAT_TX] = mat->m[MAT_TX] - .5; + m[MAT_SY] = (- mat->m[MAT_SY]); + m[MAT_TY] = (- mat->m[MAT_TY]) + I830_CONTEXT(ctx)->driDrawable->h - .5; + m[MAT_SZ] = mat->m[MAT_SZ] * imesa->depth_scale; + m[MAT_TZ] = mat->m[MAT_TZ] * imesa->depth_scale; + + gl_project_clipped_v16( i830VB->verts[VB->CopyStart].f, + i830VB->verts[i830VB->last_vert].f, + m, + 16 * 4, + VB->ClipMask + VB->CopyStart ); +} + + +/* Pack rgba and/or texture into the remaining half of a 32 byte vertex. + */ +#define CLIP_UBYTE_COLOR 4 +#define CLIP_UBYTE_B 0 +#define CLIP_UBYTE_G 1 +#define CLIP_UBYTE_R 2 +#define CLIP_UBYTE_A 3 +#define CLIP_S0 6 +#define CLIP_T0 7 +#define CLIP_S1 8 +#define CLIP_T1 9 + +#define TYPE (0) +#define TAG(x) x +#include "i830_fasttmp.h" + +#define TYPE (I830_RGBA_BIT) +#define TAG(x) x##_RGBA +#include "i830_fasttmp.h" + +#define TYPE (I830_TEX0_BIT) +#define TAG(x) x##_TEX0 +#include "i830_fasttmp.h" + +#define TYPE (I830_RGBA_BIT|I830_TEX0_BIT) +#define TAG(x) x##_RGBA_TEX0 +#include "i830_fasttmp.h" + +#define TYPE (I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_RGBA_TEX0_TEX1 +#include "i830_fasttmp.h" + +/* This one *could* get away with sneaking TEX1 into the color and + * specular slots, thus fitting inside a cache line. Would be even + * better to switch to a smaller vertex. + */ +#define TYPE (I830_TEX0_BIT|I830_TEX1_BIT) +#define TAG(x) x##_TEX0_TEX1 +#include "i830_fasttmp.h" + + +/* Very sparsely popluated array - fix the indices. + */ +static struct i830_fast_tab i830FastTab[0x80]; + +void i830DDFastPathInit( void ) +{ + i830_clip_render_init_elt(); + render_init_i830_smooth_indirect(); + + i830_init_fastpath( &i830FastTab[0] ); + i830_init_fastpath_RGBA( &i830FastTab[I830_RGBA_BIT] ); + i830_init_fastpath_TEX0( &i830FastTab[I830_TEX0_BIT] ); + i830_init_fastpath_RGBA_TEX0( &i830FastTab[I830_RGBA_BIT|I830_TEX0_BIT] ); + i830_init_fastpath_TEX0_TEX1( &i830FastTab[I830_TEX0_BIT|I830_TEX1_BIT] ); + i830_init_fastpath_RGBA_TEX0_TEX1( &i830FastTab[I830_RGBA_BIT|I830_TEX0_BIT| + I830_TEX1_BIT] ); +} + +#define VALID_SETUP (I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT) + + +void i830DDFastPath( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + GLenum prim = ctx->CVA.elt_mode; + i830ContextPtr imesa = I830_CONTEXT( ctx ); + struct i830_fast_tab *tab = &i830FastTab[imesa->setupindex & VALID_SETUP]; + GLuint do_cliptest = 1; + + gl_prepare_arrays_cva( VB ); /* still need this */ + + /* Reserve enough space for the pathological case. + */ + if (VB->EltPtr->count * 12 > I830_DRIVER_DATA(VB)->size) { + i830DDResizeVB( VB, VB->EltPtr->count * 12 ); + do_cliptest = 1; + } + + tab->build_vertices( VB, do_cliptest ); /* object->clip space */ + + if (imesa->new_state) + i830DDUpdateHwState( ctx ); + + if (VB->ClipOrMask) { + if (!VB->ClipAndMask) { + render_func *clip = i830_clip_render_tab_elt; + + imesa->interp = tab->interp; + + clip[prim]( VB, 0, VB->EltPtr->count, 0 ); /* build new elts */ + + ctx->CVA.elt_mode = gl_reduce_prim[prim]; + VB->EltPtr = &(I830_DRIVER_DATA(VB)->clipped_elements); + + i830_project_clipped_vertices( VB ); /* clip->device space */ + i830_render_elements_direct( VB ); /* render using new list */ + } + } else { + i830_project_vertices( VB ); /* clip->device space */ + i830_render_elements_direct( VB ); /* render using orig list */ + } + + /* This indicates that there is no cached data to reuse. + */ + VB->pipeline->data_valid = 0; + VB->pipeline->new_state = 0; +} + Index: xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h Thu Oct 4 14:28:21 2001 @@ -0,0 +1,156 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_fasttmp.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + + + +/* The first part of setup is applied to all vertices, clipped or + * unclipped. This data w!ill be used for clipping, and then all + * vertices with a zero clipmask will be projected to device space. + * + * This could be split into several loops, but - it seems that the + * large stride of the fxVertices makes cache issues the big + * performance factor, and that multiple loops mean multiple cache + * misses.... + */ +static void TAG(i830_setup_full)( struct vertex_buffer *VB, GLuint do_cliptest ) +{ + GLcontext *ctx = VB->ctx; + const GLfloat * const m = ctx->ModelProjectMatrix.m; + GLuint start = VB->CopyStart; + GLuint count = VB->Count; + GLuint i; + + gl_xform_points3_v16_general(I830_DRIVER_DATA(VB)->verts[start].f, + m, + VB->ObjPtr->start, + VB->ObjPtr->stride, + count - start); + + if (do_cliptest) + { + VB->ClipAndMask = ~0; + VB->ClipOrMask = 0; + gl_cliptest_points4_v16(I830_DRIVER_DATA(VB)->verts[start].f, + I830_DRIVER_DATA(VB)->verts[count].f, + &(VB->ClipOrMask), + &(VB->ClipAndMask), + VB->ClipMask + start); + } + + /* These branches are all resolved at compile time. Hopefully all + * the pointers are valid addresses even when not enabled. + */ + if (TYPE) { + GLubyte *color = VB->ColorPtr->start; + GLfloat *tex0_data = VB->TexCoordPtr[0]->start; + GLfloat *tex1_data = VB->TexCoordPtr[1]->start; + + GLuint color_stride = VB->ColorPtr->stride; + GLuint tex0_stride = VB->TexCoordPtr[0]->stride; + GLuint tex1_stride = VB->TexCoordPtr[1]->stride; + + GLfloat *f = I830_DRIVER_DATA(VB)->verts[start].f; + + for (i = start ; i < count ; i++, f += 16) { + if (TYPE & I830_RGBA_BIT) { + GLubyte *b = (GLubyte *)&f[CLIP_UBYTE_COLOR]; + GLubyte *col = color; color += color_stride; + b[CLIP_UBYTE_R] = col[0]; + b[CLIP_UBYTE_G] = col[1]; + b[CLIP_UBYTE_B] = col[2]; + b[CLIP_UBYTE_A] = col[3]; + } + if (TYPE & I830_TEX0_BIT) { + f[CLIP_S0] = tex0_data[0]; + f[CLIP_T0] = tex0_data[1]; + STRIDE_F(tex0_data, tex0_stride); + } + if (TYPE & I830_TEX1_BIT) { + f[CLIP_S1] = tex1_data[0]; + f[CLIP_T1] = tex1_data[1]; + STRIDE_F(tex1_data, tex1_stride); + } + } + } + + I830_DRIVER_DATA(VB)->clipped_elements.count = start; + I830_DRIVER_DATA(VB)->last_vert = count; +} + + +/* Changed to just put the interp func instead of the whole clip + * routine into the header. Less code and better chance of doing some + * of this stuff in assembly. + */ +static void TAG(i830_interp_vert)( GLfloat t, + GLfloat *O, + const GLfloat *I, + const GLfloat *J ) +{ + O[0] = LINTERP(t, I[0], J[0]); + O[1] = LINTERP(t, I[1], J[1]); + O[2] = LINTERP(t, I[2], J[2]); + O[3] = LINTERP(t, I[3], J[3]); + + if (TYPE & I830_RGBA_BIT) { + INTERP_RGBA(t, + ((GLubyte *)&(O[4])), + ((GLubyte *)&(I[4])), + ((GLubyte *)&(J[4]))); + } + + if (TYPE & I830_TEX0_BIT) { + O[6] = LINTERP(t, I[6], J[6]); + O[7] = LINTERP(t, I[7], J[7]); + } + + if (TYPE & I830_TEX1_BIT) { + O[8] = LINTERP(t, I[8], J[8]); + O[9] = LINTERP(t, I[9], J[9]); + } +} + + +static void TAG(i830_init_fastpath)( struct i830_fast_tab *tab ) +{ + tab->interp = TAG(i830_interp_vert); + tab->build_vertices = TAG(i830_setup_full); +} + +#undef TYPE +#undef TAG +#undef SIZE Index: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,812 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include +#include + +#include "types.h" +#include "pb.h" +#include "dd.h" + +#include "mm.h" +#include "i830_drv.h" +#include "i830_ioctl.h" + +#include "drm.h" +#include + +drmBufPtr i830_get_buffer_ioctl( i830ContextPtr imesa ) +{ + drm_i830_dma_t dma; + drmBufPtr buf; + int retcode; + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "Getting dma buffer\n"); + + while (1) { + retcode = ioctl(imesa->driFd, DRM_IOCTL_I830_GETBUF, &dma); + + if (dma.granted == 1 && retcode == 0) + break; + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "Retcode : %d, granted : %d\n", retcode, dma.granted); + + ioctl(imesa->driFd, DRM_IOCTL_I830_FLUSH); + } + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, + "imesa->i830Screen->bufs->list : %p, " + "dma.request_idx : %d\n", + imesa->i830Screen->bufs->list, dma.request_idx); + + buf = &(imesa->i830Screen->bufs->list[dma.request_idx]); + buf->idx = dma.request_idx; + buf->used = 4; /* leave room for instruction header */ + buf->total = dma.request_size; + + if(imesa->i830Screen->use_copy_buf != 1) + buf->address = (drmAddress)dma.virtual; + return buf; +} + + +static void i830ClearDrawQuad(i830ContextPtr imesa, float left, + float right, + float bottom, float top, GLubyte red, + GLubyte green, GLubyte blue, GLubyte alpha) +{ + GLuint *vb = i830AllocDwordsInlineLocked( imesa, 32 ); + i830Vertex tmp; + int i; + + /* PRIM3D_TRIFAN */ + + /* initial vertex, left bottom */ + tmp.v.x = left; + tmp.v.y = bottom; + tmp.v.z = 1.0; + tmp.v.oow = 1.0; + tmp.v.color.red = red; + tmp.v.color.green = green; + tmp.v.color.blue = blue; + tmp.v.color.alpha = alpha; + tmp.v.specular.red = 0; + tmp.v.specular.green = 0; + tmp.v.specular.blue = 0; + tmp.v.specular.alpha = 0; + tmp.v.tu0 = 0.0f; + tmp.v.tv0 = 0.0f; + for (i = 0 ; i < 8 ; i++) + vb[i] = tmp.ui[i]; + + /* right bottom */ + vb += 8; + tmp.v.x = right; + for (i = 0 ; i < 8 ; i++) + vb[i] = tmp.ui[i]; + + /* right top */ + vb += 8; + tmp.v.y = top; + for (i = 0 ; i < 8 ; i++) + vb[i] = tmp.ui[i]; + + /* left top */ + vb += 8; + tmp.v.x = left; + for (i = 0 ; i < 8 ; i++) + vb[i] = tmp.ui[i]; +} + +static void i830ClearWithTris(GLcontext *ctx, GLbitfield mask, + GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + i830ScreenPrivate *i830Screen = imesa->i830Screen; + I830SAREAPtr sarea = imesa->sarea; + GLuint old_vertex_prim; + GLuint old_dirty; + int x0, y0, x1, y1; + + if(I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "Clearing with triangles\n"); + + old_dirty = imesa->dirty & ~I830_UPLOAD_CLIPRECTS; + /* Discard all the dirty flags except the cliprect one, reset later */ + imesa->dirty &= I830_UPLOAD_CLIPRECTS; + + if(!all) { + x0 = cx; + y0 = cy; + x1 = x0 + cw; + y1 = y0 + ch; + } else { + x0 = 0; + y0 = 0; + x1 = x0 + dPriv->w; + y1 = y0 + dPriv->h; + } + + /* Clip to Screen */ + if (x0 < 0) x0 = 0; + if (y0 < 0) y0 = 0; + if (x1 > i830Screen->width-1) x1 = i830Screen->width-1; + if (y1 > i830Screen->height-1) y1 = i830Screen->height-1; + + LOCK_HARDWARE(imesa); + memcpy(sarea->ContextState, + imesa->Init_Setup, + sizeof(imesa->Setup) ); + memcpy(sarea->BufferState, + imesa->BufferSetup, + sizeof(imesa->BufferSetup) ); + + old_vertex_prim = imesa->vertex_prim; + imesa->vertex_prim = PRIM3D_TRIFAN; + + if(mask & DD_FRONT_LEFT_BIT) { + GLuint tmp = sarea->ContextState[I830_CTXREG_ENABLES_2]; + + sarea->dirty |= (I830_UPLOAD_CTX | I830_UPLOAD_BUFFERS | + I830_UPLOAD_TEXBLEND0); + + sarea->TexBlendState[0][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXOP_LAST_STAGE | + TEXBLENDOP_ARG1); + sarea->TexBlendState[0][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + sarea->TexBlendState[0][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + sarea->TexBlendState[0][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + sarea->TexBlendStateWordsUsed[0] = 4; + + tmp &= ~(ENABLE_STENCIL_WRITE | ENABLE_DEPTH_WRITE); + tmp |= (DISABLE_STENCIL_WRITE | + DISABLE_DEPTH_WRITE | + (imesa->mask_red << WRITEMASK_RED_SHIFT) | + (imesa->mask_green << WRITEMASK_GREEN_SHIFT) | + (imesa->mask_blue << WRITEMASK_BLUE_SHIFT) | + (imesa->mask_alpha << WRITEMASK_ALPHA_SHIFT)); + sarea->ContextState[I830_CTXREG_ENABLES_2] = tmp; + + if(0) + fprintf(stderr, "fcdq : r_mask(%d) g_mask(%d) b_mask(%d) a_mask(%d)\n", + imesa->mask_red, imesa->mask_green, imesa->mask_blue, + imesa->mask_alpha); + + sarea->BufferState[I830_DESTREG_CBUFADDR] = i830Screen->fbOffset; + + if(0) + fprintf(stderr, "fcdq : x0(%d) x1(%d) y0(%d) y1(%d)\n" + "r(0x%x) g(0x%x) b(0x%x) a(0x%x)\n", + x0, x1, y0, y1, imesa->clear_red, imesa->clear_green, + imesa->clear_blue, imesa->clear_alpha); + + i830ClearDrawQuad(imesa, (float)x0, (float)x1, (float)y0, (float)y1, + imesa->clear_red, imesa->clear_green, + imesa->clear_blue, imesa->clear_alpha); + i830FlushVerticesLocked(imesa); + } + + if(mask & DD_BACK_LEFT_BIT) { + GLuint tmp = sarea->ContextState[I830_CTXREG_ENABLES_2]; + + sarea->dirty |= (I830_UPLOAD_CTX | I830_UPLOAD_BUFFERS | + I830_UPLOAD_TEXBLEND0); + + sarea->TexBlendState[0][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXOP_LAST_STAGE | + TEXBLENDOP_ARG1); + sarea->TexBlendState[0][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + sarea->TexBlendState[0][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + sarea->TexBlendState[0][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + sarea->TexBlendStateWordsUsed[0] = 4; + + tmp &= ~(ENABLE_STENCIL_WRITE | ENABLE_DEPTH_WRITE); + tmp |= (DISABLE_STENCIL_WRITE | + DISABLE_DEPTH_WRITE | + (imesa->mask_red << WRITEMASK_RED_SHIFT) | + (imesa->mask_green << WRITEMASK_GREEN_SHIFT) | + (imesa->mask_blue << WRITEMASK_BLUE_SHIFT) | + (imesa->mask_alpha << WRITEMASK_ALPHA_SHIFT)); + + if(0) + fprintf(stderr, "bcdq : r_mask(%d) g_mask(%d) b_mask(%d) a_mask(%d)\n", + imesa->mask_red, imesa->mask_green, imesa->mask_blue, + imesa->mask_alpha); + + sarea->ContextState[I830_CTXREG_ENABLES_2] = tmp; + + sarea->BufferState[I830_DESTREG_CBUFADDR] = i830Screen->backOffset; + + if(0) + fprintf(stderr, "bcdq : x0(%d) x1(%d) y0(%d) y1(%d)\n" + "r(0x%x) g(0x%x) b(0x%x) a(0x%x)\n", + x0, x1, y0, y1, imesa->clear_red, imesa->clear_green, + imesa->clear_blue, imesa->clear_alpha); + + i830ClearDrawQuad(imesa, (float)x0, (float)x1, (float)y0, (float)y1, + imesa->clear_red, imesa->clear_green, + imesa->clear_blue, imesa->clear_alpha); + i830FlushVerticesLocked(imesa); + } + + if(mask & DD_STENCIL_BIT) { + GLuint s_mask = ctx->Stencil.WriteMask; + + sarea->dirty |= (I830_UPLOAD_CTX | I830_UPLOAD_BUFFERS | + I830_UPLOAD_TEXBLEND0); + + sarea->TexBlendState[0][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXOP_LAST_STAGE | + TEXBLENDOP_ARG1); + sarea->TexBlendState[0][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + sarea->TexBlendState[0][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + sarea->TexBlendState[0][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + sarea->TexBlendStateWordsUsed[0] = 4; + + sarea->ContextState[I830_CTXREG_ENABLES_1] |= (ENABLE_STENCIL_TEST | + ENABLE_DEPTH_TEST); + + sarea->ContextState[I830_CTXREG_ENABLES_2] &= ~(ENABLE_STENCIL_WRITE | + ENABLE_DEPTH_WRITE | + ENABLE_COLOR_WRITE); + + sarea->ContextState[I830_CTXREG_ENABLES_2] |= (ENABLE_STENCIL_WRITE | + DISABLE_DEPTH_WRITE | + (1 << WRITEMASK_RED_SHIFT) | + (1 << WRITEMASK_GREEN_SHIFT) | + (1 << WRITEMASK_BLUE_SHIFT) | + (1 << WRITEMASK_ALPHA_SHIFT) | + ENABLE_COLOR_WRITE); + + sarea->ContextState[I830_CTXREG_STATE4] &= ~MODE4_ENABLE_STENCIL_MASK; + sarea->ContextState[I830_CTXREG_STATE4] |= (ENABLE_STENCIL_TEST_MASK | + ENABLE_STENCIL_WRITE_MASK | + STENCIL_TEST_MASK(s_mask) | + STENCIL_WRITE_MASK(s_mask)); + + sarea->ContextState[I830_CTXREG_STENCILTST] &= ~(STENCIL_OPS_MASK | + STENCIL_REF_VALUE_MASK | + ENABLE_STENCIL_TEST_FUNC_MASK); + sarea->ContextState[I830_CTXREG_STENCILTST] |= (ENABLE_STENCIL_PARMS | + ENABLE_STENCIL_REF_VALUE | + ENABLE_STENCIL_TEST_FUNC | + STENCIL_FAIL_OP(STENCILOP_REPLACE) | + STENCIL_PASS_DEPTH_FAIL_OP(STENCILOP_REPLACE) | + STENCIL_PASS_DEPTH_PASS_OP(STENCILOP_REPLACE) | + STENCIL_REF_VALUE((ctx->Stencil.Clear & 0xff)) | + STENCIL_TEST_FUNC(COMPAREFUNC_ALWAYS)); + + if(0) + fprintf(stderr, "Enables_1 (0x%x) Enables_2 (0x%x) StenTst (0x%x)\n" + "Modes_4 (0x%x)\n", + sarea->ContextState[I830_CTXREG_ENABLES_1], + sarea->ContextState[I830_CTXREG_ENABLES_2], + sarea->ContextState[I830_CTXREG_STENCILTST], + sarea->ContextState[I830_CTXREG_STATE4]); + + sarea->BufferState[I830_DESTREG_CBUFADDR] = i830Screen->fbOffset; + + i830ClearDrawQuad(imesa, (float)x0, (float)x1, (float)y0, (float)y1, + 255, 255, 255, 255); + i830FlushVerticesLocked(imesa); + } + + UNLOCK_HARDWARE(imesa); + imesa->dirty = old_dirty; + imesa->dirty |= (I830_UPLOAD_CTX | + I830_UPLOAD_BUFFERS | + I830_UPLOAD_TEXBLEND0); + + imesa->vertex_prim = old_vertex_prim; +} + +GLbitfield i830Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); + drm_i830_clear_t clear; + GLbitfield tri_mask = 0; + int i; + + FLUSH_BATCH( imesa ); + + /* flip top to bottom */ + cy = dPriv->h-cy-ch; + cx += imesa->drawX; + cy += imesa->drawY; + + clear.flags = 0; + clear.clear_color = imesa->ClearColor; + clear.clear_depth = 0; + clear.clear_colormask = 0; + clear.clear_depthmask = 0; + + if (mask & DD_FRONT_LEFT_BIT) { + if(colorMask == ~0) { + clear.flags |= I830_FRONT; + } else { + tri_mask |= DD_FRONT_LEFT_BIT; + } + mask &= ~DD_FRONT_LEFT_BIT; + } + + if (mask & DD_BACK_LEFT_BIT) { + if(colorMask == ~0) { + clear.flags |= I830_BACK; + } else { + tri_mask |= DD_BACK_LEFT_BIT; + } + mask &= ~DD_BACK_LEFT_BIT; + } + + if (mask & DD_DEPTH_BIT) { + clear.flags |= I830_DEPTH; + clear.clear_depthmask = imesa->depth_clear_mask; + clear.clear_depth = (GLuint)(ctx->Depth.Clear * imesa->ClearDepth); + mask &= ~DD_DEPTH_BIT; + } + + if((mask & DD_STENCIL_BIT) && imesa->hw_stencil) { + if (ctx->Stencil.WriteMask != 0xff) { + tri_mask |= DD_STENCIL_BIT; + } else { + clear.flags |= I830_DEPTH; + clear.clear_depthmask |= imesa->stencil_clear_mask; + clear.clear_depth |= ((ctx->Stencil.Clear<<24) & + imesa->stencil_clear_mask); + } + mask &= ~DD_STENCIL_BIT; + } + + /* First check for clears that need to happen with triangles */ + + if(tri_mask) { + i830ClearWithTris(ctx, tri_mask, all, cx, cy, cw, ch); + } + + if (!clear.flags) + return mask; + + LOCK_HARDWARE( imesa ); + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "Clear, bufs %x nbox %d\n", + (int)clear.flags, (int)imesa->numClipRects); + + for (i = 0 ; i < imesa->numClipRects ; ) + { + int nr = MIN2(i + I830_NR_SAREA_CLIPRECTS, imesa->numClipRects); + XF86DRIClipRectRec *box = imesa->pClipRects; + drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes; + int n = 0; + + if (!all) { + for ( ; i < nr ; i++) { + GLint x = box[i].x1; + GLint y = box[i].y1; + GLint w = box[i].x2 - x; + GLint h = box[i].y2 - y; + + if (x < cx) w -= cx - x, x = cx; + if (y < cy) h -= cy - y, y = cy; + if (x + w > cx + cw) w = cx + cw - x; + if (y + h > cy + ch) h = cy + ch - y; + if (w <= 0) continue; + if (h <= 0) continue; + + b->x1 = x; + b->y1 = y; + b->x2 = x + w; + b->y2 = y + h; + b++; + n++; + } + } else { + for ( ; i < nr ; i++) { + *b++ = *(drm_clip_rect_t *)&box[i]; + n++; + } + } + + imesa->sarea->nbox = n; + ioctl(imesa->driFd, DRM_IOCTL_I830_CLEAR, &clear); + } + + UNLOCK_HARDWARE( imesa ); + imesa->dirty |= I830_UPLOAD_CLIPRECTS; + + return mask; +} + +/* + * Copy the back buffer to the front buffer. + */ +void i830SwapBuffers( i830ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + XF86DRIClipRectPtr pbox; + int nbox; + int i; + int tmp; + + FLUSH_BATCH( imesa ); + LOCK_HARDWARE( imesa ); + + pbox = dPriv->pClipRects; + nbox = dPriv->numClipRects; + + for (i = 0 ; i < nbox ; ) + { + int nr = MIN2(i + I830_NR_SAREA_CLIPRECTS, dPriv->numClipRects); + XF86DRIClipRectRec *b = (XF86DRIClipRectRec *)imesa->sarea->boxes; + + imesa->sarea->nbox = nr - i; + + for ( ; i < nr ; i++) + *b++ = pbox[i]; + + ioctl(imesa->driFd, DRM_IOCTL_I830_SWAP); + } + + tmp = GET_ENQUEUE_AGE(imesa); + UNLOCK_HARDWARE( imesa ); + + if (GET_DISPATCH_AGE(imesa) < imesa->lastSwap) + i830WaitAge(imesa, imesa->lastSwap); + + imesa->lastSwap = tmp; + imesa->dirty |= I830_UPLOAD_CLIPRECTS; +} + + + + + + +/* This waits for *everybody* to finish rendering -- overkill. + */ +void i830DmaFinish( i830ContextPtr imesa ) +{ + FLUSH_BATCH( imesa ); + + + if (1 || imesa->sarea->last_quiescent != imesa->sarea->last_enqueue) { + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "i830DmaFinish\n"); + + LOCK_HARDWARE( imesa ); + i830RegetLockQuiescent( imesa ); + UNLOCK_HARDWARE( imesa ); + imesa->sarea->last_quiescent = imesa->sarea->last_enqueue; + } +} + + +void i830RegetLockQuiescent( i830ContextPtr imesa ) +{ + if (1 || imesa->sarea->last_quiescent != imesa->sarea->last_enqueue) { + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "i830RegetLockQuiescent\n"); + + drmUnlock(imesa->driFd, imesa->hHWContext); + i830GetLock( imesa, DRM_LOCK_QUIESCENT ); + imesa->sarea->last_quiescent = imesa->sarea->last_enqueue; + } +} + +void i830WaitAgeLocked( i830ContextPtr imesa, int age ) +{ + int i = 0; + + + while (++i < 500000 && GET_DISPATCH_AGE(imesa) < age) { + ioctl(imesa->driFd, DRM_IOCTL_I830_GETAGE); + } + + if (GET_DISPATCH_AGE(imesa) < age) { + if (0) + fprintf(stderr, "wait locked %d %d\n", age, GET_DISPATCH_AGE(imesa)); + ioctl(imesa->driFd, DRM_IOCTL_I830_FLUSH); + } +} + + +void i830WaitAge( i830ContextPtr imesa, int age ) +{ + int i = 0; + + while (++i < 500000 && GET_DISPATCH_AGE(imesa) < age) { + ioctl(imesa->driFd, DRM_IOCTL_I830_GETAGE); + } + + if (GET_DISPATCH_AGE(imesa) >= age) + return; + + i = 0; + while (++i < 1000 && GET_DISPATCH_AGE(imesa) < age) { + ioctl(imesa->driFd, DRM_IOCTL_I830_GETAGE); + usleep(1000); + } + + /* To be effective at letting other clients at the hardware, + * particularly the X server which regularly needs quiescence to + * touch the framebuffer, we really need to sleep *beyond* the + * point where our last buffer clears the hardware. + */ + if (imesa->any_contend) { + usleep(3000); + } + + imesa->any_contend = 0; + + if (GET_DISPATCH_AGE(imesa) < age) { + LOCK_HARDWARE(imesa); + if (GET_DISPATCH_AGE(imesa) < age) + ioctl(imesa->driFd, DRM_IOCTL_I830_FLUSH); + UNLOCK_HARDWARE(imesa); + } +} + +void i830FlushVertices( i830ContextPtr imesa ) +{ + if (!imesa->vertex_dma_buffer) return; + + LOCK_HARDWARE( imesa ); + i830FlushVerticesLocked( imesa ); + UNLOCK_HARDWARE( imesa ); +} + +static void age_imesa( i830ContextPtr imesa, int age ) +{ + if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->age = age; + if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->age = age; +} + +void i830FlushVerticesLocked( i830ContextPtr imesa ) +{ + drm_clip_rect_t *pbox = (drm_clip_rect_t *)imesa->pClipRects; + int nbox = imesa->numClipRects; + drmBufPtr buffer = imesa->vertex_dma_buffer; + drm_i830_vertex_t vertex; + int i; + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "i830FlushVerticesLocked, buf->used %d\n", + buffer->used); + + if (!buffer) + return; + + if (imesa->dirty & ~I830_UPLOAD_CLIPRECTS) + i830EmitHwStateLocked( imesa ); + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "i830FlushVerticesLocked, used %d\n", + buffer->used); + + imesa->vertex_dma_buffer = 0; + + vertex.idx = buffer->idx; + vertex.used = buffer->used; + vertex.discard = 0; + + if (!nbox) + vertex.used = 0; + + if (nbox > I830_NR_SAREA_CLIPRECTS) + imesa->dirty |= I830_UPLOAD_CLIPRECTS; + + if(imesa->i830Screen->use_copy_buf == 1 && vertex.used) { + drm_i830_copy_t copy; + + copy.idx = buffer->idx; + copy.used = buffer->used; + copy.address = buffer->address; + ioctl(imesa->driFd, DRM_IOCTL_I830_COPY, ©); + } + + + imesa->sarea->vertex_prim = imesa->vertex_prim; + + if (!nbox || !(imesa->dirty & I830_UPLOAD_CLIPRECTS)) + { + if (nbox == 1) + imesa->sarea->nbox = 0; + else + imesa->sarea->nbox = nbox; + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "DRM_IOCTL_I830_VERTEX CASE1 nbox %d used %d\n", + nbox, vertex.used); + + vertex.discard = 1; + ioctl(imesa->driFd, DRM_IOCTL_I830_VERTEX, &vertex); + age_imesa(imesa, imesa->sarea->last_enqueue); + } + else + { + for (i = 0 ; i < nbox ; ) + { + int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, nbox); + drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes; + + imesa->sarea->nbox = nr - i; + for ( ; i < nr ; i++, b++) { + *b++ = pbox[i]; + if(0) fprintf(stderr, "x1: %d y1: %d x2: %d y2: %d\n", + pbox[i].x1, + pbox[i].y1, + pbox[i].x2, + pbox[i].y2); + } + + /* Finished with the buffer? + */ + if (nr == nbox) + vertex.discard = 1; + + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "DRM_IOCTL_I830_VERTEX nbox %d used %d\n", + nbox, vertex.used); + + ioctl(imesa->driFd, DRM_IOCTL_I830_VERTEX, &vertex); + age_imesa(imesa, imesa->sarea->last_enqueue); + } + } + + imesa->dirty = 0; + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) + fprintf(stderr, "finished i830FlushVerticesLocked\n"); +} + + +GLuint *i830AllocDwords( i830ContextPtr imesa, int dwords ) +{ + GLuint *start; + + if (!imesa->vertex_dma_buffer) + { + LOCK_HARDWARE(imesa); + imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); + UNLOCK_HARDWARE(imesa); + } + else if (imesa->vertex_dma_buffer->used + dwords * 4 > + imesa->vertex_dma_buffer->total) + { + LOCK_HARDWARE(imesa); + i830FlushVerticesLocked( imesa ); + imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); + UNLOCK_HARDWARE(imesa); + } + + start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + + imesa->vertex_dma_buffer->used); + + imesa->vertex_dma_buffer->used += dwords * 4; + return start; +} + +int i830_check_copy(int fd) +{ + return(ioctl(fd, DRM_IOCTL_I830_DOCOPY)); +} + +static void i830DDFlush( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + FLUSH_BATCH( imesa ); +} + +static void i830DDFinish( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + i830DmaFinish( imesa ); +} + +void i830DDInitIoctlFuncs( GLcontext *ctx ) +{ + ctx->Driver.Flush = i830DDFlush; + ctx->Driver.Finish = i830DDFinish; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h Thu Oct 4 14:28:21 2001 @@ -0,0 +1,128 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_ioctl.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#ifndef I830_IOCTL_H +#define I830_IOCTL_H + +#include "i830_drv.h" + + +GLuint *i830AllocDwords( i830ContextPtr imesa, int dwords ); + +void i830GetGeneralDmaBufferLocked( i830ContextPtr mmesa ); + +void i830FlushVertices( i830ContextPtr mmesa ); +void i830FlushVerticesLocked( i830ContextPtr mmesa ); + +void i830FlushGeneralLocked( i830ContextPtr imesa ); +void i830WaitAgeLocked( i830ContextPtr imesa, int age ); +void i830WaitAge( i830ContextPtr imesa, int age ); + +void i830DmaFinish( i830ContextPtr imesa ); + +void i830RegetLockQuiescent( i830ContextPtr imesa ); + +void i830DDInitIoctlFuncs( GLcontext *ctx ); + +void i830SwapBuffers( i830ContextPtr imesa ); + +int i830_check_copy(int fd); + +GLbitfield i830Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, + GLint cx, GLint cy, GLint cw, GLint ch ); + +#define FLUSH_BATCH(imesa) do { \ + if (I830_DEBUG&DEBUG_VERBOSE_IOCTL) \ + fprintf(stderr, "FLUSH_BATCH in %s\n", __FUNCTION__); \ + if (imesa->vertex_dma_buffer) i830FlushVertices(imesa); \ +} while (0) + +extern drmBufPtr i830_get_buffer_ioctl( i830ContextPtr imesa ); + +static __inline +GLuint *i830AllocDwordsInline( i830ContextPtr imesa, int dwords ) +{ + int bytes = dwords * 4; + GLuint *start; + + if (!imesa->vertex_dma_buffer) + { + LOCK_HARDWARE(imesa); + imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); + UNLOCK_HARDWARE(imesa); + } + else if (imesa->vertex_dma_buffer->used + bytes > + imesa->vertex_dma_buffer->total) + { + LOCK_HARDWARE(imesa); + i830FlushVerticesLocked( imesa ); + imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); + UNLOCK_HARDWARE(imesa); + } + + start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + + imesa->vertex_dma_buffer->used); + + imesa->vertex_dma_buffer->used += bytes; + return start; +} + +static __inline +GLuint *i830AllocDwordsInlineLocked( i830ContextPtr imesa, int dwords ) +{ + int bytes = dwords * 4; + GLuint *start; + + if (!imesa->vertex_dma_buffer) + { + imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); + } + else if (imesa->vertex_dma_buffer->used + bytes > + imesa->vertex_dma_buffer->total) + { + i830FlushVerticesLocked( imesa ); + imesa->vertex_dma_buffer = i830_get_buffer_ioctl( imesa ); + } + + start = (GLuint *)((char *)imesa->vertex_dma_buffer->address + + imesa->vertex_dma_buffer->used); + + imesa->vertex_dma_buffer->used += bytes; + return start; +} + +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c:1.1 --- /dev/null Fri Jan 18 15:22:51 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,145 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_pipeline.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include + +#include "types.h" +#include "fog.h" + +#include "i830_drv.h" + +static struct gl_pipeline_stage i830_fast_stage = { + "i830 fast path", + (PIPE_OP_VERT_XFORM|PIPE_OP_RAST_SETUP_0| + PIPE_OP_RAST_SETUP_1|PIPE_OP_RENDER), + PIPE_PRECALC, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + i830DDFastPath +}; + + +#define ILLEGAL_ENABLES (TEXTURE0_3D| \ + TEXTURE1_3D| \ + ENABLE_TEXMAT0 | \ + ENABLE_TEXMAT1 | \ + ENABLE_TEXGEN0 | \ + ENABLE_TEXGEN1 | \ + ENABLE_USERCLIP | \ + ENABLE_LIGHT | \ + ENABLE_FOG) + + +/* The driver gets first shot at building the pipeline - make some + * quick tests to see if we can use the fast path. + */ +GLboolean i830DDBuildPrecalcPipeline( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + struct gl_pipeline *pipe = &ctx->CVA.pre; + + if (imesa->renderindex == 0 && + (ctx->Enabled & ILLEGAL_ENABLES) == 0 && + (ctx->Array.Flags & (VERT_OBJ_234| + VERT_TEX0_4| + VERT_TEX1_4| + VERT_ELT)) == (VERT_OBJ_23|VERT_ELT)) + { + pipe->stages[0] = &i830_fast_stage; + pipe->stages[1] = 0; + pipe->new_inputs = ctx->RenderFlags & VERT_DATA; + pipe->ops = pipe->stages[0]->ops; + imesa->using_fast_path = 1; + return 1; + } + + if (imesa->using_fast_path) + { + imesa->using_fast_path = 0; + ctx->CVA.VB->ClipOrMask = 0; + ctx->CVA.VB->ClipAndMask = CLIP_ALL_BITS; + ctx->Array.NewArrayState |= ctx->Array.Summary; + return 0; + } + + return 0; +} + + + +GLuint i830DDRegisterPipelineStages( struct gl_pipeline_stage *out, + const struct gl_pipeline_stage *in, + GLuint nr ) +{ + GLuint i, o; + + for (i = o = 0 ; i < nr ; i++) { + switch (in[i].ops) { + + case PIPE_OP_RAST_SETUP_0: + out[o] = in[i]; + out[o].cva_state_change = NEW_LIGHTING|NEW_TEXTURING|NEW_RASTER_OPS; + out[o].state_change = ~0; + out[o].check = i830DDCheckPartialRasterSetup; + out[o].run = i830DDPartialRasterSetup; + o++; + break; + + case PIPE_OP_RAST_SETUP_0|PIPE_OP_RAST_SETUP_1: + out[o] = in[i]; + out[o].run = i830DDDoRasterSetup; + o++; + break; + + /* Completely replace Mesa's fog processing to generate fog + * coordinates instead of messing with colors. + */ + case PIPE_OP_FOG: + out[o] = gl_fog_coord_stage; + o++; + break; + + + default: + out[o++] = in[i]; + break; + } + } + + return o; +} + + Index: xc/lib/GL/mesa/src/drv/i830/i830_span.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_span.c:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_span.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,333 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_span.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include "types.h" + +#include "i830_drv.h" +#include "i830_ioctl.h" + + +#define DBG 0 + +#define LOCAL_VARS \ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + i830ScreenPrivate *i830Screen = imesa->i830Screen; \ + GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(imesa->drawMap + \ + dPriv->x * i830Screen->cpp + \ + dPriv->y * pitch); \ + char *read_buf = (char *)(imesa->readMap + \ + dPriv->x * i830Screen->cpp + \ + dPriv->y * pitch); \ + GLushort p = I830_CONTEXT( ctx )->MonoColor; \ + (void) read_buf; (void) buf; (void) p + +#define LOCAL_DEPTH_VARS \ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + i830ScreenPrivate *i830Screen = imesa->i830Screen; \ + GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(i830Screen->depth.map + \ + dPriv->x * i830Screen->cpp + \ + dPriv->y * pitch) + +#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS + +#define INIT_MONO_PIXEL(p) + +#define CLIPPIXEL(_x,_y) (_x >= minx && _x < maxx && \ + _y >= miny && _y < maxy) + +#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ + if ( _y < miny || _y >= maxy ) { \ + _n1 = 0, _x1 = x; \ + } else { \ + _n1 = _n; \ + _x1 = _x; \ + if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ + if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ + } + +#define Y_FLIP(_y) (height - _y - 1) + + +#define HW_LOCK() \ + i830ContextPtr imesa = I830_CONTEXT(ctx); \ + FLUSH_BATCH(imesa); \ + i830DmaFinish(imesa); \ + LOCK_HARDWARE_QUIESCENT(imesa); + +#define HW_CLIPLOOP() \ + do { \ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + int _nc = dPriv->numClipRects; \ + while (_nc--) { \ + int minx = dPriv->pClipRects[_nc].x1 - dPriv->x; \ + int miny = dPriv->pClipRects[_nc].y1 - dPriv->y; \ + int maxx = dPriv->pClipRects[_nc].x2 - dPriv->x; \ + int maxy = dPriv->pClipRects[_nc].y2 - dPriv->y; + + +#define HW_ENDCLIPLOOP() \ + } \ + } while (0) + +#define HW_UNLOCK() \ + UNLOCK_HARDWARE(imesa); + + + + +/* 16 bit, 565 rgb color spanline and pixel functions + */ +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = ( (((int)r & 0xf8) << 8) | \ + (((int)g & 0xfc) << 3) | \ + (((int)b & 0xf8) >> 3)) +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ +do { \ + GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ + rgba[0] = (((p >> 11) & 0x1f) * 255) / 31; \ + rgba[1] = (((p >> 5) & 0x3f) * 255) / 63; \ + rgba[2] = (((p >> 0) & 0x1f) * 255) / 31; \ + rgba[3] = 255; \ +} while(0) + +#define TAG(x) i830##x##_565 +#include "spantmp.h" + + + + +/* 15 bit, 555 rgb color spanline and pixel functions + */ +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = (((r & 0xf8) << 7) | \ + ((g & 0xf8) << 3) | \ + ((b & 0xf8) >> 3)) + +#define WRITE_PIXEL( _x, _y, p ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = p + +#define READ_RGBA( rgba, _x, _y ) \ +do { \ + GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \ + rgba[0] = (p >> 7) & 0xf8; \ + rgba[1] = (p >> 3) & 0xf8; \ + rgba[2] = (p << 3) & 0xf8; \ + rgba[3] = 255; \ +} while(0) + +#define TAG(x) i830##x##_555 +#include "spantmp.h" + +/* 16 bit depthbuffer functions. + */ +#define WRITE_DEPTH( _x, _y, d ) \ + *(GLushort *)(buf + _x*2 + _y*pitch) = d; + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLushort *)(buf + _x*2 + _y*pitch); + +/* d = 0xffff; */ + +#define TAG(x) i830##x##_16 +#include "depthtmp.h" + + +#undef LOCAL_VARS +#define LOCAL_VARS \ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + i830ScreenPrivate *i830Screen = imesa->i830Screen; \ + GLuint pitch = i830Screen->backPitch * i830Screen->cpp; \ + GLuint height = dPriv->h; \ + char *buf = (char *)(imesa->drawMap + \ + dPriv->x * i830Screen->cpp + \ + dPriv->y * pitch); \ + char *read_buf = (char *)(imesa->readMap + \ + dPriv->x * i830Screen->cpp + \ + dPriv->y * pitch); \ + GLuint p = I830_CONTEXT( ctx )->MonoColor; \ + (void) read_buf; (void) buf; (void) p + + +/* 32 bit, 8888 argb color spanline and pixel functions + */ +#define WRITE_RGBA(_x, _y, r, g, b, a) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = ((r << 16) | \ + (g << 8) | \ + (b << 0) | \ + (a << 24) ) + +#define WRITE_PIXEL(_x, _y, p) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = p + +/* Note to Self: + * Don't read alpha from framebuffer, because its not correct. From a + * reading of the spec, this should not be the case, need to ask an + * engineer at Intel. + */ + +#define READ_RGBA(rgba, _x, _y) \ + do { \ + GLuint p = *(GLuint *)(read_buf + _x*4 + _y*pitch); \ + rgba[0] = (p >> 16) & 0xff; \ + rgba[1] = (p >> 8) & 0xff; \ + rgba[2] = (p >> 0) & 0xff; \ + rgba[3] = 255; \ + } while (0) + +#define TAG(x) i830##x##_8888 +#include "spantmp.h" + +/* 24 bit depthbuffer functions. + */ +#define WRITE_DEPTH( _x, _y, d ) \ + *(GLuint *)(buf + _x*4 + _y*pitch) = 0xffffff & d; + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLuint *)(buf + _x*4 + _y*pitch) & 0xffffff; + +#define TAG(x) i830##x##_24 +#include "depthtmp.h" + +/* 24/8 bit interleaved depth/stencil functions + */ +#define WRITE_DEPTH( _x, _y, d ) { \ + GLuint tmp = *(GLuint *)(buf + _x*4 + _y*pitch); \ + tmp &= 0xff000000; \ + tmp |= (d) & 0xffffff; \ + *(GLuint *)(buf + _x*4 + _y*pitch) = tmp; \ +} + +#define READ_DEPTH( d, _x, _y ) \ + d = *(GLuint *)(buf + _x*4 + _y*pitch) & 0xffffff; + + +#define TAG(x) i830##x##_24_8 +#include "depthtmp.h" + +#define WRITE_STENCIL( _x, _y, d ) { \ + GLuint tmp = *(GLuint *)(buf + _x*4 + _y*pitch); \ + tmp &= 0xffffff; \ + tmp |= (d<<24); \ + *(GLuint *)(buf + _x*4 + _y*pitch) = tmp; \ +} + +#define READ_STENCIL( d, _x, _y ) \ + d = *(GLuint *)(buf + _x*4 + _y*pitch) >> 24; + +#define TAG(x) i830##x##_24_8 +#include "stenciltmp.h" + + +void i830DDInitSpanFuncs( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + i830ScreenPrivate *i830Screen = imesa->i830Screen; + + switch (i830Screen->fbFormat) { + case DV_PF_555: + ctx->Driver.WriteRGBASpan = i830WriteRGBASpan_555; + ctx->Driver.WriteRGBSpan = i830WriteRGBSpan_555; + ctx->Driver.WriteMonoRGBASpan = i830WriteMonoRGBASpan_555; + ctx->Driver.WriteRGBAPixels = i830WriteRGBAPixels_555; + ctx->Driver.WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_555; + ctx->Driver.ReadRGBASpan = i830ReadRGBASpan_555; + ctx->Driver.ReadRGBAPixels = i830ReadRGBAPixels_555; + + ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_16; + ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_16; + ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_16; + ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_16; + break; + + case DV_PF_565: + ctx->Driver.WriteRGBASpan = i830WriteRGBASpan_565; + ctx->Driver.WriteRGBSpan = i830WriteRGBSpan_565; + ctx->Driver.WriteMonoRGBASpan = i830WriteMonoRGBASpan_565; + ctx->Driver.WriteRGBAPixels = i830WriteRGBAPixels_565; + ctx->Driver.WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_565; + ctx->Driver.ReadRGBASpan = i830ReadRGBASpan_565; + ctx->Driver.ReadRGBAPixels = i830ReadRGBAPixels_565; + + ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_16; + ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_16; + ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_16; + ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_16; + break; + + case DV_PF_8888: + ctx->Driver.WriteRGBASpan = i830WriteRGBASpan_8888; + ctx->Driver.WriteRGBSpan = i830WriteRGBSpan_8888; + ctx->Driver.WriteMonoRGBASpan = i830WriteMonoRGBASpan_8888; + ctx->Driver.WriteRGBAPixels = i830WriteRGBAPixels_8888; + ctx->Driver.WriteMonoRGBAPixels = i830WriteMonoRGBAPixels_8888; + ctx->Driver.ReadRGBASpan = i830ReadRGBASpan_8888; + ctx->Driver.ReadRGBAPixels = i830ReadRGBAPixels_8888; + + if(imesa->hw_stencil) { + ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_24_8; + ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_24_8; + ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_24_8; + ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_24_8; + + ctx->Driver.WriteStencilSpan = i830WriteStencilSpan_24_8; + ctx->Driver.ReadStencilSpan = i830ReadStencilSpan_24_8; + ctx->Driver.WriteStencilPixels = i830WriteStencilPixels_24_8; + ctx->Driver.ReadStencilPixels = i830ReadStencilPixels_24_8; + } else { + ctx->Driver.ReadDepthSpan = i830ReadDepthSpan_24; + ctx->Driver.WriteDepthSpan = i830WriteDepthSpan_24; + ctx->Driver.ReadDepthPixels = i830ReadDepthPixels_24; + ctx->Driver.WriteDepthPixels = i830WriteDepthPixels_24; + } + break; + } + + ctx->Driver.WriteCI8Span =NULL; + ctx->Driver.WriteCI32Span =NULL; + ctx->Driver.WriteMonoCISpan =NULL; + ctx->Driver.WriteCI32Pixels =NULL; + ctx->Driver.WriteMonoCIPixels =NULL; + ctx->Driver.ReadCI32Span =NULL; + ctx->Driver.ReadCI32Pixels =NULL; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_state.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_state.c:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_state.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,1675 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_state.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include + +#include "types.h" +#include "enums.h" +#include "pb.h" +#include "dd.h" + +#include "mm.h" + +#include "i830_drv.h" +#include "i830_tris.h" +#include "i830_ioctl.h" + +/* Need to add other formats */ +static __inline__ GLuint i830PackColor(GLuint format, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a) +{ + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + switch (format) { + case DV_PF_555: + return I830PACKCOLOR1555(r,g,b,a); + case DV_PF_565: + return I830PACKCOLOR565(r,g,b); + case DV_PF_8888: + return I830PACKCOLOR8888(r,g,b,a); + default: + fprintf(stderr, "unknown format %d\n", (int)format); + return 0; + } +} + +static void i830DDPointSize(GLcontext *ctx, GLfloat size) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLint point_size = FloatToInt(size); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLUSH_BATCH(imesa); + CLAMP_SELF(point_size, 1, 256); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE5] &= ~FIXED_POINT_WIDTH_MASK; + imesa->Setup[I830_CTXREG_STATE5] |= (ENABLE_FIXED_POINT_WIDTH | + FIXED_POINT_WIDTH(point_size)); +} + +static void i830DDStencilFunc(GLcontext *ctx, GLenum func, GLint ref, + GLuint mask) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint v_mask, w_mask; + int test = 0; + + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s : func: %s, ref : 0x%x, mask: 0x%x\n", __FUNCTION__, + gl_lookup_enum_by_nr(func), ref, mask); + + FLUSH_BATCH(imesa); + + v_mask = ctx->Stencil.ValueMask & 0xff; + w_mask = ctx->Stencil.WriteMask & 0xff; + + switch(func) { + case GL_NEVER: test = COMPAREFUNC_NEVER; break; + case GL_LESS: test = COMPAREFUNC_LESS; break; + case GL_EQUAL: test = COMPAREFUNC_EQUAL; break; + case GL_LEQUAL: test = COMPAREFUNC_LEQUAL; break; + case GL_GREATER: test = COMPAREFUNC_GREATER; break; + case GL_NOTEQUAL: test = COMPAREFUNC_NOTEQUAL; break; + case GL_GEQUAL: test = COMPAREFUNC_GEQUAL; break; + case GL_ALWAYS: test = COMPAREFUNC_ALWAYS; break; + default: break; + } + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE4] &= ~MODE4_ENABLE_STENCIL_MASK; + imesa->Setup[I830_CTXREG_STATE4] |= (ENABLE_STENCIL_TEST_MASK | + ENABLE_STENCIL_WRITE_MASK | + STENCIL_TEST_MASK(v_mask) | + STENCIL_WRITE_MASK(w_mask)); + imesa->Setup[I830_CTXREG_STENCILTST] &= ~(STENCIL_REF_VALUE_MASK | + ENABLE_STENCIL_TEST_FUNC_MASK); + imesa->Setup[I830_CTXREG_STENCILTST] |= (ENABLE_STENCIL_REF_VALUE | + ENABLE_STENCIL_TEST_FUNC | + STENCIL_REF_VALUE(ref) | + STENCIL_TEST_FUNC(test)); + + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "%s : state4 : 0x%x, stentst : 0x%x\n", __FUNCTION__, + imesa->Setup[I830_CTXREG_STATE4], + imesa->Setup[I830_CTXREG_STENCILTST]); +} + +static void i830DDStencilMask(GLcontext *ctx, GLuint mask) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint v_mask, w_mask; + + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s : mask 0x%x\n", __FUNCTION__, mask); + + FLUSH_BATCH(imesa); + + v_mask = ctx->Stencil.ValueMask & 0xff; + w_mask = ctx->Stencil.WriteMask & 0xff; + + imesa->dirty |= I830_UPLOAD_CTX; + + imesa->Setup[I830_CTXREG_STATE4] &= ~MODE4_ENABLE_STENCIL_MASK; + imesa->Setup[I830_CTXREG_STATE4] |= (ENABLE_STENCIL_TEST_MASK | + ENABLE_STENCIL_WRITE_MASK | + STENCIL_TEST_MASK(v_mask) | + STENCIL_WRITE_MASK(w_mask)); + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "%s : state4 : 0x%x\n", __FUNCTION__, + imesa->Setup[I830_CTXREG_STATE4]); +} + +static void i830DDStencilOp(GLcontext *ctx, GLenum fail, GLenum zfail, + GLenum zpass) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int fop, dfop, dpop; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s: fail : %s, zfail: %s, zpass : %s\n", __FUNCTION__, + gl_lookup_enum_by_nr(fail), + gl_lookup_enum_by_nr(zfail), + gl_lookup_enum_by_nr(zpass)); + + FLUSH_BATCH(imesa); + + fop = 0; dfop = 0; dpop = 0; + + switch(fail) { + case GL_KEEP: fop = STENCILOP_KEEP; break; + case GL_ZERO: fop = STENCILOP_ZERO; break; + case GL_REPLACE: fop = STENCILOP_REPLACE; break; + case GL_INCR: fop = STENCILOP_INCR; break; + case GL_DECR: fop = STENCILOP_DECR; break; + case GL_INVERT: fop = STENCILOP_INVERT; break; + default: break; + } + switch(zfail) { + case GL_KEEP: dfop = STENCILOP_KEEP; break; + case GL_ZERO: dfop = STENCILOP_ZERO; break; + case GL_REPLACE: dfop = STENCILOP_REPLACE; break; + case GL_INCR: dfop = STENCILOP_INCR; break; + case GL_DECR: dfop = STENCILOP_DECR; break; + case GL_INVERT: dfop = STENCILOP_INVERT; break; + default: break; + } + switch(zpass) { + case GL_KEEP: dpop = STENCILOP_KEEP; break; + case GL_ZERO: dpop = STENCILOP_ZERO; break; + case GL_REPLACE: dpop = STENCILOP_REPLACE; break; + case GL_INCR: dpop = STENCILOP_INCR; break; + case GL_DECR: dpop = STENCILOP_DECR; break; + case GL_INVERT: dpop = STENCILOP_INVERT; break; + default: break; + } + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STENCILTST] &= ~(STENCIL_OPS_MASK); + imesa->Setup[I830_CTXREG_STENCILTST] |= (ENABLE_STENCIL_PARMS | + STENCIL_FAIL_OP(fop) | + STENCIL_PASS_DEPTH_FAIL_OP(dfop) | + STENCIL_PASS_DEPTH_PASS_OP(dpop)); + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "%s : stentst : 0x%x\n", __FUNCTION__, + imesa->Setup[I830_CTXREG_STENCILTST]); + +} + +static void i830DDAlphaFunc(GLcontext *ctx, GLenum func, GLclampf ref) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int test = 0; + GLubyte tmp_ref; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s %s\n", __FUNCTION__, gl_lookup_enum_by_nr(func)); + + FLOAT_COLOR_TO_UBYTE_COLOR(tmp_ref, ref); + + FLUSH_BATCH(imesa); + + switch(func) { + case GL_NEVER: + test = COMPAREFUNC_NEVER; + break; + case GL_LESS: + test = COMPAREFUNC_LESS; + break; + case GL_LEQUAL: + test = COMPAREFUNC_LEQUAL; + break; + case GL_GREATER: + test = COMPAREFUNC_GREATER; + break; + case GL_GEQUAL: + test = COMPAREFUNC_GEQUAL; + break; + case GL_NOTEQUAL: + test = COMPAREFUNC_NOTEQUAL; + break; + case GL_EQUAL: + test = COMPAREFUNC_EQUAL; + break; + case GL_ALWAYS: + test = COMPAREFUNC_ALWAYS; + break; + default: return; + } + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE2] &= ~ALPHA_TEST_REF_MASK; + imesa->Setup[I830_CTXREG_STATE2] |= (ENABLE_ALPHA_TEST_FUNC | + ENABLE_ALPHA_REF_VALUE | + ALPHA_TEST_FUNC(test) | + ALPHA_REF_VALUE(tmp_ref)); +} + +/* This function makes sure that the proper enables are + * set for LogicOp, Independant Alpha Blend, and Blending. + * It needs to be called from numerous places where we + * could change the LogicOp or Independant Alpha Blend without subsequent + * calls to glEnable. + */ +static void i830EvalLogicOpBlendState(GLcontext *ctx) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + + if(ctx->Color.ColorLogicOpEnabled || ctx->Color.IndexLogicOpEnabled) { + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | + ENABLE_LOGIC_OP_MASK); + imesa->Setup[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | + ENABLE_LOGIC_OP); + imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; + imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; + } else if(ctx->Color.BlendEnabled) { + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | + ENABLE_LOGIC_OP_MASK); + imesa->Setup[I830_CTXREG_ENABLES_1] |= (ENABLE_COLOR_BLEND | + DISABLE_LOGIC_OP); + imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; + if(imesa->Setup[I830_CTXREG_IALPHAB] & SRC_DST_ABLEND_MASK) { + imesa->Setup[I830_CTXREG_IALPHAB] |= ENABLE_INDPT_ALPHA_BLEND; + } else { + imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; + } + } else { + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~(ENABLE_COLOR_BLEND | + ENABLE_LOGIC_OP_MASK); + imesa->Setup[I830_CTXREG_ENABLES_1] |= (DISABLE_COLOR_BLEND | + DISABLE_LOGIC_OP); + imesa->Setup[I830_CTXREG_IALPHAB] &= ~ENABLE_INDPT_ALPHA_BLEND; + imesa->Setup[I830_CTXREG_IALPHAB] |= DISABLE_INDPT_ALPHA_BLEND; + } +} + +static void i830DDBlendEquation(GLcontext *ctx, GLenum mode) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int func = ENABLE_ALPHA_BLENDFUNC; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s %s\n", __FUNCTION__, + gl_lookup_enum_by_nr(mode)); + + i830EvalLogicOpBlendState(ctx); + + FLUSH_BATCH(imesa); + + switch(mode) { + case GL_FUNC_ADD_EXT: func |= BLENDFUNC_ADD; break; + case GL_MIN_EXT: func |= BLENDFUNC_MIN; break; + case GL_MAX_EXT: func |= BLENDFUNC_MAX; break; + case GL_FUNC_SUBTRACT_EXT: func |= BLENDFUNC_SUB; break; + case GL_FUNC_REVERSE_SUBTRACT_EXT: func |= BLENDFUNC_RVRSE_SUB; break; + default: return; + } + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE1] &= ~BLENDFUNC_MASK; + imesa->Setup[I830_CTXREG_STATE1] |= func; +} + +static void i830DDBlendConstColor(GLcontext *ctx, GLfloat red, + GLfloat green, GLfloat blue, + GLfloat alpha) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLubyte r, g, b, a; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLOAT_COLOR_TO_UBYTE_COLOR(r, red); + FLOAT_COLOR_TO_UBYTE_COLOR(g, green); + FLOAT_COLOR_TO_UBYTE_COLOR(b, blue); + FLOAT_COLOR_TO_UBYTE_COLOR(a, alpha); + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_BLENDCOLR] = ((a << 24) | + (r << 16) | + (g << 8) | + b); +} + +static void i830DDBlendFuncSeparate(GLcontext *ctx, GLenum sfactorRGB, + GLenum dfactorRGB, GLenum sfactorA, + GLenum dfactorA ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int funcA = (ENABLE_SRC_ABLEND_FACTOR|ENABLE_DST_ABLEND_FACTOR); + int funcRGB = (ENABLE_SRC_BLND_FACTOR|ENABLE_DST_BLND_FACTOR); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLUSH_BATCH(imesa); + + switch(sfactorA) { + case GL_ZERO: funcA |= SRC_ABLEND_FACT(BLENDFACT_ZERO); break; + case GL_SRC_ALPHA: funcA |= SRC_ABLEND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_ONE: funcA |= SRC_ABLEND_FACT(BLENDFACT_ONE); break; + case GL_DST_COLOR: funcA |= SRC_ABLEND_FACT(BLENDFACT_DST_COLR); break; + case GL_ONE_MINUS_DST_COLOR: + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_DST_COLR); break; + case GL_ONE_MINUS_SRC_ALPHA: + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_SRC_ALPHA); break; + case GL_DST_ALPHA: funcA |= SRC_ABLEND_FACT(BLENDFACT_DST_ALPHA); break; + case GL_ONE_MINUS_DST_ALPHA: + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_DST_ALPHA); break; + case GL_SRC_ALPHA_SATURATE: + funcA |= SRC_ABLEND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); + break; + case GL_CONSTANT_COLOR_EXT: + funcA |= SRC_ABLEND_FACT(BLENDFACT_CONST_COLOR); break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_CONST_COLOR); break; + case GL_CONSTANT_ALPHA_EXT: + funcA |= SRC_ABLEND_FACT(BLENDFACT_CONST_ALPHA); break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + funcA |= SRC_ABLEND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: return; + } + + switch(dfactorA) { + case GL_SRC_ALPHA: funcA |= DST_ABLEND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_ONE_MINUS_SRC_ALPHA: + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_SRC_ALPHA); break; + case GL_ZERO: funcA |= DST_ABLEND_FACT(BLENDFACT_ZERO); break; + case GL_ONE: funcA |= DST_ABLEND_FACT(BLENDFACT_ONE); break; + case GL_SRC_COLOR: funcA |= DST_ABLEND_FACT(BLENDFACT_SRC_COLR); break; + case GL_ONE_MINUS_SRC_COLOR: + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_SRC_COLR); break; + case GL_DST_ALPHA: funcA |= DST_ABLEND_FACT(BLENDFACT_DST_ALPHA); break; + case GL_ONE_MINUS_DST_ALPHA: + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_DST_ALPHA); break; + case GL_CONSTANT_COLOR_EXT: + funcA |= DST_ABLEND_FACT(BLENDFACT_CONST_COLOR); break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_CONST_COLOR); + break; + case GL_CONSTANT_ALPHA_EXT: + funcA |= DST_ABLEND_FACT(BLENDFACT_CONST_ALPHA); break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + funcA |= DST_ABLEND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: return; + } + + switch(sfactorRGB) { + case GL_ZERO: funcRGB |= SRC_BLND_FACT(BLENDFACT_ZERO); break; + case GL_SRC_ALPHA: funcRGB |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_ONE: funcRGB |= SRC_BLND_FACT(BLENDFACT_ONE); break; + case GL_DST_COLOR: funcRGB |= SRC_BLND_FACT(BLENDFACT_DST_COLR); break; + case GL_ONE_MINUS_DST_COLOR: + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_DST_COLR); break; + case GL_ONE_MINUS_SRC_ALPHA: + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; + case GL_DST_ALPHA: funcRGB |= SRC_BLND_FACT(BLENDFACT_DST_ALPHA); break; + case GL_ONE_MINUS_DST_ALPHA: + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; + case GL_SRC_ALPHA_SATURATE: + funcRGB |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); + break; + case GL_CONSTANT_COLOR_EXT: + funcRGB |= SRC_BLND_FACT(BLENDFACT_CONST_COLOR); break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; + case GL_CONSTANT_ALPHA_EXT: + funcRGB |= SRC_BLND_FACT(BLENDFACT_CONST_ALPHA); break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + funcRGB |= SRC_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: return; + } + + switch(dfactorRGB) { + case GL_SRC_ALPHA: funcRGB |= DST_BLND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_ONE_MINUS_SRC_ALPHA: + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; + case GL_ZERO: funcRGB |= DST_BLND_FACT(BLENDFACT_ZERO); break; + case GL_ONE: funcRGB |= DST_BLND_FACT(BLENDFACT_ONE); break; + case GL_SRC_COLOR: funcRGB |= DST_BLND_FACT(BLENDFACT_SRC_COLR); break; + case GL_ONE_MINUS_SRC_COLOR: + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_SRC_COLR); break; + case GL_DST_ALPHA: funcRGB |= DST_BLND_FACT(BLENDFACT_DST_ALPHA); break; + case GL_ONE_MINUS_DST_ALPHA: + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; + case GL_CONSTANT_COLOR_EXT: + funcRGB |= DST_BLND_FACT(BLENDFACT_CONST_COLOR); break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; + case GL_CONSTANT_ALPHA_EXT: + funcRGB |= DST_BLND_FACT(BLENDFACT_CONST_ALPHA); break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + funcRGB |= DST_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: return; + } + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_IALPHAB] &= ~SRC_DST_ABLEND_MASK; + imesa->Setup[I830_CTXREG_IALPHAB] |= funcA; + imesa->Setup[I830_CTXREG_STATE1] &= ~SRC_DST_BLND_MASK; + imesa->Setup[I830_CTXREG_STATE1] |= funcRGB; + /* Insure Independant Alpha Blend is really enabled if need be */ + i830EvalLogicOpBlendState(ctx); +} + +static void i830DDBlendFunc(GLcontext *ctx, GLenum sfactor, GLenum dfactor) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int func = (ENABLE_SRC_BLND_FACTOR|ENABLE_DST_BLND_FACTOR); + + FLUSH_BATCH(imesa); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s %s %s\n", __FUNCTION__, + gl_lookup_enum_by_nr(sfactor), + gl_lookup_enum_by_nr(dfactor)); + + switch(sfactor) { + case GL_ZERO: func |= SRC_BLND_FACT(BLENDFACT_ZERO); break; + case GL_SRC_ALPHA: func |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_ONE: func |= SRC_BLND_FACT(BLENDFACT_ONE); break; + case GL_DST_COLOR: func |= SRC_BLND_FACT(BLENDFACT_DST_COLR); break; + case GL_ONE_MINUS_DST_COLOR: + func |= SRC_BLND_FACT(BLENDFACT_INV_DST_COLR); break; + case GL_ONE_MINUS_SRC_ALPHA: + func |= SRC_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; + case GL_DST_ALPHA: func |= SRC_BLND_FACT(BLENDFACT_DST_ALPHA); break; + case GL_ONE_MINUS_DST_ALPHA: + func |= SRC_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; + case GL_SRC_ALPHA_SATURATE: + func |= SRC_BLND_FACT(BLENDFACT_SRC_ALPHA_SATURATE); + break; + case GL_CONSTANT_COLOR_EXT: + func |= SRC_BLND_FACT(BLENDFACT_CONST_COLOR); break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + func |= SRC_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; + case GL_CONSTANT_ALPHA_EXT: + func |= SRC_BLND_FACT(BLENDFACT_CONST_ALPHA); break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + func |= SRC_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: return; + } + + switch(dfactor) { + case GL_SRC_ALPHA: func |= DST_BLND_FACT(BLENDFACT_SRC_ALPHA); break; + case GL_ONE_MINUS_SRC_ALPHA: + func |= DST_BLND_FACT(BLENDFACT_INV_SRC_ALPHA); break; + case GL_ZERO: func |= DST_BLND_FACT(BLENDFACT_ZERO); break; + case GL_ONE: func |= DST_BLND_FACT(BLENDFACT_ONE); break; + case GL_SRC_COLOR: func |= DST_BLND_FACT(BLENDFACT_SRC_COLR); break; + case GL_ONE_MINUS_SRC_COLOR: + func |= DST_BLND_FACT(BLENDFACT_INV_SRC_COLR); break; + case GL_DST_ALPHA: func |= DST_BLND_FACT(BLENDFACT_DST_ALPHA); break; + case GL_ONE_MINUS_DST_ALPHA: + func |= DST_BLND_FACT(BLENDFACT_INV_DST_ALPHA); break; + case GL_CONSTANT_COLOR_EXT: + func |= DST_BLND_FACT(BLENDFACT_CONST_COLOR); break; + case GL_ONE_MINUS_CONSTANT_COLOR_EXT: + func |= DST_BLND_FACT(BLENDFACT_INV_CONST_COLOR); + break; + case GL_CONSTANT_ALPHA_EXT: + func |= DST_BLND_FACT(BLENDFACT_CONST_ALPHA); break; + case GL_ONE_MINUS_CONSTANT_ALPHA_EXT: + func |= DST_BLND_FACT(BLENDFACT_INV_CONST_ALPHA); + break; + default: return; + } + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_IALPHAB] &= ~SRC_DST_ABLEND_MASK; + imesa->Setup[I830_CTXREG_STATE1] &= ~SRC_DST_BLND_MASK; + imesa->Setup[I830_CTXREG_STATE1] |= func; + /* Insure Independant Alpha Blend is really disabled if need be */ + i830EvalLogicOpBlendState(ctx); + + if(0) fprintf(stderr, "STATE1 : 0x%x\n", imesa->Setup[I830_CTXREG_STATE1]); +} + +static void i830DDDepthFunc(GLcontext *ctx, GLenum func) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int test = 0; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLUSH_BATCH(imesa); + + switch(func) { + case GL_NEVER: + test = COMPAREFUNC_NEVER; + break; + case GL_LESS: + test = COMPAREFUNC_LESS; + break; + case GL_LEQUAL: + test = COMPAREFUNC_LEQUAL; + break; + case GL_GREATER: + test = COMPAREFUNC_GREATER; + break; + case GL_GEQUAL: + test = COMPAREFUNC_GEQUAL; + break; + case GL_NOTEQUAL: + test = COMPAREFUNC_NOTEQUAL; + break; + case GL_EQUAL: + test = COMPAREFUNC_EQUAL; + break; + case GL_ALWAYS: + test = COMPAREFUNC_ALWAYS; + break; + default: return; + } + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE3] &= ~DEPTH_TEST_FUNC_MASK; + imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_DEPTH_TEST_FUNC | + DEPTH_TEST_FUNC(test)); +} + +static void i830DDDepthMask(GLcontext *ctx, GLboolean flag) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s flag (%d)\n", __FUNCTION__, flag); + + FLUSH_BATCH(imesa); + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_2] &= ~ENABLE_DIS_DEPTH_WRITE_MASK; + + if (flag) + imesa->Setup[I830_CTXREG_ENABLES_2] |= ENABLE_DEPTH_WRITE; + else + imesa->Setup[I830_CTXREG_ENABLES_2] |= DISABLE_DEPTH_WRITE; +} + +/* ============================================================= + * Hardware clipping + */ + +static void i830DDScissor( GLcontext *ctx, GLint x, GLint y, + GLsizei w, GLsizei h ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int x1 = x; + int y1 = imesa->driDrawable->h - (y + h); + int x2 = x + w - 1; + int y2 = y1 + h - 1; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "[%s] x(%d) y(%d) w(%d) h(%d)\n", __FUNCTION__, + x, y, w, h); + + if(x1 < 0) x1 = 0; + if(y1 < 0) y1 = 0; + if(x2 < 0) x2 = 0; + if(y2 < 0) y2 = 0; + + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_BUFFERS; + imesa->BufferSetup[I830_DESTREG_SR1] = (y1 << 16) | (x1 & 0xffff); + imesa->BufferSetup[I830_DESTREG_SR2] = (y2 << 16) | (x2 & 0xffff); +} + +static void i830DDLogicOp( GLcontext *ctx, GLenum opcode ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int tmp = 0; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + + FLUSH_BATCH( imesa ); + + switch(opcode) { + case GL_CLEAR: tmp = LOGICOP_CLEAR; break; + case GL_AND: tmp = LOGICOP_AND; break; + case GL_AND_REVERSE: tmp = LOGICOP_AND_RVRSE; break; + case GL_COPY: tmp = LOGICOP_COPY; break; + case GL_COPY_INVERTED: tmp = LOGICOP_COPY_INV; break; + case GL_AND_INVERTED: tmp = LOGICOP_AND_INV; break; + case GL_NOOP: tmp = LOGICOP_NOOP; break; + case GL_XOR: tmp = LOGICOP_XOR; break; + case GL_OR: tmp = LOGICOP_OR; break; + case GL_OR_INVERTED: tmp = LOGICOP_OR_INV; break; + case GL_NOR: tmp = LOGICOP_NOR; break; + case GL_EQUIV: tmp = LOGICOP_EQUIV; break; + case GL_INVERT: tmp = LOGICOP_INV; break; + case GL_OR_REVERSE: tmp = LOGICOP_OR_RVRSE; break; + case GL_NAND: tmp = LOGICOP_NAND; break; + case GL_SET: tmp = LOGICOP_SET; break; + default: return; + } + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE4] &= ~LOGICOP_MASK; + imesa->Setup[I830_CTXREG_STATE4] |= LOGIC_OP_FUNC(tmp); + if(0) fprintf(stderr, "Logicop : 0x%x, state4 : 0x%x\n", tmp, imesa->Setup[I830_CTXREG_STATE4]); + /* Insure all the enables are correct */ + i830EvalLogicOpBlendState(ctx); +} + +static GLboolean i830DDSetDrawBuffer(GLcontext *ctx, GLenum mode ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLUSH_BATCH(imesa); + + imesa->Fallback &= ~I830_FALLBACK_DRAW_BUFFER; + + if(mode == GL_FRONT_LEFT) { + imesa->readMap = (char *)imesa->driScreen->pFB; + imesa->drawMap = (char *)imesa->driScreen->pFB; + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = + imesa->i830Screen->fbOffset; + imesa->dirty |= I830_UPLOAD_BUFFERS; + i830XMesaSetFrontClipRects( imesa ); + return GL_TRUE; + } else if(mode == GL_BACK_LEFT) { + imesa->readMap = imesa->i830Screen->back.map; + imesa->drawMap = (char *)imesa->i830Screen->back.map; + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = + imesa->i830Screen->backOffset; + imesa->dirty |= I830_UPLOAD_BUFFERS; + i830XMesaSetBackClipRects( imesa ); + return GL_TRUE; + } + + imesa->Fallback |= I830_FALLBACK_DRAW_BUFFER; + return GL_FALSE; +} + +static void i830DDSetReadBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, + GLenum mode ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if(mode == GL_FRONT_LEFT) { + imesa->readMap = (char *)imesa->driScreen->pFB; + imesa->Fallback &= ~I830_FALLBACK_READ_BUFFER; + } else if(mode == GL_BACK_LEFT) { + imesa->readMap = imesa->i830Screen->back.map; + imesa->Fallback &= ~I830_FALLBACK_READ_BUFFER; + } else { + imesa->Fallback |= I830_FALLBACK_READ_BUFFER; + } +} + +static void i830DDSetColor(GLcontext *ctx, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, + r, g, b, a); + + imesa->MonoColor = i830PackColor( imesa->i830Screen->fbFormat, r, g, b, a ); + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "[%s] MonoColor = 0x%08x\n", __FUNCTION__, + imesa->MonoColor); +} + + +static void i830DDClearColor(GLcontext *ctx, + GLubyte r, GLubyte g, + GLubyte b, GLubyte a ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, + r, g, b, a); + + imesa->clear_red = r; + imesa->clear_green = g; + imesa->clear_blue = b; + imesa->clear_alpha = a; + + imesa->ClearColor = i830PackColor( imesa->i830Screen->fbFormat, r, g, b, a ); + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "[%s] ClearColor = 0x%08x\n", __FUNCTION__, + imesa->ClearColor); + +} + +static void i830DDCullFaceFrontFace(GLcontext *ctx, GLenum unused) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint mode = CULLMODE_BOTH; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLUSH_BATCH(imesa); + + if(ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) { + mode = CULLMODE_CW; + + if (ctx->Polygon.CullFaceMode == GL_FRONT) + mode ^= (CULLMODE_CW ^ CULLMODE_CCW); + if (ctx->Polygon.FrontFace != GL_CCW) + mode ^= (CULLMODE_CW ^ CULLMODE_CCW); + } + + imesa->LcsCullMode = mode; + + if(ctx->Polygon.CullFlag && ctx->PB->primitive == GL_POLYGON) { + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE3] &= ~CULLMODE_MASK; + imesa->Setup[I830_CTXREG_STATE3] |= ENABLE_CULL_MODE | mode; + } +} + +static void i830DDReducedPrimitiveChange( GLcontext *ctx, GLenum prim ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s %s\n", __FUNCTION__, gl_lookup_enum_by_nr(prim)); + + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE3] &= ~CULLMODE_MASK; + imesa->Setup[I830_CTXREG_AA] &= ~AA_LINE_ENABLE; + imesa->vertex_prim = PRIM3D_TRILIST; + + switch(ctx->PB->primitive) { + case GL_POLYGON: + if (ctx->Polygon.CullFlag) + imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | + imesa->LcsCullMode); + else + imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | + CULLMODE_NONE); + break; + + case GL_LINE: + case GL_LINES: + imesa->vertex_prim = PRIM3D_LINELIST; + + if(ctx->Line.SmoothFlag) + imesa->Setup[I830_CTXREG_AA] |= AA_LINE_ENABLE; + imesa->Setup[I830_CTXREG_STATE3] |= CULLMODE_NONE; + break; + + case GL_POINT: + case GL_POINTS: + imesa->vertex_prim = PRIM3D_POINTLIST; + imesa->Setup[I830_CTXREG_STATE3] |= CULLMODE_NONE; + default: + imesa->Setup[I830_CTXREG_STATE3] |= CULLMODE_NONE; + break; + } + + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "[%s] AA(0x%08x) STATE3(0x%08x) vertex_prim 0x%x\n", + __FUNCTION__, + imesa->Setup[I830_CTXREG_AA], + imesa->Setup[I830_CTXREG_STATE3], + imesa->vertex_prim); + +} + +static void i830DDLineWidth( GLcontext *ctx, GLfloat widthf ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + int width; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + width = FloatToInt(widthf * 2); + CLAMP_SELF(width, 1, 15); + imesa->Setup[I830_CTXREG_STATE5] &= ~FIXED_LINE_WIDTH_MASK; + imesa->Setup[I830_CTXREG_STATE5] |= (ENABLE_FIXED_LINE_WIDTH | + FIXED_LINE_WIDTH(width)); + + imesa->dirty |= I830_UPLOAD_CTX; +} + +/* ============================================================= + * Color masks + */ + +/* This only deals with ColorMask for rendering, clears need to update + * a planemask for the clearing blit. This is to be done. + */ + +static GLboolean i830DDColorMask(GLcontext *ctx, + GLboolean r, GLboolean g, + GLboolean b, GLboolean a ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + GLuint tmp = 0; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s r(%d) g(%d) b(%d) a(%d)\n", __FUNCTION__, r, g, b, a); + + imesa->mask_red = !r; + imesa->mask_green = !g; + imesa->mask_blue = !b; + imesa->mask_alpha = !a; + + tmp = (imesa->Setup[I830_CTXREG_ENABLES_2] & ~WRITEMASK_MASK) | + ENABLE_COLOR_MASK | + ENABLE_COLOR_WRITE | + ((!r) << WRITEMASK_RED_SHIFT) | + ((!g) << WRITEMASK_GREEN_SHIFT) | + ((!b) << WRITEMASK_BLUE_SHIFT) | + ((!a) << WRITEMASK_ALPHA_SHIFT); + + if(tmp != imesa->Setup[I830_CTXREG_ENABLES_2]) { + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_2] = tmp; + + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "[%s] enables 2 = 0x%08x\n", __FUNCTION__, tmp); + } + + /* Always return false so s/w fallbacks are correct */ + return GL_FALSE; +} + +static void i830DDLightModelfv(GLcontext *ctx, GLenum pname, + const GLfloat *param) +{ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if(pname == GL_LIGHT_MODEL_COLOR_CONTROL) { + i830ContextPtr imesa = I830_CONTEXT( ctx ); + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; + + if(ctx->Texture.ReallyEnabled && + ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD; + else + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD; + + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "[%s] Enables_1 = 0x%08x\n", __FUNCTION__, + imesa->Setup[I830_CTXREG_ENABLES_1]); + + } +} + +/* ============================================================= + * Fog + */ +static void i830DDFogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if(pname == GL_FOG_COLOR) { + GLuint color = (((GLubyte)(ctx->Fog.Color[0]*255.0F) << 16) | + ((GLubyte)(ctx->Fog.Color[1]*255.0F) << 8) | + ((GLubyte)(ctx->Fog.Color[2]*255.0F) << 0)); + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_FOGCOLOR] = (STATE3D_FOG_COLOR_CMD | color); + + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "[%s] FogColor = 0x%08x\n", __FUNCTION__, + imesa->Setup[I830_CTXREG_FOGCOLOR]); + + } +} + + +/* ============================================================= + */ + +static void i830DDEnable(GLcontext *ctx, GLenum cap, GLboolean state) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s cap(%s) state(%d)\n", __FUNCTION__, + gl_lookup_enum_by_nr(cap), state); + + switch(cap) { + case GL_LIGHTING: + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; + + if (ctx->Texture.ReallyEnabled && + ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD; + else + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD; + + break; + case GL_ALPHA_TEST: + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_ALPHA_TEST_MASK; + if(state) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_ALPHA_TEST; + else + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_ALPHA_TEST; + break; + + case GL_BLEND: + case GL_COLOR_LOGIC_OP: + case GL_INDEX_LOGIC_OP: + i830EvalLogicOpBlendState(ctx); + break; + case GL_DITHER: + { + unsigned int temp; + + FLUSH_BATCH(imesa); + temp = imesa->Setup[I830_CTXREG_ENABLES_2]; + + temp &= ~ENABLE_DITHER; + + if(state) temp |= ENABLE_DITHER; + else temp |= DISABLE_DITHER; + + if(temp != imesa->Setup[I830_CTXREG_ENABLES_2]) { + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_2] = temp; + } + } + break; + + case GL_DEPTH_TEST: + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_DEPTH_TEST_MASK; + + if(state) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_DEPTH_TEST; + else + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_DEPTH_TEST; + break; + + case GL_SCISSOR_TEST: + FLUSH_BATCH(imesa); + + if(state) + imesa->BufferSetup[I830_DESTREG_SENABLE] = (STATE3D_SCISSOR_ENABLE_CMD | + ENABLE_SCISSOR_RECT); + else + imesa->BufferSetup[I830_DESTREG_SENABLE] = (STATE3D_SCISSOR_ENABLE_CMD | + DISABLE_SCISSOR_RECT); + imesa->dirty |= I830_UPLOAD_BUFFERS; + break; + + case GL_POLYGON_STIPPLE: + if(ctx->PB->primitive == GL_POLYGON) { + FLUSH_BATCH(imesa); + /* Need a fallback here */ + } + break; + + case GL_LINE_SMOOTH: + if (ctx->PB->primitive == GL_LINE) { + FLUSH_BATCH(imesa); + if(0) fprintf(stderr, "Line smooth hit\n"); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_AA] &= ~AA_LINE_ENABLE; + /* imesa->Setup[I830_CTXREG_LCS] &= ~LCS_LINEWIDTH_0_5; */ + if (state) { + imesa->Setup[I830_CTXREG_AA] |= AA_LINE_ENABLE; + /* imesa->Setup[I830_CTXREG_LCS] |= LCS_LINEWIDTH_0_5; */ + } else { + imesa->Setup[I830_CTXREG_AA] |= AA_LINE_DISABLE; + /* imesa->Setup[I830_CTXREG_LCS] |= LCS_LINEWIDTH_0_5; */ + } + } + break; + + case GL_POINT_SMOOTH: + if (ctx->PB->primitive == GL_POINT) { + FLUSH_BATCH(imesa); + if(0) fprintf(stderr, "Point smooth hit\n"); + } + break; + + case GL_POLYGON_SMOOTH: + if (ctx->PB->primitive == GL_POLYGON) { + FLUSH_BATCH(imesa); + if(0) fprintf(stderr, "Polygon Smooth hit\n"); + } + break; + + case GL_FOG: + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_DIS_FOG_MASK; + if(state) + imesa->Setup[I830_CTXREG_ENABLES_1] |= I830_ENABLE_FOG; + else + imesa->Setup[I830_CTXREG_ENABLES_1] |= I830_DISABLE_FOG; + break; + + case GL_CULL_FACE: + if (ctx->PB->primitive == GL_POLYGON) { + FLUSH_BATCH(imesa); + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_STATE3] &= ~CULLMODE_MASK; + if (state) + imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | + imesa->LcsCullMode); + else + imesa->Setup[I830_CTXREG_STATE3] |= (ENABLE_CULL_MODE | + CULLMODE_NONE); + } + break; + case GL_TEXTURE_1D: + case GL_TEXTURE_3D: + FLUSH_BATCH(imesa); + imesa->new_state |= I830_NEW_TEXTURE; + break; + case GL_TEXTURE_2D: + FLUSH_BATCH(imesa); + imesa->new_state |= I830_NEW_TEXTURE; + + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK; + + if (ctx->Texture.ReallyEnabled && + ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD; + else + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD; + break; + + case GL_STENCIL_TEST: + FLUSH_BATCH(imesa); + if(imesa->hw_stencil) { + imesa->dirty |= I830_UPLOAD_CTX; + imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_STENCIL_TEST; + + if(state) { + if(0) fprintf(stderr, "Enabling stencil test\n"); + imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_STENCIL_TEST; + } else { + if(0) fprintf(stderr, "Disabling stencil test\n"); + imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_STENCIL_TEST; + } + + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "%s : state4 : 0x%x, stentst : 0x%x," + " enables_1 : 0x%x\n", __FUNCTION__, + imesa->Setup[I830_CTXREG_STATE4], + imesa->Setup[I830_CTXREG_STENCILTST], + imesa->Setup[I830_CTXREG_ENABLES_1]); + + } else if (state) { + imesa->Fallback |= I830_FALLBACK_STENCIL; + } else { + imesa->Fallback &= ~I830_FALLBACK_STENCIL; + } + + default: + ; + } +} + + + +/* ============================================================= + */ + + +void i830DDUpdateHwState( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if(imesa->new_state & I830_NEW_TEXTURE) { + FLUSH_BATCH(imesa); + i830UpdateTextureState( ctx ); + } + + imesa->new_state = 0; +} + + +void i830EmitDrawingRectangle( i830ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + i830ScreenPrivate *i830Screen = imesa->i830Screen; + int x0 = imesa->drawX; + int y0 = imesa->drawY; + int x1 = x0 + dPriv->w; + int y1 = y0 + dPriv->h; + + /* Don't set drawing rectangle */ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s x0(%d) x1(%d) y0(%d) y1(%d)\n", __FUNCTION__, + x0, x1, y0, y1); + + /* Coordinate origin of the window - may be offscreen. + */ + imesa->BufferSetup[I830_DESTREG_DR4] = ((y0<<16) | + (((unsigned)x0)&0xFFFF)); + + /* Clip to screen. + */ + if (x0 < 0) x0 = 0; + if (y0 < 0) y0 = 0; + if (x1 > i830Screen->width-1) x1 = i830Screen->width-1; + if (y1 > i830Screen->height-1) y1 = i830Screen->height-1; + + + /* Onscreen drawing rectangle. + */ + imesa->BufferSetup[I830_DESTREG_DR2] = ((y0<<16) | x0); + imesa->BufferSetup[I830_DESTREG_DR3] = (((y1+1)<<16) | (x1+1)); + imesa->dirty |= I830_UPLOAD_BUFFERS; + + if(I830_DEBUG&DEBUG_VERBOSE_STATE) + fprintf(stderr, "[%s] DR2(0x%08x) DR3(0x%08x) DR4(0x%08x)\n", + __FUNCTION__, + imesa->BufferSetup[I830_DESTREG_DR2], + imesa->BufferSetup[I830_DESTREG_DR3], + imesa->BufferSetup[I830_DESTREG_DR4]); +} + + + +static void i830DDPrintDirty( const char *msg, GLuint state ) +{ + fprintf(stderr, "%s (0x%x): %s%s%s%s%s\n", + msg, + (unsigned int) state, + (state & I830_UPLOAD_TEX0_IMAGE) ? "upload-tex0, " : "", + (state & I830_UPLOAD_TEX1_IMAGE) ? "upload-tex1, " : "", + (state & I830_UPLOAD_CTX) ? "upload-ctx, " : "", + (state & I830_UPLOAD_BUFFERS) ? "upload-bufs, " : "", + (state & I830_UPLOAD_CLIPRECTS) ? "upload-cliprects, " : "" + ); +} + + +/* Push the state into the sarea and/or texture memory. + */ +void i830EmitHwStateLocked( i830ContextPtr imesa ) +{ + int i; + if (I830_DEBUG & DEBUG_VERBOSE_API) + i830DDPrintDirty( "\n\n\ni830EmitHwStateLocked", imesa->dirty ); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (imesa->dirty & ~I830_UPLOAD_CLIPRECTS) { + if ((imesa->dirty & I830_UPLOAD_TEX0_IMAGE) && imesa->CurrentTexObj[0]) + i830UploadTexImages(imesa, imesa->CurrentTexObj[0]); + + if ((imesa->dirty & I830_UPLOAD_TEX1_IMAGE) && imesa->CurrentTexObj[1]) + i830UploadTexImages(imesa, imesa->CurrentTexObj[1]); + + if (imesa->dirty & I830_UPLOAD_CTX) + memcpy( imesa->sarea->ContextState, + imesa->Setup, + sizeof(imesa->Setup) ); + + for(i = 0; i < I830_TEXTURE_COUNT; i++) { + if ((imesa->dirty & I830_UPLOAD_TEX_N(i)) && imesa->CurrentTexObj[i]) { + imesa->sarea->dirty |= I830_UPLOAD_TEX_N(i); + memcpy(imesa->sarea->TexState[i], + imesa->CurrentTexObj[i]->Setup, + sizeof(imesa->sarea->TexState[i])); + } + } + + /* Need to figure out if texturing state, or enable changed. */ + + for(i = 0; i < I830_TEXBLEND_COUNT; i++) { + if (imesa->dirty & I830_UPLOAD_TEXBLEND_N(i)) { + imesa->sarea->dirty |= I830_UPLOAD_TEXBLEND_N(i); + memcpy(imesa->sarea->TexBlendState[i], + imesa->TexBlend[i], + imesa->TexBlendWordsUsed[i] * 4); + imesa->sarea->TexBlendStateWordsUsed[i] = + imesa->TexBlendWordsUsed[i]; + } + } + + if (imesa->dirty & I830_UPLOAD_BUFFERS) + memcpy( imesa->sarea->BufferState, + imesa->BufferSetup, + sizeof(imesa->BufferSetup) ); + + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_SHARED) { + memcpy( imesa->sarea->Palette[0], + imesa->palette, + sizeof(imesa->sarea->Palette[0])); + } else { + i830TextureObjectPtr p; + + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(0)) { + p = imesa->CurrentTexObj[0]; + memcpy( imesa->sarea->Palette[0], + p->palette, + sizeof(imesa->sarea->Palette[0])); + } + if (imesa->dirty & I830_UPLOAD_TEX_PALETTE_N(1)) { + p = imesa->CurrentTexObj[1]; + memcpy( imesa->sarea->Palette[1], + p->palette, + sizeof(imesa->sarea->Palette[1])); + } + } + + imesa->sarea->dirty |= (imesa->dirty & + ~(I830_UPLOAD_TEX_MASK | + I830_UPLOAD_TEXBLEND_MASK)); + imesa->dirty &= I830_UPLOAD_CLIPRECTS; + } +} + +void i830DDInitState( i830ContextPtr imesa ) +{ + i830ScreenPrivate *i830Screen = imesa->i830Screen; + int i, j; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + imesa->clear_red = 0; + imesa->clear_green = 0; + imesa->clear_blue = 0; + imesa->clear_alpha = 0; + + imesa->mask_red = GL_FALSE; + imesa->mask_green = GL_FALSE; + imesa->mask_blue = GL_FALSE; + imesa->mask_alpha = GL_FALSE; + + /* Zero all texture state */ + for(i = 0; i < I830_TEXBLEND_COUNT; i++) { + for(j = 0; j < I830_TEXBLEND_SIZE; j++) { + imesa->TexBlend[i][j] = 0; + imesa->Init_TexBlend[i][j] = 0; + } + imesa->TexBlendWordsUsed[i] = 0; + imesa->Init_TexBlendWordsUsed[i] = 0; + imesa->TexBlendColorPipeNum[i] = 0; + imesa->Init_TexBlendColorPipeNum[i] = 0; + } + + /* Set default blend state */ + imesa->TexBlend[0][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXOP_LAST_STAGE | + TEXBLENDOP_ARG1); + imesa->TexBlend[0][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[0][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_DIFFUSE); + imesa->TexBlend[0][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_DIFFUSE); + + imesa->TexBlendWordsUsed[0] = 4; + imesa->TexBlendColorPipeNum[0] = 0; + + imesa->Init_TexBlend[0][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXOP_LAST_STAGE | + TEXBLENDOP_ARG1); + imesa->Init_TexBlend[0][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->Init_TexBlend[0][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->Init_TexBlend[0][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->Init_TexBlendWordsUsed[0] = 4; + imesa->Init_TexBlendColorPipeNum[0] = 0; + + memset(imesa->Setup, 0, sizeof(imesa->Setup)); + + imesa->Setup[I830_CTXREG_VF] = VRTX_FORMAT_NTEX(1); + + imesa->Setup[I830_CTXREG_VF2] = (STATE3D_VERTEX_FORMAT_2_CMD | + VRTX_TEX_SET_0_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_1_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_2_FMT(TEXCOORDFMT_2D) | + VRTX_TEX_SET_3_FMT(TEXCOORDFMT_2D)); + + imesa->Setup[I830_CTXREG_AA] = (STATE3D_AA_CMD | + AA_LINE_ECAAR_WIDTH_ENABLE | + AA_LINE_ECAAR_WIDTH_1_0 | + AA_LINE_REGION_WIDTH_ENABLE | + AA_LINE_REGION_WIDTH_1_0 | + AA_LINE_DISABLE); + + imesa->Setup[I830_CTXREG_ENABLES_1] = (STATE3D_ENABLES_1_CMD | + DISABLE_LOGIC_OP | + DISABLE_STENCIL_TEST | + DISABLE_DEPTH_BIAS | + DISABLE_SPEC_ADD | + I830_DISABLE_FOG | + DISABLE_ALPHA_TEST | + DISABLE_COLOR_BLEND | + DISABLE_DEPTH_TEST); + + if(imesa->hw_stencil) { + imesa->Setup[I830_CTXREG_ENABLES_2] = (STATE3D_ENABLES_2_CMD | + ENABLE_STENCIL_WRITE | + ENABLE_TEX_CACHE | + ENABLE_DITHER | + ENABLE_COLOR_MASK | + /* set no color comps disabled */ + ENABLE_COLOR_WRITE | + ENABLE_DEPTH_WRITE); + } else { + imesa->Setup[I830_CTXREG_ENABLES_2] = (STATE3D_ENABLES_2_CMD | + DISABLE_STENCIL_WRITE | + ENABLE_TEX_CACHE | + ENABLE_DITHER | + ENABLE_COLOR_MASK | + /* set no color comps disabled */ + ENABLE_COLOR_WRITE | + ENABLE_DEPTH_WRITE); + } + + imesa->Setup[I830_CTXREG_STATE1] = (STATE3D_MODES_1_CMD | + ENABLE_COLR_BLND_FUNC | + BLENDFUNC_ADD | + ENABLE_SRC_BLND_FACTOR | + SRC_BLND_FACT(BLENDFACT_ONE) | + ENABLE_DST_BLND_FACTOR | + DST_BLND_FACT(BLENDFACT_ZERO) ); + + imesa->Setup[I830_CTXREG_STATE2] = (STATE3D_MODES_2_CMD | + ENABLE_GLOBAL_DEPTH_BIAS | + GLOBAL_DEPTH_BIAS(0) | + ENABLE_ALPHA_TEST_FUNC | + ALPHA_TEST_FUNC(COMPAREFUNC_ALWAYS) | + ALPHA_REF_VALUE(0) ); + + imesa->Setup[I830_CTXREG_STATE3] = (STATE3D_MODES_3_CMD | + ENABLE_DEPTH_TEST_FUNC | + DEPTH_TEST_FUNC(COMPAREFUNC_LESS) | + ENABLE_ALPHA_SHADE_MODE | + ALPHA_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_FOG_SHADE_MODE | + FOG_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_SPEC_SHADE_MODE | + SPEC_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_COLOR_SHADE_MODE | + COLOR_SHADE_MODE(SHADE_MODE_LINEAR) | + ENABLE_CULL_MODE | + CULLMODE_NONE); + + imesa->Setup[I830_CTXREG_STATE4] = (STATE3D_MODES_4_CMD | + ENABLE_LOGIC_OP_FUNC | + LOGIC_OP_FUNC(LOGICOP_COPY) | + ENABLE_STENCIL_TEST_MASK | + STENCIL_TEST_MASK(0xff) | + ENABLE_STENCIL_WRITE_MASK | + STENCIL_WRITE_MASK(0xff)); + + imesa->Setup[I830_CTXREG_STENCILTST] = (STATE3D_STENCIL_TEST_CMD | + ENABLE_STENCIL_PARMS | + STENCIL_FAIL_OP(STENCILOP_KEEP) | + STENCIL_PASS_DEPTH_FAIL_OP(STENCILOP_KEEP) | + STENCIL_PASS_DEPTH_PASS_OP(STENCILOP_KEEP) | + ENABLE_STENCIL_TEST_FUNC | + STENCIL_TEST_FUNC(COMPAREFUNC_ALWAYS) | + ENABLE_STENCIL_REF_VALUE | + STENCIL_REF_VALUE(0) ); + + imesa->Setup[I830_CTXREG_STATE5] = (STATE3D_MODES_5_CMD | + FLUSH_TEXTURE_CACHE | + ENABLE_SPRITE_POINT_TEX | + SPRITE_POINT_TEX_OFF | + ENABLE_FIXED_LINE_WIDTH | + FIXED_LINE_WIDTH(0x2) | /* 1.0 */ + ENABLE_FIXED_POINT_WIDTH | + FIXED_POINT_WIDTH(1) ); + + imesa->Setup[I830_CTXREG_IALPHAB] = (STATE3D_INDPT_ALPHA_BLEND_CMD | + DISABLE_INDPT_ALPHA_BLEND | + ENABLE_ALPHA_BLENDFUNC | + ABLENDFUNC_ADD); + + imesa->Setup[I830_CTXREG_FOGCOLOR] = (STATE3D_FOG_COLOR_CMD | + FOG_COLOR_RED(0) | + FOG_COLOR_GREEN(0) | + FOG_COLOR_BLUE(0)); + + imesa->Setup[I830_CTXREG_BLENDCOLR0] = (STATE3D_CONST_BLEND_COLOR_CMD); + + imesa->Setup[I830_CTXREG_BLENDCOLR] = 0; + + imesa->Setup[I830_CTXREG_MCSB0] = STATE3D_MAP_COORD_SETBIND_CMD; + imesa->Setup[I830_CTXREG_MCSB1] = (TEXBIND_SET3(TEXCOORDSRC_VTXSET_3) | + TEXBIND_SET2(TEXCOORDSRC_VTXSET_2) | + TEXBIND_SET1(TEXCOORDSRC_VTXSET_1) | + TEXBIND_SET0(TEXCOORDSRC_VTXSET_0)); + + imesa->LcsCullMode = CULLMODE_CW; /* GL default */ + + memset(imesa->BufferSetup, 0, sizeof(imesa->BufferSetup)); + + + if (imesa->glCtx->Color.DriverDrawBuffer == GL_BACK_LEFT) { + imesa->drawMap = i830Screen->back.map; + imesa->readMap = i830Screen->back.map; + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = i830Screen->backOffset; + imesa->BufferSetup[I830_DESTREG_DBUFADDR] = 0; + } else { + imesa->drawMap = (char *)imesa->driScreen->pFB; + imesa->readMap = (char *)imesa->driScreen->pFB; + imesa->BufferSetup[I830_DESTREG_CBUFADDR] = i830Screen->fbOffset; + imesa->BufferSetup[I830_DESTREG_DBUFADDR] = 0; + } + + imesa->BufferSetup[I830_DESTREG_DV0] = STATE3D_DST_BUF_VARS_CMD; + + switch (i830Screen->fbFormat) { + case DV_PF_555: + case DV_PF_565: + imesa->BufferSetup[I830_DESTREG_DV1] = (DSTORG_HORT_BIAS(0x8) | /* .5 */ + DSTORG_VERT_BIAS(0x8) | /* .5 */ + i830Screen->fbFormat | + DEPTH_IS_Z | + DEPTH_FRMT_16_FIXED); + break; + case DV_PF_8888: + imesa->BufferSetup[I830_DESTREG_DV1] = (DSTORG_HORT_BIAS(0x8) | /* .5 */ + DSTORG_VERT_BIAS(0x8) | /* .5 */ + i830Screen->fbFormat | + DEPTH_IS_Z | + DEPTH_FRMT_24_FIXED_8_OTHER); + break; + } + imesa->BufferSetup[I830_DESTREG_SENABLE] = (STATE3D_SCISSOR_ENABLE_CMD | + DISABLE_SCISSOR_RECT); + imesa->BufferSetup[I830_DESTREG_SR0] = STATE3D_SCISSOR_RECT_0_CMD; + imesa->BufferSetup[I830_DESTREG_SR1] = 0; + imesa->BufferSetup[I830_DESTREG_SR2] = 0; + + imesa->BufferSetup[I830_DESTREG_DR0] = STATE3D_DRAW_RECT_CMD; + imesa->BufferSetup[I830_DESTREG_DR1] = 0; + imesa->BufferSetup[I830_DESTREG_DR2] = 0; + imesa->BufferSetup[I830_DESTREG_DR3] = (((i830Screen->height)<<16) | + (i830Screen->width)); + imesa->BufferSetup[I830_DESTREG_DR4] = 0; + + memcpy( imesa->Init_Setup, + imesa->Setup, + sizeof(imesa->Setup) ); + memcpy( imesa->Init_BufferSetup, + imesa->BufferSetup, + sizeof(imesa->BufferSetup) ); + +} + +#define INTERESTED (~(NEW_MODELVIEW|NEW_PROJECTION|\ + NEW_TEXTURE_MATRIX|\ + NEW_USER_CLIP|NEW_CLIENT_STATE)) + +void i830DDUpdateState( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* Have to do this here to detect texture fallbacks in time */ + if (imesa->new_state & I830_NEW_TEXTURE) + i830DDUpdateHwState( ctx ); + + + if (ctx->NewState & INTERESTED) { + i830DDChooseRenderState(ctx); + i830ChooseRasterSetupFunc(ctx); + } + + if (0) + fprintf(stderr, "IndirectTriangles %x Fallback %x\n", + imesa->IndirectTriangles, imesa->Fallback); + + if (!imesa->Fallback) { + ctx->IndirectTriangles &= ~DD_SW_RASTERIZE; + ctx->IndirectTriangles |= imesa->IndirectTriangles; + + ctx->Driver.PointsFunc=imesa->PointsFunc; + ctx->Driver.LineFunc=imesa->LineFunc; + ctx->Driver.TriangleFunc=imesa->TriangleFunc; + ctx->Driver.QuadFunc=imesa->QuadFunc; + } +} + + +void i830DDInitStateFuncs(GLcontext *ctx) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + ctx->Driver.UpdateState = i830DDUpdateState; + ctx->Driver.Enable = i830DDEnable; + ctx->Driver.AlphaFunc = i830DDAlphaFunc; + ctx->Driver.BlendEquation = i830DDBlendEquation; + ctx->Driver.BlendFunc = i830DDBlendFunc; + ctx->Driver.BlendFuncSeparate = i830DDBlendFuncSeparate; + ctx->Driver.BlendConstColor = i830DDBlendConstColor; + ctx->Driver.DepthFunc = i830DDDepthFunc; + ctx->Driver.DepthMask = i830DDDepthMask; + ctx->Driver.Fogfv = i830DDFogfv; + ctx->Driver.Scissor = i830DDScissor; + ctx->Driver.CullFace = i830DDCullFaceFrontFace; + ctx->Driver.FrontFace = i830DDCullFaceFrontFace; + ctx->Driver.ColorMask = i830DDColorMask; + ctx->Driver.ReducedPrimitiveChange = i830DDReducedPrimitiveChange; + ctx->Driver.RenderStart = i830DDUpdateHwState; + ctx->Driver.RenderFinish = 0; + + ctx->Driver.LineStipple = 0; + ctx->Driver.LineWidth = i830DDLineWidth; + ctx->Driver.LogicOpcode = i830DDLogicOp; + ctx->Driver.SetReadBuffer = i830DDSetReadBuffer; + ctx->Driver.SetDrawBuffer = i830DDSetDrawBuffer; + ctx->Driver.Color = i830DDSetColor; + ctx->Driver.ClearColor = i830DDClearColor; + ctx->Driver.Dither = NULL; + ctx->Driver.Index = 0; + ctx->Driver.ClearIndex = 0; + ctx->Driver.IndexMask = 0; + + if(imesa->hw_stencil) { + ctx->Driver.StencilFunc = i830DDStencilFunc; + ctx->Driver.StencilMask = i830DDStencilMask; + ctx->Driver.StencilOp = i830DDStencilOp; + } + + ctx->Driver.LightModelfv = i830DDLightModelfv; + ctx->Driver.PointSize = i830DDPointSize; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_tex.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_tex.c:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_tex.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,2258 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tex.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include +#include + +#include + +#include "types.h" +#include "enums.h" +#include "pb.h" +#include "dd.h" + +#include "mm.h" +#include "enums.h" + +#include "i830_drv.h" +#include "i830_ioctl.h" +#include "simple_list.h" +#include "texutil.h" + +static void i830SetTexWrapping(i830TextureObjectPtr tex, + GLenum swrap, GLenum twrap) +{ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + tex->Setup[I830_TEXREG_MCS] &= ~(TEXCOORD_ADDR_U_MASK|TEXCOORD_ADDR_V_MASK); + + switch( swrap ) { + case GL_REPEAT: + tex->Setup[I830_TEXREG_MCS] |= TEXCOORD_ADDR_U_MODE(TEXCOORDMODE_WRAP); + break; + case GL_CLAMP: + tex->Setup[I830_TEXREG_MCS] |= TEXCOORD_ADDR_U_MODE(TEXCOORDMODE_CLAMP); + break; + case GL_CLAMP_TO_EDGE: + tex->Setup[I830_TEXREG_MCS] |= + TEXCOORD_ADDR_U_MODE(TEXCOORDMODE_CLAMP_BORDER); + break; + } + switch( twrap ) { + case GL_REPEAT: + tex->Setup[I830_TEXREG_MCS] |= TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_WRAP); + break; + case GL_CLAMP: + tex->Setup[I830_TEXREG_MCS] |= TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_CLAMP); + break; + case GL_CLAMP_TO_EDGE: + tex->Setup[I830_TEXREG_MCS] |= + TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_CLAMP_BORDER); + break; + } + +} + +static void i830SetTexFilter(i830ContextPtr imesa, + i830TextureObjectPtr t, + GLenum minf, GLenum magf) +{ + GLuint LastLevel; + int minFilt = 0, mipFilt = 0, magFilt = 0; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + switch (minf) { + case GL_NEAREST: + minFilt = FILTER_NEAREST; + mipFilt = MIPFILTER_NONE; + break; + case GL_LINEAR: + minFilt = FILTER_LINEAR; + mipFilt = MIPFILTER_NONE; + break; + case GL_NEAREST_MIPMAP_NEAREST: + minFilt = FILTER_NEAREST; + mipFilt = MIPFILTER_NEAREST; + break; + case GL_LINEAR_MIPMAP_NEAREST: + minFilt = FILTER_LINEAR; + mipFilt = MIPFILTER_NEAREST; + break; + case GL_NEAREST_MIPMAP_LINEAR: + minFilt = FILTER_NEAREST; + mipFilt = MIPFILTER_LINEAR; + break; + case GL_LINEAR_MIPMAP_LINEAR: + minFilt = FILTER_LINEAR; + mipFilt = MIPFILTER_LINEAR; + break; + default: + fprintf(stderr, "i830SetTexFilter(): not supported min. filter %d\n", + (int)minf); + break; + } + + I830_SET_FIELD(t->Setup[I830_TEXREG_MF], + MIN_FILTER_MASK | MIP_FILTER_MASK, + MIN_FILTER(minFilt) | mipFilt); + + switch (magf) { + case GL_NEAREST: + magFilt = FILTER_NEAREST; + break; + case GL_LINEAR: + magFilt = FILTER_LINEAR; + break; + default: + fprintf(stderr, "i830SetTexFilter(): not supported mag. filter %d\n", + (int)magf); + break; + } + + I830_SET_FIELD(t->Setup[I830_TEXREG_MF], + MAG_FILTER_MASK, MAG_FILTER(magFilt)); + + if (t->globj->MinFilter != GL_NEAREST && + t->globj->MinFilter != GL_LINEAR) { + LastLevel = t->max_level; + } else { + LastLevel = t->min_level; + } + + I830_SET_FIELD(t->Setup[I830_TEXREG_MLL], + LOD_MAX_MASK, + LOD_MAX(t->min_level << 4)); + + I830_SET_FIELD(t->Setup[I830_TEXREG_MLL], + LOD_MIN_MASK, + LOD_MIN(LastLevel)); + + /* See OpenGL 1.2 specification */ + if (magf == GL_LINEAR && (minf == GL_NEAREST_MIPMAP_NEAREST || + minf == GL_NEAREST_MIPMAP_LINEAR)) + { + /* c = 0.5 */ + I830_SET_FIELD(t->Setup[I830_TEXREG_MLC], + MAP_LOD_MASK, 0x10); + } else { + /* c = 0 */ + I830_SET_FIELD(t->Setup[I830_TEXREG_MLC], + MAP_LOD_MASK, 0x0); + } +} + + +/* XXX - have to make sure MI0 has length field set to include color */ +static void i830SetTexBorderColor(i830TextureObjectPtr t, GLubyte color[4]) +{ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + t->Setup[I830_TEXREG_MI5] = + I830PACKCOLOR8888(color[0],color[1],color[2],color[3]); +} + + +static void ReplicateMesaTexState(i830ContextPtr imesa, + i830TextureObjectPtr t, + struct gl_texture_object *mesatex) +{ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + i830SetTexWrapping(t,mesatex->WrapS,mesatex->WrapT); + i830SetTexFilter(imesa, t,mesatex->MinFilter,mesatex->MagFilter); + i830SetTexBorderColor(t,mesatex->BorderColor); +} + +/* Utility function to setup the texture palette */ +static void +i830ConvertPalette(GLuint *data, const struct gl_color_table *table) +{ + const GLubyte *tableUB = (const GLubyte *) table->Table; + GLint width = table->Size; + GLuint r, g, b, a; + int i; + + ASSERT(table->TableType == GL_UNSIGNED_BYTE); + + switch(table->Format) { + case GL_RGBA: + for(i = 0; i < width; i++) { + r = tableUB[i * 4 + 0]; + g = tableUB[i * 4 + 1]; + b = tableUB[i * 4 + 2]; + a = tableUB[i * 4 + 3]; + data[i] = I830PACKCOLOR4444(r, g, b, a); + } + break; + case GL_RGB: + for (i = 0; i < width; i++) { + r = tableUB[i * 3 + 0]; + g = tableUB[i * 3 + 1]; + b = tableUB[i * 3 + 2]; + data[i] = I830PACKCOLOR565(r, g, b); + } + break; + case GL_LUMINANCE: + for (i = 0; i < width; i++) { + r = tableUB[i]; + data[i] = (255 << 8) | r; + } + break; + case GL_ALPHA: + for (i = 0; i < width; i++) { + a = tableUB[i]; + data[i] = (a << 8) | 255; + } + break; + case GL_LUMINANCE_ALPHA: + for (i = 0; i < width; i++) { + r = tableUB[i * 2 + 0]; + a = tableUB[i * 2 + 1]; + data[i] = (a << 8) | r; + } + break; + case GL_INTENSITY: + for (i = 0; i < width; i++) { + a = tableUB[i]; + data[i] = (a << 8) | a; + } + break; + } +} + +static i830TextureObjectPtr i830CreateTexObj(i830ContextPtr imesa, + struct gl_texture_object *tObj) +{ + i830TextureObjectPtr t; + GLuint height, width, pitch, i, textureFormat; + struct gl_texture_image *image; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + image = tObj->Image[ 0 ]; + if ( !image ) { + fprintf(stderr, "no image at level zero - not creating texobj\n"); + return 0; + } + + t = (i830TextureObjectPtr) calloc(1,sizeof(*t)); + if (!t) { + fprintf(stderr, "failed to allocate memory - not creating texobj\n"); + return 0; + } + + switch( image->Format ) { + case GL_RGB: + image->TexFormat = &(_mesa_texformat_rgb565); + t->texelBytes = 2; + textureFormat = MAPSURF_16BIT | MT_16BIT_RGB565; + break; + case GL_RGBA: + image->TexFormat = &(_mesa_texformat_argb4444); + t->texelBytes = 2; + textureFormat = MAPSURF_16BIT | MT_16BIT_ARGB4444; + break; + case GL_ALPHA: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + image->TexFormat = &(_mesa_texformat_al88); + t->texelBytes = 2; + textureFormat = MAPSURF_16BIT | MT_16BIT_AY88; + break; + case GL_COLOR_INDEX: + image->TexFormat = &(_mesa_texformat_ci8); + textureFormat = MAPSURF_8BIT_INDEXED; + t->texelBytes = 1; + + switch(tObj->Palette.Format) { + case GL_RGBA: + textureFormat |= MT_8BIT_IDX_ARGB4444; + break; + case GL_RGB: + textureFormat |= MT_8BIT_IDX_RGB565; + break; + case GL_LUMINANCE: + case GL_ALPHA: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + textureFormat |= MT_8BIT_IDX_AY88; break; + } + + /* Insure the palette is loaded */ + i830ConvertPalette(t->palette, &tObj->Palette); + t->palette_format = tObj->Palette.Format; + break; + default: + fprintf(stderr, "i830CreateTexObj: bad image->Format\n"); + free( t ); + return 0; + } + + /* Figure out the size now (and count the levels). Upload won't be done + * until later. + */ + width = image->Width * t->texelBytes; + if(width % 4) { + fprintf(stderr, "Pitch is not a multiple of dwords\n"); + } + pitch = width; /* All pitches can be used, since we are not using + * tiled surfaces. + */ + + t->dirty_images = 0; + t->bound = 0; + + for ( height = i = 0 ; i < I830_TEX_MAXLEVELS && tObj->Image[i] ; i++ ) { + t->image[i].image = tObj->Image[i]; + t->image[i].offset = height * pitch; + t->image[i].internalFormat = image->Format; + t->dirty_images |= (1<image[i].image->Height; + } + + t->Pitch = pitch; + t->totalSize = height*pitch; + t->max_level = i-1; + t->min_level = 0; + t->globj = tObj; + t->age = 0; + + t->Setup[I830_TEXREG_MI0] = STATE3D_MAP_INFO_COLR_CMD; + + t->Setup[I830_TEXREG_MI1] = MAP_INFO_TEX(0) | + textureFormat | + MAP_INFO_OUTMUX_F0F1F2F3 | + MAP_INFO_VERTLINESTRIDE_0 | + MAP_INFO_VERTLINESTRIDEOFS_0 | + MAP_INFO_FORMAT_2D | + MAP_INFO_USE_FENCE; + + t->Setup[I830_TEXREG_MI2] = (((1 << image->HeightLog2) - 1) << 16) | + ((1 << image->WidthLog2) - 1); + + t->Setup[I830_TEXREG_MI3] = 0; + + t->Setup[I830_TEXREG_MI4] = ((pitch / 4) - 1) << 2; + + t->Setup[I830_TEXREG_MI5] = 0; + + t->Setup[I830_TEXREG_MLC] = STATE3D_MAP_LOD_CNTL_CMD | MAP_UNIT(0) | + ENABLE_TEXLOD_BIAS | + MAP_LOD_BIAS(0); + + t->Setup[I830_TEXREG_MLL] = STATE3D_MAP_LOD_LIMITS_CMD | MAP_UNIT(0) | + ENABLE_MAX_MIP_LVL | + LOD_MAX(t->min_level << 4) | + ENABLE_MIN_MIP_LVL | + LOD_MIN(t->max_level); + + /* I think this is context state, really. + */ + t->Setup[I830_TEXREG_MCS] = STATE3D_MAP_COORD_SET_CMD | MAP_UNIT(0) | + ENABLE_TEXCOORD_PARAMS | + TEXCOORDS_ARE_NORMAL | + TEXCOORDTYPE_CARTESIAN | + ENABLE_ADDR_V_CNTL | + TEXCOORD_ADDR_V_MODE(TEXCOORDMODE_WRAP) | + ENABLE_ADDR_U_CNTL | + TEXCOORD_ADDR_U_MODE(TEXCOORDMODE_WRAP); + + t->Setup[I830_TEXREG_MF] = STATE3D_MAP_FILTER_CMD | MAP_UNIT(0) | + ENABLE_MIP_MODE_FILTER | + MIPFILTER_NEAREST | + ENABLE_MAG_MODE_FILTER | + MAG_FILTER(FILTER_LINEAR) | + ENABLE_MIN_MODE_FILTER | + MIN_FILTER(FILTER_LINEAR); + + t->current_unit = 0; + + ReplicateMesaTexState(imesa, t,tObj); + tObj->DriverData = t; + /* Forces tex cache flush */ + imesa->dirty |= I830_UPLOAD_CTX; + make_empty_list( t ); + return t; +} + +void i830DestroyTexObj(i830ContextPtr imesa, i830TextureObjectPtr t) +{ + if (!t) return; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* This is sad - need to sync *in case* we upload a texture + * to this newly free memory... + */ + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (t->age > imesa->dirtyAge) + imesa->dirtyAge = t->age; + } + + if (t->globj) + t->globj->DriverData = 0; + + if (t->bound) + imesa->CurrentTexObj[t->bound - 1] = 0; + + remove_from_list(t); + free(t); +} + + +static void i830SwapOutTexObj(i830ContextPtr imesa, i830TextureObjectPtr t) +{ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (t->MemBlock) { + mmFreeMem(t->MemBlock); + t->MemBlock = 0; + + if (t->age > imesa->dirtyAge) + imesa->dirtyAge = t->age; + } + + t->dirty_images = ~0; + move_to_tail(&(imesa->SwappedOut), t); +} + + + +/* Upload an image from mesa's internal copy. + */ +static void i830UploadTexLevel( i830TextureObjectPtr t, int level ) +{ + const struct gl_texture_image *image = t->image[level].image; + int i,j; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (I830_DEBUG & DEBUG_VERBOSE_LRU) + fprintf(stderr, "i830UploadTexLevel %d, BufAddr %p offset %x\n", + level, t->BufAddr, t->image[level].offset); + + switch (t->image[level].internalFormat) { + case GL_RGB: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = I830PACKCOLOR565(src[0],src[1],src[2]); + src += 3; + } + } + } + break; + + case GL_RGBA: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = I830PACKCOLOR4444(src[0],src[1],src[2],src[3]); + src += 4; + } + } + } + break; + + case GL_INTENSITY: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + int i; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = (src[0] << 8) | (src[0]); + src ++; + } + } + } + break; + + case GL_LUMINANCE: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = (255 << 8) | (src[0]); + src ++; + } + } + } + break; + + case GL_LUMINANCE_ALPHA: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = (src[1] << 8) | (src[0]); + src += 2; + } + } + } + break; + + case GL_ALPHA: + { + GLushort *dst = (GLushort *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += (t->Pitch/2)) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = (src[0] << 8) | 255; + src += 1; + } + } + } + break; + + case GL_COLOR_INDEX: + { + GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[level].offset); + GLubyte *src = (GLubyte *)image->Data; + + for (j = 0 ; j < image->Height ; j++, dst += t->Pitch) { + for (i = 0 ; i < image->Width ; i++) { + dst[i] = src[0]; + src += 1; + } + } + } + break; + + default: + fprintf(stderr, "Not supported texture format %s\n", + gl_lookup_enum_by_nr(image->Format)); + } +} + + + +void i830PrintLocalLRU( i830ContextPtr imesa ) +{ + i830TextureObjectPtr t; + int sz = 1 << (imesa->i830Screen->logTextureGranularity); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + foreach( t, &imesa->TexObjList ) { + if (!t->globj) + fprintf(stderr, "Placeholder %d at %x sz %x\n", + t->MemBlock->ofs / sz, + t->MemBlock->ofs, + t->MemBlock->size); + else + fprintf(stderr, "Texture (bound %d) at %x sz %x\n", + t->bound, + t->MemBlock->ofs, + t->MemBlock->size); + + } +} + +void i830PrintGlobalLRU( i830ContextPtr imesa ) +{ + int i, j; + I830TexRegion *list = imesa->sarea->texList; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + for (i = 0, j = I830_NR_TEX_REGIONS ; i < I830_NR_TEX_REGIONS ; i++) { + fprintf(stderr, "list[%d] age %d next %d prev %d\n", + j, list[j].age, list[j].next, list[j].prev); + j = list[j].next; + if (j == I830_NR_TEX_REGIONS) break; + } + + if (j != I830_NR_TEX_REGIONS) + fprintf(stderr, "Loop detected in global LRU\n"); +} + + +void i830ResetGlobalLRU( i830ContextPtr imesa ) +{ + I830TexRegion *list = imesa->sarea->texList; + int sz = 1 << imesa->i830Screen->logTextureGranularity; + int i; + + /* (Re)initialize the global circular LRU list. The last element + * in the array (I830_NR_TEX_REGIONS) is the sentinal. Keeping it + * at the end of the array allows it to be addressed rationally + * when looking up objects at a particular location in texture + * memory. + */ + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + for (i = 0 ; (i+1) * sz <= imesa->i830Screen->textureSize ; i++) { + list[i].prev = i-1; + list[i].next = i+1; + list[i].age = 0; + } + + i--; + list[0].prev = I830_NR_TEX_REGIONS; + list[i].prev = i-1; + list[i].next = I830_NR_TEX_REGIONS; + list[I830_NR_TEX_REGIONS].prev = i; + list[I830_NR_TEX_REGIONS].next = 0; + imesa->sarea->texAge = 0; +} + + +static void i830UpdateTexLRU( i830ContextPtr imesa, i830TextureObjectPtr t ) +{ + int i; + int logsz = imesa->i830Screen->logTextureGranularity; + int start = t->MemBlock->ofs >> logsz; + int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz; + I830TexRegion *list = imesa->sarea->texList; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + imesa->texAge = ++imesa->sarea->texAge; + + /* Update our local LRU + */ + move_to_head( &(imesa->TexObjList), t ); + + /* Update the global LRU + */ + for (i = start ; i <= end ; i++) { + + list[i].in_use = 1; + list[i].age = imesa->texAge; + + /* remove_from_list(i) + */ + list[(unsigned)list[i].next].prev = list[i].prev; + list[(unsigned)list[i].prev].next = list[i].next; + + /* insert_at_head(list, i) + */ + list[i].prev = I830_NR_TEX_REGIONS; + list[i].next = list[I830_NR_TEX_REGIONS].next; + list[(unsigned)list[I830_NR_TEX_REGIONS].next].prev = i; + list[I830_NR_TEX_REGIONS].next = i; + } +} + + +/* Called for every shared texture region which has increased in age + * since we last held the lock. + * + * Figures out which of our textures have been ejected by other clients, + * and pushes a placeholder texture onto the LRU list to represent + * the other client's textures. + */ +void i830TexturesGone( i830ContextPtr imesa, + GLuint offset, + GLuint size, + GLuint in_use ) +{ + i830TextureObjectPtr t, tmp; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + foreach_s ( t, tmp, &imesa->TexObjList ) { + + if (t->MemBlock->ofs >= offset + size || + t->MemBlock->ofs + t->MemBlock->size <= offset) + continue; + + /* It overlaps - kick it off. Need to hold onto the currently bound + * objects, however. + */ + if (t->bound) + i830SwapOutTexObj( imesa, t ); + else + i830DestroyTexObj( imesa, t ); + } + + + if (in_use) { + t = (i830TextureObjectPtr) calloc(1,sizeof(*t)); + if (!t) return; + + t->MemBlock = mmAllocMem( imesa->texHeap, size, 0, offset); + insert_at_head( &imesa->TexObjList, t ); + } +} + +/* This is called with the lock held. May have to eject our own and/or + * other client's texture objects to make room for the upload. + */ +int i830UploadTexImages( i830ContextPtr imesa, i830TextureObjectPtr t ) +{ + int i; + int ofs; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* Do we need to eject LRU texture objects? + */ + if (!t->MemBlock) { + while (1) + { + t->MemBlock = mmAllocMem( imesa->texHeap, t->totalSize, 12, 0 ); + if (t->MemBlock) + break; + + if (imesa->TexObjList.prev->bound) { + fprintf(stderr, "Hit bound texture in upload\n"); + i830PrintLocalLRU( imesa ); + return -1; + } + + if (imesa->TexObjList.prev == &(imesa->TexObjList)) { + fprintf(stderr, "Failed to upload texture, sz %d\n", t->totalSize); + mmDumpMemInfo( imesa->texHeap ); + return -1; + } + + i830DestroyTexObj( imesa, imesa->TexObjList.prev ); + } + + ofs = t->MemBlock->ofs; + t->Setup[I830_TEXREG_MI3] = imesa->i830Screen->textureOffset + ofs; + t->BufAddr = imesa->i830Screen->tex.map + ofs; + imesa->dirty |= I830_UPLOAD_CTX; + } + + /* Let the world know we've used this memory recently. + */ + i830UpdateTexLRU( imesa, t ); + + if (I830_DEBUG & DEBUG_VERBOSE_LRU) + fprintf(stderr, "dispatch age: %d age freed memory: %d\n", + GET_DISPATCH_AGE(imesa), imesa->dirtyAge); + + if (imesa->dirtyAge >= GET_DISPATCH_AGE(imesa)) + i830WaitAgeLocked( imesa, imesa->dirtyAge ); + + + if (t->dirty_images) { + if (I830_DEBUG & DEBUG_VERBOSE_LRU) + fprintf(stderr, "*"); + + for (i = t->min_level ; i <= t->max_level ; i++) + if (t->dirty_images & (1<dirty_images = 0; + return 0; +} + +static void i830TexSetUnit( i830TextureObjectPtr t, GLuint unit ) +{ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s unit(%d)\n", __FUNCTION__, unit); + + /* This will need to be changed when I support more then 2 t units */ + I830_SET_FIELD(t->Setup[I830_TEXREG_MI1], + MAP_INFO_MASK | MAP_INFO_USE_PALETTE_1, + MAP_INFO_TEX(unit) | MAP_INFO_USE_PALETTE_N(unit)); + I830_SET_FIELD(t->Setup[I830_TEXREG_MLC], MAP_UNIT_MASK, MAP_UNIT(unit)); + I830_SET_FIELD(t->Setup[I830_TEXREG_MLL], MAP_UNIT_MASK, MAP_UNIT(unit)); + I830_SET_FIELD(t->Setup[I830_TEXREG_MCS], MAP_UNIT_MASK, MAP_UNIT(unit)); + I830_SET_FIELD(t->Setup[I830_TEXREG_MF], MAP_UNIT_MASK, MAP_UNIT(unit)); + + t->current_unit = unit; +} + +static __inline__ GLuint GetTexelOp(GLint unit) +{ + switch(unit) { + case 0: return TEXBLENDARG_TEXEL0; + case 1: return TEXBLENDARG_TEXEL1; + case 2: return TEXBLENDARG_TEXEL2; + case 3: return TEXBLENDARG_TEXEL3; + default: return TEXBLENDARG_TEXEL0; + } +} + +/* Only 1.2 modes; make another func for combine, combine4, combiners */ +static void i830SetBlend_GL1_2(i830ContextPtr imesa, int curTex, + GLenum envMode, GLenum format) +{ + GLuint texel_op = GetTexelOp(curTex); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s %s %s unit (%d) texel_op(0x%x)\n", + __FUNCTION__, + gl_lookup_enum_by_nr(format), + gl_lookup_enum_by_nr(envMode), + curTex, + texel_op); + + switch(envMode) { + case GL_REPLACE: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + + case GL_INTENSITY: + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_MODULATE: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_INTENSITY: + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_DECAL: + switch(format) { + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_REPLICATE_ALPHA | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_BLEND: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + + case GL_INTENSITY: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][6] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][7] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 8; + break; + + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_BLEND); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_FACTOR_N); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][6] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 7; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + + case GL_ADD: + switch(format) { + case GL_ALPHA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + case GL_LUMINANCE: + case GL_RGB: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 5; + break; + + case GL_INTENSITY: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + + case GL_LUMINANCE_ALPHA: + case GL_RGBA: + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ADD); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(curTex) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_MODULATE); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][4] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + texel_op); + imesa->TexBlend[curTex][5] = (STATE3D_MAP_BLEND_ARG_CMD(curTex) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 6; + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + break; + default: + /* Always set to passthru if something is funny */ + imesa->TexBlend[curTex][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[curTex][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlend[curTex][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_CURRENT); + imesa->TexBlendColorPipeNum[curTex] = 0; + imesa->TexBlendWordsUsed[curTex] = 4; + break; + } + + if (I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); +} + +static void i830SetTexEnvCombine(i830ContextPtr imesa, + struct gl_texture_unit *texUnit, + GLint unit) +{ + GLuint blendop; + GLuint ablendop; + GLuint args_RGB[3]; + GLuint args_A[3]; + GLuint texel_op = GetTexelOp(unit); + int i; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + switch(texUnit->CombineModeRGB) { + case GL_REPLACE: blendop = TEXBLENDOP_ARG1; break; + case GL_MODULATE: blendop = TEXBLENDOP_MODULATE; break; + case GL_ADD: blendop = TEXBLENDOP_ADD; break; + case GL_ADD_SIGNED_EXT: blendop = TEXBLENDOP_ADDSIGNED; break; + case GL_INTERPOLATE_EXT: blendop = TEXBLENDOP_BLEND; break; + default: return; + } + + switch(texUnit->CombineScaleShiftRGB) { + case 0: blendop |= TEXOP_SCALE_1X; break; + case 1: blendop |= TEXOP_SCALE_2X; break; + case 2: blendop |= TEXOP_SCALE_4X; break; + default: return; + } + + switch(texUnit->CombineModeA) { + case GL_REPLACE: ablendop = TEXBLENDOP_ARG1; break; + case GL_MODULATE: ablendop = TEXBLENDOP_MODULATE; break; + case GL_ADD: ablendop = TEXBLENDOP_ADD; break; + case GL_ADD_SIGNED_EXT: ablendop = TEXBLENDOP_ADDSIGNED; break; + case GL_INTERPOLATE_EXT: ablendop = TEXBLENDOP_BLEND; break; + default: return; + } + + switch(texUnit->CombineScaleShiftA) { + case 0: ablendop |= TEXOP_SCALE_1X; break; + case 1: ablendop |= TEXOP_SCALE_2X; break; + case 2: ablendop |= TEXOP_SCALE_4X; break; + default: return; + } + + /* Handle RGB args */ + for(i = 0; i < 3; i++) { + switch(texUnit->CombineSourceRGB[i]) { + case GL_TEXTURE: args_RGB[i] = texel_op; break; + case GL_CONSTANT_EXT: args_RGB[i] = TEXBLENDARG_FACTOR_N; break; + case GL_PRIMARY_COLOR_EXT: args_RGB[i] = TEXBLENDARG_DIFFUSE; break; + case GL_PREVIOUS_EXT: args_RGB[i] = TEXBLENDARG_CURRENT; break; + default: return; + } + + switch(texUnit->CombineOperandRGB[i]) { + case GL_SRC_COLOR: args_RGB[i] |= 0; break; + case GL_ONE_MINUS_SRC_COLOR: args_RGB[i] |= TEXBLENDARG_INV_ARG; break; + case GL_SRC_ALPHA: args_RGB[i] |= TEXBLENDARG_REPLICATE_ALPHA; break; + case GL_ONE_MINUS_SRC_ALPHA: + args_RGB[i] |= (TEXBLENDARG_REPLICATE_ALPHA | + TEXBLENDARG_INV_ARG); + break; + default: return; + } + } + + /* Handle A args */ + for(i = 0; i < 3; i++) { + switch(texUnit->CombineSourceA[i]) { + case GL_TEXTURE: args_A[i] = texel_op; break; + case GL_CONSTANT_EXT: args_A[i] = TEXBLENDARG_FACTOR_N; break; + case GL_PRIMARY_COLOR_EXT: args_A[i] = TEXBLENDARG_DIFFUSE; break; + case GL_PREVIOUS_EXT: args_A[i] = TEXBLENDARG_CURRENT; break; + default: return; + } + + switch(texUnit->CombineOperandA[i]) { + case GL_SRC_ALPHA: args_A[i] |= 0; break; + case GL_ONE_MINUS_SRC_ALPHA: args_A[i] |= TEXBLENDARG_INV_ARG; break; + default: return; + } + } + + /* Native Arg1 == Arg0 in GL_EXT_texture_env_combine spec */ + /* Native Arg2 == Arg1 in GL_EXT_texture_env_combine spec */ + /* Native Arg0 == Arg2 in GL_EXT_texture_env_combine spec */ + + /* When we render we need to figure out which is the last really enabled + * tex unit, and put last stage on it + */ + + imesa->TexBlendColorPipeNum[unit] = 0; + + /* Build color pipeline */ + + imesa->TexBlend[unit][0] = (STATE3D_MAP_BLEND_OP_CMD(unit) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_MODIFY_PARMS | + blendop); + imesa->TexBlend[unit][1] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + args_RGB[0]); + imesa->TexBlend[unit][2] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_COLOR | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + args_RGB[1]); + imesa->TexBlend[unit][3] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_COLOR | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + args_RGB[2]); + + /* Build Alpha pipeline */ + imesa->TexBlend[unit][4] = (STATE3D_MAP_BLEND_OP_CMD(unit) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_MODIFY_PARMS | + ablendop); + imesa->TexBlend[unit][5] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + args_A[0]); + imesa->TexBlend[unit][6] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_ALPHA | + TEXBLEND_ARG2 | + TEXBLENDARG_MODIFY_PARMS | + args_A[1]); + imesa->TexBlend[unit][7] = (STATE3D_MAP_BLEND_ARG_CMD(unit) | + TEXPIPE_ALPHA | + TEXBLEND_ARG0 | + TEXBLENDARG_MODIFY_PARMS | + args_A[2]); + + { + GLubyte r, g, b, a; + GLfloat *fc = texUnit->EnvColor; + + FLOAT_COLOR_TO_UBYTE_COLOR(r, fc[RCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(g, fc[GCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(b, fc[BCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(a, fc[ACOMP]); + + imesa->TexBlend[unit][8] = STATE3D_COLOR_FACTOR_CMD(unit); + imesa->TexBlend[unit][9] = ((a << 24) | + (r << 16) | + (g << 8) | + b); + } + imesa->TexBlendWordsUsed[unit] = 10; +} + +static void i830UpdateTexState( GLcontext *ctx, int unit ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + struct gl_texture_object *tObj; + i830TextureObjectPtr t; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + tObj = ctx->Texture.Unit[unit].Current; + + if ( tObj != ctx->Texture.Unit[unit].CurrentD[2] ) + tObj = 0; + + /* XXX grantham - need to change this shift if "TEXTURE" flags change + in mesa/src/types.h */ + if (!(ctx->Texture.ReallyEnabled & (0xf << (4 * unit))) + || !tObj || !tObj->Complete) { + return; + } + + t = tObj->DriverData; + + if (!t) { + t = i830CreateTexObj( imesa, tObj ); + if (!t) return; + } + + i830TexSetUnit( t, unit ); + + if (t->dirty_images) { + if(unit == 0) imesa->dirty |= I830_UPLOAD_TEX0_IMAGE; + if(unit == 1) imesa->dirty |= I830_UPLOAD_TEX1_IMAGE; + } + + if((t->Setup[I830_TEXREG_MI1] & ((1<<26)|(1<<25)|(1<<24))) == + MAPSURF_8BIT_INDEXED) { + /* Texture palette needs updated, need to do this in a smarter + * way, since it will always be loaded each time paletted textures + * are used, and texture state is reeval'ed. + */ + if(0) fprintf(stderr, "\n\n\nUpdating texture palette\n"); + if(!ctx->Texture.SharedPalette) { + imesa->dirty |= I830_UPLOAD_TEX_PALETTE_N(unit); + if(0) fprintf(stderr, "per texobj palette\n"); + } else { + imesa->dirty |= I830_UPLOAD_TEX_PALETTE_SHARED; + if(0) fprintf(stderr, "shared palette\n"); + } + } + + imesa->CurrentTexObj[unit] = t; + t->bound = 1; + + imesa->TexEnabledMask |= I830_TEX_UNIT_ENABLED(unit); + /* We only want the last texture unit, so we don't or this flag */ + imesa->LastTexEnabled = I830_TEX_UNIT_ENABLED(unit); + + /* Can't do this, we aren't locked here. Causes bad bad bad things */ +#if 0 + if (t->MemBlock) + i830UpdateTexLRU( imesa, t ); +#endif + +} + +static void i830UpdateTexBlend(GLcontext *ctx, int unit ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + struct gl_texture_unit *texUnit; + struct gl_texture_object *texObj; + i830TextureObjectPtr t; + GLuint col; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s : unit %d\n", __FUNCTION__, unit); + + texUnit = &ctx->Texture.Unit[unit]; + texObj = ctx->Texture.Unit[unit].Current; + + if (!(ctx->Texture.ReallyEnabled & (0xf << (4 * unit))) + || !texObj || !texObj->Complete) { + return; + } + + t = (i830TextureObjectPtr) texObj->DriverData; + if (!t) { + t = i830CreateTexObj( imesa, texObj ); + if (!t) return; + } + + imesa->TexBlendWordsUsed[unit] = 0; + /* Could handle texenv_combine, register_combiners, combine4, etc */ + if(texUnit->EnvMode == GL_COMBINE_EXT) { + i830SetTexEnvCombine(imesa, + texUnit, + unit); + } else { + if(t->image[0].internalFormat == GL_COLOR_INDEX) { + if(!ctx->Texture.SharedPalette) { + i830SetBlend_GL1_2(imesa, unit, texUnit->EnvMode, + t->palette_format); + } else { + i830SetBlend_GL1_2(imesa, unit, texUnit->EnvMode, + imesa->palette_format); + + } + } else { + i830SetBlend_GL1_2(imesa, unit, texUnit->EnvMode, + t->image[0].internalFormat); + } + /* This only needs emitted when neccessary, fix it later */ + + /* add blend color */ + { + GLubyte r, g, b, a; + GLfloat *fc = texUnit->EnvColor; + + FLOAT_COLOR_TO_UBYTE_COLOR(r, fc[RCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(g, fc[GCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(b, fc[BCOMP]); + FLOAT_COLOR_TO_UBYTE_COLOR(a, fc[ACOMP]); + + col = ((a << 24) | + (r << 16) | + (g << 8) | + b); + } + + { + int i; + + i = imesa->TexBlendWordsUsed[unit]; + imesa->TexBlend[unit][i++] = STATE3D_COLOR_FACTOR_CMD(unit); + imesa->TexBlend[unit][i++] = col; + + imesa->TexBlendWordsUsed[unit] = i; + } + } + if(0) fprintf(stderr, "TexBlendWordsUsed : %d\n", imesa->TexBlendWordsUsed[unit]); +} + +void i830UpdateTextureState( GLcontext *ctx ) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + int pipe_num = 0; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if(ctx->Texture.ReallyEnabled & ~(TEXTURE0_2D|(TEXTURE0_2D<<4))) { + /* Bits are set for a fallback */ + if(0) fprintf(stderr, "Falling back to software for texturing\n"); + imesa->Fallback |= I830_FALLBACK_TEXTURE; + return; + } + imesa->LastTexEnabled = 0; + imesa->TexEnabledMask = 0; + + if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound = 0; + if (imesa->CurrentTexObj[1]) imesa->CurrentTexObj[1]->bound = 0; + + imesa->CurrentTexObj[0] = 0; + imesa->CurrentTexObj[1] = 0; + + i830UpdateTexState( ctx, 0 ); + i830UpdateTexState( ctx, 1 ); + + i830UpdateTexBlend( ctx, 0 ); + i830UpdateTexBlend( ctx, 1 ); + + /* Need to decide the units to set to diffuse by looking at + * the texture units that actually got enabled */ + if(!(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(0))) { + if(0) fprintf(stderr, "Diffuse got turned on\n"); + if(imesa->LastTexEnabled == 0) + imesa->LastTexEnabled = I830_TEX_UNIT_ENABLED(0); + + imesa->TexBlend[0][0] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_COLOR | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + DISABLE_TEX_CNTRL_STAGE | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[0][1] = (STATE3D_MAP_BLEND_OP_CMD(0) | + TEXPIPE_ALPHA | + ENABLE_TEXOUTPUT_WRT_SEL | + TEXOP_OUTPUT_CURRENT | + TEXOP_SCALE_1X | + TEXOP_MODIFY_PARMS | + TEXBLENDOP_ARG1); + imesa->TexBlend[0][2] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_COLOR | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_DIFFUSE); + imesa->TexBlend[0][3] = (STATE3D_MAP_BLEND_ARG_CMD(0) | + TEXPIPE_ALPHA | + TEXBLEND_ARG1 | + TEXBLENDARG_MODIFY_PARMS | + TEXBLENDARG_DIFFUSE); + imesa->TexBlendColorPipeNum[0] = 0; + imesa->TexBlendWordsUsed[0] = 4; + imesa->dirty |= I830_UPLOAD_TEXBLEND_N(0); + } + + switch(imesa->LastTexEnabled) { + case I830_TEX_UNIT_ENABLED(0): + if(0) fprintf(stderr, "Texture unit 0 is the last stage\n"); + pipe_num = imesa->TexBlendColorPipeNum[0]; + imesa->TexBlend[0][pipe_num] |= TEXOP_LAST_STAGE; + break; + case I830_TEX_UNIT_ENABLED(1): + if(0) fprintf(stderr, "Texture unit 1 is the last stage\n"); + pipe_num = imesa->TexBlendColorPipeNum[1]; + imesa->TexBlend[1][pipe_num] |= TEXOP_LAST_STAGE; + break; + default: break; + } + + /* Forces texture cache flush */ + imesa->dirty |= I830_UPLOAD_CTX; + if(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(0)) { + if(0) fprintf(stderr, "Enabling Texture unit 0\n"); + imesa->dirty |= (I830_UPLOAD_TEX_N(0) | I830_UPLOAD_TEXBLEND_N(0)); + } + if(imesa->TexEnabledMask & I830_TEX_UNIT_ENABLED(1)) { + if(0) fprintf(stderr, "Enabling Texture unit 1\n"); + imesa->dirty |= (I830_UPLOAD_TEX_N(1) | I830_UPLOAD_TEXBLEND_N(1)); + } +} + + + +/***************************************** + * DRIVER functions + *****************************************/ + +/* TEXTURE_ENV_COLOR should be optimized, so we only flush when the + * color really changes + */ + +static void i830TexEnv( GLcontext *ctx, GLenum target, + GLenum pname, const GLfloat *param ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + /* Always flush texture state or texture_env_combine doesn't work */ + FLUSH_BATCH(imesa); + imesa->new_state |= I830_NEW_TEXTURE; +} + +static void i830TexImage( GLcontext *ctx, + GLenum target, + struct gl_texture_object *tObj, + GLint level, + GLint internalFormat, + const struct gl_texture_image *image ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + i830TextureObjectPtr t; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (target != GL_TEXTURE_2D) + return; + + if (level >= I830_TEX_MAXLEVELS) + return; + + t = (i830TextureObjectPtr) tObj->DriverData; + if (t) { + if (t->bound) FLUSH_BATCH(imesa); + /* if this is the current object, it will force an update */ + i830DestroyTexObj( imesa, t ); + tObj->DriverData = 0; + imesa->new_state |= I830_NEW_TEXTURE; + } +} + +static void i830TexSubImage( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLint internalFormat, + const struct gl_texture_image *image ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + i830TextureObjectPtr t; + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if ( target != GL_TEXTURE_2D ) + return; + + t = (i830TextureObjectPtr) tObj->DriverData; + if (t) { + if (t->bound) FLUSH_BATCH( imesa ); + i830DestroyTexObj( imesa, t ); + tObj->DriverData = 0; + imesa->new_state |= I830_NEW_TEXTURE; + } +} + +static void i830TexParameter( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj, + GLenum pname, const GLfloat *params ) +{ + i830TextureObjectPtr t = (i830TextureObjectPtr) tObj->DriverData; + i830ContextPtr imesa = I830_CONTEXT( ctx ); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (!t || target != GL_TEXTURE_2D) + return; + + switch (pname) { + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_MAG_FILTER: + if (t->bound) FLUSH_BATCH( imesa ); + i830SetTexFilter(imesa, t,tObj->MinFilter,tObj->MagFilter); + break; + + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + if (t->bound) FLUSH_BATCH( imesa ); + i830SetTexWrapping(t,tObj->WrapS,tObj->WrapT); + break; + + case GL_TEXTURE_BORDER_COLOR: + if (t->bound) FLUSH_BATCH( imesa ); + i830SetTexBorderColor(t,tObj->BorderColor); + break; + + default: + return; + } + + imesa->new_state |= I830_NEW_TEXTURE; +} + +static void i830BindTexture( GLcontext *ctx, GLenum target, + struct gl_texture_object *tObj ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + FLUSH_BATCH(imesa); + + if (imesa->CurrentTexObj[ctx->Texture.CurrentUnit]) { + imesa->CurrentTexObj[ctx->Texture.CurrentUnit]->bound = 0; + imesa->CurrentTexObj[ctx->Texture.CurrentUnit] = 0; + } + + imesa->new_state |= I830_NEW_TEXTURE; +} + +static void i830DeleteTexture( GLcontext *ctx, struct gl_texture_object *tObj ) +{ + i830TextureObjectPtr t = (i830TextureObjectPtr)tObj->DriverData; + i830ContextPtr imesa = I830_CONTEXT( ctx ); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + if (t) { + + if (t->bound) { + FLUSH_BATCH(imesa); + imesa->CurrentTexObj[t->bound-1] = 0; + imesa->new_state |= I830_NEW_TEXTURE; + } + + i830DestroyTexObj(imesa,t); + tObj->DriverData=0; + } +} + + +static GLboolean i830IsTextureResident( GLcontext *ctx, + struct gl_texture_object *t ) +{ + i830TextureObjectPtr mt; + +/* LOCK_HARDWARE; */ + mt = (i830TextureObjectPtr)t->DriverData; +/* UNLOCK_HARDWARE; */ + + return mt && mt->MemBlock; +} + +static void +i830DDTexturePalette(GLcontext *ctx, struct gl_texture_object *tObj) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + i830TextureObjectPtr t; + + imesa->new_state |= I830_NEW_TEXTURE; + + if(tObj) { + t = tObj->DriverData; + + if(!t) { + /* Will be handled elsewhere */ + return; + } + + i830ConvertPalette(t->palette, &tObj->Palette); + t->palette_format = tObj->Palette.Format; + } else { + i830ConvertPalette(imesa->palette, &ctx->Texture.Palette); + imesa->palette_format = ctx->Texture.Palette.Format; + } +} + +void i830DDInitTextureFuncs( GLcontext *ctx ) +{ + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + ctx->Driver.TexEnv = i830TexEnv; + ctx->Driver.TexImage = i830TexImage; + ctx->Driver.TexSubImage = i830TexSubImage; + ctx->Driver.BindTexture = i830BindTexture; + ctx->Driver.DeleteTexture = i830DeleteTexture; + ctx->Driver.TexParameter = i830TexParameter; + ctx->Driver.UpdateTexturePalette = i830DDTexturePalette; + ctx->Driver.IsTextureResident = i830IsTextureResident; +} Index: xc/lib/GL/mesa/src/drv/i830/i830_tris.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_tris.c:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_tris.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,183 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tris.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include +#include + +#include "types.h" +#include "vb.h" +#include "pipeline.h" + +#include "mm.h" + +#include "i830_drv.h" +#include "i830_tris.h" + +/* Used in i830tritmp.h + */ +#define I830_COLOR(to, from) { \ + (to)[0] = (from)[2]; \ + (to)[1] = (from)[1]; \ + (to)[2] = (from)[0]; \ + (to)[3] = (from)[3]; \ +} + +#define I830_COLOR3(to, from) { \ + (to)[0] = (from)[2]; \ + (to)[1] = (from)[1]; \ + (to)[2] = (from)[0]; \ +} + +static triangle_func tri_tab[0x10]; +static quad_func quad_tab[0x10]; +static line_func line_tab[0x10]; +static points_func points_tab[0x10]; + +#define IND (0) +#define TAG(x) x +#include "i830_tritmp.h" + +#define IND (I830_FLAT_BIT) +#define TAG(x) x##_flat +#include "i830_tritmp.h" + +#define IND (I830_OFFSET_BIT) +#define TAG(x) x##_offset +#include "i830_tritmp.h" + +#define IND (I830_OFFSET_BIT|I830_FLAT_BIT) +#define TAG(x) x##_offset_flat +#include "i830_tritmp.h" + +#define IND (I830_TWOSIDE_BIT) +#define TAG(x) x##_twoside +#include "i830_tritmp.h" + +#define IND (I830_TWOSIDE_BIT|I830_FLAT_BIT) +#define TAG(x) x##_twoside_flat +#include "i830_tritmp.h" + +#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT) +#define TAG(x) x##_twoside_offset +#include "i830_tritmp.h" + +#define IND (I830_TWOSIDE_BIT|I830_OFFSET_BIT|I830_FLAT_BIT) +#define TAG(x) x##_twoside_offset_flat +#include "i830_tritmp.h" + + + +void i830DDTrifuncInit() +{ + init(); + init_flat(); + init_offset(); + init_offset_flat(); + init_twoside(); + init_twoside_flat(); + init_twoside_offset(); + init_twoside_offset_flat(); +} + + + +#define ALL_FALLBACK (DD_SELECT | DD_FEEDBACK) +#define POINT_FALLBACK (ALL_FALLBACK | DD_POINT_SMOOTH | DD_POINT_ATTEN) +#define LINE_FALLBACK (ALL_FALLBACK | DD_LINE_STIPPLE) +#define TRI_FALLBACK (ALL_FALLBACK | DD_TRI_UNFILLED | DD_TRI_STIPPLE | DD_TRI_SMOOTH) +#define ANY_FALLBACK (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK|DD_TRI_STIPPLE) +#define ANY_RASTER_FLAGS (DD_FLATSHADE|DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET) + +void i830DDChooseRenderState(GLcontext *ctx) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + GLuint flags = ctx->TriangleCaps; + CARD32 index = 0; + + if (imesa->Fallback) { + imesa->renderindex = I830_FALLBACK_BIT; + return; + } + + if (flags & ANY_RASTER_FLAGS) { + if (flags & DD_FLATSHADE) index |= I830_FLAT_BIT; + if (flags & DD_TRI_LIGHT_TWOSIDE) index |= I830_TWOSIDE_BIT; + if (flags & DD_TRI_OFFSET) index |= I830_OFFSET_BIT; + } + + imesa->PointsFunc = points_tab[index]; + imesa->LineFunc = line_tab[index]; + imesa->TriangleFunc = tri_tab[index]; + imesa->QuadFunc = quad_tab[index]; + imesa->renderindex = index; + imesa->IndirectTriangles = 0; + + if (flags & ANY_FALLBACK) { + if (flags & POINT_FALLBACK) { + imesa->renderindex |= I830_FALLBACK_BIT; + imesa->PointsFunc = 0; + imesa->IndirectTriangles |= DD_POINT_SW_RASTERIZE; + } + + if (flags & LINE_FALLBACK) { + imesa->renderindex |= I830_FALLBACK_BIT; + imesa->LineFunc = 0; + imesa->IndirectTriangles |= DD_LINE_SW_RASTERIZE; + } + + if (flags & TRI_FALLBACK) { + imesa->renderindex |= I830_FALLBACK_BIT; + imesa->TriangleFunc = 0; + imesa->QuadFunc = 0; + imesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | + DD_QUAD_SW_RASTERIZE); + } + /* Special cases: + */ + if ((flags & DD_TRI_STIPPLE) && + (ctx->IndirectTriangles & DD_TRI_STIPPLE)) { + imesa->renderindex |= I830_FALLBACK_BIT; + imesa->TriangleFunc = 0; + imesa->QuadFunc = 0; + imesa->IndirectTriangles |= (DD_TRI_SW_RASTERIZE | + DD_QUAD_SW_RASTERIZE); + } + } +} + + + Index: xc/lib/GL/mesa/src/drv/i830/i830_tris.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_tris.h:1.2 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_tris.h Thu Jan 17 04:50:58 2002 @@ -0,0 +1,263 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tris.h,v 1.2 2002/01/17 09:50:58 eich Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#ifndef i830_TRIS_INC +#define i830_TRIS_INC + +#include "types.h" + +#include "i830_drv.h" +#include "i830_ioctl.h" + +extern void i830PrintRenderState( const char *msg, GLuint state ); +extern void i830DDChooseRenderState(GLcontext *ctx); +extern void i830DDTrifuncInit( void ); + + +#define I830_FLAT_BIT 0x1 +#define I830_OFFSET_BIT 0x2 +#define I830_TWOSIDE_BIT 0x4 +#define I830_FALLBACK_BIT 0x8 + + + + +static void __inline__ i830_draw_triangle( i830ContextPtr imesa, + i830VertexPtr v0, + i830VertexPtr v1, + i830VertexPtr v2 ) +{ + GLuint vertsize = imesa->vertsize; + int j; + GLuint *vb = i830AllocDwordsInline(imesa, 3 * vertsize); + +#if 0 + + if(imesa->vertex_prim != PRIM3D_TRILIST) fprintf(stderr, "Not tris and rendering tris\n"); + + fprintf(stderr, "\n\n\n\nDrawTriangle :\n"); + fprintf(stderr, "v0\n"); + fprintf(stderr, "u: %f\n", v0->f[6]); + fprintf(stderr, "v: %f\n", v0->f[7]); + fprintf(stderr, "v1\n"); + fprintf(stderr, "u: %f\n", v1->f[6]); + fprintf(stderr, "v: %f\n", v1->f[7]); + fprintf(stderr, "v2\n"); + fprintf(stderr, "u: %f\n", v2->f[6]); + fprintf(stderr, "v: %f\n", v2->f[7]); +#endif + +#if 0 + fprintf(stderr, "\n\n\n\nDrawTriangle :\n"); + fprintf(stderr, "v0\n"); + fprintf(stderr, "0x%x\n", v0->ui[0]); + fprintf(stderr, "0x%x\n", v0->ui[1]); + fprintf(stderr, "0x%x\n", v0->ui[2]); + fprintf(stderr, "0x%x\n", v0->ui[3]); + fprintf(stderr, "0x%x\n", v0->ui[4]); + fprintf(stderr, "0x%x\n", v0->ui[5]); + fprintf(stderr, "0x%x\n", v0->ui[6]); + fprintf(stderr, "0x%x\n", v0->ui[7]); + fprintf(stderr, "0x%x\n", v0->ui[8]); + fprintf(stderr, "0x%x\n", v0->ui[9]); + fprintf(stderr, "0x%x\n", v0->ui[10]); + fprintf(stderr, "0x%x\n", v0->ui[11]); + fprintf(stderr, "0x%x\n", v0->ui[12]); + fprintf(stderr, "0x%x\n", v0->ui[13]); + fprintf(stderr, "0x%x\n", v0->ui[14]); + fprintf(stderr, "0x%x\n", v0->ui[15]); + fprintf(stderr, "v1\n"); + fprintf(stderr, "0x%x\n", v1->ui[0]); + fprintf(stderr, "0x%x\n", v1->ui[1]); + fprintf(stderr, "0x%x\n", v1->ui[2]); + fprintf(stderr, "0x%x\n", v1->ui[3]); + fprintf(stderr, "0x%x\n", v1->ui[4]); + fprintf(stderr, "0x%x\n", v1->ui[5]); + fprintf(stderr, "0x%x\n", v1->ui[6]); + fprintf(stderr, "0x%x\n", v1->ui[7]); + fprintf(stderr, "0x%x\n", v1->ui[8]); + fprintf(stderr, "0x%x\n", v1->ui[9]); + fprintf(stderr, "0x%x\n", v1->ui[10]); + fprintf(stderr, "0x%x\n", v1->ui[11]); + fprintf(stderr, "0x%x\n", v1->ui[12]); + fprintf(stderr, "0x%x\n", v1->ui[13]); + fprintf(stderr, "0x%x\n", v1->ui[14]); + fprintf(stderr, "0x%x\n", v1->ui[15]); + fprintf(stderr, "v2\n"); + fprintf(stderr, "0x%x\n", v2->ui[0]); + fprintf(stderr, "0x%x\n", v2->ui[1]); + fprintf(stderr, "0x%x\n", v2->ui[2]); + fprintf(stderr, "0x%x\n", v2->ui[3]); + fprintf(stderr, "0x%x\n", v2->ui[4]); + fprintf(stderr, "0x%x\n", v2->ui[5]); + fprintf(stderr, "0x%x\n", v2->ui[6]); + fprintf(stderr, "0x%x\n", v2->ui[7]); + fprintf(stderr, "0x%x\n", v2->ui[8]); + fprintf(stderr, "0x%x\n", v2->ui[9]); + fprintf(stderr, "0x%x\n", v2->ui[10]); + fprintf(stderr, "0x%x\n", v2->ui[11]); + fprintf(stderr, "0x%x\n", v2->ui[12]); + fprintf(stderr, "0x%x\n", v2->ui[13]); + fprintf(stderr, "0x%x\n", v2->ui[14]); + fprintf(stderr, "0x%x\n", v2->ui[15]); +#endif + +#if defined(USE_X86_ASM) + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "D" ((long)vb), "S" ((long)v0) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v1) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v2) + : "memory" ); +#else + + for (j = 0 ; j < vertsize ; j++) + vb[j] = v0->ui[j]; + + vb += vertsize; + for (j = 0 ; j < vertsize ; j++) + vb[j] = v1->ui[j]; + + vb += vertsize; + for (j = 0 ; j < vertsize ; j++) + vb[j] = v2->ui[j]; +#endif +} + +/* We aren't supporting point params, so we are ignoring size */ +static __inline__ void i830_draw_point( i830ContextPtr imesa, + i830VertexPtr tmp, + float sz ) +{ + GLuint vertsize = imesa->vertsize; + int j; + GLuint *vb = i830AllocDwordsInline( imesa, 1 * vertsize ); + +#if 0 + if(imesa->vertex_prim != PRIM3D_POINTLIST) fprintf(stderr, "Not points and rendering points\n"); +#endif + +#if defined(USE_X86_ASM) + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "D" ((long)vb), "S" ((long)tmp) + : "memory" ); +#else + for (j = 0 ; j < vertsize ; j++) + vb[j] = tmp->ui[j]; + +#endif + +} + +static __inline__ void i830_draw_line( i830ContextPtr imesa, + i830VertexPtr v0, + i830VertexPtr v1 ) +{ + GLuint vertsize = imesa->vertsize; + int j; + GLuint *vb = i830AllocDwordsInline( imesa, 2 * vertsize ); + +#if 0 + if(imesa->vertex_prim != PRIM3D_LINELIST) fprintf(stderr, "Not lines and rendering lines : prim %d\n", imesa->vertex_prim); +#endif + +#if 0 + fprintf(stderr, "\n\n\n\nDrawLine"); + fprintf(stderr, "v0\n"); + fprintf(stderr, "0x%x\n", v0->ui[0]); + fprintf(stderr, "0x%x\n", v0->ui[1]); + fprintf(stderr, "0x%x\n", v0->ui[2]); + fprintf(stderr, "0x%x\n", v0->ui[3]); + fprintf(stderr, "0x%x\n", v0->ui[4]); + fprintf(stderr, "0x%x\n", v0->ui[5]); + fprintf(stderr, "0x%x\n", v0->ui[6]); + fprintf(stderr, "0x%x\n", v0->ui[7]); + fprintf(stderr, "0x%x\n", v0->ui[8]); + fprintf(stderr, "0x%x\n", v0->ui[9]); + fprintf(stderr, "0x%x\n", v0->ui[10]); + fprintf(stderr, "0x%x\n", v0->ui[11]); + fprintf(stderr, "0x%x\n", v0->ui[12]); + fprintf(stderr, "0x%x\n", v0->ui[13]); + fprintf(stderr, "0x%x\n", v0->ui[14]); + fprintf(stderr, "0x%x\n", v0->ui[15]); + fprintf(stderr, "v1\n"); + fprintf(stderr, "0x%x\n", v1->ui[0]); + fprintf(stderr, "0x%x\n", v1->ui[1]); + fprintf(stderr, "0x%x\n", v1->ui[2]); + fprintf(stderr, "0x%x\n", v1->ui[3]); + fprintf(stderr, "0x%x\n", v1->ui[4]); + fprintf(stderr, "0x%x\n", v1->ui[5]); + fprintf(stderr, "0x%x\n", v1->ui[6]); + fprintf(stderr, "0x%x\n", v1->ui[7]); + fprintf(stderr, "0x%x\n", v1->ui[8]); + fprintf(stderr, "0x%x\n", v1->ui[9]); + fprintf(stderr, "0x%x\n", v1->ui[10]); + fprintf(stderr, "0x%x\n", v1->ui[11]); + fprintf(stderr, "0x%x\n", v1->ui[12]); + fprintf(stderr, "0x%x\n", v1->ui[13]); + fprintf(stderr, "0x%x\n", v1->ui[14]); + fprintf(stderr, "0x%x\n", v1->ui[15]); +#endif + +#if defined(USE_X86_ASM) + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "D" ((long)vb), "S" ((long)v0) + : "memory" ); + __asm__ __volatile__( "rep ; movsl" + : "=%c" (j) + : "0" (vertsize), "S" ((long)v1) + : "memory" ); +#else + for (j = 0 ; j < vertsize ; j++) + vb[j] = v0->ui[j]; + + vb += vertsize; + for (j = 0 ; j < vertsize ; j++) + vb[j] = v1->ui[j]; +#endif +} + + +#endif Index: xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h Thu Oct 4 14:28:21 2001 @@ -0,0 +1,276 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_tritmp.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +static __inline void TAG(triangle)(GLcontext *ctx, + GLuint e0, GLuint e1, GLuint e2, + GLuint pv) +{ + i830ContextPtr imesa = I830_CONTEXT(ctx); + struct vertex_buffer *VB = ctx->VB; + i830VertexPtr i830verts = I830_DRIVER_DATA(VB)->verts; + i830Vertex *v[3]; + +#if (IND & I830_OFFSET_BIT) + GLfloat offset; + GLfloat z[3]; +#endif + +#if (IND & (I830_TWOSIDE_BIT | I830_FLAT_BIT)) + GLuint c[3]; + GLuint s[3]; +#endif + + v[0] = &i830verts[e0]; + v[1] = &i830verts[e1]; + v[2] = &i830verts[e2]; + +#if (IND & (I830_TWOSIDE_BIT | I830_FLAT_BIT)) + c[0] = v[0]->ui[4]; + c[1] = v[1]->ui[4]; + c[2] = v[2]->ui[4]; + s[0] = v[0]->ui[5]; + s[1] = v[1]->ui[5]; + s[2] = v[2]->ui[5]; +#endif + + +#if (IND & (I830_TWOSIDE_BIT | I830_OFFSET_BIT)) + { + GLfloat ex = v[0]->v.x - v[2]->v.x; + GLfloat ey = v[0]->v.y - v[2]->v.y; + GLfloat fx = v[1]->v.x - v[2]->v.x; + GLfloat fy = v[1]->v.y - v[2]->v.y; + GLfloat cc = ex*fy - ey*fx; + +#if (IND & I830_TWOSIDE_BIT) + { + GLuint facing = (cc > 0.0) ^ ctx->Polygon.FrontBit; + GLubyte (*vbcolor)[4] = VB->Color[facing]->data; + GLubyte (*vbspec)[4] = VB->Spec[facing]; + if (IND & I830_FLAT_BIT) { + I830_COLOR((char *)&v[0]->ui[4], vbcolor[pv]); + v[2]->ui[4] = v[1]->ui[4] = v[0]->ui[4]; + I830_COLOR3((char *)&v[0]->ui[5], vbspec[pv]); + v[2]->ui[5] = v[1]->ui[5] = v[0]->ui[5]; + } else { + I830_COLOR((char *)&v[0]->ui[4], vbcolor[e0]); + I830_COLOR((char *)&v[1]->ui[4], vbcolor[e1]); + I830_COLOR((char *)&v[2]->ui[4], vbcolor[e2]); + I830_COLOR3((char *)&v[0]->ui[5], vbspec[e0]); + I830_COLOR3((char *)&v[1]->ui[5], vbspec[e1]); + I830_COLOR3((char *)&v[2]->ui[5], vbspec[e2]); + } + } +#endif + +#if (IND & I830_OFFSET_BIT) + { + /*offset = ctx->Polygon.OffsetUnits * 1.0/0x10000;*/ + offset = ctx->Polygon.OffsetUnits * imesa->depth_scale; + z[0] = v[0]->v.z; + z[1] = v[1]->v.z; + z[2] = v[2]->v.z; + if (cc * cc > 1e-16) { + GLfloat ez = z[0] - z[2]; + GLfloat fz = z[1] - z[2]; + GLfloat a = ey*fz - ez*fy; + GLfloat b = ez*fx - ex*fz; + GLfloat ic = 1.0 / cc; + GLfloat ac = a * ic; + GLfloat bc = b * ic; + if (ac < 0.0f) ac = -ac; + if (bc < 0.0f) bc = -bc; + offset += MAX2(ac, bc) * ctx->Polygon.OffsetFactor; + } + v[0]->v.z += offset; + v[1]->v.z += offset; + v[2]->v.z += offset; + } +#endif + } +#elif (IND & I830_FLAT_BIT) + { + GLuint color = i830verts[pv].ui[4]; + GLuint spec = i830verts[pv].ui[5]; + v[0]->ui[4] = color; + v[1]->ui[4] = color; + v[2]->ui[4] = color; + v[0]->ui[5] = spec; + v[1]->ui[5] = spec; + v[2]->ui[5] = spec; + } +#endif + + i830_draw_triangle( imesa, v[0], v[1], v[2] ); + +#if (IND & I830_OFFSET_BIT) + v[0]->v.z = z[0]; + v[1]->v.z = z[1]; + v[2]->v.z = z[2]; +#endif + +#if (IND & (I830_FLAT_BIT | I830_TWOSIDE_BIT)) + v[0]->ui[4] = c[0]; + v[1]->ui[4] = c[1]; + v[2]->ui[4] = c[2]; + v[0]->ui[5] = s[0]; + v[1]->ui[5] = s[1]; + v[2]->ui[5] = s[2]; +#endif + +} + + + + +static void TAG(quad)( GLcontext *ctx, GLuint v0, + GLuint v1, GLuint v2, GLuint v3, + GLuint pv ) +{ + TAG(triangle)( ctx, v0, v1, v3, pv ); + TAG(triangle)( ctx, v1, v2, v3, pv ); +} + + +static void TAG(line)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + i830VertexPtr i830VB = I830_DRIVER_DATA(ctx->VB)->verts; + GLfloat z0, z1; + GLuint c0, c1; + GLuint s0, s1; + i830Vertex *vert0 = &i830VB[v0]; + i830Vertex *vert1 = &i830VB[v1]; + + if (IND & I830_TWOSIDE_BIT) { + GLubyte (*vbcolor)[4] = ctx->VB->ColorPtr->data; + GLubyte (*vbspec)[4] = ctx->VB->Specular; + + if (IND & I830_FLAT_BIT) { + I830_COLOR((char *)&vert0->v.color,vbcolor[pv]); + *(int *)&vert1->v.color = *(int *)&vert0->v.color; + I830_COLOR3((char *)&vert0->v.specular, vbspec[pv]); + *(int *)&vert1->v.specular = *(int *)&vert0->v.specular; + } else { + I830_COLOR((char *)&vert0->v.color,vbcolor[v0]); + I830_COLOR((char *)&vert1->v.color,vbcolor[v1]); + I830_COLOR3((char *)&vert0->v.specular, vbspec[v0]); + I830_COLOR3((char *)&vert1->v.specular, vbspec[v1]); + } + } else if (IND & I830_FLAT_BIT) { + c0 = *(GLuint *) &(vert0->v.color); + c1 = *(GLuint *) &(vert1->v.color); + *(int *)&vert0->v.color = + *(int *)&vert1->v.color = *(int *)&i830VB[pv].v.color; + s0 = *(GLuint *) &(vert0->v.specular); + s1 = *(GLuint *) &(vert1->v.specular); + *(int *)&vert0->v.specular = + *(int *)&vert1->v.specular = *(int *)&i830VB[pv].v.specular; + } + + if (IND & I830_OFFSET_BIT) { + /*GLfloat offset = ctx->LineZoffset * (1.0 / 0x10000);*/ + GLfloat offset = ctx->LineZoffset * imesa->depth_scale; + z0 = vert0->v.z; + z1 = vert1->v.z; + vert0->v.z += offset; + vert1->v.z += offset; + } + + i830_draw_line( imesa, &i830VB[v0], &i830VB[v1]); + + if (IND & I830_OFFSET_BIT) { + vert0->v.z = z0; + vert1->v.z = z1; + } + + if ((IND & I830_FLAT_BIT) && !(IND & I830_TWOSIDE_BIT)) { + *(GLuint *) &(vert0->v.color) = c0; + *(GLuint *) &(vert1->v.color) = c1; + *(GLuint *) &(vert0->v.specular) = s0; + *(GLuint *) &(vert1->v.specular) = s1; + } +} + +static void TAG(points)( GLcontext *ctx, GLuint first, GLuint last ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + struct vertex_buffer *VB = ctx->VB; + i830VertexPtr i830VB = I830_DRIVER_DATA(VB)->verts; + GLfloat sz = ctx->Point.Size * .5; + int i; + + for(i=first;iClipMask[i]==0) { + if (IND & (I830_TWOSIDE_BIT|I830_OFFSET_BIT)) { + i830Vertex tmp0 = i830VB[i]; + if (IND & I830_TWOSIDE_BIT) { + GLubyte (*vbcolor)[4] = VB->ColorPtr->data; + I830_COLOR((char *)&tmp0.v.color, vbcolor[i]); + } + if (IND & I830_OFFSET_BIT) { + /*GLfloat offset = ctx->PointZoffset * (1.0 / 0x10000);*/ + GLfloat offset = ctx->PointZoffset * imesa->depth_scale; + tmp0.v.z += offset; + } + tmp0.f[0] -= 0.125; + tmp0.f[1] -= 0.125; + i830_draw_point( imesa, &tmp0, sz ); + } else { + i830VB[i].f[0] -= 0.125; + i830VB[i].f[1] -= 0.125; + i830_draw_point( imesa, &i830VB[i], sz ); + i830VB[i].f[0] += 0.125; + i830VB[i].f[1] += 0.125; + } + } +} + + + + +static void TAG(init)( void ) +{ + tri_tab[IND] = TAG(triangle); + quad_tab[IND] = TAG(quad); + line_tab[IND] = TAG(line); + points_tab[IND] = TAG(points); +} + + +#undef IND +#undef TAG Index: xc/lib/GL/mesa/src/drv/i830/i830_vb.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_vb.c:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_vb.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,480 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vb.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#include +#include + +#include "i830_drv.h" +#include "mem.h" +#include "stages.h" + +#define TEX0 { \ + v->v.tu0 = tc0[i][0]; \ + v->v.tv0 = tc0[i][1]; \ +} + +#define TEX1 { \ + v->v.tu1 = tc1[i][0]; \ + v->v.tv1 = tc1[i][1]; \ +} + +/* Doesn't seem to work very well (golly). + */ +#define SPC { \ + GLubyte *spec = &(VB->Spec[0][i][0]); \ + v->v.specular.red = spec[0]; \ + v->v.specular.green = spec[1]; \ + v->v.specular.blue = spec[2]; \ +} + +#define FOG { \ + GLubyte *spec = &(VB->Spec[0][i][0]); \ + v->v.specular.alpha = spec[3]; \ +} + +#define COL { \ + GLubyte *col = &(VB->Color[0]->data[i][0]); \ + v->v.color.blue = col[2]; \ + v->v.color.green = col[1]; \ + v->v.color.red = col[0]; \ + v->v.color.alpha = col[3]; \ +} + +/* The vertex formats we have don't seem to support projective texturing + * in the multitexture case. (Would require another 1/w value for the + * second set of texcoords). + * XXX grantham - i830 does q coordinate, haven't spent time to figure out + * how to implement dynamic HOMOGENOUS coord; plus need to copy tc[i][2] + * for cube maps, not tc[i][3] + */ +#define TEX0_4 \ + if (VB->TexCoordPtr[0]->size == 4) \ + { \ + GLfloat (*tc)[4] = VB->TexCoordPtr[0]->data; \ + v = &(I830_DRIVER_DATA(VB)->verts[start]); \ + imesa->setupdone &= ~I830_WIN_BIT; \ + for (i=start; i < end; i++, v++) { \ + float oow = 1.0 / tc[i][3]; \ + v->v.oow *= tc[i][3]; \ + v->v.tu0 *= oow; \ + v->v.tv0 *= oow; \ + } \ + } + +#define COORD \ + GLfloat *win = VB->Win.data[i]; \ + v->v.x = xoffset + win[0]; \ + v->v.y = yoffset - win[1]; \ + v->v.z = depth_scale * win[2]; \ + v->v.oow = win[3]; + + +#define NOP +#define SUBPIXEL_X 0.125 +#define SUBPIXEL_Y 0.125 + +#define SETUPFUNC(name,win,col,tex0,tex1,tex0_4,spec,fog) \ +static void name(struct vertex_buffer *VB, GLuint start, GLuint end) \ +{ \ + i830ContextPtr imesa = I830_CONTEXT( VB->ctx ); \ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ + i830VertexPtr v; \ + GLfloat (*tc0)[4]; \ + GLfloat (*tc1)[4]; \ + const GLfloat depth_scale = imesa->depth_scale; \ + const GLfloat xoffset = SUBPIXEL_X; \ + const GLfloat yoffset = dPriv->h + SUBPIXEL_Y; \ + int i; \ + (void) xoffset; \ + (void) yoffset; \ + (void) imesa; \ + (void) depth_scale; \ + \ + \ + gl_import_client_data( VB, VB->ctx->RenderFlags, \ + (VB->ClipOrMask \ + ? VEC_WRITABLE|VEC_GOOD_STRIDE \ + : VEC_GOOD_STRIDE)); \ + \ + tc0 = VB->TexCoordPtr[0]->data; \ + tc1 = VB->TexCoordPtr[1]->data; \ + \ + v = &(I830_DRIVER_DATA(VB)->verts[start]); \ + \ + if (VB->ClipOrMask == 0) \ + for (i=start; i < end; i++, v++) { \ + win; \ + col; \ + spec; \ + fog; \ + tex0; \ + tex1; \ + } \ + else \ + for (i=start; i < end; i++, v++) { \ + if (VB->ClipMask[i] == 0) { \ + win; \ + spec; \ + fog; \ + tex0; \ + tex1; \ + } \ + col; \ + } \ + tex0_4; \ + /* tex1_4; */ \ + /* tex2_4; */ \ + /* tex3_4; */ \ +} + + +SETUPFUNC(rs_wt0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,NOP) +SETUPFUNC(rs_wt0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,NOP) +SETUPFUNC(rs_wft0, COORD,NOP,TEX0,NOP,TEX0_4,NOP,FOG) +SETUPFUNC(rs_wft0t1, COORD,NOP,TEX0,TEX1,TEX0_4,NOP,FOG) +SETUPFUNC(rs_wg, COORD,COL,NOP,NOP,NOP,NOP,NOP) +SETUPFUNC(rs_wgs, COORD,COL,NOP,NOP,NOP,SPC,NOP) +SETUPFUNC(rs_wgt0, COORD,COL,TEX0,NOP,TEX0_4,NOP,NOP) +SETUPFUNC(rs_wgt0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,NOP) +SETUPFUNC(rs_wgst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,NOP) +SETUPFUNC(rs_wgst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,NOP) +SETUPFUNC(rs_wgf, COORD,COL,NOP,NOP,NOP,NOP,FOG) +SETUPFUNC(rs_wgfs, COORD,COL,NOP,NOP,NOP,SPC,FOG) +SETUPFUNC(rs_wgft0, COORD,COL,TEX0,NOP,TEX0_4,NOP,FOG) +SETUPFUNC(rs_wgft0t1, COORD,COL,TEX0,TEX1,TEX0_4,NOP,FOG) +SETUPFUNC(rs_wgfst0, COORD,COL,TEX0,NOP,TEX0_4,SPC,FOG) +SETUPFUNC(rs_wgfst0t1, COORD,COL,TEX0,TEX1,TEX0_4,SPC,FOG) + +SETUPFUNC(rs_t0, NOP,NOP,TEX0,NOP,TEX0_4,NOP,NOP) +SETUPFUNC(rs_t0t1, NOP,NOP,TEX0,TEX1,TEX0_4,NOP,NOP) +SETUPFUNC(rs_f, NOP,NOP,NOP,NOP,NOP,NOP,FOG) +SETUPFUNC(rs_ft0, NOP,NOP,TEX0,NOP,TEX0_4,NOP,FOG) +SETUPFUNC(rs_ft0t1, NOP,NOP,TEX0,TEX1,TEX0_4,NOP,FOG) +SETUPFUNC(rs_g, NOP,COL,NOP,NOP,NOP,NOP,NOP) +SETUPFUNC(rs_gs, NOP,COL,NOP,NOP,NOP,SPC,NOP) +SETUPFUNC(rs_gt0, NOP,COL,TEX0,NOP,TEX0_4,NOP,NOP) +SETUPFUNC(rs_gt0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,NOP) +SETUPFUNC(rs_gst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,NOP) +SETUPFUNC(rs_gst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,NOP) +SETUPFUNC(rs_gf, NOP,COL,NOP,NOP,NOP,NOP,FOG) +SETUPFUNC(rs_gfs, NOP,COL,NOP,NOP,NOP,SPC,FOG) +SETUPFUNC(rs_gft0, NOP,COL,TEX0,NOP,TEX0_4,NOP,FOG) +SETUPFUNC(rs_gft0t1, NOP,COL,TEX0,TEX1,TEX0_4,NOP,FOG) +SETUPFUNC(rs_gfst0, NOP,COL,TEX0,NOP,TEX0_4,SPC,FOG) +SETUPFUNC(rs_gfst0t1, NOP,COL,TEX0,TEX1,TEX0_4,SPC,FOG) + + + +static void rs_invalid(struct vertex_buffer *VB, GLuint start, GLuint end) +{ + + fprintf(stderr, "i830RasterSetup(): invalid setup function\n"); +} + +typedef void (*setupFunc)(struct vertex_buffer *,GLuint,GLuint); + +static setupFunc setup_func[0x80]; + +void i830DDSetupInit( void ) +{ + int i; + + for (i = 0 ; i < 0x80 ; i++) + setup_func[i] = rs_invalid; + + /* Functions to build vert's from scratch */ + setup_func[I830_WIN_BIT|I830_TEX0_BIT] = rs_wt0; + setup_func[I830_WIN_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wt0t1; + setup_func[I830_WIN_BIT|I830_FOG_BIT|I830_TEX0_BIT] = rs_wft0; + setup_func[I830_WIN_BIT|I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wft0t1; + setup_func[I830_WIN_BIT|I830_RGBA_BIT] = rs_wg; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_SPEC_BIT] = rs_wgs; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_TEX0_BIT] = rs_wgt0; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgt0t1; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_wgst0; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgst0t1; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT] = rs_wgf; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT] = rs_wgfs; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT] = rs_wgft0; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgft0t1; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_wgfst0; + setup_func[I830_WIN_BIT|I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_wgfst0t1; + + /* Repair functions */ + setup_func[I830_TEX0_BIT] = rs_t0; + setup_func[I830_TEX0_BIT|I830_TEX1_BIT] = rs_t0t1; + setup_func[I830_FOG_BIT] = rs_f; + setup_func[I830_FOG_BIT|I830_TEX0_BIT] = rs_ft0; + setup_func[I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_ft0t1; + setup_func[I830_RGBA_BIT] = rs_g; + setup_func[I830_RGBA_BIT|I830_SPEC_BIT] = rs_gs; + setup_func[I830_RGBA_BIT|I830_TEX0_BIT] = rs_gt0; + setup_func[I830_RGBA_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gt0t1; + setup_func[I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_gst0; + setup_func[I830_RGBA_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gst0t1; + setup_func[I830_RGBA_BIT|I830_FOG_BIT] = rs_gf; + setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT] = rs_gfs; + setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT] = rs_gft0; + setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gft0t1; + setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT] = rs_gfst0; + setup_func[I830_RGBA_BIT|I830_FOG_BIT|I830_SPEC_BIT|I830_TEX0_BIT|I830_TEX1_BIT] = rs_gfst0t1; + +} + + +void i830PrintSetupFlags(char *msg, GLuint flags ) +{ + fprintf(stderr, "%s: %d %s%s%s%s%s%s%s\n", + msg, + (int)flags, + (flags & I830_WIN_BIT) ? " xyzw," : "", + (flags & I830_RGBA_BIT) ? " rgba," : "", + (flags & I830_SPEC_BIT) ? " spec," : "", + (flags & I830_FOG_BIT) ? " fog," : "", + (flags & I830_TEX0_BIT) ? " tex-0," : "", + (flags & I830_TEX1_BIT) ? " tex-1," : "", + (flags & I830_ALPHA_BIT) ? " alpha," : ""); +} + + +void i830ChooseRasterSetupFunc(GLcontext *ctx) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + int funcindex = (I830_WIN_BIT | I830_RGBA_BIT); + + if(I830_DEBUG&DEBUG_VERBOSE_TRACE) + fprintf(stderr, "%s\n", __FUNCTION__); + + imesa->vertsize = 8; + imesa->Setup[I830_CTXREG_VF] = VRTX_FORMAT_NTEX(1); + + if (ctx->Texture.ReallyEnabled & 0xf) + funcindex |= I830_TEX0_BIT; + + if (ctx->Texture.ReallyEnabled & 0xf0) { + funcindex |= (I830_TEX0_BIT | I830_TEX1_BIT); + imesa->vertsize = 10; + imesa->Setup[I830_CTXREG_VF] = VRTX_FORMAT_NTEX(2); + } + + if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + funcindex |= I830_SPEC_BIT; + + if (ctx->FogMode == FOG_FRAGMENT) + funcindex |= I830_FOG_BIT; + + if (MESA_VERBOSE) + i830PrintSetupFlags("xsmesa: full setup function", funcindex); + + imesa->setupindex = funcindex; + ctx->Driver.RasterSetup = setup_func[funcindex]; + if(0) fprintf(stderr, "funcindex : 0x%x\n", funcindex); +} + + + + +void i830DDCheckPartialRasterSetup( GLcontext *ctx, + struct gl_pipeline_stage *d ) +{ + i830ContextPtr imesa = I830_CONTEXT( ctx ); + GLuint tmp = imesa->setupdone; + + d->type = 0; + imesa->setupdone = 0; /* cleared if we return */ + + if ((ctx->Array.Summary & VERT_OBJ_ANY) == 0) + return; + + if (ctx->IndirectTriangles) + return; + + imesa->setupdone = tmp; + + /* disabled until we have a merge&render op */ + /* d->inputs = available; */ + /* d->outputs = VERT_RAST_SETUP_PART; */ + /* d->type = PIPE_PRECALC; */ +} + + +/* Repair existing precalculated vertices with new data. + */ +void i830DDPartialRasterSetup( struct vertex_buffer *VB ) +{ + i830ContextPtr imesa = I830_CONTEXT( VB->ctx ); + GLuint new = VB->pipeline->new_outputs; + GLuint available = VB->pipeline->outputs; + GLuint ind = 0; + + if (new & VERT_WIN) { + new = available; + ind |= I830_WIN_BIT | I830_FOG_BIT; + } + + if (new & VERT_RGBA) + ind |= I830_RGBA_BIT | I830_SPEC_BIT; + + if (new & VERT_TEX0_ANY) + ind |= I830_TEX0_BIT; + + if (new & VERT_TEX1_ANY) + ind |= I830_TEX1_BIT; + + if (new & VERT_FOG_COORD) + ind |= I830_FOG_BIT; + + imesa->setupdone &= ~ind; + ind &= imesa->setupindex; + imesa->setupdone |= ind; + + if (0) i830PrintSetupFlags("xsmesa: partial setup function", ind); + + if (ind) + setup_func[ind&~I830_ALPHA_BIT]( VB, VB->Start, VB->Count ); +} + + +void i830DDDoRasterSetup( struct vertex_buffer *VB ) +{ + GLcontext *ctx = VB->ctx; + + if (VB->Type == VB_CVA_PRECALC) + i830DDPartialRasterSetup( VB ); + else if (ctx->Driver.RasterSetup) + ctx->Driver.RasterSetup( VB, VB->CopyStart, VB->Count ); +} + + + + +void i830DDResizeVB( struct vertex_buffer *VB, GLuint size ) +{ + i830VertexBufferPtr mvb = I830_DRIVER_DATA(VB); + + while (mvb->size < size) + mvb->size *= 2; + + free( mvb->vert_store ); + mvb->vert_store = malloc( sizeof(i830Vertex) * mvb->size + 31); + if (!mvb->vert_store) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + + mvb->verts = (i830VertexPtr)(((unsigned long)mvb->vert_store + 31) & ~31); + + gl_vector1ui_free( &mvb->clipped_elements ); + gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); + if (!mvb->clipped_elements.start) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + + ALIGN_FREE( VB->ClipMask ); + VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); + if (!VB->ClipMask) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + + + if (VB->Type == VB_IMMEDIATE) { + free( mvb->primitive ); + free( mvb->next_primitive ); + mvb->primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); + mvb->next_primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); + if (!mvb->primitive || !mvb->next_primitive) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + } +} + + +void i830DDRegisterVB( struct vertex_buffer *VB ) +{ + i830VertexBufferPtr mvb; + + mvb = (i830VertexBufferPtr)calloc( 1, sizeof(*mvb) ); + + mvb->size = VB->Size * 2; + mvb->vert_store = malloc( sizeof(i830Vertex) * mvb->size + 31); + if (!mvb->vert_store) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + + mvb->verts = (i830VertexPtr)(((unsigned long)mvb->vert_store + 31) & ~31); + + gl_vector1ui_alloc( &mvb->clipped_elements, VEC_WRITABLE, mvb->size, 32 ); + if (!mvb->clipped_elements.start) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + + ALIGN_FREE( VB->ClipMask ); + VB->ClipMask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte) * mvb->size, 4); + if (!VB->ClipMask) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + + mvb->primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); + mvb->next_primitive = (GLuint *)malloc( sizeof(GLuint) * mvb->size ); + if (!mvb->primitive || !mvb->next_primitive) { + fprintf(stderr, "i830glx: out of memory !\n"); + exit(1); + } + + VB->driver_data = mvb; +} + + +void i830DDUnregisterVB( struct vertex_buffer *VB ) +{ + i830VertexBufferPtr mvb = I830_DRIVER_DATA(VB); + + if (mvb) { + if (mvb->vert_store) free(mvb->vert_store); + if (mvb->primitive) free(mvb->primitive); + if (mvb->next_primitive) free(mvb->next_primitive); + gl_vector1ui_free( &mvb->clipped_elements ); + free(mvb); + VB->driver_data = 0; + } +} Index: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h Thu Oct 4 14:28:21 2001 @@ -0,0 +1,10898 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_points.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +/* Here is a list of vertex structures that the hardware supports + * for points. + */ + +/* Points with xyzw coords */ + +/* Non-Textured Points */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xyzw_argb_spec_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; +} i830_xyzw_argb_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; +} i830_xyzw_spec_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; +} i830_xyzw_point; + +/* Textured Points */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xyzw_argb_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tp1_tp2_tp3_point; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tc1_tc2_tc3_point; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tc1_tc2_tc3_point; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tp1_tc2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tc1_tp2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tp1_tc2_tc3_point; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tp1_tp2_tc3_point; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tc1_tp2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tp1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tc1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tp1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tc1_tp2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tp1_tc2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tp1_tp2_tp3_point; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tp0_tp1_tp2_point; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_tc0_tc1_tc2_point; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_tp0_tc1_tc2_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_tp0_tp1_tc2_point; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tp0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_tc0_tp1_tc2_point; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tc0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tc0_tp1_tp2_point; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_tp0_tp1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_tp0_tp1_point; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_argb_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_argb_tc0_tc1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_tc0_tc1_point; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_argb_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_argb_tp0_tc1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_tp0_tc1_point; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_tc0_tp1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_tc0_tp1_point; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyzw_argb_spec_tp0_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xyzw_argb_tp0_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyzw_spec_tp0_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; +} i830_xyzw_tp0_point; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyzw_argb_spec_tc0_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; +} i830_xyzw_argb_tc0_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyzw_spec_tc0_point; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; +} i830_xyzw_tc0_point; + + +/* Points w/ xyz coords */ + +/* Non-Textured Points */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xyz_argb_spec_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; +} i830_xyz_argb_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; +} i830_xyz_spec_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; +} i830_xyz_point; + +/* Textured Points */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xyz_argb_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tp1_tp2_tp3_point; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tc0_tc1_tc2_tc3_point; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tp0_tc1_tc2_tc3_point; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tc0_tp1_tc2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tc0_tc1_tp2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tp0_tp1_tc2_tc3_point; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tc0_tp1_tp2_tc3_point; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tc1_tp2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tp1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tp0_tc1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tp0_tp1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tc1_tp2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tp1_tc2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tp1_tp2_tp3_point; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tp0_tp1_tp2_point; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_tc0_tc1_tc2_point; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_tp0_tc1_tc2_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_tp0_tp1_tc2_point; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tp0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_tc0_tp1_tc2_point; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tc0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tc0_tp1_tp2_point; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_tp0_tp1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_tp0_tp1_point; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_argb_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_argb_tc0_tc1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_tc0_tc1_point; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_argb_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_argb_tp0_tc1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_tp0_tc1_point; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_tc0_tp1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_tc0_tp1_point; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyz_argb_spec_tp0_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xyz_argb_tp0_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyz_spec_tp0_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; + float tq0; +} i830_xyz_tp0_point; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyz_argb_spec_tc0_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; +} i830_xyz_argb_tc0_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyz_spec_tc0_point; + +typedef struct { + float x; + float y; + float z; + + float point_width; + + float tu0; + float tv0; +} i830_xyz_tc0_point; + + +/* Points w/ xy coords */ + +/* Non-Textured Points */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xy_argb_spec_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; +} i830_xy_argb_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; +} i830_xy_spec_point; + +typedef struct { + float x; + float y; + + float point_width; +} i830_xy_point; + +/* Textured Points */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xy_argb_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tp1_tp2_tp3_point; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tc0_tc1_tc2_tc3_point; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tp0_tc1_tc2_tc3_point; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tc0_tp1_tc2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tc0_tc1_tp2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tp0_tp1_tc2_tc3_point; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tc0_tp1_tp2_tc3_point; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tc1_tp2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tp1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tp0_tc1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tp0_tp1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tc1_tp2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tp1_tc2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tp1_tp2_tp3_point; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tp0_tp1_tp2_point; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_tc0_tc1_tc2_point; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_tp0_tc1_tc2_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_tp0_tp1_tc2_point; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tp0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_tc0_tp1_tc2_point; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tc0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tc0_tp1_tp2_point; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_tp0_tp1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_tp0_tp1_point; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_argb_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_argb_tc0_tc1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_tc0_tc1_point; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_argb_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_argb_tp0_tc1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_tp0_tc1_point; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_tc0_tp1_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_tc0_tp1_point; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xy_argb_spec_tp0_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xy_argb_tp0_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xy_spec_tp0_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; + float tq0; +} i830_xy_tp0_point; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xy_argb_spec_tc0_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int argb; + + float tu0; + float tv0; +} i830_xy_argb_tc0_point; + +typedef struct { + float x; + float y; + + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xy_spec_tc0_point; + +typedef struct { + float x; + float y; + + float point_width; + + float tu0; + float tv0; +} i830_xy_tc0_point; + +/* Points w/ xyw coords */ + +/* Non-Textured Points */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xyw_argb_spec_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; +} i830_xyw_argb_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; +} i830_xyw_spec_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; +} i830_xyw_point; + +/* Textured Points */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xyw_argb_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tp1_tp2_tp3_point; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tc0_tc1_tc2_tc3_point; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tc1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tp0_tc1_tc2_tc3_point; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tc0_tp1_tc2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tc0_tc1_tp2_tc3_point; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tp1_tc2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tp0_tp1_tc2_tc3_point; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tc0_tp1_tp2_tc3_point; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tc1_tp2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tp1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tc1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tc1_tc2_tp3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tc1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tp0_tc1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tp1_tp2_tc3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tp0_tp1_tp2_tc3_point; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tc1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tc1_tp2_tp3_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tp1_tc2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tp1_tc2_tp3_point; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tp1_tp2_tp3_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tp1_tp2_tp3_point; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tp0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tp0_tp1_tp2_point; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_spec_tc0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_tc0_tc1_tc2_point; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_spec_tp0_tc1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_tp0_tc1_tc2_point; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_spec_tp0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_tp0_tp1_tc2_point; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tp0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tp0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_spec_tc0_tp1_tc2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_tc0_tp1_tc2_point; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tc0_tc1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tc0_tc1_tp2_point; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tc0_tp1_tp2_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tc0_tp1_tp2_point; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_tp0_tp1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_spec_tp0_tp1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_tp0_tp1_point; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_argb_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_argb_tc0_tc1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_spec_tc0_tc1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_tc0_tc1_point; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_argb_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_argb_tp0_tc1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_spec_tp0_tc1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_tp0_tc1_point; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_tc0_tp1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_spec_tc0_tp1_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_tc0_tp1_point; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyw_argb_spec_tp0_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xyw_argb_tp0_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyw_spec_tp0_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; + float tq0; +} i830_xyw_tp0_point; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyw_argb_spec_tc0_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int argb; + + float tu0; + float tv0; +} i830_xyw_argb_tc0_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyw_spec_tc0_point; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + float point_width; + + float tu0; + float tv0; +} i830_xyw_tc0_point; Index: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h Thu Oct 4 14:28:21 2001 @@ -0,0 +1,10894 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_vert_form_tris.h,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +/* Here is a list of vertex structures that the hardware supports + * for triangles. + */ + +/* Triangles with xyzw coords */ + +/* Non-Textured Triangles */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xyzw_argb_spec_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; +} i830_xyzw_argb_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; +} i830_xyzw_spec_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + +} i830_xyzw_tri; + +/* Textured Triangles */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xyzw_argb_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tp1_tp2_tp3_tri; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tc1_tc2_tc3_tri; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tc1_tc2_tc3_tri; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tp1_tc2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tc1_tp2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tp1_tc2_tc3_tri; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tc0_tp1_tp2_tc3_tri; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tc1_tp2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tp1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tc1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_argb_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyzw_tp0_tp1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tc1_tp2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tp0_tp1_tc2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_argb_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyzw_tc0_tp1_tp2_tp3_tri; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tp0_tp1_tp2_tri; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_tc0_tc1_tc2_tri; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_argb_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyzw_tp0_tc1_tc2_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_tp0_tp1_tc2_tri; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tp0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_argb_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyzw_tc0_tp1_tc2_tri; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tc0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_argb_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyzw_tc0_tp1_tp2_tri; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_tp0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_tp0_tp1_tri; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_argb_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_argb_tc0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyzw_tc0_tc1_tri; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_argb_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_argb_tp0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyzw_tp0_tc1_tri; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_argb_tc0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyzw_tc0_tp1_tri; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyzw_argb_spec_tp0_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xyzw_argb_tp0_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyzw_spec_tp0_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; +} i830_xyzw_tp0_tri; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyzw_argb_spec_tc0_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; +} i830_xyzw_argb_tc0_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyzw_spec_tc0_tri; + +typedef struct { + float x; + float y; + float z; + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; +} i830_xyzw_tc0_tri; + + +/* Triangles w/ xyz coords */ + +/* Non-Textured Triangles */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xyz_argb_spec_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; +} i830_xyz_argb_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; +} i830_xyz_spec_tri; + +typedef struct { + float x; + float y; + float z; + + +} i830_xyz_tri; + +/* Textured Triangles */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xyz_argb_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tp1_tp2_tp3_tri; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tc0_tc1_tc2_tc3_tri; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tp0_tc1_tc2_tc3_tri; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tc0_tp1_tc2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tc0_tc1_tp2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyz_tp0_tp1_tc2_tc3_tri; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tc0_tp1_tp2_tc3_tri; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tc1_tp2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tp1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tp0_tc1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_argb_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyz_tp0_tp1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tc1_tp2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tp0_tp1_tc2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_argb_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyz_tc0_tp1_tp2_tp3_tri; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tp0_tp1_tp2_tri; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_tc0_tc1_tc2_tri; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_argb_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyz_tp0_tc1_tc2_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_tp0_tp1_tc2_tri; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tp0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_argb_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyz_tc0_tp1_tc2_tri; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tc0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_argb_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyz_tc0_tp1_tp2_tri; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_tp0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_tp0_tp1_tri; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_argb_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_argb_tc0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyz_tc0_tc1_tri; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_argb_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_argb_tp0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyz_tp0_tc1_tri; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_argb_tc0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyz_tc0_tp1_tri; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyz_argb_spec_tp0_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xyz_argb_tp0_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyz_spec_tp0_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; + float tq0; +} i830_xyz_tp0_tri; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyz_argb_spec_tc0_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int argb; + + float tu0; + float tv0; +} i830_xyz_argb_tc0_tri; + +typedef struct { + float x; + float y; + float z; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyz_spec_tc0_tri; + +typedef struct { + float x; + float y; + float z; + + + + float tu0; + float tv0; +} i830_xyz_tc0_tri; + + +/* Triangles w/ xy coords */ + +/* Non-Textured Triangles */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xy_argb_spec_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; +} i830_xy_argb_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; +} i830_xy_spec_tri; + +typedef struct { + float x; + float y; + + +} i830_xy_tri; + +/* Textured Triangles */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xy_argb_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tp1_tp2_tp3_tri; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tc0_tc1_tc2_tc3_tri; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tp0_tc1_tc2_tc3_tri; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tc0_tp1_tc2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tc0_tc1_tp2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xy_tp0_tp1_tc2_tc3_tri; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tc0_tp1_tp2_tc3_tri; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tc1_tp2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tp1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tp0_tc1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_argb_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xy_tp0_tp1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tc1_tp2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tp0_tp1_tc2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_argb_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xy_tc0_tp1_tp2_tp3_tri; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tp0_tp1_tp2_tri; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_tc0_tc1_tc2_tri; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_argb_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xy_tp0_tc1_tc2_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_tp0_tp1_tc2_tri; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tp0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_argb_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xy_tc0_tp1_tc2_tri; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tc0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_argb_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xy_tc0_tp1_tp2_tri; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_tp0_tp1_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xy_tp0_tp1_tri; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_argb_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_argb_tc0_tc1_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xy_tc0_tc1_tri; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_argb_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_argb_tp0_tc1_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xy_tp0_tc1_tri; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_argb_tc0_tp1_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xy_tc0_tp1_tri; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xy_argb_spec_tp0_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xy_argb_tp0_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xy_spec_tp0_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; + float tq0; +} i830_xy_tp0_tri; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xy_argb_spec_tc0_tri; + +typedef struct { + float x; + float y; + + + unsigned int argb; + + float tu0; + float tv0; +} i830_xy_argb_tc0_tri; + +typedef struct { + float x; + float y; + + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xy_spec_tc0_tri; + +typedef struct { + float x; + float y; + + + + float tu0; + float tv0; +} i830_xy_tc0_tri; + +/* Triangles w/ xyw coords */ + +/* Non-Textured Triangles */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; +} i830_xyw_argb_spec_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; +} i830_xyw_argb_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; +} i830_xyw_spec_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + +} i830_xyw_tri; + +/* Textured Triangles */ + +/* Four texunit */ + +/* Four texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3 +} i830_xyw_argb_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tp1_tp2_tp3_tri; + +/* Four texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tc0_tc1_tc2_tc3_tri; + +/* Four texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tc1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tp0_tc1_tc2_tc3_tri; + + + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tc0_tp1_tc2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tc0_tc1_tp2_tc3_tri; + +/* Unit 0 cart : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq0; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tp1_tc2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; +} i830_xyw_tp0_tp1_tc2_tc3_tri; + + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tc0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tc0_tp1_tp2_tc3_tri; + + +/* Unit 0 cart : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tc1_tp2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tp1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tc1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tc1_tc2_tp3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tc1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tp0_tc1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 proj : Unit 3 cart */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_spec_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_argb_tp0_tp1_tp2_tc3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; +} i830_xyw_tp0_tp1_tp2_tc3_tri; + +/* Unit 0 proj : Unit 1 cart : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tc1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tc1_tp2_tp3_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tp0_tp1_tc2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tp0_tp1_tc2_tp3_tri; + +/* Unit 0 cart : Unit 1 proj : Unit 2 proj : Unit 3 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_spec_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_argb_tc0_tp1_tp2_tp3_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; + + float tu3; + float tv3; + float tq3; +} i830_xyw_tc0_tp1_tp2_tp3_tri; + + +/* Three texunit */ + +/* Three texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tp0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tp0_tp1_tp2_tri; + +/* Three texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_spec_tc0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_tc0_tc1_tc2_tri; + +/* Three texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart : Unit 2 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_argb_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_spec_tp0_tc1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; +} i830_xyw_tp0_tc1_tc2_tri; + +/* Unit 0 proj : Unit 1 proj : Unit 2 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_spec_tp0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_tp0_tp1_tc2_tri; + +/* Unit 0 proj : Unit 1 cart: Unit 2 proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tp0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tp0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_argb_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_spec_tc0_tp1_tc2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; +} i830_xyw_tc0_tp1_tc2_tri; + +/* Unit 0 cart : Unit 1 cart: Unit 2 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tc0_tc1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tc0_tc1_tp2_tri; + +/* Unit 0 cart : Unit 1 proj: Unit 2 proj */ + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_argb_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_spec_tc0_tp1_tp2_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; + + float tu2; + float tv2; + float tq2; +} i830_xyw_tc0_tp1_tp2_tri; + + +/* Two texunit */ + +/* Two texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_tp0_tp1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_spec_tp0_tp1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_tp0_tp1_tri; + +/* Two texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_argb_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_argb_tc0_tc1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_spec_tc0_tc1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + + float tu0; + float tv0; + + float tu1; + float tv1; +} i830_xyw_tc0_tc1_tri; + +/* Two texunit mixed cart/proj */ + +/* Unit 0 proj : Unit 1 cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_argb_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_argb_tp0_tc1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_spec_tp0_tc1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + float tu0; + float tv0; + float tq0; + + float tu1; + float tv1; +} i830_xyw_tp0_tc1_tri; + +/* Unit 0 cart : Unit 1 proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_argb_tc0_tp1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_spec_tc0_tp1_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + float tu0; + float tv0; + + float tu1; + float tv1; + float tq1; +} i830_xyw_tc0_tp1_tri; + +/* One texunit */ + +/* One texunit - all proj */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyw_argb_spec_tp0_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; + float tq0; +} i830_xyw_argb_tp0_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; + float tq0; +} i830_xyw_spec_tp0_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + float tu0; + float tv0; + float tq0; +} i830_xyw_tp0_tri; + +/* One texunit - all cart */ +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyw_argb_spec_tc0_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int argb; + + float tu0; + float tv0; +} i830_xyw_argb_tc0_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + unsigned int fog_spec_rgb; + + float tu0; + float tv0; +} i830_xyw_spec_tc0_tri; + +typedef struct { + float x; + float y; + + union { + float w; + float rhw; + } w; + + float tu0; + float tv0; +} i830_xyw_tc0_tri; Index: xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c diff -u /dev/null xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c:1.1 --- /dev/null Fri Jan 18 15:22:52 2002 +++ xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c Thu Oct 4 14:28:21 2001 @@ -0,0 +1,722 @@ +/************************************************************************** + +Copyright 2001 VA Linux Systems Inc., Fremont, California. + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +on the rights to use, copy, modify, merge, publish, distribute, sub +license, and/or sell copies of the Software, and to permit persons to whom +the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* $XFree86: xc/lib/GL/mesa/src/drv/i830/i830_xmesa.c,v 1.1 2001/10/04 18:28:21 alanh Exp $ */ + +/* + * Author: + * Jeff Hartmann + * + * Heavily based on the I810 driver, which was written by: + * Keith Whitwell + */ + +#ifdef GLX_DIRECT_RENDERING + +#include +#include + +#include "context.h" +#include "vbxform.h" +#include "matrix.h" +#include "simple_list.h" + +#include "i830_drv.h" +#include "i830_tris.h" +#include "i830_ioctl.h" + +#include "i830_dri.h" + + + +#ifndef I830_DEBUG +int I830_DEBUG = (0 + | DEBUG_VERBOSE_TRACE +/* | DEBUG_VERBOSE_STATE */ +/* | DEBUG_ALWAYS_SYNC */ +/* | DEBUG_VERBOSE_RING */ +/* | DEBUG_VERBOSE_OUTREG */ +/* | DEBUG_VERBOSE_MSG */ +/* | DEBUG_NO_OUTRING */ +/* | DEBUG_NO_OUTREG */ +/* | DEBUG_VERBOSE_API */ +/* | DEBUG_VERBOSE_2D */ +/* | DEBUG_VERBOSE_DRI */ +/* | DEBUG_VALIDATE_RING */ +/* | DEBUG_VERBOSE_IOCTL */ + ); +#endif + + +static i830ContextPtr i830Ctx = 0; + + +/* These functions are accessed externally to the driver: + * + * XMesaInitDriver + * XMesaResetDriver + * XMesaCreateVisual + * XMesaDestroyVisual + * XMesaCreateContext + * XMesaDestroyContext + * XMesaCreateWindowBuffer + * XMesaCreatePixmapBuffer + * XMesaDestroyBuffer + * XMesaSwapBuffers + * XMesaMakeCurrent + * + */ + + +static int i830_malloc_proxy_buf(drmBufMapPtr buffers) +{ + char *buffer; + drmBufPtr buf; + int i; + + buffer = Xmalloc(I830_DMA_BUF_SZ); + if(buffer == NULL) return -1; + for(i = 0; i < I830_DMA_BUF_NR; i++) { + buf = &(buffers->list[i]); + buf->address = (drmAddress)buffer; + } + return 0; +} + +static drmBufMapPtr i830_create_empty_buffers(void) +{ + drmBufMapPtr retval; + + retval = (drmBufMapPtr)Xmalloc(sizeof(drmBufMap)); + if(retval == NULL) return NULL; + memset(retval, 0, sizeof(drmBufMap)); + retval->list = (drmBufPtr)Xmalloc(sizeof(drmBuf) * I830_DMA_BUF_NR); + if(retval->list == NULL) { + Xfree(retval); + return NULL; + } + memset(retval->list, 0, sizeof(drmBuf) * I830_DMA_BUF_NR); + /* + fprintf(stderr, "retval : %p, retval->list : %p\n", retval, retval->list); + */ + return retval; +} + +GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv) +{ + i830ScreenPrivate *i830Screen; + I830DRIPtr gDRIPriv = (I830DRIPtr)sPriv->pDevPriv; + + /* Check the DRI version */ + { + int major, minor, patch; + if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { + if (major != 4 || minor < 0) { + char msg[1000]; + sprintf(msg, "i830 DRI driver expected DRI version 4.0.x but got version %d.%d.%d", major, minor, patch); + __driMesaMessage(msg); + return GL_FALSE; + } + } + } + + /* Check that the DDX driver version is compatible */ + if (sPriv->ddxMajor != 1 || + sPriv->ddxMinor < 0) { + char msg[1000]; + sprintf(msg, "i830 DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); + __driMesaMessage(msg); + return GL_FALSE; + } + + /* Check that the DRM driver version is compatible */ + if (sPriv->drmMajor != 1 || + sPriv->drmMinor < 2) { + char msg[1000]; + sprintf(msg, "i830 DRI driver expected DRM driver version 1.2.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); + __driMesaMessage(msg); + return GL_FALSE; + } + + /* Allocate the private area */ + i830Screen = (i830ScreenPrivate *)Xmalloc(sizeof(i830ScreenPrivate)); + if (!i830Screen) + return GL_FALSE; + + i830Screen->driScrnPriv = sPriv; + sPriv->private = (void *)i830Screen; + + i830Screen->deviceID=gDRIPriv->deviceID; + i830Screen->width=gDRIPriv->width; + i830Screen->height=gDRIPriv->height; + i830Screen->mem=gDRIPriv->mem; + i830Screen->cpp=gDRIPriv->cpp; + i830Screen->fbStride=gDRIPriv->fbStride; + i830Screen->fbOffset=gDRIPriv->fbOffset; + + switch (gDRIPriv->bitsPerPixel) { + case 15: i830Screen->fbFormat = DV_PF_555; break; + case 16: i830Screen->fbFormat = DV_PF_565; break; + case 32: i830Screen->fbFormat = DV_PF_8888; break; + } + + i830Screen->backOffset=gDRIPriv->backOffset; + i830Screen->depthOffset=gDRIPriv->depthOffset; + i830Screen->backPitch = gDRIPriv->auxPitch; + i830Screen->backPitchBits = gDRIPriv->auxPitchBits; + i830Screen->textureOffset=gDRIPriv->textureOffset; + i830Screen->textureSize=gDRIPriv->textureSize; + i830Screen->logTextureGranularity = gDRIPriv->logTextureGranularity; + i830Screen->sarea_priv_offset = gDRIPriv->sarea_priv_offset; + + if (0) + fprintf(stderr, "Tex heap size %x, granularity %x bytes\n", + i830Screen->textureSize, 1<<(i830Screen->logTextureGranularity)); + + i830Screen->bufs = i830_create_empty_buffers(); + if(i830Screen->bufs == NULL) + { + Xfree(i830Screen); + return GL_FALSE; + } + + /* Check if you need to create a fake buffer */ + if(i830_check_copy(sPriv->fd) == 1) + { + i830_malloc_proxy_buf(i830Screen->bufs); + i830Screen->use_copy_buf = 1; + } + else + { + i830Screen->use_copy_buf = 0; + } + + i830Screen->back.handle = gDRIPriv->backbuffer; + i830Screen->back.size = gDRIPriv->backbufferSize; + + if (drmMap(sPriv->fd, + i830Screen->back.handle, + i830Screen->back.size, + (drmAddress *)&i830Screen->back.map) != 0) + { + Xfree(i830Screen); + sPriv->private = NULL; + return GL_FALSE; + } + + i830Screen->depth.handle = gDRIPriv->depthbuffer; + i830Screen->depth.size = gDRIPriv->depthbufferSize; + + if (drmMap(sPriv->fd, + i830Screen->depth.handle, + i830Screen->depth.size, + (drmAddress *)&i830Screen->depth.map) != 0) + { + Xfree(i830Screen); + drmUnmap(i830Screen->back.map, i830Screen->back.size); + sPriv->private = NULL; + return GL_FALSE; + } + + i830Screen->tex.handle = gDRIPriv->textures; + i830Screen->tex.size = gDRIPriv->textureSize; + + if (drmMap(sPriv->fd, + i830Screen->tex.handle, + i830Screen->tex.size, + (drmAddress *)&i830Screen->tex.map) != 0) + { + Xfree(i830Screen); + drmUnmap(i830Screen->back.map, i830Screen->back.size); + drmUnmap(i830Screen->depth.map, i830Screen->depth.size); + sPriv->private = NULL; + return GL_FALSE; + } + + + i830DDFastPathInit(); + i830DDTrifuncInit(); + i830DDSetupInit(); + + return GL_TRUE; +} + +/* Accessed by dlsym from dri_mesa_init.c + */ +void XMesaResetDriver(__DRIscreenPrivate *sPriv) +{ + i830ScreenPrivate *i830Screen = (i830ScreenPrivate *)sPriv->private; + + /* Need to unmap all the bufs and maps here: + */ + drmUnmap(i830Screen->back.map, i830Screen->back.size); + drmUnmap(i830Screen->depth.map, i830Screen->depth.size); + drmUnmap(i830Screen->tex.map, i830Screen->tex.size); + + Xfree(i830Screen); + sPriv->private = NULL; +} + + +GLvisual *XMesaCreateVisual(Display *dpy, + __DRIscreenPrivate *driScrnPriv, + const XVisualInfo *visinfo, + const __GLXvisualConfig *config) +{ + /* Drivers may change the args to _mesa_create_visual() in order to + * setup special visuals. + */ + return _mesa_create_visual( config->rgba, + config->doubleBuffer, + config->stereo, + _mesa_bitcount(visinfo->red_mask), + _mesa_bitcount(visinfo->green_mask), + _mesa_bitcount(visinfo->blue_mask), + config->alphaSize, + 0, /* index bits */ + config->depthSize, + config->stencilSize, + config->accumRedSize, + config->accumGreenSize, + config->accumBlueSize, + config->accumAlphaSize, + 0 /* num samples */ ); +} + + +GLboolean XMesaCreateContext( Display *dpy, GLvisual *mesaVis, + __DRIcontextPrivate *driContextPriv ) +{ + GLcontext *ctx = driContextPriv->mesaContext; + i830ContextPtr imesa; + __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; + i830ScreenPrivate *i830Screen = (i830ScreenPrivate *)sPriv->private; + I830SAREAPtr saPriv=(I830SAREAPtr)(((char*)sPriv->pSAREA)+ + i830Screen->sarea_priv_offset); + + imesa = (i830ContextPtr)Xcalloc(sizeof(i830Context), 1); + if (!imesa) { + return GL_FALSE; + } + + + /* Set the maximum texture size small enough that we can guarentee + * that both texture units can bind a maximal texture and have them + * in memory at once. + */ + if (i830Screen->textureSize < 2*1024*1024) { + ctx->Const.MaxTextureLevels = 9; + ctx->Const.MaxTextureSize = 1<<8; + } else if (i830Screen->textureSize < 8*1024*1024) { + ctx->Const.MaxTextureLevels = 10; + ctx->Const.MaxTextureSize = 1<<9; + } else { + ctx->Const.MaxTextureLevels = 11; + ctx->Const.MaxTextureSize = 1<<10; + } + + ctx->Const.MinLineWidth = 1.0; + ctx->Const.MinLineWidthAA = 1.0; + ctx->Const.MaxLineWidth = 3.0; + ctx->Const.MaxLineWidthAA = 3.0; + ctx->Const.LineWidthGranularity = 1.0; + + + /* Dri stuff + */ + imesa->display = dpy; + imesa->hHWContext = driContextPriv->hHWContext; + imesa->driFd = sPriv->fd; + imesa->driHwLock = &sPriv->pSAREA->lock; + + imesa->i830Screen = i830Screen; + imesa->driScreen = sPriv; + imesa->sarea = saPriv; + imesa->glBuffer = NULL; + + imesa->texHeap = mmInit( 0, i830Screen->textureSize ); + + + /* Utah stuff + */ + imesa->renderindex = -1; /* impossible value */ + imesa->new_state = ~0; + imesa->dirty = ~0; + + make_empty_list(&imesa->TexObjList); + make_empty_list(&imesa->SwappedOut); + + imesa->TextureMode = ctx->Texture.Unit[0].EnvMode; + imesa->CurrentTexObj[0] = 0; + imesa->CurrentTexObj[1] = 0; + + ctx->DriverCtx = (void *) imesa; + imesa->glCtx = ctx; + + i830DDExtensionsInit( ctx ); + + imesa->hw_stencil = mesaVis->StencilBits && mesaVis->DepthBits == 24; + + switch(mesaVis->DepthBits) { + case 16: + imesa->depth_scale = 1.0/0x10000; + imesa->depth_clear_mask = ~0; + imesa->ClearDepth = 0xffff; + break; + case 24: + imesa->depth_scale = 1.0/0x1000000; + imesa->depth_clear_mask = 0x00ffffff; + imesa->stencil_clear_mask = 0xff000000; + imesa->ClearDepth = 0x00ffffff; + break; + case 32: /* Not supported I don't believe */ + default: +#define DUMMY() /* keep gcc happy */ + DUMMY(); + } + + /* Completely disable stenciling for now, there are some serious issues + * with stencil. + */ +#if 1 + imesa->hw_stencil = 0; +#endif + + i830DDInitStateFuncs( ctx ); + i830DDInitTextureFuncs( ctx ); + i830DDInitSpanFuncs( ctx ); + i830DDInitDriverFuncs( ctx ); + i830DDInitIoctlFuncs( ctx ); + + ctx->Driver.TriangleCaps = (DD_TRI_CULL| + DD_TRI_LIGHT_TWOSIDE| + DD_TRI_STIPPLE| + DD_TRI_OFFSET); + + /* Ask mesa to clip fog coordinates for us. + */ + ctx->TriangleCaps |= DD_CLIP_FOG_COORD; + + if (ctx->VB) + i830DDRegisterVB( ctx->VB ); + + if (ctx->NrPipelineStages) + ctx->NrPipelineStages = + i830DDRegisterPipelineStages(ctx->PipelineStage, + ctx->PipelineStage, + ctx->NrPipelineStages); + + i830DDInitState( imesa ); + + driContextPriv->driverPrivate = (void *) imesa; + + return GL_TRUE; +} + +void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv) +{ + i830ContextPtr imesa = (i830ContextPtr) driContextPriv->driverPrivate; + + if (imesa) { + i830TextureObjectPtr next_t, t; + + foreach_s (t, next_t, &(imesa->TexObjList)) + i830DestroyTexObj(imesa, t); + + foreach_s (t, next_t, &(imesa->SwappedOut)) + i830DestroyTexObj(imesa, t); + + Xfree(imesa); + } +} + +GLframebuffer *XMesaCreateWindowBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + GLvisual *mesaVis) +{ +#if 0 + GLboolean swStencil = mesaVis->StencilBits > 0 && mesaVis->DepthBits != 24; +#else + GLboolean swStencil = mesaVis->StencilBits > 0; +#endif + return gl_create_framebuffer(mesaVis, + GL_FALSE, + swStencil, + mesaVis->AccumRedBits > 0, + mesaVis->AlphaBits > 0 + ); +} + + +GLframebuffer *XMesaCreatePixmapBuffer( Display *dpy, + __DRIscreenPrivate *driScrnPriv, + __DRIdrawablePrivate *driDrawPriv, + GLvisual *mesaVis) +{ +#if 0 + /* Different drivers may have different combinations of hardware and + * software ancillary buffers. + */ + return gl_create_framebuffer(mesaVis, + GL_FALSE, /* software depth buffer? */ + mesaVis->StencilBits > 0, + mesaVis->AccumRedBits > 0, + mesaVis->AlphaBits > 0 + ); +#else + return NULL; /* not implemented yet */ +#endif +} + + +void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv) +{ + /* XXX should do swap according to the buffer, not the context! */ + i830ContextPtr imesa = i830Ctx; + + if( !driDrawPriv->mesaBuffer->Visual->DBflag ) return; + + FLUSH_VB( imesa->glCtx, "swap buffers" ); + i830SwapBuffers(imesa); +} + + + +void i830XMesaSetFrontClipRects( i830ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + + imesa->numClipRects = dPriv->numClipRects; + imesa->pClipRects = dPriv->pClipRects; + imesa->dirty |= I830_UPLOAD_CLIPRECTS; + imesa->drawX = dPriv->x; + imesa->drawY = dPriv->y; + + i830EmitDrawingRectangle( imesa ); +} + + +void i830XMesaSetBackClipRects( i830ContextPtr imesa ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + int i; + + if (dPriv->numBackClipRects == 0) + { + if (I830_DEBUG & DEBUG_VERBOSE_DRI) + fprintf(stderr, "FRONT_CLIPRECTS, %d rects\n", + dPriv->numClipRects); + + imesa->numClipRects = dPriv->numClipRects; + imesa->pClipRects = dPriv->pClipRects; + imesa->drawX = dPriv->x; + imesa->drawY = dPriv->y; + } else { + if (I830_DEBUG & DEBUG_VERBOSE_DRI) + fprintf(stderr, "BACK_RECTS, %d rects\n", + dPriv->numBackClipRects); + + imesa->numClipRects = dPriv->numBackClipRects; + imesa->pClipRects = dPriv->pBackClipRects; + imesa->drawX = dPriv->backX; + imesa->drawY = dPriv->backY; + } + + i830EmitDrawingRectangle( imesa ); + imesa->dirty |= I830_UPLOAD_CLIPRECTS; + + if (I830_DEBUG & DEBUG_VERBOSE_DRI) + for (i = 0 ; i < imesa->numClipRects ; i++) + fprintf(stderr, "cliprect %d: %d,%d - %d,%d\n", + i, + imesa->pClipRects[i].x1, + imesa->pClipRects[i].y1, + imesa->pClipRects[i].x2, + imesa->pClipRects[i].y2); +} + + +static void i830XMesaWindowMoved( i830ContextPtr imesa ) +{ + if (0) + fprintf(stderr, "i830XMesaWindowMoved\n\n"); + + switch (imesa->glCtx->Color.DriverDrawBuffer) { + case GL_FRONT_LEFT: + i830XMesaSetFrontClipRects( imesa ); + break; + case GL_BACK_LEFT: + i830XMesaSetBackClipRects( imesa ); + break; + default: + /*fprintf(stderr, "fallback buffer\n");*/ + break; + } +} + +GLboolean +XMesaOpenFullScreen(__DRIcontextPrivate *driContextPriv) +{ + return GL_TRUE; +} + +GLboolean +XMesaCloseFullScreen(__DRIcontextPrivate *driContextPriv) +{ + return GL_TRUE; +} + +GLboolean XMesaUnbindContext(__DRIcontextPrivate *driContextPriv) +{ + i830ContextPtr i830 = (i830ContextPtr) driContextPriv->driverPrivate; + if (i830) + i830->dirty = ~0; + + return GL_TRUE; +} + + +GLboolean XMesaMakeCurrent(__DRIcontextPrivate *driContextPriv, + __DRIdrawablePrivate *driDrawPriv, + __DRIdrawablePrivate *driReadPriv) +{ + if (driContextPriv) { + i830Ctx = (i830ContextPtr) driContextPriv->driverPrivate; + + gl_make_current2(i830Ctx->glCtx, driDrawPriv->mesaBuffer, + driReadPriv->mesaBuffer); + + + i830Ctx->driDrawable = driDrawPriv; + i830Ctx->dirty = ~0; + + i830XMesaWindowMoved( i830Ctx ); + + if (!i830Ctx->glCtx->Viewport.Width) + gl_Viewport(i830Ctx->glCtx, 0, 0, driDrawPriv->w, driDrawPriv->h); + } + else + { + gl_make_current(0,0); + i830Ctx = NULL; + } + return GL_TRUE; +} + + +void i830GetLock( i830ContextPtr imesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = imesa->driDrawable; + __DRIscreenPrivate *sPriv = imesa->driScreen; + I830SAREAPtr sarea = imesa->sarea; + int me = imesa->hHWContext; + int stamp = dPriv->lastStamp; + + + if (0) fprintf(stderr, ".\n"); + + /* We know there has been contention. + */ + drmGetLock(imesa->driFd, imesa->hHWContext, flags); + + + /* Note contention for throttling hint + */ + imesa->any_contend = 1; + + /* If the window moved, may need to set a new cliprect now. + * + * NOTE: This releases and regains the hw lock, so all state + * checking must be done *after* this call: + */ + XMESA_VALIDATE_DRAWABLE_INFO(imesa->display, sPriv, dPriv); + + + if (0) + fprintf(stderr, "i830GetLock, last enque: %d last dispatch: %d\n", + sarea->last_enqueue, + sarea->last_dispatch); + + /* If we lost context, need to dump all registers to hardware. + * Note that we don't care about 2d contexts, even if they perform + * accelerated commands, so the DRI locking in the X server is even + * more broken than usual. + */ + if (sarea->ctxOwner != me) { + imesa->dirty |= (I830_UPLOAD_CTX | + I830_UPLOAD_CLIPRECTS | + I830_UPLOAD_BUFFERS | + I830_UPLOAD_TEX0 | + I830_UPLOAD_TEX1); + + if(imesa->TexBlendWordsUsed[0]) imesa->dirty |= I830_UPLOAD_TEXBLEND0; + if(imesa->TexBlendWordsUsed[1]) imesa->dirty |= I830_UPLOAD_TEXBLEND1; + + sarea->ctxOwner = me; + } + + /* Shared texture managment - if another client has played with + * texture space, figure out which if any of our textures have been + * ejected, and update our global LRU. + */ + if (sarea->texAge != imesa->texAge) { + int sz = 1 << (imesa->i830Screen->logTextureGranularity); + int idx, nr = 0; + + /* Have to go right round from the back to ensure stuff ends up + * LRU in our local list... + */ + for (idx = sarea->texList[I830_NR_TEX_REGIONS].prev ; + idx != I830_NR_TEX_REGIONS && nr < I830_NR_TEX_REGIONS ; + idx = sarea->texList[idx].prev, nr++) + { + if (sarea->texList[idx].age > imesa->texAge) + i830TexturesGone(imesa, idx * sz, sz, sarea->texList[idx].in_use); + } + + if (nr == I830_NR_TEX_REGIONS) { + i830TexturesGone(imesa, 0, imesa->i830Screen->textureSize, 0); + i830ResetGlobalLRU( imesa ); + } + + if (0) fprintf(stderr, "imesa %d sarea %d\n", imesa->texAge, sarea->texAge); + imesa->dirty |= I830_UPLOAD_TEX0_IMAGE; + imesa->dirty |= I830_UPLOAD_TEX1_IMAGE; + imesa->texAge = sarea->texAge; + } + + + if (dPriv->lastStamp != stamp) + i830XMesaWindowMoved( imesa ); + + + sarea->last_quiescent = -1; /* just kill it for now */ +} + + +#endif Index: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c diff -u xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.7 xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.8 --- xc/lib/GL/mesa/src/drv/mga/mgabuffers.c:1.7 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgabuffers.c Wed Oct 31 17:50:24 2001 @@ -24,7 +24,7 @@ * Authors: * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.7 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgabuffers.c,v 1.8 2001/10/31 22:50:24 tsi Exp $ */ #include #include "mgacontext.h" @@ -131,7 +131,6 @@ mmesa->dirty_cliprects = (MGA_FRONT|MGA_BACK) & ~(sarea->exported_buffers); } -#endif static void printSareaRects( mgaContextPtr mmesa ) @@ -200,7 +199,7 @@ driDrawable->index, driScreen->pSAREA->drawableTable[driDrawable->index].stamp); } - +#endif void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers ) Index: xc/lib/GL/mesa/src/drv/mga/mgadd.c diff -u xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.10 xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.11 --- xc/lib/GL/mesa/src/drv/mga/mgadd.c:1.10 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgadd.c Fri Aug 17 22:51:05 2001 @@ -24,7 +24,7 @@ * Authors: * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.10 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.11 2001/08/18 02:51:05 dawes Exp $ */ #include "types.h" @@ -51,7 +51,7 @@ #include "X86/common_x86_asm.h" #endif -#define MGA_DATE "20010321" +#define MGA_DATE "20010622" Index: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c diff -u xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.8 xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.9 --- xc/lib/GL/mesa/src/drv/mga/mgafastpath.c:1.8 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgafastpath.c Mon Aug 27 17:12:19 2001 @@ -24,7 +24,7 @@ * Authors: * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c,v 1.8 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgafastpath.c,v 1.9 2001/08/27 21:12:19 dawes Exp $ */ #include @@ -39,11 +39,8 @@ #include "mgatris.h" #include "mgastate.h" #include "mgavb.h" +#include "vbcull.h" - -extern void mgaDDResizeVB( struct vertex_buffer *VB, GLuint size ); - -extern void gl_fast_copy_vb( struct vertex_buffer *VB ); struct mga_fast_tab { void (*build_vertices)( struct vertex_buffer *VB, GLuint do_cliptest ); Index: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c diff -u xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.11 xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.12 --- xc/lib/GL/mesa/src/drv/mga/mgaioctl.c:1.11 Tue Apr 10 12:07:50 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaioctl.c Wed Oct 31 17:50:24 2001 @@ -25,7 +25,7 @@ * Keith Whitwell * Gareth Hughes */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.11 2001/04/10 16:07:50 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaioctl.c,v 1.12 2001/10/31 22:50:24 tsi Exp $ */ #include @@ -296,8 +296,8 @@ wait++; fprintf( stderr, " last: head=0x%06x wrap=%d\n", last_frame, last_wrap ); - fprintf( stderr, " head: head=0x%06x wrap=%d\n", - MGA_READ( MGAREG_PRIMADDRESS ) - mmesa->primary_offset, + fprintf( stderr, " head: head=0x%06lx wrap=%d\n", + (long)(MGA_READ( MGAREG_PRIMADDRESS ) - mmesa->primary_offset), mmesa->sarea->last_wrap ); } UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH ); Index: xc/lib/GL/mesa/src/drv/mga/mgaregs.h diff -u xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.2 xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.4 --- xc/lib/GL/mesa/src/drv/mga/mgaregs.h:1.2 Sun Jan 7 20:07:18 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgaregs.h Sat Aug 18 07:55:47 2001 @@ -14,11 +14,12 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * STEPHEN CROWLEY, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + * STEPHEN CROWLEY, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgaregs.h,v 1.4 2001/08/18 11:55:47 tsi Exp $ */ #ifndef _MGAREGS_H_ #define _MGAREGS_H_ @@ -34,1347 +35,1346 @@ * Power Graphic Mode Memory Space Registers */ -#define MGAREG_MGA_EXEC 0x0100 -#define MGAREG_AGP_PLL 0x1e4c +#define MGAREG_MGA_EXEC 0x0100 +#define MGAREG_AGP_PLL 0x1e4c - #define AGP_PLL_agp2xpllen_MASK 0xfffffffe /* bit 0 */ - #define AGP_PLL_agp2xpllen_disable 0x0 - #define AGP_PLL_agp2xpllen_enable 0x1 - -#define MGAREG_CFG_OR 0x1e4c - - #define CFG_OR_comp_or_MASK 0xfffffff7 /* bit 3 */ - #define CFG_OR_comp_or_disable 0x0 - #define CFG_OR_comp_or_enable 0x8 - #define CFG_OR_compfreq_MASK 0xffffff0f /* bits 4-7 */ - #define CFG_OR_compfreq_SHIFT 4 - #define CFG_OR_comporup_MASK 0xfffff0ff /* bits 8-11 */ - #define CFG_OR_comporup_SHIFT 8 - #define CFG_OR_compordn_MASK 0xffff0fff /* bits 12-15 */ - #define CFG_OR_compordn_SHIFT 12 - #define CFG_OR_e2pq_MASK 0xfffeffff /* bit 16 */ - #define CFG_OR_e2pq_disable 0x0 - #define CFG_OR_e2pq_enable 0x10000 - #define CFG_OR_e2pqbypcsn_MASK 0xfffdffff /* bit 17 */ - #define CFG_OR_e2pqbypcsn_disable 0x0 - #define CFG_OR_e2pqbypcsn_enable 0x20000 - #define CFG_OR_e2pqbypd_MASK 0xfffbffff /* bit 18 */ - #define CFG_OR_e2pqbypd_disable 0x0 - #define CFG_OR_e2pqbypd_enable 0x40000 - #define CFG_OR_e2pbypclk_MASK 0xfff7ffff /* bit 19 */ - #define CFG_OR_e2pbypclk_disable 0x0 - #define CFG_OR_e2pbypclk_enable 0x80000 - #define CFG_OR_e2pbyp_MASK 0xffefffff /* bit 20 */ - #define CFG_OR_e2pbyp_disable 0x0 - #define CFG_OR_e2pbyp_enable 0x100000 - #define CFG_OR_rate_cap_or_MASK 0xff1fffff /* bits 21-23 */ - #define CFG_OR_rate_cap_or_SHIFT 21 - #define CFG_OR_rq_or_MASK 0xe0ffffff /* bits 24-28 */ - #define CFG_OR_rq_or_SHIFT 24 - -#define MGAREG_ALPHACTRL 0x2c7c - - #define AC_src_MASK 0xfffffff0 /* bits 0-3 */ - #define AC_src_zero 0x0 /* val 0, shift 0 */ - #define AC_src_one 0x1 /* val 1, shift 0 */ - #define AC_src_dst_color 0x2 /* val 2, shift 0 */ - #define AC_src_om_dst_color 0x3 /* val 3, shift 0 */ - #define AC_src_src_alpha 0x4 /* val 4, shift 0 */ - #define AC_src_om_src_alpha 0x5 /* val 5, shift 0 */ - #define AC_src_dst_alpha 0x6 /* val 6, shift 0 */ - #define AC_src_om_dst_alpha 0x7 /* val 7, shift 0 */ - #define AC_src_src_alpha_sat 0x8 /* val 8, shift 0 */ - #define AC_dst_MASK 0xffffff0f /* bits 4-7 */ - #define AC_dst_zero 0x0 /* val 0, shift 4 */ - #define AC_dst_one 0x10 /* val 1, shift 4 */ - #define AC_dst_src_color 0x20 /* val 2, shift 4 */ - #define AC_dst_om_src_color 0x30 /* val 3, shift 4 */ - #define AC_dst_src_alpha 0x40 /* val 4, shift 4 */ - #define AC_dst_om_src_alpha 0x50 /* val 5, shift 4 */ - #define AC_dst_dst_alpha 0x60 /* val 6, shift 4 */ - #define AC_dst_om_dst_alpha 0x70 /* val 7, shift 4 */ - #define AC_amode_MASK 0xfffffcff /* bits 8-9 */ - #define AC_amode_FCOL 0x0 /* val 0, shift 8 */ - #define AC_amode_alpha_channel 0x100 /* val 1, shift 8 */ - #define AC_amode_video_alpha 0x200 /* val 2, shift 8 */ - #define AC_amode_RSVD 0x300 /* val 3, shift 8 */ - #define AC_astipple_MASK 0xfffff7ff /* bit 11 */ - #define AC_astipple_disable 0x0 - #define AC_astipple_enable 0x800 - #define AC_aten_MASK 0xffffefff /* bit 12 */ - #define AC_aten_disable 0x0 - #define AC_aten_enable 0x1000 - #define AC_atmode_MASK 0xffff1fff /* bits 13-15 */ - #define AC_atmode_noacmp 0x0 /* val 0, shift 13 */ - #define AC_atmode_ae 0x4000 /* val 2, shift 13 */ - #define AC_atmode_ane 0x6000 /* val 3, shift 13 */ - #define AC_atmode_alt 0x8000 /* val 4, shift 13 */ - #define AC_atmode_alte 0xa000 /* val 5, shift 13 */ - #define AC_atmode_agt 0xc000 /* val 6, shift 13 */ - #define AC_atmode_agte 0xe000 /* val 7, shift 13 */ - #define AC_atref_MASK 0xff00ffff /* bits 16-23 */ - #define AC_atref_SHIFT 16 - #define AC_alphasel_MASK 0xfcffffff /* bits 24-25 */ - #define AC_alphasel_fromtex 0x0 /* val 0, shift 24 */ - #define AC_alphasel_diffused 0x1000000 /* val 1, shift 24 */ - #define AC_alphasel_modulated 0x2000000 /* val 2, shift 24 */ - #define AC_alphasel_trans 0x3000000 /* val 3, shift 24 */ - -#define MGAREG_ALPHASTART 0x2c70 -#define MGAREG_ALPHAXINC 0x2c74 -#define MGAREG_ALPHAYINC 0x2c78 -#define MGAREG_AR0 0x1c60 - - #define AR0_ar0_MASK 0xfffc0000 /* bits 0-17 */ - #define AR0_ar0_SHIFT 0 - -#define MGAREG_AR1 0x1c64 - - #define AR1_ar1_MASK 0xff000000 /* bits 0-23 */ - #define AR1_ar1_SHIFT 0 - -#define MGAREG_AR2 0x1c68 - - #define AR2_ar2_MASK 0xfffc0000 /* bits 0-17 */ - #define AR2_ar2_SHIFT 0 - -#define MGAREG_AR3 0x1c6c - - #define AR3_ar3_MASK 0xff000000 /* bits 0-23 */ - #define AR3_ar3_SHIFT 0 - #define AR3_spage_MASK 0xf8ffffff /* bits 24-26 */ - #define AR3_spage_SHIFT 24 - -#define MGAREG_AR4 0x1c70 - - #define AR4_ar4_MASK 0xfffc0000 /* bits 0-17 */ - #define AR4_ar4_SHIFT 0 - -#define MGAREG_AR5 0x1c74 - - #define AR5_ar5_MASK 0xfffc0000 /* bits 0-17 */ - #define AR5_ar5_SHIFT 0 - -#define MGAREG_AR6 0x1c78 - - #define AR6_ar6_MASK 0xfffc0000 /* bits 0-17 */ - #define AR6_ar6_SHIFT 0 - -#define MGAREG_BCOL 0x1c20 -#define MGAREG_BESA1CORG 0x3d10 -#define MGAREG_BESA1ORG 0x3d00 -#define MGAREG_BESA2CORG 0x3d14 -#define MGAREG_BESA2ORG 0x3d04 -#define MGAREG_BESB1CORG 0x3d18 -#define MGAREG_BESB1ORG 0x3d08 -#define MGAREG_BESB2CORG 0x3d1c -#define MGAREG_BESB2ORG 0x3d0c -#define MGAREG_BESCTL 0x3d20 - - #define BC_besen_MASK 0xfffffffe /* bit 0 */ - #define BC_besen_disable 0x0 - #define BC_besen_enable 0x1 - #define BC_besv1srcstp_MASK 0xffffffbf /* bit 6 */ - #define BC_besv1srcstp_even 0x0 - #define BC_besv1srcstp_odd 0x40 - #define BC_besv2srcstp_MASK 0xfffffeff /* bit 8 */ - #define BC_besv2srcstp_disable 0x0 - #define BC_besv2srcstp_enable 0x100 - #define BC_beshfen_MASK 0xfffffbff /* bit 10 */ - #define BC_beshfen_disable 0x0 - #define BC_beshfen_enable 0x400 - #define BC_besvfen_MASK 0xfffff7ff /* bit 11 */ - #define BC_besvfen_disable 0x0 - #define BC_besvfen_enable 0x800 - #define BC_beshfixc_MASK 0xffffefff /* bit 12 */ - #define BC_beshfixc_weight 0x0 - #define BC_beshfixc_coeff 0x1000 - #define BC_bescups_MASK 0xfffeffff /* bit 16 */ - #define BC_bescups_disable 0x0 - #define BC_bescups_enable 0x10000 - #define BC_bes420pl_MASK 0xfffdffff /* bit 17 */ - #define BC_bes420pl_422 0x0 - #define BC_bes420pl_420 0x20000 - #define BC_besdith_MASK 0xfffbffff /* bit 18 */ - #define BC_besdith_disable 0x0 - #define BC_besdith_enable 0x40000 - #define BC_beshmir_MASK 0xfff7ffff /* bit 19 */ - #define BC_beshmir_disable 0x0 - #define BC_beshmir_enable 0x80000 - #define BC_besbwen_MASK 0xffefffff /* bit 20 */ - #define BC_besbwen_color 0x0 - #define BC_besbwen_bw 0x100000 - #define BC_besblank_MASK 0xffdfffff /* bit 21 */ - #define BC_besblank_disable 0x0 - #define BC_besblank_enable 0x200000 - #define BC_besfselm_MASK 0xfeffffff /* bit 24 */ - #define BC_besfselm_soft 0x0 - #define BC_besfselm_hard 0x1000000 - #define BC_besfsel_MASK 0xf9ffffff /* bits 25-26 */ - #define BC_besfsel_a1 0x0 /* val 0, shift 25 */ - #define BC_besfsel_a2 0x2000000 /* val 1, shift 25 */ - #define BC_besfsel_b1 0x4000000 /* val 2, shift 25 */ - #define BC_besfsel_b2 0x6000000 /* val 3, shift 25 */ - -#define MGAREG_BESGLOBCTL 0x3dc0 - - #define BGC_beshzoom_MASK 0xfffffffe /* bit 0 */ - #define BGC_beshzoom_disable 0x0 - #define BGC_beshzoom_enable 0x1 - #define BGC_beshzoomf_MASK 0xfffffffd /* bit 1 */ - #define BGC_beshzoomf_disable 0x0 - #define BGC_beshzoomf_enable 0x2 - #define BGC_bescorder_MASK 0xfffffff7 /* bit 3 */ - #define BGC_bescorder_even 0x0 - #define BGC_bescorder_odd 0x8 - #define BGC_besreghup_MASK 0xffffffef /* bit 4 */ - #define BGC_besreghup_disable 0x0 - #define BGC_besreghup_enable 0x10 - #define BGC_besvcnt_MASK 0xf000ffff /* bits 16-27 */ - #define BGC_besvcnt_SHIFT 16 - -#define MGAREG_BESHCOORD 0x3d28 - - #define BHC_besright_MASK 0xfffff800 /* bits 0-10 */ - #define BHC_besright_SHIFT 0 - #define BHC_besleft_MASK 0xf800ffff /* bits 16-26 */ - #define BHC_besleft_SHIFT 16 - -#define MGAREG_BESHISCAL 0x3d30 - - #define BHISF_beshiscal_MASK 0xffe00003 /* bits 2-20 */ - #define BHISF_beshiscal_SHIFT 2 - -#define MGAREG_BESHSRCEND 0x3d3c - - #define BHSE_beshsrcend_MASK 0xfc000003 /* bits 2-25 */ - #define BHSE_beshsrcend_SHIFT 2 - -#define MGAREG_BESHSRCLST 0x3d50 - - #define BHSL_beshsrclst_MASK 0xfc00ffff /* bits 16-25 */ - #define BHSL_beshsrclst_SHIFT 16 - -#define MGAREG_BESHSRCST 0x3d38 - - #define BHSS_beshsrcst_MASK 0xfc000003 /* bits 2-25 */ - #define BHSS_beshsrcst_SHIFT 2 - -#define MGAREG_BESPITCH 0x3d24 - - #define BP_bespitch_MASK 0xfffff000 /* bits 0-11 */ - #define BP_bespitch_SHIFT 0 - -#define MGAREG_BESSTATUS 0x3dc4 - - #define BS_besstat_MASK 0xfffffffc /* bits 0-1 */ - #define BS_besstat_a1 0x0 /* val 0, shift 0 */ - #define BS_besstat_a2 0x1 /* val 1, shift 0 */ - #define BS_besstat_b1 0x2 /* val 2, shift 0 */ - #define BS_besstat_b2 0x3 /* val 3, shift 0 */ - -#define MGAREG_BESV1SRCLST 0x3d54 - - #define BSF_besv1srclast_MASK 0xfffffc00 /* bits 0-9 */ - #define BSF_besv1srclast_SHIFT 0 - -#define MGAREG_BESV2SRCLST 0x3d58 - - #define BSF_besv2srclst_MASK 0xfffffc00 /* bits 0-9 */ - #define BSF_besv2srclst_SHIFT 0 - -#define MGAREG_BESV1WGHT 0x3d48 - - #define BSF_besv1wght_MASK 0xffff0003 /* bits 2-15 */ - #define BSF_besv1wght_SHIFT 2 - #define BSF_besv1wghts_MASK 0xfffeffff /* bit 16 */ - #define BSF_besv1wghts_disable 0x0 - #define BSF_besv1wghts_enable 0x10000 - -#define MGAREG_BESV2WGHT 0x3d4c - - #define BSF_besv2wght_MASK 0xffff0003 /* bits 2-15 */ - #define BSF_besv2wght_SHIFT 2 - #define BSF_besv2wghts_MASK 0xfffeffff /* bit 16 */ - #define BSF_besv2wghts_disable 0x0 - #define BSF_besv2wghts_enable 0x10000 - -#define MGAREG_BESVCOORD 0x3d2c - - #define BVC_besbot_MASK 0xfffff800 /* bits 0-10 */ - #define BVC_besbot_SHIFT 0 - #define BVC_bestop_MASK 0xf800ffff /* bits 16-26 */ - #define BVC_bestop_SHIFT 16 - -#define MGAREG_BESVISCAL 0x3d34 - - #define BVISF_besviscal_MASK 0xffe00003 /* bits 2-20 */ - #define BVISF_besviscal_SHIFT 2 - -#define MGAREG_CODECADDR 0x3e44 -#define MGAREG_CODECCTL 0x3e40 -#define MGAREG_CODECHARDPTR 0x3e4c -#define MGAREG_CODECHOSTPTR 0x3e48 -#define MGAREG_CODECLCODE 0x3e50 -#define MGAREG_CXBNDRY 0x1c80 - - #define CXB_cxleft_MASK 0xfffff000 /* bits 0-11 */ - #define CXB_cxleft_SHIFT 0 - #define CXB_cxright_MASK 0xf000ffff /* bits 16-27 */ - #define CXB_cxright_SHIFT 16 - -#define MGAREG_CXLEFT 0x1ca0 -#define MGAREG_CXRIGHT 0x1ca4 -#define MGAREG_DMAMAP30 0x1e30 -#define MGAREG_DMAMAP74 0x1e34 -#define MGAREG_DMAMAPB8 0x1e38 -#define MGAREG_DMAMAPFC 0x1e3c -#define MGAREG_DMAPAD 0x1c54 -#define MGAREG_DR0_Z32LSB 0x2c50 -#define MGAREG_DR0_Z32MSB 0x2c54 -#define MGAREG_DR2_Z32LSB 0x2c60 -#define MGAREG_DR2_Z32MSB 0x2c64 -#define MGAREG_DR3_Z32LSB 0x2c68 -#define MGAREG_DR3_Z32MSB 0x2c6c -#define MGAREG_DR0 0x1cc0 -#define MGAREG_DR2 0x1cc8 -#define MGAREG_DR3 0x1ccc -#define MGAREG_DR4 0x1cd0 -#define MGAREG_DR6 0x1cd8 -#define MGAREG_DR7 0x1cdc -#define MGAREG_DR8 0x1ce0 -#define MGAREG_DR10 0x1ce8 -#define MGAREG_DR11 0x1cec -#define MGAREG_DR12 0x1cf0 -#define MGAREG_DR14 0x1cf8 -#define MGAREG_DR15 0x1cfc -#define MGAREG_DSTORG 0x2cb8 - - #define DO_dstmap_MASK 0xfffffffe /* bit 0 */ - #define DO_dstmap_fb 0x0 - #define DO_dstmap_sys 0x1 - #define DO_dstacc_MASK 0xfffffffd /* bit 1 */ - #define DO_dstacc_pci 0x0 - #define DO_dstacc_agp 0x2 - #define DO_dstorg_MASK 0x7 /* bits 3-31 */ - #define DO_dstorg_SHIFT 3 - -#define MGAREG_DWG_INDIR_WT 0x1e80 -#define MGAREG_DWGCTL 0x1c00 - - #define DC_opcod_MASK 0xfffffff0 /* bits 0-3 */ - #define DC_opcod_line_open 0x0 /* val 0, shift 0 */ - #define DC_opcod_autoline_open 0x1 /* val 1, shift 0 */ - #define DC_opcod_line_close 0x2 /* val 2, shift 0 */ - #define DC_opcod_autoline_close 0x3 /* val 3, shift 0 */ - #define DC_opcod_trap 0x4 /* val 4, shift 0 */ - #define DC_opcod_texture_trap 0x6 /* val 6, shift 0 */ - #define DC_opcod_bitblt 0x8 /* val 8, shift 0 */ - #define DC_opcod_iload 0x9 /* val 9, shift 0 */ - #define DC_atype_MASK 0xffffff8f /* bits 4-6 */ - #define DC_atype_rpl 0x0 /* val 0, shift 4 */ - #define DC_atype_rstr 0x10 /* val 1, shift 4 */ - #define DC_atype_zi 0x30 /* val 3, shift 4 */ - #define DC_atype_blk 0x40 /* val 4, shift 4 */ - #define DC_atype_i 0x70 /* val 7, shift 4 */ - #define DC_linear_MASK 0xffffff7f /* bit 7 */ - #define DC_linear_xy 0x0 - #define DC_linear_linear 0x80 - #define DC_zmode_MASK 0xfffff8ff /* bits 8-10 */ - #define DC_zmode_nozcmp 0x0 /* val 0, shift 8 */ - #define DC_zmode_ze 0x200 /* val 2, shift 8 */ - #define DC_zmode_zne 0x300 /* val 3, shift 8 */ - #define DC_zmode_zlt 0x400 /* val 4, shift 8 */ - #define DC_zmode_zlte 0x500 /* val 5, shift 8 */ - #define DC_zmode_zgt 0x600 /* val 6, shift 8 */ - #define DC_zmode_zgte 0x700 /* val 7, shift 8 */ - #define DC_solid_MASK 0xfffff7ff /* bit 11 */ - #define DC_solid_disable 0x0 - #define DC_solid_enable 0x800 - #define DC_arzero_MASK 0xffffefff /* bit 12 */ - #define DC_arzero_disable 0x0 - #define DC_arzero_enable 0x1000 - #define DC_sgnzero_MASK 0xffffdfff /* bit 13 */ - #define DC_sgnzero_disable 0x0 - #define DC_sgnzero_enable 0x2000 - #define DC_shftzero_MASK 0xffffbfff /* bit 14 */ - #define DC_shftzero_disable 0x0 - #define DC_shftzero_enable 0x4000 - #define DC_bop_MASK 0xfff0ffff /* bits 16-19 */ - #define DC_bop_SHIFT 16 - #define DC_trans_MASK 0xff0fffff /* bits 20-23 */ - #define DC_trans_SHIFT 20 - #define DC_bltmod_MASK 0xe1ffffff /* bits 25-28 */ - #define DC_bltmod_bmonolef 0x0 /* val 0, shift 25 */ - #define DC_bltmod_bmonowf 0x8000000 /* val 4, shift 25 */ - #define DC_bltmod_bplan 0x2000000 /* val 1, shift 25 */ - #define DC_bltmod_bfcol 0x4000000 /* val 2, shift 25 */ - #define DC_bltmod_bu32bgr 0x6000000 /* val 3, shift 25 */ - #define DC_bltmod_bu32rgb 0xe000000 /* val 7, shift 25 */ - #define DC_bltmod_bu24bgr 0x16000000 /* val 11, shift 25 */ - #define DC_bltmod_bu24rgb 0x1e000000 /* val 15, shift 25 */ - #define DC_pattern_MASK 0xdfffffff /* bit 29 */ - #define DC_pattern_disable 0x0 - #define DC_pattern_enable 0x20000000 - #define DC_transc_MASK 0xbfffffff /* bit 30 */ - #define DC_transc_disable 0x0 - #define DC_transc_enable 0x40000000 - #define DC_clipdis_MASK 0x7fffffff /* bit 31 */ - #define DC_clipdis_disable 0x0 - #define DC_clipdis_enable 0x80000000 - -#define MGAREG_DWGSYNC 0x2c4c - - #define DS_dwgsyncaddr_MASK 0x3 /* bits 2-31 */ - #define DS_dwgsyncaddr_SHIFT 2 - -#define MGAREG_FCOL 0x1c24 -#define MGAREG_FIFOSTATUS 0x1e10 - - #define FS_fifocount_MASK 0xffffff80 /* bits 0-6 */ - #define FS_fifocount_SHIFT 0 - #define FS_bfull_MASK 0xfffffeff /* bit 8 */ - #define FS_bfull_disable 0x0 - #define FS_bfull_enable 0x100 - #define FS_bempty_MASK 0xfffffdff /* bit 9 */ - #define FS_bempty_disable 0x0 - #define FS_bempty_enable 0x200 - -#define MGAREG_FOGCOL 0x1cf4 -#define MGAREG_FOGSTART 0x1cc4 -#define MGAREG_FOGXINC 0x1cd4 -#define MGAREG_FOGYINC 0x1ce4 -#define MGAREG_FXBNDRY 0x1c84 - - #define XA_fxleft_MASK 0xffff0000 /* bits 0-15 */ - #define XA_fxleft_SHIFT 0 - #define XA_fxright_MASK 0xffff /* bits 16-31 */ - #define XA_fxright_SHIFT 16 - -#define MGAREG_FXLEFT 0x1ca8 -#define MGAREG_FXRIGHT 0x1cac -#define MGAREG_ICLEAR 0x1e18 - - #define IC_softrapiclr_MASK 0xfffffffe /* bit 0 */ - #define IC_softrapiclr_disable 0x0 - #define IC_softrapiclr_enable 0x1 - #define IC_pickiclr_MASK 0xfffffffb /* bit 2 */ - #define IC_pickiclr_disable 0x0 - #define IC_pickiclr_enable 0x4 - #define IC_vlineiclr_MASK 0xffffffdf /* bit 5 */ - #define IC_vlineiclr_disable 0x0 - #define IC_vlineiclr_enable 0x20 - #define IC_wiclr_MASK 0xffffff7f /* bit 7 */ - #define IC_wiclr_disable 0x0 - #define IC_wiclr_enable 0x80 - #define IC_wciclr_MASK 0xfffffeff /* bit 8 */ - #define IC_wciclr_disable 0x0 - #define IC_wciclr_enable 0x100 - -#define MGAREG_IEN 0x1e1c - - #define IE_softrapien_MASK 0xfffffffe /* bit 0 */ - #define IE_softrapien_disable 0x0 - #define IE_softrapien_enable 0x1 - #define IE_pickien_MASK 0xfffffffb /* bit 2 */ - #define IE_pickien_disable 0x0 - #define IE_pickien_enable 0x4 - #define IE_vlineien_MASK 0xffffffdf /* bit 5 */ - #define IE_vlineien_disable 0x0 - #define IE_vlineien_enable 0x20 - #define IE_extien_MASK 0xffffffbf /* bit 6 */ - #define IE_extien_disable 0x0 - #define IE_extien_enable 0x40 - #define IE_wien_MASK 0xffffff7f /* bit 7 */ - #define IE_wien_disable 0x0 - #define IE_wien_enable 0x80 - #define IE_wcien_MASK 0xfffffeff /* bit 8 */ - #define IE_wcien_disable 0x0 - #define IE_wcien_enable 0x100 - -#define MGAREG_LEN 0x1c5c -#define MGAREG_MACCESS 0x1c04 - - #define MA_pwidth_MASK 0xfffffffc /* bits 0-1 */ - #define MA_pwidth_8 0x0 /* val 0, shift 0 */ - #define MA_pwidth_16 0x1 /* val 1, shift 0 */ - #define MA_pwidth_32 0x2 /* val 2, shift 0 */ - #define MA_pwidth_24 0x3 /* val 3, shift 0 */ - #define MA_zwidth_MASK 0xffffffe7 /* bits 3-4 */ - #define MA_zwidth_16 0x0 /* val 0, shift 3 */ - #define MA_zwidth_32 0x8 /* val 1, shift 3 */ - #define MA_zwidth_15 0x10 /* val 2, shift 3 */ - #define MA_zwidth_24 0x18 /* val 3, shift 3 */ - #define MA_memreset_MASK 0xffff7fff /* bit 15 */ - #define MA_memreset_disable 0x0 - #define MA_memreset_enable 0x8000 - #define MA_fogen_MASK 0xfbffffff /* bit 26 */ - #define MA_fogen_disable 0x0 - #define MA_fogen_enable 0x4000000 - #define MA_tlutload_MASK 0xdfffffff /* bit 29 */ - #define MA_tlutload_disable 0x0 - #define MA_tlutload_enable 0x20000000 - #define MA_nodither_MASK 0xbfffffff /* bit 30 */ - #define MA_nodither_disable 0x0 - #define MA_nodither_enable 0x40000000 - #define MA_dit555_MASK 0x7fffffff /* bit 31 */ - #define MA_dit555_disable 0x0 - #define MA_dit555_enable 0x80000000 - -#define MGAREG_MCTLWTST 0x1c08 - - #define MCWS_casltncy_MASK 0xfffffff8 /* bits 0-2 */ - #define MCWS_casltncy_SHIFT 0 - #define MCWS_rrddelay_MASK 0xffffffcf /* bits 4-5 */ - #define MCWS_rcddelay_MASK 0xfffffe7f /* bits 7-8 */ - #define MCWS_rasmin_MASK 0xffffe3ff /* bits 10-12 */ - #define MCWS_rasmin_SHIFT 10 - #define MCWS_rpdelay_MASK 0xffff3fff /* bits 14-15 */ - #define MCWS_wrdelay_MASK 0xfff3ffff /* bits 18-19 */ - #define MCWS_rddelay_MASK 0xffdfffff /* bit 21 */ - #define MCWS_rddelay_disable 0x0 - #define MCWS_rddelay_enable 0x200000 - #define MCWS_smrdelay_MASK 0xfe7fffff /* bits 23-24 */ - #define MCWS_bwcdelay_MASK 0xf3ffffff /* bits 26-27 */ - #define MCWS_bpldelay_MASK 0x1fffffff /* bits 29-31 */ - #define MCWS_bpldelay_SHIFT 29 - -#define MGAREG_MEMRDBK 0x1e44 - - #define MRB_mclkbrd0_MASK 0xfffffff0 /* bits 0-3 */ - #define MRB_mclkbrd0_SHIFT 0 - #define MRB_mclkbrd1_MASK 0xfffffe1f /* bits 5-8 */ - #define MRB_mclkbrd1_SHIFT 5 - #define MRB_strmfctl_MASK 0xff3fffff /* bits 22-23 */ - #define MRB_mrsopcod_MASK 0xe1ffffff /* bits 25-28 */ - #define MRB_mrsopcod_SHIFT 25 - -#define MGAREG_OPMODE 0x1e54 - - #define OM_dmamod_MASK 0xfffffff3 /* bits 2-3 */ - #define OM_dmamod_general 0x0 /* val 0, shift 2 */ - #define OM_dmamod_blit 0x4 /* val 1, shift 2 */ - #define OM_dmamod_vector 0x8 /* val 2, shift 2 */ - #define OM_dmamod_vertex 0xc /* val 3, shift 2 */ - #define OM_dmadatasiz_MASK 0xfffffcff /* bits 8-9 */ - #define OM_dmadatasiz_8 0x0 /* val 0, shift 8 */ - #define OM_dmadatasiz_16 0x100 /* val 1, shift 8 */ - #define OM_dmadatasiz_32 0x200 /* val 2, shift 8 */ - #define OM_dirdatasiz_MASK 0xfffcffff /* bits 16-17 */ - #define OM_dirdatasiz_8 0x0 /* val 0, shift 16 */ - #define OM_dirdatasiz_16 0x10000 /* val 1, shift 16 */ - #define OM_dirdatasiz_32 0x20000 /* val 2, shift 16 */ - -#define MGAREG_PAT0 0x1c10 -#define MGAREG_PAT1 0x1c14 -#define MGAREG_PITCH 0x1c8c - - #define P_iy_MASK 0xffffe000 /* bits 0-12 */ - #define P_iy_SHIFT 0 - #define P_ylin_MASK 0xffff7fff /* bit 15 */ - #define P_ylin_disable 0x0 - #define P_ylin_enable 0x8000 - -#define MGAREG_PLNWT 0x1c1c -#define MGAREG_PRIMADDRESS 0x1e58 - - #define PDCA_primod_MASK 0xfffffffc /* bits 0-1 */ - #define PDCA_primod_general 0x0 /* val 0, shift 0 */ - #define PDCA_primod_blit 0x1 /* val 1, shift 0 */ - #define PDCA_primod_vector 0x2 /* val 2, shift 0 */ - #define PDCA_primod_vertex 0x3 /* val 3, shift 0 */ - #define PDCA_primaddress_MASK 0x3 /* bits 2-31 */ - #define PDCA_primaddress_SHIFT 2 - -#define MGAREG_PRIMEND 0x1e5c - - #define PDEA_primnostart_MASK 0xfffffffe /* bit 0 */ - #define PDEA_primnostart_disable 0x0 - #define PDEA_primnostart_enable 0x1 - #define PDEA_pagpxfer_MASK 0xfffffffd /* bit 1 */ - #define PDEA_pagpxfer_disable 0x0 - #define PDEA_pagpxfer_enable 0x2 - #define PDEA_primend_MASK 0x3 /* bits 2-31 */ - #define PDEA_primend_SHIFT 2 - -#define MGAREG_PRIMPTR 0x1e50 - - #define PLS_primptren0_MASK 0xfffffffe /* bit 0 */ - #define PLS_primptren0_disable 0x0 - #define PLS_primptren0_enable 0x1 - #define PLS_primptren1_MASK 0xfffffffd /* bit 1 */ - #define PLS_primptren1_disable 0x0 - #define PLS_primptren1_enable 0x2 - #define PLS_primptr_MASK 0x7 /* bits 3-31 */ - #define PLS_primptr_SHIFT 3 - -#define MGAREG_RST 0x1e40 - - #define R_softreset_MASK 0xfffffffe /* bit 0 */ - #define R_softreset_disable 0x0 - #define R_softreset_enable 0x1 - #define R_softextrst_MASK 0xfffffffd /* bit 1 */ - #define R_softextrst_disable 0x0 - #define R_softextrst_enable 0x2 - -#define MGAREG_SECADDRESS 0x2c40 - - #define SDCA_secmod_MASK 0xfffffffc /* bits 0-1 */ - #define SDCA_secmod_general 0x0 /* val 0, shift 0 */ - #define SDCA_secmod_blit 0x1 /* val 1, shift 0 */ - #define SDCA_secmod_vector 0x2 /* val 2, shift 0 */ - #define SDCA_secmod_vertex 0x3 /* val 3, shift 0 */ - #define SDCA_secaddress_MASK 0x3 /* bits 2-31 */ - #define SDCA_secaddress_SHIFT 2 - -#define MGAREG_SECEND 0x2c44 - - #define SDEA_sagpxfer_MASK 0xfffffffd /* bit 1 */ - #define SDEA_sagpxfer_disable 0x0 - #define SDEA_sagpxfer_enable 0x2 - #define SDEA_secend_MASK 0x3 /* bits 2-31 */ - #define SDEA_secend_SHIFT 2 - -#define MGAREG_SETUPADDRESS 0x2cd0 - - #define SETADD_mode_MASK 0xfffffffc /* bits 0-1 */ - #define SETADD_mode_vertlist 0x0 /* val 0, shift 0 */ - #define SETADD_address_MASK 0x3 /* bits 2-31 */ - #define SETADD_address_SHIFT 2 - -#define MGAREG_SETUPEND 0x2cd4 - - #define SETEND_agpxfer_MASK 0xfffffffd /* bit 1 */ - #define SETEND_agpxfer_disable 0x0 - #define SETEND_agpxfer_enable 0x2 - #define SETEND_address_MASK 0x3 /* bits 2-31 */ - #define SETEND_address_SHIFT 2 - -#define MGAREG_SGN 0x1c58 - - #define S_sdydxl_MASK 0xfffffffe /* bit 0 */ - #define S_sdydxl_y 0x0 - #define S_sdydxl_x 0x1 - #define S_scanleft_MASK 0xfffffffe /* bit 0 */ - #define S_scanleft_disable 0x0 - #define S_scanleft_enable 0x1 - #define S_sdxl_MASK 0xfffffffd /* bit 1 */ - #define S_sdxl_pos 0x0 - #define S_sdxl_neg 0x2 - #define S_sdy_MASK 0xfffffffb /* bit 2 */ - #define S_sdy_pos 0x0 - #define S_sdy_neg 0x4 - #define S_sdxr_MASK 0xffffffdf /* bit 5 */ - #define S_sdxr_pos 0x0 - #define S_sdxr_neg 0x20 - #define S_brkleft_MASK 0xfffffeff /* bit 8 */ - #define S_brkleft_disable 0x0 - #define S_brkleft_enable 0x100 - #define S_errorinit_MASK 0x7fffffff /* bit 31 */ - #define S_errorinit_disable 0x0 - #define S_errorinit_enable 0x80000000 - -#define MGAREG_SHIFT 0x1c50 - - #define FSC_x_off_MASK 0xfffffff0 /* bits 0-3 */ - #define FSC_x_off_SHIFT 0 - #define FSC_funcnt_MASK 0xffffff80 /* bits 0-6 */ - #define FSC_funcnt_SHIFT 0 - #define FSC_y_off_MASK 0xffffff8f /* bits 4-6 */ - #define FSC_y_off_SHIFT 4 - #define FSC_funoff_MASK 0xffc0ffff /* bits 16-21 */ - #define FSC_funoff_SHIFT 16 - #define FSC_stylelen_MASK 0xffc0ffff /* bits 16-21 */ - #define FSC_stylelen_SHIFT 16 - -#define MGAREG_SOFTRAP 0x2c48 - - #define STH_softraphand_MASK 0x3 /* bits 2-31 */ - #define STH_softraphand_SHIFT 2 - -#define MGAREG_SPECBSTART 0x2c98 -#define MGAREG_SPECBXINC 0x2c9c -#define MGAREG_SPECBYINC 0x2ca0 -#define MGAREG_SPECGSTART 0x2c8c -#define MGAREG_SPECGXINC 0x2c90 -#define MGAREG_SPECGYINC 0x2c94 -#define MGAREG_SPECRSTART 0x2c80 -#define MGAREG_SPECRXINC 0x2c84 -#define MGAREG_SPECRYINC 0x2c88 -#define MGAREG_SRC0 0x1c30 -#define MGAREG_SRC1 0x1c34 -#define MGAREG_SRC2 0x1c38 -#define MGAREG_SRC3 0x1c3c -#define MGAREG_SRCORG 0x2cb4 - - #define SO_srcmap_MASK 0xfffffffe /* bit 0 */ - #define SO_srcmap_fb 0x0 - #define SO_srcmap_sys 0x1 - #define SO_srcacc_MASK 0xfffffffd /* bit 1 */ - #define SO_srcacc_pci 0x0 - #define SO_srcacc_agp 0x2 - #define SO_srcorg_MASK 0x7 /* bits 3-31 */ - #define SO_srcorg_SHIFT 3 - -#define MGAREG_STATUS 0x1e14 - - #define STAT_softrapen_MASK 0xfffffffe /* bit 0 */ - #define STAT_softrapen_disable 0x0 - #define STAT_softrapen_enable 0x1 - #define STAT_pickpen_MASK 0xfffffffb /* bit 2 */ - #define STAT_pickpen_disable 0x0 - #define STAT_pickpen_enable 0x4 - #define STAT_vsyncsts_MASK 0xfffffff7 /* bit 3 */ - #define STAT_vsyncsts_disable 0x0 - #define STAT_vsyncsts_enable 0x8 - #define STAT_vsyncpen_MASK 0xffffffef /* bit 4 */ - #define STAT_vsyncpen_disable 0x0 - #define STAT_vsyncpen_enable 0x10 - #define STAT_vlinepen_MASK 0xffffffdf /* bit 5 */ - #define STAT_vlinepen_disable 0x0 - #define STAT_vlinepen_enable 0x20 - #define STAT_extpen_MASK 0xffffffbf /* bit 6 */ - #define STAT_extpen_disable 0x0 - #define STAT_extpen_enable 0x40 - #define STAT_wpen_MASK 0xffffff7f /* bit 7 */ - #define STAT_wpen_disable 0x0 - #define STAT_wpen_enable 0x80 - #define STAT_wcpen_MASK 0xfffffeff /* bit 8 */ - #define STAT_wcpen_disable 0x0 - #define STAT_wcpen_enable 0x100 - #define STAT_dwgengsts_MASK 0xfffeffff /* bit 16 */ - #define STAT_dwgengsts_disable 0x0 - #define STAT_dwgengsts_enable 0x10000 - #define STAT_endprdmasts_MASK 0xfffdffff /* bit 17 */ - #define STAT_endprdmasts_disable 0x0 - #define STAT_endprdmasts_enable 0x20000 - #define STAT_wbusy_MASK 0xfffbffff /* bit 18 */ - #define STAT_wbusy_disable 0x0 - #define STAT_wbusy_enable 0x40000 - #define STAT_swflag_MASK 0xfffffff /* bits 28-31 */ - #define STAT_swflag_SHIFT 28 - -#define MGAREG_STENCIL 0x2cc8 - - #define S_sref_MASK 0xffffff00 /* bits 0-7 */ - #define S_sref_SHIFT 0 - #define S_smsk_MASK 0xffff00ff /* bits 8-15 */ - #define S_smsk_SHIFT 8 - #define S_swtmsk_MASK 0xff00ffff /* bits 16-23 */ - #define S_swtmsk_SHIFT 16 - -#define MGAREG_STENCILCTL 0x2ccc - - #define SC_smode_MASK 0xfffffff8 /* bits 0-2 */ - #define SC_smode_salways 0x0 /* val 0, shift 0 */ - #define SC_smode_snever 0x1 /* val 1, shift 0 */ - #define SC_smode_se 0x2 /* val 2, shift 0 */ - #define SC_smode_sne 0x3 /* val 3, shift 0 */ - #define SC_smode_slt 0x4 /* val 4, shift 0 */ - #define SC_smode_slte 0x5 /* val 5, shift 0 */ - #define SC_smode_sgt 0x6 /* val 6, shift 0 */ - #define SC_smode_sgte 0x7 /* val 7, shift 0 */ - #define SC_sfailop_MASK 0xffffffc7 /* bits 3-5 */ - #define SC_sfailop_keep 0x0 /* val 0, shift 3 */ - #define SC_sfailop_zero 0x8 /* val 1, shift 3 */ - #define SC_sfailop_replace 0x10 /* val 2, shift 3 */ - #define SC_sfailop_incrsat 0x18 /* val 3, shift 3 */ - #define SC_sfailop_decrsat 0x20 /* val 4, shift 3 */ - #define SC_sfailop_invert 0x28 /* val 5, shift 3 */ - #define SC_sfailop_incr 0x30 /* val 6, shift 3 */ - #define SC_sfailop_decr 0x38 /* val 7, shift 3 */ - #define SC_szfailop_MASK 0xfffffe3f /* bits 6-8 */ - #define SC_szfailop_keep 0x0 /* val 0, shift 6 */ - #define SC_szfailop_zero 0x40 /* val 1, shift 6 */ - #define SC_szfailop_replace 0x80 /* val 2, shift 6 */ - #define SC_szfailop_incrsat 0xc0 /* val 3, shift 6 */ - #define SC_szfailop_decrsat 0x100 /* val 4, shift 6 */ - #define SC_szfailop_invert 0x140 /* val 5, shift 6 */ - #define SC_szfailop_incr 0x180 /* val 6, shift 6 */ - #define SC_szfailop_decr 0x1c0 /* val 7, shift 6 */ - #define SC_szpassop_MASK 0xfffff1ff /* bits 9-11 */ - #define SC_szpassop_keep 0x0 /* val 0, shift 9 */ - #define SC_szpassop_zero 0x200 /* val 1, shift 9 */ - #define SC_szpassop_replace 0x400 /* val 2, shift 9 */ - #define SC_szpassop_incrsat 0x600 /* val 3, shift 9 */ - #define SC_szpassop_decrsat 0x800 /* val 4, shift 9 */ - #define SC_szpassop_invert 0xa00 /* val 5, shift 9 */ - #define SC_szpassop_incr 0xc00 /* val 6, shift 9 */ - #define SC_szpassop_decr 0xe00 /* val 7, shift 9 */ - -#define MGAREG_TDUALSTAGE0 0x2cf8 - - #define TD0_color_arg2_MASK 0xfffffffc /* bits 0-1 */ - #define TD0_color_arg2_diffuse 0x0 /* val 0, shift 0 */ - #define TD0_color_arg2_specular 0x1 /* val 1, shift 0 */ - #define TD0_color_arg2_fcol 0x2 /* val 2, shift 0 */ - #define TD0_color_arg2_prevstage 0x3 /* val 3, shift 0 */ - #define TD0_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ - #define TD0_color_alpha_diffuse 0x0 /* val 0, shift 2 */ - #define TD0_color_alpha_fcol 0x4 /* val 1, shift 2 */ - #define TD0_color_alpha_currtex 0x8 /* val 2, shift 2 */ - #define TD0_color_alpha_prevtex 0xc /* val 3, shift 2 */ - #define TD0_color_alpha_prevstage 0x10 /* val 4, shift 2 */ - #define TD0_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ - #define TD0_color_arg1_replicatealpha_disable 0x0 - #define TD0_color_arg1_replicatealpha_enable 0x20 - #define TD0_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ - #define TD0_color_arg1_inv_disable 0x0 - #define TD0_color_arg1_inv_enable 0x40 - #define TD0_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ - #define TD0_color_arg2_replicatealpha_disable 0x0 - #define TD0_color_arg2_replicatealpha_enable 0x80 - #define TD0_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ - #define TD0_color_arg2_inv_disable 0x0 - #define TD0_color_arg2_inv_enable 0x100 - #define TD0_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ - #define TD0_color_alpha1inv_disable 0x0 - #define TD0_color_alpha1inv_enable 0x200 - #define TD0_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ - #define TD0_color_alpha2inv_disable 0x0 - #define TD0_color_alpha2inv_enable 0x400 - #define TD0_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ - #define TD0_color_arg1mul_disable 0x0 /* val 0, shift 11 */ - #define TD0_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ - #define TD0_color_arg2mul_MASK 0xffffefff /* bit 12 */ - #define TD0_color_arg2mul_disable 0x0 /* val 0, shift 12 */ - #define TD0_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ - #define TD0_color_arg1add_MASK 0xffffdfff /* bit 13 */ - #define TD0_color_arg1add_disable 0x0 /* val 0, shift 13 */ - #define TD0_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ - #define TD0_color_arg2add_MASK 0xffffbfff /* bit 14 */ - #define TD0_color_arg2add_disable 0x0 /* val 0, shift 14 */ - #define TD0_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ - #define TD0_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ - #define TD0_color_modbright_disable 0x0 /* val 0, shift 15 */ - #define TD0_color_modbright_2x 0x8000 /* val 1, shift 15 */ - #define TD0_color_modbright_4x 0x10000 /* val 2, shift 15 */ - #define TD0_color_add_MASK 0xfffdffff /* bit 17 */ - #define TD0_color_add_sub 0x0 /* val 0, shift 17 */ - #define TD0_color_add_add 0x20000 /* val 1, shift 17 */ - #define TD0_color_add2x_MASK 0xfffbffff /* bit 18 */ - #define TD0_color_add2x_disable 0x0 - #define TD0_color_add2x_enable 0x40000 - #define TD0_color_addbias_MASK 0xfff7ffff /* bit 19 */ - #define TD0_color_addbias_disable 0x0 - #define TD0_color_addbias_enable 0x80000 - #define TD0_color_blend_MASK 0xffefffff /* bit 20 */ - #define TD0_color_blend_disable 0x0 - #define TD0_color_blend_enable 0x100000 - #define TD0_color_sel_MASK 0xff9fffff /* bits 21-22 */ - #define TD0_color_sel_arg1 0x0 /* val 0, shift 21 */ - #define TD0_color_sel_arg2 0x200000 /* val 1, shift 21 */ - #define TD0_color_sel_add 0x400000 /* val 2, shift 21 */ - #define TD0_color_sel_mul 0x600000 /* val 3, shift 21 */ - #define TD0_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ - #define TD0_alpha_arg1_inv_disable 0x0 - #define TD0_alpha_arg1_inv_enable 0x800000 - #define TD0_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ - #define TD0_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ - #define TD0_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ - #define TD0_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ - #define TD0_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ - #define TD0_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ - #define TD0_alpha_arg2_inv_disable 0x0 - #define TD0_alpha_arg2_inv_enable 0x4000000 - #define TD0_alpha_add_MASK 0xf7ffffff /* bit 27 */ - #define TD0_alpha_add_disable 0x0 - #define TD0_alpha_add_enable 0x8000000 - #define TD0_alpha_addbias_MASK 0xefffffff /* bit 28 */ - #define TD0_alpha_addbias_disable 0x0 - #define TD0_alpha_addbias_enable 0x10000000 - #define TD0_alpha_add2x_MASK 0xdfffffff /* bit 29 */ - #define TD0_alpha_add2x_disable 0x0 - #define TD0_alpha_add2x_enable 0x20000000 - #define TD0_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ - #define TD0_alpha_modbright_disable 0x0 /* val 0, shift 28 */ - #define TD0_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ - #define TD0_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ - #define TD0_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ - #define TD0_alpha_sel_arg1 0x0 /* val 0, shift 30 */ - #define TD0_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ - #define TD0_alpha_sel_add 0x80000000 /* val 2, shift 30 */ - #define TD0_alpha_sel_mul 0xc0000000 /* val 3, shift 30 */ - -#define MGAREG_TDUALSTAGE1 0x2cfc - - #define TD1_color_arg2_MASK 0xfffffffc /* bits 0-1 */ - #define TD1_color_arg2_diffuse 0x0 /* val 0, shift 0 */ - #define TD1_color_arg2_specular 0x1 /* val 1, shift 0 */ - #define TD1_color_arg2_fcol 0x2 /* val 2, shift 0 */ - #define TD1_color_arg2_prevstage 0x3 /* val 3, shift 0 */ - #define TD1_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ - #define TD1_color_alpha_diffuse 0x0 /* val 0, shift 2 */ - #define TD1_color_alpha_fcol 0x4 /* val 1, shift 2 */ - #define TD1_color_alpha_tex0 0x8 /* val 2, shift 2 */ - #define TD1_color_alpha_prevtex 0xc /* val 3, shift 2 */ - #define TD1_color_alpha_prevstage 0x10 /* val 4, shift 2 */ - #define TD1_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ - #define TD1_color_arg1_replicatealpha_disable 0x0 - #define TD1_color_arg1_replicatealpha_enable 0x20 - #define TD1_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ - #define TD1_color_arg1_inv_disable 0x0 - #define TD1_color_arg1_inv_enable 0x40 - #define TD1_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ - #define TD1_color_arg2_replicatealpha_disable 0x0 - #define TD1_color_arg2_replicatealpha_enable 0x80 - #define TD1_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ - #define TD1_color_arg2_inv_disable 0x0 - #define TD1_color_arg2_inv_enable 0x100 - #define TD1_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ - #define TD1_color_alpha1inv_disable 0x0 - #define TD1_color_alpha1inv_enable 0x200 - #define TD1_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ - #define TD1_color_alpha2inv_disable 0x0 - #define TD1_color_alpha2inv_enable 0x400 - #define TD1_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ - #define TD1_color_arg1mul_disable 0x0 /* val 0, shift 11 */ - #define TD1_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ - #define TD1_color_arg2mul_MASK 0xffffefff /* bit 12 */ - #define TD1_color_arg2mul_disable 0x0 /* val 0, shift 12 */ - #define TD1_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ - #define TD1_color_arg1add_MASK 0xffffdfff /* bit 13 */ - #define TD1_color_arg1add_disable 0x0 /* val 0, shift 13 */ - #define TD1_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ - #define TD1_color_arg2add_MASK 0xffffbfff /* bit 14 */ - #define TD1_color_arg2add_disable 0x0 /* val 0, shift 14 */ - #define TD1_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ - #define TD1_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ - #define TD1_color_modbright_disable 0x0 /* val 0, shift 15 */ - #define TD1_color_modbright_2x 0x8000 /* val 1, shift 15 */ - #define TD1_color_modbright_4x 0x10000 /* val 2, shift 15 */ - #define TD1_color_add_MASK 0xfffdffff /* bit 17 */ - #define TD1_color_add_sub 0x0 /* val 0, shift 17 */ - #define TD1_color_add_add 0x20000 /* val 1, shift 17 */ - #define TD1_color_add2x_MASK 0xfffbffff /* bit 18 */ - #define TD1_color_add2x_disable 0x0 - #define TD1_color_add2x_enable 0x40000 - #define TD1_color_addbias_MASK 0xfff7ffff /* bit 19 */ - #define TD1_color_addbias_disable 0x0 - #define TD1_color_addbias_enable 0x80000 - #define TD1_color_blend_MASK 0xffefffff /* bit 20 */ - #define TD1_color_blend_disable 0x0 - #define TD1_color_blend_enable 0x100000 - #define TD1_color_sel_MASK 0xff9fffff /* bits 21-22 */ - #define TD1_color_sel_arg1 0x0 /* val 0, shift 21 */ - #define TD1_color_sel_arg2 0x200000 /* val 1, shift 21 */ - #define TD1_color_sel_add 0x400000 /* val 2, shift 21 */ - #define TD1_color_sel_mul 0x600000 /* val 3, shift 21 */ - #define TD1_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ - #define TD1_alpha_arg1_inv_disable 0x0 - #define TD1_alpha_arg1_inv_enable 0x800000 - #define TD1_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ - #define TD1_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ - #define TD1_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ - #define TD1_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ - #define TD1_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ - #define TD1_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ - #define TD1_alpha_arg2_inv_disable 0x0 - #define TD1_alpha_arg2_inv_enable 0x4000000 - #define TD1_alpha_add_MASK 0xf7ffffff /* bit 27 */ - #define TD1_alpha_add_disable 0x0 - #define TD1_alpha_add_enable 0x8000000 - #define TD1_alpha_addbias_MASK 0xefffffff /* bit 28 */ - #define TD1_alpha_addbias_disable 0x0 - #define TD1_alpha_addbias_enable 0x10000000 - #define TD1_alpha_add2x_MASK 0xdfffffff /* bit 29 */ - #define TD1_alpha_add2x_disable 0x0 - #define TD1_alpha_add2x_enable 0x20000000 - #define TD1_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ - #define TD1_alpha_modbright_disable 0x0 /* val 0, shift 28 */ - #define TD1_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ - #define TD1_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ - #define TD1_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ - #define TD1_alpha_sel_arg1 0x0 /* val 0, shift 30 */ - #define TD1_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ - #define TD1_alpha_sel_add 0x80000000 /* val 2, shift 30 */ - #define TD1_alpha_sel_mul 0xc0000000 /* val 3, shift 30 */ - -#define MGAREG_TEST0 0x1e48 - - #define TST_ramtsten_MASK 0xfffffffe /* bit 0 */ - #define TST_ramtsten_disable 0x0 - #define TST_ramtsten_enable 0x1 - #define TST_ramtstdone_MASK 0xfffffffd /* bit 1 */ - #define TST_ramtstdone_disable 0x0 - #define TST_ramtstdone_enable 0x2 - #define TST_wramtstpass_MASK 0xfffffffb /* bit 2 */ - #define TST_wramtstpass_disable 0x0 - #define TST_wramtstpass_enable 0x4 - #define TST_tcachetstpass_MASK 0xfffffff7 /* bit 3 */ - #define TST_tcachetstpass_disable 0x0 - #define TST_tcachetstpass_enable 0x8 - #define TST_tluttstpass_MASK 0xffffffef /* bit 4 */ - #define TST_tluttstpass_disable 0x0 - #define TST_tluttstpass_enable 0x10 - #define TST_luttstpass_MASK 0xffffffdf /* bit 5 */ - #define TST_luttstpass_disable 0x0 - #define TST_luttstpass_enable 0x20 - #define TST_besramtstpass_MASK 0xffffffbf /* bit 6 */ - #define TST_besramtstpass_disable 0x0 - #define TST_besramtstpass_enable 0x40 - #define TST_ringen_MASK 0xfffffeff /* bit 8 */ - #define TST_ringen_disable 0x0 - #define TST_ringen_enable 0x100 - #define TST_apllbyp_MASK 0xfffffdff /* bit 9 */ - #define TST_apllbyp_disable 0x0 - #define TST_apllbyp_enable 0x200 - #define TST_hiten_MASK 0xfffffbff /* bit 10 */ - #define TST_hiten_disable 0x0 - #define TST_hiten_enable 0x400 - #define TST_tmode_MASK 0xffffc7ff /* bits 11-13 */ - #define TST_tmode_SHIFT 11 - #define TST_tclksel_MASK 0xfffe3fff /* bits 14-16 */ - #define TST_tclksel_SHIFT 14 - #define TST_ringcnten_MASK 0xfffdffff /* bit 17 */ - #define TST_ringcnten_disable 0x0 - #define TST_ringcnten_enable 0x20000 - #define TST_ringcnt_MASK 0xc003ffff /* bits 18-29 */ - #define TST_ringcnt_SHIFT 18 - #define TST_ringcntclksl_MASK 0xbfffffff /* bit 30 */ - #define TST_ringcntclksl_disable 0x0 - #define TST_ringcntclksl_enable 0x40000000 - #define TST_biosboot_MASK 0x7fffffff /* bit 31 */ - #define TST_biosboot_disable 0x0 - #define TST_biosboot_enable 0x80000000 - -#define MGAREG_TEXBORDERCOL 0x2c5c -#define MGAREG_TEXCTL 0x2c30 - - #define TMC_tformat_MASK 0xfffffff0 /* bits 0-3 */ - #define TMC_tformat_tw4 0x0 /* val 0, shift 0 */ - #define TMC_tformat_tw8 0x1 /* val 1, shift 0 */ - #define TMC_tformat_tw15 0x2 /* val 2, shift 0 */ - #define TMC_tformat_tw16 0x3 /* val 3, shift 0 */ - #define TMC_tformat_tw12 0x4 /* val 4, shift 0 */ - #define TMC_tformat_tw32 0x6 /* val 6, shift 0 */ - #define TMC_tformat_tw8a 0x7 /* val 7, shift 0 */ - #define TMC_tformat_tw8al 0x8 /* val 8, shift 0 */ - #define TMC_tformat_tw422 0xa /* val 10, shift 0 */ - #define TMC_tpitchlin_MASK 0xfffffeff /* bit 8 */ - #define TMC_tpitchlin_disable 0x0 - #define TMC_tpitchlin_enable 0x100 - #define TMC_tpitchext_MASK 0xfff001ff /* bits 9-19 */ - #define TMC_tpitchext_SHIFT 9 - #define TMC_tpitch_MASK 0xfff8ffff /* bits 16-18 */ - #define TMC_tpitch_SHIFT 16 - #define TMC_owalpha_MASK 0xffbfffff /* bit 22 */ - #define TMC_owalpha_disable 0x0 - #define TMC_owalpha_enable 0x400000 - #define TMC_azeroextend_MASK 0xff7fffff /* bit 23 */ - #define TMC_azeroextend_disable 0x0 - #define TMC_azeroextend_enable 0x800000 - #define TMC_decalckey_MASK 0xfeffffff /* bit 24 */ - #define TMC_decalckey_disable 0x0 - #define TMC_decalckey_enable 0x1000000 - #define TMC_takey_MASK 0xfdffffff /* bit 25 */ - #define TMC_takey_0 0x0 - #define TMC_takey_1 0x2000000 - #define TMC_tamask_MASK 0xfbffffff /* bit 26 */ - #define TMC_tamask_0 0x0 - #define TMC_tamask_1 0x4000000 - #define TMC_clampv_MASK 0xf7ffffff /* bit 27 */ - #define TMC_clampv_disable 0x0 - #define TMC_clampv_enable 0x8000000 - #define TMC_clampu_MASK 0xefffffff /* bit 28 */ - #define TMC_clampu_disable 0x0 - #define TMC_clampu_enable 0x10000000 - #define TMC_tmodulate_MASK 0xdfffffff /* bit 29 */ - #define TMC_tmodulate_disable 0x0 - #define TMC_tmodulate_enable 0x20000000 - #define TMC_strans_MASK 0xbfffffff /* bit 30 */ - #define TMC_strans_disable 0x0 - #define TMC_strans_enable 0x40000000 - #define TMC_itrans_MASK 0x7fffffff /* bit 31 */ - #define TMC_itrans_disable 0x0 - #define TMC_itrans_enable 0x80000000 - -#define MGAREG_TEXCTL2 0x2c3c - - #define TMC_decalblend_MASK 0xfffffffe /* bit 0 */ - #define TMC_decalblend_disable 0x0 - #define TMC_decalblend_enable 0x1 - #define TMC_idecal_MASK 0xfffffffd /* bit 1 */ - #define TMC_idecal_disable 0x0 - #define TMC_idecal_enable 0x2 - #define TMC_decaldis_MASK 0xfffffffb /* bit 2 */ - #define TMC_decaldis_disable 0x0 - #define TMC_decaldis_enable 0x4 - #define TMC_ckstransdis_MASK 0xffffffef /* bit 4 */ - #define TMC_ckstransdis_disable 0x0 - #define TMC_ckstransdis_enable 0x10 - #define TMC_borderen_MASK 0xffffffdf /* bit 5 */ - #define TMC_borderen_disable 0x0 - #define TMC_borderen_enable 0x20 - #define TMC_specen_MASK 0xffffffbf /* bit 6 */ - #define TMC_specen_disable 0x0 - #define TMC_specen_enable 0x40 - #define TMC_dualtex_MASK 0xffffff7f /* bit 7 */ - #define TMC_dualtex_disable 0x0 - #define TMC_dualtex_enable 0x80 - #define TMC_tablefog_MASK 0xfffffeff /* bit 8 */ - #define TMC_tablefog_disable 0x0 - #define TMC_tablefog_enable 0x100 - #define TMC_bumpmap_MASK 0xfffffdff /* bit 9 */ - #define TMC_bumpmap_disable 0x0 - #define TMC_bumpmap_enable 0x200 - #define TMC_map1_MASK 0x7fffffff /* bit 31 */ - #define TMC_map1_disable 0x0 - #define TMC_map1_enable 0x80000000 - -#define MGAREG_TEXFILTER 0x2c58 - - #define TF_minfilter_MASK 0xfffffff0 /* bits 0-3 */ - #define TF_minfilter_nrst 0x0 /* val 0, shift 0 */ - #define TF_minfilter_bilin 0x2 /* val 2, shift 0 */ - #define TF_minfilter_cnst 0x3 /* val 3, shift 0 */ - #define TF_minfilter_mm1s 0x8 /* val 8, shift 0 */ - #define TF_minfilter_mm2s 0x9 /* val 9, shift 0 */ - #define TF_minfilter_mm4s 0xa /* val 10, shift 0 */ - #define TF_minfilter_mm8s 0xc /* val 12, shift 0 */ - #define TF_magfilter_MASK 0xffffff0f /* bits 4-7 */ - #define TF_magfilter_nrst 0x0 /* val 0, shift 4 */ - #define TF_magfilter_bilin 0x20 /* val 2, shift 4 */ - #define TF_magfilter_cnst 0x30 /* val 3, shift 4 */ - #define TF_avgstride_MASK 0xfff7ffff /* bit 19 */ - #define TF_avgstride_disable 0x0 - #define TF_avgstride_enable 0x80000 - #define TF_filteralpha_MASK 0xffefffff /* bit 20 */ - #define TF_filteralpha_disable 0x0 - #define TF_filteralpha_enable 0x100000 - #define TF_fthres_MASK 0xe01fffff /* bits 21-28 */ - #define TF_fthres_SHIFT 21 - #define TF_mapnb_MASK 0x1fffffff /* bits 29-31 */ - #define TF_mapnb_SHIFT 29 - -#define MGAREG_TEXHEIGHT 0x2c2c - - #define TH_th_MASK 0xffffffc0 /* bits 0-5 */ - #define TH_th_SHIFT 0 - #define TH_rfh_MASK 0xffff81ff /* bits 9-14 */ - #define TH_rfh_SHIFT 9 - #define TH_thmask_MASK 0xe003ffff /* bits 18-28 */ - #define TH_thmask_SHIFT 18 - -#define MGAREG_TEXORG 0x2c24 - - #define TO_texorgmap_MASK 0xfffffffe /* bit 0 */ - #define TO_texorgmap_fb 0x0 - #define TO_texorgmap_sys 0x1 - #define TO_texorgacc_MASK 0xfffffffd /* bit 1 */ - #define TO_texorgacc_pci 0x0 - #define TO_texorgacc_agp 0x2 - #define TO_texorgoffsetsel 0x4 - #define TO_texorg_MASK 0x1f /* bits 5-31 */ - #define TO_texorg_SHIFT 5 - -#define MGAREG_TEXORG1 0x2ca4 -#define MGAREG_TEXORG2 0x2ca8 -#define MGAREG_TEXORG3 0x2cac -#define MGAREG_TEXORG4 0x2cb0 -#define MGAREG_TEXTRANS 0x2c34 - - #define TT_tckey_MASK 0xffff0000 /* bits 0-15 */ - #define TT_tckey_SHIFT 0 - #define TT_tkmask_MASK 0xffff /* bits 16-31 */ - #define TT_tkmask_SHIFT 16 - -#define MGAREG_TEXTRANSHIGH 0x2c38 - - #define TT_tckeyh_MASK 0xffff0000 /* bits 0-15 */ - #define TT_tckeyh_SHIFT 0 - #define TT_tkmaskh_MASK 0xffff /* bits 16-31 */ - #define TT_tkmaskh_SHIFT 16 - -#define MGAREG_TEXWIDTH 0x2c28 - - #define TW_tw_MASK 0xffffffc0 /* bits 0-5 */ - #define TW_tw_SHIFT 0 - #define TW_rfw_MASK 0xffff81ff /* bits 9-14 */ - #define TW_rfw_SHIFT 9 - #define TW_twmask_MASK 0xe003ffff /* bits 18-28 */ - #define TW_twmask_SHIFT 18 - -#define MGAREG_TMR0 0x2c00 -#define MGAREG_TMR1 0x2c04 -#define MGAREG_TMR2 0x2c08 -#define MGAREG_TMR3 0x2c0c -#define MGAREG_TMR4 0x2c10 -#define MGAREG_TMR5 0x2c14 -#define MGAREG_TMR6 0x2c18 -#define MGAREG_TMR7 0x2c1c -#define MGAREG_TMR8 0x2c20 -#define MGAREG_VBIADDR0 0x3e08 -#define MGAREG_VBIADDR1 0x3e0c -#define MGAREG_VCOUNT 0x1e20 -#define MGAREG_WACCEPTSEQ 0x1dd4 - - #define WAS_seqdst0_MASK 0xffffffc0 /* bits 0-5 */ - #define WAS_seqdst0_SHIFT 0 - #define WAS_seqdst1_MASK 0xfffff03f /* bits 6-11 */ - #define WAS_seqdst1_SHIFT 6 - #define WAS_seqdst2_MASK 0xfffc0fff /* bits 12-17 */ - #define WAS_seqdst2_SHIFT 12 - #define WAS_seqdst3_MASK 0xff03ffff /* bits 18-23 */ - #define WAS_seqdst3_SHIFT 18 - #define WAS_seqlen_MASK 0xfcffffff /* bits 24-25 */ - #define WAS_wfirsttag_MASK 0xfbffffff /* bit 26 */ - #define WAS_wfirsttag_disable 0x0 - #define WAS_wfirsttag_enable 0x4000000 - #define WAS_wsametag_MASK 0xf7ffffff /* bit 27 */ - #define WAS_wsametag_disable 0x0 - #define WAS_wsametag_enable 0x8000000 - #define WAS_seqoff_MASK 0xefffffff /* bit 28 */ - #define WAS_seqoff_disable 0x0 - #define WAS_seqoff_enable 0x10000000 - -#define MGAREG_WCODEADDR 0x1e6c - - #define WMA_wcodeaddr_MASK 0xff /* bits 8-31 */ - #define WMA_wcodeaddr_SHIFT 8 - -#define MGAREG_WFLAG 0x1dc4 - - #define WF_walustsflag_MASK 0xffffff00 /* bits 0-7 */ - #define WF_walustsflag_SHIFT 0 - #define WF_walucfgflag_MASK 0xffff00ff /* bits 8-15 */ - #define WF_walucfgflag_SHIFT 8 - #define WF_wprgflag_MASK 0xffff /* bits 16-31 */ - #define WF_wprgflag_SHIFT 16 - -#define MGAREG_WFLAG1 0x1de0 - - #define WF1_walustsflag1_MASK 0xffffff00 /* bits 0-7 */ - #define WF1_walustsflag1_SHIFT 0 - #define WF1_walucfgflag1_MASK 0xffff00ff /* bits 8-15 */ - #define WF1_walucfgflag1_SHIFT 8 - #define WF1_wprgflag1_MASK 0xffff /* bits 16-31 */ - #define WF1_wprgflag1_SHIFT 16 - -#define MGAREG_WFLAGNB 0x1e64 -#define MGAREG_WFLAGNB1 0x1e08 -#define MGAREG_WGETMSB 0x1dc8 - - #define WGV_wgetmsbmin_MASK 0xffffffe0 /* bits 0-4 */ - #define WGV_wgetmsbmin_SHIFT 0 - #define WGV_wgetmsbmax_MASK 0xffffe0ff /* bits 8-12 */ - #define WGV_wgetmsbmax_SHIFT 8 - #define WGV_wbrklefttop_MASK 0xfffeffff /* bit 16 */ - #define WGV_wbrklefttop_disable 0x0 - #define WGV_wbrklefttop_enable 0x10000 - #define WGV_wfastcrop_MASK 0xfffdffff /* bit 17 */ - #define WGV_wfastcrop_disable 0x0 - #define WGV_wfastcrop_enable 0x20000 - #define WGV_wcentersnap_MASK 0xfffbffff /* bit 18 */ - #define WGV_wcentersnap_disable 0x0 - #define WGV_wcentersnap_enable 0x40000 - #define WGV_wbrkrighttop_MASK 0xfff7ffff /* bit 19 */ - #define WGV_wbrkrighttop_disable 0x0 - #define WGV_wbrkrighttop_enable 0x80000 - -#define MGAREG_WIADDR 0x1dc0 - - #define WIA_wmode_MASK 0xfffffffc /* bits 0-1 */ - #define WIA_wmode_suspend 0x0 /* val 0, shift 0 */ - #define WIA_wmode_resume 0x1 /* val 1, shift 0 */ - #define WIA_wmode_jump 0x2 /* val 2, shift 0 */ - #define WIA_wmode_start 0x3 /* val 3, shift 0 */ - #define WIA_wagp_MASK 0xfffffffb /* bit 2 */ - #define WIA_wagp_pci 0x0 - #define WIA_wagp_agp 0x4 - #define WIA_wiaddr_MASK 0x7 /* bits 3-31 */ - #define WIA_wiaddr_SHIFT 3 - -#define MGAREG_WIADDR2 0x1dd8 - - #define WIA2_wmode_MASK 0xfffffffc /* bits 0-1 */ - #define WIA2_wmode_suspend 0x0 /* val 0, shift 0 */ - #define WIA2_wmode_resume 0x1 /* val 1, shift 0 */ - #define WIA2_wmode_jump 0x2 /* val 2, shift 0 */ - #define WIA2_wmode_start 0x3 /* val 3, shift 0 */ - #define WIA2_wagp_MASK 0xfffffffb /* bit 2 */ - #define WIA2_wagp_pci 0x0 - #define WIA2_wagp_agp 0x4 - #define WIA2_wiaddr_MASK 0x7 /* bits 3-31 */ - #define WIA2_wiaddr_SHIFT 3 - -#define MGAREG_WIADDRNB 0x1e60 -#define MGAREG_WIADDRNB1 0x1e04 -#define MGAREG_WIADDRNB2 0x1e00 -#define MGAREG_WIMEMADDR 0x1e68 - - #define WIMA_wimemaddr_MASK 0xffffff00 /* bits 0-7 */ - #define WIMA_wimemaddr_SHIFT 0 - -#define MGAREG_WIMEMDATA 0x2000 -#define MGAREG_WIMEMDATA1 0x2100 -#define MGAREG_WMISC 0x1e70 - - #define WM_wucodecache_MASK 0xfffffffe /* bit 0 */ - #define WM_wucodecache_disable 0x0 - #define WM_wucodecache_enable 0x1 - #define WM_wmaster_MASK 0xfffffffd /* bit 1 */ - #define WM_wmaster_disable 0x0 - #define WM_wmaster_enable 0x2 - #define WM_wcacheflush_MASK 0xfffffff7 /* bit 3 */ - #define WM_wcacheflush_disable 0x0 - #define WM_wcacheflush_enable 0x8 - -#define MGAREG_WR 0x2d00 -#define MGAREG_WVRTXSZ 0x1dcc - - #define WVS_wvrtxsz_MASK 0xffffffc0 /* bits 0-5 */ - #define WVS_wvrtxsz_SHIFT 0 - #define WVS_primsz_MASK 0xffffc0ff /* bits 8-13 */ - #define WVS_primsz_SHIFT 8 - -#define MGAREG_XDST 0x1cb0 -#define MGAREG_XYEND 0x1c44 - - #define XYEA_x_end_MASK 0xffff0000 /* bits 0-15 */ - #define XYEA_x_end_SHIFT 0 - #define XYEA_y_end_MASK 0xffff /* bits 16-31 */ - #define XYEA_y_end_SHIFT 16 - -#define MGAREG_XYSTRT 0x1c40 - - #define XYSA_x_start_MASK 0xffff0000 /* bits 0-15 */ - #define XYSA_x_start_SHIFT 0 - #define XYSA_y_start_MASK 0xffff /* bits 16-31 */ - #define XYSA_y_start_SHIFT 16 - -#define MGAREG_YBOT 0x1c9c -#define MGAREG_YDST 0x1c90 - - #define YA_ydst_MASK 0xff800000 /* bits 0-22 */ - #define YA_ydst_SHIFT 0 - #define YA_sellin_MASK 0x1fffffff /* bits 29-31 */ - #define YA_sellin_SHIFT 29 - -#define MGAREG_YDSTLEN 0x1c88 - - #define YDL_length_MASK 0xffff0000 /* bits 0-15 */ - #define YDL_length_SHIFT 0 - #define YDL_yval_MASK 0xffff /* bits 16-31 */ - #define YDL_yval_SHIFT 16 - -#define MGAREG_YDSTORG 0x1c94 -#define MGAREG_YTOP 0x1c98 -#define MGAREG_ZORG 0x1c0c - - #define ZO_zorgmap_MASK 0xfffffffe /* bit 0 */ - #define ZO_zorgmap_fb 0x0 - #define ZO_zorgmap_sys 0x1 - #define ZO_zorgacc_MASK 0xfffffffd /* bit 1 */ - #define ZO_zorgacc_pci 0x0 - #define ZO_zorgacc_agp 0x2 - #define ZO_zorg_MASK 0x3 /* bits 2-31 */ - #define ZO_zorg_SHIFT 2 + #define AGP_PLL_agp2xpllen_MASK 0xfffffffe /* bit 0 */ + #define AGP_PLL_agp2xpllen_disable 0x0 + #define AGP_PLL_agp2xpllen_enable 0x1 + +#define MGAREG_CFG_OR 0x1e4c + + #define CFG_OR_comp_or_MASK 0xfffffff7 /* bit 3 */ + #define CFG_OR_comp_or_disable 0x0 + #define CFG_OR_comp_or_enable 0x8 + #define CFG_OR_compfreq_MASK 0xffffff0f /* bits 4-7 */ + #define CFG_OR_compfreq_SHIFT 4 + #define CFG_OR_comporup_MASK 0xfffff0ff /* bits 8-11 */ + #define CFG_OR_comporup_SHIFT 8 + #define CFG_OR_compordn_MASK 0xffff0fff /* bits 12-15 */ + #define CFG_OR_compordn_SHIFT 12 + #define CFG_OR_e2pq_MASK 0xfffeffff /* bit 16 */ + #define CFG_OR_e2pq_disable 0x0 + #define CFG_OR_e2pq_enable 0x10000 + #define CFG_OR_e2pqbypcsn_MASK 0xfffdffff /* bit 17 */ + #define CFG_OR_e2pqbypcsn_disable 0x0 + #define CFG_OR_e2pqbypcsn_enable 0x20000 + #define CFG_OR_e2pqbypd_MASK 0xfffbffff /* bit 18 */ + #define CFG_OR_e2pqbypd_disable 0x0 + #define CFG_OR_e2pqbypd_enable 0x40000 + #define CFG_OR_e2pbypclk_MASK 0xfff7ffff /* bit 19 */ + #define CFG_OR_e2pbypclk_disable 0x0 + #define CFG_OR_e2pbypclk_enable 0x80000 + #define CFG_OR_e2pbyp_MASK 0xffefffff /* bit 20 */ + #define CFG_OR_e2pbyp_disable 0x0 + #define CFG_OR_e2pbyp_enable 0x100000 + #define CFG_OR_rate_cap_or_MASK 0xff1fffff /* bits 21-23 */ + #define CFG_OR_rate_cap_or_SHIFT 21 + #define CFG_OR_rq_or_MASK 0xe0ffffff /* bits 24-28 */ + #define CFG_OR_rq_or_SHIFT 24 + +#define MGAREG_ALPHACTRL 0x2c7c + + #define AC_src_MASK 0xfffffff0 /* bits 0-3 */ + #define AC_src_zero 0x0 /* val 0, shift 0 */ + #define AC_src_one 0x1 /* val 1, shift 0 */ + #define AC_src_dst_color 0x2 /* val 2, shift 0 */ + #define AC_src_om_dst_color 0x3 /* val 3, shift 0 */ + #define AC_src_src_alpha 0x4 /* val 4, shift 0 */ + #define AC_src_om_src_alpha 0x5 /* val 5, shift 0 */ + #define AC_src_dst_alpha 0x6 /* val 6, shift 0 */ + #define AC_src_om_dst_alpha 0x7 /* val 7, shift 0 */ + #define AC_src_src_alpha_sat 0x8 /* val 8, shift 0 */ + #define AC_dst_MASK 0xffffff0f /* bits 4-7 */ + #define AC_dst_zero 0x0 /* val 0, shift 4 */ + #define AC_dst_one 0x10 /* val 1, shift 4 */ + #define AC_dst_src_color 0x20 /* val 2, shift 4 */ + #define AC_dst_om_src_color 0x30 /* val 3, shift 4 */ + #define AC_dst_src_alpha 0x40 /* val 4, shift 4 */ + #define AC_dst_om_src_alpha 0x50 /* val 5, shift 4 */ + #define AC_dst_dst_alpha 0x60 /* val 6, shift 4 */ + #define AC_dst_om_dst_alpha 0x70 /* val 7, shift 4 */ + #define AC_amode_MASK 0xfffffcff /* bits 8-9 */ + #define AC_amode_FCOL 0x0 /* val 0, shift 8 */ + #define AC_amode_alpha_channel 0x100 /* val 1, shift 8 */ + #define AC_amode_video_alpha 0x200 /* val 2, shift 8 */ + #define AC_amode_RSVD 0x300 /* val 3, shift 8 */ + #define AC_astipple_MASK 0xfffff7ff /* bit 11 */ + #define AC_astipple_disable 0x0 + #define AC_astipple_enable 0x800 + #define AC_aten_MASK 0xffffefff /* bit 12 */ + #define AC_aten_disable 0x0 + #define AC_aten_enable 0x1000 + #define AC_atmode_MASK 0xffff1fff /* bits 13-15 */ + #define AC_atmode_noacmp 0x0 /* val 0, shift 13 */ + #define AC_atmode_ae 0x4000 /* val 2, shift 13 */ + #define AC_atmode_ane 0x6000 /* val 3, shift 13 */ + #define AC_atmode_alt 0x8000 /* val 4, shift 13 */ + #define AC_atmode_alte 0xa000 /* val 5, shift 13 */ + #define AC_atmode_agt 0xc000 /* val 6, shift 13 */ + #define AC_atmode_agte 0xe000 /* val 7, shift 13 */ + #define AC_atref_MASK 0xff00ffff /* bits 16-23 */ + #define AC_atref_SHIFT 16 + #define AC_alphasel_MASK 0xfcffffff /* bits 24-25 */ + #define AC_alphasel_fromtex 0x0 /* val 0, shift 24 */ + #define AC_alphasel_diffused 0x1000000 /* val 1, shift 24 */ + #define AC_alphasel_modulated 0x2000000 /* val 2, shift 24 */ + #define AC_alphasel_trans 0x3000000 /* val 3, shift 24 */ + +#define MGAREG_ALPHASTART 0x2c70 +#define MGAREG_ALPHAXINC 0x2c74 +#define MGAREG_ALPHAYINC 0x2c78 +#define MGAREG_AR0 0x1c60 + + #define AR0_ar0_MASK 0xfffc0000 /* bits 0-17 */ + #define AR0_ar0_SHIFT 0 + +#define MGAREG_AR1 0x1c64 + + #define AR1_ar1_MASK 0xff000000 /* bits 0-23 */ + #define AR1_ar1_SHIFT 0 + +#define MGAREG_AR2 0x1c68 + + #define AR2_ar2_MASK 0xfffc0000 /* bits 0-17 */ + #define AR2_ar2_SHIFT 0 + +#define MGAREG_AR3 0x1c6c + + #define AR3_ar3_MASK 0xff000000 /* bits 0-23 */ + #define AR3_ar3_SHIFT 0 + #define AR3_spage_MASK 0xf8ffffff /* bits 24-26 */ + #define AR3_spage_SHIFT 24 + +#define MGAREG_AR4 0x1c70 + + #define AR4_ar4_MASK 0xfffc0000 /* bits 0-17 */ + #define AR4_ar4_SHIFT 0 + +#define MGAREG_AR5 0x1c74 + + #define AR5_ar5_MASK 0xfffc0000 /* bits 0-17 */ + #define AR5_ar5_SHIFT 0 + +#define MGAREG_AR6 0x1c78 + + #define AR6_ar6_MASK 0xfffc0000 /* bits 0-17 */ + #define AR6_ar6_SHIFT 0 + +#define MGAREG_BCOL 0x1c20 +#define MGAREG_BESA1CORG 0x3d10 +#define MGAREG_BESA1ORG 0x3d00 +#define MGAREG_BESA2CORG 0x3d14 +#define MGAREG_BESA2ORG 0x3d04 +#define MGAREG_BESB1CORG 0x3d18 +#define MGAREG_BESB1ORG 0x3d08 +#define MGAREG_BESB2CORG 0x3d1c +#define MGAREG_BESB2ORG 0x3d0c +#define MGAREG_BESCTL 0x3d20 + + #define BC_besen_MASK 0xfffffffe /* bit 0 */ + #define BC_besen_disable 0x0 + #define BC_besen_enable 0x1 + #define BC_besv1srcstp_MASK 0xffffffbf /* bit 6 */ + #define BC_besv1srcstp_even 0x0 + #define BC_besv1srcstp_odd 0x40 + #define BC_besv2srcstp_MASK 0xfffffeff /* bit 8 */ + #define BC_besv2srcstp_disable 0x0 + #define BC_besv2srcstp_enable 0x100 + #define BC_beshfen_MASK 0xfffffbff /* bit 10 */ + #define BC_beshfen_disable 0x0 + #define BC_beshfen_enable 0x400 + #define BC_besvfen_MASK 0xfffff7ff /* bit 11 */ + #define BC_besvfen_disable 0x0 + #define BC_besvfen_enable 0x800 + #define BC_beshfixc_MASK 0xffffefff /* bit 12 */ + #define BC_beshfixc_weight 0x0 + #define BC_beshfixc_coeff 0x1000 + #define BC_bescups_MASK 0xfffeffff /* bit 16 */ + #define BC_bescups_disable 0x0 + #define BC_bescups_enable 0x10000 + #define BC_bes420pl_MASK 0xfffdffff /* bit 17 */ + #define BC_bes420pl_422 0x0 + #define BC_bes420pl_420 0x20000 + #define BC_besdith_MASK 0xfffbffff /* bit 18 */ + #define BC_besdith_disable 0x0 + #define BC_besdith_enable 0x40000 + #define BC_beshmir_MASK 0xfff7ffff /* bit 19 */ + #define BC_beshmir_disable 0x0 + #define BC_beshmir_enable 0x80000 + #define BC_besbwen_MASK 0xffefffff /* bit 20 */ + #define BC_besbwen_color 0x0 + #define BC_besbwen_bw 0x100000 + #define BC_besblank_MASK 0xffdfffff /* bit 21 */ + #define BC_besblank_disable 0x0 + #define BC_besblank_enable 0x200000 + #define BC_besfselm_MASK 0xfeffffff /* bit 24 */ + #define BC_besfselm_soft 0x0 + #define BC_besfselm_hard 0x1000000 + #define BC_besfsel_MASK 0xf9ffffff /* bits 25-26 */ + #define BC_besfsel_a1 0x0 /* val 0, shift 25 */ + #define BC_besfsel_a2 0x2000000 /* val 1, shift 25 */ + #define BC_besfsel_b1 0x4000000 /* val 2, shift 25 */ + #define BC_besfsel_b2 0x6000000 /* val 3, shift 25 */ + +#define MGAREG_BESGLOBCTL 0x3dc0 + + #define BGC_beshzoom_MASK 0xfffffffe /* bit 0 */ + #define BGC_beshzoom_disable 0x0 + #define BGC_beshzoom_enable 0x1 + #define BGC_beshzoomf_MASK 0xfffffffd /* bit 1 */ + #define BGC_beshzoomf_disable 0x0 + #define BGC_beshzoomf_enable 0x2 + #define BGC_bescorder_MASK 0xfffffff7 /* bit 3 */ + #define BGC_bescorder_even 0x0 + #define BGC_bescorder_odd 0x8 + #define BGC_besreghup_MASK 0xffffffef /* bit 4 */ + #define BGC_besreghup_disable 0x0 + #define BGC_besreghup_enable 0x10 + #define BGC_besvcnt_MASK 0xf000ffff /* bits 16-27 */ + #define BGC_besvcnt_SHIFT 16 + +#define MGAREG_BESHCOORD 0x3d28 + + #define BHC_besright_MASK 0xfffff800 /* bits 0-10 */ + #define BHC_besright_SHIFT 0 + #define BHC_besleft_MASK 0xf800ffff /* bits 16-26 */ + #define BHC_besleft_SHIFT 16 + +#define MGAREG_BESHISCAL 0x3d30 + + #define BHISF_beshiscal_MASK 0xffe00003 /* bits 2-20 */ + #define BHISF_beshiscal_SHIFT 2 + +#define MGAREG_BESHSRCEND 0x3d3c + + #define BHSE_beshsrcend_MASK 0xfc000003 /* bits 2-25 */ + #define BHSE_beshsrcend_SHIFT 2 + +#define MGAREG_BESHSRCLST 0x3d50 + + #define BHSL_beshsrclst_MASK 0xfc00ffff /* bits 16-25 */ + #define BHSL_beshsrclst_SHIFT 16 + +#define MGAREG_BESHSRCST 0x3d38 + + #define BHSS_beshsrcst_MASK 0xfc000003 /* bits 2-25 */ + #define BHSS_beshsrcst_SHIFT 2 + +#define MGAREG_BESPITCH 0x3d24 + + #define BP_bespitch_MASK 0xfffff000 /* bits 0-11 */ + #define BP_bespitch_SHIFT 0 + +#define MGAREG_BESSTATUS 0x3dc4 + + #define BS_besstat_MASK 0xfffffffc /* bits 0-1 */ + #define BS_besstat_a1 0x0 /* val 0, shift 0 */ + #define BS_besstat_a2 0x1 /* val 1, shift 0 */ + #define BS_besstat_b1 0x2 /* val 2, shift 0 */ + #define BS_besstat_b2 0x3 /* val 3, shift 0 */ + +#define MGAREG_BESV1SRCLST 0x3d54 + + #define BSF_besv1srclast_MASK 0xfffffc00 /* bits 0-9 */ + #define BSF_besv1srclast_SHIFT 0 + +#define MGAREG_BESV2SRCLST 0x3d58 + + #define BSF_besv2srclst_MASK 0xfffffc00 /* bits 0-9 */ + #define BSF_besv2srclst_SHIFT 0 + +#define MGAREG_BESV1WGHT 0x3d48 + + #define BSF_besv1wght_MASK 0xffff0003 /* bits 2-15 */ + #define BSF_besv1wght_SHIFT 2 + #define BSF_besv1wghts_MASK 0xfffeffff /* bit 16 */ + #define BSF_besv1wghts_disable 0x0 + #define BSF_besv1wghts_enable 0x10000 + +#define MGAREG_BESV2WGHT 0x3d4c + + #define BSF_besv2wght_MASK 0xffff0003 /* bits 2-15 */ + #define BSF_besv2wght_SHIFT 2 + #define BSF_besv2wghts_MASK 0xfffeffff /* bit 16 */ + #define BSF_besv2wghts_disable 0x0 + #define BSF_besv2wghts_enable 0x10000 + +#define MGAREG_BESVCOORD 0x3d2c + + #define BVC_besbot_MASK 0xfffff800 /* bits 0-10 */ + #define BVC_besbot_SHIFT 0 + #define BVC_bestop_MASK 0xf800ffff /* bits 16-26 */ + #define BVC_bestop_SHIFT 16 + +#define MGAREG_BESVISCAL 0x3d34 + + #define BVISF_besviscal_MASK 0xffe00003 /* bits 2-20 */ + #define BVISF_besviscal_SHIFT 2 + +#define MGAREG_CODECADDR 0x3e44 +#define MGAREG_CODECCTL 0x3e40 +#define MGAREG_CODECHARDPTR 0x3e4c +#define MGAREG_CODECHOSTPTR 0x3e48 +#define MGAREG_CODECLCODE 0x3e50 +#define MGAREG_CXBNDRY 0x1c80 + + #define CXB_cxleft_MASK 0xfffff000 /* bits 0-11 */ + #define CXB_cxleft_SHIFT 0 + #define CXB_cxright_MASK 0xf000ffff /* bits 16-27 */ + #define CXB_cxright_SHIFT 16 + +#define MGAREG_CXLEFT 0x1ca0 +#define MGAREG_CXRIGHT 0x1ca4 +#define MGAREG_DMAMAP30 0x1e30 +#define MGAREG_DMAMAP74 0x1e34 +#define MGAREG_DMAMAPB8 0x1e38 +#define MGAREG_DMAMAPFC 0x1e3c +#define MGAREG_DMAPAD 0x1c54 +#define MGAREG_DR0_Z32LSB 0x2c50 +#define MGAREG_DR0_Z32MSB 0x2c54 +#define MGAREG_DR2_Z32LSB 0x2c60 +#define MGAREG_DR2_Z32MSB 0x2c64 +#define MGAREG_DR3_Z32LSB 0x2c68 +#define MGAREG_DR3_Z32MSB 0x2c6c +#define MGAREG_DR0 0x1cc0 +#define MGAREG_DR2 0x1cc8 +#define MGAREG_DR3 0x1ccc +#define MGAREG_DR4 0x1cd0 +#define MGAREG_DR6 0x1cd8 +#define MGAREG_DR7 0x1cdc +#define MGAREG_DR8 0x1ce0 +#define MGAREG_DR10 0x1ce8 +#define MGAREG_DR11 0x1cec +#define MGAREG_DR12 0x1cf0 +#define MGAREG_DR14 0x1cf8 +#define MGAREG_DR15 0x1cfc +#define MGAREG_DSTORG 0x2cb8 + + #define DO_dstmap_MASK 0xfffffffe /* bit 0 */ + #define DO_dstmap_fb 0x0 + #define DO_dstmap_sys 0x1 + #define DO_dstacc_MASK 0xfffffffd /* bit 1 */ + #define DO_dstacc_pci 0x0 + #define DO_dstacc_agp 0x2 + #define DO_dstorg_MASK 0x7 /* bits 3-31 */ + #define DO_dstorg_SHIFT 3 + +#define MGAREG_DWG_INDIR_WT 0x1e80 +#define MGAREG_DWGCTL 0x1c00 + + #define DC_opcod_MASK 0xfffffff0 /* bits 0-3 */ + #define DC_opcod_line_open 0x0 /* val 0, shift 0 */ + #define DC_opcod_autoline_open 0x1 /* val 1, shift 0 */ + #define DC_opcod_line_close 0x2 /* val 2, shift 0 */ + #define DC_opcod_autoline_close 0x3 /* val 3, shift 0 */ + #define DC_opcod_trap 0x4 /* val 4, shift 0 */ + #define DC_opcod_texture_trap 0x6 /* val 6, shift 0 */ + #define DC_opcod_bitblt 0x8 /* val 8, shift 0 */ + #define DC_opcod_iload 0x9 /* val 9, shift 0 */ + #define DC_atype_MASK 0xffffff8f /* bits 4-6 */ + #define DC_atype_rpl 0x0 /* val 0, shift 4 */ + #define DC_atype_rstr 0x10 /* val 1, shift 4 */ + #define DC_atype_zi 0x30 /* val 3, shift 4 */ + #define DC_atype_blk 0x40 /* val 4, shift 4 */ + #define DC_atype_i 0x70 /* val 7, shift 4 */ + #define DC_linear_MASK 0xffffff7f /* bit 7 */ + #define DC_linear_xy 0x0 + #define DC_linear_linear 0x80 + #define DC_zmode_MASK 0xfffff8ff /* bits 8-10 */ + #define DC_zmode_nozcmp 0x0 /* val 0, shift 8 */ + #define DC_zmode_ze 0x200 /* val 2, shift 8 */ + #define DC_zmode_zne 0x300 /* val 3, shift 8 */ + #define DC_zmode_zlt 0x400 /* val 4, shift 8 */ + #define DC_zmode_zlte 0x500 /* val 5, shift 8 */ + #define DC_zmode_zgt 0x600 /* val 6, shift 8 */ + #define DC_zmode_zgte 0x700 /* val 7, shift 8 */ + #define DC_solid_MASK 0xfffff7ff /* bit 11 */ + #define DC_solid_disable 0x0 + #define DC_solid_enable 0x800 + #define DC_arzero_MASK 0xffffefff /* bit 12 */ + #define DC_arzero_disable 0x0 + #define DC_arzero_enable 0x1000 + #define DC_sgnzero_MASK 0xffffdfff /* bit 13 */ + #define DC_sgnzero_disable 0x0 + #define DC_sgnzero_enable 0x2000 + #define DC_shftzero_MASK 0xffffbfff /* bit 14 */ + #define DC_shftzero_disable 0x0 + #define DC_shftzero_enable 0x4000 + #define DC_bop_MASK 0xfff0ffff /* bits 16-19 */ + #define DC_bop_SHIFT 16 + #define DC_trans_MASK 0xff0fffff /* bits 20-23 */ + #define DC_trans_SHIFT 20 + #define DC_bltmod_MASK 0xe1ffffff /* bits 25-28 */ + #define DC_bltmod_bmonolef 0x0 /* val 0, shift 25 */ + #define DC_bltmod_bmonowf 0x8000000 /* val 4, shift 25 */ + #define DC_bltmod_bplan 0x2000000 /* val 1, shift 25 */ + #define DC_bltmod_bfcol 0x4000000 /* val 2, shift 25 */ + #define DC_bltmod_bu32bgr 0x6000000 /* val 3, shift 25 */ + #define DC_bltmod_bu32rgb 0xe000000 /* val 7, shift 25 */ + #define DC_bltmod_bu24bgr 0x16000000 /* val 11, shift 25 */ + #define DC_bltmod_bu24rgb 0x1e000000 /* val 15, shift 25 */ + #define DC_pattern_MASK 0xdfffffff /* bit 29 */ + #define DC_pattern_disable 0x0 + #define DC_pattern_enable 0x20000000 + #define DC_transc_MASK 0xbfffffff /* bit 30 */ + #define DC_transc_disable 0x0 + #define DC_transc_enable 0x40000000 + #define DC_clipdis_MASK 0x7fffffff /* bit 31 */ + #define DC_clipdis_disable 0x0 + #define DC_clipdis_enable 0x80000000 + +#define MGAREG_DWGSYNC 0x2c4c + + #define DS_dwgsyncaddr_MASK 0x3 /* bits 2-31 */ + #define DS_dwgsyncaddr_SHIFT 2 + +#define MGAREG_FCOL 0x1c24 +#define MGAREG_FIFOSTATUS 0x1e10 + + #define FS_fifocount_MASK 0xffffff80 /* bits 0-6 */ + #define FS_fifocount_SHIFT 0 + #define FS_bfull_MASK 0xfffffeff /* bit 8 */ + #define FS_bfull_disable 0x0 + #define FS_bfull_enable 0x100 + #define FS_bempty_MASK 0xfffffdff /* bit 9 */ + #define FS_bempty_disable 0x0 + #define FS_bempty_enable 0x200 + +#define MGAREG_FOGCOL 0x1cf4 +#define MGAREG_FOGSTART 0x1cc4 +#define MGAREG_FOGXINC 0x1cd4 +#define MGAREG_FOGYINC 0x1ce4 +#define MGAREG_FXBNDRY 0x1c84 + + #define XA_fxleft_MASK 0xffff0000 /* bits 0-15 */ + #define XA_fxleft_SHIFT 0 + #define XA_fxright_MASK 0xffff /* bits 16-31 */ + #define XA_fxright_SHIFT 16 + +#define MGAREG_FXLEFT 0x1ca8 +#define MGAREG_FXRIGHT 0x1cac +#define MGAREG_ICLEAR 0x1e18 + + #define IC_softrapiclr_MASK 0xfffffffe /* bit 0 */ + #define IC_softrapiclr_disable 0x0 + #define IC_softrapiclr_enable 0x1 + #define IC_pickiclr_MASK 0xfffffffb /* bit 2 */ + #define IC_pickiclr_disable 0x0 + #define IC_pickiclr_enable 0x4 + #define IC_vlineiclr_MASK 0xffffffdf /* bit 5 */ + #define IC_vlineiclr_disable 0x0 + #define IC_vlineiclr_enable 0x20 + #define IC_wiclr_MASK 0xffffff7f /* bit 7 */ + #define IC_wiclr_disable 0x0 + #define IC_wiclr_enable 0x80 + #define IC_wciclr_MASK 0xfffffeff /* bit 8 */ + #define IC_wciclr_disable 0x0 + #define IC_wciclr_enable 0x100 + +#define MGAREG_IEN 0x1e1c + + #define IE_softrapien_MASK 0xfffffffe /* bit 0 */ + #define IE_softrapien_disable 0x0 + #define IE_softrapien_enable 0x1 + #define IE_pickien_MASK 0xfffffffb /* bit 2 */ + #define IE_pickien_disable 0x0 + #define IE_pickien_enable 0x4 + #define IE_vlineien_MASK 0xffffffdf /* bit 5 */ + #define IE_vlineien_disable 0x0 + #define IE_vlineien_enable 0x20 + #define IE_extien_MASK 0xffffffbf /* bit 6 */ + #define IE_extien_disable 0x0 + #define IE_extien_enable 0x40 + #define IE_wien_MASK 0xffffff7f /* bit 7 */ + #define IE_wien_disable 0x0 + #define IE_wien_enable 0x80 + #define IE_wcien_MASK 0xfffffeff /* bit 8 */ + #define IE_wcien_disable 0x0 + #define IE_wcien_enable 0x100 + +#define MGAREG_LEN 0x1c5c +#define MGAREG_MACCESS 0x1c04 + + #define MA_pwidth_MASK 0xfffffffc /* bits 0-1 */ + #define MA_pwidth_8 0x0 /* val 0, shift 0 */ + #define MA_pwidth_16 0x1 /* val 1, shift 0 */ + #define MA_pwidth_32 0x2 /* val 2, shift 0 */ + #define MA_pwidth_24 0x3 /* val 3, shift 0 */ + #define MA_zwidth_MASK 0xffffffe7 /* bits 3-4 */ + #define MA_zwidth_16 0x0 /* val 0, shift 3 */ + #define MA_zwidth_32 0x8 /* val 1, shift 3 */ + #define MA_zwidth_15 0x10 /* val 2, shift 3 */ + #define MA_zwidth_24 0x18 /* val 3, shift 3 */ + #define MA_memreset_MASK 0xffff7fff /* bit 15 */ + #define MA_memreset_disable 0x0 + #define MA_memreset_enable 0x8000 + #define MA_fogen_MASK 0xfbffffff /* bit 26 */ + #define MA_fogen_disable 0x0 + #define MA_fogen_enable 0x4000000 + #define MA_tlutload_MASK 0xdfffffff /* bit 29 */ + #define MA_tlutload_disable 0x0 + #define MA_tlutload_enable 0x20000000 + #define MA_nodither_MASK 0xbfffffff /* bit 30 */ + #define MA_nodither_disable 0x0 + #define MA_nodither_enable 0x40000000 + #define MA_dit555_MASK 0x7fffffff /* bit 31 */ + #define MA_dit555_disable 0x0 + #define MA_dit555_enable 0x80000000 + +#define MGAREG_MCTLWTST 0x1c08 + + #define MCWS_casltncy_MASK 0xfffffff8 /* bits 0-2 */ + #define MCWS_casltncy_SHIFT 0 + #define MCWS_rrddelay_MASK 0xffffffcf /* bits 4-5 */ + #define MCWS_rcddelay_MASK 0xfffffe7f /* bits 7-8 */ + #define MCWS_rasmin_MASK 0xffffe3ff /* bits 10-12 */ + #define MCWS_rasmin_SHIFT 10 + #define MCWS_rpdelay_MASK 0xffff3fff /* bits 14-15 */ + #define MCWS_wrdelay_MASK 0xfff3ffff /* bits 18-19 */ + #define MCWS_rddelay_MASK 0xffdfffff /* bit 21 */ + #define MCWS_rddelay_disable 0x0 + #define MCWS_rddelay_enable 0x200000 + #define MCWS_smrdelay_MASK 0xfe7fffff /* bits 23-24 */ + #define MCWS_bwcdelay_MASK 0xf3ffffff /* bits 26-27 */ + #define MCWS_bpldelay_MASK 0x1fffffff /* bits 29-31 */ + #define MCWS_bpldelay_SHIFT 29 + +#define MGAREG_MEMRDBK 0x1e44 + + #define MRB_mclkbrd0_MASK 0xfffffff0 /* bits 0-3 */ + #define MRB_mclkbrd0_SHIFT 0 + #define MRB_mclkbrd1_MASK 0xfffffe1f /* bits 5-8 */ + #define MRB_mclkbrd1_SHIFT 5 + #define MRB_strmfctl_MASK 0xff3fffff /* bits 22-23 */ + #define MRB_mrsopcod_MASK 0xe1ffffff /* bits 25-28 */ + #define MRB_mrsopcod_SHIFT 25 + +#define MGAREG_OPMODE 0x1e54 + + #define OM_dmamod_MASK 0xfffffff3 /* bits 2-3 */ + #define OM_dmamod_general 0x0 /* val 0, shift 2 */ + #define OM_dmamod_blit 0x4 /* val 1, shift 2 */ + #define OM_dmamod_vector 0x8 /* val 2, shift 2 */ + #define OM_dmamod_vertex 0xc /* val 3, shift 2 */ + #define OM_dmadatasiz_MASK 0xfffffcff /* bits 8-9 */ + #define OM_dmadatasiz_8 0x0 /* val 0, shift 8 */ + #define OM_dmadatasiz_16 0x100 /* val 1, shift 8 */ + #define OM_dmadatasiz_32 0x200 /* val 2, shift 8 */ + #define OM_dirdatasiz_MASK 0xfffcffff /* bits 16-17 */ + #define OM_dirdatasiz_8 0x0 /* val 0, shift 16 */ + #define OM_dirdatasiz_16 0x10000 /* val 1, shift 16 */ + #define OM_dirdatasiz_32 0x20000 /* val 2, shift 16 */ + +#define MGAREG_PAT0 0x1c10 +#define MGAREG_PAT1 0x1c14 +#define MGAREG_PITCH 0x1c8c + + #define P_iy_MASK 0xffffe000 /* bits 0-12 */ + #define P_iy_SHIFT 0 + #define P_ylin_MASK 0xffff7fff /* bit 15 */ + #define P_ylin_disable 0x0 + #define P_ylin_enable 0x8000 + +#define MGAREG_PLNWT 0x1c1c +#define MGAREG_PRIMADDRESS 0x1e58 + + #define PDCA_primod_MASK 0xfffffffc /* bits 0-1 */ + #define PDCA_primod_general 0x0 /* val 0, shift 0 */ + #define PDCA_primod_blit 0x1 /* val 1, shift 0 */ + #define PDCA_primod_vector 0x2 /* val 2, shift 0 */ + #define PDCA_primod_vertex 0x3 /* val 3, shift 0 */ + #define PDCA_primaddress_MASK 0x3 /* bits 2-31 */ + #define PDCA_primaddress_SHIFT 2 + +#define MGAREG_PRIMEND 0x1e5c + + #define PDEA_primnostart_MASK 0xfffffffe /* bit 0 */ + #define PDEA_primnostart_disable 0x0 + #define PDEA_primnostart_enable 0x1 + #define PDEA_pagpxfer_MASK 0xfffffffd /* bit 1 */ + #define PDEA_pagpxfer_disable 0x0 + #define PDEA_pagpxfer_enable 0x2 + #define PDEA_primend_MASK 0x3 /* bits 2-31 */ + #define PDEA_primend_SHIFT 2 + +#define MGAREG_PRIMPTR 0x1e50 + + #define PLS_primptren0_MASK 0xfffffffe /* bit 0 */ + #define PLS_primptren0_disable 0x0 + #define PLS_primptren0_enable 0x1 + #define PLS_primptren1_MASK 0xfffffffd /* bit 1 */ + #define PLS_primptren1_disable 0x0 + #define PLS_primptren1_enable 0x2 + #define PLS_primptr_MASK 0x7 /* bits 3-31 */ + #define PLS_primptr_SHIFT 3 + +#define MGAREG_RST 0x1e40 + + #define R_softreset_MASK 0xfffffffe /* bit 0 */ + #define R_softreset_disable 0x0 + #define R_softreset_enable 0x1 + #define R_softextrst_MASK 0xfffffffd /* bit 1 */ + #define R_softextrst_disable 0x0 + #define R_softextrst_enable 0x2 + +#define MGAREG_SECADDRESS 0x2c40 + + #define SDCA_secmod_MASK 0xfffffffc /* bits 0-1 */ + #define SDCA_secmod_general 0x0 /* val 0, shift 0 */ + #define SDCA_secmod_blit 0x1 /* val 1, shift 0 */ + #define SDCA_secmod_vector 0x2 /* val 2, shift 0 */ + #define SDCA_secmod_vertex 0x3 /* val 3, shift 0 */ + #define SDCA_secaddress_MASK 0x3 /* bits 2-31 */ + #define SDCA_secaddress_SHIFT 2 + +#define MGAREG_SECEND 0x2c44 + + #define SDEA_sagpxfer_MASK 0xfffffffd /* bit 1 */ + #define SDEA_sagpxfer_disable 0x0 + #define SDEA_sagpxfer_enable 0x2 + #define SDEA_secend_MASK 0x3 /* bits 2-31 */ + #define SDEA_secend_SHIFT 2 + +#define MGAREG_SETUPADDRESS 0x2cd0 + + #define SETADD_mode_MASK 0xfffffffc /* bits 0-1 */ + #define SETADD_mode_vertlist 0x0 /* val 0, shift 0 */ + #define SETADD_address_MASK 0x3 /* bits 2-31 */ + #define SETADD_address_SHIFT 2 + +#define MGAREG_SETUPEND 0x2cd4 + + #define SETEND_agpxfer_MASK 0xfffffffd /* bit 1 */ + #define SETEND_agpxfer_disable 0x0 + #define SETEND_agpxfer_enable 0x2 + #define SETEND_address_MASK 0x3 /* bits 2-31 */ + #define SETEND_address_SHIFT 2 + +#define MGAREG_SGN 0x1c58 + + #define S_sdydxl_MASK 0xfffffffe /* bit 0 */ + #define S_sdydxl_y 0x0 + #define S_sdydxl_x 0x1 + #define S_scanleft_MASK 0xfffffffe /* bit 0 */ + #define S_scanleft_disable 0x0 + #define S_scanleft_enable 0x1 + #define S_sdxl_MASK 0xfffffffd /* bit 1 */ + #define S_sdxl_pos 0x0 + #define S_sdxl_neg 0x2 + #define S_sdy_MASK 0xfffffffb /* bit 2 */ + #define S_sdy_pos 0x0 + #define S_sdy_neg 0x4 + #define S_sdxr_MASK 0xffffffdf /* bit 5 */ + #define S_sdxr_pos 0x0 + #define S_sdxr_neg 0x20 + #define S_brkleft_MASK 0xfffffeff /* bit 8 */ + #define S_brkleft_disable 0x0 + #define S_brkleft_enable 0x100 + #define S_errorinit_MASK 0x7fffffff /* bit 31 */ + #define S_errorinit_disable 0x0 + #define S_errorinit_enable 0x80000000 + +#define MGAREG_SHIFT 0x1c50 + + #define FSC_x_off_MASK 0xfffffff0 /* bits 0-3 */ + #define FSC_x_off_SHIFT 0 + #define FSC_funcnt_MASK 0xffffff80 /* bits 0-6 */ + #define FSC_funcnt_SHIFT 0 + #define FSC_y_off_MASK 0xffffff8f /* bits 4-6 */ + #define FSC_y_off_SHIFT 4 + #define FSC_funoff_MASK 0xffc0ffff /* bits 16-21 */ + #define FSC_funoff_SHIFT 16 + #define FSC_stylelen_MASK 0xffc0ffff /* bits 16-21 */ + #define FSC_stylelen_SHIFT 16 + +#define MGAREG_SOFTRAP 0x2c48 + + #define STH_softraphand_MASK 0x3 /* bits 2-31 */ + #define STH_softraphand_SHIFT 2 + +#define MGAREG_SPECBSTART 0x2c98 +#define MGAREG_SPECBXINC 0x2c9c +#define MGAREG_SPECBYINC 0x2ca0 +#define MGAREG_SPECGSTART 0x2c8c +#define MGAREG_SPECGXINC 0x2c90 +#define MGAREG_SPECGYINC 0x2c94 +#define MGAREG_SPECRSTART 0x2c80 +#define MGAREG_SPECRXINC 0x2c84 +#define MGAREG_SPECRYINC 0x2c88 +#define MGAREG_SRC0 0x1c30 +#define MGAREG_SRC1 0x1c34 +#define MGAREG_SRC2 0x1c38 +#define MGAREG_SRC3 0x1c3c +#define MGAREG_SRCORG 0x2cb4 + + #define SO_srcmap_MASK 0xfffffffe /* bit 0 */ + #define SO_srcmap_fb 0x0 + #define SO_srcmap_sys 0x1 + #define SO_srcacc_MASK 0xfffffffd /* bit 1 */ + #define SO_srcacc_pci 0x0 + #define SO_srcacc_agp 0x2 + #define SO_srcorg_MASK 0x7 /* bits 3-31 */ + #define SO_srcorg_SHIFT 3 + +#define MGAREG_STATUS 0x1e14 + + #define STAT_softrapen_MASK 0xfffffffe /* bit 0 */ + #define STAT_softrapen_disable 0x0 + #define STAT_softrapen_enable 0x1 + #define STAT_pickpen_MASK 0xfffffffb /* bit 2 */ + #define STAT_pickpen_disable 0x0 + #define STAT_pickpen_enable 0x4 + #define STAT_vsyncsts_MASK 0xfffffff7 /* bit 3 */ + #define STAT_vsyncsts_disable 0x0 + #define STAT_vsyncsts_enable 0x8 + #define STAT_vsyncpen_MASK 0xffffffef /* bit 4 */ + #define STAT_vsyncpen_disable 0x0 + #define STAT_vsyncpen_enable 0x10 + #define STAT_vlinepen_MASK 0xffffffdf /* bit 5 */ + #define STAT_vlinepen_disable 0x0 + #define STAT_vlinepen_enable 0x20 + #define STAT_extpen_MASK 0xffffffbf /* bit 6 */ + #define STAT_extpen_disable 0x0 + #define STAT_extpen_enable 0x40 + #define STAT_wpen_MASK 0xffffff7f /* bit 7 */ + #define STAT_wpen_disable 0x0 + #define STAT_wpen_enable 0x80 + #define STAT_wcpen_MASK 0xfffffeff /* bit 8 */ + #define STAT_wcpen_disable 0x0 + #define STAT_wcpen_enable 0x100 + #define STAT_dwgengsts_MASK 0xfffeffff /* bit 16 */ + #define STAT_dwgengsts_disable 0x0 + #define STAT_dwgengsts_enable 0x10000 + #define STAT_endprdmasts_MASK 0xfffdffff /* bit 17 */ + #define STAT_endprdmasts_disable 0x0 + #define STAT_endprdmasts_enable 0x20000 + #define STAT_wbusy_MASK 0xfffbffff /* bit 18 */ + #define STAT_wbusy_disable 0x0 + #define STAT_wbusy_enable 0x40000 + #define STAT_swflag_MASK 0xfffffff /* bits 28-31 */ + #define STAT_swflag_SHIFT 28 + +#define MGAREG_STENCIL 0x2cc8 + + #define S_sref_MASK 0xffffff00 /* bits 0-7 */ + #define S_sref_SHIFT 0 + #define S_smsk_MASK 0xffff00ff /* bits 8-15 */ + #define S_smsk_SHIFT 8 + #define S_swtmsk_MASK 0xff00ffff /* bits 16-23 */ + #define S_swtmsk_SHIFT 16 + +#define MGAREG_STENCILCTL 0x2ccc + + #define SC_smode_MASK 0xfffffff8 /* bits 0-2 */ + #define SC_smode_salways 0x0 /* val 0, shift 0 */ + #define SC_smode_snever 0x1 /* val 1, shift 0 */ + #define SC_smode_se 0x2 /* val 2, shift 0 */ + #define SC_smode_sne 0x3 /* val 3, shift 0 */ + #define SC_smode_slt 0x4 /* val 4, shift 0 */ + #define SC_smode_slte 0x5 /* val 5, shift 0 */ + #define SC_smode_sgt 0x6 /* val 6, shift 0 */ + #define SC_smode_sgte 0x7 /* val 7, shift 0 */ + #define SC_sfailop_MASK 0xffffffc7 /* bits 3-5 */ + #define SC_sfailop_keep 0x0 /* val 0, shift 3 */ + #define SC_sfailop_zero 0x8 /* val 1, shift 3 */ + #define SC_sfailop_replace 0x10 /* val 2, shift 3 */ + #define SC_sfailop_incrsat 0x18 /* val 3, shift 3 */ + #define SC_sfailop_decrsat 0x20 /* val 4, shift 3 */ + #define SC_sfailop_invert 0x28 /* val 5, shift 3 */ + #define SC_sfailop_incr 0x30 /* val 6, shift 3 */ + #define SC_sfailop_decr 0x38 /* val 7, shift 3 */ + #define SC_szfailop_MASK 0xfffffe3f /* bits 6-8 */ + #define SC_szfailop_keep 0x0 /* val 0, shift 6 */ + #define SC_szfailop_zero 0x40 /* val 1, shift 6 */ + #define SC_szfailop_replace 0x80 /* val 2, shift 6 */ + #define SC_szfailop_incrsat 0xc0 /* val 3, shift 6 */ + #define SC_szfailop_decrsat 0x100 /* val 4, shift 6 */ + #define SC_szfailop_invert 0x140 /* val 5, shift 6 */ + #define SC_szfailop_incr 0x180 /* val 6, shift 6 */ + #define SC_szfailop_decr 0x1c0 /* val 7, shift 6 */ + #define SC_szpassop_MASK 0xfffff1ff /* bits 9-11 */ + #define SC_szpassop_keep 0x0 /* val 0, shift 9 */ + #define SC_szpassop_zero 0x200 /* val 1, shift 9 */ + #define SC_szpassop_replace 0x400 /* val 2, shift 9 */ + #define SC_szpassop_incrsat 0x600 /* val 3, shift 9 */ + #define SC_szpassop_decrsat 0x800 /* val 4, shift 9 */ + #define SC_szpassop_invert 0xa00 /* val 5, shift 9 */ + #define SC_szpassop_incr 0xc00 /* val 6, shift 9 */ + #define SC_szpassop_decr 0xe00 /* val 7, shift 9 */ + +#define MGAREG_TDUALSTAGE0 0x2cf8 + + #define TD0_color_arg2_MASK 0xfffffffc /* bits 0-1 */ + #define TD0_color_arg2_diffuse 0x0 /* val 0, shift 0 */ + #define TD0_color_arg2_specular 0x1 /* val 1, shift 0 */ + #define TD0_color_arg2_fcol 0x2 /* val 2, shift 0 */ + #define TD0_color_arg2_prevstage 0x3 /* val 3, shift 0 */ + #define TD0_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ + #define TD0_color_alpha_diffuse 0x0 /* val 0, shift 2 */ + #define TD0_color_alpha_fcol 0x4 /* val 1, shift 2 */ + #define TD0_color_alpha_currtex 0x8 /* val 2, shift 2 */ + #define TD0_color_alpha_prevtex 0xc /* val 3, shift 2 */ + #define TD0_color_alpha_prevstage 0x10 /* val 4, shift 2 */ + #define TD0_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ + #define TD0_color_arg1_replicatealpha_disable 0x0 + #define TD0_color_arg1_replicatealpha_enable 0x20 + #define TD0_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ + #define TD0_color_arg1_inv_disable 0x0 + #define TD0_color_arg1_inv_enable 0x40 + #define TD0_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ + #define TD0_color_arg2_replicatealpha_disable 0x0 + #define TD0_color_arg2_replicatealpha_enable 0x80 + #define TD0_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ + #define TD0_color_arg2_inv_disable 0x0 + #define TD0_color_arg2_inv_enable 0x100 + #define TD0_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ + #define TD0_color_alpha1inv_disable 0x0 + #define TD0_color_alpha1inv_enable 0x200 + #define TD0_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ + #define TD0_color_alpha2inv_disable 0x0 + #define TD0_color_alpha2inv_enable 0x400 + #define TD0_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ + #define TD0_color_arg1mul_arg1 0x0 /* val 0, shift 11 */ + #define TD0_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ + #define TD0_color_arg2mul_MASK 0xffffefff /* bit 12 */ + #define TD0_color_arg2mul_arg2 0x0 /* val 0, shift 12 */ + #define TD0_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ + #define TD0_color_arg1add_MASK 0xffffdfff /* bit 13 */ + #define TD0_color_arg1add_arg1 0x0 /* val 0, shift 13 */ + #define TD0_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ + #define TD0_color_arg2add_MASK 0xffffbfff /* bit 14 */ + #define TD0_color_arg2add_arg2 0x0 /* val 0, shift 14 */ + #define TD0_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ + #define TD0_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ + #define TD0_color_modbright_disable 0x0 /* val 0, shift 15 */ + #define TD0_color_modbright_2x 0x8000 /* val 1, shift 15 */ + #define TD0_color_modbright_4x 0x10000 /* val 2, shift 15 */ + #define TD0_color_add_MASK 0xfffdffff /* bit 17 */ + #define TD0_color_add_sub 0x0 /* val 0, shift 17 */ + #define TD0_color_add_add 0x20000 /* val 1, shift 17 */ + #define TD0_color_add2x_MASK 0xfffbffff /* bit 18 */ + #define TD0_color_add2x_disable 0x0 + #define TD0_color_add2x_enable 0x40000 + #define TD0_color_addbias_MASK 0xfff7ffff /* bit 19 */ + #define TD0_color_addbias_disable 0x0 + #define TD0_color_addbias_enable 0x80000 + #define TD0_color_blend_MASK 0xffefffff /* bit 20 */ + #define TD0_color_blend_disable 0x0 + #define TD0_color_blend_enable 0x100000 + #define TD0_color_sel_MASK 0xff9fffff /* bits 21-22 */ + #define TD0_color_sel_arg1 0x0 /* val 0, shift 21 */ + #define TD0_color_sel_arg2 0x200000 /* val 1, shift 21 */ + #define TD0_color_sel_addout 0x400000 /* val 2, shift 21 */ + #define TD0_color_sel_mulout 0x600000 /* val 3, shift 21 */ + #define TD0_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ + #define TD0_alpha_arg1_inv_disable 0x0 + #define TD0_alpha_arg1_inv_enable 0x800000 + #define TD0_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ + #define TD0_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ + #define TD0_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ + #define TD0_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ + #define TD0_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ + #define TD0_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ + #define TD0_alpha_arg2_inv_disable 0x0 + #define TD0_alpha_arg2_inv_enable 0x4000000 + #define TD0_alpha_add_MASK 0xf7ffffff /* bit 27 */ + #define TD0_alpha_add_disable 0x0 + #define TD0_alpha_add_enable 0x8000000 + #define TD0_alpha_addbias_MASK 0xefffffff /* bit 28 */ + #define TD0_alpha_addbias_disable 0x0 + #define TD0_alpha_addbias_enable 0x10000000 + #define TD0_alpha_add2x_MASK 0xdfffffff /* bit 29 */ + #define TD0_alpha_add2x_disable 0x0 + #define TD0_alpha_add2x_enable 0x20000000 + #define TD0_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ + #define TD0_alpha_modbright_disable 0x0 /* val 0, shift 28 */ + #define TD0_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ + #define TD0_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ + #define TD0_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ + #define TD0_alpha_sel_arg1 0x0 /* val 0, shift 30 */ + #define TD0_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ + #define TD0_alpha_sel_addout 0x80000000 /* val 2, shift 30 */ + #define TD0_alpha_sel_mulout 0xc0000000 /* val 3, shift 30 */ + +#define MGAREG_TDUALSTAGE1 0x2cfc + + #define TD1_color_arg2_MASK 0xfffffffc /* bits 0-1 */ + #define TD1_color_arg2_diffuse 0x0 /* val 0, shift 0 */ + #define TD1_color_arg2_specular 0x1 /* val 1, shift 0 */ + #define TD1_color_arg2_fcol 0x2 /* val 2, shift 0 */ + #define TD1_color_arg2_prevstage 0x3 /* val 3, shift 0 */ + #define TD1_color_alpha_MASK 0xffffffe3 /* bits 2-4 */ + #define TD1_color_alpha_diffuse 0x0 /* val 0, shift 2 */ + #define TD1_color_alpha_fcol 0x4 /* val 1, shift 2 */ + #define TD1_color_alpha_currtex 0x8 /* val 2, shift 2 */ + #define TD1_color_alpha_prevtex 0xc /* val 3, shift 2 */ + #define TD1_color_alpha_prevstage 0x10 /* val 4, shift 2 */ + #define TD1_color_arg1_replicatealpha_MASK 0xffffffdf /* bit 5 */ + #define TD1_color_arg1_replicatealpha_disable 0x0 + #define TD1_color_arg1_replicatealpha_enable 0x20 + #define TD1_color_arg1_inv_MASK 0xffffffbf /* bit 6 */ + #define TD1_color_arg1_inv_disable 0x0 + #define TD1_color_arg1_inv_enable 0x40 + #define TD1_color_arg2_replicatealpha_MASK 0xffffff7f /* bit 7 */ + #define TD1_color_arg2_replicatealpha_disable 0x0 + #define TD1_color_arg2_replicatealpha_enable 0x80 + #define TD1_color_arg2_inv_MASK 0xfffffeff /* bit 8 */ + #define TD1_color_arg2_inv_disable 0x0 + #define TD1_color_arg2_inv_enable 0x100 + #define TD1_color_alpha1inv_MASK 0xfffffdff /* bit 9 */ + #define TD1_color_alpha1inv_disable 0x0 + #define TD1_color_alpha1inv_enable 0x200 + #define TD1_color_alpha2inv_MASK 0xfffffbff /* bit 10 */ + #define TD1_color_alpha2inv_disable 0x0 + #define TD1_color_alpha2inv_enable 0x400 + #define TD1_color_arg1mul_MASK 0xfffff7ff /* bit 11 */ + #define TD1_color_arg1mul_arg1 0x0 /* val 0, shift 11 */ + #define TD1_color_arg1mul_alpha1 0x800 /* val 1, shift 11 */ + #define TD1_color_arg2mul_MASK 0xffffefff /* bit 12 */ + #define TD1_color_arg2mul_arg2 0x0 /* val 0, shift 12 */ + #define TD1_color_arg2mul_alpha2 0x1000 /* val 1, shift 12 */ + #define TD1_color_arg1add_MASK 0xffffdfff /* bit 13 */ + #define TD1_color_arg1add_arg1 0x0 /* val 0, shift 13 */ + #define TD1_color_arg1add_mulout 0x2000 /* val 1, shift 13 */ + #define TD1_color_arg2add_MASK 0xffffbfff /* bit 14 */ + #define TD1_color_arg2add_arg2 0x0 /* val 0, shift 14 */ + #define TD1_color_arg2add_mulout 0x4000 /* val 1, shift 14 */ + #define TD1_color_modbright_MASK 0xfffe7fff /* bits 15-16 */ + #define TD1_color_modbright_disable 0x0 /* val 0, shift 15 */ + #define TD1_color_modbright_2x 0x8000 /* val 1, shift 15 */ + #define TD1_color_modbright_4x 0x10000 /* val 2, shift 15 */ + #define TD1_color_add_MASK 0xfffdffff /* bit 17 */ + #define TD1_color_add_sub 0x0 /* val 0, shift 17 */ + #define TD1_color_add_add 0x20000 /* val 1, shift 17 */ + #define TD1_color_add2x_MASK 0xfffbffff /* bit 18 */ + #define TD1_color_add2x_disable 0x0 + #define TD1_color_add2x_enable 0x40000 + #define TD1_color_addbias_MASK 0xfff7ffff /* bit 19 */ + #define TD1_color_addbias_disable 0x0 + #define TD1_color_addbias_enable 0x80000 + #define TD1_color_blend_MASK 0xffefffff /* bit 20 */ + #define TD1_color_blend_disable 0x0 + #define TD1_color_blend_enable 0x100000 + #define TD1_color_sel_MASK 0xff9fffff /* bits 21-22 */ + #define TD1_color_sel_arg1 0x0 /* val 0, shift 21 */ + #define TD1_color_sel_arg2 0x200000 /* val 1, shift 21 */ + #define TD1_color_sel_addout 0x400000 /* val 2, shift 21 */ + #define TD1_color_sel_mulout 0x600000 /* val 3, shift 21 */ + #define TD1_alpha_arg1_inv_MASK 0xff7fffff /* bit 23 */ + #define TD1_alpha_arg1_inv_disable 0x0 + #define TD1_alpha_arg1_inv_enable 0x800000 + #define TD1_alpha_arg2_MASK 0xfcffffff /* bits 24-25 */ + #define TD1_alpha_arg2_diffuse 0x0 /* val 0, shift 24 */ + #define TD1_alpha_arg2_fcol 0x1000000 /* val 1, shift 24 */ + #define TD1_alpha_arg2_prevtex 0x2000000 /* val 2, shift 24 */ + #define TD1_alpha_arg2_prevstage 0x3000000 /* val 3, shift 24 */ + #define TD1_alpha_arg2_inv_MASK 0xfbffffff /* bit 26 */ + #define TD1_alpha_arg2_inv_disable 0x0 + #define TD1_alpha_arg2_inv_enable 0x4000000 + #define TD1_alpha_add_MASK 0xf7ffffff /* bit 27 */ + #define TD1_alpha_add_disable 0x0 + #define TD1_alpha_add_enable 0x8000000 + #define TD1_alpha_addbias_MASK 0xefffffff /* bit 28 */ + #define TD1_alpha_addbias_disable 0x0 + #define TD1_alpha_addbias_enable 0x10000000 + #define TD1_alpha_add2x_MASK 0xdfffffff /* bit 29 */ + #define TD1_alpha_add2x_disable 0x0 + #define TD1_alpha_add2x_enable 0x20000000 + #define TD1_alpha_modbright_MASK 0xcfffffff /* bits 28-29 */ + #define TD1_alpha_modbright_disable 0x0 /* val 0, shift 28 */ + #define TD1_alpha_modbright_2x 0x10000000 /* val 1, shift 28 */ + #define TD1_alpha_modbright_4x 0x20000000 /* val 2, shift 28 */ + #define TD1_alpha_sel_MASK 0x3fffffff /* bits 30-31 */ + #define TD1_alpha_sel_arg1 0x0 /* val 0, shift 30 */ + #define TD1_alpha_sel_arg2 0x40000000 /* val 1, shift 30 */ + #define TD1_alpha_sel_addout 0x80000000 /* val 2, shift 30 */ + #define TD1_alpha_sel_mulout 0xc0000000 /* val 3, shift 30 */ + +#define MGAREG_TEST0 0x1e48 + + #define TST_ramtsten_MASK 0xfffffffe /* bit 0 */ + #define TST_ramtsten_disable 0x0 + #define TST_ramtsten_enable 0x1 + #define TST_ramtstdone_MASK 0xfffffffd /* bit 1 */ + #define TST_ramtstdone_disable 0x0 + #define TST_ramtstdone_enable 0x2 + #define TST_wramtstpass_MASK 0xfffffffb /* bit 2 */ + #define TST_wramtstpass_disable 0x0 + #define TST_wramtstpass_enable 0x4 + #define TST_tcachetstpass_MASK 0xfffffff7 /* bit 3 */ + #define TST_tcachetstpass_disable 0x0 + #define TST_tcachetstpass_enable 0x8 + #define TST_tluttstpass_MASK 0xffffffef /* bit 4 */ + #define TST_tluttstpass_disable 0x0 + #define TST_tluttstpass_enable 0x10 + #define TST_luttstpass_MASK 0xffffffdf /* bit 5 */ + #define TST_luttstpass_disable 0x0 + #define TST_luttstpass_enable 0x20 + #define TST_besramtstpass_MASK 0xffffffbf /* bit 6 */ + #define TST_besramtstpass_disable 0x0 + #define TST_besramtstpass_enable 0x40 + #define TST_ringen_MASK 0xfffffeff /* bit 8 */ + #define TST_ringen_disable 0x0 + #define TST_ringen_enable 0x100 + #define TST_apllbyp_MASK 0xfffffdff /* bit 9 */ + #define TST_apllbyp_disable 0x0 + #define TST_apllbyp_enable 0x200 + #define TST_hiten_MASK 0xfffffbff /* bit 10 */ + #define TST_hiten_disable 0x0 + #define TST_hiten_enable 0x400 + #define TST_tmode_MASK 0xffffc7ff /* bits 11-13 */ + #define TST_tmode_SHIFT 11 + #define TST_tclksel_MASK 0xfffe3fff /* bits 14-16 */ + #define TST_tclksel_SHIFT 14 + #define TST_ringcnten_MASK 0xfffdffff /* bit 17 */ + #define TST_ringcnten_disable 0x0 + #define TST_ringcnten_enable 0x20000 + #define TST_ringcnt_MASK 0xc003ffff /* bits 18-29 */ + #define TST_ringcnt_SHIFT 18 + #define TST_ringcntclksl_MASK 0xbfffffff /* bit 30 */ + #define TST_ringcntclksl_disable 0x0 + #define TST_ringcntclksl_enable 0x40000000 + #define TST_biosboot_MASK 0x7fffffff /* bit 31 */ + #define TST_biosboot_disable 0x0 + #define TST_biosboot_enable 0x80000000 + +#define MGAREG_TEXBORDERCOL 0x2c5c +#define MGAREG_TEXCTL 0x2c30 + + #define TMC_tformat_MASK 0xfffffff0 /* bits 0-3 */ + #define TMC_tformat_tw4 0x0 /* val 0, shift 0 */ + #define TMC_tformat_tw8 0x1 /* val 1, shift 0 */ + #define TMC_tformat_tw15 0x2 /* val 2, shift 0 */ + #define TMC_tformat_tw16 0x3 /* val 3, shift 0 */ + #define TMC_tformat_tw12 0x4 /* val 4, shift 0 */ + #define TMC_tformat_tw32 0x6 /* val 6, shift 0 */ + #define TMC_tformat_tw8a 0x7 /* val 7, shift 0 */ + #define TMC_tformat_tw8al 0x8 /* val 8, shift 0 */ + #define TMC_tformat_tw422 0xa /* val 10, shift 0 */ + #define TMC_tpitchlin_MASK 0xfffffeff /* bit 8 */ + #define TMC_tpitchlin_disable 0x0 + #define TMC_tpitchlin_enable 0x100 + #define TMC_tpitchext_MASK 0xfff001ff /* bits 9-19 */ + #define TMC_tpitchext_SHIFT 9 + #define TMC_tpitch_MASK 0xfff8ffff /* bits 16-18 */ + #define TMC_tpitch_SHIFT 16 + #define TMC_owalpha_MASK 0xffbfffff /* bit 22 */ + #define TMC_owalpha_disable 0x0 + #define TMC_owalpha_enable 0x400000 + #define TMC_azeroextend_MASK 0xff7fffff /* bit 23 */ + #define TMC_azeroextend_disable 0x0 + #define TMC_azeroextend_enable 0x800000 + #define TMC_decalckey_MASK 0xfeffffff /* bit 24 */ + #define TMC_decalckey_disable 0x0 + #define TMC_decalckey_enable 0x1000000 + #define TMC_takey_MASK 0xfdffffff /* bit 25 */ + #define TMC_takey_0 0x0 + #define TMC_takey_1 0x2000000 + #define TMC_tamask_MASK 0xfbffffff /* bit 26 */ + #define TMC_tamask_0 0x0 + #define TMC_tamask_1 0x4000000 + #define TMC_clampv_MASK 0xf7ffffff /* bit 27 */ + #define TMC_clampv_disable 0x0 + #define TMC_clampv_enable 0x8000000 + #define TMC_clampu_MASK 0xefffffff /* bit 28 */ + #define TMC_clampu_disable 0x0 + #define TMC_clampu_enable 0x10000000 + #define TMC_tmodulate_MASK 0xdfffffff /* bit 29 */ + #define TMC_tmodulate_disable 0x0 + #define TMC_tmodulate_enable 0x20000000 + #define TMC_strans_MASK 0xbfffffff /* bit 30 */ + #define TMC_strans_disable 0x0 + #define TMC_strans_enable 0x40000000 + #define TMC_itrans_MASK 0x7fffffff /* bit 31 */ + #define TMC_itrans_disable 0x0 + #define TMC_itrans_enable 0x80000000 + +#define MGAREG_TEXCTL2 0x2c3c + + #define TMC_decalblend_MASK 0xfffffffe /* bit 0 */ + #define TMC_decalblend_disable 0x0 + #define TMC_decalblend_enable 0x1 + #define TMC_idecal_MASK 0xfffffffd /* bit 1 */ + #define TMC_idecal_disable 0x0 + #define TMC_idecal_enable 0x2 + #define TMC_decaldis_MASK 0xfffffffb /* bit 2 */ + #define TMC_decaldis_disable 0x0 + #define TMC_decaldis_enable 0x4 + #define TMC_ckstransdis_MASK 0xffffffef /* bit 4 */ + #define TMC_ckstransdis_disable 0x0 + #define TMC_ckstransdis_enable 0x10 + #define TMC_borderen_MASK 0xffffffdf /* bit 5 */ + #define TMC_borderen_disable 0x0 + #define TMC_borderen_enable 0x20 + #define TMC_specen_MASK 0xffffffbf /* bit 6 */ + #define TMC_specen_disable 0x0 + #define TMC_specen_enable 0x40 + #define TMC_dualtex_MASK 0xffffff7f /* bit 7 */ + #define TMC_dualtex_disable 0x0 + #define TMC_dualtex_enable 0x80 + #define TMC_tablefog_MASK 0xfffffeff /* bit 8 */ + #define TMC_tablefog_disable 0x0 + #define TMC_tablefog_enable 0x100 + #define TMC_bumpmap_MASK 0xfffffdff /* bit 9 */ + #define TMC_bumpmap_disable 0x0 + #define TMC_bumpmap_enable 0x200 + #define TMC_map1_MASK 0x7fffffff /* bit 31 */ + #define TMC_map1_disable 0x0 + #define TMC_map1_enable 0x80000000 + +#define MGAREG_TEXFILTER 0x2c58 + + #define TF_minfilter_MASK 0xfffffff0 /* bits 0-3 */ + #define TF_minfilter_nrst 0x0 /* val 0, shift 0 */ + #define TF_minfilter_bilin 0x2 /* val 2, shift 0 */ + #define TF_minfilter_cnst 0x3 /* val 3, shift 0 */ + #define TF_minfilter_mm1s 0x8 /* val 8, shift 0 */ + #define TF_minfilter_mm2s 0x9 /* val 9, shift 0 */ + #define TF_minfilter_mm4s 0xa /* val 10, shift 0 */ + #define TF_minfilter_mm8s 0xc /* val 12, shift 0 */ + #define TF_magfilter_MASK 0xffffff0f /* bits 4-7 */ + #define TF_magfilter_nrst 0x0 /* val 0, shift 4 */ + #define TF_magfilter_bilin 0x20 /* val 2, shift 4 */ + #define TF_magfilter_cnst 0x30 /* val 3, shift 4 */ + #define TF_avgstride_MASK 0xfff7ffff /* bit 19 */ + #define TF_avgstride_disable 0x0 + #define TF_avgstride_enable 0x80000 + #define TF_filteralpha_MASK 0xffefffff /* bit 20 */ + #define TF_filteralpha_disable 0x0 + #define TF_filteralpha_enable 0x100000 + #define TF_fthres_MASK 0xe01fffff /* bits 21-28 */ + #define TF_fthres_SHIFT 21 + #define TF_mapnb_MASK 0x1fffffff /* bits 29-31 */ + #define TF_mapnb_SHIFT 29 + +#define MGAREG_TEXHEIGHT 0x2c2c + + #define TH_th_MASK 0xffffffc0 /* bits 0-5 */ + #define TH_th_SHIFT 0 + #define TH_rfh_MASK 0xffff81ff /* bits 9-14 */ + #define TH_rfh_SHIFT 9 + #define TH_thmask_MASK 0xe003ffff /* bits 18-28 */ + #define TH_thmask_SHIFT 18 + +#define MGAREG_TEXORG 0x2c24 + + #define TO_texorgmap_MASK 0xfffffffe /* bit 0 */ + #define TO_texorgmap_fb 0x0 + #define TO_texorgmap_sys 0x1 + #define TO_texorgacc_MASK 0xfffffffd /* bit 1 */ + #define TO_texorgacc_pci 0x0 + #define TO_texorgacc_agp 0x2 + #define TO_texorgoffsetsel 0x4 + #define TO_texorg_MASK 0x1f /* bits 5-31 */ + #define TO_texorg_SHIFT 5 + +#define MGAREG_TEXORG1 0x2ca4 +#define MGAREG_TEXORG2 0x2ca8 +#define MGAREG_TEXORG3 0x2cac +#define MGAREG_TEXORG4 0x2cb0 +#define MGAREG_TEXTRANS 0x2c34 + + #define TT_tckey_MASK 0xffff0000 /* bits 0-15 */ + #define TT_tckey_SHIFT 0 + #define TT_tkmask_MASK 0xffff /* bits 16-31 */ + #define TT_tkmask_SHIFT 16 + +#define MGAREG_TEXTRANSHIGH 0x2c38 + + #define TT_tckeyh_MASK 0xffff0000 /* bits 0-15 */ + #define TT_tckeyh_SHIFT 0 + #define TT_tkmaskh_MASK 0xffff /* bits 16-31 */ + #define TT_tkmaskh_SHIFT 16 + +#define MGAREG_TEXWIDTH 0x2c28 + + #define TW_tw_MASK 0xffffffc0 /* bits 0-5 */ + #define TW_tw_SHIFT 0 + #define TW_rfw_MASK 0xffff81ff /* bits 9-14 */ + #define TW_rfw_SHIFT 9 + #define TW_twmask_MASK 0xe003ffff /* bits 18-28 */ + #define TW_twmask_SHIFT 18 + +#define MGAREG_TMR0 0x2c00 +#define MGAREG_TMR1 0x2c04 +#define MGAREG_TMR2 0x2c08 +#define MGAREG_TMR3 0x2c0c +#define MGAREG_TMR4 0x2c10 +#define MGAREG_TMR5 0x2c14 +#define MGAREG_TMR6 0x2c18 +#define MGAREG_TMR7 0x2c1c +#define MGAREG_TMR8 0x2c20 +#define MGAREG_VBIADDR0 0x3e08 +#define MGAREG_VBIADDR1 0x3e0c +#define MGAREG_VCOUNT 0x1e20 +#define MGAREG_WACCEPTSEQ 0x1dd4 + + #define WAS_seqdst0_MASK 0xffffffc0 /* bits 0-5 */ + #define WAS_seqdst0_SHIFT 0 + #define WAS_seqdst1_MASK 0xfffff03f /* bits 6-11 */ + #define WAS_seqdst1_SHIFT 6 + #define WAS_seqdst2_MASK 0xfffc0fff /* bits 12-17 */ + #define WAS_seqdst2_SHIFT 12 + #define WAS_seqdst3_MASK 0xff03ffff /* bits 18-23 */ + #define WAS_seqdst3_SHIFT 18 + #define WAS_seqlen_MASK 0xfcffffff /* bits 24-25 */ + #define WAS_wfirsttag_MASK 0xfbffffff /* bit 26 */ + #define WAS_wfirsttag_disable 0x0 + #define WAS_wfirsttag_enable 0x4000000 + #define WAS_wsametag_MASK 0xf7ffffff /* bit 27 */ + #define WAS_wsametag_disable 0x0 + #define WAS_wsametag_enable 0x8000000 + #define WAS_seqoff_MASK 0xefffffff /* bit 28 */ + #define WAS_seqoff_disable 0x0 + #define WAS_seqoff_enable 0x10000000 + +#define MGAREG_WCODEADDR 0x1e6c + + #define WMA_wcodeaddr_MASK 0xff /* bits 8-31 */ + #define WMA_wcodeaddr_SHIFT 8 + +#define MGAREG_WFLAG 0x1dc4 + + #define WF_walustsflag_MASK 0xffffff00 /* bits 0-7 */ + #define WF_walustsflag_SHIFT 0 + #define WF_walucfgflag_MASK 0xffff00ff /* bits 8-15 */ + #define WF_walucfgflag_SHIFT 8 + #define WF_wprgflag_MASK 0xffff /* bits 16-31 */ + #define WF_wprgflag_SHIFT 16 + +#define MGAREG_WFLAG1 0x1de0 + + #define WF1_walustsflag1_MASK 0xffffff00 /* bits 0-7 */ + #define WF1_walustsflag1_SHIFT 0 + #define WF1_walucfgflag1_MASK 0xffff00ff /* bits 8-15 */ + #define WF1_walucfgflag1_SHIFT 8 + #define WF1_wprgflag1_MASK 0xffff /* bits 16-31 */ + #define WF1_wprgflag1_SHIFT 16 + +#define MGAREG_WFLAGNB 0x1e64 +#define MGAREG_WFLAGNB1 0x1e08 +#define MGAREG_WGETMSB 0x1dc8 + + #define WGV_wgetmsbmin_MASK 0xffffffe0 /* bits 0-4 */ + #define WGV_wgetmsbmin_SHIFT 0 + #define WGV_wgetmsbmax_MASK 0xffffe0ff /* bits 8-12 */ + #define WGV_wgetmsbmax_SHIFT 8 + #define WGV_wbrklefttop_MASK 0xfffeffff /* bit 16 */ + #define WGV_wbrklefttop_disable 0x0 + #define WGV_wbrklefttop_enable 0x10000 + #define WGV_wfastcrop_MASK 0xfffdffff /* bit 17 */ + #define WGV_wfastcrop_disable 0x0 + #define WGV_wfastcrop_enable 0x20000 + #define WGV_wcentersnap_MASK 0xfffbffff /* bit 18 */ + #define WGV_wcentersnap_disable 0x0 + #define WGV_wcentersnap_enable 0x40000 + #define WGV_wbrkrighttop_MASK 0xfff7ffff /* bit 19 */ + #define WGV_wbrkrighttop_disable 0x0 + #define WGV_wbrkrighttop_enable 0x80000 + +#define MGAREG_WIADDR 0x1dc0 + + #define WIA_wmode_MASK 0xfffffffc /* bits 0-1 */ + #define WIA_wmode_suspend 0x0 /* val 0, shift 0 */ + #define WIA_wmode_resume 0x1 /* val 1, shift 0 */ + #define WIA_wmode_jump 0x2 /* val 2, shift 0 */ + #define WIA_wmode_start 0x3 /* val 3, shift 0 */ + #define WIA_wagp_MASK 0xfffffffb /* bit 2 */ + #define WIA_wagp_pci 0x0 + #define WIA_wagp_agp 0x4 + #define WIA_wiaddr_MASK 0x7 /* bits 3-31 */ + #define WIA_wiaddr_SHIFT 3 + +#define MGAREG_WIADDR2 0x1dd8 + + #define WIA2_wmode_MASK 0xfffffffc /* bits 0-1 */ + #define WIA2_wmode_suspend 0x0 /* val 0, shift 0 */ + #define WIA2_wmode_resume 0x1 /* val 1, shift 0 */ + #define WIA2_wmode_jump 0x2 /* val 2, shift 0 */ + #define WIA2_wmode_start 0x3 /* val 3, shift 0 */ + #define WIA2_wagp_MASK 0xfffffffb /* bit 2 */ + #define WIA2_wagp_pci 0x0 + #define WIA2_wagp_agp 0x4 + #define WIA2_wiaddr_MASK 0x7 /* bits 3-31 */ + #define WIA2_wiaddr_SHIFT 3 + +#define MGAREG_WIADDRNB 0x1e60 +#define MGAREG_WIADDRNB1 0x1e04 +#define MGAREG_WIADDRNB2 0x1e00 +#define MGAREG_WIMEMADDR 0x1e68 + + #define WIMA_wimemaddr_MASK 0xffffff00 /* bits 0-7 */ + #define WIMA_wimemaddr_SHIFT 0 + +#define MGAREG_WIMEMDATA 0x2000 +#define MGAREG_WIMEMDATA1 0x2100 +#define MGAREG_WMISC 0x1e70 + + #define WM_wucodecache_MASK 0xfffffffe /* bit 0 */ + #define WM_wucodecache_disable 0x0 + #define WM_wucodecache_enable 0x1 + #define WM_wmaster_MASK 0xfffffffd /* bit 1 */ + #define WM_wmaster_disable 0x0 + #define WM_wmaster_enable 0x2 + #define WM_wcacheflush_MASK 0xfffffff7 /* bit 3 */ + #define WM_wcacheflush_disable 0x0 + #define WM_wcacheflush_enable 0x8 + +#define MGAREG_WR 0x2d00 +#define MGAREG_WVRTXSZ 0x1dcc + + #define WVS_wvrtxsz_MASK 0xffffffc0 /* bits 0-5 */ + #define WVS_wvrtxsz_SHIFT 0 + #define WVS_primsz_MASK 0xffffc0ff /* bits 8-13 */ + #define WVS_primsz_SHIFT 8 + +#define MGAREG_XDST 0x1cb0 +#define MGAREG_XYEND 0x1c44 + + #define XYEA_x_end_MASK 0xffff0000 /* bits 0-15 */ + #define XYEA_x_end_SHIFT 0 + #define XYEA_y_end_MASK 0xffff /* bits 16-31 */ + #define XYEA_y_end_SHIFT 16 + +#define MGAREG_XYSTRT 0x1c40 + + #define XYSA_x_start_MASK 0xffff0000 /* bits 0-15 */ + #define XYSA_x_start_SHIFT 0 + #define XYSA_y_start_MASK 0xffff /* bits 16-31 */ + #define XYSA_y_start_SHIFT 16 + +#define MGAREG_YBOT 0x1c9c +#define MGAREG_YDST 0x1c90 + + #define YA_ydst_MASK 0xff800000 /* bits 0-22 */ + #define YA_ydst_SHIFT 0 + #define YA_sellin_MASK 0x1fffffff /* bits 29-31 */ + #define YA_sellin_SHIFT 29 + +#define MGAREG_YDSTLEN 0x1c88 + + #define YDL_length_MASK 0xffff0000 /* bits 0-15 */ + #define YDL_length_SHIFT 0 + #define YDL_yval_MASK 0xffff /* bits 16-31 */ + #define YDL_yval_SHIFT 16 + +#define MGAREG_YDSTORG 0x1c94 +#define MGAREG_YTOP 0x1c98 +#define MGAREG_ZORG 0x1c0c + + #define ZO_zorgmap_MASK 0xfffffffe /* bit 0 */ + #define ZO_zorgmap_fb 0x0 + #define ZO_zorgmap_sys 0x1 + #define ZO_zorgacc_MASK 0xfffffffd /* bit 1 */ + #define ZO_zorgacc_pci 0x0 + #define ZO_zorgacc_agp 0x2 + #define ZO_zorg_MASK 0x3 /* bits 2-31 */ + #define ZO_zorg_SHIFT 2 /**************** (END) AUTOMATICLY GENERATED REGISTER FILE ******************/ -#endif /* _MGAREGS_H_ */ - +#endif /* _MGAREGS_H_ */ Index: xc/lib/GL/mesa/src/drv/mga/mgastate.c diff -u xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.10.2.1 xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.11 --- xc/lib/GL/mesa/src/drv/mga/mgastate.c:1.10.2.1 Thu May 31 04:31:23 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgastate.c Thu May 31 04:29:42 2001 @@ -24,7 +24,7 @@ * Authors: * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.10.2.1 2001/05/31 08:31:23 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgastate.c,v 1.11 2001/05/31 08:29:42 alanh Exp $ */ #include Index: xc/lib/GL/mesa/src/drv/mga/mgatex.c diff -u xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.10.2.1 xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.12 --- xc/lib/GL/mesa/src/drv/mga/mgatex.c:1.10.2.1 Thu May 31 04:31:23 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgatex.c Fri Aug 17 22:51:05 2001 @@ -24,7 +24,7 @@ * Authors: * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.10.2.1 2001/05/31 08:31:23 alanh Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgatex.c,v 1.12 2001/08/18 02:51:05 dawes Exp $ */ #include #include @@ -179,10 +179,6 @@ } while (0) switch ( texImage->IntFormat ) { - /* GH: Bias towards GL_RGB, GL_RGBA texture formats. This has - * got to be better than sticking them way down the end of this - * huge list. - */ case GL_RGBA: case 4: if ( format == GL_BGRA ) { @@ -211,9 +207,6 @@ TMC_tformat_tw16, _mesa_texformat_rgb565 ); break; - /* GH: Okay, keep checking as normal. Still test for GL_RGB, - * GL_RGBA formats first. - */ case GL_RGBA8: case GL_RGB10_A2: case GL_RGBA12: @@ -224,12 +217,17 @@ case GL_RGBA4: case GL_RGBA2: + case GL_RGB5_A1: SET_FORMAT( TMC_tformat_tw12, _mesa_texformat_argb4444 ); break; +#if 0 case GL_RGB5_A1: + /* GH: Leave this until we use the new texture conversion code. + */ SET_FORMAT( TMC_tformat_tw15, _mesa_texformat_argb1555 ); break; +#endif case GL_RGB8: case GL_RGB10: @@ -485,16 +483,16 @@ case GL_MODULATE: if (unit == 0) { *reg = ( TD0_color_arg2_diffuse | - TD0_color_sel_mul | + TD0_color_sel_mulout | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mul); + TD0_alpha_sel_mulout); } else { *reg = ( TD0_color_arg2_prevstage | TD0_color_alpha_prevstage | - TD0_color_sel_mul | + TD0_color_sel_mulout | TD0_alpha_arg2_prevstage | - TD0_alpha_sel_mul); + TD0_alpha_sel_mulout); } break; case GL_DECAL: @@ -567,44 +565,44 @@ if (format == GL_INTENSITY) *reg = ( TD0_color_arg2_diffuse | TD0_color_add_add | - TD0_color_sel_add | + TD0_color_sel_addout | TD0_alpha_arg2_diffuse | TD0_alpha_add_enable | - TD0_alpha_sel_add); + TD0_alpha_sel_addout); else if (format == GL_ALPHA) *reg = ( TD0_color_arg2_diffuse | - TD0_color_sel_mul | + TD0_color_sel_mulout | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mul); + TD0_alpha_sel_mulout); else *reg = ( TD0_color_arg2_diffuse | TD0_color_add_add | - TD0_color_sel_add | + TD0_color_sel_addout | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mul); + TD0_alpha_sel_mulout); } else { if (format == GL_INTENSITY) { *reg = ( TD0_color_arg2_prevstage | TD0_color_add_add | - TD0_color_sel_add | + TD0_color_sel_addout | TD0_alpha_arg2_prevstage | TD0_alpha_add_enable | - TD0_alpha_sel_add); + TD0_alpha_sel_addout); } else if (format == GL_ALPHA) { *reg = ( TD0_color_arg2_prevstage | - TD0_color_sel_mul | + TD0_color_sel_mulout | TD0_alpha_arg2_prevstage | - TD0_alpha_sel_mul); + TD0_alpha_sel_mulout); } else { *reg = ( TD0_color_arg2_prevstage | TD0_color_alpha_prevstage | TD0_color_add_add | - TD0_color_sel_add | + TD0_color_sel_addout | TD0_alpha_arg2_prevstage | - TD0_alpha_sel_mul); + TD0_alpha_sel_mulout); } } break; @@ -612,9 +610,9 @@ case GL_BLEND: if (format == GL_ALPHA) { *reg = ( TD0_color_arg2_diffuse | - TD0_color_sel_mul | + TD0_color_sel_mulout | TD0_alpha_arg2_diffuse | - TD0_alpha_sel_mul); + TD0_alpha_sel_mulout); } else { mmesa->Fallback |= MGA_FALLBACK_TEXTURE; @@ -632,7 +630,7 @@ */ *reg = ( TD0_color_arg2_diffuse | TD0_color_arg1_inv_enable | - TD0_color_sel_mul | + TD0_color_sel_mulout | TD0_alpha_arg2_diffuse | TD0_alpha_sel_arg1); } else { @@ -641,7 +639,7 @@ */ *reg = ( TD0_color_arg2_prevstage | TD0_color_add_add | - TD0_color_sel_add | + TD0_color_sel_addout | TD0_alpha_arg2_prevstage | TD0_alpha_sel_arg2); } Index: xc/lib/GL/mesa/src/drv/mga/mgavb.c diff -u xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.10 xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.11 --- xc/lib/GL/mesa/src/drv/mga/mgavb.c:1.10 Tue Apr 10 12:07:51 2001 +++ xc/lib/GL/mesa/src/drv/mga/mgavb.c Wed Oct 31 17:50:24 2001 @@ -24,7 +24,7 @@ * Authors: * Keith Whitwell */ -/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.10 2001/04/10 16:07:51 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgavb.c,v 1.11 2001/10/31 22:50:24 tsi Exp $ */ #include "mgacontext.h" #include "mgavb.h" @@ -406,7 +406,7 @@ void mgaDDDoRasterSetup( struct vertex_buffer *VB ) { GLcontext *ctx = VB->ctx; - mgaContextPtr mmesa = MGA_CONTEXT( ctx ); +/* mgaContextPtr mmesa = MGA_CONTEXT( ctx ); */ /* Can't lock, won't lock */ Index: xc/lib/GL/mesa/src/drv/r128/r128_context.h diff -u xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.8 xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.9 --- xc/lib/GL/mesa/src/drv/r128/r128_context.h:1.8 Tue Apr 10 13:53:07 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_context.h Tue Oct 2 07:44:13 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.h,v 1.8 2001/04/10 17:53:07 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_context.h,v 1.9 2001/10/02 11:44:13 alanh Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -266,12 +266,7 @@ #else #include #define LE32_OUT( x, y ) do { x = bswap_32( y ); } while (0) -#define LE32_OUT_FLOAT( x, y ) \ -do { \ - GLuint __tmp; \ - *(GLfloat *)&__tmp = y; \ - x = bswap_32( __tmp ); \ -} while (0) +#define LE32_OUT_FLOAT( x, y ) do { x = bswap_32( *(unsigned int *)&y ); } while (0) #endif /* ================================================================ Index: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.6 xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.7 --- xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c:1.6 Tue Apr 10 12:07:52 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c Wed Oct 31 17:50:25 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c,v 1.6 2001/04/10 16:07:52 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c,v 1.7 2001/10/31 22:50:25 tsi Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -318,8 +318,8 @@ #endif if ( 0 ) - fprintf( stderr, " last=0x%08x frame=0x%08x\n", - rmesa->sarea->last_frame, frame ); + fprintf( stderr, " last=0x%08x frame=0x%08lx\n", + rmesa->sarea->last_frame, (long)frame ); if ( rmesa->sarea->last_frame - frame <= R128_MAX_OUTSTANDING ) { break; Index: xc/lib/GL/mesa/src/drv/r128/r128_tex.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.9 xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.10 --- xc/lib/GL/mesa/src/drv/r128/r128_tex.c:1.9 Tue Apr 10 12:07:52 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_tex.c Fri Aug 17 22:51:05 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.9 2001/04/10 16:07:52 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_tex.c,v 1.10 2001/08/18 02:51:05 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -700,7 +700,7 @@ return; image = t->tObj->Image[level]; - if ( !image ) + if ( !image || !image->Data ) return; switch ( t->texelBytes ) { Index: xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c diff -u xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:1.8 xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:1.12 --- xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c:1.8 Wed Mar 21 11:14:24 2001 +++ xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c Mon Nov 26 16:46:35 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c,v 1.8 2001/03/21 16:14:24 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c,v 1.12 2001/11/26 21:46:35 dawes Exp $ */ /************************************************************************** Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc., @@ -81,9 +81,9 @@ /* Check that the DRM driver version is compatible */ if ( sPriv->drmMajor != 2 || - sPriv->drmMinor < 1 ) { + sPriv->drmMinor < 2 ) { char msg[1000]; - sprintf( msg, "R128 DRI driver expected DRM driver version 2.1.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); + sprintf( msg, "R128 DRI driver expected DRM driver version 3.0 or greater but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch ); __driMesaMessage( msg ); return GL_FALSE; } @@ -296,9 +296,9 @@ GLboolean XMesaCloseFullScreen( __DRIcontextPrivate *driContextPriv ) { +#if 0 r128ContextPtr rmesa = (r128ContextPtr)driContextPriv->driverPrivate; -#if 0 LOCK_HARDWARE( rmesa ); r128WaitForIdleLocked( rmesa ); Index: xc/lib/GL/mesa/src/drv/radeon/Imakefile diff -u xc/lib/GL/mesa/src/drv/radeon/Imakefile:1.6 xc/lib/GL/mesa/src/drv/radeon/Imakefile:1.7 --- xc/lib/GL/mesa/src/drv/radeon/Imakefile:1.6 Thu May 10 12:56:11 2001 +++ xc/lib/GL/mesa/src/drv/radeon/Imakefile Fri Nov 2 18:29:26 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile,v 1.6 2001/05/10 16:56:11 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/radeon/Imakefile,v 1.7 2001/11/02 23:29:26 dawes Exp $ #include @@ -58,7 +58,7 @@ #if !GlxUseBuiltInDRIDriver LIBNAME = radeon_dri.so -SharedDepModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf Index: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c diff -u xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c:1.3.2.1 xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c:1.4 --- xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c:1.3.2.1 Tue May 22 17:25:41 2001 +++ xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c Mon May 21 17:43:52 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v 1.3.2.1 2001/05/22 21:25:41 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_tex.c,v 1.4 2001/05/21 21:43:52 dawes Exp $ */ /************************************************************************** Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and Index: xc/lib/GL/mesa/src/drv/sis/Imakefile diff -u xc/lib/GL/mesa/src/drv/sis/Imakefile:1.17 xc/lib/GL/mesa/src/drv/sis/Imakefile:1.18 --- xc/lib/GL/mesa/src/drv/sis/Imakefile:1.17 Thu May 10 12:56:12 2001 +++ xc/lib/GL/mesa/src/drv/sis/Imakefile Fri Nov 2 18:29:27 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.17 2001/05/10 16:56:12 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/sis/Imakefile,v 1.18 2001/11/02 23:29:27 dawes Exp $ #include @@ -64,7 +64,7 @@ #if !GlxUseBuiltInDRIDriver LIBNAME = sis_dri.so -SharedDepModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) +SharedDriModuleTarget($(LIBNAME),DONE $(OBJS),$(OBJS)) InstallDynamicModule($(LIBNAME),$(MODULEDIR),dri) #ifdef GlxSoProf Index: xc/lib/GL/mesa/src/drv/sis/sis_mesa.c diff -u xc/lib/GL/mesa/src/drv/sis/sis_mesa.c:1.5 xc/lib/GL/mesa/src/drv/sis/sis_mesa.c:1.6 --- xc/lib/GL/mesa/src/drv/sis/sis_mesa.c:1.5 Tue Sep 26 11:56:48 2000 +++ xc/lib/GL/mesa/src/drv/sis/sis_mesa.c Wed Oct 31 17:50:25 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.c,v 1.5 2000/09/26 15:56:48 tsi Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_mesa.c,v 1.6 2001/10/31 22:50:25 tsi Exp $ */ /* * Authors: @@ -1045,8 +1045,8 @@ assert (base != NULL); if (SIS_VERBOSE&VERBOSE_SIS_BUFFER){ - fprintf(stderr, "set drawing position: base=%x, pitch=%lu\n", - (unsigned long)base, pitch); + fprintf(stderr, "set drawing position: base=%lx, pitch=%lu\n", + (long)base, (long)pitch); } /* software render */ Index: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c diff -u xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c:1.9.2.1 xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c:1.10 --- xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c:1.9.2.1 Tue May 22 17:25:41 2001 +++ xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c Sat May 19 14:29:18 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c,v 1.9.2.1 2001/05/22 21:25:41 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_xmesa.c,v 1.10 2001/05/19 18:29:18 dawes Exp $ */ /* * Authors: Index: xc/lib/GL/mesa/src/drv/tdfx/Imakefile diff -u xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.25.2.1 xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.28 --- xc/lib/GL/mesa/src/drv/tdfx/Imakefile:1.25.2.1 Fri Jun 1 03:42:23 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/Imakefile Fri Aug 17 22:51:06 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.25.2.1 2001/06/01 07:42:23 alanh Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile,v 1.28 2001/08/18 02:51:06 dawes Exp $ #include @@ -23,8 +23,6 @@ #include "../../X86/Imakefile.inc" #endif - DEPEND_DEFINES = -D__linux__ - DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES) $(MESA_ASM_DEFINES) INCLUDES = $(X_INCLUDES) $(MESA_INCLUDES) $(DRI_INCLUDES) \ -I$(GLIDE3INCDIR) @@ -49,7 +47,7 @@ OBJS = $(LOOBJS) $(DRIOBJS) $(DRMOBJS) $(COREMESAOBJS) \ $(MESA_ASM_OBJS) $(TDFXOBJS) $(HIOBJS) -REQUIREDLIBS = -l$(GLIDE3LIBNAME) MathLibrary $(LDPRELIB) $(GLXLIB) +REQUIREDLIBS = MathLibrary $(LDPRELIB) $(GLXLIB) #include Index: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc diff -u xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc:1.2 xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc:1.2 Wed May 2 11:06:04 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc Fri Aug 17 22:51:06 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc,v 1.2 2001/05/02 15:06:04 dawes Exp $ +XCOMM $XFree86: xc/lib/GL/mesa/src/drv/tdfx/Imakefile.inc,v 1.3 2001/08/18 02:51:06 dawes Exp $ #ifndef MesaDrvSrcDir #define MesaDrvSrcDir $(GLXLIBSRC)/mesa/src/drv @@ -16,7 +16,7 @@ #endif #if BuildXF86DRI - DRI_DEFINES = GlxDefines -DFX_GLIDE3 + DRI_DEFINES = GlxDefines DRI_INCLUDES = -I$(GLXLIBSRC)/dri -I$(GLXLIBSRC)/glx \ -I$(INCLUDESRC) -I$(INCLUDESRC)/GL \ -I$(GLXLIBSRC)/mesa/dri \ @@ -34,7 +34,6 @@ $(MESADRVTDFXBUILDDIR)tdfx_dd.c \ $(MESADRVTDFXBUILDDIR)tdfx_pixels.c \ $(MESADRVTDFXBUILDDIR)tdfx_fastpath.c \ - $(MESADRVTDFXBUILDDIR)tdfx_g3ext.c \ $(MESADRVTDFXBUILDDIR)tdfx_lock.c \ $(MESADRVTDFXBUILDDIR)tdfx_pipeline.c \ $(MESADRVTDFXBUILDDIR)tdfx_render.c \ @@ -53,7 +52,6 @@ $(MESADRVTDFXBUILDDIR)tdfx_dd.o \ $(MESADRVTDFXBUILDDIR)tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)tdfx_fastpath.o \ - $(MESADRVTDFXBUILDDIR)tdfx_g3ext.o \ $(MESADRVTDFXBUILDDIR)tdfx_lock.o \ $(MESADRVTDFXBUILDDIR)tdfx_pipeline.o \ $(MESADRVTDFXBUILDDIR)tdfx_render.o \ @@ -72,7 +70,6 @@ $(MESADRVTDFXBUILDDIR)unshared/tdfx_dd.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_fastpath.o \ - $(MESADRVTDFXBUILDDIR)unshared/tdfx_g3ext.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_lock.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_pipeline.o \ $(MESADRVTDFXBUILDDIR)unshared/tdfx_render.o \ @@ -91,7 +88,6 @@ $(MESADRVTDFXBUILDDIR)debugger/tdfx_dd.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_fastpath.o \ - $(MESADRVTDFXBUILDDIR)debugger/tdfx_g3ext.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_lock.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_pipeline.o \ $(MESADRVTDFXBUILDDIR)debugger/tdfx_render.o \ @@ -110,7 +106,6 @@ $(MESADRVTDFXBUILDDIR)profiled/tdfx_dd.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_pixels.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_fastpath.o \ - $(MESADRVTDFXBUILDDIR)profiled/tdfx_g3ext.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_lock.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_pipeline.o \ $(MESADRVTDFXBUILDDIR)profiled/tdfx_render.o \ @@ -130,7 +125,6 @@ LinkSourceFile(tdfx_dd.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_pixels.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_fastpath.c, $(MESADRVSRCDIR)/tdfx) -LinkSourceFile(tdfx_g3ext.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_lock.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_pipeline.c, $(MESADRVSRCDIR)/tdfx) LinkSourceFile(tdfx_render.c, $(MESADRVSRCDIR)/tdfx) Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c:1.1.2.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c:1.6 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c:1.1.2.1 Tue May 22 17:25:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c Wed Dec 12 19:34:21 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.1.2.1 2001/05/22 21:25:41 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.6 2001/12/13 00:34:21 alanh Exp $ */ /* * Original rewrite: @@ -35,6 +35,7 @@ * */ +#include #include "dri_glide.h" #include "tdfx_context.h" #include "tdfx_dd.h" @@ -134,7 +135,7 @@ fxScreen->sarea_priv_offset); - fxMesa = (tdfxContextPtr) Xmalloc( sizeof(tdfxContextRec) ); + fxMesa = (tdfxContextPtr) MALLOC( sizeof(tdfxContextRec) ); if ( !fxMesa ) { return GL_FALSE; } @@ -168,7 +169,13 @@ fxMesa->glCtx = driContextPriv->mesaContext; fxMesa->glVis = mesaVis; - grDRIOpen( sPriv->pFB, fxScreen->regs.map, fxScreen->deviceID, + /* NOTE: This MUST be called before any Glide functions are called! */ + if (!tdfxInitGlide(fxMesa)) { + FREE(fxMesa); + return GL_FALSE; + } + + fxMesa->Glide.grDRIOpen( (char*) sPriv->pFB, fxScreen->regs.map, fxScreen->deviceID, fxScreen->width, fxScreen->height, fxScreen->mem, fxScreen->cpp, fxScreen->stride, fxScreen->fifoOffset, fxScreen->fifoSize, fxScreen->fbOffset, fxScreen->backOffset, fxScreen->depthOffset, @@ -178,7 +185,7 @@ if ( getenv( "FX_GLIDE_SWAPINTERVAL" ) ) { fxMesa->Glide.SwapInterval = atoi( getenv( "FX_GLIDE_SWAPINTERVAL" ) ); } else { - fxMesa->Glide.SwapInterval = 1; + fxMesa->Glide.SwapInterval = 0; } if ( getenv( "FX_MAX_PENDING_SWAPS" ) ) { fxMesa->Glide.MaxPendingSwaps = atoi( getenv( "FX_MAX_PENDING_SWAPS" ) ); @@ -268,7 +275,7 @@ LOCK_HARDWARE( fxMesa ); - grGet( GR_GLIDE_VERTEXLAYOUT_SIZE, sizeof(FxI32), &result ); + fxMesa->Glide.grGet( GR_GLIDE_VERTEXLAYOUT_SIZE, sizeof(FxI32), &result ); for ( i = 0 ; i < TDFX_NUM_LAYOUTS ; i++ ) { fxMesa->layout[i] = MALLOC( result ); if ( !fxMesa->layout[i] ) { @@ -279,55 +286,55 @@ /* Single textured vertex format - 32 bytes. */ - grReset( GR_VERTEX_PARAMETER ); + fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); - grCoordinateSpace( GR_WINDOW_COORDS ); - grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); + fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); #if 0 - grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); #endif - grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_SINGLE] ); + fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_SINGLE] ); /* Multitextured vertex format - 40 bytes. */ - grReset( GR_VERTEX_PARAMETER ); + fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); - grCoordinateSpace( GR_WINDOW_COORDS ); - grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); + fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); #if 0 - grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); #endif - grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_MULTI] ); + fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_MULTI] ); /* Projected texture vertex format - 48 bytes. */ - grReset( GR_VERTEX_PARAMETER ); + fxMesa->Glide.grReset( GR_VERTEX_PARAMETER ); - grCoordinateSpace( GR_WINDOW_COORDS ); - grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Q0, TDFX_Q0_OFFSET, GR_PARAM_ENABLE ); - grVertexLayout( GR_PARAM_Q1, TDFX_Q1_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grCoordinateSpace( GR_WINDOW_COORDS ); + fxMesa->Glide.grVertexLayout( GR_PARAM_XY, TDFX_XY_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Z, TDFX_Z_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Q, TDFX_Q_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_PARGB, TDFX_ARGB_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_ST0, TDFX_ST0_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_ST1, TDFX_ST1_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Q0, TDFX_Q0_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_Q1, TDFX_Q1_OFFSET, GR_PARAM_ENABLE ); #if 0 - grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); + fxMesa->Glide.grVertexLayout( GR_PARAM_FOG_EXT, TDFX_FOG_OFFSET, GR_PARAM_ENABLE ); #endif - grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_PROJECT] ); + fxMesa->Glide.grGlideGetVertexLayout( fxMesa->layout[TDFX_LAYOUT_PROJECT] ); UNLOCK_HARDWARE( fxMesa ); @@ -364,17 +371,17 @@ */ DRM_LIGHT_LOCK( fxMesa->driFd, fxMesa->driHwLock, fxMesa->hHWContext ); - grGlideInit(); - grSstSelect( fxMesa->Glide.Board ); + fxMesa->Glide.grGlideInit(); + fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); - fxMesa->Glide.Context = grSstWinOpen( (FxU32) -1, + fxMesa->Glide.Context = fxMesa->Glide.grSstWinOpen( (FxU32) -1, GR_RESOLUTION_NONE, GR_REFRESH_NONE, fxMesa->Glide.ColorFormat, fxMesa->Glide.Origin, 2, 1 ); - grDRIResetSAREA(); + fxMesa->Glide.grDRIResetSAREA(); DRM_UNLOCK( fxMesa->driFd, fxMesa->driHwLock, fxMesa->hHWContext ); @@ -391,22 +398,22 @@ LOCK_HARDWARE( fxMesa ); if ( fxMesa->glVis->DepthBits > 0 ) { - grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); + fxMesa->Glide.grDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); } else { - grDepthBufferMode(GR_DEPTHBUFFER_DISABLE); + fxMesa->Glide.grDepthBufferMode(GR_DEPTHBUFFER_DISABLE); } - grLfbWriteColorFormat( GR_COLORFORMAT_ABGR ); + fxMesa->Glide.grLfbWriteColorFormat( GR_COLORFORMAT_ABGR ); - grGet( GR_TEXTURE_ALIGN, sizeof(FxI32), result ); + fxMesa->Glide.grGet( GR_TEXTURE_ALIGN, sizeof(FxI32), result ); fxMesa->Glide.TextureAlign = result[0]; fxMesa->Glide.State = NULL; - grGet( GR_GLIDE_STATE_SIZE, sizeof(FxI32), result ); + fxMesa->Glide.grGet( GR_GLIDE_STATE_SIZE, sizeof(FxI32), result ); fxMesa->Glide.State = MALLOC( result[0] ); fxMesa->Fog.Table = NULL; - grGet( GR_FOG_TABLE_ENTRIES, sizeof(FxI32), result ); + fxMesa->Glide.grGet( GR_FOG_TABLE_ENTRIES, sizeof(FxI32), result ); fxMesa->Fog.Table = MALLOC( result[0] * sizeof(GrFog_t) ); UNLOCK_HARDWARE( fxMesa ); @@ -425,14 +432,14 @@ LOCK_HARDWARE( fxMesa ); - grGlideGetState( fxMesa->Glide.State ); + fxMesa->Glide.grGlideGetState( fxMesa->Glide.State ); if ( getenv( "FX_GLIDE_INFO" ) ) { - printf( "GR_RENDERER = %s\n", (char *) grGetString( GR_RENDERER ) ); - printf( "GR_VERSION = %s\n", (char *) grGetString( GR_VERSION ) ); - printf( "GR_VENDOR = %s\n", (char *) grGetString( GR_VENDOR ) ); - printf( "GR_HARDWARE = %s\n", (char *) grGetString( GR_HARDWARE ) ); - printf( "GR_EXTENSION = %s\n", (char *) grGetString( GR_EXTENSION ) ); + printf( "GR_RENDERER = %s\n", (char *) fxMesa->Glide.grGetString( GR_RENDERER ) ); + printf( "GR_VERSION = %s\n", (char *) fxMesa->Glide.grGetString( GR_VERSION ) ); + printf( "GR_VENDOR = %s\n", (char *) fxMesa->Glide.grGetString( GR_VENDOR ) ); + printf( "GR_HARDWARE = %s\n", (char *) fxMesa->Glide.grGetString( GR_HARDWARE ) ); + printf( "GR_EXTENSION = %s\n", (char *) fxMesa->Glide.grGetString( GR_EXTENSION ) ); } UNLOCK_HARDWARE( fxMesa ); @@ -469,10 +476,214 @@ } tdfxTMClose( fxMesa ); /* free texture memory */ - XFree( fxMesa ); + FREE( fxMesa ); } #if 0 glx_fini_prof(); #endif +} + + + +/* + * Examine the context's deviceID to determine what kind of 3dfx hardware + * is installed. dlopen() the appropriate Glide library and initialize + * this context's Glide function pointers. + * Return: true/false = success/failure + */ +GLboolean tdfxInitGlide(tdfxContextPtr tmesa) +{ + static const char *defaultGlide = "libglide3.so"; + const char *libName; + void *libHandle; + + /* + * XXX this code which selects a Glide library filename given the + * deviceID may need to be cleaned up a bit. + * Non-Linux systems may have different filenames, for example. + */ + switch (tmesa->fxScreen->deviceID) { + case PCI_CHIP_BANSHEE: + case PCI_CHIP_VOODOO3: + libName = "libglide3-v3.so"; + break; + case PCI_CHIP_VOODOO5: /* same as PCI_CHIP_VOODOO4 */ + libName = "libglide3-v5.so"; + break; + default: + { + char err[1000]; + sprintf(err, "unrecognized 3dfx deviceID: 0x%x", + tmesa->fxScreen->deviceID); + __driMesaMessage(err); + } + return GL_FALSE; + } + + libHandle = dlopen(libName, RTLD_NOW); + if (!libHandle) { + /* The device-specific Glide library filename didn't work, try the + * old, generic libglide3.so library. + */ + libHandle = dlopen(defaultGlide, RTLD_NOW); + if (!libHandle) { + char err[1000]; + sprintf(err, + "can't find Glide library, dlopen(%s) and dlopen(%s) both failed.", + libName, defaultGlide); + __driMesaMessage(err); + sprintf(err, "dlerror() message: %s", dlerror()); + __driMesaMessage(err); + return GL_FALSE; + } + libName = defaultGlide; + } + + { + const char *env = getenv("LIBGL_DEBUG"); + if (env && strstr(env, "verbose")) { + fprintf(stderr, "libGL: using Glide library %s\n", libName); + } + } + +#define GET_FUNCTION(PTR, NAME) \ + tmesa->Glide.PTR = dlsym(libHandle, NAME); \ + if (!tmesa->Glide.PTR) { \ + char err[1000]; \ + sprintf(err, "couldn't find Glide function %s in %s.", \ + NAME, libName); \ + __driMesaMessage(err); \ + } + + GET_FUNCTION(grDrawPoint, "grDrawPoint"); + GET_FUNCTION(grDrawLine, "grDrawLine"); + GET_FUNCTION(grDrawTriangle, "grDrawTriangle"); + GET_FUNCTION(grVertexLayout, "grVertexLayout"); + GET_FUNCTION(grDrawVertexArray, "grDrawVertexArray"); + GET_FUNCTION(grDrawVertexArrayContiguous, "grDrawVertexArrayContiguous"); + GET_FUNCTION(grBufferClear, "grBufferClear"); + /*GET_FUNCTION(grBufferSwap, "grBufferSwap");*/ + GET_FUNCTION(grRenderBuffer, "grRenderBuffer"); + GET_FUNCTION(grErrorSetCallback, "grErrorSetCallback"); + GET_FUNCTION(grFinish, "grFinish"); + GET_FUNCTION(grFlush, "grFlush"); + GET_FUNCTION(grSstWinOpen, "grSstWinOpen"); + GET_FUNCTION(grSstWinClose, "grSstWinClose"); +#if 0 + /* Not in V3 lib, and not used anyway. */ + GET_FUNCTION(grSetNumPendingBuffers, "grSetNumPendingBuffers"); +#endif + GET_FUNCTION(grSelectContext, "grSelectContext"); + GET_FUNCTION(grSstOrigin, "grSstOrigin"); + GET_FUNCTION(grSstSelect, "grSstSelect"); + GET_FUNCTION(grAlphaBlendFunction, "grAlphaBlendFunction"); + GET_FUNCTION(grAlphaCombine, "grAlphaCombine"); + GET_FUNCTION(grAlphaControlsITRGBLighting, "grAlphaControlsITRGBLighting"); + GET_FUNCTION(grAlphaTestFunction, "grAlphaTestFunction"); + GET_FUNCTION(grAlphaTestReferenceValue, "grAlphaTestReferenceValue"); + GET_FUNCTION(grChromakeyMode, "grChromakeyMode"); + GET_FUNCTION(grChromakeyValue, "grChromakeyValue"); + GET_FUNCTION(grClipWindow, "grClipWindow"); + GET_FUNCTION(grColorCombine, "grColorCombine"); + GET_FUNCTION(grColorMask, "grColorMask"); + GET_FUNCTION(grCullMode, "grCullMode"); + GET_FUNCTION(grConstantColorValue, "grConstantColorValue"); + GET_FUNCTION(grDepthBiasLevel, "grDepthBiasLevel"); + GET_FUNCTION(grDepthBufferFunction, "grDepthBufferFunction"); + GET_FUNCTION(grDepthBufferMode, "grDepthBufferMode"); + GET_FUNCTION(grDepthMask, "grDepthMask"); + GET_FUNCTION(grDisableAllEffects, "grDisableAllEffects"); + GET_FUNCTION(grDitherMode, "grDitherMode"); + GET_FUNCTION(grFogColorValue, "grFogColorValue"); + GET_FUNCTION(grFogMode, "grFogMode"); + GET_FUNCTION(grFogTable, "grFogTable"); + GET_FUNCTION(grLoadGammaTable, "grLoadGammaTable"); + GET_FUNCTION(grSplash, "grSplash"); + GET_FUNCTION(grGet, "grGet"); + GET_FUNCTION(grGetString, "grGetString"); + GET_FUNCTION(grQueryResolutions, "grQueryResolutions"); + GET_FUNCTION(grReset, "grReset"); + GET_FUNCTION(grGetProcAddress, "grGetProcAddress"); + GET_FUNCTION(grEnable, "grEnable"); + GET_FUNCTION(grDisable, "grDisable"); + GET_FUNCTION(grCoordinateSpace, "grCoordinateSpace"); + GET_FUNCTION(grDepthRange, "grDepthRange"); +#if defined(__linux__) || defined(__FreeBSD__) + GET_FUNCTION(grStippleMode, "grStippleMode"); + GET_FUNCTION(grStipplePattern, "grStipplePattern"); +#endif /* __linux__ || __FreeBSD__ */ + GET_FUNCTION(grViewport, "grViewport"); + GET_FUNCTION(grTexCalcMemRequired, "grTexCalcMemRequired"); + GET_FUNCTION(grTexTextureMemRequired, "grTexTextureMemRequired"); + GET_FUNCTION(grTexMinAddress, "grTexMinAddress"); + GET_FUNCTION(grTexMaxAddress, "grTexMaxAddress"); + GET_FUNCTION(grTexNCCTable, "grTexNCCTable"); + GET_FUNCTION(grTexSource, "grTexSource"); + GET_FUNCTION(grTexClampMode, "grTexClampMode"); + GET_FUNCTION(grTexCombine, "grTexCombine"); + GET_FUNCTION(grTexDetailControl, "grTexDetailControl"); + GET_FUNCTION(grTexFilterMode, "grTexFilterMode"); + GET_FUNCTION(grTexLodBiasValue, "grTexLodBiasValue"); + GET_FUNCTION(grTexDownloadMipMap, "grTexDownloadMipMap"); + GET_FUNCTION(grTexDownloadMipMapLevel, "grTexDownloadMipMapLevel"); + GET_FUNCTION(grTexDownloadMipMapLevelPartial, "grTexDownloadMipMapLevelPartial"); + GET_FUNCTION(grTexDownloadTable, "grTexDownloadTable"); + GET_FUNCTION(grTexDownloadTablePartial, "grTexDownloadTablePartial"); + GET_FUNCTION(grTexMipMapMode, "grTexMipMapMode"); + GET_FUNCTION(grTexMultibase, "grTexMultibase"); + GET_FUNCTION(grTexMultibaseAddress, "grTexMultibaseAddress"); + GET_FUNCTION(grLfbLock, "grLfbLock"); + GET_FUNCTION(grLfbUnlock, "grLfbUnlock"); + GET_FUNCTION(grLfbConstantAlpha, "grLfbConstantAlpha"); + GET_FUNCTION(grLfbConstantDepth, "grLfbConstantDepth"); + GET_FUNCTION(grLfbWriteColorSwizzle, "grLfbWriteColorSwizzle"); + GET_FUNCTION(grLfbWriteColorFormat, "grLfbWriteColorFormat"); + GET_FUNCTION(grLfbWriteRegion, "grLfbWriteRegion"); + GET_FUNCTION(grLfbReadRegion, "grLfbReadRegion"); + GET_FUNCTION(grGlideInit, "grGlideInit"); + GET_FUNCTION(grGlideShutdown, "grGlideShutdown"); + GET_FUNCTION(grGlideGetState, "grGlideGetState"); + GET_FUNCTION(grGlideSetState, "grGlideSetState"); + GET_FUNCTION(grGlideGetVertexLayout, "grGlideGetVertexLayout"); + GET_FUNCTION(grGlideSetVertexLayout, "grGlideSetVertexLayout"); + + /* Glide utility functions */ + GET_FUNCTION(guFogGenerateExp, "guFogGenerateExp"); + GET_FUNCTION(guFogGenerateExp2, "guFogGenerateExp2"); + GET_FUNCTION(guFogGenerateLinear, "guFogGenerateLinear"); + + /* DRI functions */ + GET_FUNCTION(grDRIOpen, "grDRIOpen"); + GET_FUNCTION(grDRIPosition, "grDRIPosition"); + /*GET_FUNCTION(grDRILostContext, "grDRILostContext");*/ + GET_FUNCTION(grDRIImportFifo, "grDRIImportFifo"); + GET_FUNCTION(grDRIInvalidateAll, "grDRIInvalidateAll"); + GET_FUNCTION(grDRIResetSAREA, "grDRIResetSAREA"); + GET_FUNCTION(grDRIBufferSwap, "grDRIBufferSwap"); + + /* + * Extension functions: + * Just use dlysm() because we want a NULL pointer if the function is + * not found. + */ + /* PIXEXT extension */ + tmesa->Glide.grStencilFunc = dlsym(libHandle, "grStencilFunc"); + tmesa->Glide.grStencilMask = dlsym(libHandle, "grStencilMask"); + tmesa->Glide.grStencilOp = dlsym(libHandle, "grStencilOp"); + tmesa->Glide.grBufferClearExt = dlsym(libHandle, "grBufferClearExt"); + tmesa->Glide.grColorMaskExt = dlsym(libHandle, "grColorMaskExt"); + /* COMBINE extension */ + tmesa->Glide.grColorCombineExt = dlsym(libHandle, "grColorCombineExt"); + tmesa->Glide.grTexColorCombineExt = dlsym(libHandle, "grTexColorCombineExt"); + tmesa->Glide.grAlphaCombineExt = dlsym(libHandle, "grAlphaCombineExt"); + tmesa->Glide.grTexAlphaCombineExt = dlsym(libHandle, "grTexAlphaCombineExt"); + tmesa->Glide.grAlphaBlendFunctionExt = dlsym(libHandle, "grAlphaBlendFunctionExt"); + tmesa->Glide.grConstantColorValueExt = dlsym(libHandle, "grConstantColorValueExt"); + /* Texus 2 */ + tmesa->Glide.txImgQuantize = dlsym(libHandle, "txImgQuantize"); + tmesa->Glide.txImgDequantizeFXT1 = dlsym(libHandle, "_txImgDequantizeFXT1"); + tmesa->Glide.txErrorSetCallback = dlsym(libHandle, "txErrorSetCallback"); + + return GL_TRUE; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h:1.1 Wed Mar 21 11:14:27 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h Tue Oct 2 07:44:13 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h,v 1.1 2001/03/21 16:14:27 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.h,v 1.3 2001/10/02 11:44:13 alanh Exp $ */ /* * Original rewrite: @@ -67,7 +67,6 @@ #include "tdfx_wrapper.h" #include "tdfx_screen.h" #include "tdfx_lock.h" -#include "tdfx_g3ext.h" @@ -578,6 +577,226 @@ FxBool HaveTexFmtExt; /* TEXFMT */ FxBool HaveTexUMAExt; /* TEXUMA */ FxBool HaveTexus2; /* Texus 2 - FXT1 */ + + /* Glide library function pointers */ + void (*grDrawPoint)( const void *pt ); + void (*grDrawLine)( const void *v1, const void *v2 ); + void (*grDrawTriangle)( const void *a, const void *b, const void *c ); + void (*grVertexLayout)(FxU32 param, FxI32 offset, FxU32 mode); + void (*grDrawVertexArray)(FxU32 mode, FxU32 Count, void *pointers); + void (*grDrawVertexArrayContiguous)(FxU32 mode, FxU32 Count, + void *pointers, FxU32 stride); + void (*grBufferClear)( GrColor_t color, GrAlpha_t alpha, FxU32 depth ); + void (*grBufferSwap)( FxU32 swap_interval ); + void (*grRenderBuffer)( GrBuffer_t buffer ); + void (*grErrorSetCallback)( GrErrorCallbackFnc_t fnc ); + void (*grFinish)(void); + void (*grFlush)(void); + GrContext_t (*grSstWinOpen)(FxU32 hWnd, + GrScreenResolution_t screen_resolution, + GrScreenRefresh_t refresh_rate, + GrColorFormat_t color_format, + GrOriginLocation_t origin_location, + int nColBuffers, + int nAuxBuffers); + void (*grSstWinClose)( GrContext_t context ); +/* Not used */ +#if 0 + void (*grSetNumPendingBuffers)(FxI32 NumPendingBuffers); +#endif + void (*grSelectContext)( GrContext_t context ); + void (*grSstOrigin)(GrOriginLocation_t origin); + void (*grSstSelect)( int which_sst ); + void (*grAlphaBlendFunction)(GrAlphaBlendFnc_t rgb_sf, + GrAlphaBlendFnc_t rgb_df, + GrAlphaBlendFnc_t alpha_sf, + GrAlphaBlendFnc_t alpha_df); + void (*grAlphaCombine)(GrCombineFunction_t function, + GrCombineFactor_t factor, + GrCombineLocal_t local, GrCombineOther_t other, + FxBool invert); + void (*grAlphaControlsITRGBLighting)( FxBool enable ); + void (*grAlphaTestFunction)( GrCmpFnc_t function ); + void (*grAlphaTestReferenceValue)( GrAlpha_t value ); + void (*grChromakeyMode)( GrChromakeyMode_t mode ); + void (*grChromakeyValue)( GrColor_t value ); + void (*grClipWindow)( FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy ); + void (*grColorCombine)( GrCombineFunction_t function, + GrCombineFactor_t factor, + GrCombineLocal_t local, + GrCombineOther_t other, + FxBool invert ); + void (*grColorMask)( FxBool rgb, FxBool a ); + void (*grCullMode)( GrCullMode_t mode ); + void (*grConstantColorValue)( GrColor_t value ); + void (*grDepthBiasLevel)( FxI32 level ); + void (*grDepthBufferFunction)( GrCmpFnc_t function ); + void (*grDepthBufferMode)( GrDepthBufferMode_t mode ); + void (*grDepthMask)( FxBool mask ); + void (*grDisableAllEffects)( void ); + void (*grDitherMode)( GrDitherMode_t mode ); + void (*grFogColorValue)( GrColor_t fogcolor ); + void (*grFogMode)( GrFogMode_t mode ); + void (*grFogTable)( const GrFog_t ft[] ); + void (*grLoadGammaTable)( FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue); + void (*grSplash)(float x, float y, float width, float height, FxU32 frame); + FxU32 (*grGet)( FxU32 pname, FxU32 plength, FxI32 *params ); + const char * (*grGetString)( FxU32 pname ); + FxI32 (*grQueryResolutions)( const GrResolution *resTemplate, + GrResolution *output ); + FxBool (*grReset)( FxU32 what ); + GrProc (*grGetProcAddress)( char *procName ); + void (*grEnable)( GrEnableMode_t mode ); + void (*grDisable)( GrEnableMode_t mode ); + void (*grCoordinateSpace)( GrCoordinateSpaceMode_t mode ); + void (*grDepthRange)( FxFloat n, FxFloat f ); +#if defined(__linux__) || defined (__FreeBSD__) + void (*grStippleMode)( GrStippleMode_t mode ); + void (*grStipplePattern)( GrStipplePattern_t mode ); +#endif /* __linux__ || __FreeBSD__ */ + void (*grViewport)( FxI32 x, FxI32 y, FxI32 width, FxI32 height ); + FxU32 (*grTexCalcMemRequired)(GrLOD_t lodmin, GrLOD_t lodmax, + GrAspectRatio_t aspect, GrTextureFormat_t fmt); + FxU32 (*grTexTextureMemRequired)( FxU32 evenOdd, GrTexInfo *info ); + FxU32 (*grTexMinAddress)( GrChipID_t tmu ); + FxU32 (*grTexMaxAddress)( GrChipID_t tmu ); + void (*grTexNCCTable)( GrNCCTable_t table ); + void (*grTexSource)( GrChipID_t tmu, FxU32 startAddress, + FxU32 evenOdd, GrTexInfo *info ); + void (*grTexClampMode)( GrChipID_t tmu, + GrTextureClampMode_t s_clampmode, + GrTextureClampMode_t t_clampmode ); + void (*grTexCombine)( GrChipID_t tmu, + GrCombineFunction_t rgb_function, + GrCombineFactor_t rgb_factor, + GrCombineFunction_t alpha_function, + GrCombineFactor_t alpha_factor, + FxBool rgb_invert, + FxBool alpha_invert); + void (*grTexDetailControl)( GrChipID_t tmu, int lod_bias, + FxU8 detail_scale, float detail_max ); + void (*grTexFilterMode)( GrChipID_t tmu, + GrTextureFilterMode_t minfilter_mode, + GrTextureFilterMode_t magfilter_mode ); + void (*grTexLodBiasValue)(GrChipID_t tmu, float bias ); + void (*grTexDownloadMipMap)( GrChipID_t tmu, FxU32 startAddress, + FxU32 evenOdd, GrTexInfo *info ); + void (*grTexDownloadMipMapLevel)( GrChipID_t tmu, + FxU32 startAddress, + GrLOD_t thisLod, + GrLOD_t largeLod, + GrAspectRatio_t aspectRatio, + GrTextureFormat_t format, + FxU32 evenOdd, + void *data ); + FxBool (*grTexDownloadMipMapLevelPartial)( GrChipID_t tmu, + FxU32 startAddress, + GrLOD_t thisLod, + GrLOD_t largeLod, + GrAspectRatio_t aspectRatio, + GrTextureFormat_t format, + FxU32 evenOdd, + void *data, + int start, + int end ); + void (*grTexDownloadTable)( GrTexTable_t type, void *data ); + void (*grTexDownloadTablePartial)( GrTexTable_t type, + void *data, int start, int end ); + void (*grTexMipMapMode)( GrChipID_t tmu, GrMipMapMode_t mode, + FxBool lodBlend ); + void (*grTexMultibase)( GrChipID_t tmu, FxBool enable ); + void (*grTexMultibaseAddress)( GrChipID_t tmu, + GrTexBaseRange_t range, + FxU32 startAddress, + FxU32 evenOdd, + GrTexInfo *info ); + FxBool (*grLfbLock)( GrLock_t type, GrBuffer_t buffer, + GrLfbWriteMode_t writeMode, + GrOriginLocation_t origin, FxBool pixelPipeline, + GrLfbInfo_t *info ); + FxBool (*grLfbUnlock)( GrLock_t type, GrBuffer_t buffer ); + void (*grLfbConstantAlpha)( GrAlpha_t alpha ); + void (*grLfbConstantDepth)( FxU32 depth ); + void (*grLfbWriteColorSwizzle)(FxBool swizzleBytes, FxBool swapWords); + void (*grLfbWriteColorFormat)(GrColorFormat_t colorFormat); + FxBool (*grLfbWriteRegion)( GrBuffer_t dst_buffer, + FxU32 dst_x, FxU32 dst_y, + GrLfbSrcFmt_t src_format, + FxU32 src_width, FxU32 src_height, + FxBool pixelPipeline, + FxI32 src_stride, void *src_data ); + FxBool (*grLfbReadRegion)( GrBuffer_t src_buffer, + FxU32 src_x, FxU32 src_y, + FxU32 src_width, FxU32 src_height, + FxU32 dst_stride, void *dst_data ); + void (*grGlideInit)( void ); + void (*grGlideShutdown)( void ); + void (*grGlideGetState)( void *state ); + void (*grGlideSetState)( const void *state ); + void (*grGlideGetVertexLayout)( void *layout ); + void (*grGlideSetVertexLayout)( const void *layout ); + /* Glide utility functions */ + void (*guFogGenerateExp)( GrFog_t *fogtable, float density ); + void (*guFogGenerateExp2)( GrFog_t *fogtable, float density ); + void (*guFogGenerateLinear)(GrFog_t *fogtable, float nearZ, float farZ ); + /* DRI functions */ + void (*grDRIOpen)( char *pFB, char *pRegs, int deviceID, + int width, int height, + int mem, int cpp, int stride, + int fifoOffset, int fifoSize, + int fbOffset, int backOffset, int depthOffset, + int textureOffset, int textureSize, + volatile int *fifoPtr, volatile int *fifoRead ); + void (*grDRIPosition)( int x, int y, int w, int h, + int numClip, XF86DRIClipRectPtr pClip ); + void (*grDRILostContext)( void ); + void (*grDRIImportFifo)( int fifoPtr, int fifoRead ); + void (*grDRIInvalidateAll)( void ); + void (*grDRIResetSAREA)( void ); + void (*grDRIBufferSwap)( FxU32 swapInterval ); + /* Glide extensions */ + /* PIXEXT extension */ + void (*grStencilFunc)( GrCmpFnc_t func, GrStencil_t ref, GrStencil_t mask ); + void (*grStencilMask)( GrStencil_t mask ); + void (*grStencilOp)( GrStencilOp_t fail, GrStencilOp_t zfail, + GrStencilOp_t zpass ); + void (*grBufferClearExt)( GrColor_t color, GrAlpha_t alpha, + FxU32 depth, GrStencil_t stencil ); + void (*grColorMaskExt)( FxBool r, FxBool g, FxBool b, FxBool a ); + /* COMBINE extension */ + void (*grColorCombineExt)( GrCCUColor_t a, GrCombineMode_t a_mode, + GrCCUColor_t b, GrCombineMode_t b_mode, + GrCCUColor_t c, FxBool c_invert, + GrCCUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); + void (*grTexColorCombineExt)( FxU32 tmu, + GrTCCUColor_t a, GrCombineMode_t a_mode, + GrTCCUColor_t b, GrCombineMode_t b_mode, + GrTCCUColor_t c, FxBool c_invert, + GrTCCUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); + void (*grAlphaCombineExt)( GrACUColor_t a, GrCombineMode_t a_mode, + GrACUColor_t b, GrCombineMode_t b_mode, + GrACUColor_t c, FxBool c_invert, + GrACUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); + void (*grTexAlphaCombineExt)( FxU32 tmu, + GrTACUColor_t a, GrCombineMode_t a_mode, + GrTACUColor_t b, GrCombineMode_t b_mode, + GrTACUColor_t c, FxBool c_invert, + GrTACUColor_t d, FxBool d_invert, + FxU32 shift, FxBool invert ); + void (*grAlphaBlendFunctionExt)( GrAlphaBlendFnc_t rgb_sf, + GrAlphaBlendFnc_t rgb_df, + GrAlphaBlendOp_t rgb_op, + GrAlphaBlendFnc_t alpha_sf, + GrAlphaBlendFnc_t alpha_df, + GrAlphaBlendOp_t alpha_op ); + void (*grConstantColorValueExt)( FxU32 tmu, GrColor_t value ); + /* Texus 2 */ + void (*txImgQuantize)( void *xxx_unknown_arguments ); + void (*txImgDequantizeFXT1)( void *txMip, void *pxMip ); + void (*txErrorSetCallback)( void *fnc ); }; @@ -709,6 +928,8 @@ extern GLboolean tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa ); + +extern GLboolean tdfxInitGlide(tdfxContextPtr tmesa); /* Color packing utilities Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c:1.4 xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c:1.5 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c:1.4 Wed May 2 11:06:04 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c Fri Aug 17 22:51:06 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v 1.4 2001/05/02 15:06:04 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_dd.c,v 1.5 2001/08/18 02:51:06 dawes Exp $ */ /* * Original rewrite: @@ -167,8 +167,10 @@ } else { FxI32 zfail, in; - zfail = FX_grGetInteger_NoLock(GR_STATS_PIXELS_DEPTHFUNC_FAIL); - in = FX_grGetInteger_NoLock(GR_STATS_PIXELS_IN); + fxMesa->Glide.grGet(GR_STATS_PIXELS_DEPTHFUNC_FAIL, 4, &zfail); + /*zfail = FX_grGetInteger_NoLock(GR_STATS_PIXELS_DEPTHFUNC_FAIL);*/ + fxMesa->Glide.grGet(GR_STATS_PIXELS_IN, 4, &in); + /*in = FX_grGetInteger_NoLock(GR_STATS_PIXELS_IN);*/ if (in == zfail) result = GL_FALSE; /* geom was completely occluded */ else @@ -180,7 +182,7 @@ } /* reset results now */ - grReset(GR_STATS_PIXELS); + fxMesa->Glide.grReset(GR_STATS_PIXELS); ctx->OcclusionResult = GL_FALSE; ctx->OcclusionResultSaved = GL_FALSE; Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c Fri Aug 17 22:51:06 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_fastpath.c,v 1.2 2001/08/18 02:51:06 dawes Exp $ */ /* * Original rewrite: @@ -58,7 +58,7 @@ #define POINT(x) tdfx_draw_point( fxMesa, &vert[x], psize ) #define LINE(x,y) tdfx_draw_line( fxMesa, &vert[x], &vert[y], lwidth ) -#define TRI(x,y,z) grDrawTriangle( &vert[x], &vert[y], &vert[z] ); +#define TRI(x,y,z) fxMesa->Glide.grDrawTriangle( &vert[x], &vert[y], &vert[z] ); #define INDIRECT_TRI(x,y,z) \ @@ -509,7 +509,7 @@ ctx->Driver.MultipassFunc( VB, ++p ) ); BEGIN_CLIP_LOOP( fxMesa ); - grDrawVertexArray( GR_TRIANGLES, fxVB->last_elt, fxVB->elts ); + fxMesa->Glide.grDrawVertexArray( GR_TRIANGLES, fxVB->last_elt, fxVB->elts ); END_CLIP_LOOP( fxMesa ); fxVB->last_elt = 0; @@ -556,7 +556,7 @@ * in the other drivers. -BP */ LOCK_HARDWARE( fxMesa ); - grGlideSetVertexLayout( fxMesa->layout[fxMesa->vertexFormat] ); + fxMesa->Glide.grGlideSetVertexLayout( fxMesa->layout[fxMesa->vertexFormat] ); fxMesa->dirty &= ~TDFX_UPLOAD_VERTEX_LAYOUT; UNLOCK_HARDWARE( fxMesa ); } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c Fri Jan 18 15:22:55 2002 @@ -1,122 +0,0 @@ -/* -*- mode: c; c-basic-offset: 3 -*- - * - * Copyright 2000 VA Linux Systems Inc., Fremont, California. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ - -/* - * Original rewrite: - * Gareth Hughes , 29 Sep - 1 Oct 2000 - * - * Authors: - * Gareth Hughes - * - */ - -#include -#include -#include - -#include "tdfx_context.h" -#include "tdfx_g3ext.h" - - -/* STENCIL extension - */ -GrProc grStencilFuncProc = NULL; -GrProc grStencilMaskProc = NULL; -GrProc grStencilOpProc = NULL; -GrProc grBufferClearExtProc = NULL; -GrProc grColorMaskExtProc = NULL; - -/* COMBINE extension - */ -GrProc grColorCombineExtProc = NULL; -GrProc grTexColorCombineExtProc = NULL; -GrProc grAlphaCombineExtProc = NULL; -GrProc grTexAlphaCombineExtProc = NULL; -GrProc grAlphaBlendFunctionExtProc = NULL; -GrProc grConstantColorValueExtProc = NULL; - -/* Texus 2 - */ -GrProc txImgQuantizeProc = NULL; -GrProc txImgDequantizeFXT1Proc = NULL; -GrProc txErrorSetCallbackProc = NULL; - - -/* Initialize the Glide extensions not exported in the Glide headers. - * This is just plain evil stuff... - */ -void tdfxDDGlideExtensionsInit( void ) -{ - void *handle; - - /* Get Glide3 extension function pointers */ - handle = dlopen( NULL, RTLD_NOW | RTLD_GLOBAL ); - - if ( handle ) { - /* PIXEXT extension */ - grStencilFuncProc = dlsym( handle, "grStencilFunc" ); - grStencilMaskProc = dlsym( handle, "grStencilMask" ); - grStencilOpProc = dlsym( handle, "grStencilOp" ); - grBufferClearExtProc = dlsym( handle, "grBufferClearExt" ); - grColorMaskExtProc = dlsym( handle, "grColorMaskExt" ); - - /* COMBINE extension */ - grColorCombineExtProc = dlsym( handle, "grColorCombineExt" ); - grTexColorCombineExtProc = dlsym( handle, "grTexColorCombineExt" ); - grAlphaCombineExtProc = dlsym( handle, "grAlphaCombineExt" ); - grTexAlphaCombineExtProc = dlsym( handle, "grTexAlphaCombineExt" ); - grAlphaBlendFunctionExtProc = dlsym( handle, "grAlphaBlendFunctionExt" ); - grConstantColorValueExtProc = dlsym( handle, "grConstantColorValueExt" ); - - /* Texus 2 */ - txImgQuantizeProc = dlsym( handle, "txImgQuantize" ); - txImgDequantizeFXT1Proc = dlsym( handle, "_txImgDequantizeFXT1" ); - txErrorSetCallbackProc = dlsym( handle, "txErrorSetCallback" ); - } else { - /* PIXEXT extension */ - grStencilFuncProc = NULL; - grStencilMaskProc = NULL; - grStencilOpProc = NULL; - grBufferClearExtProc = NULL; - grColorMaskExtProc = NULL; - - /* COMBINE extension */ - grColorCombineExtProc = NULL; - grTexColorCombineExtProc = NULL; - grAlphaCombineExtProc = NULL; - grTexAlphaCombineExtProc = NULL; - grAlphaBlendFunctionExtProc = NULL; - grConstantColorValueExtProc = NULL; - - /* Texus 2 */ - txImgQuantizeProc = NULL; - txImgDequantizeFXT1Proc = NULL; - txErrorSetCallbackProc = NULL; - } - - dlclose( handle ); -} Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h:removed --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h Fri Jan 18 15:22:55 2002 @@ -1,145 +0,0 @@ -/* -*- mode: c; c-basic-offset: 3 -*- - * - * Copyright 2000 VA Linux Systems Inc., Fremont, California. - * - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * VA LINUX SYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_g3ext.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ - -/* - * Original rewrite: - * Gareth Hughes , 29 Sep - 1 Oct 2000 - * - * Authors: - * Gareth Hughes - * - */ - -#ifndef __TDFX_G3EXT_H__ -#define __TDFX_G3EXT_H__ - -#ifdef GLX_DIRECT_RENDERING - -#include -#include - -/* - * These are glide extension definitions. These are not - * defined in glide.h. They should really be defined in - * g3ext.h, but they are not. - */ -typedef void (*grStencilFunc_t)( GrCmpFnc_t fnc, GrStencil_t ref, - GrStencil_t mask ); -typedef void (*grStencilMask_t)( GrStencil_t write_mask ); -typedef void (*grStencilOp_t)( GrStencilOp_t stencil_fail, - GrStencilOp_t depth_fail, - GrStencilOp_t depth_pass ); -typedef void (*grBufferClearExt_t)( GrColor_t color, GrAlpha_t alpha, - FxU32 depth, GrStencil_t stencil ); -typedef void (*grColorMaskExt_t)( FxBool r, FxBool g, FxBool b, FxBool a ); - -/* - * "COMBINE" extension for Napalm - */ -typedef void (*grColorCombineExt_t)( GrCCUColor_t a, GrCombineMode_t a_mode, - GrCCUColor_t b, GrCombineMode_t b_mode, - GrCCUColor_t c, FxBool c_invert, - GrCCUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert ); -typedef void (*grTexColorCombineExt_t)( FxU32 tmu, - GrTCCUColor_t a, - GrCombineMode_t a_mode, - GrTCCUColor_t b, - GrCombineMode_t b_mode, - GrTCCUColor_t c, FxBool c_invert, - GrTCCUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert ); -typedef void (*grAlphaCombineExt_t)( GrACUColor_t a, GrCombineMode_t a_mode, - GrACUColor_t b, GrCombineMode_t b_mode, - GrACUColor_t c, FxBool c_invert, - GrACUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert ); -typedef void (*grTexAlphaCombineExt_t)( FxU32 tmu, - GrTACUColor_t a, - GrCombineMode_t a_mode, - GrTACUColor_t b, - GrCombineMode_t b_mode, - GrTACUColor_t c, FxBool c_invert, - GrTACUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert ); -typedef void (*grAlphaBlendFunctionExt_t)( GrAlphaBlendFnc_t rgb_sf, - GrAlphaBlendFnc_t rgb_df, - GrAlphaBlendOp_t rgb_op, - GrAlphaBlendFnc_t alpha_sf, - GrAlphaBlendFnc_t alpha_df, - GrAlphaBlendOp_t alpha_op); -typedef void (*grConstantColorValueExt_t)( FxU32 tmu, GrColor_t value ); - - - -/* - * These are functions to compress and decompress images. - * The types of the first and second parameters are not exactly - * right. The texus library declares them to be "char *", not - * "void *". However, "void *" is more correct, and more convenient. - */ -typedef void (*txImgQuantize_t)( void *dst, void *src, - int w, int h, - FxU32 format, FxU32 dither ); -typedef void (*txImgDeQuantize_t)( void *dst, void *src, int w, int h ); - -/* - * These next three declarations should probably be taken from - * texus.h. However, there are duplicate declarations in g3ext.h - * and texus.h which make it hard to include them both. - */ -typedef void (*TxErrorCallbackFnc_t)( const char *string, FxBool fatal ); -typedef void (*txErrorSetCallback_t)( TxErrorCallbackFnc_t fnc, - TxErrorCallbackFnc_t *old_fnc ); - -/* PIXEXT extension - */ -GrProc grStencilFuncProc; -GrProc grStencilMaskProc; -GrProc grStencilOpProc; -GrProc grBufferClearExtProc; -GrProc grColorMaskExtProc; - -/* COMBINE extension - */ -GrProc grColorCombineExtProc; -GrProc grTexColorCombineExtProc; -GrProc grAlphaCombineExtProc; -GrProc grTexAlphaCombineExtProc; -GrProc grAlphaBlendFunctionExtProc; -GrProc grConstantColorValueExtProc; - -/* Texus extensions??? - */ -GrProc txImgQuantizeProc; -GrProc txImgDequantizeFXT1Proc; -GrProc txErrorSetCallbackProc; - -extern void tdfxDDGlideExtensionsInit( void ); - -#endif -#endif Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c Wed Dec 12 19:34:21 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.c,v 1.3 2001/12/13 00:34:21 alanh Exp $ */ /* * Original rewrite: @@ -59,7 +59,7 @@ XMESA_VALIDATE_DRAWABLE_INFO( cPriv->display, sPriv, dPriv ); if ( saPriv->fifoOwner != fxMesa->hHWContext ) { - grDRIImportFifo( saPriv->fifoPtr, saPriv->fifoRead ); + fxMesa->Glide.grDRIImportFifo( saPriv->fifoPtr, saPriv->fifoRead ); } if ( saPriv->ctxOwner != fxMesa->hHWContext ) { @@ -69,7 +69,9 @@ * that state onto the hardware when you set the state. */ void *state; - state = malloc( FX_grGetInteger_NoLock( FX_GLIDE_STATE_SIZE ) ); + FxI32 size; + fxMesa->Glide.grGet( GR_GLIDE_STATE_SIZE, 4, &size ); + state = malloc( size ); FX_grGlideGetState_NoLock( state ); FX_grGlideSetState_NoLock( state ); free( state ); Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h Fri Aug 17 22:51:06 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_lock.h,v 1.2 2001/08/18 02:51:06 dawes Exp $ */ /* * Original rewrite: @@ -127,7 +127,7 @@ while (_nc--) { \ if (fxMesa->numClipRects > 1) { \ int _height = fxMesa->screen_height; \ - grClipWindow(fxMesa->pClipRects[_nc].x1, \ + fxMesa->Glide.grClipWindow(fxMesa->pClipRects[_nc].x1, \ _height - fxMesa->pClipRects[_nc].y2, \ fxMesa->pClipRects[_nc].x2, \ _height - fxMesa->pClipRects[_nc].y1); \ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c:1.2 Mon Apr 2 16:07:48 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c Fri Aug 17 22:51:06 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c,v 1.2 2001/04/02 20:07:48 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_pixels.c,v 1.3 2001/08/18 02:51:06 dawes Exp $ */ /* * Original rewrite: @@ -459,10 +459,10 @@ LOCK_HARDWARE( fxMesa ); info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, - fxMesa->ReadBuffer, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { + if (fxMesa->Glide.grLfbLock(GR_LFB_READ_ONLY, + fxMesa->ReadBuffer, + GR_LFBWRITEMODE_ANY, + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 2); const GLushort *src = (const GLushort *) info.lfbPtr @@ -484,7 +484,7 @@ result = GL_TRUE; } - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); + fxMesa->Glide.grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); } UNLOCK_HARDWARE( fxMesa ); return result; @@ -519,10 +519,10 @@ LOCK_HARDWARE(fxMesa); info.size = sizeof(info); - if (grLfbLock(GR_LFB_READ_ONLY, - fxMesa->ReadBuffer, - GR_LFBWRITEMODE_ANY, - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) + if (fxMesa->Glide.grLfbLock(GR_LFB_READ_ONLY, + fxMesa->ReadBuffer, + GR_LFBWRITEMODE_ANY, + GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) { const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 4); @@ -545,7 +545,7 @@ result = GL_TRUE; } - grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); + fxMesa->Glide.grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->ReadBuffer); } UNLOCK_HARDWARE(fxMesa); return result; @@ -604,10 +604,10 @@ } info.size = sizeof(info); - if (grLfbLock(GR_LFB_WRITE_ONLY, - fxMesa->DrawBuffer, - GR_LFBWRITEMODE_8888, - GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) + if (fxMesa->Glide.grLfbLock(GR_LFB_WRITE_ONLY, + fxMesa->DrawBuffer, + GR_LFBWRITEMODE_8888, + GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) { const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) ? (fxMesa->screen_width * 4) : (info.strideInBytes); @@ -630,7 +630,7 @@ result = GL_TRUE; } - grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer); + fxMesa->Glide.grLfbUnlock(GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer); } UNLOCK_HARDWARE(fxMesa); return result; Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c Tue Oct 2 07:44:13 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_render.c,v 1.3 2001/10/02 11:44:13 alanh Exp $ */ /* * Original rewrite: @@ -48,9 +48,8 @@ GLint x, GLint y, GLint width, GLint height ) { tdfxContextPtr fxMesa = (tdfxContextPtr) ctx->DriverCtx; - GLbitfield softwareMask = mask & (DD_ACCUM_BIT); - const GLuint stencil_size = - fxMesa->haveHwStencil ? fxMesa->glVis->StencilBits : 0; + const GLuint stencil_size = fxMesa->haveHwStencil ? fxMesa->glVis->StencilBits : 0; + GLbitfield softwareMask = 0; #if 0 GLuint flags; @@ -96,30 +95,30 @@ } if ( flags & TDFX_STENCIL ) { - grStencilMask( fxMesa->Stencil.WriteMask ); + fxMesa->Glide.grStencilMask( fxMesa->Stencil.WriteMask ); /* set stencil ref value = desired clear value */ - grStencilFunc( GR_CMP_ALWAYS, fxMesa->Stencil.Clear, 0xff ); - grStencilOp( GR_STENCILOP_REPLACE, - GR_STENCILOP_REPLACE, - GR_STENCILOP_REPLACE ); - grEnable( GR_STENCIL_MODE_EXT ); + fxMesa->Glide.grStencilFunc( GR_CMP_ALWAYS, fxMesa->Stencil.Clear, 0xff ); + fxMesa->Glide.grStencilOp( GR_STENCILOP_REPLACE, + GR_STENCILOP_REPLACE, + GR_STENCILOP_REPLACE ); + fxMesa->Glide.grEnable( GR_STENCIL_MODE_EXT ); if ( ctx->Stencil.Enabled ) { - grStencilOp( fxMesa->Stencil.FailFunc, - fxMesa->Stencil.ZFailFunc, - fxMesa->Stencil.ZPassFunc ); - grStencilMask( fxMesa->Stencil.WriteMask ); - grStencilFunc( fxMesa->Stencil.Function, - fxMesa->Stencil.RefValue, - fxMesa->Stencil.ValueMask ); - grEnable_NoLock( GR_STENCIL_MODE_EXT ); + fxMesa->Glide.grStencilOp( fxMesa->Stencil.FailFunc, + fxMesa->Stencil.ZFailFunc, + fxMesa->Stencil.ZPassFunc ); + fxMesa->Glide.grStencilMask( fxMesa->Stencil.WriteMask ); + fxMesa->Glide.grStencilFunc( fxMesa->Stencil.Function, + fxMesa->Stencil.RefValue, + fxMesa->Stencil.ValueMask ); + fxMesa->Glide.grEnable_NoLock( GR_STENCIL_MODE_EXT ); } else { - grDisable( GR_STENCIL_MODE_EXT ); + fxMesa->Glide.grDisable( GR_STENCIL_MODE_EXT ); } - + } UNLOCK_HARDWARE( fxMesa ); - + #else if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) { @@ -134,7 +133,10 @@ } /* we can't clear accum buffers */ - mask &= ~(DD_ACCUM_BIT); + if (mask & DD_ACCUM_BIT) { + mask &= ~(DD_ACCUM_BIT); + softwareMask |= DD_ACCUM_BIT; + } if (mask & DD_STENCIL_BIT) { if (!fxMesa->haveHwStencil || ctx->Stencil.WriteMask != 0xff) { @@ -147,8 +149,8 @@ if (fxMesa->glVis->RedBits != 8) { /* can only do color masking if running in 24/32bpp on Napalm */ - if (ctx->Color.ColorMask[RCOMP] != ctx->Color.ColorMask[GCOMP] || - ctx->Color.ColorMask[GCOMP] != ctx->Color.ColorMask[BCOMP]) { + if ((ctx->Color.ColorMask[RCOMP] != ctx->Color.ColorMask[GCOMP]) || + (ctx->Color.ColorMask[GCOMP] != ctx->Color.ColorMask[BCOMP])) { softwareMask |= (mask & (DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT)); mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT); } @@ -162,15 +164,15 @@ */ LOCK_HARDWARE(fxMesa); if (mask & DD_STENCIL_BIT) { - FX_grStencilMask_NoLock(/*ctx->Stencil.WriteMask*/ 0xff); + fxMesa->Glide.grStencilMask(/*ctx->Stencil.WriteMask*/ 0xff); /* set stencil ref value = desired clear value */ - FX_grStencilFunc_NoLock(GR_CMP_ALWAYS, ctx->Stencil.Clear, 0xff); - FX_grStencilOp_NoLock(GR_STENCILOP_REPLACE, - GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE); - FX_grEnable_NoLock(GR_STENCIL_MODE_EXT); + fxMesa->Glide.grStencilFunc(GR_CMP_ALWAYS, ctx->Stencil.Clear, 0xff); + fxMesa->Glide.grStencilOp(GR_STENCILOP_REPLACE, + GR_STENCILOP_REPLACE, GR_STENCILOP_REPLACE); + fxMesa->Glide.grEnable(GR_STENCIL_MODE_EXT); } else { - FX_grDisable_NoLock(GR_STENCIL_MODE_EXT); + fxMesa->Glide.grDisable(GR_STENCIL_MODE_EXT); } UNLOCK_HARDWARE(fxMesa); } @@ -188,20 +190,20 @@ case DD_BACK_LEFT_BIT | DD_DEPTH_BIT: /* back buffer & depth */ FX_grColorMaskv_NoLock(ctx, true4); /* work around Voodoo3 bug */ - FX_grDepthMask_NoLock(FXTRUE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grDepthMask(FXTRUE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); if (stencil_size > 0) { - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); } else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); if (!ctx->Depth.Mask || !ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXFALSE); + fxMesa->Glide.grDepthMask(FXFALSE); } break; case DD_FRONT_LEFT_BIT | DD_DEPTH_BIT: @@ -210,161 +212,163 @@ * This is a work-around/ */ /* clear depth */ - FX_grDepthMask_NoLock(FXTRUE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grDepthMask(FXTRUE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); FX_grColorMaskv_NoLock(ctx, false4); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); /* clear front */ FX_grColorMaskv_NoLock(ctx, true4); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); if (!ctx->Depth.Mask || !ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXFALSE); + fxMesa->Glide.grDepthMask(FXFALSE); } break; case DD_BACK_LEFT_BIT: /* back buffer only */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grDepthMask(FXFALSE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); + fxMesa->Glide.grDepthMask(FXTRUE); } break; case DD_FRONT_LEFT_BIT: /* front buffer only */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + fxMesa->Glide.grDepthMask(FXFALSE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); + fxMesa->Glide.grDepthMask(FXTRUE); } break; case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT: /* front and back */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grDepthMask(FXFALSE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); + FX_grColorMaskv_NoLock(ctx, true4); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); + fxMesa->Glide.grDepthMask(FXTRUE); } break; case DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT | DD_DEPTH_BIT: /* clear front */ - FX_grDepthMask_NoLock(FXFALSE); - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + fxMesa->Glide.grDepthMask(FXFALSE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); + FX_grColorMaskv_NoLock(ctx, true4); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); /* clear back and depth */ - FX_grDepthMask_NoLock(FXTRUE); - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grDepthMask(FXTRUE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); if (!ctx->Depth.Mask || !ctx->Depth.Mask) { - FX_grDepthMask_NoLock(FXFALSE); + fxMesa->Glide.grDepthMask(FXFALSE); } break; case DD_DEPTH_BIT: /* just the depth buffer */ - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); FX_grColorMaskv_NoLock(ctx, false4); - FX_grDepthMask_NoLock(FXTRUE); + fxMesa->Glide.grDepthMask(FXTRUE); if (stencil_size > 0) - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); else - FX_grBufferClear_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear); + fxMesa->Glide.grBufferClear(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear); FX_grColorMaskv_NoLock(ctx, true4); if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT) - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); if (!ctx->Depth.Test || !ctx->Depth.Mask) - FX_grDepthMask_NoLock(FXFALSE); + fxMesa->Glide.grDepthMask(FXFALSE); break; default: /* clear no color buffers or depth buffer but might clear stencil */ if (stencil_size > 0 && (mask & DD_STENCIL_BIT)) { /* XXX need this RenderBuffer call to work around Glide bug */ - FX_grRenderBuffer_NoLock(GR_BUFFER_BACKBUFFER); - FX_grDepthMask_NoLock(FXFALSE); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_BACKBUFFER); + fxMesa->Glide.grDepthMask(FXFALSE); FX_grColorMaskv_NoLock(ctx, false4); - FX_grBufferClearExt_NoLock(fxMesa->Color.ClearColor, - fxMesa->Color.ClearAlpha, - fxMesa->Depth.Clear, - (FxU32) ctx->Stencil.Clear); + fxMesa->Glide.grBufferClearExt(fxMesa->Color.ClearColor, + fxMesa->Color.ClearAlpha, + fxMesa->Depth.Clear, + (FxU32) ctx->Stencil.Clear); if (ctx->Depth.Mask && ctx->Depth.Test) { - FX_grDepthMask_NoLock(FXTRUE); + fxMesa->Glide.grDepthMask(FXTRUE); } FX_grColorMaskv_NoLock(ctx, true4); if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT) - FX_grRenderBuffer_NoLock(GR_BUFFER_FRONTBUFFER); + fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER); } } } @@ -390,7 +394,7 @@ FLUSH_BATCH( fxMesa ); LOCK_HARDWARE( fxMesa ); - grFinish(); + fxMesa->Glide.grFinish(); UNLOCK_HARDWARE( fxMesa ); } @@ -401,7 +405,7 @@ FLUSH_BATCH( fxMesa ); LOCK_HARDWARE( fxMesa ); - grFlush(); + fxMesa->Glide.grFlush(); UNLOCK_HARDWARE( fxMesa ); } @@ -503,7 +507,7 @@ printf(" aInvert = %d\n", fxMesa->TexCombineExt[unit].Alpha.Invert); printf(" Color = 0x%08x\n", fxMesa->TexCombineExt[unit].EnvColor); #endif - (*grTexColorCombineExtProc)(TDFX_TMU0 + unit, + fxMesa->Glide.grTexColorCombineExt(TDFX_TMU0 + unit, fxMesa->TexCombineExt[unit].Color.SourceA, fxMesa->TexCombineExt[unit].Color.ModeA, fxMesa->TexCombineExt[unit].Color.SourceB, @@ -514,7 +518,7 @@ fxMesa->TexCombineExt[unit].Color.InvertD, fxMesa->TexCombineExt[unit].Color.Shift, fxMesa->TexCombineExt[unit].Color.Invert); - (*grTexAlphaCombineExtProc)(TDFX_TMU0 + unit, + fxMesa->Glide.grTexAlphaCombineExt(TDFX_TMU0 + unit, fxMesa->TexCombineExt[unit].Alpha.SourceA, fxMesa->TexCombineExt[unit].Alpha.ModeA, fxMesa->TexCombineExt[unit].Alpha.SourceB, @@ -525,8 +529,8 @@ fxMesa->TexCombineExt[unit].Alpha.InvertD, fxMesa->TexCombineExt[unit].Alpha.Shift, fxMesa->TexCombineExt[unit].Alpha.Invert); - (*grConstantColorValueExtProc)(TDFX_TMU0 + unit, - fxMesa->TexCombineExt[unit].EnvColor); + fxMesa->Glide.grConstantColorValueExt(TDFX_TMU0 + unit, + fxMesa->TexCombineExt[unit].EnvColor); } } else { @@ -534,13 +538,13 @@ int unit; for (unit = 0; unit < TDFX_NUM_TMU; unit++) { struct tdfx_texcombine *comb = &fxMesa->TexCombine[unit]; - FX_grTexCombine_NoLock(TDFX_TMU0 + unit, - comb->FunctionRGB, - comb->FactorRGB, - comb->FunctionAlpha, - comb->FactorAlpha, - comb->InvertRGB, - comb->InvertAlpha); + fxMesa->Glide.grTexCombine(TDFX_TMU0 + unit, + comb->FunctionRGB, + comb->FactorRGB, + comb->FunctionAlpha, + comb->FactorAlpha, + comb->InvertRGB, + comb->InvertAlpha); } } } @@ -558,10 +562,10 @@ printf(" mipmap %x %x\n", env->mmMode, env->LODblend); printf(" lod bias %f\n", env->LodBias); */ - FX_grTexClampMode_NoLock(GR_TMU0 + unit, p->sClamp, p->tClamp); - FX_grTexFilterMode_NoLock(GR_TMU0 + unit, p->minFilt, p->magFilt); - FX_grTexMipMapMode_NoLock(GR_TMU0 + unit, p->mmMode, p->LODblend); - FX_grTexLodBiasValue_NoLock(GR_TMU0 + unit, p->LodBias); + fxMesa->Glide.grTexClampMode(GR_TMU0 + unit, p->sClamp, p->tClamp); + fxMesa->Glide.grTexFilterMode(GR_TMU0 + unit, p->minFilt, p->magFilt); + fxMesa->Glide.grTexMipMapMode(GR_TMU0 + unit, p->mmMode, p->LODblend); + fxMesa->Glide.grTexLodBiasValue(GR_TMU0 + unit, p->LodBias); } } @@ -581,10 +585,10 @@ src->Info->aspectRatioLog2, src->Info->format, src->Info->data); */ - FX_grTexSource_NoLock(GR_TMU0 + unit, - src->StartAddress, - src->EvenOdd, - src->Info); + fxMesa->Glide.grTexSource(GR_TMU0 + unit, + src->StartAddress, + src->EvenOdd, + src->Info); } } } @@ -623,18 +627,18 @@ if (fxMesa->numClipRects == 0) { /* all drawing clipped away */ - grClipWindow(0, 0, 0, 0); + fxMesa->Glide.grClipWindow(0, 0, 0, 0); } else if (fxMesa->numClipRects == 1) { - grClipWindow(fxMesa->pClipRects[0].x1, + fxMesa->Glide.grClipWindow(fxMesa->pClipRects[0].x1, fxMesa->screen_height - fxMesa->pClipRects[0].y2, fxMesa->pClipRects[0].x2, fxMesa->screen_height - fxMesa->pClipRects[0].y1); } /* else, we'll do a cliprect loop around all drawing */ - grDRIPosition( dPriv->x, dPriv->y, dPriv->w, dPriv->h, - fxMesa->numClipRects, fxMesa->pClipRects ); + fxMesa->Glide.grDRIPosition( dPriv->x, dPriv->y, dPriv->w, dPriv->h, + fxMesa->numClipRects, fxMesa->pClipRects ); } @@ -645,7 +649,7 @@ if ( fxMesa->dirty & TDFX_UPLOAD_COLOR_COMBINE ) { if (TDFX_IS_NAPALM(fxMesa)) { - (*grColorCombineExtProc)(fxMesa->ColorCombineExt.SourceA, + fxMesa->Glide.grColorCombineExt(fxMesa->ColorCombineExt.SourceA, fxMesa->ColorCombineExt.ModeA, fxMesa->ColorCombineExt.SourceB, fxMesa->ColorCombineExt.ModeB, @@ -658,111 +662,113 @@ } else { /* Voodoo 3 */ - grColorCombine( fxMesa->ColorCombine.Function, - fxMesa->ColorCombine.Factor, - fxMesa->ColorCombine.Local, - fxMesa->ColorCombine.Other, - fxMesa->ColorCombine.Invert ); + fxMesa->Glide.grColorCombine(fxMesa->ColorCombine.Function, + fxMesa->ColorCombine.Factor, + fxMesa->ColorCombine.Local, + fxMesa->ColorCombine.Other, + fxMesa->ColorCombine.Invert); } fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_COMBINE; } if ( fxMesa->dirty & TDFX_UPLOAD_ALPHA_COMBINE ) { if (TDFX_IS_NAPALM(fxMesa)) { - (*grAlphaCombineExtProc)(fxMesa->AlphaCombineExt.SourceA, - fxMesa->AlphaCombineExt.ModeA, - fxMesa->AlphaCombineExt.SourceB, - fxMesa->AlphaCombineExt.ModeB, - fxMesa->AlphaCombineExt.SourceC, - fxMesa->AlphaCombineExt.InvertC, - fxMesa->AlphaCombineExt.SourceD, - fxMesa->AlphaCombineExt.InvertD, - fxMesa->AlphaCombineExt.Shift, - fxMesa->AlphaCombineExt.Invert); + fxMesa->Glide.grAlphaCombineExt(fxMesa->AlphaCombineExt.SourceA, + fxMesa->AlphaCombineExt.ModeA, + fxMesa->AlphaCombineExt.SourceB, + fxMesa->AlphaCombineExt.ModeB, + fxMesa->AlphaCombineExt.SourceC, + fxMesa->AlphaCombineExt.InvertC, + fxMesa->AlphaCombineExt.SourceD, + fxMesa->AlphaCombineExt.InvertD, + fxMesa->AlphaCombineExt.Shift, + fxMesa->AlphaCombineExt.Invert); } else { /* Voodoo 3 */ - grAlphaCombine( fxMesa->AlphaCombine.Function, - fxMesa->AlphaCombine.Factor, - fxMesa->AlphaCombine.Local, - fxMesa->AlphaCombine.Other, - fxMesa->AlphaCombine.Invert ); + fxMesa->Glide.grAlphaCombine( fxMesa->AlphaCombine.Function, + fxMesa->AlphaCombine.Factor, + fxMesa->AlphaCombine.Local, + fxMesa->AlphaCombine.Other, + fxMesa->AlphaCombine.Invert ); } fxMesa->dirty &= ~TDFX_UPLOAD_ALPHA_COMBINE; } if ( fxMesa->dirty & TDFX_UPLOAD_RENDER_BUFFER ) { - grRenderBuffer( fxMesa->DrawBuffer ); + fxMesa->Glide.grRenderBuffer( fxMesa->DrawBuffer ); fxMesa->dirty &= ~TDFX_UPLOAD_RENDER_BUFFER; } +#if defined(__linux__) || defined(__FreeBSD__) if ( fxMesa->dirty & TDFX_UPLOAD_STIPPLE) { - grStipplePattern( fxMesa->Stipple.Pattern ); - grStippleMode( fxMesa->Stipple.Mode ); + fxMesa->Glide.grStipplePattern( fxMesa->Stipple.Pattern ); + fxMesa->Glide.grStippleMode( fxMesa->Stipple.Mode ); fxMesa->dirty &= ~TDFX_UPLOAD_STIPPLE; } +#endif /* __linux__ || __FreeBSD__ */ if ( fxMesa->dirty & TDFX_UPLOAD_ALPHA_TEST ) { - grAlphaTestFunction( fxMesa->Color.AlphaFunc ); + fxMesa->Glide.grAlphaTestFunction( fxMesa->Color.AlphaFunc ); fxMesa->dirty &= ~TDFX_UPLOAD_ALPHA_TEST; } if ( fxMesa->dirty & TDFX_UPLOAD_ALPHA_REF ) { - grAlphaTestReferenceValue( fxMesa->Color.AlphaRef ); + fxMesa->Glide.grAlphaTestReferenceValue( fxMesa->Color.AlphaRef ); fxMesa->dirty &= ~TDFX_UPLOAD_ALPHA_REF; } if ( fxMesa->dirty & TDFX_UPLOAD_BLEND_FUNC ) { - if (grAlphaBlendFunctionExtProc) { - (*grAlphaBlendFunctionExtProc)( fxMesa->Color.BlendSrcRGB, - fxMesa->Color.BlendDstRGB, - GR_BLEND_OP_ADD, - fxMesa->Color.BlendSrcA, - fxMesa->Color.BlendDstA, - GR_BLEND_OP_ADD ); + if (fxMesa->Glide.grAlphaBlendFunctionExt) { + fxMesa->Glide.grAlphaBlendFunctionExt( fxMesa->Color.BlendSrcRGB, + fxMesa->Color.BlendDstRGB, + GR_BLEND_OP_ADD, + fxMesa->Color.BlendSrcA, + fxMesa->Color.BlendDstA, + GR_BLEND_OP_ADD ); } else { - grAlphaBlendFunction( fxMesa->Color.BlendSrcRGB, - fxMesa->Color.BlendDstRGB, - fxMesa->Color.BlendSrcA, - fxMesa->Color.BlendDstA ); + fxMesa->Glide.grAlphaBlendFunction( fxMesa->Color.BlendSrcRGB, + fxMesa->Color.BlendDstRGB, + fxMesa->Color.BlendSrcA, + fxMesa->Color.BlendDstA ); } fxMesa->dirty &= ~TDFX_UPLOAD_BLEND_FUNC; } if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_MODE ) { - grDepthBufferMode( fxMesa->Depth.Mode ); + fxMesa->Glide.grDepthBufferMode( fxMesa->Depth.Mode ); fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_MODE; } if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_BIAS ) { - grDepthBiasLevel( fxMesa->Depth.Bias ); + fxMesa->Glide.grDepthBiasLevel( fxMesa->Depth.Bias ); fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_BIAS; } if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_FUNC ) { - grDepthBufferFunction( fxMesa->Depth.Func ); + fxMesa->Glide.grDepthBufferFunction( fxMesa->Depth.Func ); fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_FUNC; } if ( fxMesa->dirty & TDFX_UPLOAD_DEPTH_MASK ) { - grDepthMask( fxMesa->Depth.Mask ); + fxMesa->Glide.grDepthMask( fxMesa->Depth.Mask ); fxMesa->dirty &= ~TDFX_UPLOAD_DEPTH_MASK; } if ( fxMesa->dirty & TDFX_UPLOAD_DITHER) { - grDitherMode( fxMesa->Color.Dither ); + fxMesa->Glide.grDitherMode( fxMesa->Color.Dither ); } if ( fxMesa->dirty & TDFX_UPLOAD_FOG_MODE ) { - grFogMode( fxMesa->Fog.Mode ); + fxMesa->Glide.grFogMode( fxMesa->Fog.Mode ); fxMesa->dirty &= ~TDFX_UPLOAD_FOG_MODE; } if ( fxMesa->dirty & TDFX_UPLOAD_FOG_COLOR ) { - grFogColorValue( fxMesa->Fog.Color ); + fxMesa->Glide.grFogColorValue( fxMesa->Fog.Color ); fxMesa->dirty &= ~TDFX_UPLOAD_FOG_COLOR; } if ( fxMesa->dirty & TDFX_UPLOAD_FOG_TABLE ) { - grFogTable( fxMesa->Fog.Table ); + fxMesa->Glide.grFogTable( fxMesa->Fog.Table ); fxMesa->dirty &= ~TDFX_UPLOAD_FOG_TABLE; } if ( fxMesa->dirty & TDFX_UPLOAD_CULL ) { - grCullMode( fxMesa->CullMode ); + fxMesa->Glide.grCullMode( fxMesa->CullMode ); fxMesa->dirty &= ~TDFX_UPLOAD_CULL; } @@ -772,52 +778,53 @@ } if ( fxMesa->dirty & TDFX_UPLOAD_COLOR_MASK ) { - if ( grColorMaskExtProc && fxMesa->glCtx->Visual->RedBits == 8) { - grColorMaskExtProc( fxMesa->Color.ColorMask[RCOMP], - fxMesa->Color.ColorMask[GCOMP], - fxMesa->Color.ColorMask[BCOMP], - fxMesa->Color.ColorMask[ACOMP] ); + if ( fxMesa->Glide.grColorMaskExt + && fxMesa->glCtx->Visual->RedBits == 8) { + fxMesa->Glide.grColorMaskExt( fxMesa->Color.ColorMask[RCOMP], + fxMesa->Color.ColorMask[GCOMP], + fxMesa->Color.ColorMask[BCOMP], + fxMesa->Color.ColorMask[ACOMP] ); } else { - grColorMask( fxMesa->Color.ColorMask[RCOMP] || - fxMesa->Color.ColorMask[GCOMP] || - fxMesa->Color.ColorMask[BCOMP], - fxMesa->Color.ColorMask[ACOMP] ); + fxMesa->Glide.grColorMask( fxMesa->Color.ColorMask[RCOMP] || + fxMesa->Color.ColorMask[GCOMP] || + fxMesa->Color.ColorMask[BCOMP], + fxMesa->Color.ColorMask[ACOMP] ); } fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_MASK; } if ( fxMesa->dirty & TDFX_UPLOAD_CONSTANT_COLOR ) { - grConstantColorValue( fxMesa->Color.MonoColor ); + fxMesa->Glide.grConstantColorValue( fxMesa->Color.MonoColor ); fxMesa->dirty &= ~TDFX_UPLOAD_CONSTANT_COLOR; } if ( fxMesa->dirty & TDFX_UPLOAD_LINE ) { if (fxMesa->glCtx->Line.SmoothFlag && fxMesa->glCtx->Line.Width == 1.0) - grEnable(GR_AA_ORDERED); + fxMesa->Glide.grEnable(GR_AA_ORDERED); else - grDisable(GR_AA_ORDERED); + fxMesa->Glide.grDisable(GR_AA_ORDERED); fxMesa->dirty &= ~TDFX_UPLOAD_LINE; } if ( fxMesa->dirty & TDFX_UPLOAD_STENCIL ) { if (fxMesa->glCtx->Stencil.Enabled) { - grEnable(GR_STENCIL_MODE_EXT); - FX_grStencilOp_NoLock(fxMesa->Stencil.FailFunc, - fxMesa->Stencil.ZFailFunc, - fxMesa->Stencil.ZPassFunc); - FX_grStencilFunc_NoLock(fxMesa->Stencil.Function, - fxMesa->Stencil.RefValue, - fxMesa->Stencil.ValueMask); - FX_grStencilMask_NoLock(fxMesa->Stencil.WriteMask); + fxMesa->Glide.grEnable(GR_STENCIL_MODE_EXT); + fxMesa->Glide.grStencilOp(fxMesa->Stencil.FailFunc, + fxMesa->Stencil.ZFailFunc, + fxMesa->Stencil.ZPassFunc); + fxMesa->Glide.grStencilFunc(fxMesa->Stencil.Function, + fxMesa->Stencil.RefValue, + fxMesa->Stencil.ValueMask); + fxMesa->Glide.grStencilMask(fxMesa->Stencil.WriteMask); } else { - grDisable(GR_STENCIL_MODE_EXT); + fxMesa->Glide.grDisable(GR_STENCIL_MODE_EXT); } fxMesa->dirty &= ~TDFX_UPLOAD_STENCIL; } if ( fxMesa->dirty & TDFX_UPLOAD_VERTEX_LAYOUT ) { - grGlideSetVertexLayout( fxMesa->layout[fxMesa->vertexFormat] ); + fxMesa->Glide.grGlideSetVertexLayout( fxMesa->layout[fxMesa->vertexFormat] ); fxMesa->dirty &= ~TDFX_UPLOAD_VERTEX_LAYOUT; } @@ -833,7 +840,7 @@ if ( fxMesa->dirty & TDFX_UPLOAD_TEXTURE_PALETTE ) { if (fxMesa->TexPalette.Data) { - grTexDownloadTable(fxMesa->TexPalette.Type, fxMesa->TexPalette.Data); + fxMesa->Glide.grTexDownloadTable(fxMesa->TexPalette.Type, fxMesa->TexPalette.Data); } fxMesa->dirty &= ~TDFX_UPLOAD_TEXTURE_PALETTE; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_screen.c,v 1.2 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -88,8 +88,9 @@ tdfxDDTriangleFuncsInit(); tdfxDDFastPathInit(); + /*** tdfxDDGlideExtensionsInit(); - + **/ return GL_TRUE; } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_span.c,v 1.3 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -83,12 +83,12 @@ UNLOCK_HARDWARE( fxMesa ); \ LOCK_HARDWARE( fxMesa ); \ info.size = sizeof(GrLfbInfo_t); \ - if ( grLfbLock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer, LFB_MODE, \ - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ + if ( fxMesa->Glide.grLfbLock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer, \ + LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ { #define HW_WRITE_UNLOCK() \ - grLfbUnlock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer ); \ + fxMesa->Glide.grLfbUnlock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer );\ } @@ -99,12 +99,12 @@ UNLOCK_HARDWARE( fxMesa ); \ LOCK_HARDWARE( fxMesa ); \ info.size = sizeof(GrLfbInfo_t); \ - if ( grLfbLock( GR_LFB_READ_ONLY, fxMesa->ReadBuffer, LFB_MODE, \ - GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ + if ( fxMesa->Glide.grLfbLock( GR_LFB_READ_ONLY, fxMesa->ReadBuffer, \ + LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) ) \ { #define HW_READ_UNLOCK() \ - grLfbUnlock( GR_LFB_READ_ONLY, fxMesa->ReadBuffer ); \ + fxMesa->Glide.grLfbUnlock( GR_LFB_READ_ONLY, fxMesa->ReadBuffer );\ } @@ -344,10 +344,10 @@ * what's the point after all. */ #define READ_FB_SPAN_LOCK(fxMesa, info, target_buffer) \ - UNLOCK_HARDWARE(fxMesa); \ - LOCK_HARDWARE(fxMesa); \ + UNLOCK_HARDWARE(fxMesa); \ + LOCK_HARDWARE(fxMesa); \ (info).size=sizeof(info); \ - if (grLfbLock(GR_LFB_READ_ONLY, \ + if (fxMesa->Glide.grLfbLock(GR_LFB_READ_ONLY, \ target_buffer, \ GR_LFBWRITEMODE_ANY, \ GR_ORIGIN_UPPER_LEFT, \ @@ -355,9 +355,9 @@ &(info))) { #define READ_FB_SPAN_UNLOCK(fxMesa, target_buffer) \ - grLfbUnlock(GR_LFB_READ_ONLY, target_buffer); \ + fxMesa->Glide.grLfbUnlock(GR_LFB_READ_ONLY, target_buffer); \ } else { \ - fprintf(stderr, "tdfxDriver: Can't get %s (%d) read lock\n", \ + fprintf(stderr, "tdfxDriver: Can't get %s (%d) read lock\n", \ (target_buffer == GR_BUFFER_BACKBUFFER) \ ? "back buffer" \ : ((target_buffer == GR_BUFFER_AUXBUFFER) \ @@ -367,10 +367,10 @@ } #define WRITE_FB_SPAN_LOCK(fxMesa, info, target_buffer, write_mode) \ - UNLOCK_HARDWARE(fxMesa); \ - LOCK_HARDWARE(fxMesa); \ + UNLOCK_HARDWARE(fxMesa); \ + LOCK_HARDWARE(fxMesa); \ info.size=sizeof(info); \ - if (grLfbLock(GR_LFB_WRITE_ONLY, \ + if (fxMesa->Glide.grLfbLock(GR_LFB_WRITE_ONLY, \ target_buffer, \ write_mode, \ GR_ORIGIN_UPPER_LEFT, \ @@ -378,9 +378,9 @@ &info)) { #define WRITE_FB_SPAN_UNLOCK(fxMesa, target_buffer) \ - grLfbUnlock(GR_LFB_WRITE_ONLY, target_buffer); \ + fxMesa->Glide.grLfbUnlock(GR_LFB_WRITE_ONLY, target_buffer); \ } else { \ - fprintf(stderr, "tdfxDriver: Can't get %s (%d) write lock\n", \ + fprintf(stderr, "tdfxDriver: Can't get %s (%d) write lock\n", \ (target_buffer == GR_BUFFER_BACKBUFFER) \ ? "back buffer" \ : ((target_buffer == GR_BUFFER_AUXBUFFER) \ @@ -557,6 +557,10 @@ * it's better in the macro or in the call. * * Recall that x and y are screen coordinates. + * + * Note: ANSI C doesn't allow conditional expressions or cast expressions + * as lvalues. Some of these macros violate that. + * */ #define GET_FB_DATA(ReadParamsp, type, x, y) \ (((x) < (ReadParamsp)->firstWrappedX) \ Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c:1.2 xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c:1.4 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c:1.2 Wed May 2 11:06:04 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c Tue Oct 2 07:44:13 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c,v 1.2 2001/05/02 15:06:04 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_state.c,v 1.4 2001/10/02 11:44:13 alanh Exp $ */ /* * Original rewrite: @@ -547,14 +547,14 @@ { switch( ctx->Fog.Mode ) { case GL_EXP: - guFogGenerateExp( fxMesa->Fog.Table, ctx->Fog.Density ); + fxMesa->Glide.guFogGenerateExp(fxMesa->Fog.Table, ctx->Fog.Density); break; case GL_EXP2: - guFogGenerateExp2( fxMesa->Fog.Table, ctx->Fog.Density ); + fxMesa->Glide.guFogGenerateExp2(fxMesa->Fog.Table, ctx->Fog.Density); break; case GL_LINEAR: - guFogGenerateLinear( fxMesa->Fog.Table, - ctx->Fog.Start, ctx->Fog.End ); + fxMesa->Glide.guFogGenerateLinear(fxMesa->Fog.Table, + ctx->Fog.Start, ctx->Fog.End); break; } @@ -1151,16 +1151,18 @@ tdfxUpdateCull(ctx); if ( fxMesa->dirty & TDFX_UPLOAD_CULL ) { - grCullMode( fxMesa->CullMode ); + fxMesa->Glide.grCullMode( fxMesa->CullMode ); fxMesa->dirty &= ~TDFX_UPLOAD_CULL; } +#if defined(__linux__) || defined(__FreeBSD__) tdfxUpdateStipple(ctx); if ( fxMesa->dirty & TDFX_UPLOAD_STIPPLE ) { - grStipplePattern ( fxMesa->Stipple.Pattern ); - grStippleMode ( fxMesa->Stipple.Mode ); + fxMesa->Glide.grStipplePattern ( fxMesa->Stipple.Pattern ); + fxMesa->Glide.grStippleMode ( fxMesa->Stipple.Mode ); fxMesa->dirty &= ~TDFX_UPLOAD_STIPPLE; } +#endif /* __linux__ || __FreeBSD__ */ } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c:1.1.2.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c:1.1.2.1 Tue May 22 17:25:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c,v 1.1.2.1 2001/05/22 21:25:41 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tex.c,v 1.3 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -517,7 +517,7 @@ image->rescaled.height = dstHeight; image->rescaled.size = size; - _mesa_rescale_teximage2d( texFormat, + _mesa_rescale_teximage2d( texFormat->TexelBytes, texImage->Width, texImage->Height, dstWidth, dstHeight, image->original.data, image->rescaled.data ); @@ -582,7 +582,7 @@ */ if ( image->wScale > 1 || image->hScale > 1 ) { assert( image->rescaled.data ); - _mesa_rescale_teximage2d( texImage->TexFormat, + _mesa_rescale_teximage2d( texImage->TexFormat->TexelBytes, image->original.width, image->original.height, image->rescaled.width, image->rescaled.height, image->original.data, image->rescaled.data ); @@ -982,12 +982,12 @@ /* determine where texture will reside */ if (t->LODblend && !tss->umaTexMemory) { /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ - memNeeded = FX_grTexTextureMemRequired_NoLock( + memNeeded = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &(t->info)); } else { /* XXX GR_MIPMAPLEVELMASK_BOTH might not be right, but works */ - memNeeded = FX_grTexTextureMemRequired_NoLock( + memNeeded = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &(t->info)); } /* Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c:1.2.2.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c:1.4 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c:1.2.2.1 Tue May 22 17:25:41 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c,v 1.2.2.1 2001/05/22 21:25:41 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c,v 1.4 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -258,17 +258,17 @@ LOCK_HARDWARE( fxMesa ); - extensions = grGetString( GR_EXTENSION ); + extensions = fxMesa->Glide.grGetString( GR_EXTENSION ); if ( strstr( extensions, " TEXUMA " ) ) { FxU32 start, end; tss->umaTexMemory = GL_TRUE; - grEnable( GR_TEXTURE_UMA_EXT ); + fxMesa->Glide.grEnable( GR_TEXTURE_UMA_EXT ); - start = grTexMinAddress( 0 ); - end = grTexMaxAddress( 0 ); + start = fxMesa->Glide.grTexMinAddress( 0 ); + end = fxMesa->Glide.grTexMaxAddress( 0 ); if ( TDFX_DEBUG & DEBUG_VERBOSE_TEXTURE ) fprintf( stderr, " UMA tex memory: %d\n", (int)(end - start) ); @@ -287,8 +287,8 @@ for ( unit = 0 ; unit < fxMesa->numTMUs ; unit++ ) { FxU32 start, end; - start = grTexMinAddress( unit ); - end = grTexMaxAddress( unit ); + start = fxMesa->Glide.grTexMinAddress( unit ); + end = fxMesa->Glide.grTexMaxAddress( unit ); tss->totalTexMem[unit] = end - start; tss->freeTexMem[unit] = end - start; @@ -596,7 +596,7 @@ for ( l = t->minLevel ; l <= t->maxLevel && t->image[l].data ; l++ ) { GrLOD_t glideLod = t->info.largeLodLog2 - l + tObj->BaseLevel; - grTexDownloadMipMapLevel( targetTMU, + fxMesa->Glide.grTexDownloadMipMapLevel( targetTMU, t->range[targetTMU]->startAddr, glideLod, t->info.largeLodLog2, @@ -613,7 +613,7 @@ for ( l = t->minLevel ; l <= t->maxLevel && t->image[l].data ; l++ ) { GrLOD_t glideLod = t->info.largeLodLog2 - l + tObj->BaseLevel; - grTexDownloadMipMapLevel( GR_TMU0, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU0, t->range[TDFX_TMU0]->startAddr, glideLod, t->info.largeLodLog2, @@ -622,7 +622,7 @@ GR_MIPMAPLEVELMASK_ODD, t->image[l].data ); - grTexDownloadMipMapLevel( GR_TMU1, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU1, t->range[TDFX_TMU1]->startAddr, glideLod, t->info.largeLodLog2, @@ -639,7 +639,7 @@ for ( l = t->minLevel ; l <= t->maxLevel && t->image[l].data ; l++ ) { GrLOD_t glideLod = t->info.largeLodLog2 - l + tObj->BaseLevel; - grTexDownloadMipMapLevel( GR_TMU0, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU0, t->range[TDFX_TMU0]->startAddr, glideLod, t->info.largeLodLog2, @@ -648,7 +648,7 @@ GR_MIPMAPLEVELMASK_BOTH, t->image[l].data ); - grTexDownloadMipMapLevel( GR_TMU1, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU1, t->range[TDFX_TMU1]->startAddr, glideLod, t->info.largeLodLog2, @@ -671,6 +671,7 @@ struct gl_texture_object *tObj, GLint level ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); tdfxTexObjPtr t = TDFX_TEXTURE_DATA(tObj); GrLOD_t glideLod; FxU32 unit; @@ -683,7 +684,7 @@ switch ( unit ) { case TDFX_TMU0: case TDFX_TMU1: - grTexDownloadMipMapLevel( unit, + fxMesa->Glide.grTexDownloadMipMapLevel( unit, t->range[unit]->startAddr, glideLod, t->info.largeLodLog2, @@ -694,7 +695,7 @@ break; case TDFX_TMU_SPLIT: - grTexDownloadMipMapLevel( GR_TMU0, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU0, t->range[GR_TMU0]->startAddr, glideLod, t->info.largeLodLog2, @@ -703,7 +704,7 @@ GR_MIPMAPLEVELMASK_ODD, t->image[level].data ); - grTexDownloadMipMapLevel( GR_TMU1, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU1, t->range[GR_TMU1]->startAddr, glideLod, t->info.largeLodLog2, @@ -714,7 +715,7 @@ break; case TDFX_TMU_BOTH: - grTexDownloadMipMapLevel( GR_TMU0, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU0, t->range[GR_TMU0]->startAddr, glideLod, t->info.largeLodLog2, @@ -723,7 +724,7 @@ GR_MIPMAPLEVELMASK_BOTH, t->image[level].data ); - grTexDownloadMipMapLevel( GR_TMU1, + fxMesa->Glide.grTexDownloadMipMapLevel( GR_TMU1, t->range[GR_TMU1]->startAddr, glideLod, t->info.largeLodLog2, @@ -769,27 +770,27 @@ switch ( targetTMU ) { case TDFX_TMU0: case TDFX_TMU1: - size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); + size = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); t->range[targetTMU] = tdfxTMAllocTexMem(fxMesa, targetTMU, size); break; case TDFX_TMU_SPLIT: - size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_ODD, &t->info ); + size = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_ODD, &t->info ); t->range[TDFX_TMU0] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU0, size ); if ( t->range[TDFX_TMU0] ) fxMesa->stats.memTexUpload += size; - size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_EVEN, &t->info ); + size = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_EVEN, &t->info ); t->range[TDFX_TMU1] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU1, size ); break; case TDFX_TMU_BOTH: - size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); + size = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); t->range[TDFX_TMU0] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU0, size ); if ( t->range[TDFX_TMU0] ) fxMesa->stats.memTexUpload += size; - size = grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); + size = fxMesa->Glide.grTexTextureMemRequired( GR_MIPMAPLEVELMASK_BOTH, &t->info ); t->range[TDFX_TMU1] = tdfxTMAllocTexMem( fxMesa, TDFX_TMU1, size ); break; Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.c,v 1.2 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -149,8 +149,8 @@ fxVB[i].v.x += PNT_X_OFFSET - TRI_X_OFFSET; fxVB[i].v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; } - grDrawVertexArrayContiguous( GR_POINTS, count-start, fxVB+start, - sizeof(*fxVB)); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_POINTS, count-start, + fxVB+start, sizeof(*fxVB)); /* restore point coords */ for (i = start; i < count; i++) { fxVB[i].v.x -= PNT_X_OFFSET - TRI_X_OFFSET; @@ -163,6 +163,7 @@ GLuint count, GLuint parity ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; GLint i; (void) parity; @@ -171,8 +172,8 @@ fxVB[i].v.x += LINE_X_OFFSET - TRI_X_OFFSET; fxVB[i].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; } - grDrawVertexArrayContiguous( GR_LINE_STRIP, count-start, fxVB+start, - sizeof(*fxVB)); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_LINE_STRIP, count-start, + fxVB+start, sizeof(*fxVB)); /* restore line coords */ for (i = start; i < count; i++) { fxVB[i].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; @@ -185,6 +186,7 @@ GLuint count, GLuint parity ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; GLint i; (void) parity; @@ -193,8 +195,8 @@ fxVB[i].v.x += LINE_X_OFFSET - TRI_X_OFFSET; fxVB[i].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; } - grDrawVertexArrayContiguous( GR_LINES, count-start, fxVB+start, - sizeof(*fxVB)); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_LINES, count-start, + fxVB+start, sizeof(*fxVB)); /* restore line coords */ for (i = start; i < count; i++) { fxVB[i].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; @@ -207,9 +209,10 @@ GLuint count, GLuint parity ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; - grDrawVertexArrayContiguous( GR_TRIANGLES, count-start, fxVB+start, - sizeof(*fxVB)); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLES, count-start, + fxVB+start, sizeof(*fxVB)); (void) parity; } @@ -219,9 +222,10 @@ GLuint count, GLuint parity ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; - grDrawVertexArrayContiguous( GR_TRIANGLE_STRIP, count-start, fxVB+start, - sizeof(*fxVB)); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_STRIP, count-start, + fxVB+start, sizeof(*fxVB)); (void) parity; } @@ -231,9 +235,10 @@ GLuint count, GLuint parity ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; - grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, count-start, fxVB+start, - sizeof(*fxVB) ); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, count-start, + fxVB+start, sizeof(*fxVB) ); (void) parity; } @@ -243,9 +248,10 @@ GLuint count, GLuint parity ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(VB->ctx); tdfxVertexPtr fxVB = TDFX_DRIVER_DATA(VB)->verts; - grDrawVertexArrayContiguous( GR_POLYGON, count-start, fxVB+start, - sizeof(*fxVB)); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_POLYGON, count-start, + fxVB+start, sizeof(*fxVB)); (void) parity; } @@ -256,7 +262,7 @@ for (i = start ; i < count ; i++) { \ v[elt[i]].v.x += PNT_X_OFFSET - TRI_X_OFFSET; \ v[elt[i]].v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; \ - grDrawPoint(&v[elt[i]]); \ + fxMesa->Glide.grDrawPoint(&v[elt[i]]); \ v[elt[i]].v.x -= PNT_X_OFFSET - TRI_X_OFFSET; \ v[elt[i]].v.y -= PNT_Y_OFFSET - TRI_Y_OFFSET; \ } \ @@ -268,7 +274,7 @@ v[elt[i0]].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; \ v[elt[i1]].v.x += LINE_X_OFFSET - TRI_X_OFFSET; \ v[elt[i1]].v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; \ - grDrawLine( &v[elt[i0]], &v[elt[i1]] ); \ + fxMesa->Glide.grDrawLine( &v[elt[i0]], &v[elt[i1]] );\ v[elt[i0]].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; \ v[elt[i0]].v.y -= LINE_Y_OFFSET - TRI_Y_OFFSET; \ v[elt[i1]].v.x -= LINE_X_OFFSET - TRI_X_OFFSET; \ @@ -277,19 +283,20 @@ #define RENDER_TRI( i2, i1, i, pv, parity ) \ do { \ - if (parity) grDrawTriangle( &v[elt[i1]], &v[elt[i2]], &v[elt[i]] ); \ - else grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ + if (parity) fxMesa->Glide.grDrawTriangle( &v[elt[i1]], &v[elt[i2]], &v[elt[i]] ); \ + else fxMesa->Glide.grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ } while (0) #define RENDER_QUAD( i3, i2, i1, i, pv ) \ do { \ - grDrawTriangle( &v[elt[i3]], &v[elt[i2]], &v[elt[i]] ); \ - grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ + fxMesa->Glide.grDrawTriangle( &v[elt[i3]], &v[elt[i2]], &v[elt[i]] ); \ + fxMesa->Glide.grDrawTriangle( &v[elt[i2]], &v[elt[i1]], &v[elt[i]] ); \ } while (0) #define LOCAL_VARS \ GLcontext *ctx = VB->ctx; \ + tdfxContextPtr fxMesa = TDFX_CONTEXT( ctx ); \ const GLuint *elt = VB->EltPtr->data; \ tdfxVertexPtr v = TDFX_DRIVER_DATA(VB)->verts; \ (void) v; (void) ctx; Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tris.h,v 1.2 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -61,7 +61,7 @@ tdfxVertex *v1, tdfxVertex *v2 ) { - grDrawTriangle( v0, v1, v2 ); + fxMesa->Glide.grDrawTriangle( v0, v1, v2 ); } @@ -75,7 +75,7 @@ GLfloat x = tmp->v.x, y = tmp->v.y; tmp->v.x += PNT_X_OFFSET - TRI_X_OFFSET; tmp->v.y += PNT_Y_OFFSET - TRI_Y_OFFSET; - grDrawPoint( tmp ); + fxMesa->Glide.grDrawPoint( tmp ); tmp->v.x = x; tmp->v.y = y; } @@ -103,8 +103,8 @@ verts[3].v.x = xLeft; verts[3].v.y = yTop; - grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, 4, verts, - sizeof(tdfxVertex) ); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, 4, verts, + sizeof(tdfxVertex) ); } } @@ -124,7 +124,7 @@ tmp0->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; tmp1->v.x += LINE_X_OFFSET - TRI_X_OFFSET; tmp1->v.y += LINE_Y_OFFSET - TRI_Y_OFFSET; - grDrawLine(tmp0, tmp1); + fxMesa->Glide.grDrawLine(tmp0, tmp1); tmp0->v.x = x0; tmp0->v.y = y0; tmp1->v.x = x1; @@ -163,8 +163,8 @@ verts[3].v.x = tmp1->v.x - ix; verts[3].v.y = tmp1->v.y - iy; - grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, 4, verts, - sizeof(tdfxVertex) ); + fxMesa->Glide.grDrawVertexArrayContiguous( GR_TRIANGLE_FAN, 4, verts, + sizeof(tdfxVertex) ); } } Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_tritmp.h,v 1.2 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -39,6 +39,7 @@ GLuint e0, GLuint e1, GLuint e2, GLuint pv ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); struct vertex_buffer *VB = ctx->VB; tdfxVertexPtr fxverts = TDFX_DRIVER_DATA(VB)->verts; tdfxVertex *v[3]; @@ -52,10 +53,6 @@ GLuint c[3]; #endif -#if (IND & TDFX_CLIPRECT_BIT) - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); -#endif - v[0] = &fxverts[e0]; v[1] = &fxverts[e1]; v[2] = &fxverts[e2]; @@ -126,10 +123,10 @@ #if (IND & TDFX_CLIPRECT_BIT) BEGIN_CLIP_LOOP_LOCKED( fxMesa ); - grDrawTriangle( v[0], v[1], v[2] ); + fxMesa->Glide.grDrawTriangle( v[0], v[1], v[2] ); END_CLIP_LOOP_LOCKED( fxMesa ); #else - grDrawTriangle( v[0], v[1], v[2] ); + fxMesa->Glide.grDrawTriangle( v[0], v[1], v[2] ); #endif #if (IND & TDFX_OFFSET_BIT) @@ -152,6 +149,7 @@ GLuint e1, GLuint e2, GLuint e3, GLuint pv ) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); struct vertex_buffer *VB = ctx->VB; tdfxVertexPtr fxverts = TDFX_DRIVER_DATA(VB)->verts; tdfxVertex *v[4]; @@ -165,11 +163,6 @@ GLuint c[4]; #endif -#if (IND & TDFX_CLIPRECT_BIT) - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); -#endif - - v[0] = &fxverts[e0]; v[1] = &fxverts[e1]; v[2] = &fxverts[e2]; @@ -253,13 +246,13 @@ #if (IND & TDFX_CLIPRECT_BIT) BEGIN_CLIP_LOOP_LOCKED( fxMesa ); /* grDrawVertexArray( GR_TRIANGLE_FAN, 4, v ); */ - grDrawTriangle( v[0], v[1], v[3] ); - grDrawTriangle( v[1], v[2], v[3] ); + fxMesa->Glide.grDrawTriangle( v[0], v[1], v[3] ); + fxMesa->Glide.grDrawTriangle( v[1], v[2], v[3] ); END_CLIP_LOOP_LOCKED( fxMesa ); #else /* grDrawVertexArray( GR_TRIANGLE_FAN, 4, v ); */ - grDrawTriangle( v[0], v[1], v[3] ); - grDrawTriangle( v[1], v[2], v[3] ); + fxMesa->Glide.grDrawTriangle( v[0], v[1], v[3] ); + fxMesa->Glide.grDrawTriangle( v[1], v[2], v[3] ); #endif #if (IND & TDFX_OFFSET_BIT) Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c:1.2 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c,v 1.1 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.c,v 1.2 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -42,7 +42,7 @@ FxI32 -FX_grGetInteger_NoLock(FxU32 pname) +FX_grGetInteger_NoLock(tdfxContextPtr fxMesa, FxU32 pname) { switch (pname) { case FX_FOG_TABLE_ENTRIES: @@ -56,13 +56,13 @@ { FxI32 result; FxU32 grname = pname; - grGet(grname, 4, &result); + fxMesa->Glide.grGet(grname, 4, &result); return result; } case FX_ZDEPTH_MAX: { FxI32 zvals[2]; - grGet(GR_ZDEPTH_MIN_MAX, 8, zvals); + fxMesa->Glide.grGet(GR_ZDEPTH_MIN_MAX, 8, zvals); return zvals[0]; } default: @@ -80,7 +80,7 @@ { int result; LOCK_HARDWARE(fxMesa); - result = FX_grGetInteger_NoLock(pname); + result = FX_grGetInteger_NoLock(fxMesa, pname); UNLOCK_HARDWARE(fxMesa); return result; } @@ -91,7 +91,7 @@ { const char *s; LOCK_HARDWARE(fxMesa); - s = grGetString(pname); + s = fxMesa->Glide.grGetString(pname); UNLOCK_HARDWARE(fxMesa); return s; } @@ -108,13 +108,13 @@ LOCK_HARDWARE(fxMesa); if (ctx->Visual->RedBits == 8) { /* 32bpp mode */ - ASSERT( grColorMaskExtProc ); - grColorMaskExtProc(r, g, b, a); + ASSERT( fxMesa->Glide.grColorMaskExt ); + fxMesa->Glide.grColorMaskExt(r, g, b, a); } else { /* 16 bpp mode */ /* we never have an alpha buffer */ - grColorMask(r || g || b, GL_FALSE); + fxMesa->Glide.grColorMask(r || g || b, GL_FALSE); } UNLOCK_HARDWARE(fxMesa); } @@ -124,15 +124,16 @@ FX_grColorMask_NoLock(GLcontext *ctx, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); if (ctx->Visual->RedBits == 8) { /* 32bpp mode */ - ASSERT( grColorMaskExtProc ); - grColorMaskExtProc(r, g, b, a); + ASSERT( fxMesa->Glide.grColorMaskExt ); + fxMesa->Glide.grColorMaskExt(r, g, b, a); } else { /* 16 bpp mode */ /* we never have an alpha buffer */ - grColorMask(r || g || b, GL_FALSE); + fxMesa->Glide.grColorMask(r || g || b, GL_FALSE); } } @@ -146,14 +147,14 @@ LOCK_HARDWARE(fxMesa); if (ctx->Visual->RedBits == 8) { /* 32bpp mode */ - ASSERT( grColorMaskExtProc ); - grColorMaskExtProc(rgba[RCOMP], rgba[GCOMP], + ASSERT( fxMesa->Glide.grColorMaskExt ); + fxMesa->Glide.grColorMaskExt(rgba[RCOMP], rgba[GCOMP], rgba[BCOMP], rgba[ACOMP]); } else { /* 16 bpp mode */ /* we never have an alpha buffer */ - grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); + fxMesa->Glide.grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); } UNLOCK_HARDWARE(fxMesa); } @@ -161,16 +162,17 @@ void FX_grColorMaskv_NoLock(GLcontext *ctx, const GLboolean rgba[4]) { + tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); if (ctx->Visual->RedBits == 8) { /* 32bpp mode */ - ASSERT( grColorMaskExtProc ); - grColorMaskExtProc(rgba[RCOMP], rgba[GCOMP], - rgba[BCOMP], rgba[ACOMP]); + ASSERT( fxMesa->Glide.grColorMaskExt ); + fxMesa->Glide.grColorMaskExt(rgba[RCOMP], rgba[GCOMP], + rgba[BCOMP], rgba[ACOMP]); } else { /* 16 bpp mode */ /* we never have an alpha buffer */ - grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); + fxMesa->Glide.grColorMask(rgba[RCOMP] || rgba[GCOMP] || rgba[BCOMP], GL_FALSE); } } @@ -184,7 +186,8 @@ FxBool result; LOCK_HARDWARE(fxMesa); - result = grLfbLock(type, buffer, writeMode, origin, pixelPipeline, info); + result = fxMesa->Glide.grLfbLock(type, buffer, writeMode, + origin, pixelPipeline, info); UNLOCK_HARDWARE(fxMesa); return result; } @@ -195,7 +198,7 @@ FxU32 result; LOCK_HARDWARE(fxMesa); - result = grTexTextureMemRequired(evenOdd, info); + result = fxMesa->Glide.grTexTextureMemRequired(evenOdd, info); UNLOCK_HARDWARE(fxMesa); return result; } @@ -206,7 +209,7 @@ FxU32 result; LOCK_HARDWARE(fxMesa); - result = grTexMinAddress(tmu); + result = fxMesa->Glide.grTexMinAddress(tmu); UNLOCK_HARDWARE(fxMesa); return result; } @@ -217,7 +220,7 @@ FxU32 result; LOCK_HARDWARE(fxMesa); - result = grTexMaxAddress(tmu); + result = fxMesa->Glide.grTexMaxAddress(tmu); UNLOCK_HARDWARE(fxMesa); return result; } @@ -228,7 +231,7 @@ { int result; LOCK_HARDWARE(fxMesa); - grGet(GR_FOG_TABLE_ENTRIES, sizeof(int), (void *) &result); + fxMesa->Glide.grGet(GR_FOG_TABLE_ENTRIES, sizeof(int), (void *) &result); UNLOCK_HARDWARE(fxMesa); return result; } @@ -238,7 +241,7 @@ { int result; LOCK_HARDWARE(fxMesa); - grGet(GR_GLIDE_STATE_SIZE, sizeof(int), (void *) &result); + fxMesa->Glide.grGet(GR_GLIDE_STATE_SIZE, sizeof(int), (void *) &result); UNLOCK_HARDWARE(fxMesa); return result; } @@ -248,7 +251,7 @@ { /* ToDo */ BEGIN_CLIP_LOOP(fxMesa); - grDrawLine(a, b); + fxMesa->Glide.grDrawLine(a, b); END_CLIP_LOOP(fxMesa); } @@ -256,7 +259,7 @@ FX_grAADrawPoint(tdfxContextPtr fxMesa, GrVertex * a) { BEGIN_CLIP_LOOP(fxMesa); - grDrawPoint(a); + fxMesa->Glide.grDrawPoint(a); END_CLIP_LOOP(fxMesa); } @@ -264,7 +267,7 @@ FX_grDrawPolygonVertexList(tdfxContextPtr fxMesa, int n, GrVertex * verts) { BEGIN_CLIP_LOOP(fxMesa); - grDrawVertexArrayContiguous(GR_POLYGON, n, verts, sizeof(GrVertex)); + fxMesa->Glide.grDrawVertexArrayContiguous(GR_POLYGON, n, verts, sizeof(GrVertex)); END_CLIP_LOOP(fxMesa); } @@ -273,17 +276,17 @@ FX_setupGrVertexLayout(tdfxContextPtr fxMesa) { LOCK_HARDWARE(fxMesa); - grReset(GR_VERTEX_PARAMETER); + fxMesa->Glide.grReset(GR_VERTEX_PARAMETER); - grCoordinateSpace(GR_WINDOW_COORDS); - grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + fxMesa->Glide.grCoordinateSpace(GR_WINDOW_COORDS); + fxMesa->Glide.grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_PARGB, GR_VERTEX_PARGB_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); UNLOCK_HARDWARE(fxMesa); } #else /* TDFX_USE_PARGB */ @@ -291,48 +294,54 @@ FX_setupGrVertexLayout(tdfxContextPtr fxMesa) { LOCK_HARDWARE(fxMesa); - grReset(GR_VERTEX_PARAMETER); + fxMesa->Glide.grReset(GR_VERTEX_PARAMETER); - grCoordinateSpace(GR_WINDOW_COORDS); - grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_RGB, GR_VERTEX_R_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_A, GR_VERTEX_A_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + fxMesa->Glide.grCoordinateSpace(GR_WINDOW_COORDS); + fxMesa->Glide.grVertexLayout(GR_PARAM_XY, GR_VERTEX_X_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_RGB, GR_VERTEX_R_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_A, GR_VERTEX_A_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q, GR_VERTEX_OOW_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Z, GR_VERTEX_OOZ_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_ST0, GR_VERTEX_SOW_TMU0_OFFSET << 2, GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, GR_PARAM_DISABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, GR_PARAM_DISABLE); UNLOCK_HARDWARE(fxMesa); } #endif /* TDFX_USE_PARGB */ void -FX_grHints_NoLock(GrHint_t hintType, FxU32 hintMask) +FX_grHints_NoLock(tdfxContextPtr fxMesa, GrHint_t hintType, FxU32 hintMask) { switch (hintType) { case GR_HINT_STWHINT: { if (hintMask & GR_STWHINT_W_DIFF_TMU0) - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, - GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, + GR_VERTEX_OOW_TMU0_OFFSET << 2, + GR_PARAM_ENABLE); else - grVertexLayout(GR_PARAM_Q0, GR_VERTEX_OOW_TMU0_OFFSET << 2, - GR_PARAM_DISABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q0, + GR_VERTEX_OOW_TMU0_OFFSET << 2, + GR_PARAM_DISABLE); if (hintMask & GR_STWHINT_ST_DIFF_TMU1) - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, - GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, + GR_VERTEX_SOW_TMU1_OFFSET << 2, + GR_PARAM_ENABLE); else - grVertexLayout(GR_PARAM_ST1, GR_VERTEX_SOW_TMU1_OFFSET << 2, - GR_PARAM_DISABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_ST1, + GR_VERTEX_SOW_TMU1_OFFSET << 2, + GR_PARAM_DISABLE); if (hintMask & GR_STWHINT_W_DIFF_TMU1) - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, - GR_PARAM_ENABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q1, + GR_VERTEX_OOW_TMU1_OFFSET << 2, + GR_PARAM_ENABLE); else - grVertexLayout(GR_PARAM_Q1, GR_VERTEX_OOW_TMU1_OFFSET << 2, - GR_PARAM_DISABLE); + fxMesa->Glide.grVertexLayout(GR_PARAM_Q1, + GR_VERTEX_OOW_TMU1_OFFSET << 2, + GR_PARAM_DISABLE); } } @@ -342,7 +351,7 @@ FX_grHints(tdfxContextPtr fxMesa, GrHint_t hintType, FxU32 hintMask) { LOCK_HARDWARE(fxMesa); - FX_grHints_NoLock(hintType, hintMask); + FX_grHints_NoLock(fxMesa, hintType, hintMask); UNLOCK_HARDWARE(fxMesa); } @@ -358,10 +367,11 @@ { FX_GrContext_t i; LOCK_HARDWARE(fxMesa); - i = grSstWinOpen(hWnd, - screen_resolution, - refresh_rate, - color_format, origin_location, nColBuffers, nAuxBuffers); + i = fxMesa->Glide.grSstWinOpen(hWnd, + screen_resolution, + refresh_rate, + color_format, origin_location, + nColBuffers, nAuxBuffers); /* fprintf(stderr, Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h:1.1 xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h:1.3 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h:1.1 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h Sat Aug 18 07:55:48 2001 @@ -39,13 +39,13 @@ * * See fxapi.h for more revision/author details. */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_wrapper.h,v 1.3 2001/08/18 11:55:48 tsi Exp $ */ - #ifndef __FX_GLIDE_WARPER__ #define __FX_GLIDE_WARPER__ -#include -#include +#include "glide.h" +#include "g3ext.h" typedef struct tdfx_context tdfxContextRec; typedef struct tdfx_context *tdfxContextPtr; @@ -207,7 +207,7 @@ -extern FxI32 FX_grGetInteger_NoLock(FxU32 pname); +extern FxI32 FX_grGetInteger_NoLock(tdfxContextPtr fxMesa, FxU32 pname); extern FxI32 FX_grGetInteger(tdfxContextPtr fxMesa, FxU32 pname); @@ -217,25 +217,25 @@ #define FX_grTexDownloadTable(fxMesa, type, data) \ do { \ LOCK_HARDWARE(fxMesa); \ - grTexDownloadTable(type,data); \ + fxMesa->Glide.grTexDownloadTable(type,data); \ UNLOCK_HARDWARE(fxMesa); \ } while (0); #define FX_grTexDownloadTable_NoLock(type, data) \ - grTexDownloadTable(type, data) + fxMesa->Glide.grTexDownloadTable(type, data) #define FX_grFlush(fxMesa) \ do { \ LOCK_HARDWARE(fxMesa); \ - grFlush(); \ + fxMesa->Glide.grFlush(); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grFinish(fxMesa) \ do { \ - LOCK_HARDWARE(fxMesa); \ - grFinish(); \ + LOCK_HARDWARE(fxMesa); \ + fxMes->Glide.grFinish(); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) @@ -243,7 +243,7 @@ #define FX_grLfbWriteRegion(fxMesa,dst_buffer,dst_x,dst_y,src_format,src_width,src_height,src_stride,src_data) \ do { \ LOCK_HARDWARE(fxMesa); \ - grLfbWriteRegion(dst_buffer,dst_x,dst_y,src_format,src_width,src_height,FXFALSE,src_stride,src_data); \ + fxMesa->Glide.grLfbWriteRegion(dst_buffer,dst_x,dst_y,src_format,src_width,src_height,FXFALSE,src_stride,src_data); \ UNLOCK_HARDWARE(fxMesa); \ } while(0) @@ -251,12 +251,12 @@ #define FX_grLfbReadRegion(fxMesa,src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data) \ do { \ LOCK_HARDWARE(fxMesa); \ - grLfbReadRegion(src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data); \ + fxMesa->Glide.grLfbReadRegion(src_buffer,src_x,src_y,src_width,src_height,dst_stride,dst_data); \ UNLOCK_HARDWARE(fxMesa); \ } while (0); -#define FX_grDrawTriangle_NoLock(a,b,c) grDrawTriangle(a,b,c) +#define FX_grDrawTriangle_NoLock(a,b,c) fxMesa->Glide.grDrawTriangle(a,b,c) #define FX_grDrawTriangle(fxMesa, a,b,c) \ do { \ BEGIN_CLIP_LOOP(fxMesa); \ @@ -266,7 +266,7 @@ -extern void FX_grHints_NoLock(GrHint_t hintType, FxU32 hintMask); +extern void FX_grHints_NoLock(tdfxContextPtr fxMesa, GrHint_t hintType, FxU32 hintMask); extern void FX_grHints(tdfxContextPtr fxMesa, GrHint_t hintType, FxU32 hintMask); @@ -287,7 +287,7 @@ int nColBuffers, int nAuxBuffers); -#define FX_grDrawLine_NoLock(v1, v2) grDrawLine(v1, v2) +#define FX_grDrawLine_NoLock(v1, v2) fxMesa->Glide.grDrawLine(v1, v2) #define FX_grDrawLine(fxMesa, v1, v2) \ do { \ BEGIN_CLIP_LOOP(fxMesa); \ @@ -295,7 +295,7 @@ END_CLIP_LOOP(fxMesa); \ } while (0) -#define FX_grDrawPoint_NoLock(p) grDrawPoint(p) +#define FX_grDrawPoint_NoLock(p) fxMesa->Glide.grDrawPoint(p) #define FX_grDrawPoint(fxMesa, p) \ do { \ BEGIN_CLIP_LOOP(fxMesa); \ @@ -309,92 +309,92 @@ #define FX_grDitherMode(fxMesa, m) \ do { \ LOCK_HARDWARE(fxMesa); \ - grDitherMode(m); \ + fxMesa->Glide.grDitherMode(m); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grRenderBuffer(fxMesa, b) \ do { \ LOCK_HARDWARE(fxMesa); \ - grRenderBuffer(b); \ + fxMesa->Glide.grRenderBuffer(b); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grRenderBuffer_NoLock(b) grRenderBuffer(b) +#define FX_grRenderBuffer_NoLock(b) fxMesa->Glide.grRenderBuffer(b) #define FX_grBufferClear(fxMesa, c, a, d) \ do { \ BEGIN_CLIP_LOOP(fxMesa); \ - grBufferClear(c, a, d); \ + fxMesa->Glide.grBufferClear(c, a, d); \ END_CLIP_LOOP(fxMesa); \ } while (0) -#define FX_grBufferClear_NoLock(c, a, d) grBufferClear(c, a, d) +#define FX_grBufferClear_NoLock(c, a, d) fxMesa->Glide.grBufferClear(c, a, d) -#define FX_grBufferClearExt_NoLock(c, a, d, s) grBufferClearExtProc(c, a, d, s) +#define FX_grBufferClearExt_NoLock(c, a, d, s) fxMesa->Glide.grBufferClearExt(c, a, d, s) #define FX_grBufferClearExt(fxMesa, c, a, d, s) \ do { \ BEGIN_CLIP_LOOP(fxMesa); \ - grBufferClearExtProc(c, a, d, s); \ + fxMesa->Glide.grBufferClearExt(c, a, d, s); \ END_CLIP_LOOP(fxMesa); \ } while (0) #define FX_grEnable(fxMesa, m) \ do { \ LOCK_HARDWARE(fxMesa); \ - grEnable(m); \ + fxMesa->Glide.grEnable(m); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grEnable_NoLock(m) grEnable(m) +#define FX_grEnable_NoLock(m) fxMesa->Glide.grEnable(m) #define FX_grDisable(fxMesa, m) \ do { \ LOCK_HARDWARE(fxMesa); \ - grDisable(m); \ + fxMesa->Glide.grDisable(m); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grDisable_NoLock(m) grDisable(m) +#define FX_grDisable_NoLock(m) fxMesa->Glide.grDisable(m) #define FX_grStencilFunc(fxMesa, fnc, ref, mask) \ do { \ LOCK_HARDWARE(fxMesa); \ - grStencilFuncProc((fnc), (ref), (mask)); \ + fxMesa->Glide.grStencilFunc((fnc), (ref), (mask)); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grStencilFunc_NoLock(f, r, m) grStencilFuncProc(f, r, m) +#define FX_grStencilFunc_NoLock(f, r, m) fxMesa->grStencilFunc(f, r, m) #define FX_grStencilMask(fxMesa, write_mask) \ do { \ LOCK_HARDWARE(fxMesa); \ - grStencilMaskProc(write_mask); \ + fxMesa->Glide.grStencilMask(write_mask); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grStencilMask_NoLock(m) grStencilMaskProc(m) +#define FX_grStencilMask_NoLock(m) fxMesa->Glide.grStencilMask(m) #define FX_grStencilOp(fxMesa, stencil_fail, depth_fail, depth_pass) \ do { \ LOCK_HARDWARE(fxMesa); \ - grStencilOpProc((stencil_fail), (depth_fail), (depth_pass)); \ + fxMesa->Glide.grStencilOp((stencil_fail), (depth_fail), (depth_pass));\ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grStencilOp_NoLock(sf, df, dp) grStencilOpProc(sf, df, dp) +#define FX_grStencilOp_NoLock(sf, df, dp) fxMesa->Glide.grStencilOp(sf, df, dp) #define FX_grDepthMask(fxMesa, m) \ do { \ LOCK_HARDWARE(fxMesa); \ - grDepthMask(m); \ + fxMesa->Glide.grDepthMask(m); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grDepthMask_NoLock(m) grDepthMask(m) +#define FX_grDepthMask_NoLock(m) fxMesa->Glide.grDepthMask(m) extern void FX_grColorMask(GLcontext *ctx, GLboolean r, GLboolean g, @@ -417,156 +417,156 @@ #define FX_grLfbUnlock(fxMesa, t, b) \ do { \ LOCK_HARDWARE(fxMesa); \ - grLfbUnlock(t, b); \ + fxMesa->Glide.grLfbUnlock(t, b); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grConstantColorValue(fxMesa, v) \ do { \ LOCK_HARDWARE(fxMesa); \ - grConstantColorValue(v); \ + fxMesa->Glide.grConstantColorValue(v); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grConstantColorValue_NoLock grConstantColorValue +#define FX_grConstantColorValue_NoLock fxMesa->Glide.grConstantColorValue #define FX_grAADrawTriangle(fxMesa, a, b, c, ab, bc, ca) \ do { \ BEGIN_CLIP_LOOP(fxMesa); \ - grAADrawTriangle(a, b, c, ab, bc, ca); \ + fxMesa->Glide.grAADrawTriangle(a, b, c, ab, bc, ca); \ END_CLIP_LOOP(fxMesa); \ } while (0) #define FX_grAlphaBlendFunction(rs, rd, as, ad) \ do { \ LOCK_HARDWARE(fxMesa); \ - grAlphaBlendFunction(rs, rd, as, ad); \ + fxMesa->Glide.grAlphaBlendFunction(rs, rd, as, ad); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grAlphaCombine(func, fact, loc, oth, inv) \ do { \ LOCK_HARDWARE(fxMesa); \ - grAlphaCombine(func, fact, loc, oth, inv); \ + fxMesa->Glide.grAlphaCombine(func, fact, loc, oth, inv); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grAlphaCombine_NoLock grAlphaCombine +#define FX_grAlphaCombine_NoLock fxMesa->Glide.grAlphaCombine #define FX_grAlphaTestFunction(fxMesa, f) \ do { \ LOCK_HARDWARE(fxMesa); \ - grAlphaTestFunction(f); \ + fxMesa->Glide.grAlphaTestFunction(f); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grAlphaTestReferenceValue(fxMesa, v) \ do { \ LOCK_HARDWARE(fxMesa); \ - grAlphaTestReferenceValue(v); \ + fxMesa->Glide.grAlphaTestReferenceValue(v); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grClipWindow(fxMesa, minx, miny, maxx, maxy) \ do { \ LOCK_HARDWARE(fxMesa); \ - grClipWindow(minx, miny, maxx, maxy); \ + fxMesa->Glide.grClipWindow(minx, miny, maxx, maxy); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grClipWindow_NoLock grClipWindow +#define FX_grClipWindow_NoLock fxMesa->Glide.grClipWindow #define FX_grColorCombine(fxMesa, func, fact, loc, oth, inv) \ do { \ LOCK_HARDWARE(fxMesa); \ - grColorCombine(func, fact, loc, oth, inv); \ + fxMesa->Glide.grColorCombine(func, fact, loc, oth, inv); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grColorCombine_NoLock grColorCombine +#define FX_grColorCombine_NoLock fxMesa->Glide.grColorCombine #define FX_grCullMode(fxMesa, m) \ do { \ LOCK_HARDWARE(fxMesa); \ - grCullMode(m); \ + fxMesa->Glide.grCullMode(m); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grDepthBiasLevel(fxMesa, lev) \ do { \ LOCK_HARDWARE(fxMesa); \ - grDepthBiasLevel(lev); \ + fxMesa->Glide.grDepthBiasLevel(lev); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grDepthBufferFunction(fxMesa, func) \ do { \ LOCK_HARDWARE(fxMesa); \ - grDepthBufferFunction(func); \ + fxMesa->Glide.grDepthBufferFunction(func); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grFogColorValue(fxMesa, c) \ do { \ LOCK_HARDWARE(fxMesa); \ - grFogColorValue(c); \ + fxMesa->Glide.grFogColorValue(c); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grFogMode(fxMesa, m) \ do { \ LOCK_HARDWARE(fxMesa); \ - grFogMode(m); \ + fxMesa->Glide.grFogMode(m); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grFogTable(fxMesa, t)\ do { \ LOCK_HARDWARE(fxMesa); \ - grFogTable(t); \ + fxMesa->Glide.grFogTable(t);\ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grTexClampMode(fxMesa, t, sc, tc) \ do { \ LOCK_HARDWARE(fxMesa); \ - grTexClampMode(t, sc, tc); \ + fxMesa->Glide.grTexClampMode(t, sc, tc); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grTexClampMode_NoLock grTexClampMode +#define FX_grTexClampMode_NoLock fxMesa->Glide.grTexClampMode -#define FX_grTexCombine(fxMesa, t, rfunc, rfact, afunc, afact, rinv, ainv) \ +#define FX_grTexCombine(fxMesa, t, rfunc, rfact, afunc, afact, rinv, ainv)\ do { \ LOCK_HARDWARE(fxMesa); \ - grTexCombine(t, rfunc, rfact, afunc, afact, rinv, ainv); \ + fxMesa->Glide.grTexCombine(t, rfunc, rfact, afunc, afact, rinv, ainv);\ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grTexCombine_NoLock grTexCombine +#define FX_grTexCombine_NoLock fxMesa->Glide.grTexCombine -#define FX_grTexDownloadMipMapLevel(fxMesa, t, sa, tlod, llod, ar, f, eo, d) \ +#define FX_grTexDownloadMipMapLevel(fxMesa, t, sa, tlod, llod, ar, f, eo, d)\ do { \ LOCK_HARDWARE(fxMesa); \ - grTexDownloadMipMapLevel(t, sa, tlod, llod, ar, f, eo, d); \ + fxMesa->Glide.grTexDownloadMipMapLevel(t, sa, tlod, llod, ar, f, eo, d);\ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grTexDownloadMipMapLevelPartial(fxMesa, t, sa, tlod, llod, ar, f, eo, d, s, e); \ do { \ LOCK_HARDWARE(fxMesa); \ - grTexDownloadMipMapLevelPartial(t, sa, tlod, llod, ar, f, eo, d, s, e); \ + fxMesa->Glide.grTexDownloadMipMapLevelPartial(t, sa, tlod, llod, ar, f, eo, d, s, e); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grTexFilterMode(fxMesa, t, minf, magf) \ do { \ LOCK_HARDWARE(fxMesa); \ - grTexFilterMode(t, minf, magf); \ + fxMesa->Glide.grTexFilterMode(t, minf, magf); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grTexFilterMode_NoLock grTexFilterMode +#define FX_grTexFilterMode_NoLock fxMesa->Glide.grTexFilterMode extern FxU32 FX_grTexMinAddress(tdfxContextPtr fxMesa, GrChipID_t tmu); extern FxU32 FX_grTexMaxAddress(tdfxContextPtr fxMesa, GrChipID_t tmu); @@ -574,97 +574,97 @@ #define FX_grTexMipMapMode(t, m, lod) \ do { \ LOCK_HARDWARE(fxMesa); \ - grTexMipMapMode(t, m, lod); \ + fxMesa->Glide.grTexMipMapMode(t, m, lod);\ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grTexMipMapMode_NoLock grTexMipMapMode +#define FX_grTexMipMapMode_NoLock fxMesa->Glide.grTexMipMapMode #define FX_grTexSource(t, sa, eo, i) \ do { \ LOCK_HARDWARE(fxMesa); \ - grTexSource(t, sa, eo, i); \ + fxMesa->Glide.grTexSource(t, sa, eo, i);\ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grTexSource_NoLock grTexSource +#define FX_grTexSource_NoLock fxMesa->Glide.grTexSource extern FxU32 FX_grTexTextureMemRequired(tdfxContextPtr fxMesa, FxU32 evenOdd, GrTexInfo * info); -#define FX_grTexTextureMemRequired_NoLock grTexTextureMemRequired +#define FX_grTexTextureMemRequired_NoLock fxMesa->Glide.grTexTextureMemRequired #define FX_grGlideGetState(fxMesa, s) \ do { \ LOCK_HARDWARE(fxMesa); \ - grGlideGetState(s); \ + fxMesa->Glide.grGlideGetState(s); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grGlideGetState_NoLock(s) grGlideGetState(s); +#define FX_grGlideGetState_NoLock(s) fxMesa->Glide.grGlideGetState(s); #define FX_grDRIBufferSwap(fxMesa, i) \ do { \ LOCK_HARDWARE(fxMesa); \ - grDRIBufferSwap(i); \ + fxMesa->Glide.grDRIBufferSwap(i); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grSstSelect(fxMesa, b) \ do { \ LOCK_HARDWARE(fxMesa); \ - grSstSelect(b); \ + fxMesa->Glide.grSstSelect(b); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grSstSelect_NoLock grSstSelect +#define FX_grSstSelect_NoLock fxMesa->Glide.grSstSelect #define FX_grGlideSetState(fxMesa, s) \ do { \ LOCK_HARDWARE(fxMesa); \ - grGlideSetState(s); \ + fxMesa->Glide.grGlideSetState(s); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grGlideSetState_NoLock(s) grGlideSetState(s); +#define FX_grGlideSetState_NoLock(s) fxMesa->Glide.grGlideSetState(s); #define FX_grDepthBufferMode(fxMesa, m) \ do { \ LOCK_HARDWARE(fxMesa); \ - grDepthBufferMode(m); \ + fxMesa->Glide.grDepthBufferMode(m); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grLfbWriteColorFormat(fxMesa, f) \ do { \ LOCK_HARDWARE(fxMesa); \ - grLfbWriteColorFormat(f); \ + fxMesa->Glide.grLfbWriteColorFormat(f); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) #define FX_grDrawVertexArray(fxMesa, m, c, p) \ do { \ BEGIN_CLIP_LOOP(fxMesa); \ - grDrawVertexArray(m, c, p); \ + fxMesa->Glide.grDrawVertexArray(m, c, p); \ END_CLIP_LOOP(fxMesa); \ } while (0) #define FX_grGlideShutdown(fxMesa) \ do { \ LOCK_HARDWARE(fxMesa); \ - grGlideShutdown(); \ + fxMesa->Glide.grGlideShutdown(); \ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grTexLodBiasValue_NoLock(t, v) grTexLodBiasValue(t, v) +#define FX_grTexLodBiasValue_NoLock(t, v) fxMesa->Glide.grTexLodBiasValue(t, v) #define FX_grTexLodBiasValue(t, v) \ do { \ LOCK_HARDWARE(fxMesa); \ - grTexLodBiasValue(t, v); \ + fxMesa->Glide.grTexLodBiasValue(t, v);\ UNLOCK_HARDWARE(fxMesa); \ } while (0) -#define FX_grGlideInit_NoLock grGlideInit -#define FX_grSstWinOpen_NoLock grSstWinOpen +#define FX_grGlideInit_NoLock fxMesa->Glide.grGlideInit +#define FX_grSstWinOpen_NoLock fxMesa->Glide.grSstWinOpen extern int FX_getFogTableSize(tdfxContextPtr fxMesa); Index: xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c diff -u xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:1.12 xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:1.13 --- xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c:1.12 Wed Mar 21 11:14:28 2001 +++ xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c Fri Aug 17 22:51:07 2001 @@ -23,7 +23,7 @@ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c,v 1.12 2001/03/21 16:14:28 dawes Exp $ */ +/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c,v 1.13 2001/08/18 02:51:07 dawes Exp $ */ /* * Original rewrite: @@ -237,8 +237,8 @@ if (!fxMesa) return; LOCK_HARDWARE( fxMesa ); - grSstSelect( fxMesa->Glide.Board ); - grGlideSetState( (GrState *) fxMesa->Glide.State ); + fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); + fxMesa->Glide.grGlideSetState( (GrState *) fxMesa->Glide.State ); } } @@ -247,7 +247,7 @@ int stalls; static int prevStalls = 0; - stalls = grFifoGetStalls(); + stalls = fxMesa->Glide.grFifoGetStalls(); fprintf( stderr, "%s:\n", __FUNCTION__ ); if ( stalls != prevStalls ) { @@ -265,18 +265,19 @@ if (fxMesa->scissoredClipRects) { /* restore clip rects without scissor box */ - grDRIPosition( driDrawPriv->x, driDrawPriv->y, - driDrawPriv->w, driDrawPriv->h, - driDrawPriv->numClipRects, driDrawPriv->pClipRects ); + fxMesa->Glide.grDRIPosition( driDrawPriv->x, driDrawPriv->y, + driDrawPriv->w, driDrawPriv->h, + driDrawPriv->numClipRects, + driDrawPriv->pClipRects ); } - grDRIBufferSwap( fxMesa->Glide.SwapInterval ); + fxMesa->Glide.grDRIBufferSwap( fxMesa->Glide.SwapInterval ); if (fxMesa->scissoredClipRects) { /* restore clip rects WITH scissor box */ - grDRIPosition( driDrawPriv->x, driDrawPriv->y, - driDrawPriv->w, driDrawPriv->h, - fxMesa->numClipRects, fxMesa->pClipRects ); + fxMesa->Glide.grDRIPosition( driDrawPriv->x, driDrawPriv->y, + driDrawPriv->w, driDrawPriv->h, + fxMesa->numClipRects, fxMesa->pClipRects ); } @@ -294,8 +295,8 @@ if (ctx) { if (ctx->DriverCtx != fxMesa) { fxMesa = TDFX_CONTEXT(ctx); - grSstSelect( fxMesa->Glide.Board ); - grGlideSetState( (GrState *) fxMesa->Glide.State ); + fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); + fxMesa->Glide.grGlideSetState( (GrState *) fxMesa->Glide.State ); } UNLOCK_HARDWARE( fxMesa ); } @@ -352,8 +353,8 @@ } else { LOCK_HARDWARE( fxMesa ); - grSstSelect( fxMesa->Glide.Board ); - grGlideSetState( fxMesa->Glide.State ); + fxMesa->Glide.grSstSelect( fxMesa->Glide.Board ); + fxMesa->Glide.grGlideSetState( fxMesa->Glide.State ); tdfxUpdateClipping(ctx); tdfxUploadClipping(fxMesa); Index: xc/lib/GLU/Imakefile diff -u xc/lib/GLU/Imakefile:1.4 xc/lib/GLU/Imakefile:1.5 --- xc/lib/GLU/Imakefile:1.4 Tue Feb 13 14:19:11 2001 +++ xc/lib/GLU/Imakefile Tue Jun 5 19:03:20 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GLU/Imakefile,v 1.4 2001/02/13 19:19:11 dawes Exp $ +XCOMM $XFree86: xc/lib/GLU/Imakefile,v 1.5 2001/06/05 23:03:20 dawes Exp $ XCOMM License Applicability. Except to the extent portions of this file are XCOMM made subject to an alternative license as permitted in the SGI Free @@ -109,7 +109,11 @@ #endif #if SharedLibGlu +#ifdef SharedDepCplusplusLibraryTarget +SharedDepCplusplusLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.) +#else SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.) +#endif InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) #endif Index: xc/lib/GLU/libnurbs/internals/Imakefile diff -u xc/lib/GLU/libnurbs/internals/Imakefile:1.5 xc/lib/GLU/libnurbs/internals/Imakefile:1.6 --- xc/lib/GLU/libnurbs/internals/Imakefile:1.5 Sat Apr 7 13:13:26 2001 +++ xc/lib/GLU/libnurbs/internals/Imakefile Mon Jun 11 03:23:11 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/GLU/libnurbs/internals/Imakefile,v 1.5 2001/04/07 17:13:26 dawes Exp $ +XCOMM $XFree86: xc/lib/GLU/libnurbs/internals/Imakefile,v 1.6 2001/06/11 07:23:11 torrey Exp $ XCOMM License Applicability. Except to the extent portions of this file are XCOMM made subject to an alternative license as permitted in the SGI Free @@ -143,7 +143,7 @@ -I$(TOP)/include \ -I$(TOP)/include/GL -#if SystemV4 +#if SystemV4 || defined(DarwinArchitecture) OSDEFINES = -DNEEDCEILF #else OSDEFINES = -D_EXTENSIONS_ Index: xc/lib/ICE/ICE.h diff -u xc/lib/ICE/ICE.h:1.1.1.3 xc/lib/ICE/ICE.h:1.2 --- xc/lib/ICE/ICE.h:1.1.1.3 Tue Jan 16 17:05:52 2001 +++ xc/lib/ICE/ICE.h Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ICE.h,v 1.3 2000/08/17 19:44:08 cpqbld Exp $ */ +/* $Xorg: ICE.h,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/ICEconn.h diff -u xc/lib/ICE/ICEconn.h:1.1.1.3 xc/lib/ICE/ICEconn.h:1.2 --- xc/lib/ICE/ICEconn.h:1.1.1.3 Tue Jan 16 17:05:53 2001 +++ xc/lib/ICE/ICEconn.h Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ICEconn.h,v 1.4 2000/08/17 19:44:10 cpqbld Exp $ */ +/* $Xorg: ICEconn.h,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/ICElib.h diff -u xc/lib/ICE/ICElib.h:3.3 xc/lib/ICE/ICElib.h:3.4 --- xc/lib/ICE/ICElib.h:3.3 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/ICElib.h Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ICElib.h,v 1.4 2000/08/17 19:44:10 cpqbld Exp $ */ +/* $Xorg: ICElib.h,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/ICElib.h,v 3.3 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/ICElib.h,v 3.4 2001/12/14 19:53:35 dawes Exp $ */ #ifndef _ICELIB_H_ #define _ICELIB_H_ Index: xc/lib/ICE/ICElibint.h diff -u xc/lib/ICE/ICElibint.h:1.4 xc/lib/ICE/ICElibint.h:1.6 --- xc/lib/ICE/ICElibint.h:1.4 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/ICElibint.h Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ICElibint.h,v 1.3 2000/08/17 19:44:10 cpqbld Exp $ */ +/* $Xorg: ICElibint.h,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/ICElibint.h,v 1.4 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/ICElibint.h,v 1.6 2001/12/14 19:53:35 dawes Exp $ */ #ifndef _ICELIBINT_H_ #define _ICELIBINT_H_ @@ -34,15 +38,8 @@ #include #include -#ifndef X_NOT_STDC_ENV #include -#else -char *malloc(); -#endif - -#ifndef NULL -#define NULL 0 -#endif +#include /* Index: xc/lib/ICE/ICEmsg.h diff -u xc/lib/ICE/ICEmsg.h:1.1.1.3 xc/lib/ICE/ICEmsg.h:1.4 --- xc/lib/ICE/ICEmsg.h:1.1.1.3 Tue Jan 16 17:05:54 2001 +++ xc/lib/ICE/ICEmsg.h Thu Dec 20 14:40:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ICEmsg.h,v 1.3 2000/08/17 19:44:10 cpqbld Exp $ */ +/* $Xorg: ICEmsg.h,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,12 +26,17 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ +/* $XFree86: xc/lib/ICE/ICEmsg.h,v 1.4 2001/12/20 19:40:59 tsi Exp $ */ #ifndef _ICEMSG_H_ #define _ICEMSG_H_ +#include + #include +_XFUNCPROTOBEGIN + /* * Function prototypes for internal ICElib functions */ @@ -294,5 +303,7 @@ char _dummy[7]; \ _IceRead (_iceConn, (unsigned long) (_bytes), _dummy); \ } + +_XFUNCPROTOEND #endif /* _ICEMSG_H_ */ Index: xc/lib/ICE/ICEproto.h diff -u xc/lib/ICE/ICEproto.h:1.1.1.3 xc/lib/ICE/ICEproto.h:1.2 --- xc/lib/ICE/ICEproto.h:1.1.1.3 Tue Jan 16 17:05:55 2001 +++ xc/lib/ICE/ICEproto.h Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ICEproto.h,v 1.4 2000/08/17 19:44:11 cpqbld Exp $ */ +/* $Xorg: ICEproto.h,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/ICEutil.h diff -u xc/lib/ICE/ICEutil.h:1.1.1.3 xc/lib/ICE/ICEutil.h:1.4 --- xc/lib/ICE/ICEutil.h:1.1.1.3 Tue Jan 16 17:05:55 2001 +++ xc/lib/ICE/ICEutil.h Thu Dec 20 14:40:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ICEutil.h,v 1.4 2000/08/17 19:44:11 cpqbld Exp $ */ +/* $Xorg: ICEutil.h,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,13 +26,18 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ +/* $XFree86: xc/lib/ICE/ICEutil.h,v 1.4 2001/12/20 19:40:59 tsi Exp $ */ #ifndef _ICEUTIL_H_ #define _ICEUTIL_H_ +#include + #include #include +_XFUNCPROTOBEGIN + /* * Data structure for entry in ICE authority file */ @@ -130,5 +139,7 @@ IceAuthDataEntry * /* entries */ #endif ); + +_XFUNCPROTOEND #endif /* _ICEUTIL_H_ */ Index: xc/lib/ICE/Imakefile diff -u xc/lib/ICE/Imakefile:3.5 xc/lib/ICE/Imakefile:3.6 --- xc/lib/ICE/Imakefile:3.5 Mon Apr 23 12:17:06 2001 +++ xc/lib/ICE/Imakefile Tue Jul 31 20:44:37 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/ICE/Imakefile,v 3.5 2001/04/23 16:17:06 tsi Exp $ +XCOMM $XFree86: xc/lib/ICE/Imakefile,v 3.6 2001/08/01 00:44:37 tsi Exp $ #define DoNormalLib NormalLibICE #define DoSharedLib SharedLibICE @@ -90,6 +90,7 @@ SpecialCLibObjectRule(listen,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) SpecialCLibObjectRule(listenwk,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) SpecialCLibObjectRule(misc,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) +SpecialCLibObjectRule(shutdown,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES)) SpecialCLibObjectRule(transport,$(ICONFIGFILES),$(TRANS_INCLUDES) $(CONN_DEFINES) $(SOCK_DEFINES)) LinkSourceFile(transport.c,$(TRANSCOMMSRC)) Index: xc/lib/ICE/accept.c diff -u xc/lib/ICE/accept.c:1.1.1.4 xc/lib/ICE/accept.c:1.2 --- xc/lib/ICE/accept.c:1.1.1.4 Tue Jan 16 17:05:56 2001 +++ xc/lib/ICE/accept.c Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: accept.c,v 1.3 2000/08/17 19:44:12 cpqbld Exp $ */ +/* $Xorg: accept.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/authutil.c diff -u xc/lib/ICE/authutil.c:3.6 xc/lib/ICE/authutil.c:3.8 --- xc/lib/ICE/authutil.c:3.6 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/authutil.c Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: authutil.c,v 1.4 2000/08/17 19:44:12 cpqbld Exp $ */ +/* $Xorg: authutil.c,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/authutil.c,v 3.6 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/authutil.c,v 3.8 2001/12/14 19:53:35 dawes Exp $ */ #include #include "ICElibint.h" @@ -31,18 +35,11 @@ #include #include -#if defined(X_NOT_STDC_ENV) && !defined(__EMX__) -extern int errno; -extern long time (); -extern char *getenv(); -#define Time_t long -#else #include #define Time_t time_t #ifdef __EMX__ extern char* getenv(const char*); #define link rename -#endif #endif #ifndef X_NOT_POSIX #include Index: xc/lib/ICE/connect.c diff -u xc/lib/ICE/connect.c:3.6 xc/lib/ICE/connect.c:3.9 --- xc/lib/ICE/connect.c:3.6 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/connect.c Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: connect.c,v 1.3 2000/08/17 19:44:12 cpqbld Exp $ */ +/* $Xorg: connect.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/connect.c,v 3.6 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/connect.c,v 3.9 2001/12/14 19:53:35 dawes Exp $ */ #include #include "ICElibint.h" @@ -31,23 +35,7 @@ static XtransConnInfo ConnectToPeer(); -#ifndef X_NOT_STDC_ENV #define Strstr strstr -#else -static char *Strstr(s1, s2) - char *s1, *s2; -{ - int n1, n2; - - n1 = strlen(s1); - n2 = strlen(s2); - for ( ; n1 >= n2; s1++, n1--) { - if (!strncmp(s1, s2, n2)) - return s1; - } - return NULL; -} -#endif IceConn IceOpenConnection (networkIdsList, context, mustAuthenticate, majorOpcodeCheck, @@ -427,9 +415,6 @@ if (iceConn && _IceWatchProcs) { -#ifdef MINIX - _IceTransSetOption(iceConn->trans_conn, TRANS_NONBLOCKING, 1); -#endif /* * Notify the watch procedures that an iceConn was opened. */ Index: xc/lib/ICE/error.c diff -u xc/lib/ICE/error.c:1.3 xc/lib/ICE/error.c:1.6 --- xc/lib/ICE/error.c:1.3 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/error.c Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: error.c,v 1.3 2000/08/17 19:44:13 cpqbld Exp $ */ +/* $Xorg: error.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/error.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/error.c,v 1.6 2001/12/14 19:53:35 dawes Exp $ */ #include #include "ICElibint.h" @@ -30,11 +34,7 @@ #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif - void _IceErrorBadMinor (iceConn, majorOpcode, offendingMinor, severity) @@ -606,8 +606,8 @@ { fprintf (stderr, - "ICE default IO error handler doing an exit(), pid = %d, errno = %d\n", - getpid(), errno); + "ICE default IO error handler doing an exit(), pid = %ld, errno = %d\n", + (long)getpid(), errno); exit (1); } Index: xc/lib/ICE/getauth.c diff -u xc/lib/ICE/getauth.c:1.1.1.3 xc/lib/ICE/getauth.c:1.3 --- xc/lib/ICE/getauth.c:1.1.1.3 Tue Jan 16 17:06:00 2001 +++ xc/lib/ICE/getauth.c Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getauth.c,v 1.3 2000/08/17 19:44:14 cpqbld Exp $ */ +/* $Xorg: getauth.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,6 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ +/* $XFree86: xc/lib/ICE/getauth.c,v 1.3 2001/12/14 19:53:35 dawes Exp $ */ #include #include "ICElibint.h" @@ -94,7 +99,7 @@ char **authDataRet; { - IceAuthDataEntry *entry; + IceAuthDataEntry *entry = NULL; int found = 0; int i; Index: xc/lib/ICE/globals.h diff -u xc/lib/ICE/globals.h:1.3 xc/lib/ICE/globals.h:1.4 --- xc/lib/ICE/globals.h:1.3 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/globals.h Fri Dec 14 14:53:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: globals.h,v 1.3 2000/08/17 19:44:14 cpqbld Exp $ */ +/* $Xorg: globals.h,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/globals.h,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/globals.h,v 1.4 2001/12/14 19:53:35 dawes Exp $ */ extern void _IceDefaultErrorHandler (); extern void _IceDefaultIOErrorHandler (); Index: xc/lib/ICE/iceauth.c diff -u xc/lib/ICE/iceauth.c:3.3 xc/lib/ICE/iceauth.c:3.5 --- xc/lib/ICE/iceauth.c:3.3 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/iceauth.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: iceauth.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ +/* $Xorg: iceauth.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,19 +26,14 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/iceauth.c,v 3.3 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/iceauth.c,v 3.5 2001/12/14 19:53:36 dawes Exp $ */ #include #include "ICElibint.h" #include -#if defined(X_NOT_STDC_ENV) && !defined(__EMX__) -#define Time_t long -extern Time_t time (); -#else #include #define Time_t time_t -#endif static int binaryEqual (); Index: xc/lib/ICE/listen.c diff -u xc/lib/ICE/listen.c:1.1.1.4 xc/lib/ICE/listen.c:1.2 --- xc/lib/ICE/listen.c:1.1.1.4 Tue Jan 16 17:06:02 2001 +++ xc/lib/ICE/listen.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: listen.c,v 1.4 2000/08/17 19:44:15 cpqbld Exp $ */ +/* $Xorg: listen.c,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/listenwk.c diff -u xc/lib/ICE/listenwk.c:1.3 xc/lib/ICE/listenwk.c:1.4 --- xc/lib/ICE/listenwk.c:1.3 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/listenwk.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: listenwk.c,v 1.4 2000/08/17 19:44:15 cpqbld Exp $ */ +/* $Xorg: listenwk.c,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/ICE/listenwk.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/listenwk.c,v 1.4 2001/12/14 19:53:36 dawes Exp $ */ /* Author: Ralph Mor, X Consortium */ Index: xc/lib/ICE/locking.c diff -u xc/lib/ICE/locking.c:1.1.1.3 xc/lib/ICE/locking.c:1.2 --- xc/lib/ICE/locking.c:1.1.1.3 Tue Jan 16 17:06:03 2001 +++ xc/lib/ICE/locking.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: locking.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ +/* $Xorg: locking.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/misc.c diff -u xc/lib/ICE/misc.c:1.3 xc/lib/ICE/misc.c:1.4 --- xc/lib/ICE/misc.c:1.3 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/misc.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: misc.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ +/* $Xorg: misc.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/misc.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/misc.c,v 1.4 2001/12/14 19:53:36 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/lib/ICE/ping.c diff -u xc/lib/ICE/ping.c:1.1.1.3 xc/lib/ICE/ping.c:1.2 --- xc/lib/ICE/ping.c:1.1.1.3 Tue Jan 16 17:06:04 2001 +++ xc/lib/ICE/ping.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ping.c,v 1.3 2000/08/17 19:44:15 cpqbld Exp $ */ +/* $Xorg: ping.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/process.c diff -u xc/lib/ICE/process.c:3.5 xc/lib/ICE/process.c:3.8 --- xc/lib/ICE/process.c:3.5 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/process.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: process.c,v 1.3 2000/08/17 19:44:16 cpqbld Exp $ */ +/* $Xorg: process.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,17 +26,13 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/process.c,v 3.5 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/process.c,v 3.8 2001/12/14 19:53:36 dawes Exp $ */ #include #include "ICElibint.h" #include /* sprintf */ -#ifdef MINIX -#include -#endif - /* * Check for bad length */ @@ -540,7 +540,7 @@ IceReplyWaitInfo *replyWait; { - int invokeHandler; + int invokeHandler = 0; Bool errorReturned = False; iceErrorMsg *message; char *pData, *pStart; @@ -819,7 +819,7 @@ int hisMajorVersion, hisMinorVersion; int myAuthCount, hisAuthCount; int found, i, j; - char *myAuthName, **hisAuthNames; + char *myAuthName, **hisAuthNames = NULL; char *pData, *pStart, *pEnd; char *vendor = NULL; char *release = NULL; @@ -1078,7 +1078,7 @@ IcePoAuthProc authProc; IcePoAuthStatus status; IcePointer authState; - int realAuthIndex; + int realAuthIndex = 0; CHECK_AT_LEAST_SIZE (iceConn, ICE_AuthRequired, length, SIZEOF (iceAuthRequiredMsg), @@ -1634,7 +1634,7 @@ } else if (status == IcePoAuthRejected || status == IcePoAuthFailed) { - char *prefix, *returnErrorString; + char *prefix = NULL, *returnErrorString; if (status == IcePoAuthRejected) { @@ -1801,7 +1801,7 @@ int myAuthCount, hisAuthCount; int myOpcode, hisOpcode; int found, i, j; - char *myAuthName, **hisAuthNames; + char *myAuthName, **hisAuthNames = NULL; char *protocolName; char *pData, *pStart, *pEnd; char *vendor = NULL; @@ -2522,19 +2522,3 @@ *replyReadyRet = replyReady; } - -#ifdef MINIX -int -MNX_IceMessagesAvailable(iceConn) - -IceConn iceConn; -{ - BytesReadable_t bytes; - - _IceTransSetOption(iceConn->trans_conn, TRANS_NONBLOCKING, 1); - if (_IceTransBytesReadable(iceConn->trans_conn, &bytes) < 0) - bytes= -1; - _IceTransSetOption(iceConn->trans_conn, TRANS_NONBLOCKING, 0); - return (bytes != 0); -} -#endif Index: xc/lib/ICE/protosetup.c diff -u xc/lib/ICE/protosetup.c:1.1.1.3 xc/lib/ICE/protosetup.c:1.3 --- xc/lib/ICE/protosetup.c:1.1.1.3 Tue Jan 16 17:06:07 2001 +++ xc/lib/ICE/protosetup.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: protosetup.c,v 1.3 2000/08/17 19:44:17 cpqbld Exp $ */ +/* $Xorg: protosetup.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,6 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ +/* $XFree86: xc/lib/ICE/protosetup.c,v 1.3 2001/12/14 19:53:36 dawes Exp $ */ #include #include "ICElibint.h" @@ -54,7 +59,7 @@ unsigned long setup_sequence; IceReplyWaitInfo replyWait; _IceReply reply; - IcePoVersionRec *versionRec; + IcePoVersionRec *versionRec = NULL; int authCount; int *authIndices; Index: xc/lib/ICE/register.c diff -u xc/lib/ICE/register.c:1.1.1.3 xc/lib/ICE/register.c:1.2 --- xc/lib/ICE/register.c:1.1.1.3 Tue Jan 16 17:06:08 2001 +++ xc/lib/ICE/register.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: register.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ +/* $Xorg: register.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/replywait.c diff -u xc/lib/ICE/replywait.c:1.1.1.3 xc/lib/ICE/replywait.c:1.2 --- xc/lib/ICE/replywait.c:1.1.1.3 Tue Jan 16 17:06:09 2001 +++ xc/lib/ICE/replywait.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: replywait.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ +/* $Xorg: replywait.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/ICE/setauth.c diff -u xc/lib/ICE/setauth.c:1.3 xc/lib/ICE/setauth.c:1.4 --- xc/lib/ICE/setauth.c:1.3 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/setauth.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: setauth.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ +/* $Xorg: setauth.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ -/* $XFree86: xc/lib/ICE/setauth.c,v 1.3 2001/01/17 19:41:29 dawes Exp $ */ +/* $XFree86: xc/lib/ICE/setauth.c,v 1.4 2001/12/14 19:53:36 dawes Exp $ */ #include #include "ICElibint.h" Index: xc/lib/ICE/shutdown.c diff -u xc/lib/ICE/shutdown.c:3.2 xc/lib/ICE/shutdown.c:3.4 --- xc/lib/ICE/shutdown.c:3.2 Wed Jan 17 14:41:29 2001 +++ xc/lib/ICE/shutdown.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: shutdown.c,v 1.3 2000/08/17 19:44:18 cpqbld Exp $ */ +/* $Xorg: shutdown.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,9 +26,11 @@ Author: Ralph Mor, X Consortium ******************************************************************************/ +/* $XFree86: xc/lib/ICE/shutdown.c,v 3.4 2001/12/14 19:53:36 dawes Exp $ */ #include #include "ICElibint.h" +#include Status Index: xc/lib/ICE/watch.c diff -u xc/lib/ICE/watch.c:1.1.1.3 xc/lib/ICE/watch.c:1.2 --- xc/lib/ICE/watch.c:1.1.1.3 Tue Jan 16 17:06:12 2001 +++ xc/lib/ICE/watch.c Fri Dec 14 14:53:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: watch.c,v 1.3 2000/08/17 19:44:19 cpqbld Exp $ */ +/* $Xorg: watch.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/PEXlibint.h diff -u xc/lib/PEX5/PEXlibint.h:3.2 xc/lib/PEX5/PEXlibint.h:3.3 --- xc/lib/PEX5/PEXlibint.h:3.2 Wed Jan 17 14:41:30 2001 +++ xc/lib/PEX5/PEXlibint.h Fri Dec 14 14:53:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: PEXlibint.h,v 1.4 2000/08/17 19:44:20 cpqbld Exp $ */ +/* $Xorg: PEXlibint.h,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/PEXproto.h diff -u xc/lib/PEX5/PEXproto.h:1.1.1.3 xc/lib/PEX5/PEXproto.h:1.2 --- xc/lib/PEX5/PEXproto.h:1.1.1.3 Tue Jan 16 17:06:25 2001 +++ xc/lib/PEX5/PEXproto.h Fri Dec 14 14:53:44 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PEXproto.h,v 1.3 2000/08/17 19:44:21 cpqbld Exp $ */ +/* $Xorg: PEXproto.h,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/PEXprotost.h diff -u xc/lib/PEX5/PEXprotost.h:1.1.1.3 xc/lib/PEX5/PEXprotost.h:1.2 --- xc/lib/PEX5/PEXprotost.h:1.1.1.3 Tue Jan 16 17:06:27 2001 +++ xc/lib/PEX5/PEXprotost.h Fri Dec 14 14:53:44 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PEXprotost.h,v 1.3 2000/08/17 19:44:21 cpqbld Exp $ */ +/* $Xorg: PEXprotost.h,v 1.4 2001/02/09 02:03:27 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_convert.c diff -u xc/lib/PEX5/pl_convert.c:1.1.1.3 xc/lib/PEX5/pl_convert.c:1.2 --- xc/lib/PEX5/pl_convert.c:1.1.1.3 Tue Jan 16 17:06:30 2001 +++ xc/lib/PEX5/pl_convert.c Fri Dec 14 14:53:45 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_convert.c,v 1.3 2000/08/17 19:44:22 cpqbld Exp $ */ +/* $Xorg: pl_convert.c,v 1.4 2001/02/09 02:03:27 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_convert.h diff -u xc/lib/PEX5/pl_convert.h:1.1.1.3 xc/lib/PEX5/pl_convert.h:1.2 --- xc/lib/PEX5/pl_convert.h:1.1.1.3 Tue Jan 16 17:06:30 2001 +++ xc/lib/PEX5/pl_convert.h Fri Dec 14 14:53:47 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_convert.h,v 1.3 2000/08/17 19:44:22 cpqbld Exp $ */ +/* $Xorg: pl_convert.h,v 1.4 2001/02/09 02:03:27 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_escape.c diff -u xc/lib/PEX5/pl_escape.c:1.1.1.3 xc/lib/PEX5/pl_escape.c:1.2 --- xc/lib/PEX5/pl_escape.c:1.1.1.3 Tue Jan 16 17:06:31 2001 +++ xc/lib/PEX5/pl_escape.c Fri Dec 14 14:53:48 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_escape.c,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ +/* $Xorg: pl_escape.c,v 1.4 2001/02/09 02:03:27 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_extract.h diff -u xc/lib/PEX5/pl_extract.h:3.2 xc/lib/PEX5/pl_extract.h:3.3 --- xc/lib/PEX5/pl_extract.h:3.2 Wed Jan 17 14:41:30 2001 +++ xc/lib/PEX5/pl_extract.h Fri Dec 14 14:53:48 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_extract.h,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ +/* $Xorg: pl_extract.h,v 1.4 2001/02/09 02:03:27 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_font.c diff -u xc/lib/PEX5/pl_font.c:1.1.1.3 xc/lib/PEX5/pl_font.c:1.2 --- xc/lib/PEX5/pl_font.c:1.1.1.3 Tue Jan 16 17:06:32 2001 +++ xc/lib/PEX5/pl_font.c Fri Dec 14 14:53:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_font.c,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ +/* $Xorg: pl_font.c,v 1.4 2001/02/09 02:03:27 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_free.c diff -u xc/lib/PEX5/pl_free.c:1.1.1.3 xc/lib/PEX5/pl_free.c:1.2 --- xc/lib/PEX5/pl_free.c:1.1.1.3 Tue Jan 16 17:06:33 2001 +++ xc/lib/PEX5/pl_free.c Fri Dec 14 14:53:48 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_free.c,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ +/* $Xorg: pl_free.c,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_global.h diff -u xc/lib/PEX5/pl_global.h:1.1.1.3 xc/lib/PEX5/pl_global.h:1.2 --- xc/lib/PEX5/pl_global.h:1.1.1.3 Tue Jan 16 17:06:35 2001 +++ xc/lib/PEX5/pl_global.h Fri Dec 14 14:53:48 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_global.h,v 1.3 2000/08/17 19:44:23 cpqbld Exp $ */ +/* $Xorg: pl_global.h,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_lut.c diff -u xc/lib/PEX5/pl_lut.c:1.1.1.3 xc/lib/PEX5/pl_lut.c:1.2 --- xc/lib/PEX5/pl_lut.c:1.1.1.3 Tue Jan 16 17:06:36 2001 +++ xc/lib/PEX5/pl_lut.c Fri Dec 14 14:53:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_lut.c,v 1.3 2000/08/17 19:44:24 cpqbld Exp $ */ +/* $Xorg: pl_lut.c,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_lut.h diff -u xc/lib/PEX5/pl_lut.h:1.1.1.3 xc/lib/PEX5/pl_lut.h:1.2 --- xc/lib/PEX5/pl_lut.h:1.1.1.3 Tue Jan 16 17:06:36 2001 +++ xc/lib/PEX5/pl_lut.h Fri Dec 14 14:53:49 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_lut.h,v 1.3 2000/08/17 19:44:24 cpqbld Exp $ */ +/* $Xorg: pl_lut.h,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_nameset.c diff -u xc/lib/PEX5/pl_nameset.c:1.1.1.3 xc/lib/PEX5/pl_nameset.c:1.2 --- xc/lib/PEX5/pl_nameset.c:1.1.1.3 Tue Jan 16 17:06:36 2001 +++ xc/lib/PEX5/pl_nameset.c Fri Dec 14 14:53:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_nameset.c,v 1.3 2000/08/17 19:44:24 cpqbld Exp $ */ +/* $Xorg: pl_nameset.c,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_oc_attr.c diff -u xc/lib/PEX5/pl_oc_attr.c:1.1.1.3 xc/lib/PEX5/pl_oc_attr.c:1.2 --- xc/lib/PEX5/pl_oc_attr.c:1.1.1.3 Tue Jan 16 17:06:37 2001 +++ xc/lib/PEX5/pl_oc_attr.c Fri Dec 14 14:53:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_oc_attr.c,v 1.4 2000/08/17 19:44:24 cpqbld Exp $ */ +/* $Xorg: pl_oc_attr.c,v 1.5 2001/02/09 02:03:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_oc_dec.c diff -u xc/lib/PEX5/pl_oc_dec.c:1.1.1.3 xc/lib/PEX5/pl_oc_dec.c:1.2 --- xc/lib/PEX5/pl_oc_dec.c:1.1.1.3 Tue Jan 16 17:06:38 2001 +++ xc/lib/PEX5/pl_oc_dec.c Fri Dec 14 14:53:49 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_oc_dec.c,v 1.3 2000/08/17 19:44:25 cpqbld Exp $ */ +/* $Xorg: pl_oc_dec.c,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_oc_enc.c diff -u xc/lib/PEX5/pl_oc_enc.c:1.1.1.3 xc/lib/PEX5/pl_oc_enc.c:1.2 --- xc/lib/PEX5/pl_oc_enc.c:1.1.1.3 Tue Jan 16 17:06:39 2001 +++ xc/lib/PEX5/pl_oc_enc.c Fri Dec 14 14:53:49 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_oc_enc.c,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ +/* $Xorg: pl_oc_enc.c,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_oc_prim.c diff -u xc/lib/PEX5/pl_oc_prim.c:1.1.1.3 xc/lib/PEX5/pl_oc_prim.c:1.2 --- xc/lib/PEX5/pl_oc_prim.c:1.1.1.3 Tue Jan 16 17:06:40 2001 +++ xc/lib/PEX5/pl_oc_prim.c Fri Dec 14 14:53:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_oc_prim.c,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ +/* $Xorg: pl_oc_prim.c,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_oc_str.c diff -u xc/lib/PEX5/pl_oc_str.c:1.1.1.3 xc/lib/PEX5/pl_oc_str.c:1.2 --- xc/lib/PEX5/pl_oc_str.c:1.1.1.3 Tue Jan 16 17:06:40 2001 +++ xc/lib/PEX5/pl_oc_str.c Fri Dec 14 14:53:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_oc_str.c,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ +/* $Xorg: pl_oc_str.c,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_oc_util.c diff -u xc/lib/PEX5/pl_oc_util.c:1.1.1.3 xc/lib/PEX5/pl_oc_util.c:1.2 --- xc/lib/PEX5/pl_oc_util.c:1.1.1.3 Tue Jan 16 17:06:41 2001 +++ xc/lib/PEX5/pl_oc_util.c Fri Dec 14 14:53:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_oc_util.c,v 1.4 2000/08/17 19:44:26 cpqbld Exp $ */ +/* $Xorg: pl_oc_util.c,v 1.5 2001/02/09 02:03:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_oc_util.h diff -u xc/lib/PEX5/pl_oc_util.h:3.2 xc/lib/PEX5/pl_oc_util.h:3.3 --- xc/lib/PEX5/pl_oc_util.h:3.2 Wed Jan 17 14:41:31 2001 +++ xc/lib/PEX5/pl_oc_util.h Fri Dec 14 14:53:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_oc_util.h,v 1.3 2000/08/17 19:44:26 cpqbld Exp $ */ +/* $Xorg: pl_oc_util.h,v 1.4 2001/02/09 02:03:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_pc.c diff -u xc/lib/PEX5/pl_pc.c:1.1.1.3 xc/lib/PEX5/pl_pc.c:1.2 --- xc/lib/PEX5/pl_pc.c:1.1.1.3 Tue Jan 16 17:06:43 2001 +++ xc/lib/PEX5/pl_pc.c Fri Dec 14 14:53:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_pc.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ +/* $Xorg: pl_pc.c,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_pick.c diff -u xc/lib/PEX5/pl_pick.c:1.1.1.3 xc/lib/PEX5/pl_pick.c:1.2 --- xc/lib/PEX5/pl_pick.c:1.1.1.3 Tue Jan 16 17:06:43 2001 +++ xc/lib/PEX5/pl_pick.c Fri Dec 14 14:53:50 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_pick.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ +/* $Xorg: pl_pick.c,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_rdr.c diff -u xc/lib/PEX5/pl_rdr.c:1.1.1.3 xc/lib/PEX5/pl_rdr.c:1.2 --- xc/lib/PEX5/pl_rdr.c:1.1.1.3 Tue Jan 16 17:06:44 2001 +++ xc/lib/PEX5/pl_rdr.c Fri Dec 14 14:53:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_rdr.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ +/* $Xorg: pl_rdr.c,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_sc.c diff -u xc/lib/PEX5/pl_sc.c:1.1.1.3 xc/lib/PEX5/pl_sc.c:1.2 --- xc/lib/PEX5/pl_sc.c:1.1.1.3 Tue Jan 16 17:06:45 2001 +++ xc/lib/PEX5/pl_sc.c Fri Dec 14 14:53:50 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_sc.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ +/* $Xorg: pl_sc.c,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_startup.c diff -u xc/lib/PEX5/pl_startup.c:1.1.1.3 xc/lib/PEX5/pl_startup.c:1.2 --- xc/lib/PEX5/pl_startup.c:1.1.1.3 Tue Jan 16 17:06:45 2001 +++ xc/lib/PEX5/pl_startup.c Fri Dec 14 14:53:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_startup.c,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ +/* $Xorg: pl_startup.c,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_store.h diff -u xc/lib/PEX5/pl_store.h:3.2 xc/lib/PEX5/pl_store.h:3.3 --- xc/lib/PEX5/pl_store.h:3.2 Wed Jan 17 14:41:31 2001 +++ xc/lib/PEX5/pl_store.h Fri Dec 14 14:53:51 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_store.h,v 1.3 2000/08/17 19:44:27 cpqbld Exp $ */ +/* $Xorg: pl_store.h,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_struct.c diff -u xc/lib/PEX5/pl_struct.c:1.1.1.3 xc/lib/PEX5/pl_struct.c:1.2 --- xc/lib/PEX5/pl_struct.c:1.1.1.3 Tue Jan 16 17:06:47 2001 +++ xc/lib/PEX5/pl_struct.c Fri Dec 14 14:53:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_struct.c,v 1.4 2000/08/17 19:44:27 cpqbld Exp $ */ +/* $Xorg: pl_struct.c,v 1.5 2001/02/09 02:03:29 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_util.c diff -u xc/lib/PEX5/pl_util.c:1.1.1.3 xc/lib/PEX5/pl_util.c:1.2 --- xc/lib/PEX5/pl_util.c:1.1.1.3 Tue Jan 16 17:06:49 2001 +++ xc/lib/PEX5/pl_util.c Fri Dec 14 14:53:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pl_util.c,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: pl_util.c,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /****************************************************************************** Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_util.h diff -u xc/lib/PEX5/pl_util.h:1.1.1.3 xc/lib/PEX5/pl_util.h:1.2 --- xc/lib/PEX5/pl_util.h:1.1.1.3 Tue Jan 16 17:06:50 2001 +++ xc/lib/PEX5/pl_util.h Fri Dec 14 14:53:51 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_util.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: pl_util.h,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_wks.c diff -u xc/lib/PEX5/pl_wks.c:1.1.1.3 xc/lib/PEX5/pl_wks.c:1.2 --- xc/lib/PEX5/pl_wks.c:1.1.1.3 Tue Jan 16 17:06:50 2001 +++ xc/lib/PEX5/pl_wks.c Fri Dec 14 14:53:51 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_wks.c,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: pl_wks.c,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/PEX5/pl_xdata.h diff -u xc/lib/PEX5/pl_xdata.h:1.1.1.3 xc/lib/PEX5/pl_xdata.h:1.2 --- xc/lib/PEX5/pl_xdata.h:1.1.1.3 Tue Jan 16 17:06:51 2001 +++ xc/lib/PEX5/pl_xdata.h Fri Dec 14 14:53:51 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pl_xdata.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: pl_xdata.h,v 1.4 2001/02/09 02:03:29 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/SM.h diff -u xc/lib/SM/SM.h:1.1.1.3 xc/lib/SM/SM.h:1.2 --- xc/lib/SM/SM.h:1.1.1.3 Tue Jan 16 17:06:53 2001 +++ xc/lib/SM/SM.h Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SM.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: SM.h,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/SMlib.h diff -u xc/lib/SM/SMlib.h:1.1.1.4 xc/lib/SM/SMlib.h:1.2 --- xc/lib/SM/SMlib.h:1.1.1.4 Tue Jan 16 17:06:53 2001 +++ xc/lib/SM/SMlib.h Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SMlib.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: SMlib.h,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/SMlibint.h diff -u xc/lib/SM/SMlibint.h:1.1.1.3 xc/lib/SM/SMlibint.h:1.4 --- xc/lib/SM/SMlibint.h:1.1.1.3 Tue Jan 16 17:06:54 2001 +++ xc/lib/SM/SMlibint.h Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SMlibint.h,v 1.3 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: SMlibint.h,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,6 +25,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/SM/SMlibint.h,v 1.4 2001/12/14 19:53:55 dawes Exp $ */ /* * Author: Ralph Mor, X Consortium @@ -36,14 +41,10 @@ #include #include -#ifndef X_NOT_STDC_ENV #include -#else -char *malloc(); -#endif #ifndef NULL -#define NULL 0 +#include #endif Index: xc/lib/SM/SMproto.h diff -u xc/lib/SM/SMproto.h:1.1.1.3 xc/lib/SM/SMproto.h:1.2 --- xc/lib/SM/SMproto.h:1.1.1.3 Tue Jan 16 17:06:54 2001 +++ xc/lib/SM/SMproto.h Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SMproto.h,v 1.4 2000/08/17 19:44:28 cpqbld Exp $ */ +/* $Xorg: SMproto.h,v 1.5 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/globals.h diff -u xc/lib/SM/globals.h:1.3 xc/lib/SM/globals.h:1.4 --- xc/lib/SM/globals.h:1.3 Wed Jan 17 14:41:31 2001 +++ xc/lib/SM/globals.h Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: globals.h,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: globals.h,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/SM/globals.h,v 1.3 2001/01/17 19:41:31 dawes Exp $ */ +/* $XFree86: xc/lib/SM/globals.h,v 1.4 2001/12/14 19:53:55 dawes Exp $ */ /* * Author: Ralph Mor, X Consortium Index: xc/lib/SM/sm_auth.c diff -u xc/lib/SM/sm_auth.c:1.1.1.3 xc/lib/SM/sm_auth.c:1.2 --- xc/lib/SM/sm_auth.c:1.1.1.3 Tue Jan 16 17:06:55 2001 +++ xc/lib/SM/sm_auth.c Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sm_auth.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: sm_auth.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/sm_client.c diff -u xc/lib/SM/sm_client.c:1.1.1.3 xc/lib/SM/sm_client.c:1.2 --- xc/lib/SM/sm_client.c:1.1.1.3 Tue Jan 16 17:06:56 2001 +++ xc/lib/SM/sm_client.c Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sm_client.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: sm_client.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/sm_error.c diff -u xc/lib/SM/sm_error.c:1.1.1.3 xc/lib/SM/sm_error.c:1.3 --- xc/lib/SM/sm_error.c:1.1.1.3 Tue Jan 16 17:06:56 2001 +++ xc/lib/SM/sm_error.c Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sm_error.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: sm_error.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,6 +25,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/SM/sm_error.c,v 1.3 2001/12/14 19:53:55 dawes Exp $ */ /* * Author: Ralph Mor, X Consortium @@ -85,7 +90,7 @@ fprintf (stderr, "XSMP error: Offending minor opcode = %d (%s)\n", offendingMinorOpcode, str); - fprintf (stderr, " Offending sequence number = %d\n", + fprintf (stderr, " Offending sequence number = %ld\n", offendingSequence); switch (errorClass) @@ -208,7 +213,7 @@ fprintf (stderr, "XSMP error: Offending minor opcode = %d (%s)\n", offendingMinorOpcode, str); - fprintf (stderr, " Offending sequence number = %d\n", + fprintf (stderr, " Offending sequence number = %ld\n", offendingSequence); switch (errorClass) Index: xc/lib/SM/sm_genid.c diff -u xc/lib/SM/sm_genid.c:3.11 xc/lib/SM/sm_genid.c:3.15 --- xc/lib/SM/sm_genid.c:3.11 Wed Jan 17 14:41:31 2001 +++ xc/lib/SM/sm_genid.c Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sm_genid.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: sm_genid.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/SM/sm_genid.c,v 3.11 2001/01/17 19:41:31 dawes Exp $ */ +/* $XFree86: xc/lib/SM/sm_genid.c,v 3.15 2001/12/14 19:53:55 dawes Exp $ */ /* * Author: Ralph Mor, X Consortium @@ -38,13 +42,8 @@ #endif #include -#if defined(X_NOT_STDC_ENV) && !defined(__EMX__) -#define Time_t long -extern Time_t time (); -#else #include #define Time_t time_t -#endif #ifndef WIN32 @@ -117,10 +116,9 @@ char * SmsGenerateClientID (smsConn) - -SmsConn smsConn; - + SmsConn smsConn; { +#if defined(TCPCONN) || defined(STREAMSCONN) char hostname[256]; char address[14]; char temp[256]; @@ -130,13 +128,14 @@ if (gethostname (hostname, sizeof (hostname))) return (NULL); -#if defined(TCPCONN) || defined(STREAMSCONN) { char* inet_addr; char temp[4], *ptr1, *ptr2; unsigned char decimal[4]; int i, len; +#ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; +#endif struct hostent *hostp; if ((hostp = _XGethostbyname (hostname,hparams)) != NULL) @@ -162,12 +161,9 @@ for (i = 0; i < 4; i++) strcat (address, hex_table[decimal[i]]); } -#else - return (NULL); -#endif - sprintf (temp, "1%s%.13ld%.10d%.4d", address, time((Time_t*)0), - getpid (), sequence); + sprintf (temp, "1%s%.13ld%.10ld%.4d", address, time((Time_t*)0), + (long)getpid(), sequence); if (++sequence > 9999) sequence = 0; @@ -176,4 +172,7 @@ strcpy (id, temp); return (id); +#else + return (NULL); +#endif } Index: xc/lib/SM/sm_manager.c diff -u xc/lib/SM/sm_manager.c:1.1.1.4 xc/lib/SM/sm_manager.c:1.2 --- xc/lib/SM/sm_manager.c:1.1.1.4 Tue Jan 16 17:06:58 2001 +++ xc/lib/SM/sm_manager.c Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sm_manager.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: sm_manager.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/sm_misc.c diff -u xc/lib/SM/sm_misc.c:1.1.1.3 xc/lib/SM/sm_misc.c:1.2 --- xc/lib/SM/sm_misc.c:1.1.1.3 Tue Jan 16 17:06:58 2001 +++ xc/lib/SM/sm_misc.c Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sm_misc.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: sm_misc.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/SM/sm_process.c diff -u xc/lib/SM/sm_process.c:1.1.1.4 xc/lib/SM/sm_process.c:1.2 --- xc/lib/SM/sm_process.c:1.1.1.4 Tue Jan 16 17:06:59 2001 +++ xc/lib/SM/sm_process.c Fri Dec 14 14:53:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sm_process.c,v 1.3 2000/08/17 19:44:29 cpqbld Exp $ */ +/* $Xorg: sm_process.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/AllCells.c diff -u xc/lib/X11/AllCells.c:1.1.1.3 xc/lib/X11/AllCells.c:1.2 --- xc/lib/X11/AllCells.c:1.1.1.3 Tue Jan 16 17:07:00 2001 +++ xc/lib/X11/AllCells.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: AllCells.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: AllCells.c,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/AllPlanes.c diff -u xc/lib/X11/AllPlanes.c:1.3 xc/lib/X11/AllPlanes.c:1.4 --- xc/lib/X11/AllPlanes.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/AllPlanes.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: AllPlanes.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: AllPlanes.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/AllPlanes.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/AllPlanes.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/AllowEv.c diff -u xc/lib/X11/AllowEv.c:1.3 xc/lib/X11/AllowEv.c:1.4 --- xc/lib/X11/AllowEv.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/AllowEv.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: AllowEv.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: AllowEv.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/AllowEv.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/AllowEv.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/AutoRep.c diff -u xc/lib/X11/AutoRep.c:1.3 xc/lib/X11/AutoRep.c:1.4 --- xc/lib/X11/AutoRep.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/AutoRep.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: AutoRep.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: AutoRep.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/AutoRep.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/AutoRep.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Backgnd.c diff -u xc/lib/X11/Backgnd.c:1.3 xc/lib/X11/Backgnd.c:1.4 --- xc/lib/X11/Backgnd.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/Backgnd.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Backgnd.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: Backgnd.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Backgnd.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Backgnd.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/BdrWidth.c diff -u xc/lib/X11/BdrWidth.c:1.3 xc/lib/X11/BdrWidth.c:1.4 --- xc/lib/X11/BdrWidth.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/BdrWidth.c Fri Dec 14 14:53:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: BdrWidth.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: BdrWidth.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/BdrWidth.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/BdrWidth.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Bell.c diff -u xc/lib/X11/Bell.c:1.3 xc/lib/X11/Bell.c:1.4 --- xc/lib/X11/Bell.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/Bell.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Bell.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: Bell.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Bell.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Bell.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Border.c diff -u xc/lib/X11/Border.c:1.3 xc/lib/X11/Border.c:1.4 --- xc/lib/X11/Border.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/Border.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Border.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: Border.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Border.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Border.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CCC.c diff -u xc/lib/X11/CCC.c:1.3 xc/lib/X11/CCC.c:1.4 --- xc/lib/X11/CCC.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/CCC.c Fri Dec 14 14:53:56 2001 @@ -1,4 +1,4 @@ -/* $Xorg: CCC.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: CCC.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. @@ -33,13 +33,17 @@ * * */ -/* $XFree86: xc/lib/X11/CCC.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CCC.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/ChAccCon.c diff -u xc/lib/X11/ChAccCon.c:1.3 xc/lib/X11/ChAccCon.c:1.4 --- xc/lib/X11/ChAccCon.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChAccCon.c Fri Dec 14 14:53:56 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChAccCon.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: ChAccCon.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChAccCon.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChAccCon.c,v 1.4 2001/12/14 19:53:56 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChActPGb.c diff -u xc/lib/X11/ChActPGb.c:1.3 xc/lib/X11/ChActPGb.c:1.4 --- xc/lib/X11/ChActPGb.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChActPGb.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChActPGb.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: ChActPGb.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChActPGb.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChActPGb.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChClMode.c diff -u xc/lib/X11/ChClMode.c:1.3 xc/lib/X11/ChClMode.c:1.4 --- xc/lib/X11/ChClMode.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChClMode.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChClMode.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: ChClMode.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChClMode.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChClMode.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChCmap.c diff -u xc/lib/X11/ChCmap.c:1.3 xc/lib/X11/ChCmap.c:1.4 --- xc/lib/X11/ChCmap.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChCmap.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChCmap.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: ChCmap.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChCmap.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChCmap.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChGC.c diff -u xc/lib/X11/ChGC.c:1.3 xc/lib/X11/ChGC.c:1.4 --- xc/lib/X11/ChGC.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChGC.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChGC.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: ChGC.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChGC.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChGC.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChKeyCon.c diff -u xc/lib/X11/ChKeyCon.c:1.3 xc/lib/X11/ChKeyCon.c:1.4 --- xc/lib/X11/ChKeyCon.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChKeyCon.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChKeyCon.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: ChKeyCon.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChKeyCon.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChKeyCon.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChPntCon.c diff -u xc/lib/X11/ChPntCon.c:1.3 xc/lib/X11/ChPntCon.c:1.4 --- xc/lib/X11/ChPntCon.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChPntCon.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChPntCon.c,v 1.3 2000/08/17 19:44:30 cpqbld Exp $ */ +/* $Xorg: ChPntCon.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChPntCon.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChPntCon.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChProp.c diff -u xc/lib/X11/ChProp.c:1.3 xc/lib/X11/ChProp.c:1.4 --- xc/lib/X11/ChProp.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChProp.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChProp.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChProp.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChProp.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChProp.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChSaveSet.c diff -u xc/lib/X11/ChSaveSet.c:1.3 xc/lib/X11/ChSaveSet.c:1.4 --- xc/lib/X11/ChSaveSet.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChSaveSet.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChSaveSet.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChSaveSet.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChSaveSet.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChSaveSet.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChWAttrs.c diff -u xc/lib/X11/ChWAttrs.c:1.3 xc/lib/X11/ChWAttrs.c:1.4 --- xc/lib/X11/ChWAttrs.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChWAttrs.c Fri Dec 14 14:53:57 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChWAttrs.c,v 1.4 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChWAttrs.c,v 1.5 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChWAttrs.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChWAttrs.c,v 1.4 2001/12/14 19:53:57 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChWindow.c diff -u xc/lib/X11/ChWindow.c:1.5 xc/lib/X11/ChWindow.c:1.6 --- xc/lib/X11/ChWindow.c:1.5 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChWindow.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChWindow.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChWindow.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ChWindow.c,v 1.5 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ChWindow.c,v 1.6 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ChkIfEv.c diff -u xc/lib/X11/ChkIfEv.c:1.1.1.3 xc/lib/X11/ChkIfEv.c:1.2 --- xc/lib/X11/ChkIfEv.c:1.1.1.3 Tue Jan 16 17:07:09 2001 +++ xc/lib/X11/ChkIfEv.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChkIfEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChkIfEv.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/ChkMaskEv.c diff -u xc/lib/X11/ChkMaskEv.c:3.2 xc/lib/X11/ChkMaskEv.c:3.6 --- xc/lib/X11/ChkMaskEv.c:3.2 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChkMaskEv.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChkMaskEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChkMaskEv.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,16 +24,12 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/ChkMaskEv.c,v 3.6 2001/12/14 19:53:58 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif -extern long Const _Xevent_to_mask[]; +extern long const _Xevent_to_mask[]; #define AllPointers (PointerMotionMask|PointerMotionHintMask|ButtonMotionMask) #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ @@ -47,7 +47,7 @@ register XEvent *event; /* XEvent to be filled in. */ { register _XQEvent *prev, *qelt; - unsigned long qe_serial; + unsigned long qe_serial = 0; int n; /* time through count */ LockDisplay(dpy); Index: xc/lib/X11/ChkTypEv.c diff -u xc/lib/X11/ChkTypEv.c:1.1.1.3 xc/lib/X11/ChkTypEv.c:1.3 --- xc/lib/X11/ChkTypEv.c:1.1.1.3 Tue Jan 16 17:07:09 2001 +++ xc/lib/X11/ChkTypEv.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChkTypEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChkTypEv.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,6 +24,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/ChkTypEv.c,v 1.3 2001/12/14 19:53:58 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -36,7 +41,7 @@ register XEvent *event; /* XEvent to be filled in. */ { register _XQEvent *prev, *qelt; - unsigned long qe_serial; + unsigned long qe_serial = 0; int n; /* time through count */ LockDisplay(dpy); Index: xc/lib/X11/ChkTypWEv.c diff -u xc/lib/X11/ChkTypWEv.c:1.1.1.3 xc/lib/X11/ChkTypWEv.c:1.3 --- xc/lib/X11/ChkTypWEv.c:1.1.1.3 Tue Jan 16 17:07:10 2001 +++ xc/lib/X11/ChkTypWEv.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChkTypWEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChkTypWEv.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,6 +24,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/ChkTypWEv.c,v 1.3 2001/12/14 19:53:58 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -37,7 +42,7 @@ register XEvent *event; /* XEvent to be filled in. */ { register _XQEvent *prev, *qelt; - unsigned long qe_serial; + unsigned long qe_serial = 0; int n; /* time through count */ LockDisplay(dpy); Index: xc/lib/X11/ChkWinEv.c diff -u xc/lib/X11/ChkWinEv.c:3.2 xc/lib/X11/ChkWinEv.c:3.6 --- xc/lib/X11/ChkWinEv.c:3.2 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/ChkWinEv.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ChkWinEv.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ChkWinEv.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,16 +24,12 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/ChkWinEv.c,v 3.6 2001/12/14 19:53:58 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif -extern long Const _Xevent_to_mask[]; +extern long const _Xevent_to_mask[]; #define AllPointers (PointerMotionMask|PointerMotionHintMask|ButtonMotionMask) #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ Button4MotionMask|Button5MotionMask) @@ -47,7 +47,7 @@ register XEvent *event; /* XEvent to be filled in. */ { register _XQEvent *prev, *qelt; - unsigned long qe_serial; + unsigned long qe_serial = 0; int n; /* time through count */ LockDisplay(dpy); Index: xc/lib/X11/CirWin.c diff -u xc/lib/X11/CirWin.c:1.3 xc/lib/X11/CirWin.c:1.4 --- xc/lib/X11/CirWin.c:1.3 Wed Jan 17 14:41:32 2001 +++ xc/lib/X11/CirWin.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CirWin.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: CirWin.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CirWin.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CirWin.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CirWinDn.c diff -u xc/lib/X11/CirWinDn.c:1.3 xc/lib/X11/CirWinDn.c:1.4 --- xc/lib/X11/CirWinDn.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CirWinDn.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CirWinDn.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: CirWinDn.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CirWinDn.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CirWinDn.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CirWinUp.c diff -u xc/lib/X11/CirWinUp.c:1.3 xc/lib/X11/CirWinUp.c:1.4 --- xc/lib/X11/CirWinUp.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CirWinUp.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CirWinUp.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: CirWinUp.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CirWinUp.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CirWinUp.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ClDisplay.c diff -u xc/lib/X11/ClDisplay.c:1.3 xc/lib/X11/ClDisplay.c:1.4 --- xc/lib/X11/ClDisplay.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/ClDisplay.c Fri Dec 14 14:53:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ClDisplay.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ClDisplay.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1985, 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/ClDisplay.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ClDisplay.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Clear.c diff -u xc/lib/X11/Clear.c:1.3 xc/lib/X11/Clear.c:1.4 --- xc/lib/X11/Clear.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/Clear.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Clear.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: Clear.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Clear.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Clear.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ClearArea.c diff -u xc/lib/X11/ClearArea.c:1.3 xc/lib/X11/ClearArea.c:1.4 --- xc/lib/X11/ClearArea.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/ClearArea.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ClearArea.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ClearArea.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ClearArea.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ClearArea.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ConfWind.c diff -u xc/lib/X11/ConfWind.c:1.3 xc/lib/X11/ConfWind.c:1.4 --- xc/lib/X11/ConfWind.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/ConfWind.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ConfWind.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ConfWind.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ConfWind.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ConfWind.c,v 1.4 2001/12/14 19:53:58 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ConnDis.c diff -u xc/lib/X11/ConnDis.c:3.18 xc/lib/X11/ConnDis.c:3.24 --- xc/lib/X11/ConnDis.c:3.18 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/ConnDis.c Fri Dec 14 14:53:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ConnDis.c,v 1.7 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ConnDis.c,v 1.8 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ConnDis.c,v 3.18 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ConnDis.c,v 3.24 2001/12/14 19:53:58 dawes Exp $ */ /* * This file contains operating system dependencies. @@ -34,7 +38,7 @@ #include #include -#if !defined(WIN32) && !defined(MINIX) +#if !defined(WIN32) #ifndef Lynx #include #else @@ -110,7 +114,7 @@ char *pdpynum = NULL; /* start of dpynum of display */ char *pscrnum = NULL; /* start of screen of display */ Bool dnet = False; /* if true, then DECnet format */ - int idisplay; /* required display number */ + int idisplay = 0; /* required display number */ int iscreen = 0; /* optional screen number */ /* int (*connfunc)(); */ /* method to create connection */ int len, hostlen; /* length tmp variable */ @@ -295,7 +299,9 @@ } #endif +#if defined(LOCALCONN) && defined(TCPCONN) connect: +#endif /* * This seems kind of backwards, but we need to put the protocol, * host, and port back together to pass to _X11TransOpenCOTSClient(). @@ -549,6 +555,13 @@ #endif #ifdef SECURE_RPC +#if defined(sun) && defined(SVR4) /* && ????? */ +/* + * I'm aware this is backwards, but #define'ing PORTMAP, as suggested in the + * man pages, doesn't work either. + */ +#define authdes_seccreate authdes_create +#endif #include #ifdef ultrix #include @@ -557,13 +570,8 @@ #endif #ifdef HASXDMAUTH -#ifdef X_NOT_STDC_ENV -#define Time_t long -extern Time_t time (); -#else #include #define Time_t time_t -#endif #endif /* Index: xc/lib/X11/Context.c diff -u xc/lib/X11/Context.c:1.3 xc/lib/X11/Context.c:1.5 --- xc/lib/X11/Context.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/Context.c Fri Dec 14 14:53:58 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Context.c,v 1.4 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: Context.c,v 1.5 2001/02/09 02:03:31 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, @@ -27,7 +27,11 @@ Copyright 1987, 1988, 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Context.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Context.c,v 1.5 2001/12/14 19:53:58 dawes Exp $ */ /* This module implements a simple sparse array. @@ -97,8 +101,7 @@ /* Resize the given db */ -static void ResizeTable(db) - register DB db; +static void ResizeTable(DB db) { TableEntry *otable; register TableEntry entry, next, *pold, *head; @@ -125,8 +128,7 @@ Xfree((char *) otable); } -static void _XFreeContextDB(display) - Display *display; +static void _XFreeContextDB(Display *display) { register DB db; register int i; Index: xc/lib/X11/ConvSel.c diff -u xc/lib/X11/ConvSel.c:1.3 xc/lib/X11/ConvSel.c:1.4 --- xc/lib/X11/ConvSel.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/ConvSel.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ConvSel.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: ConvSel.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ /* Copyright 1986,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ConvSel.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ConvSel.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CopyArea.c diff -u xc/lib/X11/CopyArea.c:1.3 xc/lib/X11/CopyArea.c:1.4 --- xc/lib/X11/CopyArea.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CopyArea.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CopyArea.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: CopyArea.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyArea.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyArea.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CopyCmap.c diff -u xc/lib/X11/CopyCmap.c:1.3 xc/lib/X11/CopyCmap.c:1.4 --- xc/lib/X11/CopyCmap.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CopyCmap.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CopyCmap.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: CopyCmap.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyCmap.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyCmap.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/CopyGC.c diff -u xc/lib/X11/CopyGC.c:1.3 xc/lib/X11/CopyGC.c:1.4 --- xc/lib/X11/CopyGC.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CopyGC.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CopyGC.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: CopyGC.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyGC.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyGC.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CopyPlane.c diff -u xc/lib/X11/CopyPlane.c:1.3 xc/lib/X11/CopyPlane.c:1.4 --- xc/lib/X11/CopyPlane.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CopyPlane.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CopyPlane.c,v 1.3 2000/08/17 19:44:31 cpqbld Exp $ */ +/* $Xorg: CopyPlane.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CopyPlane.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CopyPlane.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CrBFData.c diff -u xc/lib/X11/CrBFData.c:1.1.1.3 xc/lib/X11/CrBFData.c:1.2 --- xc/lib/X11/CrBFData.c:1.1.1.3 Tue Jan 16 17:07:14 2001 +++ xc/lib/X11/CrBFData.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrBFData.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrBFData.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/CrCmap.c diff -u xc/lib/X11/CrCmap.c:1.3 xc/lib/X11/CrCmap.c:1.4 --- xc/lib/X11/CrCmap.c:1.3 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CrCmap.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrCmap.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrCmap.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrCmap.c,v 1.3 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrCmap.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" Index: xc/lib/X11/CrCursor.c diff -u xc/lib/X11/CrCursor.c:1.1.1.3 xc/lib/X11/CrCursor.c:1.2 --- xc/lib/X11/CrCursor.c:1.1.1.3 Tue Jan 16 17:07:14 2001 +++ xc/lib/X11/CrCursor.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrCursor.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrCursor.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/CrGC.c diff -u xc/lib/X11/CrGC.c:3.4 xc/lib/X11/CrGC.c:3.6 --- xc/lib/X11/CrGC.c:3.4 Wed Jan 17 14:41:33 2001 +++ xc/lib/X11/CrGC.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrGC.c,v 1.4 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrGC.c,v 1.5 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,17 +24,11 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrGC.c,v 3.4 2001/01/17 19:41:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrGC.c,v 3.6 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - -static XGCValues Const initial_GC = { +static XGCValues const initial_GC = { GXcopy, /* function */ AllPlanes, /* plane_mask */ 0L, /* foreground */ Index: xc/lib/X11/CrGlCur.c diff -u xc/lib/X11/CrGlCur.c:1.3 xc/lib/X11/CrGlCur.c:1.4 --- xc/lib/X11/CrGlCur.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/CrGlCur.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrGlCur.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrGlCur.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/CrGlCur.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/CrPFBData.c diff -u xc/lib/X11/CrPFBData.c:1.1.1.3 xc/lib/X11/CrPFBData.c:1.2 --- xc/lib/X11/CrPFBData.c:1.1.1.3 Tue Jan 16 17:07:15 2001 +++ xc/lib/X11/CrPFBData.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrPFBData.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrPFBData.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/CrPixmap.c diff -u xc/lib/X11/CrPixmap.c:1.1.1.3 xc/lib/X11/CrPixmap.c:1.2 --- xc/lib/X11/CrPixmap.c:1.1.1.3 Tue Jan 16 17:07:15 2001 +++ xc/lib/X11/CrPixmap.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrPixmap.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrPixmap.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/CrWindow.c diff -u xc/lib/X11/CrWindow.c:1.1.1.3 xc/lib/X11/CrWindow.c:1.2 --- xc/lib/X11/CrWindow.c:1.1.1.3 Tue Jan 16 17:07:16 2001 +++ xc/lib/X11/CrWindow.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CrWindow.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: CrWindow.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/Cursor.c diff -u xc/lib/X11/Cursor.c:1.3 xc/lib/X11/Cursor.c:1.4 --- xc/lib/X11/Cursor.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/Cursor.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Cursor.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: Cursor.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Cursor.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Cursor.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" static XColor _Xconst foreground = { 0, 0, 0, 0 }; /* black */ Index: xc/lib/X11/DefCursor.c diff -u xc/lib/X11/DefCursor.c:1.3 xc/lib/X11/DefCursor.c:1.4 --- xc/lib/X11/DefCursor.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DefCursor.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DefCursor.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DefCursor.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DefCursor.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DefCursor.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DelProp.c diff -u xc/lib/X11/DelProp.c:1.3 xc/lib/X11/DelProp.c:1.4 --- xc/lib/X11/DelProp.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DelProp.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DelProp.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DelProp.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DelProp.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DelProp.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Depths.c diff -u xc/lib/X11/Depths.c:1.1.1.3 xc/lib/X11/Depths.c:1.2 --- xc/lib/X11/Depths.c:1.1.1.3 Tue Jan 16 17:07:18 2001 +++ xc/lib/X11/Depths.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Depths.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: Depths.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/DestSubs.c diff -u xc/lib/X11/DestSubs.c:1.3 xc/lib/X11/DestSubs.c:1.4 --- xc/lib/X11/DestSubs.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DestSubs.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DestSubs.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DestSubs.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DestSubs.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DestSubs.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DestWind.c diff -u xc/lib/X11/DestWind.c:1.3 xc/lib/X11/DestWind.c:1.4 --- xc/lib/X11/DestWind.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DestWind.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DestWind.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DestWind.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DestWind.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DestWind.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DisName.c diff -u xc/lib/X11/DisName.c:1.1.1.3 xc/lib/X11/DisName.c:1.2 --- xc/lib/X11/DisName.c:1.1.1.3 Tue Jan 16 17:07:18 2001 +++ xc/lib/X11/DisName.c Fri Dec 14 14:53:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DisName.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DisName.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/DrArc.c diff -u xc/lib/X11/DrArc.c:1.3 xc/lib/X11/DrArc.c:1.4 --- xc/lib/X11/DrArc.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrArc.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrArc.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DrArc.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrArc.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrArc.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ /* Note to future maintainers: XDrawArc does NOT batch successive PolyArc requests into a single request like XDrawLine, XDrawPoint, etc. Index: xc/lib/X11/DrArcs.c diff -u xc/lib/X11/DrArcs.c:1.3 xc/lib/X11/DrArcs.c:1.4 --- xc/lib/X11/DrArcs.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrArcs.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrArcs.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DrArcs.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrArcs.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrArcs.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrLine.c diff -u xc/lib/X11/DrLine.c:1.3 xc/lib/X11/DrLine.c:1.4 --- xc/lib/X11/DrLine.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrLine.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrLine.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DrLine.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrLine.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrLine.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrLines.c diff -u xc/lib/X11/DrLines.c:1.3 xc/lib/X11/DrLines.c:1.4 --- xc/lib/X11/DrLines.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrLines.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrLines.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DrLines.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrLines.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrLines.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrPoint.c diff -u xc/lib/X11/DrPoint.c:1.3 xc/lib/X11/DrPoint.c:1.4 --- xc/lib/X11/DrPoint.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrPoint.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrPoint.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DrPoint.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrPoint.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrPoint.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrPoints.c diff -u xc/lib/X11/DrPoints.c:1.3 xc/lib/X11/DrPoints.c:1.4 --- xc/lib/X11/DrPoints.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrPoints.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrPoints.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DrPoints.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrPoints.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrPoints.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrRect.c diff -u xc/lib/X11/DrRect.c:1.3 xc/lib/X11/DrRect.c:1.4 --- xc/lib/X11/DrRect.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrRect.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrRect.c,v 1.3 2000/08/17 19:44:32 cpqbld Exp $ */ +/* $Xorg: DrRect.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrRect.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrRect.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrRects.c diff -u xc/lib/X11/DrRects.c:1.3 xc/lib/X11/DrRects.c:1.4 --- xc/lib/X11/DrRects.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrRects.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrRects.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: DrRects.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrRects.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrRects.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/DrSegs.c diff -u xc/lib/X11/DrSegs.c:1.3 xc/lib/X11/DrSegs.c:1.4 --- xc/lib/X11/DrSegs.c:1.3 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/DrSegs.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: DrSegs.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: DrSegs.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/DrSegs.c,v 1.3 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/DrSegs.c,v 1.4 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ErrDes.c diff -u xc/lib/X11/ErrDes.c:3.8 xc/lib/X11/ErrDes.c:3.10 --- xc/lib/X11/ErrDes.c:3.8 Wed Jan 17 14:41:34 2001 +++ xc/lib/X11/ErrDes.c Fri Dec 14 14:53:59 2001 @@ -1,12 +1,16 @@ /* - * $Xorg: ErrDes.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ + * $Xorg: ErrDes.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/ErrDes.c,v 3.8 2001/01/17 19:41:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ErrDes.c,v 3.10 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" #include @@ -55,17 +59,11 @@ #define ERRORDB "/usr/lib/X11/XErrorDB" #endif -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - /* * descriptions of errors in Section 4 of Protocol doc (pp. 350-351); more * verbose descriptions are given in the error database */ -static Const char * Const _XErrorList[] = { +static const char * const _XErrorList[] = { /* No error */ "no error", /* BadRequest */ "BadRequest", /* BadValue */ "BadValue", Index: xc/lib/X11/ErrHndlr.c diff -u xc/lib/X11/ErrHndlr.c:1.4 xc/lib/X11/ErrHndlr.c:1.5 --- xc/lib/X11/ErrHndlr.c:1.4 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/ErrHndlr.c Fri Dec 14 14:53:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ErrHndlr.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: ErrHndlr.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ErrHndlr.c,v 1.4 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ErrHndlr.c,v 1.5 2001/12/14 19:53:59 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/EvToWire.c diff -u xc/lib/X11/EvToWire.c:1.3 xc/lib/X11/EvToWire.c:1.5 --- xc/lib/X11/EvToWire.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/EvToWire.c Fri Dec 14 14:53:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: EvToWire.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: EvToWire.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/EvToWire.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/EvToWire.c,v 1.5 2001/12/14 19:53:59 dawes Exp $ */ /* * XEvToWire.c - Internal support routines for the C subroutine @@ -34,17 +38,14 @@ #include "Xlibint.h" -/* XlibInt.c */ -extern Status _XUnknownNativeEvent(); - /* * reformat a wire event into an XEvent structure of the right type. */ Status -_XEventToWire(dpy, re, event) -register Display *dpy; /* pointer to display structure */ -register XEvent *re; /* pointer to where event should be reformatted */ -register xEvent *event; /* wire protocol event */ +_XEventToWire( +register Display *dpy, /* pointer to display structure */ +register XEvent *re, /* pointer to where event should be reformatted */ +register xEvent *event) /* wire protocol event */ { switch (event->u.u.type = re->type) { case KeyPress: Index: xc/lib/X11/FSSaver.c diff -u xc/lib/X11/FSSaver.c:1.3 xc/lib/X11/FSSaver.c:1.4 --- xc/lib/X11/FSSaver.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FSSaver.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FSSaver.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FSSaver.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FSSaver.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FSSaver.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FSWrap.c diff -u xc/lib/X11/FSWrap.c:1.5 xc/lib/X11/FSWrap.c:1.6 --- xc/lib/X11/FSWrap.c:1.5 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FSWrap.c Fri Dec 14 14:54:00 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FSWrap.c,v 1.4 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FSWrap.c,v 1.5 2001/02/09 02:03:32 xorgcvs Exp $ */ /* * Copyright 1991 by the Open Software Foundation @@ -32,7 +32,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -52,7 +56,7 @@ */ -/* $XFree86: xc/lib/X11/FSWrap.c,v 1.5 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FSWrap.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/FetchName.c diff -u xc/lib/X11/FetchName.c:1.1.1.3 xc/lib/X11/FetchName.c:1.2 --- xc/lib/X11/FetchName.c:1.1.1.3 Tue Jan 16 17:07:22 2001 +++ xc/lib/X11/FetchName.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FetchName.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FetchName.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/FillArc.c diff -u xc/lib/X11/FillArc.c:1.3 xc/lib/X11/FillArc.c:1.4 --- xc/lib/X11/FillArc.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FillArc.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FillArc.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FillArc.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillArc.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillArc.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillArcs.c diff -u xc/lib/X11/FillArcs.c:1.3 xc/lib/X11/FillArcs.c:1.4 --- xc/lib/X11/FillArcs.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FillArcs.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FillArcs.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FillArcs.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillArcs.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillArcs.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillPoly.c diff -u xc/lib/X11/FillPoly.c:1.3 xc/lib/X11/FillPoly.c:1.4 --- xc/lib/X11/FillPoly.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FillPoly.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FillPoly.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FillPoly.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillPoly.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillPoly.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillRct.c diff -u xc/lib/X11/FillRct.c:1.3 xc/lib/X11/FillRct.c:1.4 --- xc/lib/X11/FillRct.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FillRct.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FillRct.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FillRct.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillRct.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillRct.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FillRcts.c diff -u xc/lib/X11/FillRcts.c:1.3 xc/lib/X11/FillRcts.c:1.4 --- xc/lib/X11/FillRcts.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FillRcts.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FillRcts.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FillRcts.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FillRcts.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FillRcts.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FilterEv.c diff -u xc/lib/X11/FilterEv.c:3.2 xc/lib/X11/FilterEv.c:3.5 --- xc/lib/X11/FilterEv.c:3.2 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FilterEv.c Fri Dec 14 14:54:00 2001 @@ -1,4 +1,4 @@ -/* $Xorg: FilterEv.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FilterEv.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation @@ -30,7 +30,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -49,17 +53,13 @@ from The Open Group. */ +/* $XFree86: xc/lib/X11/FilterEv.c,v 3.5 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif -extern long Const _Xevent_to_mask[]; +extern long const _Xevent_to_mask[]; /* * Look up if there is a specified filter for the event. Index: xc/lib/X11/Flush.c diff -u xc/lib/X11/Flush.c:1.3 xc/lib/X11/Flush.c:1.4 --- xc/lib/X11/Flush.c:1.3 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/Flush.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Flush.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: Flush.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Flush.c,v 1.3 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Flush.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Font.c diff -u xc/lib/X11/Font.c:1.13 xc/lib/X11/Font.c:1.15 --- xc/lib/X11/Font.c:1.13 Tue May 1 03:53:46 2001 +++ xc/lib/X11/Font.c Fri Dec 14 14:54:00 2001 @@ -1,15 +1,14 @@ -/* $Xorg: Font.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: Font.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* -Copyright (c) 1986 X Consortium +Copyright 1986, 1998 The Open Group Copyright (c) 2000 The XFree86 Project, Inc. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -28,7 +27,7 @@ authorization from the X Consortium and the XFree86 Project. */ -/* $XFree86: xc/lib/X11/Font.c,v 1.13 2001/05/01 07:53:46 alanh Exp $ */ +/* $XFree86: xc/lib/X11/Font.c,v 1.15 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -48,7 +47,10 @@ #include #endif +#include "Xlcint.h" +#include "XlcPubI.h" + static XFontStruct *_XQueryFont( #if NeedFunctionPrototypes Display* /* dpy */, @@ -112,6 +114,8 @@ XF86BigfontCodes *extcodes = _XF86BigfontCodes(dpy); #endif + if (_XF86LoadQueryLocaleFont(dpy, name, &font_result, (Font *)0)) + return font_result; LockDisplay(dpy); GetReq(OpenFont, req); seq = dpy->request; @@ -678,3 +682,72 @@ } #endif /* USE_XF86BIGFONT */ + +#if NeedFunctionPrototypes +int _XF86LoadQueryLocaleFont( + Display *dpy, + _Xconst char *name, + XFontStruct **xfp, + Font *fidp) +#else +int _XF86LoadQueryLocaleFont(dpy, name) + Display *dpy; + char *name; + XFontStruct **xfp; + Font *fidp; +#endif +{ + int l; + char *charset, *p; + char buf[256]; + XFontStruct *fs; + XLCd lcd; + + if (!name) + return 0; + l = strlen(name); + if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-') + return 0; + charset = 0; + /* next three lines stolen from _XkbGetCharset() */ + lcd = _XlcCurrentLC(); + if ((lcd = _XlcCurrentLC()) != 0) + charset = XLC_PUBLIC(lcd, encoding_name); + if (!charset || (p = strrchr(charset, '-')) == 0 || p == charset || p[1] == 0 || (p[1] == '*' && p[2] == 0)) { + /* prefer latin1 if no encoding found */ + charset = "ISO8859-1"; + p = charset + 7; + } + if (l - 2 - (p - charset) < 0) + return 0; + if (strncasecmp(name + l - 2 - (p - charset), charset, p - charset)) + return 0; + if (strlen(p + 1) + l - 1 >= sizeof(buf) - 1) + return 0; + strcpy(buf, name); + strcpy(buf + l - 1, p + 1); + fs = XLoadQueryFont(dpy, buf); + if (!fs) + return 0; + if (xfp) { + *xfp = fs; + if (fidp) + *fidp = fs->fid; + } else if (fidp) { + if (fs->per_char) { +#ifdef USE_XF86BIGFONT + _XF86BigfontFreeFontMetrics(fs); +#else + Xfree ((char *) fs->per_char); +#endif + } + _XFreeExtData(fs->ext_data); + if (fs->properties) + Xfree ((char *) fs->properties); + *fidp = fs->fid; + Xfree ((char *) fs); + } else { + XFreeFont(dpy, fs); + } + return 1; +} Index: xc/lib/X11/FontInfo.c diff -u xc/lib/X11/FontInfo.c:1.5 xc/lib/X11/FontInfo.c:1.6 --- xc/lib/X11/FontInfo.c:1.5 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FontInfo.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FontInfo.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FontInfo.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FontInfo.c,v 1.5 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FontInfo.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/FontNames.c diff -u xc/lib/X11/FontNames.c:1.5 xc/lib/X11/FontNames.c:1.6 --- xc/lib/X11/FontNames.c:1.5 Wed Jan 17 14:41:35 2001 +++ xc/lib/X11/FontNames.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FontNames.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FontNames.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ */ -/* $XFree86: xc/lib/X11/FontNames.c,v 1.5 2001/01/17 19:41:35 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FontNames.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/FreeCmap.c diff -u xc/lib/X11/FreeCmap.c:1.3 xc/lib/X11/FreeCmap.c:1.4 --- xc/lib/X11/FreeCmap.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/FreeCmap.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FreeCmap.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FreeCmap.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeCmap.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeCmap.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeCols.c diff -u xc/lib/X11/FreeCols.c:1.3 xc/lib/X11/FreeCols.c:1.4 --- xc/lib/X11/FreeCols.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/FreeCols.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FreeCols.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FreeCols.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeCols.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeCols.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeCurs.c diff -u xc/lib/X11/FreeCurs.c:1.3 xc/lib/X11/FreeCurs.c:1.4 --- xc/lib/X11/FreeCurs.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/FreeCurs.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FreeCurs.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FreeCurs.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeCurs.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeCurs.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeEData.c diff -u xc/lib/X11/FreeEData.c:1.3 xc/lib/X11/FreeEData.c:1.4 --- xc/lib/X11/FreeEData.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/FreeEData.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FreeEData.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FreeEData.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeEData.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeEData.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/FreeGC.c diff -u xc/lib/X11/FreeGC.c:1.3 xc/lib/X11/FreeGC.c:1.5 --- xc/lib/X11/FreeGC.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/FreeGC.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FreeGC.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FreeGC.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,12 +24,9 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreeGC.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreeGC.c,v 1.5 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" - -/* FreeEData.c */ -extern int _XFreeExtData(); int XFreeGC (dpy, gc) Index: xc/lib/X11/FreePix.c diff -u xc/lib/X11/FreePix.c:1.3 xc/lib/X11/FreePix.c:1.4 --- xc/lib/X11/FreePix.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/FreePix.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: FreePix.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: FreePix.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/FreePix.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/FreePix.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/GCMisc.c diff -u xc/lib/X11/GCMisc.c:1.3 xc/lib/X11/GCMisc.c:1.4 --- xc/lib/X11/GCMisc.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GCMisc.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GCMisc.c,v 1.3 2000/08/17 19:44:33 cpqbld Exp $ */ +/* $Xorg: GCMisc.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GCMisc.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GCMisc.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Geom.c diff -u xc/lib/X11/Geom.c:1.1.1.3 xc/lib/X11/Geom.c:1.2 --- xc/lib/X11/Geom.c:1.1.1.3 Tue Jan 16 17:07:26 2001 +++ xc/lib/X11/Geom.c Fri Dec 14 14:54:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Geom.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: Geom.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetAtomNm.c diff -u xc/lib/X11/GetAtomNm.c:3.3 xc/lib/X11/GetAtomNm.c:3.5 --- xc/lib/X11/GetAtomNm.c:3.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetAtomNm.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetAtomNm.c,v 1.4 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetAtomNm.c,v 1.5 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,38 +24,16 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetAtomNm.c,v 3.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetAtomNm.c,v 3.5 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" +#include "Xintatom.h" -extern void _XFreeAtomTable(); - -/* IntAtom.c */ -extern void _XUpdateAtomCache(); - -/* XlibAsync.c */ -extern void _XGetAsyncData(); - -/* XXX this table def is duplicated in IntAtom.c, keep them consistent! */ - -#define TABLESIZE 64 - -typedef struct _Entry { - unsigned long sig; - Atom atom; -} EntryRec, *Entry; - -#define EntryName(e) ((char *)(e+1)) - -typedef struct _XDisplayAtoms { - Entry table[TABLESIZE]; -} AtomTable; - static -char *_XGetAtomName(dpy, atom) - Display *dpy; - Atom atom; +char *_XGetAtomName( + Display *dpy, + Atom atom) { xResourceReq *req; char *name; @@ -115,12 +97,12 @@ } _XGetAtomNameState; static -Bool _XGetAtomNameHandler(dpy, rep, buf, len, data) - register Display *dpy; - register xReply *rep; - char *buf; - int len; - XPointer data; +Bool _XGetAtomNameHandler( + register Display *dpy, + register xReply *rep, + char *buf, + int len, + XPointer data) { register _XGetAtomNameState *state; xGetAtomNameReply replbuf; Index: xc/lib/X11/GetColor.c diff -u xc/lib/X11/GetColor.c:1.3 xc/lib/X11/GetColor.c:1.4 --- xc/lib/X11/GetColor.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetColor.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetColor.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetColor.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetColor.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetColor.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/GetDflt.c diff -u xc/lib/X11/GetDflt.c:3.17 xc/lib/X11/GetDflt.c:3.19 --- xc/lib/X11/GetDflt.c:3.17 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetDflt.c Fri Dec 14 14:54:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetDflt.c,v 1.5 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetDflt.c,v 1.6 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/GetDflt.c,v 3.17 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetDflt.c,v 3.19 2001/12/14 19:54:00 dawes Exp $ */ #include "Xlibint.h" #include @@ -83,9 +87,6 @@ #include #include -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif /*ARGSUSED*/ static char *GetHomeDir (dest, len) Index: xc/lib/X11/GetFPath.c diff -u xc/lib/X11/GetFPath.c:1.3 xc/lib/X11/GetFPath.c:1.4 --- xc/lib/X11/GetFPath.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetFPath.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetFPath.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetFPath.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetFPath.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetFPath.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetFProp.c diff -u xc/lib/X11/GetFProp.c:1.1.1.3 xc/lib/X11/GetFProp.c:1.2 --- xc/lib/X11/GetFProp.c:1.1.1.3 Tue Jan 16 17:07:27 2001 +++ xc/lib/X11/GetFProp.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetFProp.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetFProp.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetGCVals.c diff -u xc/lib/X11/GetGCVals.c:1.1.1.3 xc/lib/X11/GetGCVals.c:1.2 --- xc/lib/X11/GetGCVals.c:1.1.1.3 Tue Jan 16 17:07:28 2001 +++ xc/lib/X11/GetGCVals.c Fri Dec 14 14:54:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetGCVals.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetGCVals.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetGeom.c diff -u xc/lib/X11/GetGeom.c:1.1.1.3 xc/lib/X11/GetGeom.c:1.2 --- xc/lib/X11/GetGeom.c:1.1.1.3 Tue Jan 16 17:07:28 2001 +++ xc/lib/X11/GetGeom.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetGeom.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetGeom.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetHColor.c diff -u xc/lib/X11/GetHColor.c:1.1.1.3 xc/lib/X11/GetHColor.c:1.2 --- xc/lib/X11/GetHColor.c:1.1.1.3 Tue Jan 16 17:07:28 2001 +++ xc/lib/X11/GetHColor.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetHColor.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetHColor.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetHints.c diff -u xc/lib/X11/GetHints.c:1.3 xc/lib/X11/GetHints.c:1.4 --- xc/lib/X11/GetHints.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetHints.c Fri Dec 14 14:54:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetHints.c,v 1.4 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetHints.c,v 1.5 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/GetHints.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetHints.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #include #include Index: xc/lib/X11/GetIFocus.c diff -u xc/lib/X11/GetIFocus.c:1.3 xc/lib/X11/GetIFocus.c:1.4 --- xc/lib/X11/GetIFocus.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetIFocus.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetIFocus.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetIFocus.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetIFocus.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetIFocus.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetImage.c diff -u xc/lib/X11/GetImage.c:1.3 xc/lib/X11/GetImage.c:1.4 --- xc/lib/X11/GetImage.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetImage.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetImage.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetImage.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetImage.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetImage.c,v 1.4 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetKCnt.c diff -u xc/lib/X11/GetKCnt.c:1.5 xc/lib/X11/GetKCnt.c:1.6 --- xc/lib/X11/GetKCnt.c:1.5 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetKCnt.c Fri Dec 14 14:54:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetKCnt.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetKCnt.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetKCnt.c,v 1.5 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetKCnt.c,v 1.6 2001/12/14 19:54:00 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetMoEv.c diff -u xc/lib/X11/GetMoEv.c:1.1.1.3 xc/lib/X11/GetMoEv.c:1.2 --- xc/lib/X11/GetMoEv.c:1.1.1.3 Tue Jan 16 17:07:31 2001 +++ xc/lib/X11/GetMoEv.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetMoEv.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetMoEv.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetNrmHint.c diff -u xc/lib/X11/GetNrmHint.c:1.1.1.3 xc/lib/X11/GetNrmHint.c:1.2 --- xc/lib/X11/GetNrmHint.c:1.1.1.3 Tue Jan 16 17:07:31 2001 +++ xc/lib/X11/GetNrmHint.c Fri Dec 14 14:54:01 2001 @@ -1,4 +1,4 @@ -/* $Xorg: GetNrmHint.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetNrmHint.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca, Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -27,7 +27,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetPCnt.c diff -u xc/lib/X11/GetPCnt.c:1.3 xc/lib/X11/GetPCnt.c:1.4 --- xc/lib/X11/GetPCnt.c:1.3 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetPCnt.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetPCnt.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetPCnt.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetPCnt.c,v 1.3 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetPCnt.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetPntMap.c diff -u xc/lib/X11/GetPntMap.c:1.5 xc/lib/X11/GetPntMap.c:1.6 --- xc/lib/X11/GetPntMap.c:1.5 Wed Jan 17 14:41:36 2001 +++ xc/lib/X11/GetPntMap.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetPntMap.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetPntMap.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ */ -/* $XFree86: xc/lib/X11/GetPntMap.c,v 1.5 2001/01/17 19:41:36 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetPntMap.c,v 1.6 2001/12/14 19:54:01 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetProp.c diff -u xc/lib/X11/GetProp.c:1.4 xc/lib/X11/GetProp.c:1.6 --- xc/lib/X11/GetProp.c:1.4 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/GetProp.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetProp.c,v 1.4 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetProp.c,v 1.5 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetProp.c,v 1.4 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetProp.c,v 1.6 2001/12/14 19:54:01 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -107,7 +111,7 @@ error.errorCode = BadImplementation; _XError(dpy, &error); } - netbytes = 0L; + nbytes = netbytes = 0L; break; } if (! *prop) { Index: xc/lib/X11/GetRGBCMap.c diff -u xc/lib/X11/GetRGBCMap.c:1.1.1.3 xc/lib/X11/GetRGBCMap.c:1.2 --- xc/lib/X11/GetRGBCMap.c:1.1.1.3 Tue Jan 16 17:07:34 2001 +++ xc/lib/X11/GetRGBCMap.c Fri Dec 14 14:54:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetRGBCMap.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetRGBCMap.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetSOwner.c diff -u xc/lib/X11/GetSOwner.c:1.1.1.3 xc/lib/X11/GetSOwner.c:1.2 --- xc/lib/X11/GetSOwner.c:1.1.1.3 Tue Jan 16 17:07:34 2001 +++ xc/lib/X11/GetSOwner.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetSOwner.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetSOwner.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetSSaver.c diff -u xc/lib/X11/GetSSaver.c:1.3 xc/lib/X11/GetSSaver.c:1.4 --- xc/lib/X11/GetSSaver.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/GetSSaver.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetSSaver.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetSSaver.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GetSSaver.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GetSSaver.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/GetStCmap.c diff -u xc/lib/X11/GetStCmap.c:1.1.1.3 xc/lib/X11/GetStCmap.c:1.2 --- xc/lib/X11/GetStCmap.c:1.1.1.3 Tue Jan 16 17:07:35 2001 +++ xc/lib/X11/GetStCmap.c Fri Dec 14 14:54:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetStCmap.c,v 1.3 2000/08/17 19:44:34 cpqbld Exp $ */ +/* $Xorg: GetStCmap.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetTxtProp.c diff -u xc/lib/X11/GetTxtProp.c:1.1.1.3 xc/lib/X11/GetTxtProp.c:1.2 --- xc/lib/X11/GetTxtProp.c:1.1.1.3 Tue Jan 16 17:07:36 2001 +++ xc/lib/X11/GetTxtProp.c Fri Dec 14 14:54:01 2001 @@ -1,4 +1,4 @@ -/* $Xorg: GetTxtProp.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ +/* $Xorg: GetTxtProp.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., @@ -25,7 +25,11 @@ Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetWAttrs.c diff -u xc/lib/X11/GetWAttrs.c:1.1.1.3 xc/lib/X11/GetWAttrs.c:1.2 --- xc/lib/X11/GetWAttrs.c:1.1.1.3 Tue Jan 16 17:07:36 2001 +++ xc/lib/X11/GetWAttrs.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GetWAttrs.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ +/* $Xorg: GetWAttrs.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetWMCMapW.c diff -u xc/lib/X11/GetWMCMapW.c:1.1.1.3 xc/lib/X11/GetWMCMapW.c:1.2 --- xc/lib/X11/GetWMCMapW.c:1.1.1.3 Tue Jan 16 17:07:36 2001 +++ xc/lib/X11/GetWMCMapW.c Fri Dec 14 14:54:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetWMCMapW.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ +/* $Xorg: GetWMCMapW.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GetWMProto.c diff -u xc/lib/X11/GetWMProto.c:1.1.1.3 xc/lib/X11/GetWMProto.c:1.2 --- xc/lib/X11/GetWMProto.c:1.1.1.3 Tue Jan 16 17:07:37 2001 +++ xc/lib/X11/GetWMProto.c Fri Dec 14 14:54:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetWMProto.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ +/* $Xorg: GetWMProto.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GrButton.c diff -u xc/lib/X11/GrButton.c:1.3 xc/lib/X11/GrButton.c:1.4 --- xc/lib/X11/GrButton.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/GrButton.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GrButton.c,v 1.3 2000/08/17 19:44:35 cpqbld Exp $ */ +/* $Xorg: GrButton.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GrButton.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GrButton.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/GrKey.c diff -u xc/lib/X11/GrKey.c:1.3 xc/lib/X11/GrKey.c:1.4 --- xc/lib/X11/GrKey.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/GrKey.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GrKey.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ +/* $Xorg: GrKey.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GrKey.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GrKey.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/GrKeybd.c diff -u xc/lib/X11/GrKeybd.c:1.1.1.3 xc/lib/X11/GrKeybd.c:1.2 --- xc/lib/X11/GrKeybd.c:1.1.1.3 Tue Jan 16 17:07:38 2001 +++ xc/lib/X11/GrKeybd.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GrKeybd.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ +/* $Xorg: GrKeybd.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GrPointer.c diff -u xc/lib/X11/GrPointer.c:1.1.1.3 xc/lib/X11/GrPointer.c:1.2 --- xc/lib/X11/GrPointer.c:1.1.1.3 Tue Jan 16 17:07:39 2001 +++ xc/lib/X11/GrPointer.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GrPointer.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ +/* $Xorg: GrPointer.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/GrServer.c diff -u xc/lib/X11/GrServer.c:1.3 xc/lib/X11/GrServer.c:1.4 --- xc/lib/X11/GrServer.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/GrServer.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: GrServer.c,v 1.3 2000/08/17 19:44:36 cpqbld Exp $ */ +/* $Xorg: GrServer.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/GrServer.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/GrServer.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Host.c diff -u xc/lib/X11/Host.c:1.3 xc/lib/X11/Host.c:1.4 --- xc/lib/X11/Host.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/Host.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Host.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ +/* $Xorg: Host.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Host.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Host.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ /* this might be rightly reguarded an os dependent file */ Index: xc/lib/X11/ICWrap.c diff -u xc/lib/X11/ICWrap.c:1.4 xc/lib/X11/ICWrap.c:1.7 --- xc/lib/X11/ICWrap.c:1.4 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/ICWrap.c Fri Dec 14 14:54:01 2001 @@ -1,5 +1,5 @@ /* - * $Xorg: ICWrap.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ + * $Xorg: ICWrap.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /* @@ -41,7 +41,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -60,7 +64,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/ICWrap.c,v 1.4 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ICWrap.c,v 1.7 2001/12/14 19:54:01 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" @@ -99,15 +103,8 @@ } } -#if NeedVarargsPrototypes static void _XIMCountVaList(va_list var, int *total_count) -#else -static void -_XIMCountVaList(var, total_count) - va_list var; - int *total_count; -#endif { char *attr; @@ -117,22 +114,14 @@ if (!strcmp(attr, XNVaNestedList)) { _XIMCountNestedList(va_arg(var, XIMArg*), total_count); } else { - va_arg(var, XIMArg*); + (void)va_arg(var, XIMArg*); ++(*total_count); } } } -#if NeedVarargsPrototypes static void _XIMVaToNestedList(va_list var, int max_count, XIMArg **args_return) -#else -static void -_XIMVaToNestedList(var, max_count, args_return) - va_list var; - int max_count; - XIMArg **args_return; -#endif { XIMArg *args; char *attr; @@ -159,40 +148,26 @@ } /*ARGSUSED*/ -#if NeedVarargsPrototypes XVaNestedList XVaCreateNestedList(int dummy, ...) -#else -XVaNestedList -XVaCreateNestedList(dummy, va_alist) - int dummy; - va_dcl -#endif { va_list var; XIMArg *args = NULL; int total_count; - Va_start(var, dummy); + va_start(var, dummy); _XIMCountVaList(var, &total_count); va_end(var); - Va_start(var, dummy); + va_start(var, dummy); _XIMVaToNestedList(var, total_count, &args); va_end(var); return (XVaNestedList)args; } -#if NeedVarargsPrototypes char * XSetIMValues(XIM im, ...) -#else /* NeedVarargsPrototypes */ -char * -XSetIMValues(im, va_alist) - XIM im; - va_dcl -#endif /* NeedVarargsPrototypes */ { va_list var; int total_count; @@ -202,14 +177,14 @@ /* * so count the stuff dangling here */ - Va_start(var, im); + va_start(var, im); _XIMCountVaList(var, &total_count); va_end(var); /* * now package it up so we can send it along */ - Va_start(var, im); + va_start(var, im); _XIMVaToNestedList(var, total_count, &args); va_end(var); @@ -218,15 +193,8 @@ return ret; } -#if NeedVarargsPrototypes char * XGetIMValues(XIM im, ...) -#else /* NeedVarargsPrototypes */ -char * -XGetIMValues(im, va_alist) - XIM im; - va_dcl -#endif /* NeedVarargsPrototypes */ { va_list var; int total_count; @@ -236,14 +204,14 @@ /* * so count the stuff dangling here */ - Va_start(var, im); + va_start(var, im); _XIMCountVaList(var, &total_count); va_end(var); /* * now package it up so we can send it along */ - Va_start(var, im); + va_start(var, im); _XIMVaToNestedList(var, total_count, &args); va_end(var); @@ -257,15 +225,8 @@ * and return a pointer to the input context. */ -#if NeedVarargsPrototypes XIC XCreateIC(XIM im, ...) -#else -XIC -XCreateIC(im, va_alist) - XIM im; /* specified the attached input method */ - va_dcl /* specified variable length argment list */ -#endif { va_list var; int total_count; @@ -275,14 +236,14 @@ /* * so count the stuff dangling here */ - Va_start(var, im); + va_start(var, im); _XIMCountVaList(var, &total_count); va_end(var); /* * now package it up so we can send it along */ - Va_start(var, im); + va_start(var, im); _XIMVaToNestedList(var, total_count, &args); va_end(var); @@ -317,15 +278,8 @@ Xfree ((char *) ic); } -#if NeedVarargsPrototypes char * XGetICValues(XIC ic, ...) -#else -char * -XGetICValues(ic, va_alist) - XIC ic; - va_dcl -#endif { va_list var; int total_count; @@ -338,14 +292,14 @@ /* * so count the stuff dangling here */ - Va_start(var, ic); + va_start(var, ic); _XIMCountVaList(var, &total_count); va_end(var); /* * now package it up so we can send it along */ - Va_start(var, ic); + va_start(var, ic); _XIMVaToNestedList(var, total_count, &args); va_end(var); @@ -354,15 +308,8 @@ return ret; } -#if NeedVarargsPrototypes char * XSetICValues(XIC ic, ...) -#else -char * -XSetICValues(ic, va_alist) - XIC ic; - va_dcl -#endif { va_list var; int total_count; @@ -375,14 +322,14 @@ /* * so count the stuff dangling here */ - Va_start(var, ic); + va_start(var, ic); _XIMCountVaList(var, &total_count); va_end(var); /* * now package it up so we can send it along */ - Va_start(var, ic); + va_start(var, ic); _XIMVaToNestedList(var, total_count, &args); va_end(var); Index: xc/lib/X11/IMWrap.c diff -u xc/lib/X11/IMWrap.c:3.7 xc/lib/X11/IMWrap.c:3.8 --- xc/lib/X11/IMWrap.c:3.7 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/IMWrap.c Fri Dec 14 14:54:01 2001 @@ -33,7 +33,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -53,7 +57,7 @@ */ -/* $XFree86: xc/lib/X11/IMWrap.c,v 3.7 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IMWrap.c,v 3.8 2001/12/14 19:54:01 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/Iconify.c diff -u xc/lib/X11/Iconify.c:1.1.1.3 xc/lib/X11/Iconify.c:1.2 --- xc/lib/X11/Iconify.c:1.1.1.3 Tue Jan 16 17:07:43 2001 +++ xc/lib/X11/Iconify.c Fri Dec 14 14:54:01 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Iconify.c,v 1.3 2000/08/17 19:44:37 cpqbld Exp $ */ +/* $Xorg: Iconify.c,v 1.4 2001/02/09 02:03:33 xorgcvs Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca. @@ -26,7 +26,11 @@ Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/IfEvent.c diff -u xc/lib/X11/IfEvent.c:1.3 xc/lib/X11/IfEvent.c:1.4 --- xc/lib/X11/IfEvent.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/IfEvent.c Fri Dec 14 14:54:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: IfEvent.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: IfEvent.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/IfEvent.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IfEvent.c,v 1.4 2001/12/14 19:54:01 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/ImText.c diff -u xc/lib/X11/ImText.c:1.3 xc/lib/X11/ImText.c:1.4 --- xc/lib/X11/ImText.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/ImText.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ImText.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: ImText.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImText.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImText.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/ImText16.c diff -u xc/lib/X11/ImText16.c:1.3 xc/lib/X11/ImText16.c:1.4 --- xc/lib/X11/ImText16.c:1.3 Wed Jan 17 14:41:37 2001 +++ xc/lib/X11/ImText16.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ImText16.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: ImText16.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImText16.c,v 1.3 2001/01/17 19:41:37 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImText16.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/ImUtil.c diff -u xc/lib/X11/ImUtil.c:3.7 xc/lib/X11/ImUtil.c:3.10 --- xc/lib/X11/ImUtil.c:3.7 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/ImUtil.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ImUtil.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: ImUtil.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ImUtil.c,v 3.7 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ImUtil.c,v 3.10 2001/12/14 19:54:02 dawes Exp $ */ #include #include @@ -29,12 +33,6 @@ /* PutImage.c */ extern int _XReverse_Bytes(); -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - #if NeedFunctionPrototypes static int _XDestroyImage(XImage *); static unsigned long _XGetPixel(XImage *, int, int); @@ -51,8 +49,8 @@ static int _XAddPixel(XImage *, long); #endif -static unsigned char Const _lomask[0x09] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff }; -static unsigned char Const _himask[0x09] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00 }; +static unsigned char const _lomask[0x09] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff }; +static unsigned char const _himask[0x09] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00 }; /* These two convenience routines return the scanline_pad and bits_per_pixel associated with a specific depth of ZPixmap format image for a @@ -450,7 +448,7 @@ * */ -static unsigned long Const low_bits_table[] = { +static unsigned long const low_bits_table[] = { 0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, @@ -524,7 +522,7 @@ } #ifndef WORD64 -static unsigned long Const byteorderpixel = MSBFirst << 24; +static CARD32 const byteorderpixel = MSBFirst << 24; #endif static unsigned long _XGetPixel32 (ximage, x, y) @@ -539,7 +537,7 @@ addr = &((unsigned char *)ximage->data) [y * ximage->bytes_per_line + (x << 2)]; #ifndef WORD64 - if (*((Const char *)&byteorderpixel) == ximage->byte_order) + if (*((const char *)&byteorderpixel) == ximage->byte_order) pixel = *((CARD32 *)addr); else #endif @@ -730,7 +728,7 @@ addr = &((unsigned char *)ximage->data) [y * ximage->bytes_per_line + (x << 2)]; #ifndef WORD64 - if (*((Const char *)&byteorderpixel) == ximage->byte_order) + if (*((const char *)&byteorderpixel) == ximage->byte_order) *((CARD32 *)addr) = pixel; else #endif @@ -996,14 +994,14 @@ #ifndef WORD64 } else if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 16) && - (*((Const char *)&byteorderpixel) == ximage->byte_order)) { + (*((const char *)&byteorderpixel) == ximage->byte_order)) { register unsigned short *dp = (unsigned short *) ximage->data; x = (ximage->bytes_per_line >> 1) * ximage->height; while (--x >= 0) *dp++ += value; } else if ((ximage->format == ZPixmap) && (ximage->bits_per_pixel == 32) && - (*((Const char *)&byteorderpixel) == ximage->byte_order)) { + (*((const char *)&byteorderpixel) == ximage->byte_order)) { register CARD32 *dp = (CARD32 *) ximage->data; x = (ximage->bytes_per_line >> 2) * ximage->height; while (--x >= 0) Index: xc/lib/X11/Imakefile diff -u xc/lib/X11/Imakefile:3.38 xc/lib/X11/Imakefile:3.43 --- xc/lib/X11/Imakefile:3.38 Tue May 1 06:35:05 2001 +++ xc/lib/X11/Imakefile Thu Dec 20 14:03:47 2001 @@ -3,7 +3,12 @@ -XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.38 2001/05/01 10:35:05 alanh Exp $ +XCOMM $XFree86: xc/lib/X11/Imakefile,v 3.43 2001/12/20 19:03:47 keithp Exp $ +#if BuildLoadableXlibI18n +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" +#define NoLibSubdirs +#endif #define DoNormalLib NormalLibX11 #define DoSharedLib SharedLibX11 @@ -15,6 +20,10 @@ #define HugeLibrary YES #define IncSubdir X11 +#if BuildLoadableXlibI18n +SUBDIRS = xlibi18n +#endif + #include #ifndef MotifBC @@ -22,8 +31,14 @@ #endif #ifdef SharedX11Reqs -REQUIREDLIBS = SharedX11Reqs +REQUIREDX11LIBS = SharedX11Reqs #endif +#if BuildLoadableXlibI18n +REQUIREDI18NLIBS = DlLibrary +#endif + +REQUIREDLIBS=$(REQUIREDX11LIBS) $(REQUIREDI18NLIBS) + #if defined(MacIIArchitecture) || defined(SequentArchitecture) || defined(i386ScoArchitecture) XBSDLIB = /**/ #endif @@ -773,10 +788,17 @@ ximtrans.o \ $(XKBOBJS) $(LCOBJS) $(MISCOBJS) -LCSRCS = \ - SetLocale.c \ +#if BuildLoadableXlibI18n +LCDEPSYMSRCS = XlcDL.c XlcSL.c +LC_DYNDEFINES = -DUSE_DYNAMIC_LC + +I18NSTATICSRCS = \ + XDefaultIMIF.c XDefaultOMIF.c +#else +LCDEPSYMSRCS = + +I18NSTATICSRCS = \ imCallbk.c \ - imConv.c \ imDefFlt.c \ imDefIc.c \ imDefIm.c \ @@ -787,7 +809,6 @@ imImSw.c \ imInsClbk.c \ imInt.c \ - imKStoUCS.c \ imLcFlt.c \ imLcGIc.c \ imLcIc.c \ @@ -803,39 +824,52 @@ imTrX.c \ imTransR.c \ imTrans.c \ + lcEuc.c \ + lcGenConv.c \ + lcJis.c \ + lcSjis.c \ + lcUTF8Load.c \ + omDefault.c \ + omGeneric.c \ + omImText.c \ + omText.c \ + omTextEsc.c \ + omTextExt.c \ + omTextPer.c \ + omXChar.c +#endif + +LCSRCS = \ + SetLocale.c \ + $(LCDEPSYMSRCS) \ + imConv.c \ + imKStoUCS.c \ lcCT.c \ lcCharSet.c \ lcConv.c \ lcDB.c \ lcDefConv.c \ - lcEuc.c \ lcFile.c \ - lcGenConv.c \ lcGeneric.c \ lcInit.c \ - lcJis.c \ lcPrTxt.c \ lcPubWrap.c \ lcPublic.c \ lcRM.c \ - lcSjis.c \ lcStd.c \ lcTxtPr.c \ - lcUTF8.c \ lcUtil.c \ - omDefault.c \ - omGeneric.c \ - omImText.c \ - omText.c \ - omTextEsc.c \ - omTextExt.c \ - omTextPer.c \ - omXChar.c + lcUTF8.c \ + $(I18NSTATICSRCS) -LCOBJS = \ - SetLocale.o \ +#if BuildLoadableXlibI18n +LCDEPOBJS = XlcDL.o XlcSL.o +I18NSTATICOBJS = \ + XDefaultIMIF.o XDefaultOMIF.o +#else +LCDEPOBJS = +I18NSTATICOBJS = \ imCallbk.o \ - imConv.o \ imDefFlt.o \ imDefIc.o \ imDefIm.o \ @@ -846,7 +880,6 @@ imImSw.o \ imInsClbk.o \ imInt.o \ - imKStoUCS.o \ imLcFlt.o \ imLcGIc.o \ imLcIc.o \ @@ -862,34 +895,43 @@ imTrX.o \ imTransR.o \ imTrans.o \ + lcEuc.o \ + lcGenConv.o \ + lcJis.o \ + lcSjis.o \ + lcUTF8Load.o \ + omDefault.o \ + omGeneric.o \ + omImText.o \ + omText.o \ + omTextEsc.o \ + omTextExt.o \ + omTextPer.o \ + omXChar.o +#endif + +LCOBJS = \ + SetLocale.o \ + $(LCDEPOBJS) \ + imConv.o \ + imKStoUCS.o \ lcCT.o \ lcCharSet.o \ lcConv.o \ lcDB.o \ lcDefConv.o \ - lcEuc.o \ lcFile.o \ - lcGenConv.o \ lcGeneric.o \ lcInit.o \ - lcJis.o \ lcPrTxt.o \ lcPubWrap.o \ lcPublic.o \ lcRM.o \ - lcSjis.o \ lcStd.o \ lcTxtPr.o \ - lcUTF8.o \ lcUtil.o \ - omDefault.o \ - omGeneric.o \ - omImText.o \ - omText.o \ - omTextEsc.o \ - omTextExt.o \ - omTextPer.o \ - omXChar.o + lcUTF8.o \ + $(I18NSTATICOBJS) #ifdef OS2Architecture MISCSRCS = os2Stubs.c @@ -901,10 +943,6 @@ OBJS = $(OBJS1) $(OBJS2) $(OBJS3) -#if UseCygIPC -REQUIREDLIBS = -lcygipc -#endif - #if !BuildServersOnly || XnestServer || BuildGLXLibrary || BuildClients #include @@ -936,9 +974,10 @@ #if HasKrb5 SpecialCLibObjectRule(k5encode,$(_NOOP_),$(K5INCL)) #endif -#ifdef MinixArchitecture -SpecialCLibObjectRule(IMWrap,$(ICONFIGFILES),-DX11_TINY_IM) -SpecialCLibObjectRule(lcInit,$(ICONFIGFILES),-DX11_TINY_LC) +#if BuildLoadableXlibI18n +SpecialCLibObjectRule(lcInit,$(ICONFIGFILES),$(LC_DYNDEFINES)) +SpecialCLibObjectRule(lcGeneric,$(ICONFIGFILES),$(LC_DYNDEFINES)) +SpecialCLibObjectRule(lcPublic,$(ICONFIGFILES),$(LC_DYNDEFINES)) #endif #if InstallXcmsTxt @@ -968,21 +1007,34 @@ MAKEKEYS = ./makekeys +#if CrossCompiling +HOST_LDLIBS= +#else +HOST_LDLIBS=$(LDLIBS) +#endif + ks_tables.h: $(XINCLUDESRC)/keysymdef.h util/makekeys.c - RemoveFiles($@ ProgramTargetName(makekeys) makekeys.Osuf) - -HostLinkRule(ProgramTargetName(makekeys),$(CFLAGS) $(LOCAL_LDFLAGS),util/makekeys.c,$(LDLIBS)) + RemoveFiles($@ HostProgramTargetName(makekeys) makekeys.Osuf) + -HostLinkRule(HostProgramTargetName(makekeys),$(CFLAGS) $(LOCAL_LDFLAGS),util/makekeys.c,$(HOST_LDLIBS)) RunProgram(MAKEKEYS,< $(XINCLUDESRC)/keysymdef.h > ks_tables_h) $(MV) ks_tables_h $@ - RemoveFiles(ProgramTargetName(makekeys) makekeys.Osuf ks_tables_h) + RemoveFiles(HostProgramTargetName(makekeys) makekeys.Osuf ks_tables_h) includes:: ks_tables.h depend:: ks_tables.h clean:: - RemoveFiles(ks_tables_h ks_tables.h ProgramTargetName(makekeys)) + RemoveFiles(ks_tables_h ks_tables.h HostProgramTargetName(makekeys)) DependTarget3($(SRCS1),$(SRCS2),$(SRCS3)) + +#if BuildLoadableXlibI18n +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +MakeLintLibSubdirs($(LINTSUBDIRS)) +MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) +#endif #else all:: Index: xc/lib/X11/InitExt.c diff -u xc/lib/X11/InitExt.c:1.5 xc/lib/X11/InitExt.c:1.7 --- xc/lib/X11/InitExt.c:1.5 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/InitExt.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: InitExt.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: InitExt.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,16 +26,12 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/InitExt.c,v 1.5 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/InitExt.c,v 1.7 2001/12/14 19:54:02 dawes Exp $ */ #include #include #include -extern Bool _XUnknownWireEvent(); -extern Status _XUnknownNativeEvent(); -extern Bool _XDefaultWireError(); - /* * This routine is used to link a extension in so it will be called * at appropriate times. @@ -92,9 +92,9 @@ return (&ext->codes); /* tell him which extension */ } -static _XExtension *XLookupExtension (dpy, extension) - register Display *dpy; /* display */ - register int extension; /* extension number */ +static _XExtension *XLookupExtension ( + register Display *dpy, /* display */ + register int extension) /* extension number */ { register _XExtension *ext; for (ext = dpy->ext_procs; ext; ext = ext->next) @@ -139,7 +139,7 @@ CreateGCType proc; /* routine to call when GC created */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register CreateGCType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->create_GC; @@ -154,7 +154,7 @@ CopyGCType proc; /* routine to call when GC copied */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register CopyGCType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->copy_GC; @@ -169,7 +169,7 @@ FlushGCType proc; /* routine to call when GC copied */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register FlushGCType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->flush_GC; @@ -184,7 +184,7 @@ FreeGCType proc; /* routine to call when GC freed */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register FreeGCType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->free_GC; @@ -199,7 +199,7 @@ CreateFontType proc; /* routine to call when font created */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register CreateFontType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->create_Font; @@ -214,7 +214,7 @@ FreeFontType proc; /* routine to call when font freed */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register FreeFontType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->free_Font; @@ -229,7 +229,7 @@ CloseDisplayType proc; /* routine to call when display closed */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register CloseDisplayType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->close_display; @@ -251,7 +251,7 @@ WireToEventType proc; /* routine to call when converting event */ int event_number; /* event routine to replace */ { - register Bool (*oldproc)(); + register WireToEventType oldproc; if (proc == NULL) proc = (WireToEventType)_XUnknownWireEvent; LockDisplay (dpy); oldproc = dpy->event_vec[event_number]; @@ -273,7 +273,7 @@ EventToWireType proc; /* routine to call when converting event */ int event_number; /* event routine to replace */ { - register Status (*oldproc)(); + register EventToWireType oldproc; if (proc == NULL) proc = (EventToWireType) _XUnknownNativeEvent; LockDisplay (dpy); oldproc = dpy->wire_vec[event_number]; @@ -295,12 +295,12 @@ WireToErrorType proc; /* routine to call when converting error */ int error_number; /* error routine to replace */ { - register Bool (*oldproc)(); + register WireToErrorType oldproc = NULL; if (proc == NULL) proc = (WireToErrorType)_XDefaultWireError; LockDisplay (dpy); if (!dpy->error_vec) { int i; - dpy->error_vec = (Bool (**)())Xmalloc(256 * sizeof(oldproc)); + dpy->error_vec = Xmalloc(256 * sizeof(oldproc)); for (i = 1; i < 256; i++) dpy->error_vec[i] = _XDefaultWireError; } @@ -318,7 +318,7 @@ ErrorType proc; /* routine to call when X error happens */ { register _XExtension *e; /* for lookup of extension */ - register int (*oldproc)(); + register ErrorType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->error; @@ -333,7 +333,7 @@ ErrorStringType proc; /* routine to call when I/O error happens */ { register _XExtension *e; /* for lookup of extension */ - register char *(*oldproc)(); + register ErrorStringType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->error_string; @@ -348,7 +348,7 @@ PrintErrorType proc; /* routine to call to print */ { register _XExtension *e; /* for lookup of extension */ - register void (*oldproc)(); + register PrintErrorType oldproc; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); oldproc = e->error_values; @@ -363,7 +363,7 @@ BeforeFlushType proc; /* routine to call on flush */ { register _XExtension *e; /* for lookup of extension */ - register void (*oldproc)(); + register BeforeFlushType oldproc; register _XExtension *ext; if ((e = XLookupExtension (dpy, extension)) == NULL) return (NULL); LockDisplay(dpy); Index: xc/lib/X11/InsCmap.c diff -u xc/lib/X11/InsCmap.c:1.3 xc/lib/X11/InsCmap.c:1.4 --- xc/lib/X11/InsCmap.c:1.3 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/InsCmap.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: InsCmap.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: InsCmap.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/InsCmap.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/InsCmap.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/IntAtom.c diff -u xc/lib/X11/IntAtom.c:1.3 xc/lib/X11/IntAtom.c:1.6 --- xc/lib/X11/IntAtom.c:1.3 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/IntAtom.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: IntAtom.c,v 1.4 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: IntAtom.c,v 1.5 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,28 +26,12 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/IntAtom.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/IntAtom.c,v 1.6 2001/12/14 19:54:02 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" +#include "Xintatom.h" -/* XXX this table def is duplicated in GetAtomNm.c, keep them consistent! */ - -#define TABLESIZE 64 - -typedef struct _Entry { - unsigned long sig; - Atom atom; -} EntryRec, *Entry; - -#define RESERVED ((Entry) 1) - -#define EntryName(e) ((char *)(e+1)) - -typedef struct _XDisplayAtoms { - Entry table[TABLESIZE]; -} AtomTable; - #define HASH(sig) ((sig) & (TABLESIZE-1)) #define REHASHVAL(sig) ((((sig) % (TABLESIZE-3)) + 2) | 1) #define REHASH(idx,rehash) ((idx + rehash) & (TABLESIZE-1)) @@ -67,20 +55,20 @@ } static -Atom _XInternAtom(dpy, name, onlyIfExists, psig, pidx, pn) - Display *dpy; - char *name; - Bool onlyIfExists; - unsigned long *psig; - int *pidx; - int *pn; +Atom _XInternAtom( + Display *dpy, + _Xconst char *name, + Bool onlyIfExists, + unsigned long *psig, + int *pidx, + int *pn) { register AtomTable *atoms; register char *s1, c, *s2; register unsigned long sig; - register int idx, i; + register int idx = 0, i; Entry e; - int n, firstidx, rehash; + int n, firstidx, rehash = 0; xInternAtomReq *req; /* look in the cache first */ @@ -127,7 +115,7 @@ void _XUpdateAtomCache(dpy, name, atom, sig, idx, n) Display *dpy; - char *name; + const char *name; Atom atom; unsigned long sig; int idx; @@ -174,7 +162,7 @@ #if NeedFunctionPrototypes Atom XInternAtom ( Display *dpy, - _Xconst char *name, + const char *name, Bool onlyIfExists) #else Atom XInternAtom (dpy, name, onlyIfExists) @@ -216,15 +204,15 @@ } _XIntAtomState; static -Bool _XIntAtomHandler(dpy, rep, buf, len, data) - register Display *dpy; - register xReply *rep; - char *buf; - int len; - XPointer data; +Bool _XIntAtomHandler( + register Display *dpy, + register xReply *rep, + char *buf, + int len, + XPointer data) { register _XIntAtomState *state; - register int i, idx; + register int i, idx = 0; xInternAtomReply replbuf; register xInternAtomReply *repl; Index: xc/lib/X11/KeyBind.c diff -u xc/lib/X11/KeyBind.c:1.4 xc/lib/X11/KeyBind.c:1.5 --- xc/lib/X11/KeyBind.c:1.4 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/KeyBind.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: KeyBind.c,v 1.3 2000/08/17 19:44:38 cpqbld Exp $ */ +/* $Xorg: KeyBind.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KeyBind.c,v 1.4 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KeyBind.c,v 1.5 2001/12/14 19:54:02 dawes Exp $ */ /* Beware, here be monsters (still under construction... - JG */ Index: xc/lib/X11/KeysymStr.c diff -u xc/lib/X11/KeysymStr.c:3.6 xc/lib/X11/KeysymStr.c:3.8 --- xc/lib/X11/KeysymStr.c:3.6 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/KeysymStr.c Fri Dec 14 14:54:02 2001 @@ -1,10 +1,14 @@ -/* $Xorg: KeysymStr.c,v 1.4 2000/08/17 19:44:39 cpqbld Exp $ */ +/* $Xorg: KeysymStr.c,v 1.5 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KeysymStr.c,v 3.6 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KeysymStr.c,v 3.8 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" #include @@ -29,19 +33,13 @@ #include /* sprintf */ -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - typedef unsigned long Signature; #define NEEDVTABLE #include "ks_tables.h" extern XrmDatabase _XInitKeysymDB(); -extern Const unsigned char _XkeyTable[]; +extern const unsigned char _XkeyTable[]; typedef struct _GRNData { @@ -87,7 +85,7 @@ register int i, n; int h; register int idx; - Const unsigned char *entry; + const unsigned char *entry; unsigned char val1, val2; XrmDatabase keysymdb; Index: xc/lib/X11/KillCl.c diff -u xc/lib/X11/KillCl.c:1.3 xc/lib/X11/KillCl.c:1.4 --- xc/lib/X11/KillCl.c:1.3 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/KillCl.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: KillCl.c,v 1.3 2000/08/17 19:44:39 cpqbld Exp $ */ +/* $Xorg: KillCl.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/KillCl.c,v 1.3 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/KillCl.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/LRGB.c diff -u xc/lib/X11/LRGB.c:3.4 xc/lib/X11/LRGB.c:3.5 --- xc/lib/X11/LRGB.c:3.4 Wed Jan 17 14:41:38 2001 +++ xc/lib/X11/LRGB.c Wed Jul 25 11:04:44 2001 @@ -35,7 +35,7 @@ * 4. RGB intensity to CIE XYZ * */ -/* $XFree86: xc/lib/X11/LRGB.c,v 3.4 2001/01/17 19:41:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LRGB.c,v 3.5 2001/07/25 15:04:44 dawes Exp $ */ #include #include @@ -43,12 +43,6 @@ #include "Xlibint.h" #include "Xcmsint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - /* * EXTERNS * External declarations required locally to this package @@ -105,7 +99,7 @@ * static int ExampleLocalVar; */ -static unsigned short Const MASK[17] = { +static unsigned short const MASK[17] = { 0x0000, /* 0 bitsPerRGB */ 0x8000, /* 1 bitsPerRGB */ 0xc000, /* 2 bitsPerRGB */ @@ -235,7 +229,7 @@ * MODEL Tek4300, Tek4800 */ -static IntensityRec Const Default_RGB_RedTuples[] = { +static IntensityRec const Default_RGB_RedTuples[] = { /* {unsigned short value, XcmsFloat intensity} */ { 0x0000, 0.000000 }, { 0x0909, 0.000000 }, @@ -291,7 +285,7 @@ { 0xffff, 1.000000 } }; -static IntensityRec Const Default_RGB_GreenTuples[] = { +static IntensityRec const Default_RGB_GreenTuples[] = { /* {unsigned short value, XcmsFloat intensity} */ { 0x0000, 0.000000 }, { 0x1313, 0.000000 }, @@ -345,7 +339,7 @@ { 0xffff, 1.000000 } }; -static IntensityRec Const Default_RGB_BlueTuples[] = { +static IntensityRec const Default_RGB_BlueTuples[] = { /* {unsigned short value, XcmsFloat intensity} */ { 0x0000, 0.000000 }, { 0x0e0e, 0.000000 }, Index: xc/lib/X11/LiHosts.c diff -u xc/lib/X11/LiHosts.c:1.4 xc/lib/X11/LiHosts.c:1.5 --- xc/lib/X11/LiHosts.c:1.4 Wed Jan 17 14:41:39 2001 +++ xc/lib/X11/LiHosts.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: LiHosts.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: LiHosts.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/LiICmaps.c diff -u xc/lib/X11/LiICmaps.c:1.3 xc/lib/X11/LiICmaps.c:1.4 --- xc/lib/X11/LiICmaps.c:1.3 Wed Jan 17 14:41:39 2001 +++ xc/lib/X11/LiICmaps.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: LiICmaps.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: LiICmaps.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LiICmaps.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LiICmaps.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/LiProps.c diff -u xc/lib/X11/LiProps.c:1.3 xc/lib/X11/LiProps.c:1.4 --- xc/lib/X11/LiProps.c:1.3 Wed Jan 17 14:41:39 2001 +++ xc/lib/X11/LiProps.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: LiProps.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: LiProps.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LiProps.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LiProps.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/ListExt.c diff -u xc/lib/X11/ListExt.c:1.3 xc/lib/X11/ListExt.c:1.4 --- xc/lib/X11/ListExt.c:1.3 Wed Jan 17 14:41:39 2001 +++ xc/lib/X11/ListExt.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ListExt.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: ListExt.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ListExt.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ListExt.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/LoadFont.c diff -u xc/lib/X11/LoadFont.c:1.1.1.3 xc/lib/X11/LoadFont.c:1.4 --- xc/lib/X11/LoadFont.c:1.1.1.3 Tue Jan 16 17:07:50 2001 +++ xc/lib/X11/LoadFont.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: LoadFont.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: LoadFont.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,6 +24,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/LoadFont.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" @@ -36,6 +41,10 @@ register long nbytes; Font fid; register xOpenFontReq *req; + + if (_XF86LoadQueryLocaleFont(dpy, name, (XFontStruct **)0, &fid)) + return fid; + LockDisplay(dpy); GetReq(OpenFont, req); nbytes = req->nbytes = name ? strlen(name) : 0; Index: xc/lib/X11/LockDis.c diff -u xc/lib/X11/LockDis.c:1.1.1.3 xc/lib/X11/LockDis.c:1.2 --- xc/lib/X11/LockDis.c:1.1.1.3 Tue Jan 16 17:07:50 2001 +++ xc/lib/X11/LockDis.c Fri Dec 14 14:54:02 2001 @@ -1,10 +1,14 @@ -/* $Xorg: LockDis.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: LockDis.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/LookupCol.c diff -u xc/lib/X11/LookupCol.c:1.3 xc/lib/X11/LookupCol.c:1.4 --- xc/lib/X11/LookupCol.c:1.3 Wed Jan 17 14:41:39 2001 +++ xc/lib/X11/LookupCol.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: LookupCol.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: LookupCol.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LookupCol.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LookupCol.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/LowerWin.c diff -u xc/lib/X11/LowerWin.c:1.3 xc/lib/X11/LowerWin.c:1.4 --- xc/lib/X11/LowerWin.c:1.3 Wed Jan 17 14:41:39 2001 +++ xc/lib/X11/LowerWin.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: LowerWin.c,v 1.3 2000/08/17 19:44:40 cpqbld Exp $ */ +/* $Xorg: LowerWin.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/LowerWin.c,v 1.3 2001/01/17 19:41:39 dawes Exp $ */ +/* $XFree86: xc/lib/X11/LowerWin.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Macros.c diff -u xc/lib/X11/Macros.c:1.3 xc/lib/X11/Macros.c:1.4 --- xc/lib/X11/Macros.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/Macros.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Macros.c,v 1.3 2000/08/17 19:44:45 cpqbld Exp $ */ +/* $Xorg: Macros.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Macros.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Macros.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" /* Index: xc/lib/X11/MapRaised.c diff -u xc/lib/X11/MapRaised.c:1.3 xc/lib/X11/MapRaised.c:1.4 --- xc/lib/X11/MapRaised.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/MapRaised.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: MapRaised.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ +/* $Xorg: MapRaised.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MapRaised.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MapRaised.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/MapSubs.c diff -u xc/lib/X11/MapSubs.c:1.3 xc/lib/X11/MapSubs.c:1.4 --- xc/lib/X11/MapSubs.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/MapSubs.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: MapSubs.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ +/* $Xorg: MapSubs.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MapSubs.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MapSubs.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/MapWindow.c diff -u xc/lib/X11/MapWindow.c:1.3 xc/lib/X11/MapWindow.c:1.4 --- xc/lib/X11/MapWindow.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/MapWindow.c Fri Dec 14 14:54:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: MapWindow.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ +/* $Xorg: MapWindow.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MapWindow.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MapWindow.c,v 1.4 2001/12/14 19:54:02 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/MaskEvent.c diff -u xc/lib/X11/MaskEvent.c:3.3 xc/lib/X11/MaskEvent.c:3.6 --- xc/lib/X11/MaskEvent.c:3.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/MaskEvent.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: MaskEvent.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ +/* $Xorg: MaskEvent.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,18 +24,12 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MaskEvent.c,v 3.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MaskEvent.c,v 3.6 2001/12/14 19:54:03 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - -extern long Const _Xevent_to_mask[]; +extern long const _Xevent_to_mask[]; #define AllPointers (PointerMotionMask|PointerMotionHintMask|ButtonMotionMask) #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ Button4MotionMask|Button5MotionMask) @@ -49,7 +47,7 @@ register XEvent *event; /* XEvent to be filled in. */ { register _XQEvent *prev, *qelt; - unsigned long qe_serial; + unsigned long qe_serial = 0; LockDisplay(dpy); prev = NULL; Index: xc/lib/X11/Misc.c diff -u xc/lib/X11/Misc.c:1.3 xc/lib/X11/Misc.c:1.4 --- xc/lib/X11/Misc.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/Misc.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Misc.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ +/* $Xorg: Misc.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Misc.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Misc.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ModMap.c diff -u xc/lib/X11/ModMap.c:1.3 xc/lib/X11/ModMap.c:1.4 --- xc/lib/X11/ModMap.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/ModMap.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ModMap.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ +/* $Xorg: ModMap.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ModMap.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ModMap.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/MoveWin.c diff -u xc/lib/X11/MoveWin.c:1.3 xc/lib/X11/MoveWin.c:1.4 --- xc/lib/X11/MoveWin.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/MoveWin.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: MoveWin.c,v 1.3 2000/08/17 19:44:46 cpqbld Exp $ */ +/* $Xorg: MoveWin.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/MoveWin.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/MoveWin.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/NextEvent.c diff -u xc/lib/X11/NextEvent.c:1.3 xc/lib/X11/NextEvent.c:1.4 --- xc/lib/X11/NextEvent.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/NextEvent.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: NextEvent.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ +/* $Xorg: NextEvent.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/NextEvent.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/NextEvent.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/OCWrap.c diff -u xc/lib/X11/OCWrap.c:1.3 xc/lib/X11/OCWrap.c:1.4 --- xc/lib/X11/OCWrap.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/OCWrap.c Wed Jul 25 11:04:44 2001 @@ -23,31 +23,24 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/OCWrap.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OCWrap.c,v 1.4 2001/07/25 15:04:44 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" -#if NeedVarargsPrototypes XOC XCreateOC(XOM om, ...) -#else -XOC -XCreateOC(om, va_alist) - XOM om; - va_dcl -#endif { va_list var; XlcArgList args; XOC oc; int num_args; - Va_start(var, om); + va_start(var, om); _XlcCountVaList(var, &num_args); va_end(var); - Va_start(var, om); + va_start(var, om); _XlcVaToArgList(var, num_args, &args); va_end(var); @@ -95,26 +88,19 @@ return oc->core.om; } -#if NeedVarargsPrototypes char * XSetOCValues(XOC oc, ...) -#else -char * -XSetOCValues(oc, va_alist) - XOC oc; - va_dcl -#endif { va_list var; XlcArgList args; char *ret; int num_args; - Va_start(var, oc); + va_start(var, oc); _XlcCountVaList(var, &num_args); va_end(var); - Va_start(var, oc); + va_start(var, oc); _XlcVaToArgList(var, num_args, &args); va_end(var); @@ -128,26 +114,19 @@ return ret; } -#if NeedVarargsPrototypes char * XGetOCValues(XOC oc, ...) -#else -char * -XGetOCValues(oc, va_alist) - XOC oc; - va_dcl -#endif { va_list var; XlcArgList args; char *ret; int num_args; - Va_start(var, oc); + va_start(var, oc); _XlcCountVaList(var, &num_args); va_end(var); - Va_start(var, oc); + va_start(var, oc); _XlcVaToArgList(var, num_args, &args); va_end(var); Index: xc/lib/X11/OMWrap.c diff -u xc/lib/X11/OMWrap.c:1.3 xc/lib/X11/OMWrap.c:1.4 --- xc/lib/X11/OMWrap.c:1.3 Wed Jan 17 14:41:40 2001 +++ xc/lib/X11/OMWrap.c Wed Jul 25 11:04:44 2001 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/OMWrap.c,v 1.3 2001/01/17 19:41:40 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OMWrap.c,v 1.4 2001/07/25 15:04:44 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -72,26 +72,19 @@ return (*om->methods->close)(om); } -#if NeedVarargsPrototypes char * XSetOMValues(XOM om, ...) -#else -char * -XSetOMValues(om, va_alist) - XOM om; - va_dcl -#endif { va_list var; XlcArgList args; char *ret; int num_args; - Va_start(var, om); + va_start(var, om); _XlcCountVaList(var, &num_args); va_end(var); - Va_start(var, om); + va_start(var, om); _XlcVaToArgList(var, num_args, &args); va_end(var); @@ -105,26 +98,19 @@ return ret; } -#if NeedVarargsPrototypes char * XGetOMValues(XOM om, ...) -#else -char * -XGetOMValues(om, va_alist) - XOM om; - va_dcl -#endif { va_list var; XlcArgList args; char *ret; int num_args; - Va_start(var, om); + va_start(var, om); _XlcCountVaList(var, &num_args); va_end(var); - Va_start(var, om); + va_start(var, om); _XlcVaToArgList(var, num_args, &args); va_end(var); Index: xc/lib/X11/OpenDis.c diff -u xc/lib/X11/OpenDis.c:3.9 xc/lib/X11/OpenDis.c:3.12 --- xc/lib/X11/OpenDis.c:3.9 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/OpenDis.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: OpenDis.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ +/* $Xorg: OpenDis.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/OpenDis.c,v 3.9 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/OpenDis.c,v 3.12 2001/12/14 19:54:03 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -29,15 +33,12 @@ #include #include "bigreqstr.h" #include +#include "Xintconn.h" #ifdef XKB #include "XKBlib.h" #endif /* XKB */ -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif - #ifdef X_NOT_POSIX #define Size_t unsigned int #else @@ -51,14 +52,14 @@ int opcode; } _XBigReqState; -extern int _Xdebug; #ifdef WIN32 int *_Xdebug_p = &_Xdebug; #endif #ifdef XTHREADS -int (*_XInitDisplayLock_fn)() = NULL; -void (*_XFreeDisplayLock_fn)() = NULL; +#include "locking.h" +int (*_XInitDisplayLock_fn)(Display *dpy) = NULL; +void (*_XFreeDisplayLock_fn)(Display *dpy) = NULL; #define InitDisplayLock(d) (_XInitDisplayLock_fn ? (*_XInitDisplayLock_fn)(d) : Success) #define FreeDisplayLock(d) if (_XFreeDisplayLock_fn) (*_XFreeDisplayLock_fn)(d) @@ -70,22 +71,10 @@ static xReq _dummy_request = { 0, 0, 0 }; - -static void OutOfMemory(); -static Bool _XBigReqHandler(); - -extern Bool _XWireToEvent(); -extern Status _XUnknownNativeEvent(); -extern Bool _XUnknownWireEvent(); - -/* XlibInt.c */ -extern Bool _XPollfdCacheInit(); - -/* ConnDis.c */ -extern int _XDisconnectDisplay(); -/* FreeEData.c */ -extern int _XFreeExtData(); +static void OutOfMemory(Display *dpy, char *setup); +static Bool _XBigReqHandler(Display *dpy, xReply *rep, char *buf, int len, + XPointer data); /* * Connects to a server, creates a Display object and returns a pointer to @@ -125,10 +114,6 @@ char *conn_auth_name, *conn_auth_data; int conn_auth_namelen, conn_auth_datalen; unsigned long mask; - extern Bool _XSendClientPrefix(); - extern XtransConnInfo _X11TransConnectDisplay(); - extern XID _XAllocID(); - extern void _XAllocIDs(); bzero((char *) &client, sizeof(client)); bzero((char *) &prefix, sizeof(prefix)); Index: xc/lib/X11/ParseCmd.c diff -u xc/lib/X11/ParseCmd.c:1.3 xc/lib/X11/ParseCmd.c:1.5 --- xc/lib/X11/ParseCmd.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/ParseCmd.c Fri Dec 14 14:54:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ParseCmd.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ +/* $Xorg: ParseCmd.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/ParseCmd.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ParseCmd.c,v 1.5 2001/12/14 19:54:03 dawes Exp $ */ /* XrmParseCommand() @@ -58,9 +62,7 @@ #include -static void _XReportParseError(arg, msg) - XrmOptionDescRec *arg; - char *msg; +static void _XReportParseError(XrmOptionDescRec *arg, char *msg) { (void) fprintf(stderr, "Error parsing argument \"%s\" (%s); %s\n", arg->option, arg->specifier, msg); @@ -92,7 +94,7 @@ XrmQuark quarks[100]; XrmBinding *start_bindings; XrmQuark *start_quarks; - char *optP, *argP, optchar, argchar; + char *optP, *argP = NULL, optchar, argchar = 0; int matches; enum {DontCare, Check, NotSorted, Sorted} table_is_sorted; char **argend; Index: xc/lib/X11/ParseCol.c diff -u xc/lib/X11/ParseCol.c:1.3 xc/lib/X11/ParseCol.c:1.4 --- xc/lib/X11/ParseCol.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/ParseCol.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ParseCol.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ +/* $Xorg: ParseCol.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ParseCol.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ParseCol.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #define NEED_REPLIES #include Index: xc/lib/X11/ParseGeom.c diff -u xc/lib/X11/ParseGeom.c:1.1.1.3 xc/lib/X11/ParseGeom.c:1.3 --- xc/lib/X11/ParseGeom.c:1.1.1.3 Tue Jan 16 17:07:56 2001 +++ xc/lib/X11/ParseGeom.c Fri Dec 14 14:54:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ParseGeom.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ +/* $Xorg: ParseGeom.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1987,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,6 +27,7 @@ from The Open Group. */ +/* $XFree86: xc/lib/X11/ParseGeom.c,v 1.3 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" @@ -58,9 +63,7 @@ */ static int -ReadInteger(string, NextString) -register char *string; -char **NextString; +ReadInteger(char *string, char **NextString) { register int Result = 0; int Sign = 1; @@ -99,8 +102,8 @@ { int mask = NoValue; register char *strind; - unsigned int tempWidth, tempHeight; - int tempX, tempY; + unsigned int tempWidth = 0, tempHeight = 0; + int tempX = 0, tempY = 0; char *nextCharacter; if ( (string == NULL) || (*string == '\0')) return(mask); Index: xc/lib/X11/PeekEvent.c diff -u xc/lib/X11/PeekEvent.c:1.3 xc/lib/X11/PeekEvent.c:1.4 --- xc/lib/X11/PeekEvent.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PeekEvent.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PeekEvent.c,v 1.3 2000/08/17 19:44:47 cpqbld Exp $ */ +/* $Xorg: PeekEvent.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PeekEvent.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PeekEvent.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/PeekIfEv.c diff -u xc/lib/X11/PeekIfEv.c:1.3 xc/lib/X11/PeekIfEv.c:1.4 --- xc/lib/X11/PeekIfEv.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PeekIfEv.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PeekIfEv.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PeekIfEv.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PeekIfEv.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PeekIfEv.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" Index: xc/lib/X11/Pending.c diff -u xc/lib/X11/Pending.c:1.1.1.3 xc/lib/X11/Pending.c:1.2 --- xc/lib/X11/Pending.c:1.1.1.3 Tue Jan 16 17:07:57 2001 +++ xc/lib/X11/Pending.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Pending.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: Pending.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/PixFormats.c diff -u xc/lib/X11/PixFormats.c:1.1.1.3 xc/lib/X11/PixFormats.c:1.2 --- xc/lib/X11/PixFormats.c:1.1.1.3 Tue Jan 16 17:07:57 2001 +++ xc/lib/X11/PixFormats.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PixFormats.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PixFormats.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/PmapBgnd.c diff -u xc/lib/X11/PmapBgnd.c:1.3 xc/lib/X11/PmapBgnd.c:1.4 --- xc/lib/X11/PmapBgnd.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PmapBgnd.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PmapBgnd.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PmapBgnd.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PmapBgnd.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PmapBgnd.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/PmapBord.c diff -u xc/lib/X11/PmapBord.c:1.3 xc/lib/X11/PmapBord.c:1.4 --- xc/lib/X11/PmapBord.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PmapBord.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PmapBord.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PmapBord.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PmapBord.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PmapBord.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/PolyReg.c diff -u xc/lib/X11/PolyReg.c:1.5 xc/lib/X11/PolyReg.c:1.6 --- xc/lib/X11/PolyReg.c:1.5 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PolyReg.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PolyReg.c,v 1.4 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PolyReg.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /************************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ************************************************************************/ -/* $XFree86: xc/lib/X11/PolyReg.c,v 1.5 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PolyReg.c,v 1.6 2001/12/14 19:54:03 dawes Exp $ */ #define LARGE_COORDINATE 1000000 #define SMALL_COORDINATE -LARGE_COORDINATE Index: xc/lib/X11/PolyTxt.c diff -u xc/lib/X11/PolyTxt.c:3.4 xc/lib/X11/PolyTxt.c:3.6 --- xc/lib/X11/PolyTxt.c:3.4 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PolyTxt.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PolyTxt.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PolyTxt.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PolyTxt.c,v 3.4 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PolyTxt.c,v 3.6 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" @@ -109,7 +113,7 @@ /* register xTextElt *elt; */ int FirstTimeThrough = True; char *CharacterOffset = item->chars; - char *tbuf; + char *tbuf = NULL; while((PartialDelta < -128) || (PartialDelta > 127)) { Index: xc/lib/X11/PolyTxt16.c diff -u xc/lib/X11/PolyTxt16.c:1.3 xc/lib/X11/PolyTxt16.c:1.5 --- xc/lib/X11/PolyTxt16.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PolyTxt16.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PolyTxt16.c,v 1.3 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PolyTxt16.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PolyTxt16.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PolyTxt16.c,v 1.5 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" @@ -106,7 +110,7 @@ int nbytes = SIZEOF(xTextElt); int PartialNChars = item->nchars; int PartialDelta = item->delta; - register xTextElt *elt; + register xTextElt *elt = NULL; int FirstTimeThrough = True; XChar2b *CharacterOffset = item->chars; Index: xc/lib/X11/PropAlloc.c diff -u xc/lib/X11/PropAlloc.c:1.3 xc/lib/X11/PropAlloc.c:1.4 --- xc/lib/X11/PropAlloc.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PropAlloc.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PropAlloc.c,v 1.4 2000/08/17 19:44:48 cpqbld Exp $ */ +/* $Xorg: PropAlloc.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PropAlloc.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PropAlloc.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" Index: xc/lib/X11/PutBEvent.c diff -u xc/lib/X11/PutBEvent.c:1.3 xc/lib/X11/PutBEvent.c:1.4 --- xc/lib/X11/PutBEvent.c:1.3 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PutBEvent.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PutBEvent.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ +/* $Xorg: PutBEvent.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/PutBEvent.c,v 1.3 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PutBEvent.c,v 1.4 2001/12/14 19:54:03 dawes Exp $ */ /* XPutBackEvent puts an event back at the head of the queue. */ #define NEED_EVENTS Index: xc/lib/X11/PutImage.c diff -u xc/lib/X11/PutImage.c:3.6 xc/lib/X11/PutImage.c:3.9 --- xc/lib/X11/PutImage.c:3.6 Wed Jan 17 14:41:41 2001 +++ xc/lib/X11/PutImage.c Fri Dec 14 14:54:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PutImage.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ +/* $Xorg: PutImage.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,21 +24,16 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/PutImage.c,v 3.6 2001/01/17 19:41:41 dawes Exp $ */ +/* $XFree86: xc/lib/X11/PutImage.c,v 3.9 2001/12/14 19:54:03 dawes Exp $ */ #include "Xlibint.h" #include "Xutil.h" #include -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif #if defined(__STDC__) && ((defined(sun) && defined(SVR4)) || defined(WIN32)) #define RConst /**/ #else -#define RConst Const +#define RConst const #endif #if defined(Lynx) && defined(ROUNDUP) @@ -44,7 +43,7 @@ /* assumes pad is a power of 2 */ #define ROUNDUP(nbytes, pad) (((nbytes) + ((pad) - 1)) & ~(long)((pad) - 1)) -static unsigned char Const _reverse_byte[0x100] = { +static unsigned char const _reverse_byte[0x100] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, @@ -79,7 +78,7 @@ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; -static unsigned char Const _reverse_nibs[0x100] = { +static unsigned char const _reverse_nibs[0x100] = { 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, @@ -283,7 +282,7 @@ unsigned int height; { register long h, n; - register Const unsigned char *rev = _reverse_nibs; + register const unsigned char *rev = _reverse_nibs; srcinc -= srclen; destinc -= srclen; @@ -330,7 +329,7 @@ int half_order; { register long h, n; - register Const unsigned char *rev = _reverse_byte; + register const unsigned char *rev = _reverse_byte; srcinc -= srclen; destinc -= srclen; @@ -347,7 +346,7 @@ { long length = ROUNDUP(srclen, 2); register long h, n; - register Const unsigned char *rev = _reverse_byte; + register const unsigned char *rev = _reverse_byte; srcinc -= length; destinc -= length; @@ -375,7 +374,7 @@ { long length = ROUNDUP(srclen, 4); register long h, n; - register Const unsigned char *rev = _reverse_byte; + register const unsigned char *rev = _reverse_byte; srcinc -= length; destinc -= length; @@ -411,7 +410,7 @@ { long length = ROUNDUP(srclen, 4); register long h, n; - register Const unsigned char *rev = _reverse_byte; + register const unsigned char *rev = _reverse_byte; srcinc -= length; destinc -= length; @@ -530,7 +529,7 @@ * * Defines whether the first half of a unit has the first half of the data */ -static int Const HalfOrder[12] = { +static int const HalfOrder[12] = { LSBFirst, /* 1Mm */ LSBFirst, /* 2Mm */ LSBFirst, /* 4Mm */ @@ -551,7 +550,7 @@ * NoSwap or SwapBits) in addition to changing the desired ones. */ -static int Const HalfOrderWord[12] = { +static int const HalfOrderWord[12] = { MSBFirst, /* 1Mm */ MSBFirst, /* 2Mm */ MSBFirst, /* 4Mm */ @@ -905,6 +904,8 @@ } } +extern void _XInitImageFuncPtrs(); + int XPutImage (dpy, d, gc, image, req_xoffset, req_yoffset, x, y, req_width, req_height) @@ -953,7 +954,6 @@ if (dest_bits_per_pixel != image->bits_per_pixel) { XImage img; register long i, j; - extern void _XInitImageFuncPtrs(); /* XXX slow, but works */ img.width = width; img.height = height; Index: xc/lib/X11/QuBest.c diff -u xc/lib/X11/QuBest.c:1.1.1.3 xc/lib/X11/QuBest.c:1.2 --- xc/lib/X11/QuBest.c:1.1.1.3 Tue Jan 16 17:08:01 2001 +++ xc/lib/X11/QuBest.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuBest.c,v 1.3 2000/08/17 19:44:49 cpqbld Exp $ */ +/* $Xorg: QuBest.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/QuColor.c diff -u xc/lib/X11/QuColor.c:1.3 xc/lib/X11/QuColor.c:1.4 --- xc/lib/X11/QuColor.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/QuColor.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuColor.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ +/* $Xorg: QuColor.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuColor.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuColor.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuColors.c diff -u xc/lib/X11/QuColors.c:1.3 xc/lib/X11/QuColors.c:1.4 --- xc/lib/X11/QuColors.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/QuColors.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuColors.c,v 1.4 2000/08/17 19:44:50 cpqbld Exp $ */ +/* $Xorg: QuColors.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuColors.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuColors.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuCurShp.c diff -u xc/lib/X11/QuCurShp.c:1.1.1.3 xc/lib/X11/QuCurShp.c:1.2 --- xc/lib/X11/QuCurShp.c:1.1.1.3 Tue Jan 16 17:08:02 2001 +++ xc/lib/X11/QuCurShp.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuCurShp.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ +/* $Xorg: QuCurShp.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/QuExt.c diff -u xc/lib/X11/QuExt.c:1.1.1.3 xc/lib/X11/QuExt.c:1.2 --- xc/lib/X11/QuExt.c:1.1.1.3 Tue Jan 16 17:08:02 2001 +++ xc/lib/X11/QuExt.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuExt.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ +/* $Xorg: QuExt.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/QuKeybd.c diff -u xc/lib/X11/QuKeybd.c:1.3 xc/lib/X11/QuKeybd.c:1.4 --- xc/lib/X11/QuKeybd.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/QuKeybd.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuKeybd.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ +/* $Xorg: QuKeybd.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuKeybd.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuKeybd.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuPntr.c diff -u xc/lib/X11/QuPntr.c:1.1.1.3 xc/lib/X11/QuPntr.c:1.2 --- xc/lib/X11/QuPntr.c:1.1.1.3 Tue Jan 16 17:08:03 2001 +++ xc/lib/X11/QuPntr.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuPntr.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ +/* $Xorg: QuPntr.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/QuStipShp.c diff -u xc/lib/X11/QuStipShp.c:1.1.1.3 xc/lib/X11/QuStipShp.c:1.2 --- xc/lib/X11/QuStipShp.c:1.1.1.3 Tue Jan 16 17:08:03 2001 +++ xc/lib/X11/QuStipShp.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuStipShp.c,v 1.3 2000/08/17 19:44:50 cpqbld Exp $ */ +/* $Xorg: QuStipShp.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/QuTextE16.c diff -u xc/lib/X11/QuTextE16.c:1.3 xc/lib/X11/QuTextE16.c:1.4 --- xc/lib/X11/QuTextE16.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/QuTextE16.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuTextE16.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: QuTextE16.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTextE16.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuTextE16.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuTextExt.c diff -u xc/lib/X11/QuTextExt.c:1.3 xc/lib/X11/QuTextExt.c:1.4 --- xc/lib/X11/QuTextExt.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/QuTextExt.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuTextExt.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: QuTextExt.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTextExt.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuTextExt.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/QuTileShp.c diff -u xc/lib/X11/QuTileShp.c:1.1.1.3 xc/lib/X11/QuTileShp.c:1.2 --- xc/lib/X11/QuTileShp.c:1.1.1.3 Tue Jan 16 17:08:04 2001 +++ xc/lib/X11/QuTileShp.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuTileShp.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: QuTileShp.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/QuTree.c diff -u xc/lib/X11/QuTree.c:1.5 xc/lib/X11/QuTree.c:1.6 --- xc/lib/X11/QuTree.c:1.5 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/QuTree.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: QuTree.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: QuTree.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/QuTree.c,v 1.5 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/QuTree.c,v 1.6 2001/12/14 19:54:04 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" Index: xc/lib/X11/Quarks.c diff -u xc/lib/X11/Quarks.c:1.3 xc/lib/X11/Quarks.c:1.5 --- xc/lib/X11/Quarks.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/Quarks.c Fri Dec 14 14:54:04 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Quarks.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: Quarks.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, @@ -26,7 +26,11 @@ Copyright 1987, 1988, 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Quarks.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Quarks.c,v 1.5 2001/12/14 19:54:04 dawes Exp $ */ #include "Xlibint.h" #include @@ -108,8 +112,7 @@ static char *neverFreeTable = NULL; static int neverFreeTableSize = 0; -static char *permalloc(length) - register unsigned int length; +static char *permalloc(unsigned int length) { char *ret; @@ -133,10 +136,9 @@ #endif #ifdef XTHREADS -static char *_Xpermalloc(); +static char *_Xpermalloc(unsigned int length); -char *Xpermalloc(length) - unsigned int length; +char *Xpermalloc(unsigned int length) { char *p; @@ -149,8 +151,7 @@ static #endif /* XTHREADS */ -char *Xpermalloc(length) - unsigned int length; +char *Xpermalloc(unsigned int length) { int i; @@ -173,7 +174,7 @@ } static Bool -ExpandQuarkTable() +ExpandQuarkTable(void) { unsigned long oldmask, newmask; register char c, *s; Index: xc/lib/X11/RaiseWin.c diff -u xc/lib/X11/RaiseWin.c:1.3 xc/lib/X11/RaiseWin.c:1.4 --- xc/lib/X11/RaiseWin.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/RaiseWin.c Fri Dec 14 14:54:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: RaiseWin.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: RaiseWin.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RaiseWin.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RaiseWin.c,v 1.4 2001/12/14 19:54:04 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/RdBitF.c diff -u xc/lib/X11/RdBitF.c:3.3 xc/lib/X11/RdBitF.c:3.4 --- xc/lib/X11/RdBitF.c:3.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/RdBitF.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: RdBitF.c,v 1.4 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: RdBitF.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/RdBitF.c,v 3.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RdBitF.c,v 3.4 2001/12/14 19:54:05 dawes Exp $ */ /* * Code to read bitmaps from disk files. Interprets Index: xc/lib/X11/RecolorC.c diff -u xc/lib/X11/RecolorC.c:1.3 xc/lib/X11/RecolorC.c:1.4 --- xc/lib/X11/RecolorC.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/RecolorC.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: RecolorC.c,v 1.3 2000/08/17 19:44:51 cpqbld Exp $ */ +/* $Xorg: RecolorC.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RecolorC.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RecolorC.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ReconfWM.c diff -u xc/lib/X11/ReconfWM.c:1.1.1.3 xc/lib/X11/ReconfWM.c:1.2 --- xc/lib/X11/ReconfWM.c:1.1.1.3 Tue Jan 16 17:08:06 2001 +++ xc/lib/X11/ReconfWM.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ReconfWM.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: ReconfWM.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/ReconfWin.c diff -u xc/lib/X11/ReconfWin.c:1.3 xc/lib/X11/ReconfWin.c:1.4 --- xc/lib/X11/ReconfWin.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/ReconfWin.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ReconfWin.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: ReconfWin.c,v 1.4 2001/02/09 02:03:35 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/ReconfWin.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/ReconfWin.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Region.c diff -u xc/lib/X11/Region.c:1.6 xc/lib/X11/Region.c:1.8 --- xc/lib/X11/Region.c:1.6 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/Region.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Region.c,v 1.5 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: Region.c,v 1.6 2001/02/09 02:03:35 xorgcvs Exp $ */ /************************************************************************ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ************************************************************************/ -/* $XFree86: xc/lib/X11/Region.c,v 1.6 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Region.c,v 1.8 2001/12/14 19:54:05 dawes Exp $ */ /* * The functions in this file implement the Region abstraction, similar to one * used in the X11 sample server. A Region is simply an area, as the name @@ -201,6 +205,8 @@ assert(pExtents->x1 < pExtents->x2); } +extern void _XSetClipRectangles(); + int XSetRegion( dpy, gc, r ) Display *dpy; @@ -211,7 +217,6 @@ register XRectangle *xr, *pr; register BOX *pb; unsigned long total; - extern void _XSetClipRectangles(); LockDisplay (dpy); total = r->numRects * sizeof (XRectangle); Index: xc/lib/X11/RegstFlt.c diff -u xc/lib/X11/RegstFlt.c:1.3 xc/lib/X11/RegstFlt.c:1.4 --- xc/lib/X11/RegstFlt.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/RegstFlt.c Fri Dec 14 14:54:05 2001 @@ -1,4 +1,4 @@ -/* $Xorg: RegstFlt.c,v 1.4 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: RegstFlt.c,v 1.5 2001/02/09 02:03:35 xorgcvs Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation @@ -29,7 +29,11 @@ Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,7 +52,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/RegstFlt.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RegstFlt.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" Index: xc/lib/X11/RepWindow.c diff -u xc/lib/X11/RepWindow.c:1.3 xc/lib/X11/RepWindow.c:1.4 --- xc/lib/X11/RepWindow.c:1.3 Wed Jan 17 14:41:42 2001 +++ xc/lib/X11/RepWindow.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: RepWindow.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: RepWindow.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RepWindow.c,v 1.3 2001/01/17 19:41:42 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RepWindow.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/RestackWs.c diff -u xc/lib/X11/RestackWs.c:1.3 xc/lib/X11/RestackWs.c:1.4 --- xc/lib/X11/RestackWs.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/RestackWs.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: RestackWs.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: RestackWs.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RestackWs.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RestackWs.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/RotProp.c diff -u xc/lib/X11/RotProp.c:1.3 xc/lib/X11/RotProp.c:1.4 --- xc/lib/X11/RotProp.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/RotProp.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: RotProp.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: RotProp.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/RotProp.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/RotProp.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/ScrResStr.c diff -u xc/lib/X11/ScrResStr.c:1.1.1.3 xc/lib/X11/ScrResStr.c:1.2 --- xc/lib/X11/ScrResStr.c:1.1.1.3 Tue Jan 16 17:08:08 2001 +++ xc/lib/X11/ScrResStr.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ScrResStr.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: ScrResStr.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/SelInput.c diff -u xc/lib/X11/SelInput.c:1.3 xc/lib/X11/SelInput.c:1.4 --- xc/lib/X11/SelInput.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SelInput.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SelInput.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: SelInput.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SelInput.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SelInput.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SendEvent.c diff -u xc/lib/X11/SendEvent.c:1.1.1.3 xc/lib/X11/SendEvent.c:1.4 --- xc/lib/X11/SendEvent.c:1.1.1.3 Tue Jan 16 17:08:09 2001 +++ xc/lib/X11/SendEvent.c Fri Dec 14 14:54:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SendEvent.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: SendEvent.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,11 +24,11 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/SendEvent.c,v 1.4 2001/12/14 19:54:05 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" -extern Status _XEventToWire(); /* * In order to avoid all images requiring _XEventToWire, we install the * event converter here if it has never been installed. Index: xc/lib/X11/SetBack.c diff -u xc/lib/X11/SetBack.c:1.3 xc/lib/X11/SetBack.c:1.4 --- xc/lib/X11/SetBack.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetBack.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetBack.c,v 1.3 2000/08/17 19:44:52 cpqbld Exp $ */ +/* $Xorg: SetBack.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetBack.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetBack.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetCRects.c diff -u xc/lib/X11/SetCRects.c:1.3 xc/lib/X11/SetCRects.c:1.4 --- xc/lib/X11/SetCRects.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetCRects.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetCRects.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetCRects.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetCRects.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetCRects.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetClMask.c diff -u xc/lib/X11/SetClMask.c:1.3 xc/lib/X11/SetClMask.c:1.4 --- xc/lib/X11/SetClMask.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetClMask.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetClMask.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetClMask.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetClMask.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetClMask.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetClOrig.c diff -u xc/lib/X11/SetClOrig.c:1.3 xc/lib/X11/SetClOrig.c:1.4 --- xc/lib/X11/SetClOrig.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetClOrig.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetClOrig.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetClOrig.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetClOrig.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetClOrig.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetDashes.c diff -u xc/lib/X11/SetDashes.c:1.3 xc/lib/X11/SetDashes.c:1.4 --- xc/lib/X11/SetDashes.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetDashes.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetDashes.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetDashes.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetDashes.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetDashes.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFPath.c diff -u xc/lib/X11/SetFPath.c:1.5 xc/lib/X11/SetFPath.c:1.6 --- xc/lib/X11/SetFPath.c:1.5 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetFPath.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetFPath.c,v 1.4 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetFPath.c,v 1.5 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFPath.c,v 1.5 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFPath.c,v 1.6 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFont.c diff -u xc/lib/X11/SetFont.c:1.3 xc/lib/X11/SetFont.c:1.4 --- xc/lib/X11/SetFont.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetFont.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetFont.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetFont.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFont.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFont.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFore.c diff -u xc/lib/X11/SetFore.c:1.3 xc/lib/X11/SetFore.c:1.4 --- xc/lib/X11/SetFore.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetFore.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetFore.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetFore.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFore.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFore.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetFunc.c diff -u xc/lib/X11/SetFunc.c:1.3 xc/lib/X11/SetFunc.c:1.4 --- xc/lib/X11/SetFunc.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetFunc.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetFunc.c,v 1.3 2000/08/17 19:44:53 cpqbld Exp $ */ +/* $Xorg: SetFunc.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetFunc.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetFunc.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetHints.c diff -u xc/lib/X11/SetHints.c:1.3 xc/lib/X11/SetHints.c:1.4 --- xc/lib/X11/SetHints.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetHints.c Fri Dec 14 14:54:06 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SetHints.c,v 1.4 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetHints.c,v 1.5 2001/02/09 02:03:36 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/SetHints.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetHints.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include #include Index: xc/lib/X11/SetIFocus.c diff -u xc/lib/X11/SetIFocus.c:1.3 xc/lib/X11/SetIFocus.c:1.4 --- xc/lib/X11/SetIFocus.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetIFocus.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetIFocus.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetIFocus.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetIFocus.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetIFocus.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetLStyle.c diff -u xc/lib/X11/SetLStyle.c:1.3 xc/lib/X11/SetLStyle.c:1.4 --- xc/lib/X11/SetLStyle.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetLStyle.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetLStyle.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetLStyle.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetLStyle.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetLStyle.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetLocale.c diff -u xc/lib/X11/SetLocale.c:3.13 xc/lib/X11/SetLocale.c:3.16 --- xc/lib/X11/SetLocale.c:3.13 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetLocale.c Fri Dec 14 14:54:06 2001 @@ -1,4 +1,4 @@ -/* $Xorg: SetLocale.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetLocale.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, @@ -32,7 +32,11 @@ Copyright 1987,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -51,7 +55,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/SetLocale.c,v 3.13 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetLocale.c,v 3.16 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -64,10 +68,6 @@ /* alternative setlocale() for when the OS does not provide one */ -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif - #if NeedFunctionPrototypes char * _Xsetlocale( @@ -212,7 +212,7 @@ # elif defined (STARTSTR) start += strlen(STARTSTR); # endif - if (end = strchr (start, ENDCHAR)) { + if ((end = strchr (start, ENDCHAR))) { len = end - start; if (len >= MAXLOCALE) len = MAXLOCALE - 1; Index: xc/lib/X11/SetNrmHint.c diff -u xc/lib/X11/SetNrmHint.c:1.1.1.3 xc/lib/X11/SetNrmHint.c:1.2 --- xc/lib/X11/SetNrmHint.c:1.1.1.3 Tue Jan 16 17:08:13 2001 +++ xc/lib/X11/SetNrmHint.c Fri Dec 14 14:54:06 2001 @@ -1,4 +1,4 @@ -/* $Xorg: SetNrmHint.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetNrmHint.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca, @@ -27,7 +27,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/SetPMask.c diff -u xc/lib/X11/SetPMask.c:1.3 xc/lib/X11/SetPMask.c:1.4 --- xc/lib/X11/SetPMask.c:1.3 Wed Jan 17 14:41:43 2001 +++ xc/lib/X11/SetPMask.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetPMask.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetPMask.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetPMask.c,v 1.3 2001/01/17 19:41:43 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetPMask.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetPntMap.c diff -u xc/lib/X11/SetPntMap.c:1.3 xc/lib/X11/SetPntMap.c:1.4 --- xc/lib/X11/SetPntMap.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/SetPntMap.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetPntMap.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetPntMap.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetPntMap.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetPntMap.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #define NEED_REPLIES Index: xc/lib/X11/SetRGBCMap.c diff -u xc/lib/X11/SetRGBCMap.c:1.1.1.3 xc/lib/X11/SetRGBCMap.c:1.2 --- xc/lib/X11/SetRGBCMap.c:1.1.1.3 Tue Jan 16 17:08:15 2001 +++ xc/lib/X11/SetRGBCMap.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetRGBCMap.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetRGBCMap.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/SetSOwner.c diff -u xc/lib/X11/SetSOwner.c:1.3 xc/lib/X11/SetSOwner.c:1.4 --- xc/lib/X11/SetSOwner.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/SetSOwner.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetSOwner.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetSOwner.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetSOwner.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetSOwner.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetSSaver.c diff -u xc/lib/X11/SetSSaver.c:1.3 xc/lib/X11/SetSSaver.c:1.4 --- xc/lib/X11/SetSSaver.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/SetSSaver.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetSSaver.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetSSaver.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetSSaver.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetSSaver.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetStCmap.c diff -u xc/lib/X11/SetStCmap.c:1.1.1.3 xc/lib/X11/SetStCmap.c:1.2 --- xc/lib/X11/SetStCmap.c:1.1.1.3 Tue Jan 16 17:08:17 2001 +++ xc/lib/X11/SetStCmap.c Fri Dec 14 14:54:06 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SetStCmap.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetStCmap.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/SetState.c diff -u xc/lib/X11/SetState.c:1.3 xc/lib/X11/SetState.c:1.4 --- xc/lib/X11/SetState.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/SetState.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetState.c,v 1.3 2000/08/17 19:44:54 cpqbld Exp $ */ +/* $Xorg: SetState.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetState.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetState.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetStip.c diff -u xc/lib/X11/SetStip.c:1.3 xc/lib/X11/SetStip.c:1.4 --- xc/lib/X11/SetStip.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/SetStip.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetStip.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: SetStip.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetStip.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetStip.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetTSOrig.c diff -u xc/lib/X11/SetTSOrig.c:1.3 xc/lib/X11/SetTSOrig.c:1.4 --- xc/lib/X11/SetTSOrig.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/SetTSOrig.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetTSOrig.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: SetTSOrig.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetTSOrig.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetTSOrig.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetTile.c diff -u xc/lib/X11/SetTile.c:1.3 xc/lib/X11/SetTile.c:1.4 --- xc/lib/X11/SetTile.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/SetTile.c Fri Dec 14 14:54:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SetTile.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: SetTile.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/SetTile.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/SetTile.c,v 1.4 2001/12/14 19:54:06 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/SetTxtProp.c diff -u xc/lib/X11/SetTxtProp.c:1.1.1.3 xc/lib/X11/SetTxtProp.c:1.2 --- xc/lib/X11/SetTxtProp.c:1.1.1.3 Tue Jan 16 17:08:22 2001 +++ xc/lib/X11/SetTxtProp.c Fri Dec 14 14:54:07 2001 @@ -1,4 +1,4 @@ -/* $Xorg: SetTxtProp.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: SetTxtProp.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca. @@ -25,7 +25,11 @@ Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/SetWMCMapW.c diff -u xc/lib/X11/SetWMCMapW.c:1.1.1.3 xc/lib/X11/SetWMCMapW.c:1.2 --- xc/lib/X11/SetWMCMapW.c:1.1.1.3 Tue Jan 16 17:08:22 2001 +++ xc/lib/X11/SetWMCMapW.c Fri Dec 14 14:54:07 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SetWMCMapW.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: SetWMCMapW.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/SetWMProto.c diff -u xc/lib/X11/SetWMProto.c:1.1.1.3 xc/lib/X11/SetWMProto.c:1.2 --- xc/lib/X11/SetWMProto.c:1.1.1.3 Tue Jan 16 17:08:22 2001 +++ xc/lib/X11/SetWMProto.c Fri Dec 14 14:54:07 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SetWMProto.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: SetWMProto.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/StBytes.c diff -u xc/lib/X11/StBytes.c:1.3 xc/lib/X11/StBytes.c:1.4 --- xc/lib/X11/StBytes.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/StBytes.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: StBytes.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: StBytes.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StBytes.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StBytes.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include #include Index: xc/lib/X11/StColor.c diff -u xc/lib/X11/StColor.c:1.3 xc/lib/X11/StColor.c:1.4 --- xc/lib/X11/StColor.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/StColor.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: StColor.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: StColor.c,v 1.4 2001/02/09 02:03:36 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StColor.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StColor.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/StColors.c diff -u xc/lib/X11/StColors.c:1.3 xc/lib/X11/StColors.c:1.4 --- xc/lib/X11/StColors.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/StColors.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: StColors.c,v 1.3 2000/08/17 19:44:55 cpqbld Exp $ */ +/* $Xorg: StColors.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StColors.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StColors.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/StNColor.c diff -u xc/lib/X11/StNColor.c:1.3 xc/lib/X11/StNColor.c:1.4 --- xc/lib/X11/StNColor.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/StNColor.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: StNColor.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ +/* $Xorg: StNColor.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StNColor.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StNColor.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include #include "Xlibint.h" Index: xc/lib/X11/StName.c diff -u xc/lib/X11/StName.c:1.3 xc/lib/X11/StName.c:1.4 --- xc/lib/X11/StName.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/StName.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: StName.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ +/* $Xorg: StName.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StName.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StName.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include #include Index: xc/lib/X11/StrKeysym.c diff -u xc/lib/X11/StrKeysym.c:3.4 xc/lib/X11/StrKeysym.c:3.6 --- xc/lib/X11/StrKeysym.c:3.4 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/StrKeysym.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: StrKeysym.c,v 1.4 2000/08/17 19:44:56 cpqbld Exp $ */ +/* $Xorg: StrKeysym.c,v 1.5 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,23 +24,14 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/StrKeysym.c,v 3.4 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/StrKeysym.c,v 3.6 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" #include #include -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif extern XrmQuark _XrmInternalStringToQuark(); -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - typedef unsigned long Signature; #define NEEDKTABLE @@ -82,10 +77,10 @@ register int i, n; int h; register Signature sig = 0; - register Const char *p = s; + register const char *p = s; register int c; register int idx; - Const unsigned char *entry; + const unsigned char *entry; unsigned char sig1, sig2; KeySym val; Index: xc/lib/X11/StrToText.c diff -u xc/lib/X11/StrToText.c:1.1.1.3 xc/lib/X11/StrToText.c:1.2 --- xc/lib/X11/StrToText.c:1.1.1.3 Tue Jan 16 17:08:28 2001 +++ xc/lib/X11/StrToText.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: StrToText.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ +/* $Xorg: StrToText.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/Sync.c diff -u xc/lib/X11/Sync.c:1.3 xc/lib/X11/Sync.c:1.4 --- xc/lib/X11/Sync.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/Sync.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Sync.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ +/* $Xorg: Sync.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Sync.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Sync.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS Index: xc/lib/X11/Synchro.c diff -u xc/lib/X11/Synchro.c:1.1.1.3 xc/lib/X11/Synchro.c:1.2 --- xc/lib/X11/Synchro.c:1.1.1.3 Tue Jan 16 17:08:30 2001 +++ xc/lib/X11/Synchro.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Synchro.c,v 1.3 2000/08/17 19:44:56 cpqbld Exp $ */ +/* $Xorg: Synchro.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/Text.c diff -u xc/lib/X11/Text.c:1.3 xc/lib/X11/Text.c:1.4 --- xc/lib/X11/Text.c:1.3 Wed Jan 17 14:41:44 2001 +++ xc/lib/X11/Text.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Text.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: Text.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Text.c,v 1.3 2001/01/17 19:41:44 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Text.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Text16.c diff -u xc/lib/X11/Text16.c:1.4 xc/lib/X11/Text16.c:1.5 --- xc/lib/X11/Text16.c:1.4 Sun Jan 21 17:58:08 2001 +++ xc/lib/X11/Text16.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Text16.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: Text16.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Text16.c,v 1.4 2001/01/21 22:58:08 keithp Exp $ */ +/* $XFree86: xc/lib/X11/Text16.c,v 1.5 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/TextExt.c diff -u xc/lib/X11/TextExt.c:1.3 xc/lib/X11/TextExt.c:1.4 --- xc/lib/X11/TextExt.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/TextExt.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: TextExt.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: TextExt.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/TextExt.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextExt.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint Index: xc/lib/X11/TextExt16.c diff -u xc/lib/X11/TextExt16.c:1.3 xc/lib/X11/TextExt16.c:1.4 --- xc/lib/X11/TextExt16.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/TextExt16.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: TextExt16.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: TextExt16.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/TextExt16.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextExt16.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint Index: xc/lib/X11/TextToStr.c diff -u xc/lib/X11/TextToStr.c:1.4 xc/lib/X11/TextToStr.c:1.5 --- xc/lib/X11/TextToStr.c:1.4 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/TextToStr.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: TextToStr.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: TextToStr.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ */ -/* $XFree86: xc/lib/X11/TextToStr.c,v 1.4 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/TextToStr.c,v 1.5 2001/12/14 19:54:07 dawes Exp $ */ #include #include Index: xc/lib/X11/TrCoords.c diff -u xc/lib/X11/TrCoords.c:1.1.1.3 xc/lib/X11/TrCoords.c:1.2 --- xc/lib/X11/TrCoords.c:1.1.1.3 Tue Jan 16 17:08:36 2001 +++ xc/lib/X11/TrCoords.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: TrCoords.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: TrCoords.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/UndefCurs.c diff -u xc/lib/X11/UndefCurs.c:1.3 xc/lib/X11/UndefCurs.c:1.4 --- xc/lib/X11/UndefCurs.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UndefCurs.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UndefCurs.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: UndefCurs.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UndefCurs.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UndefCurs.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabBut.c diff -u xc/lib/X11/UngrabBut.c:1.3 xc/lib/X11/UngrabBut.c:1.4 --- xc/lib/X11/UngrabBut.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UngrabBut.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UngrabBut.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: UngrabBut.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabBut.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabBut.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabKbd.c diff -u xc/lib/X11/UngrabKbd.c:1.3 xc/lib/X11/UngrabKbd.c:1.4 --- xc/lib/X11/UngrabKbd.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UngrabKbd.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UngrabKbd.c,v 1.3 2000/08/17 19:44:57 cpqbld Exp $ */ +/* $Xorg: UngrabKbd.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabKbd.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabKbd.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabKey.c diff -u xc/lib/X11/UngrabKey.c:1.3 xc/lib/X11/UngrabKey.c:1.4 --- xc/lib/X11/UngrabKey.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UngrabKey.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UngrabKey.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: UngrabKey.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabKey.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabKey.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabPtr.c diff -u xc/lib/X11/UngrabPtr.c:1.3 xc/lib/X11/UngrabPtr.c:1.4 --- xc/lib/X11/UngrabPtr.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UngrabPtr.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UngrabPtr.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: UngrabPtr.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabPtr.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabPtr.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UngrabSvr.c diff -u xc/lib/X11/UngrabSvr.c:1.3 xc/lib/X11/UngrabSvr.c:1.4 --- xc/lib/X11/UngrabSvr.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UngrabSvr.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UngrabSvr.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: UngrabSvr.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UngrabSvr.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UngrabSvr.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UninsCmap.c diff -u xc/lib/X11/UninsCmap.c:1.3 xc/lib/X11/UninsCmap.c:1.4 --- xc/lib/X11/UninsCmap.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UninsCmap.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UninsCmap.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: UninsCmap.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UninsCmap.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UninsCmap.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UnldFont.c diff -u xc/lib/X11/UnldFont.c:1.3 xc/lib/X11/UnldFont.c:1.6 --- xc/lib/X11/UnldFont.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UnldFont.c Wed Dec 19 10:37:57 2001 @@ -1,9 +1,13 @@ - /* $Xorg: UnldFont.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ +/* $Xorg: UnldFont.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UnldFont.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UnldFont.c,v 1.6 2001/12/19 15:37:57 tsi Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UnmapSubs.c diff -u xc/lib/X11/UnmapSubs.c:1.3 xc/lib/X11/UnmapSubs.c:1.4 --- xc/lib/X11/UnmapSubs.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UnmapSubs.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UnmapSubs.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: UnmapSubs.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UnmapSubs.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UnmapSubs.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/UnmapWin.c diff -u xc/lib/X11/UnmapWin.c:1.3 xc/lib/X11/UnmapWin.c:1.4 --- xc/lib/X11/UnmapWin.c:1.3 Wed Jan 17 14:41:45 2001 +++ xc/lib/X11/UnmapWin.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: UnmapWin.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: UnmapWin.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/UnmapWin.c,v 1.3 2001/01/17 19:41:45 dawes Exp $ */ +/* $XFree86: xc/lib/X11/UnmapWin.c,v 1.4 2001/12/14 19:54:07 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/VisUtil.c diff -u xc/lib/X11/VisUtil.c:1.1.1.3 xc/lib/X11/VisUtil.c:1.2 --- xc/lib/X11/VisUtil.c:1.1.1.3 Tue Jan 16 17:08:44 2001 +++ xc/lib/X11/VisUtil.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: VisUtil.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: VisUtil.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/WMGeom.c diff -u xc/lib/X11/WMGeom.c:1.1.1.3 xc/lib/X11/WMGeom.c:1.2 --- xc/lib/X11/WMGeom.c:1.1.1.3 Tue Jan 16 17:08:44 2001 +++ xc/lib/X11/WMGeom.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: WMGeom.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: WMGeom.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/WMProps.c diff -u xc/lib/X11/WMProps.c:3.4 xc/lib/X11/WMProps.c:3.6 --- xc/lib/X11/WMProps.c:3.4 Wed Jan 17 14:41:46 2001 +++ xc/lib/X11/WMProps.c Fri Dec 14 14:54:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: WMProps.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: WMProps.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/WMProps.c,v 3.4 2001/01/17 19:41:46 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WMProps.c,v 3.6 2001/12/14 19:54:07 dawes Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., @@ -54,9 +58,6 @@ #include #include -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif /* * XSetWMProperties sets the following properties: Index: xc/lib/X11/WarpPtr.c diff -u xc/lib/X11/WarpPtr.c:1.3 xc/lib/X11/WarpPtr.c:1.4 --- xc/lib/X11/WarpPtr.c:1.3 Wed Jan 17 14:41:47 2001 +++ xc/lib/X11/WarpPtr.c Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: WarpPtr.c,v 1.3 2000/08/17 19:44:58 cpqbld Exp $ */ +/* $Xorg: WarpPtr.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/WarpPtr.c,v 1.3 2001/01/17 19:41:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WarpPtr.c,v 1.4 2001/12/14 19:54:08 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/WinEvent.c diff -u xc/lib/X11/WinEvent.c:3.3 xc/lib/X11/WinEvent.c:3.6 --- xc/lib/X11/WinEvent.c:3.3 Wed Jan 17 14:41:47 2001 +++ xc/lib/X11/WinEvent.c Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: WinEvent.c,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ +/* $Xorg: WinEvent.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,18 +24,12 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/WinEvent.c,v 3.3 2001/01/17 19:41:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WinEvent.c,v 3.6 2001/12/14 19:54:08 dawes Exp $ */ #define NEED_EVENTS #include "Xlibint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - -extern long Const _Xevent_to_mask[]; +extern long const _Xevent_to_mask[]; #define AllPointers (PointerMotionMask|PointerMotionHintMask|ButtonMotionMask) #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ Button4MotionMask|Button5MotionMask) @@ -52,7 +50,7 @@ register XEvent *event; /* XEvent to be filled in. */ { register _XQEvent *prev, *qelt; - unsigned long qe_serial; + unsigned long qe_serial = 0; LockDisplay(dpy); prev = NULL; Index: xc/lib/X11/Window.c diff -u xc/lib/X11/Window.c:1.3 xc/lib/X11/Window.c:1.4 --- xc/lib/X11/Window.c:1.3 Wed Jan 17 14:41:47 2001 +++ xc/lib/X11/Window.c Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Window.c,v 1.4 2000/08/17 19:44:59 cpqbld Exp $ */ +/* $Xorg: Window.c,v 1.5 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1986, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Window.c,v 1.3 2001/01/17 19:41:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Window.c,v 1.4 2001/12/14 19:54:08 dawes Exp $ */ #include "Xlibint.h" Index: xc/lib/X11/Withdraw.c diff -u xc/lib/X11/Withdraw.c:1.1.1.3 xc/lib/X11/Withdraw.c:1.2 --- xc/lib/X11/Withdraw.c:1.1.1.3 Tue Jan 16 17:08:48 2001 +++ xc/lib/X11/Withdraw.c Fri Dec 14 14:54:08 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Withdraw.c,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ +/* $Xorg: Withdraw.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., @@ -26,7 +26,11 @@ Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/WrBitF.c diff -u xc/lib/X11/WrBitF.c:3.3 xc/lib/X11/WrBitF.c:3.4 --- xc/lib/X11/WrBitF.c:3.3 Wed Jan 17 14:41:47 2001 +++ xc/lib/X11/WrBitF.c Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: WrBitF.c,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ +/* $Xorg: WrBitF.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/WrBitF.c,v 3.3 2001/01/17 19:41:47 dawes Exp $ */ +/* $XFree86: xc/lib/X11/WrBitF.c,v 3.4 2001/12/14 19:54:08 dawes Exp $ */ #include "Xlibint.h" #include Index: xc/lib/X11/X11-def.cpp diff -u xc/lib/X11/X11-def.cpp:1.10 xc/lib/X11/X11-def.cpp:1.12 --- xc/lib/X11/X11-def.cpp:1.10 Thu Apr 5 15:29:38 2001 +++ xc/lib/X11/X11-def.cpp Wed Sep 19 11:47:00 2001 @@ -1755,9 +1755,10 @@ _XimXTransGetPeerAddr _XimXTransGetConnectionNumber _XimXTransGetHostname - _Xdebug + _Xdebug DATA Xutf8TextPropertyToTextList Xutf8TextListToTextProperty + Xutf8LookupString XkbIgnoreExtension XkbOpenDisplay XkbQueryExtension @@ -1985,7 +1986,14 @@ _XimTransportRec _XlcGenericMethods _XlcPublicMethods +#ifdef HAS_THREADS + _XCreateMutex_fn DATA + _XFreeMutex_fn DATA + _XLockMutex_fn DATA + _XUnlockMutex_fn DATA + _Xglobal_lock DATA #endif +#endif /* $Xorg: X11-def.cpp,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ */ -/* $XFree86: xc/lib/X11/X11-def.cpp,v 1.10 2001/04/05 19:29:38 dawes Exp $ */ +/* $XFree86: xc/lib/X11/X11-def.cpp,v 1.12 2001/09/19 15:47:00 alanh Exp $ */ Index: xc/lib/X11/XDefaultIMIF.c diff -u /dev/null xc/lib/X11/XDefaultIMIF.c:1.2 --- /dev/null Fri Jan 18 15:23:11 2002 +++ xc/lib/X11/XDefaultIMIF.c Mon Nov 19 10:33:38 2001 @@ -0,0 +1,495 @@ +/* +Copyright 1985, 1986, 1987, 1991, 1998 The Open Group + +Portions Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: The above copyright notice and this +permission notice shall be included in all copies or substantial +portions of the Software. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF +ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. + + +Except as contained in this notice, the names of The Open Group and/or +Sun Microsystems, Inc. shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without prior +written authorization from The Open Group and/or Sun Microsystems, +Inc., as applicable. + + +X Window System is a trademark of The Open Group + +OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF +logo, LBX, X Window System, and Xinerama are trademarks of the Open +Group. All other trademarks and registered trademarks mentioned herein +are the property of their respective owners. No right, title or +interest in or to any trademark, service mark, logo or trade name of +Sun Microsystems, Inc. or its licensors is granted. + +*/ +/* $XFree86: xc/lib/X11/XDefaultIMIF.c,v 1.2 2001/11/19 15:33:38 tsi Exp $ */ + +#include +#define NEED_EVENTS +#include "Xlibint.h" +#include "Xlcint.h" +#include "XlcGeneric.h" + +#ifndef MAXINT +#define MAXINT (~((unsigned int)1 << (8 * sizeof(int)) - 1)) +#endif /* !MAXINT */ + +typedef struct _StaticXIM *StaticXIM; + +typedef struct _XIMStaticXIMRec { + /* for CT => MB,WC converter */ + XlcConv ctom_conv; + XlcConv ctow_conv; +} XIMStaticXIMRec; + +typedef enum { + CREATE_IC = 1, + SET_ICVAL = 2, + GET_ICVAL = 3 +} XICOp_t; + +typedef struct _StaticXIM { + XIMMethods methods; + XIMCoreRec core; + XIMStaticXIMRec *private; +} StaticXIMRec; + +static Status _CloseIM( +#if NeedFunctionPrototypes + XIM +#endif +); + +static char *_SetIMValues( +#if NeedFunctionPrototypes + XIM, XIMArg * +#endif +); + +static char *_GetIMValues( +#if NeedFunctionPrototypes + XIM, XIMArg* +#endif +); + +static XIC _CreateIC( +#if NeedFunctionPrototypes + XIM, XIMArg* +#endif +); + +static _Xconst XIMMethodsRec local_im_methods = { + _CloseIM, /* close */ + _SetIMValues, /* set_values */ + _GetIMValues, /* get_values */ + _CreateIC, /* create_ic */ + NULL, /* ctstombs */ + NULL /* ctstowcs */ +}; + +static void _DestroyIC( +#if NeedFunctionPrototypes + XIC +#endif +); +static void _SetFocus( +#if NeedFunctionPrototypes + XIC +#endif +); +static void _UnsetFocus( +#if NeedFunctionPrototypes + XIC +#endif +); +static char* _SetICValues( +#if NeedFunctionPrototypes + XIC, XIMArg * +#endif +); +static char* _GetICValues( +#if NeedFunctionPrototypes + XIC, XIMArg * +#endif +); +static char *_MbReset( +#if NeedFunctionPrototypes + XIC +#endif +); +static wchar_t *_WcReset( +#if NeedFunctionPrototypes + XIC +#endif +); +static int _MbLookupString( +#if NeedFunctionPrototypes + XIC, XKeyEvent *, char *, int, KeySym *, Status * +#endif +); +static int _WcLookupString( +#if NeedFunctionPrototypes + XIC, XKeyEvent *, wchar_t *, int, KeySym *, Status * +#endif +); + +static _Xconst XICMethodsRec local_ic_methods = { + _DestroyIC, /* destroy */ + _SetFocus, /* set_focus */ + _UnsetFocus, /* unset_focus */ + _SetICValues, /* set_values */ + _GetICValues, /* get_values */ + _MbReset, /* mb_reset */ + _WcReset, /* wc_reset */ + NULL, /* utf8_reset */ /* ??? */ + _MbLookupString, /* mb_lookup_string */ + _WcLookupString, /* wc_lookup_string */ + NULL /* utf8_lookup_string */ /* ??? */ +}; + +XIM +_XDefaultOpenIM(lcd, dpy, rdb, res_name, res_class) +XLCd lcd; +Display *dpy; +XrmDatabase rdb; +char *res_name, *res_class; +{ + StaticXIM im; + XIMStaticXIMRec *local_impart; + XlcConv ctom_conv, ctow_conv; + int i; + char *mod; + char buf[BUFSIZ]; + + if (!(ctom_conv = _XlcOpenConverter(lcd, + XlcNCompoundText, lcd, XlcNMultiByte))) { + return((XIM)NULL); + } + + if (!(ctow_conv = _XlcOpenConverter(lcd, + XlcNCompoundText, lcd, XlcNWideChar))) { + return((XIM)NULL); + } + + if ((im = (StaticXIM)Xmalloc(sizeof(StaticXIMRec))) == (StaticXIM)NULL) { + return((XIM)NULL); + } + if ((local_impart = (XIMStaticXIMRec*)Xmalloc(sizeof(XIMStaticXIMRec))) + == (XIMStaticXIMRec *)NULL) { + Xfree(im); + return((XIM)NULL); + } + memset(im, 0, sizeof(StaticXIMRec)); + memset(local_impart, 0, sizeof(XIMStaticXIMRec)); + + buf[0] = '\0'; + i = 0; + if ((lcd->core->modifiers) && (*lcd->core->modifiers)) { +#define MODIFIER "@im=" + mod = strstr(lcd->core->modifiers, MODIFIER); + if (mod) { + mod += strlen(MODIFIER); + while (*mod && *mod != '@' && i < BUFSIZ - 1) { + buf[i++] = *mod++; + } + buf[i] = '\0'; + } + } +#undef MODIFIER + if ((im->core.im_name = Xmalloc(i+1)) == NULL) + goto Error2; + strcpy(im->core.im_name, buf); + + im->private = local_impart; + im->methods = (XIMMethods)&local_im_methods; + im->core.lcd = lcd; + im->core.ic_chain = (XIC)NULL; + im->core.display = dpy; + im->core.rdb = rdb; + im->core.res_name = NULL; + im->core.res_class = NULL; + + local_impart->ctom_conv = ctom_conv; + local_impart->ctow_conv = ctow_conv; + + if ((res_name != NULL) && (*res_name != '\0')){ + im->core.res_name = (char *)Xmalloc(strlen(res_name)+1); + strcpy(im->core.res_name,res_name); + } + if ((res_class != NULL) && (*res_class != '\0')){ + im->core.res_class = (char *)Xmalloc(strlen(res_class)+1); + strcpy(im->core.res_class,res_class); + } + + return (XIM)im; +Error2 : + Xfree(im->private); + Xfree(im->core.im_name); + Xfree(im); + _XlcCloseConverter(ctom_conv); + _XlcCloseConverter(ctow_conv); + return(NULL); +} + +static Status +_CloseIM(xim) +XIM xim; +{ + StaticXIM im = (StaticXIM)xim; + _XlcCloseConverter(im->private->ctom_conv); + _XlcCloseConverter(im->private->ctow_conv); + XFree(im->private); + XFree(im->core.im_name); + if (im->core.res_name) XFree(im->core.res_name); + if (im->core.res_class) XFree(im->core.res_class); + return 1; /*bugID 4163122*/ +} + +static char * +_SetIMValues(xim, arg) +XIM xim; +XIMArg *arg; +{ + return(arg->name); /* evil */ +} + +static char * +_GetIMValues(xim, values) +XIM xim; +XIMArg *values; +{ + XIMArg *p; + XIMStyles *styles; + + for (p = values; p->name != NULL; p++) { + if (strcmp(p->name, XNQueryInputStyle) == 0) { + styles = (XIMStyles *)Xmalloc(sizeof(XIMStyles)); + *(XIMStyles **)p->value = styles; + styles->count_styles = 1; + styles->supported_styles = + (XIMStyle*)Xmalloc(styles->count_styles * sizeof(XIMStyle)); + styles->supported_styles[0] = (XIMPreeditNone | XIMStatusNone); + } else { + break; + } + } + return (p->name); +} + +static char* +_SetICValueData(ic, values, mode) +XIC ic; +XIMArg *values; +XICOp_t mode; +{ + XIMArg *p; + char *return_name = NULL; + + for (p = values; p != NULL && p->name != NULL; p++) { + if(strcmp(p->name, XNInputStyle) == 0) { + if (mode == CREATE_IC) + ic->core.input_style = (XIMStyle)p->value; + } else if (strcmp(p->name, XNClientWindow) == 0) { + ic->core.client_window = (Window)p->value ; + } else if (strcmp(p->name, XNFocusWindow) == 0) { + ic->core.focus_window = (Window)p->value ; + } else if (strcmp(p->name, XNPreeditAttributes) == 0 + || strcmp(p->name, XNStatusAttributes) == 0) { + return_name = _SetICValueData(ic, (XIMArg*)p->value, mode); + if (return_name) break; + } else { + return_name = p->name; + break; + } + } + return(return_name); +} + +static char* +_GetICValueData(ic, values, mode) +XIC ic; +XIMArg *values; +XICOp_t mode; +{ + XIMArg *p; + char *return_name = NULL; + + for (p = values; p->name != NULL; p++) { + if(strcmp(p->name, XNInputStyle) == 0) { + *((XIMStyle *)(p->value)) = ic->core.input_style; + } else if (strcmp(p->name, XNClientWindow) == 0) { + *((Window *)(p->value)) = ic->core.client_window; + } else if (strcmp(p->name, XNFocusWindow) == 0) { + *((Window *)(p->value)) = ic->core.focus_window; + } else if (strcmp(p->name, XNFilterEvents) == 0) { + *((unsigned long *)(p->value))= ic->core.filter_events; + } else if (strcmp(p->name, XNPreeditAttributes) == 0 + || strcmp(p->name, XNStatusAttributes) == 0) { + return_name = _GetICValueData(ic, (XIMArg*)p->value, mode); + if (return_name) break; + } else { + return_name = p->name; + break; + } + } + return(return_name); +} + +static XIC +_CreateIC(im, arg) +XIM im; +XIMArg *arg; +{ + XIC ic; + + if ((ic = (XIC)Xmalloc(sizeof(XICRec))) == (XIC)NULL) { + return ((XIC)NULL); + } + memset(ic, 0, sizeof(XICRec)); + + ic->methods = (XICMethods)&local_ic_methods; + ic->core.im = im; + ic->core.filter_events = KeyPressMask; + + if (_SetICValueData(ic, arg, CREATE_IC) != NULL) + goto err_return; + if (!(ic->core.input_style)) + goto err_return; + + return (XIC)ic; +err_return: + XFree(ic); + return ((XIC)NULL); +} + +static void +_DestroyIC(ic) +XIC ic; +{ +/*BugId4255571. This Xfree() should be removed because XDestroyIC() still need ic after invoking _DestroyIC() and there is a XFree(ic) at the end of XDestroyIC() already. + if(ic) + XFree(ic); */ +} + +static void +_SetFocus(ic) +XIC ic; +{ +} + +static void +_UnsetFocus(ic) +XIC ic; +{ +} + +static char* +_SetICValues(ic, args) +XIC ic; +XIMArg *args; +{ + char *ret = NULL; + if (!ic) { + return (args->name); + } + ret = _SetICValueData(ic, args, SET_ICVAL); + return(ret); +} + +static char* +_GetICValues(ic, args) +XIC ic; +XIMArg *args; +{ + char *ret = NULL; + if (!ic) { + return (args->name); + } + ret = _GetICValueData(ic, args, GET_ICVAL); + return(ret); +} + +static char * +_MbReset(xic) +XIC xic; +{ + return(NULL); +} + +static wchar_t * +_WcReset(xic) +XIC xic; +{ + return(NULL); +} + +static int +_MbLookupString(xic, ev, buffer, bytes, keysym, status) +XIC xic; +XKeyEvent *ev; +char * buffer; +int bytes; +KeySym *keysym; +Status *status; +{ + XComposeStatus NotSupportedYet ; + int length; + + length = XLookupString(ev, buffer, bytes, keysym, &NotSupportedYet); + + if (keysym && *keysym == NoSymbol){ + *status = XLookupNone; + } else if (length > 0) { + *status = XLookupBoth; + } else { + *status = XLookupKeySym; + } + return(length); +} + +static int +_WcLookupString(xic, ev, buffer, wlen, keysym, status) +XIC xic; +XKeyEvent *ev; +wchar_t * buffer; +int wlen; +KeySym *keysym; +Status *status; +{ + XComposeStatus NotSupportedYet ; + int length; + /* In single-byte, mb_len = wc_len */ + char *mb_buf = (char *)Xmalloc(wlen); + + length = XLookupString(ev, mb_buf, wlen, keysym, &NotSupportedYet); + + if (keysym && *keysym == NoSymbol){ + *status = XLookupNone; + } else if (length > 0) { + *status = XLookupBoth; + } else { + *status = XLookupKeySym; + } + mbstowcs(buffer, mb_buf, length); + XFree(mb_buf); + return(length); +} Index: xc/lib/X11/XDefaultOMIF.c diff -u /dev/null xc/lib/X11/XDefaultOMIF.c:1.2 --- /dev/null Fri Jan 18 15:23:11 2002 +++ xc/lib/X11/XDefaultOMIF.c Mon Nov 19 10:33:38 2001 @@ -0,0 +1,1373 @@ +/* +Copyright 1985, 1986, 1987, 1991, 1998 The Open Group + +Portions Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: The above copyright notice and this +permission notice shall be included in all copies or substantial +portions of the Software. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF +ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. + + +Except as contained in this notice, the names of The Open Group and/or +Sun Microsystems, Inc. shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without prior +written authorization from The Open Group and/or Sun Microsystems, +Inc., as applicable. + + +X Window System is a trademark of The Open Group + +OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF +logo, LBX, X Window System, and Xinerama are trademarks of the Open +Group. All other trademarks and registered trademarks mentioned herein +are the property of their respective owners. No right, title or +interest in or to any trademark, service mark, logo or trade name of +Sun Microsystems, Inc. or its licensors is granted. + +*/ +/* $XFree86: xc/lib/X11/XDefaultOMIF.c,v 1.2 2001/11/19 15:33:38 tsi Exp $ */ + +#include "Xlibint.h" +#include "Xlcint.h" +#include "XlcPublic.h" +#include +#include +#include + +#define MAXFONTS 100 + +#define XOM_GENERIC(om) (&((XOMGeneric) om)->gen) +#define XOC_GENERIC(font_set) (&((XOCGeneric) font_set)->gen) + +#define DefineLocalBuf char local_buf[BUFSIZ] +#define AllocLocalBuf(length) (length > BUFSIZ ? (char *)Xmalloc(length) : local_buf) +#define FreeLocalBuf(ptr) if (ptr != local_buf) Xfree(ptr) + +typedef struct _FontDataRec { + char *name; +} FontDataRec, *FontData; + +typedef struct _OMDataRec { + int font_data_count; + FontData font_data; +} OMDataRec, *OMData; + +typedef struct _XOMGenericPart { + OMData data; +} XOMGenericPart; + +typedef struct _XOMGenericRec { + XOMMethods methods; + XOMCoreRec core; + XOMGenericPart gen; +} XOMGenericRec, *XOMGeneric; + +typedef struct _FontSetRec { + int id; + int font_data_count; + FontData font_data; + char *font_name; + XFontStruct *info; + XFontStruct *font; +} FontSetRec, *FontSet; + +typedef struct _XOCGenericPart { + XlcConv wcs_to_cs; + FontSet font_set; +} XOCGenericPart; + +typedef struct _XOCGenericRec { + XOCMethods methods; + XOCCoreRec core; + XOCGenericPart gen; +} XOCGenericRec, *XOCGeneric; + +static Bool +init_fontset(oc) + XOC oc; +{ + XOCGenericPart *gen; + FontSet font_set; + OMData data; + + data = XOM_GENERIC(oc->core.om)->data; + + font_set = (FontSet) Xmalloc(sizeof(FontSetRec)); + if (font_set == NULL) + return False; + bzero((char *) font_set, sizeof(FontSetRec)); + + gen = XOC_GENERIC(oc); + gen->font_set = font_set; + + font_set->font_data_count = data->font_data_count; + font_set->font_data = data->font_data; + + return True; +} + +static char * +get_prop_name(dpy, fs) + Display *dpy; + XFontStruct *fs; +{ + unsigned long fp; + + if (XGetFontProperty(fs, XA_FONT, &fp)) + return XGetAtomName(dpy, fp); + + return (char *) NULL; +} + +static FontData +check_charset(font_set, font_name) + FontSet font_set; + char *font_name; +{ + FontData font_data; + char *last; + int count; + ssize_t length, name_len; + + name_len = strlen(font_name); + last = font_name + name_len; + + count = font_set->font_data_count; + font_data = font_set->font_data; + + for ( ; count-- > 0; font_data++) { + length = strlen(font_data->name); + + if (length > name_len) + return(NULL); + + if (_XlcCompareISOLatin1(last - length, font_data->name) == 0) + return font_data; + } + return (FontData) NULL; +} + +#if 0 /* Unused */ +static int +check_fontname(oc, name) +XOC oc; +char *name; +{ + Display *dpy = oc->core.om->core.display; + XOCGenericPart *gen = XOC_GENERIC(oc); + FontData data; + FontSet font_set; + XFontStruct *fs_list; + char **fn_list, *fname, *prop_fname = NULL; + int list_num, i; + int list2_num; + char **fn2_list = NULL; + int found_num = 0; + + fn_list = XListFonts(dpy, name, MAXFONTS, &list_num); + if (fn_list == NULL) + return found_num; + + for (i = 0; i < list_num; i++) { + fname = fn_list[i]; + + font_set = gen->font_set; + + if ((data = check_charset(font_set, fname)) == NULL) { + if ((fn2_list = XListFontsWithInfo(dpy, name, MAXFONTS, + &list2_num, &fs_list)) + && (prop_fname = get_prop_name(dpy, fs_list)) + && (data = check_charset(font_set, prop_fname))) + fname = prop_fname; + } + if (data) { + font_set->font_name = (char *) Xmalloc(strlen(fname) + 1); + if (font_set->font_name) { + strcpy(font_set->font_name, fname); + found_num++; + } + } + if (fn2_list) { + XFreeFontInfo(fn2_list, fs_list, list2_num); + fn2_list = NULL; + if (prop_fname) { + Xfree(prop_fname); + prop_fname = NULL; + } + } + if (found_num == 1) + break; + } + XFreeFontNames(fn_list); + return found_num; +} +#endif + +static Bool +load_font(oc) + XOC oc; +{ + Display *dpy = oc->core.om->core.display; + XOCGenericPart *gen = XOC_GENERIC(oc); + FontSet font_set = gen->font_set; + + if (font_set->font_name == NULL) + return False; + + if (font_set->font == NULL) { + font_set->font = XLoadQueryFont(dpy, font_set->font_name); + if (font_set->font == NULL) + return False; + } + return True; +} + +static Bool +load_font_info(oc) + XOC oc; +{ + Display *dpy = oc->core.om->core.display; + XOCGenericPart *gen = XOC_GENERIC(oc); + FontSet font_set = gen->font_set; + char **fn_list; + int fn_num; + + if (font_set->font_name == NULL) + return False; + + if (font_set->info == NULL) { + fn_list = XListFontsWithInfo(dpy, font_set->font_name, 1, &fn_num, + &font_set->info); + if (font_set->info == NULL) + return False; + if (fn_num > 0) + font_set->info->fid = XLoadFont(dpy, font_set->font_name); + + if (fn_list) XFreeFontNames(fn_list); + } + return True; +} + +static void +set_fontset_extents(oc) + XOC oc; +{ + XRectangle *ink = &oc->core.font_set_extents.max_ink_extent; + XRectangle *logical = &oc->core.font_set_extents.max_logical_extent; + XFontStruct **font_list, *font; + XCharStruct overall; + int logical_ascent, logical_descent; + + font_list = oc->core.font_info.font_struct_list; + font = *font_list++; + overall = font->max_bounds; + overall.lbearing = font->min_bounds.lbearing; + logical_ascent = font->ascent; + logical_descent = font->descent; + + ink->x = overall.lbearing; + ink->y = -(overall.ascent); + ink->width = overall.rbearing - overall.lbearing; + ink->height = overall.ascent + overall.descent; + + logical->x = 0; + logical->y = -(logical_ascent); + logical->width = overall.width; + logical->height = logical_ascent + logical_descent; +} + +static Bool +init_core_part(oc) + XOC oc; +{ + XOCGenericPart *gen = XOC_GENERIC(oc); + FontSet font_set; + XFontStruct **font_struct_list; + char **font_name_list, *font_name_buf; + int count, length; + + font_set = gen->font_set; + count = length = 0; + + if (font_set->font_name != NULL) { + length += strlen(font_set->font_name) + 1; + count++; + } + if (count == 0) + return False; + + font_struct_list = (XFontStruct **) Xmalloc(sizeof(XFontStruct *)); + if (font_struct_list == NULL) + return False; + + font_name_list = (char **) Xmalloc(sizeof(char *)); + if (font_name_list == NULL) + goto err; + + font_name_buf = (char *) Xmalloc(length); + if (font_name_buf == NULL) + goto err; + + oc->core.font_info.num_font = 1; + oc->core.font_info.font_name_list = font_name_list; + oc->core.font_info.font_struct_list = font_struct_list; + + font_set = gen->font_set; + + if (font_set->font_name != NULL) { + font_set->id = 1; + if (font_set->font) + *font_struct_list++ = font_set->font; + else + *font_struct_list++ = font_set->info; + strcpy(font_name_buf, font_set->font_name); + Xfree(font_set->font_name); + *font_name_list++ = font_set->font_name = font_name_buf; + font_name_buf += strlen(font_name_buf) + 1; + } + + set_fontset_extents(oc); + + return True; + +err: + if (font_name_list) + Xfree(font_name_list); + Xfree(font_struct_list); + + return False; +} + +static char * +get_font_name(oc, pattern) + XOC oc; + char *pattern; +{ + char **list, *name, *prop_name; + int count; + XFontStruct *fs; + Display *dpy = oc->core.om->core.display; + + list = XListFonts(dpy, pattern, 1, &count); + if (list != NULL) { + name = (char *) Xmalloc(strlen(*list) + 1); + if (name) + strcpy(name, *list); + + XFreeFontNames(list); + } else { + fs = XLoadQueryFont(dpy, pattern); + if (fs == NULL) return NULL; + + prop_name = get_prop_name(dpy, fs); + if (prop_name == NULL) return NULL; + + name = (char*) Xmalloc(strlen(prop_name) + 1); + if (name) + strcpy(name, prop_name); + + XFreeFont(dpy, fs); + } + return name; +} + +static int +parse_fontname(oc) + XOC oc; +{ + XOCGenericPart *gen = XOC_GENERIC(oc); + FontSet font_set; + FontData font_data; + char *pattern, *last, buf[BUFSIZ]; + int font_data_count, found_num = 0; + ssize_t length; + int count, num_fields; + char *base_name, *font_name, **name_list, **cur_name_list; + char *charset_p = NULL; + Bool append_charset; + /* + append_charset flag should be set to True when the XLFD fontname + doesn't contain a chaset part. + */ + + name_list = _XParseBaseFontNameList(oc->core.base_name_list, &count); + if (name_list == NULL) + return -1; + cur_name_list = name_list; + + while (count-- > 0) { + pattern = *cur_name_list++; + if (pattern == NULL || *pattern == '\0') + continue; + + append_charset = False; + + if (strchr(pattern, '*') == NULL && + (font_name = get_font_name(oc, pattern))) { + + font_set = gen->font_set; + + font_data = check_charset(font_set, font_name); + if (font_data == NULL) { + Display *dpy = oc->core.om->core.display; + char **fn_list = NULL, *prop_fname = NULL; + int list_num; + XFontStruct *fs_list; + if ((fn_list = XListFontsWithInfo(dpy, font_name, + MAXFONTS, + &list_num, &fs_list)) + && (prop_fname = get_prop_name(dpy, fs_list)) + && (font_data = check_charset(font_set, prop_fname))) { + if (fn_list) { + XFreeFontInfo(fn_list, fs_list, list_num); + fn_list = NULL; + } + font_name = prop_fname; + } + } + if (font_data == NULL) + continue; + + font_set->font_name = (char *) Xmalloc(strlen(font_name) + 1); + if (font_set->font_name == NULL) { + Xfree(font_name); + goto err; + } + strcpy(font_set->font_name, font_name); + Xfree(font_name); + found_num++; + goto found; + } +/* +1266793 +Limit the length of the string copy to prevent stack corruption. + strcpy(buf, pattern); +*/ + strncpy(buf, pattern, BUFSIZ); + buf[BUFSIZ-1] = '\0'; + length = strlen(buf); + last = buf + length - 1; + + for (num_fields = 0, base_name = buf; *base_name != '\0'; base_name++) + if (*base_name == '-') num_fields++; + if (strchr(pattern, '*') == NULL) { + if (num_fields == 12) { + append_charset = True; + *++last = '-'; + last++; + } else + continue; + } else { + if (num_fields == 13 || num_fields == 14) { + /* + * There are 14 fields in an XLFD name -- make certain the + * charset (& encoding) is placed in the correct field. + */ + append_charset = True; + last = strrchr (buf, '-'); + if (num_fields == 14) { + *last = '\0'; + last = strrchr (buf, '-'); + } + last++; + } else if (*last == '*') { + append_charset = True; + if (length > 3 && *(last-3) == '-' && *(last-2) == '*' + && *(last-1) == '-') { + last -= 2; + } + *++last = '-'; + last++; + } else { + last = strrchr (buf, '-'); + charset_p = last; + charset_p = strrchr (buf, '-'); + while (*(--charset_p) != '-'); + charset_p++; + } + } + + font_set = gen->font_set; + + font_data = font_set->font_data; + font_data_count = font_set->font_data_count; + for ( ; font_data_count-- > 0; font_data++) { + if (append_charset) + { +/* +1266793 +Limit the length of the string copy to prevent stack corruption. + strcpy(last, font_data->name); +*/ + strncpy(last, font_data->name, BUFSIZ - length); + buf[BUFSIZ-1] = '\0'; + } + else { + if (_XlcCompareISOLatin1(charset_p, + font_data->name)) { + continue; + } + } + if ((font_set->font_name = get_font_name(oc, buf))) + break; + } + if (font_set->font_name != NULL) { + found_num++; + goto found; + } + } + found: + base_name = (char *) Xmalloc(strlen(oc->core.base_name_list) + 1); + if (base_name == NULL) + goto err; + + strcpy(base_name, oc->core.base_name_list); + oc->core.base_name_list = base_name; + + XFreeStringList(name_list); + + return found_num; +err: + XFreeStringList(name_list); + + return -1; +} + +static Bool +set_missing_list(oc) + XOC oc; +{ + XOCGenericPart *gen = XOC_GENERIC(oc); + FontSet font_set; + char **charset_list, *charset_buf; + int count, length; + + font_set = gen->font_set; + count = length = 0; + + if (!font_set->info && !font_set->font) { + length += strlen(font_set->font_data->name) + 1; + count++; + } + + if (count == 0) + return True; + + charset_list = (char **) Xmalloc(sizeof(char *)); + if (charset_list == NULL) + return False; + + charset_buf = (char *) Xmalloc(length); + if (charset_buf == NULL) { + Xfree(charset_list); + return False; + } + + oc->core.missing_list.charset_list = charset_list; + + font_set = gen->font_set; + + if (!font_set->info && !font_set->font) { + strcpy(charset_buf, font_set->font_data->name); + *charset_list++ = charset_buf; + charset_buf += strlen(charset_buf) + 1; + } + return True; +} + +static Bool +create_fontset(oc) + XOC oc; +{ + int found_num; + + if (init_fontset(oc) == False) + return False; + + found_num = parse_fontname(oc); + if (found_num <= 0) { + if (found_num == 0) + set_missing_list(oc); + return False; + } + + if (load_font(oc) == False) + return False; + + if (init_core_part(oc) == False) + return False; + + if (set_missing_list(oc) == False) + return False; + + return True; +} + +static void +destroy_oc(oc) + XOC oc; +{ + Display *dpy = oc->core.om->core.display; + XOCGenericPart *gen = XOC_GENERIC(oc); + XFontStruct **font_list, *font; + + if (gen->font_set) + Xfree(gen->font_set); + + if (oc->core.base_name_list) + Xfree(oc->core.base_name_list); + + if (oc->core.font_info.font_name_list) + XFreeStringList(oc->core.font_info.font_name_list); + + if ((font_list = oc->core.font_info.font_struct_list)) { + if ((font = *font_list)) { + if (font->fid) + XFreeFont(dpy, font); + else + XFreeFontInfo(NULL, font, 1); + } + Xfree(oc->core.font_info.font_struct_list); + } + + if (oc->core.missing_list.charset_list) + XFreeStringList(oc->core.missing_list.charset_list); + +#ifdef notdef + if (oc->core.res_name) + Xfree(oc->core.res_name); + if (oc->core.res_class) + Xfree(oc->core.res_class); +#endif + + Xfree(oc); +} + +static char * +set_oc_values(oc, args, num_args) + XOC oc; + XlcArgList args; + int num_args; +{ + if (oc->core.resources == NULL) + return NULL; + + return _XlcSetValues((XPointer) oc, oc->core.resources, + oc->core.num_resources, args, num_args, XlcSetMask); +} + +static char * +get_oc_values(oc, args, num_args) + XOC oc; + XlcArgList args; + int num_args; +{ + if (oc->core.resources == NULL) + return NULL; + + return _XlcGetValues((XPointer) oc, oc->core.resources, + oc->core.num_resources, args, num_args, XlcGetMask); +} + +static Bool +wcs_to_mbs(oc, to, from, length) + XOC oc; + char *to; + wchar_t *from; + int length; +{ + XlcConv conv = XOC_GENERIC(oc)->wcs_to_cs; + XLCd lcd; + int ret, to_left = length; + + if (conv == NULL) { + lcd = oc->core.om->core.lcd; + conv = _XlcOpenConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte); + if (conv == NULL) + return False; + XOC_GENERIC(oc)->wcs_to_cs = conv; + } else + _XlcResetConverter(conv); + + ret = _XlcConvert(conv, (XPointer *) &from, &length, (XPointer *) &to, + &to_left, NULL, 0); + if (ret != 0 || length > 0) + return False; + + return True; +} + +static int +#if NeedFunctionPrototypes +_XmbDefaultTextEscapement(XOC oc, _Xconst char *text, int length) +#else +_XmbDefaultTextEscapement(oc, text, length) + XOC oc; + char *text; + int length; +#endif +{ + return XTextWidth(*oc->core.font_info.font_struct_list, text, length); +} + +static int +#if NeedFunctionPrototypes +_XwcDefaultTextEscapement(XOC oc, _Xconst wchar_t *text, int length) +#else +_XwcDefaultTextEscapement(oc, text, length) + XOC oc; + wchar_t *text; + int length; +#endif +{ + DefineLocalBuf; + char *buf = AllocLocalBuf(length); + int ret = 0; + + if (buf == NULL) + return 0; + + if (wcs_to_mbs(oc, buf, text, length) == False) + goto err; + + ret = _XmbDefaultTextEscapement(oc, buf, length); + +err: + FreeLocalBuf(buf); + + return ret; +} + +static int +#if NeedFunctionPrototypes +_XmbDefaultTextExtents(XOC oc, _Xconst char *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical) +#else +_XmbDefaultTextExtents(oc, text, length, overall_ink, overall_logical) + XOC oc; + char *text; + int length; + XRectangle *overall_ink; + XRectangle *overall_logical; +#endif +{ + int direction, logical_ascent, logical_descent; + XCharStruct overall; + + XTextExtents(*oc->core.font_info.font_struct_list, text, length, &direction, + &logical_ascent, &logical_descent, &overall); + + if (overall_ink) { + overall_ink->x = overall.lbearing; + overall_ink->y = -(overall.ascent); + overall_ink->width = overall.rbearing - overall.lbearing; + overall_ink->height = overall.ascent + overall.descent; + } + + if (overall_logical) { + overall_logical->x = 0; + overall_logical->y = -(logical_ascent); + overall_logical->width = overall.width; + overall_logical->height = logical_ascent + logical_descent; + } + + return overall.width; +} + +static int +#if NeedFunctionPrototypes +_XwcDefaultTextExtents(XOC oc, _Xconst wchar_t *text, int length, + XRectangle *overall_ink, XRectangle *overall_logical) +#else +_XwcDefaultTextExtents(oc, text, length, overall_ink, overall_logical) + XOC oc; + wchar_t *text; + int length; + XRectangle *overall_ink; + XRectangle *overall_logical; +#endif +{ + DefineLocalBuf; + char *buf = AllocLocalBuf(length); + int ret = 0; + + if (buf == NULL) + return 0; + + if (wcs_to_mbs(oc, buf, text, length) == False) + goto err; + + ret = _XmbDefaultTextExtents(oc, buf, length, overall_ink, overall_logical); + +err: + FreeLocalBuf(buf); + + return ret; +} + +static Status +#if NeedFunctionPrototypes +_XmbDefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical) +#else +_XmbDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, + num_chars, overall_ink, overall_logical) + XOC oc; + char *text; + int length; + XRectangle *ink_buf; + XRectangle *logical_buf; + int buf_size; + int *num_chars; + XRectangle *overall_ink; + XRectangle *overall_logical; +#endif +{ + XFontStruct *font = *oc->core.font_info.font_struct_list; + XCharStruct *def, *cs, overall; + Bool first = True; + + if (buf_size < length) + return 0; + + bzero((char *) &overall, sizeof(XCharStruct)); + *num_chars = 0; + + CI_GET_DEFAULT_INFO_1D(font, def) + + while (length-- > 0) { + CI_GET_CHAR_INFO_1D(font, *text, def, cs) + text++; + if (cs == NULL) + continue; + + ink_buf->x = overall.width + cs->lbearing; + ink_buf->y = -(cs->ascent); + ink_buf->width = cs->rbearing - cs->lbearing; + ink_buf->height = cs->ascent + cs->descent; + ink_buf++; + + logical_buf->x = overall.width; + logical_buf->y = -(font->ascent); + logical_buf->width = cs->width; + logical_buf->height = font->ascent + font->descent; + logical_buf++; + + if (first) { + overall = *cs; + first = False; + } else { + overall.ascent = max(overall.ascent, cs->ascent); + overall.descent = max(overall.descent, cs->descent); + overall.lbearing = min(overall.lbearing, overall.width + + cs->lbearing); + overall.rbearing = max(overall.rbearing, overall.width + + cs->rbearing); + overall.width += cs->width; + } + (*num_chars)++; + } + + if (overall_ink) { + overall_ink->x = overall.lbearing; + overall_ink->y = -(overall.ascent); + overall_ink->width = overall.rbearing - overall.lbearing; + overall_ink->height = overall.ascent + overall.descent; + } + + if (overall_logical) { + overall_logical->x = 0; + overall_logical->y = -(font->ascent); + overall_logical->width = overall.width; + overall_logical->height = font->ascent + font->descent; + } + + return 1; +} + +static Status +#if NeedFunctionPrototypes +_XwcDefaultTextPerCharExtents(XOC oc, _Xconst wchar_t *text, int length, + XRectangle *ink_buf, XRectangle *logical_buf, + int buf_size, int *num_chars, + XRectangle *overall_ink, + XRectangle *overall_logical) +#else +_XwcDefaultTextPerCharExtents(oc, text, length, ink_buf, logical_buf, buf_size, + num_chars, overall_ink, overall_logical) + XOC oc; + wchar_t *text; + int length; + XRectangle *ink_buf; + XRectangle *logical_buf; + int buf_size; + int *num_chars; + XRectangle *overall_ink; + XRectangle *overall_logical; +#endif +{ + DefineLocalBuf; + char *buf = AllocLocalBuf(length); + Status ret = 0; + + if (buf == NULL) + return 0; + + if (wcs_to_mbs(oc, buf, text, length) == False) + goto err; + + ret = _XmbDefaultTextPerCharExtents(oc, buf, length, ink_buf, logical_buf, + buf_size, num_chars, overall_ink, + overall_logical); + +err: + FreeLocalBuf(buf); + + return ret; +} + +static int +#if NeedFunctionPrototypes +_XmbDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst char *text, int length) +#else +_XmbDefaultDrawString(dpy, d, oc, gc, x, y, text, length) + Display *dpy; + Drawable d; + XOC oc; + GC gc; + int x, y; + char *text; + int length; +#endif +{ + XFontStruct *font = *oc->core.font_info.font_struct_list; + + XSetFont(dpy, gc, font->fid); + XDrawString(dpy, d, gc, x, y, text, length); + + return XTextWidth(font, text, length); +} + +static int +#if NeedFunctionPrototypes +_XwcDefaultDrawString(Display *dpy, Drawable d, XOC oc, GC gc, int x, int y, + _Xconst wchar_t *text, int length) +#else +_XwcDefaultDrawString(dpy, d, oc, gc, x, y, text, length) + Display *dpy; + Drawable d; + XOC oc; + GC gc; + int x, y; + wchar_t *text; + int length; +#endif +{ + DefineLocalBuf; + char *buf = AllocLocalBuf(length); + int ret = 0; + + if (buf == NULL) + return 0; + + if (wcs_to_mbs(oc, buf, text, length) == False) + goto err; + + ret = _XmbDefaultDrawString(dpy, d, oc, gc, x, y, buf, length); + +err: + FreeLocalBuf(buf); + + return ret; +} + +static void +#if NeedFunctionPrototypes +_XmbDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst char *text, int length) +#else +_XmbDefaultDrawImageString(dpy, d, oc, gc, x, y, text, length) + Display *dpy; + Drawable d; + XOC oc; + GC gc; + int x, y; + char *text; + int length; +#endif +{ + XSetFont(dpy, gc, (*oc->core.font_info.font_struct_list)->fid); + XDrawImageString(dpy, d, gc, x, y, text, length); +} + +static void +#if NeedFunctionPrototypes +_XwcDefaultDrawImageString(Display *dpy, Drawable d, XOC oc, GC gc, int x, + int y, _Xconst wchar_t *text, int length) +#else +_XwcDefaultDrawImageString(dpy, d, oc, gc, x, y, text, length) + Display *dpy; + Drawable d; + XOC oc; + GC gc; + int x, y; + wchar_t *text; + int length; +#endif +{ + DefineLocalBuf; + char *buf = AllocLocalBuf(length); + + if (buf == NULL) + return; + + if (wcs_to_mbs(oc, buf, text, length) == False) + goto err; + + _XmbDefaultDrawImageString(dpy, d, oc, gc, x, y, buf, length); + +err: + FreeLocalBuf(buf); +} + +static _Xconst XOCMethodsRec oc_default_methods = { + destroy_oc, + set_oc_values, + get_oc_values, + _XmbDefaultTextEscapement, + _XmbDefaultTextExtents, + _XmbDefaultTextPerCharExtents, + _XmbDefaultDrawString, + _XmbDefaultDrawImageString, + _XwcDefaultTextEscapement, + _XwcDefaultTextExtents, + _XwcDefaultTextPerCharExtents, + _XwcDefaultDrawString, + _XwcDefaultDrawImageString +}; + +static XlcResource oc_resources[] = { + { XNBaseFontName, NULLQUARK, sizeof(char *), + XOffsetOf(XOCRec, core.base_name_list), XlcCreateMask | XlcGetMask }, + { XNOMAutomatic, NULLQUARK, sizeof(Bool), + XOffsetOf(XOCRec, core.om_automatic), XlcGetMask }, + { XNMissingCharSet, NULLQUARK, sizeof(XOMCharSetList), + XOffsetOf(XOCRec, core.missing_list), XlcGetMask }, + { XNDefaultString, NULLQUARK, sizeof(char *), + XOffsetOf(XOCRec, core.default_string), XlcGetMask }, + { XNOrientation, NULLQUARK, sizeof(XOrientation), + XOffsetOf(XOCRec, core.orientation), XlcSetMask | XlcGetMask }, + { XNResourceName, NULLQUARK, sizeof(char *), + XOffsetOf(XOCRec, core.res_name), XlcSetMask | XlcGetMask }, + { XNResourceClass, NULLQUARK, sizeof(char *), + XOffsetOf(XOCRec, core.res_class), XlcSetMask | XlcGetMask }, + { XNFontInfo, NULLQUARK, sizeof(XOMFontInfo), + XOffsetOf(XOCRec, core.font_info), XlcGetMask } +}; + +static XOC +create_oc(om, args, num_args) + XOM om; + XlcArgList args; + int num_args; +{ + XOC oc; + + oc = (XOC) Xmalloc(sizeof(XOCGenericRec)); + if (oc == NULL) + return (XOC) NULL; + bzero((char *) oc, sizeof(XOCGenericRec)); + + oc->core.om = om; + + if (oc_resources[0].xrm_name == NULLQUARK) + _XlcCompileResourceList(oc_resources, XlcNumber(oc_resources)); + + if (_XlcSetValues((XPointer) oc, oc_resources, XlcNumber(oc_resources), + args, num_args, XlcCreateMask | XlcDefaultMask)) + goto err; + + if (oc->core.base_name_list == NULL) + goto err; + + oc->core.resources = oc_resources; + oc->core.num_resources = XlcNumber(oc_resources); + + if (create_fontset(oc) == False) + goto err; + + oc->methods = (XOCMethods)&oc_default_methods; + + return oc; + +err: + destroy_oc(oc); + + return (XOC) NULL; +} + +static Status +close_om(om) + XOM om; +{ + XOMGenericPart *gen = XOM_GENERIC(om); + OMData data; + FontData font_data; + int count; + + if ((data = gen->data)) { + if (data->font_data) { + for (font_data = data->font_data, count = data->font_data_count; + count-- > 0 ; font_data++) { + if (font_data->name) + Xfree(font_data->name); + } + Xfree(data->font_data); + } + Xfree(gen->data); + } + + if (om->core.res_name) + Xfree(om->core.res_name); + if (om->core.res_class) + Xfree(om->core.res_class); + if (om->core.required_charset.charset_list) + XFreeStringList(om->core.required_charset.charset_list); + else + Xfree((char*)om->core.required_charset.charset_list); + if (om->core.orientation_list.orientation) + Xfree(om->core.orientation_list.orientation); + + Xfree(om); + + return 1; +} + +static char * +set_om_values(om, args, num_args) + XOM om; + XlcArgList args; + int num_args; +{ + if (om->core.resources == NULL) + return NULL; + + return _XlcSetValues((XPointer) om, om->core.resources, + om->core.num_resources, args, num_args, XlcSetMask); +} + +static char * +get_om_values(om, args, num_args) + XOM om; + XlcArgList args; + int num_args; +{ + if (om->core.resources == NULL) + return NULL; + + return _XlcGetValues((XPointer) om, om->core.resources, + om->core.num_resources, args, num_args, XlcGetMask); +} + +static _Xconst XOMMethodsRec methods = { + close_om, + set_om_values, + get_om_values, + create_oc +}; + +static XlcResource om_resources[] = { + { XNRequiredCharSet, NULLQUARK, sizeof(XOMCharSetList), + XOffsetOf(XOMRec, core.required_charset), XlcGetMask }, + { XNQueryOrientation, NULLQUARK, sizeof(XOMOrientation), + XOffsetOf(XOMRec, core.orientation_list), XlcGetMask }, + { XNDirectionalDependentDrawing, NULLQUARK, sizeof(Bool), + XOffsetOf(XOMRec, core.directional_dependent), XlcGetMask }, + { XNContextualDrawing, NULLQUARK, sizeof(Bool), + XOffsetOf(XOMRec, core.contextual_drawing), XlcGetMask } +}; + +static OMData +add_data(om) + XOM om; +{ + XOMGenericPart *gen = XOM_GENERIC(om); + OMData new; + + new = (OMData) Xmalloc(sizeof(OMDataRec)); + + if (new == NULL) + return NULL; + + gen->data = new; + + bzero((char *) new, sizeof(OMDataRec)); + + return new; +} + +static _Xconst char *supported_charset_list[] = { + "ISO8859-1", +/* fix for bug4332979 */ + "adobe-fontspecific", +/* fix for bug4237353: "JISX0201.1976-0" entry should be removed from + supported_charset_list because it is not a supported_charset for C locale + "JISX0201.1976-0", */ + "SUNOLCURSOR-1", + "SUNOLGLYPH-1" +}; + +static Bool +init_om(om) + XOM om; +{ + XOMGenericPart *gen = XOM_GENERIC(om); + OMData data; + FontData font_data; + char **required_list; + XOrientation *orientation; + char **value, buf[BUFSIZ], *bufptr; + int count, length = 0; + + value = (char**)supported_charset_list; + count = XlcNumber(supported_charset_list); + + data = add_data(om); + if (data == NULL) + return False; + + font_data = (FontData) Xmalloc(sizeof(FontDataRec) * count); + if (font_data == NULL) + return False; + bzero((char *) font_data, sizeof(FontDataRec) * count); + data->font_data = font_data; + data->font_data_count = count; + + for ( ; count-- > 0; font_data++) { +/* +1266793 +This one is fine. *value points to one of the local strings in +supported_charset_list[]. +*/ + strcpy(buf, *value++); + font_data->name = (char *) Xmalloc(strlen(buf) + 1); + if (font_data->name == NULL) + return False; + strcpy(font_data->name, buf); + } + + length += strlen(data->font_data->name) + 1; + + /* required charset list */ + required_list = (char **) Xmalloc(sizeof(char *)); + if (required_list == NULL) + return False; + + bufptr = (char *) Xmalloc(length); + if (bufptr == NULL) { + Xfree(required_list); + return False; + } + + om->core.required_charset.charset_list = required_list; + om->core.required_charset.charset_count = 1; /* always 1 */ + + data = gen->data; + + strcpy(bufptr, data->font_data->name); + *required_list++ = bufptr; + bufptr += strlen(bufptr) + 1; + + /* orientation list */ + orientation = (XOrientation *) Xmalloc(sizeof(XOrientation)); + if (orientation == NULL) + return False; + + *orientation = XOMOrientation_LTR_TTB; + om->core.orientation_list.orientation = orientation; + om->core.orientation_list.num_orientation = 1; + + /* directional dependent drawing */ + om->core.directional_dependent = False; + + /* contexual drawing */ + om->core.contextual_drawing = False; + + /* context dependent */ + om->core.context_dependent = False; + + return True; +} + +XOM +#if NeedFunctionPrototypes +_XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb, + _Xconst char *res_name, _Xconst char *res_class) +#else +_XDefaultOpenOM(lcd, dpy, rdb, res_name, res_class) +XLCd lcd; +Display *dpy; +XrmDatabase rdb; +char *res_name; +char *res_class; +#endif +{ + XOM om; + + om = (XOM) Xmalloc(sizeof(XOMGenericRec)); + if (om == NULL) + return (XOM) NULL; + bzero((char *) om, sizeof(XOMGenericRec)); + + om->methods = (XOMMethods)&methods; + om->core.lcd = lcd; + om->core.display = dpy; + om->core.rdb = rdb; + if (res_name) { + om->core.res_name = (char *)Xmalloc(strlen(res_name) + 1); + if (om->core.res_name == NULL) + goto err; + strcpy(om->core.res_name, res_name); + } + if (res_class) { + om->core.res_class = (char *)Xmalloc(strlen(res_class) + 1); + if (om->core.res_class == NULL) + goto err; + strcpy(om->core.res_class, res_class); + } + + if (om_resources[0].xrm_name == NULLQUARK) + _XlcCompileResourceList(om_resources, XlcNumber(om_resources)); + + om->core.resources = om_resources; + om->core.num_resources = XlcNumber(om_resources); + + if (init_om(om) == False) + goto err; + + return om; +err: + close_om(om); + + return (XOM) NULL; +} Index: xc/lib/X11/XErrorDB diff -u xc/lib/X11/XErrorDB:3.35 xc/lib/X11/XErrorDB:3.36 --- xc/lib/X11/XErrorDB:3.35 Fri May 18 19:35:28 2001 +++ xc/lib/X11/XErrorDB Fri Dec 14 14:54:08 2001 @@ -1,7 +1,11 @@ ! $Xorg: XErrorDB,v 1.3 2000/08/17 19:44:59 cpqbld Exp $ ! Copyright 1993, 1995, 1998 The Open Group -! All Rights Reserved. +! Permission to use, copy, modify, distribute, and sell this software and its +! documentation for any purpose is hereby granted without fee, provided that +! the above copyright notice appear in all copies and that both that +! copyright notice and this permission notice appear in supporting +! documentation. ! ! The above copyright notice and this permission notice shall be ! included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ ! other dealings in this Software without prior written authorization ! from The Open Group. ! -! $XFree86: xc/lib/X11/XErrorDB,v 3.35 2001/05/18 23:35:28 dawes Exp $ +! $XFree86: xc/lib/X11/XErrorDB,v 3.36 2001/12/14 19:54:08 dawes Exp $ ! ! these are used in XGetErrorMessage. XlibMessage.XError: X Error of failed request Index: xc/lib/X11/XKB.c diff -u xc/lib/X11/XKB.c:1.5 xc/lib/X11/XKB.c:1.6 --- xc/lib/X11/XKB.c:1.5 Tue Feb 20 11:43:14 2001 +++ xc/lib/X11/XKB.c Sat Oct 27 23:32:33 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKB.c,v 1.5 2001/02/20 16:43:14 paulo Exp $ */ +/* $XFree86: xc/lib/X11/XKB.c,v 1.6 2001/10/28 03:32:33 tsi Exp $ */ #include #define NEED_REPLIES @@ -172,7 +172,7 @@ { register xkbSelectEventsReq *req; XkbInfoPtr xkbi; - int size; + int size = 0; char *out; union { CARD8 *c8; @@ -529,7 +529,7 @@ { register int i; unsigned tmp; -XkbKTMapEntryPtr entry; +XkbKTMapEntryPtr entry = NULL; if ((!xkb)||(!type)||(!xkb->server)) return False; Index: xc/lib/X11/XKBBind.c diff -u xc/lib/X11/XKBBind.c:3.13 xc/lib/X11/XKBBind.c:3.14 --- xc/lib/X11/XKBBind.c:3.13 Wed Jan 17 14:41:48 2001 +++ xc/lib/X11/XKBBind.c Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XKBBind.c,v 1.3 2000/08/17 19:45:00 cpqbld Exp $ */ +/* $Xorg: XKBBind.c,v 1.4 2001/02/09 02:03:37 xorgcvs Exp $ */ /* Copyright 1985, 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBBind.c,v 3.13 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBBind.c,v 3.14 2001/12/14 19:54:08 dawes Exp $ */ /* the new monsters ate the old ones */ Index: xc/lib/X11/XKBCvt.c diff -u xc/lib/X11/XKBCvt.c:3.30 xc/lib/X11/XKBCvt.c:3.32 --- xc/lib/X11/XKBCvt.c:3.30 Thu Feb 8 19:02:53 2001 +++ xc/lib/X11/XKBCvt.c Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XKBCvt.c,v 1.4 2000/08/17 19:45:00 cpqbld Exp $ */ +/* $Xorg: XKBCvt.c,v 1.5 2001/02/09 02:03:38 xorgcvs Exp $ */ /* Copyright 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.30 2001/02/09 00:02:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.32 2001/12/14 19:54:08 dawes Exp $ */ #include #include @@ -48,21 +52,6 @@ #ifdef __sgi_not_xconsortium #define XKB_EXTEND_LOOKUP_STRING -#endif - -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif - -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif -#if defined(__STDC__) && !defined(NORCONST) -#define RConst const -#else -#define RConst /**/ #endif static int Index: xc/lib/X11/XKBExtDev.c diff -u xc/lib/X11/XKBExtDev.c:3.3 xc/lib/X11/XKBExtDev.c:3.4 --- xc/lib/X11/XKBExtDev.c:3.3 Wed Jan 17 14:41:48 2001 +++ xc/lib/X11/XKBExtDev.c Sat Oct 27 23:32:33 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.3 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.4 2001/10/28 03:32:33 tsi Exp $ */ #include #define NEED_REPLIES @@ -771,7 +771,7 @@ #endif { register xkbSetDeviceInfoReq *req; - Status ok; + Status ok = 0; int size,nLeds; XkbInfoPtr xkbi; XkbDeviceChangesRec changes; @@ -833,7 +833,7 @@ #endif { register xkbSetDeviceInfoReq *req; - Status ok; + Status ok = 0; int size,nLeds; XkbInfoPtr xkbi; SetLedStuff lstuff; @@ -909,7 +909,7 @@ #endif { register xkbSetDeviceInfoReq *req; - Status ok; + Status ok = 0; int size,nLeds; XkbInfoPtr xkbi; XkbDeviceChangesRec changes; Index: xc/lib/X11/XKBGeom.c diff -u xc/lib/X11/XKBGeom.c:1.3 xc/lib/X11/XKBGeom.c:1.4 --- xc/lib/X11/XKBGeom.c:1.3 Wed Jan 17 14:41:48 2001 +++ xc/lib/X11/XKBGeom.c Sat Oct 27 23:32:33 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.3 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.4 2001/10/28 03:32:33 tsi Exp $ */ #ifdef DEBUG #include @@ -174,7 +174,7 @@ XkbShapePtr shape; XkbRowPtr row; XkbDoodadPtr doodad; -XkbBoundsPtr bounds,rbounds; +XkbBoundsPtr bounds,rbounds=NULL; if ((!geom)||(!section)) return False; Index: xc/lib/X11/XKBMisc.c diff -u xc/lib/X11/XKBMisc.c:3.3 xc/lib/X11/XKBMisc.c:3.5 --- xc/lib/X11/XKBMisc.c:3.3 Wed Jan 17 14:41:48 2001 +++ xc/lib/X11/XKBMisc.c Sat Oct 27 23:32:33 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.3 2001/01/17 19:41:48 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.5 2001/10/28 03:32:33 tsi Exp $ */ #ifndef XKB_IN_SERVER @@ -51,10 +51,6 @@ #endif /* XKB_IN_SERVER */ -/* FORWARD DECLARATIONS */ - -Bool XkbApplyVirtualModChanges(); - /***====================================================================***/ #define mapSize(m) (sizeof(m)/sizeof(XkbKTMapEntryRec)) @@ -973,7 +969,7 @@ #endif { register int i; -unsigned checkState; +unsigned int checkState = 0; if ((!xkb) || (!xkb->map) || (changed==0)) return False; @@ -1040,8 +1036,7 @@ } } if (xkb->map && xkb->server) { - int highChange,lowChange; - lowChange= -1; + int highChange = 0, lowChange = -1; for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) { if (XkbKeyHasActions(xkb,i)) { register XkbAction *pAct; Index: xc/lib/X11/XKBNames.c diff -u xc/lib/X11/XKBNames.c:1.3 xc/lib/X11/XKBNames.c:1.4 --- xc/lib/X11/XKBNames.c:1.3 Wed Jan 17 14:41:48 2001 +++ xc/lib/X11/XKBNames.c Sat Oct 27 23:32:33 2001 @@ -24,6 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBNames.c,v 1.4 2001/10/28 03:32:33 tsi Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -369,12 +370,12 @@ #endif { register xkbSetNamesReq *req; - int nLvlNames; + int nLvlNames = 0; XkbInfoPtr xkbi; XkbNamesPtr names; unsigned firstLvlType,nLvlTypes; int nVMods,nLEDs,nRG,nKA,nGroups; - int nKeys,firstKey,nAtoms; + int nKeys=0,firstKey=0,nAtoms; CARD32 leds,vmods,groups; if ((dpy->flags & XlibDisplayNoXkb) || @@ -598,14 +599,14 @@ #endif { register xkbSetNamesReq *req; - int nLvlNames; + int nLvlNames = 0; XkbInfoPtr xkbi; XkbNamesPtr names; unsigned which,firstType,nTypes; unsigned firstLvlType,nLvlTypes; int nVMods,nLEDs,nRG,nKA,nGroups; - int nKeys,firstKey,nAtoms; - CARD32 leds,vmods,groups; + int nKeys=0,firstKey=0,nAtoms; + CARD32 leds=0,vmods=0,groups=0; if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) Index: xc/lib/X11/XKBRdBuf.c diff -u xc/lib/X11/XKBRdBuf.c:1.1.1.5 xc/lib/X11/XKBRdBuf.c:1.2 --- xc/lib/X11/XKBRdBuf.c:1.1.1.5 Tue Jan 16 17:09:13 2001 +++ xc/lib/X11/XKBRdBuf.c Sat Oct 27 23:32:33 2001 @@ -24,6 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBRdBuf.c,v 1.2 2001/10/28 03:32:33 tsi Exp $ */ #include #define NEED_REPLIES @@ -301,7 +302,7 @@ { CARD16 len,*pLen; int left; -char * str; +char * str = NULL; if ((buf==NULL)||(buf->error)||((left=(int)_XkbReadBufferDataLeft(buf))<4)) return False; Index: xc/lib/X11/XKBUse.c diff -u xc/lib/X11/XKBUse.c:3.4 xc/lib/X11/XKBUse.c:3.6 --- xc/lib/X11/XKBUse.c:3.4 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/XKBUse.c Mon Aug 13 13:46:02 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/X11/XKBUse.c,v 3.4 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XKBUse.c,v 3.6 2001/08/13 17:46:02 dawes Exp $ */ #include #include @@ -34,10 +34,6 @@ #include #include "XKBlibint.h" -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif - static Bool _XkbIgnoreExtension = False; void @@ -693,8 +689,7 @@ dpy->xkb_info = xkbi; dpy->free_funcs->xkb = _XkbFreeInfo; - xkbi->xlib_ctrls|= - (XkbLC_BeepOnComposeFail|XkbLC_ComposeLED|XkbLC_ControlFallback); + xkbi->xlib_ctrls|= (XkbLC_ControlFallback|XkbLC_ConsumeLookupMods); if ((str=getenv("_XKB_OPTIONS_ENABLE"))!=NULL) { if ((str=getenv("_XKB_LATIN1_LOOKUP"))!=NULL) { if ((strcmp(str,"off")==0)||(strcmp(str,"0")==0)) Index: xc/lib/X11/XKBlib.h diff -u xc/lib/X11/XKBlib.h:3.2 xc/lib/X11/XKBlib.h:3.3 --- xc/lib/X11/XKBlib.h:3.2 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/XKBlib.h Tue Jul 31 20:44:38 2001 @@ -24,6 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/X11/XKBlib.h,v 3.3 2001/08/01 00:44:38 tsi Exp $ */ #ifndef _XKBLIB_H_ #define _XKBLIB_H_ @@ -1343,6 +1344,14 @@ unsigned int /* ctrls */, unsigned int * /* rtrn_flags */, unsigned int * /* rtrn_ctrls */ +#endif +); + +extern Bool XkbApplyVirtualModChanges( +#if NeedFunctionPrototypes + XkbDescPtr /* xkb */, + unsigned int /* changed */, + XkbChangesPtr /* changes */ #endif ); Index: xc/lib/X11/XKeysymDB diff -u xc/lib/X11/XKeysymDB:3.11 xc/lib/X11/XKeysymDB:3.12 --- xc/lib/X11/XKeysymDB:3.11 Thu Apr 5 22:16:21 2001 +++ xc/lib/X11/XKeysymDB Wed Dec 26 17:28:25 2001 @@ -11,7 +11,7 @@ ! suitability of this software for any purpose. It is provided "as is" ! without express or implied warranty. ! -! $XFree86: xc/lib/X11/XKeysymDB,v 3.11 2001/04/06 02:16:21 dawes Exp $ +! $XFree86: xc/lib/X11/XKeysymDB,v 3.12 2001/12/26 22:28:25 dawes Exp $ hpmute_acute :100000A8 hpmute_grave :100000A9 @@ -243,7 +243,9 @@ XF86AddFavorite :1008FF39 XF86HotLinks :1008FF3A XF86BrightnessAdjust :1008FF3B -! Allocate 1008FF3C-F next +XF86Finance :1008FF3C +XF86Community :1008FF3D +! Allocate 1008FF3E-F next XF86Launch0 :1008FF40 XF86Launch1 :1008FF41 Index: xc/lib/X11/XRGB.c diff -u xc/lib/X11/XRGB.c:3.1 xc/lib/X11/XRGB.c:3.3 --- xc/lib/X11/XRGB.c:3.1 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/XRGB.c Sun Jul 29 01:01:11 2001 @@ -33,21 +33,16 @@ * * */ +/* $XFree86: xc/lib/X11/XRGB.c,v 3.3 2001/07/29 05:01:11 tsi Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - /* * LOCAL VARIABLES */ -static unsigned short Const MASK[17] = { +static unsigned short const MASK[17] = { 0x0000, /* 0 bitsPerRGB */ 0x8000, /* 1 bitsPerRGB */ 0xc000, /* 2 bitsPerRGB */ Index: xc/lib/X11/Xatomtype.h diff -u xc/lib/X11/Xatomtype.h:1.1.1.3 xc/lib/X11/Xatomtype.h:1.2 --- xc/lib/X11/Xatomtype.h:1.1.1.3 Tue Jan 16 17:09:31 2001 +++ xc/lib/X11/Xatomtype.h Fri Dec 14 14:54:08 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xatomtype.h,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ */ +/* $Xorg: Xatomtype.h,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/Xcmsint.h diff -u xc/lib/X11/Xcmsint.h:3.2 xc/lib/X11/Xcmsint.h:3.3 --- xc/lib/X11/Xcmsint.h:3.2 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/Xcmsint.h Wed Jul 25 11:04:44 2001 @@ -29,7 +29,7 @@ * (i.e., for API internal use only) * */ -/* $XFree86: xc/lib/X11/Xcmsint.h,v 3.2 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xcmsint.h,v 3.3 2001/07/25 15:04:44 dawes Exp $ */ #ifndef _XCMSINT_H_ #define _XCMSINT_H_ @@ -196,19 +196,11 @@ #define XCMS_SQRT(x) _XcmsSquareRoot(x) #define XCMS_TAN(x) (XCMS_SIN(x) / XCMS_COS(x)) -#ifdef __STDC__ double _XcmsArcTangent(double a); double _XcmsCosine(double a); double _XcmsCubeRoot(double a); double _XcmsSine(double a); double _XcmsSquareRoot(double a); -#else -double _XcmsArcTangent(); -double _XcmsCosine(); -double _XcmsCubeRoot(); -double _XcmsSine(); -double _XcmsSquareRoot(); -#endif /* * DEFINES FOR GAMUT COMPRESSION AND QUERY ROUTINES Index: xc/lib/X11/XimThai.h diff -u xc/lib/X11/XimThai.h:1.2 xc/lib/X11/XimThai.h:1.5 --- xc/lib/X11/XimThai.h:1.2 Thu Feb 8 19:02:53 2001 +++ xc/lib/X11/XimThai.h Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XimThai.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ +/* $Xorg: XimThai.h,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/XimThai.h,v 1.2 2001/02/09 00:02:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XimThai.h,v 1.5 2001/12/14 19:54:08 dawes Exp $ */ /* **++ @@ -166,6 +170,7 @@ #endif ); +#if 0 Private void THAI_apply_write_rules ( #if NeedFunctionPrototypes @@ -183,6 +188,7 @@ int chtype #endif ); +#endif Private int THAI_apply_scm ( Index: xc/lib/X11/Ximint.h diff -u xc/lib/X11/Ximint.h:3.9 xc/lib/X11/Ximint.h:3.10 --- xc/lib/X11/Ximint.h:3.9 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/Ximint.h Wed Jul 25 11:04:44 2001 @@ -30,7 +30,7 @@ makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/Ximint.h,v 3.9 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Ximint.h,v 3.10 2001/07/25 15:04:44 dawes Exp $ */ #ifndef _XIMINT_H #define _XIMINT_H @@ -41,12 +41,6 @@ #define Public /**/ #define Private static -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - typedef struct _Xim *Xim; typedef struct _Xic *Xic; @@ -192,7 +186,7 @@ XPointer _XimGetLocaleCode ( #if NeedFunctionPrototypes - Const char *encoding_name + const char *encoding_name #endif ); Index: xc/lib/X11/Xintatom.h diff -u /dev/null xc/lib/X11/Xintatom.h:1.1 --- /dev/null Fri Jan 18 15:23:12 2002 +++ xc/lib/X11/Xintatom.h Fri Aug 17 22:41:28 2001 @@ -0,0 +1,33 @@ +/* $XFree86: xc/lib/X11/Xintatom.h,v 1.1 2001/08/18 02:41:28 dawes Exp $ */ + +#ifndef _XINTATOM_H_ +#define _XINTATOM_H_ 1 + +#include + +/* IntAtom.c */ + +#define TABLESIZE 64 + +typedef struct _Entry { + unsigned long sig; + Atom atom; +} EntryRec, *Entry; + +#define RESERVED ((Entry) 1) + +#define EntryName(e) ((char *)(e+1)) + +typedef struct _XDisplayAtoms { + Entry table[TABLESIZE]; +} AtomTable; + +_XFUNCPROTOBEGIN + +extern void _XUpdateAtomCache(Display *dpy, const char *name, Atom atom, + unsigned long sig, int idx, int n); +extern void _XFreeAtomTable(Display *dpy); + +_XFUNCPROTOEND + +#endif /* _XINTATOM_H_ */ Index: xc/lib/X11/Xintconn.h diff -u /dev/null xc/lib/X11/Xintconn.h:1.1 --- /dev/null Fri Jan 18 15:23:12 2002 +++ xc/lib/X11/Xintconn.h Fri Aug 17 22:41:28 2001 @@ -0,0 +1,27 @@ +/* $XFree86: xc/lib/X11/Xintconn.h,v 1.1 2001/08/18 02:41:28 dawes Exp $ */ + +#ifndef _XINTCONN_H_ +#define _XINTCONN_H_ 1 + +#include + +_XFUNCPROTOBEGIN + +/* ConnDis.c */ + +extern int _XDisconnectDisplay(XtransConnInfo trans_conn); +extern Bool _XSendClientPrefix(Display *dpy, xConnClientPrefix *client, + char *auth_proto, char *auth_string, + xConnSetupPrefix *prefix); +extern XtransConnInfo _X11TransConnectDisplay(char *display_name, + char **fullnamep, int *dpynump, + int *screenp, char **auth_namep, + int *auth_namelenp, char **auth_datap, + int *auth_datalenp); + +/* OpenDis.c */ +extern void _XFreeDisplayStructure(Display *dpy); + +_XFUNCPROTOEND + +#endif /* _XINTCONN_H_ */ Index: xc/lib/X11/XlcDL.c diff -u /dev/null xc/lib/X11/XlcDL.c:1.3 --- /dev/null Fri Jan 18 15:23:12 2002 +++ xc/lib/X11/XlcDL.c Mon Nov 19 10:33:38 2001 @@ -0,0 +1,687 @@ +/* +Copyright 1985, 1986, 1987, 1991, 1998 The Open Group + +Portions Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: The above copyright notice and this +permission notice shall be included in all copies or substantial +portions of the Software. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF +ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. + + +Except as contained in this notice, the names of The Open Group and/or +Sun Microsystems, Inc. shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without prior +written authorization from The Open Group and/or Sun Microsystems, +Inc., as applicable. + + +X Window System is a trademark of The Open Group + +OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF +logo, LBX, X Window System, and Xinerama are trademarks of the Open +Group. All other trademarks and registered trademarks mentioned herein +are the property of their respective owners. No right, title or +interest in or to any trademark, service mark, logo or trade name of +Sun Microsystems, Inc. or its licensors is granted. + +*/ +/* $XFree86: xc/lib/X11/XlcDL.c,v 1.3 2001/11/19 15:33:38 tsi Exp $ */ + +#include +#if defined(hpux) +#include +#else +#include +#endif +#include + +#include "Xlibint.h" +#include "XlcPublic.h" +#include "XlcPubI.h" + +#ifdef _LP64 +#if defined(__sparcv9) +#define _MACH64_NAME "sparcv9" +#define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1) +#else /* !defined(__sparcv9) */ +#error "Unknown architecture" +#endif /* defined(__sparcv9) */ +#endif /* _LP64 */ + +#define XI18N_DLREL 2 + +#define iscomment(ch) ((ch) == '\0' || (ch) == '#') + +typedef enum { + XLC_OBJECT, + XIM_OBJECT, + XOM_OBJECT +} XI18NDLType; + +typedef struct { + XI18NDLType type; + int locale_name_len; + char *locale_name; + char *dl_name; + char *open; + char *im_register; + char *im_unregister; + int dl_release; +#if defined(hpux) + shl_t dl_module; +#else + void *dl_module; +#endif +} XI18NObjectsListRec, *XI18NObjectsList; + +#define OBJECT_INIT_LEN 8 +#define OBJECT_INC_LEN 4 +static int lc_len = 0; +static XI18NObjectsListRec *xi18n_objects_list = NULL; +static int lc_count = 0; + +static int +parse_line(line, argv, argsize) +char *line; +char **argv; +int argsize; +{ + int argc = 0; + char *p = line; + + while (argc < argsize) { + while (isspace(*p)) { + ++p; + } + if (iscomment(*p)){ + break; + } + argv[argc++] = p; + while (!isspace(*p)) { + ++p; + } + if (iscomment(*p)) { + break; + } + *p++ = '\0'; + } + return argc; +} + +static char * +strdup_and_prefix(char *symbol) +{ + size_t n; + char *result; + + n = strlen(symbol) + 1; +#ifndef __ELF__ + n++; /* add space for _ */ +#endif + if ((result = malloc(n)) == NULL) + return NULL; +#ifndef __ELF__ + result[0] = '_'; +#endif + memcpy(result +#ifndef __ELF__ + +1 +#endif + , symbol, n); + return result; +} + +static void +resolve_object(path, lc_name) +char *path; +char *lc_name; +{ + char filename[BUFSIZ]; + FILE *fp; + char buf[BUFSIZ]; + + if (lc_len == 0) { /* True only for the 1st time */ + lc_len = OBJECT_INIT_LEN; + xi18n_objects_list = (XI18NObjectsList) + Xmalloc(sizeof(XI18NObjectsListRec) * lc_len); + if (!xi18n_objects_list) return; + } +/* +1266793 +Limit the length of path to prevent stack buffer corruption. + sprintf(filename, "%s/%s", path, "XI18N_OBJS"); +*/ + sprintf(filename, "%.*s/%s", BUFSIZ - 12, path, "XI18N_OBJS"); + fp = fopen(filename, "r"); + if (fp == (FILE *)NULL){ + return; + } + + while (fgets(buf, BUFSIZ, fp) != NULL){ + char *p = buf; + int n; + char *args[6]; + while (isspace(*p)){ + ++p; + } + if (iscomment(*p)){ + continue; + } + + if (lc_count == lc_len) { + lc_len += OBJECT_INC_LEN; + xi18n_objects_list = (XI18NObjectsList) + Xrealloc(xi18n_objects_list, + sizeof(XI18NObjectsListRec) * lc_len); + if (!xi18n_objects_list) return; + } + n = parse_line(p, args, 6); + + if (n == 3 || n == 5) { + if (!strcmp(args[0], "XLC")){ + xi18n_objects_list[lc_count].type = XLC_OBJECT; + } else if (!strcmp(args[0], "XOM")){ + xi18n_objects_list[lc_count].type = XOM_OBJECT; + } else if (!strcmp(args[0], "XIM")){ + xi18n_objects_list[lc_count].type = XIM_OBJECT; + } + xi18n_objects_list[lc_count].dl_name = strdup(args[1]); + xi18n_objects_list[lc_count].open = strdup_and_prefix(args[2]); + xi18n_objects_list[lc_count].dl_release = XI18N_DLREL; + xi18n_objects_list[lc_count].locale_name = strdup(lc_name); + xi18n_objects_list[lc_count].dl_module = (void*)NULL; + if (n == 5) { + xi18n_objects_list[lc_count].im_register = strdup_and_prefix(args[3]); + xi18n_objects_list[lc_count].im_unregister = strdup_and_prefix(args[4]); + } else { + xi18n_objects_list[lc_count].im_register = NULL; + xi18n_objects_list[lc_count].im_unregister = NULL; + } + lc_count++; + } + } + fclose(fp); +} + +static char* +__lc_path(dl_name, lc_dir) +const char *dl_name; +const char *lc_dir; +{ + char *path; + size_t len; + +#ifdef _LP64 + len = (lc_dir ? strlen(lc_dir) : 0 ) + + (dl_name ? strlen(dl_name) : 0) + _MACH64_NAME_LEN + 10; + path = Xmalloc(len + 1); + + if (strchr(dl_name, '/') != NULL) { + char *tmp = strdup(dl_name); + char *dl_dir, *dl_file; + char *slash_p; + slash_p = strchr(tmp, '/'); + *slash_p = '\0'; + dl_dir = tmp; + dl_file = ++slash_p; + + slash_p = strrchr(lc_dir, '/'); + *slash_p = '\0'; + strcpy(path, lc_dir); strcat(path, "/"); + strcat(path, dl_dir); strcat(path, "/"); + strcat(path, _MACH64_NAME); strcat(path, "/"); + strcat(path, dl_file); strcat(path, ".so.2"); + + *slash_p = '/'; + Xfree(tmp); + } else { + strcpy(path, lc_dir); strcat(path, "/"); + strcat(path, _MACH64_NAME); strcat(path, "/"); + strcat(path, dl_name); strcat(path, ".so.2"); + } +#else + len = (lc_dir ? strlen(lc_dir) : 0 ) + + (dl_name ? strlen(dl_name) : 0) + 10; + path = Xmalloc(len + 1); + + if (strchr(dl_name, '/') != NULL) { + char *slash_p; + slash_p = strrchr(lc_dir, '/'); + *slash_p = '\0'; + strcpy(path, lc_dir); strcat(path, "/"); + strcat(path, dl_name); strcat(path, ".so.2"); + *slash_p = '/'; + } else { + strcpy(path, lc_dir); strcat(path, "/"); + strcat(path, dl_name); strcat(path, ".so.2"); + } +#endif + return path; +} + +XLCd +#if NeedFunctionPrototypes +_XlcDynamicLoad(const char *lc_name) +#else +_XlcDynamicLoad(lc_name) + const char *lc_name; +#endif +{ + XLCd lcd = (XLCd)NULL; + XLCd (*lc_loader)() = (XLCd(*)())NULL; + char *path; + int count; + XI18NObjectsList objects_list; + char lc_dir[BUFSIZE]; +#if defined(hpux) + int getsyms_cnt, i; + struct shl_symbol *symbols; +#endif + + if (lc_name == NULL) return (XLCd)NULL; + + if (_XlcLocaleDirName(lc_dir, (char *)lc_name) == (char*)NULL) + return (XLCd)NULL; + + resolve_object(lc_dir, lc_name); + + objects_list = xi18n_objects_list; + count = lc_count; + for (; count-- > 0; objects_list++) { + if (objects_list->type != XLC_OBJECT || + strcmp(objects_list->locale_name, lc_name)) continue; + if (!objects_list->dl_module) { + path = __lc_path(objects_list->dl_name, lc_dir); +#if defined(hpux) + objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); +#else + objects_list->dl_module = dlopen(path, RTLD_LAZY); +#endif + Xfree(path); + if (!objects_list->dl_module) continue; + } +#if defined(hpux) + getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, + EXPORT_SYMBOLS, malloc, &symbols); + + for(i=0; iopen)) { + lc_loader = symbols[i].value; + break; + } + } + + if(getsyms_cnt > 0) { + free(symbols); + } +#else + lc_loader = (XLCd(*)())dlsym(objects_list->dl_module, + objects_list->open); +#endif + if (!lc_loader) continue; + lcd = (*lc_loader)(lc_name); + if (lcd != (XLCd)NULL) { + break; + } +#if defined(hpux) + shl_unload(objects_list->dl_module); +#else + dlclose(objects_list->dl_module); +#endif + objects_list->dl_module = NULL; + } + return (XLCd)lcd; +} + +static XIM +#if NeedFunctionPrototypes +_XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb, + char *res_name, char *res_class) +#else +_XDynamicOpenIM(lcd, display, rdb, res_name, res_class) +XLCd lcd; +Display *display; +XrmDatabase rdb; +char *res_name, *res_class; +#endif +{ + XIM im = (XIM)NULL; + char *path; + char lc_dir[BUFSIZE]; + char *lc_name; + XIM (*im_openIM)() = (XIM(*)())NULL; + int count; + XI18NObjectsList objects_list = xi18n_objects_list; +#if defined(hpux) + int getsyms_cnt, i; + struct shl_symbol *symbols; +#endif + + lc_name = lcd->core->name; + + if (_XlcLocaleDirName(lc_dir, lc_name) == NULL) return (XIM)0; + + count = lc_count; + for (; count-- > 0; objects_list++) { + if (objects_list->type != XIM_OBJECT || + strcmp(objects_list->locale_name, lc_name)) continue; + if (!objects_list->dl_module) { + path = __lc_path(objects_list->dl_name, lc_dir); +#if defined(hpux) + objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); +#else + objects_list->dl_module = dlopen(path, RTLD_LAZY); +#endif + Xfree(path); + if (!objects_list->dl_module) continue; + } +#if defined(hpux) + getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, + EXPORT_SYMBOLS, malloc, &symbols); + + for(i=0; iopen)) { + im_openIM = symbols[i].value; + break; + } + } + + if(getsyms_cnt > 0) { + free(symbols); + } +#else + im_openIM = (XIM(*)())dlsym(objects_list->dl_module, + objects_list->open); + if (!im_openIM) continue; +#endif + im = (*im_openIM)(lcd, display, rdb, res_name, res_class); + if (im != (XIM)NULL) { + break; + } + im_openIM = 0; +#if defined(hpux) + shl_unload(objects_list->dl_module); +#else + dlclose(objects_list->dl_module); +#endif + objects_list->dl_module = NULL; + } + return (XIM)im; +} + +static Bool +_XDynamicRegisterIMInstantiateCallback(lcd, display, rdb, + res_name, res_class, + callback, client_data) +XLCd lcd; +Display *display; +XrmDatabase rdb; +char *res_name, *res_class; +XIMProc callback; +XPointer *client_data; +{ + char *path; + char lc_dir[BUFSIZE]; + char *lc_name; + Bool (*im_registerIM)() = (Bool(*)())NULL; + Bool ret_flag = False; + int count; + XI18NObjectsList objects_list = xi18n_objects_list; +#if defined(hpux) + int getsyms_cnt, i; + struct shl_symbol *symbols; +#endif + + lc_name = lcd->core->name; + + if (_XlcLocaleDirName(lc_dir, lc_name) == NULL) return False; + + count = lc_count; + for (; count-- > 0; objects_list++) { + if (objects_list->type != XIM_OBJECT || + strcmp(objects_list->locale_name, lc_name)) continue; + if (!objects_list->dl_module) { + path = __lc_path(objects_list->dl_name, lc_dir); +#if defined(hpux) + objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); +#else + objects_list->dl_module = dlopen(path, RTLD_LAZY); +#endif + Xfree(path); + if (!objects_list->dl_module) continue; + } +#if defined(hpux) + getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, + EXPORT_SYMBOLS, malloc, &symbols); + + for(i=0; iopen)) { + im_registerIM = symbols[i].value; + break; + } + } + + if(getsyms_cnt > 0) { + free(symbols); + } +#else + im_registerIM = (Bool(*)())dlsym(objects_list->dl_module, + objects_list->im_register); + if (!im_registerIM) continue; +#endif + ret_flag = (*im_registerIM)(lcd, display, rdb, + res_name, res_class, + callback, client_data); + if (ret_flag) break; + + im_registerIM = 0; +#if defined(hpux) + shl_unload(objects_list->dl_module); +#else + dlclose(objects_list->dl_module); +#endif + objects_list->dl_module = NULL; + } + return (Bool)ret_flag; +} + +static Bool +_XDynamicUnRegisterIMInstantiateCallback(lcd, display, rdb, + res_name, res_class, + callback, client_data) +XLCd lcd; +Display *display; +XrmDatabase rdb; +char *res_name, *res_class; +XIMProc callback; +XPointer *client_data; +{ + char *path; + char lc_dir[BUFSIZE]; + char *lc_name; + Bool (*im_unregisterIM)() = (Bool(*)())NULL; + Bool ret_flag = False; + int count; + XI18NObjectsList objects_list = xi18n_objects_list; +#if defined(hpux) + int getsyms_cnt, i; + struct shl_symbol *symbols; +#endif + + lc_name = lcd->core->name; + if (_XlcLocaleDirName(lc_dir, lc_name) == NULL) return False; + + count = lc_count; + for (; count-- > 0; objects_list++) { + if (objects_list->type != XIM_OBJECT || + strcmp(objects_list->locale_name, lc_name)) continue; + if (!objects_list->dl_module) { + path = __lc_path(objects_list->dl_name, lc_dir); +#if defined(hpux) + objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); +#else + objects_list->dl_module = dlopen(path, RTLD_LAZY); +#endif + Xfree(path); + if (!objects_list->dl_module) continue; + } +#if defined(hpux) + getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, + EXPORT_SYMBOLS, malloc, &symbols); + + for(i=0; iopen)) { + im_unregisterIM = symbols[i].value; + break; + } + } + + if(getsyms_cnt > 0) { + free(symbols); + } +#else + im_unregisterIM = (Bool(*)())dlsym(objects_list->dl_module, + objects_list->im_unregister); + + if (!im_unregisterIM) continue; +#endif + ret_flag = (*im_unregisterIM)(lcd, display, rdb, + res_name, res_class, + callback, client_data); + if (ret_flag) break; + + im_unregisterIM = 0; +#if defined(hpux) + shl_unload(objects_list->dl_module); +#else + dlclose(objects_list->dl_module); +#endif + objects_list->dl_module = NULL; + } + return (Bool)ret_flag; +} + +Bool +#if NeedFunctionPrototypes +_XInitDynamicIM(XLCd lcd) +#else +_XInitDynamicIM(lcd) +XLCd lcd; +#endif +{ + if(lcd == (XLCd)NULL) + return False; + lcd->methods->open_im = _XDynamicOpenIM; + lcd->methods->register_callback = _XDynamicRegisterIMInstantiateCallback; + lcd->methods->unregister_callback = _XDynamicUnRegisterIMInstantiateCallback; + return True; +} + +static XOM +#if NeedFunctionPrototypes +_XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb, + _Xconst char *res_name, _Xconst char *res_class) +#else +_XDynamicOpenOM(lcd, display, rdb, res_name, res_class) +XLCd lcd; +Display *display; +XrmDatabase rdb; +char *res_name; +char *res_class; +#endif +{ + XOM om = (XOM)NULL; + int count; + char *path; + char lc_dir[BUFSIZE]; + char *lc_name; + XOM (*om_openOM)() = (XOM(*)())NULL; + XI18NObjectsList objects_list = xi18n_objects_list; +#if defined(hpux) + int getsyms_cnt, i; + struct shl_symbol *symbols; +#endif + + lc_name = lcd->core->name; + + if (_XlcLocaleDirName(lc_dir, lc_name) == NULL) return (XOM)0; + + count = lc_count; + for (; count-- > 0; objects_list++) { + if (objects_list->type != XOM_OBJECT || + strcmp(objects_list->locale_name, lc_name)) continue; + if (!objects_list->dl_module) { + path = __lc_path(objects_list->dl_name, lc_dir); +#if defined(hpux) + objects_list->dl_module = shl_load(path, BIND_DEFERRED, 0L); +#else + objects_list->dl_module = dlopen(path, RTLD_LAZY); +#endif + Xfree(path); + if (!objects_list->dl_module) continue; + } +#if defined(hpux) + getsyms_cnt = shl_getsymbols(objects_list->dl_module, TYPE_PROCEDURE, + EXPORT_SYMBOLS, malloc, &symbols); + + for(i=0; iopen)) { + om_openOM = symbols[i].value; + break; + } + } + + if(getsyms_cnt > 0) { + free(symbols); + } +#else + om_openOM = (XOM(*)())dlsym(objects_list->dl_module, + objects_list->open); + if (!om_openOM) continue; +#endif + om = (*om_openOM)(lcd, display, rdb, res_name, res_class); + if (om != (XOM)NULL) { + break; + } + om_openOM = 0; +#if defined(hpux) + shl_unload(objects_list->dl_module); +#else + dlclose(objects_list->dl_module); +#endif + objects_list->dl_module = NULL; + } + return (XOM)om; +} + +Bool +#if NeedFunctionPrototypes +_XInitDynamicOM(XLCd lcd) +#else +_XInitDynamicOM(lcd) + XLCd lcd; +#endif +{ + if(lcd == (XLCd)NULL) + return False; + + lcd->methods->open_om = _XDynamicOpenOM; + + return True; +} Index: xc/lib/X11/XlcGeneric.h diff -u xc/lib/X11/XlcGeneric.h:1.3 xc/lib/X11/XlcGeneric.h:1.4 --- xc/lib/X11/XlcGeneric.h:1.3 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/XlcGeneric.h Wed Jul 25 11:04:44 2001 @@ -31,7 +31,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/XlcGeneric.h,v 1.3 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcGeneric.h,v 1.4 2001/07/25 15:04:44 dawes Exp $ */ #ifndef _XLCGENERIC_H_ #define _XLCGENERIC_H_ @@ -131,10 +131,8 @@ CodeSet initial_state_GR; int segment_conv_num; /* UDC */ SegConv segment_conv; /* UDC */ -#ifndef X_NOT_STDC_ENV Bool use_stdc_env; Bool force_convert_to_mb; -#endif } XLCdGenericPart; typedef struct _XLCdGenericRec { Index: xc/lib/X11/XlcPubI.h diff -u xc/lib/X11/XlcPubI.h:3.8 xc/lib/X11/XlcPubI.h:3.9 --- xc/lib/X11/XlcPubI.h:3.8 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/XlcPubI.h Thu Nov 15 19:52:27 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XlcPubI.h,v 1.3 2000/08/17 19:45:06 cpqbld Exp $ */ +/* $Xorg: XlcPubI.h,v 1.4 2000/12/12 12:44:05 coskrey Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/XlcPubI.h,v 3.8 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlcPubI.h,v 3.9 2001/11/16 00:52:27 dawes Exp $ */ #ifndef _XLCPUBLICI_H_ #define _XLCPUBLICI_H_ @@ -212,6 +212,13 @@ extern int _XlcResolveI18NPath( char* buf, int buf_len +); + +extern char *_XlcLocaleDirName( +#if NeedFunctionPrototypes + char* /* dir_name */, + char* /* lc_name */ +#endif ); extern XPointer _XlcCreateLocaleDataBase( Index: xc/lib/X11/XlcSL.c diff -u /dev/null xc/lib/X11/XlcSL.c:1.1 --- /dev/null Fri Jan 18 15:23:12 2002 +++ xc/lib/X11/XlcSL.c Fri Nov 16 09:40:46 2001 @@ -0,0 +1,79 @@ +/* +Copyright 1985, 1986, 1987, 1991, 1998 The Open Group + +Portions Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: The above copyright notice and this +permission notice shall be included in all copies or substantial +portions of the Software. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF +ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. + + +Except as contained in this notice, the names of The Open Group and/or +Sun Microsystems, Inc. shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without prior +written authorization from The Open Group and/or Sun Microsystems, +Inc., as applicable. + + +X Window System is a trademark of The Open Group + +OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF +logo, LBX, X Window System, and Xinerama are trademarks of the Open +Group. All other trademarks and registered trademarks mentioned herein +are the property of their respective owners. No right, title or +interest in or to any trademark, service mark, logo or trade name of +Sun Microsystems, Inc. or its licensors is granted. + +*/ + +#include "Xlibint.h" +#include "Xlcint.h" + +extern XIM _XDefaultOpenIM( +#if NeedNestedPrototypes + XLCd, Display *, XrmDatabase, char *, char * +#endif + ); + +Bool +_XInitDefaultIM(lcd) +XLCd lcd; +{ + if(lcd == (XLCd)NULL) + return False; + + lcd->methods->open_im = _XDefaultOpenIM; + lcd->methods->register_callback = NULL; + lcd->methods->unregister_callback = NULL; + return True; +} + +extern XOM _XDefaultOpenOM( +#if NeedFunctionPrototypes + XLCd, Display*, XrmDatabase, _Xconst char*, _Xconst char* +#endif + ); + +Bool +_XInitDefaultOM(lcd) + XLCd lcd; +{ + lcd->methods->open_om = _XDefaultOpenOM; + return True; +} Index: xc/lib/X11/Xlcint.h diff -u xc/lib/X11/Xlcint.h:3.8 xc/lib/X11/Xlcint.h:3.13 --- xc/lib/X11/Xlcint.h:3.8 Wed Jan 17 14:41:49 2001 +++ xc/lib/X11/Xlcint.h Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xlcint.h,v 1.3 2000/08/17 19:45:06 cpqbld Exp $ */ +/* $Xorg: Xlcint.h,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlcint.h,v 3.8 2001/01/17 19:41:49 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlcint.h,v 3.13 2001/12/14 19:54:08 dawes Exp $ */ /* * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, @@ -68,9 +72,11 @@ #ifndef _XLCINT_H_ #define _XLCINT_H_ +#ifndef _XP_PRINT_SERVER_ + #include #include -#include "Xvarargs.h" +#include typedef Bool (*XFilterEventProc)( #if NeedFunctionPrototypes @@ -156,6 +162,7 @@ XICCallback draw_callback; } ICStatusAttributes, *ICStatusAttributesPtr; +#endif /* !_XP_PRINT_SERVER_ */ /* * Methods for Xrm parsing @@ -205,6 +212,7 @@ } XrmMethodsRec; typedef const XrmMethodsRec *XrmMethods; +#ifndef _XP_PRINT_SERVER_ typedef struct _XLCd *XLCd; /* need forward reference */ @@ -998,6 +1006,11 @@ XLCd lcd ); +/* Registers UTF-8 converters for a UTF-8 locale. */ +extern void _XlcAddUtf8LocaleConverters( + XLCd lcd +); + /* The default locale loader. Assumes an ASCII encoding. */ extern XLCd _XlcDefaultLoader( const char* name @@ -1030,11 +1043,33 @@ const char* name ); +extern XLCd _XlcDynamicLoad( + const char* name +); + /* The old dynamic loader. */ extern XLCd _XlcDynamicLoader( const char* name ); +extern Bool _XInitDefaultIM( + XLCd lcd +); + +extern Bool _XInitDefaultOM( + XLCd lcd +); + +extern Bool _XInitDynamicIM( + XLCd lcd +); + +extern Bool _XInitDynamicOM( + XLCd lcd +); + _XFUNCPROTOEND + +#endif /* !_XP_PRINT_SERVER_ */ #endif /* _XLCINT_H_ */ Index: xc/lib/X11/Xlib.h diff -u xc/lib/X11/Xlib.h:3.19 xc/lib/X11/Xlib.h:3.22 --- xc/lib/X11/Xlib.h:3.19 Wed Jan 17 14:41:50 2001 +++ xc/lib/X11/Xlib.h Fri Dec 14 14:54:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xlib.h,v 1.5 2000/08/17 19:45:06 cpqbld Exp $ */ +/* $Xorg: Xlib.h,v 1.6 2001/02/09 02:03:38 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1987, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlib.h,v 3.19 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlib.h,v 3.22 2001/12/14 19:54:08 dawes Exp $ */ /* @@ -4615,6 +4619,12 @@ #endif ); +extern char *XSetIMValues( +#if NeedVarargsPrototypes + XIM /* im */, ... +#endif +); + extern Display *XDisplayOfIM( #if NeedFunctionPrototypes XIM /* im */ @@ -4805,6 +4815,26 @@ int /* namelen */, char * /* data */, int /* datalen */ +#endif +); + +extern int _Xmbtowc( +#if NeedFunctionPrototypes + wchar_t * /* wstr */, +#ifdef ISC + char const * /* str */, + size_t /* len */ +#else + char * /* str */, + int /* len */ +#endif +#endif +); + +extern int _Xwctomb( +#if NeedFunctionPrototypes + char * /* str */, + wchar_t /* wc */ #endif ); Index: xc/lib/X11/XlibAsync.c diff -u xc/lib/X11/XlibAsync.c:1.1.1.5 xc/lib/X11/XlibAsync.c:1.2 --- xc/lib/X11/XlibAsync.c:1.1.1.5 Tue Jan 16 17:10:12 2001 +++ xc/lib/X11/XlibAsync.c Fri Dec 14 14:54:09 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XlibAsync.c,v 1.3 2000/08/17 19:45:07 cpqbld Exp $ */ +/* $Xorg: XlibAsync.c,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/XlibInt.c diff -u xc/lib/X11/XlibInt.c:3.26 xc/lib/X11/XlibInt.c:3.30 --- xc/lib/X11/XlibInt.c:3.26 Thu Apr 26 12:23:09 2001 +++ xc/lib/X11/XlibInt.c Fri Dec 14 14:54:09 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XlibInt.c,v 1.7 2000/08/17 19:45:07 cpqbld Exp $ */ +/* $Xorg: XlibInt.c,v 1.8 2001/02/09 02:03:38 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/XlibInt.c,v 3.26 2001/04/26 16:23:09 dawes Exp $ */ +/* $XFree86: xc/lib/X11/XlibInt.c,v 3.30 2001/12/14 19:54:09 dawes Exp $ */ /* * XlibInt.c - Internal support routines for the C subroutine @@ -81,6 +85,9 @@ #ifdef WIN32 #define ETEST() (WSAGetLastError() == WSAEWOULDBLOCK) #else +#ifdef __CYGWIN__ /* Cygwin uses ENOBUFS to signal socket is full */ +#define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS) +#else #if defined(EAGAIN) && defined(EWOULDBLOCK) #define ETEST() (errno == EAGAIN || errno == EWOULDBLOCK) #else @@ -88,9 +95,11 @@ #define ETEST() (errno == EAGAIN) #else #define ETEST() (errno == EWOULDBLOCK) -#endif -#endif -#endif +#endif /* EAGAIN */ +#endif /* EAGAIN && EWOULDBLOCK */ +#endif /* __CYGWIN__ */ +#endif /* WIN32 */ + #ifdef WIN32 #define ECHECK(err) (WSAGetLastError() == err) #define ESET(val) WSASetLastError(val) @@ -197,8 +206,6 @@ xcondition_t cv; /* our reading condition variable */ #endif { -#if !defined(AMOEBA) - #ifdef USE_POLL struct pollfd filedes; #else @@ -331,11 +338,6 @@ return; } } -#else /* AMOEBA */ - /* Should not happen under Amoeba */ - printf("_XWaitForWritable called unexpectedly\n"); - _XIOError(dpy); -#endif /* AMOEBA */ } @@ -420,12 +422,11 @@ _XWaitForReadable(dpy) Display *dpy; { -#if !defined(AMOEBA) int result; int fd = dpy->fd; struct _XConnectionInfo *ilist; - register int saved_event_serial; - int in_read_events; + register int saved_event_serial = 0; + int in_read_events = 0; register Bool did_proc_conni = False; #ifdef USE_POLL struct pollfd *filedes; @@ -523,13 +524,6 @@ #endif #endif return 0; -#else /* AMOEBA */ - int nbytes; - - /* wait max 100 msec (why?) for data to become available */ - nbytes = _X11TransAmSelect(ConnectionNumber(dpy), 100); - return (nbytes > 0) ? 0 : -1; -#endif /* AMOEBA */ } static @@ -581,7 +575,6 @@ register Display *dpy; register xcondition_t cv; { - char *nextindex; #endif /* XTHREADS*/ register long size, todo; register int write_stat; Index: xc/lib/X11/Xlibint.h diff -u xc/lib/X11/Xlibint.h:3.16 xc/lib/X11/Xlibint.h:3.23 --- xc/lib/X11/Xlibint.h:3.16 Wed Jan 17 14:41:50 2001 +++ xc/lib/X11/Xlibint.h Wed Dec 19 16:37:30 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xlibint.h,v 1.4 2000/08/17 19:45:07 cpqbld Exp $ */ +/* $Xorg: Xlibint.h,v 1.5 2001/02/09 02:03:38 xorgcvs Exp $ */ /* Copyright 1984, 1985, 1987, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xlibint.h,v 3.16 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xlibint.h,v 3.23 2001/12/19 21:37:30 dawes Exp $ */ #ifndef _XLIBINT_H_ #define _XLIBINT_H_ 1 @@ -228,19 +232,13 @@ #undef dirty #endif -#ifndef X_NOT_STDC_ENV #include #include -#else -char *malloc(size_t), *realloc(char *, size_t), *calloc(size_t, size_t); -void exit(int); -#ifdef SYSV -#include -#else -#include -#endif -#endif +#include + +_XFUNCPROTOBEGIN + /* * The following definitions can be used for locking requests in multi-threaded * address spaces. @@ -251,8 +249,6 @@ * declarations for C Threads locking */ -#include - typedef struct _LockInfoRec *LockInfoPtr; /* interfaces for locking.c */ @@ -360,16 +356,11 @@ #endif -#ifndef NULL -#define NULL 0 -#endif +#include + #define LOCKED 1 #define UNLOCKED 0 -#ifdef X_NOT_STDC_ENV -extern int errno; /* Internal system error number. */ -#endif - #ifndef BUFSIZE #define BUFSIZE 2048 /* X output buffer size. */ #endif @@ -444,7 +435,7 @@ * */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetReq(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ @@ -470,7 +461,7 @@ /* GetReqExtra is the same as GetReq, but allocates "n" additional bytes after the request. "n" must be a multiple of 4! */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetReqExtra(name, n, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\ @@ -499,7 +490,7 @@ * "rid" is the name of the resource. */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetResReq(name, rid, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\ @@ -527,7 +518,7 @@ * GetEmptyReq is for those requests that have no arguments * at all. */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetEmptyReq(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\ @@ -612,12 +603,13 @@ * "len" is the length of the data buffer. */ #ifndef DataRoutineIsProcedure -#define Data(dpy, data, len) \ +#define Data(dpy, data, len) {\ if (dpy->bufptr + (len) <= dpy->bufmax) {\ memcpy(dpy->bufptr, data, (int)len);\ dpy->bufptr += ((len) + 3) & ~3;\ } else\ - _XSend(dpy, data, len) + _XSend(dpy, data, len);\ + } #endif /* DataRoutineIsProcedure */ @@ -934,8 +926,6 @@ /* extension hooks */ -_XFUNCPROTOBEGIN - #ifdef DataRoutineIsProcedure extern void Data(Display *dpy, char *data, long len); #endif @@ -1030,6 +1020,17 @@ Bool /* discard */ #endif ); +extern void _XGetAsyncData( +#if NeedFunctionPrototypes + Display* /* dpy */, + char * /* data */, + char * /* buf */, + int /* len */, + int /* skip */, + int /* datalen */, + int /* discardtotal */ +#endif +); extern void _XFlush( #if NeedFunctionPrototypes Display* /* dpy */ @@ -1089,6 +1090,27 @@ #endif ); +extern Bool _XUnknownWireEvent( +#if NeedFunctionPrototypes + Display* /* dpy */, + XEvent* /* re */, + xEvent* /* event */ +#endif +); +extern Status _XUnknownNativeEvent( +#if NeedFunctionPrototypes + Display* /* dpy */, + XEvent* /* re */, + xEvent* /* event */ +#endif +); + +extern Bool _XWireToEvent(Display *dpy, XEvent *re, xEvent *event); +extern Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we); +extern Bool _XPollfdCacheInit(Display *dpy); +extern XID _XAllocID(Display *dpy); +extern void _XAllocIDs(Display *dpy, XID *ids, int count); + extern int _XFreeExtData( #if NeedFunctionPrototypes XExtData* /* extension */ @@ -1442,6 +1464,18 @@ #define _XOpenFile(path,flags) open(path,flags) #define _XFopenFile(path,mode) fopen(path,mode) #endif + +/* EvToWire.c */ +extern Status _XEventToWire(Display *dpy, XEvent *re, xEvent *event); + +extern int _XF86LoadQueryLocaleFont( +#if NeedFunctionPrototypes + Display* /* dpy */, + _Xconst char* /* name*/, + XFontStruct** /* xfp*/, + Font* /* fidp */ +#endif +); _XFUNCPROTOEND Index: xc/lib/X11/Xlocale.h diff -u xc/lib/X11/Xlocale.h:1.1.1.3 xc/lib/X11/Xlocale.h:1.4 --- xc/lib/X11/Xlocale.h:1.1.1.3 Tue Jan 16 17:10:20 2001 +++ xc/lib/X11/Xlocale.h Fri Dec 14 14:54:09 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xlocale.h,v 1.3 2000/08/17 19:45:07 cpqbld Exp $ */ +/* $Xorg: Xlocale.h,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,6 +26,7 @@ from The Open Group. */ +/* $XFree86: xc/lib/X11/Xlocale.h,v 1.4 2001/12/14 19:54:09 dawes Exp $ */ #ifndef _XLOCALE_H_ #define _XLOCALE_H_ @@ -30,12 +35,6 @@ #include #ifndef X_LOCALE -#ifdef X_NOT_STDC_ENV -#define X_LOCALE -#endif -#endif - -#ifndef X_LOCALE #include #else @@ -57,9 +56,7 @@ #define setlocale _Xsetlocale -#ifndef NULL -#define NULL 0 -#endif +#include #endif /* X_LOCALE */ Index: xc/lib/X11/Xresource.h diff -u xc/lib/X11/Xresource.h:3.6 xc/lib/X11/Xresource.h:3.8 --- xc/lib/X11/Xresource.h:3.6 Wed Jan 17 14:41:50 2001 +++ xc/lib/X11/Xresource.h Fri Dec 14 14:54:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xresource.h,v 1.6 2000/08/17 19:45:08 cpqbld Exp $ */ +/* $Xorg: Xresource.h,v 1.7 2001/02/09 02:03:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,14 +46,14 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/Xresource.h,v 3.6 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xresource.h,v 3.8 2001/12/14 19:54:10 dawes Exp $ */ #ifndef _XRESOURCE_H_ #define _XRESOURCE_H_ -/* You must include before including this file */ - +#ifndef _XP_PRINT_SERVER_ #include +#endif /**************************************************************** **************************************************************** @@ -282,6 +286,8 @@ * ****************************************************************/ +#ifndef _XP_PRINT_SERVER_ + extern void XrmSetDatabase( #if NeedFunctionPrototypes Display* /* display */, @@ -294,6 +300,8 @@ Display* /* display */ #endif ); + +#endif /* !_XP_PRINT_SERVER_ */ extern XrmDatabase XrmGetFileDatabase( #if NeedFunctionPrototypes Index: xc/lib/X11/Xrm.c diff -u xc/lib/X11/Xrm.c:3.15 xc/lib/X11/Xrm.c:3.19 --- xc/lib/X11/Xrm.c:3.15 Wed Jan 17 14:41:50 2001 +++ xc/lib/X11/Xrm.c Fri Dec 14 14:54:10 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Xrm.c,v 1.6 2000/08/17 19:45:08 cpqbld Exp $ */ +/* $Xorg: Xrm.c,v 1.7 2001/02/09 02:03:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard @@ -26,7 +26,11 @@ Copyright 1987, 1988, 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/Xrm.c,v 3.15 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xrm.c,v 3.19 2001/12/14 19:54:10 dawes Exp $ */ #include #include @@ -58,17 +62,6 @@ #include "XrmI.h" #include -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif -#if defined(__STDC__) && !defined(NORCONST) -#define RConst const -#else -#define RConst /**/ -#endif - extern XrmQuark _XrmInternalStringToQuark(); /* @@ -293,7 +286,7 @@ #define is_special(bits) ((bits) & (ENDOF|BSLASH)) /* parsing types */ -static XrmBits Const xrmtypes[256] = { +static XrmBits const xrmtypes[256] = { EOS,0,0,0,0,0,0,0, 0,SPACE,EOL,0,0, #if defined(WIN32) || defined(__EMX__) /* || defined(OS2) */ @@ -497,7 +490,11 @@ _XCreateMutex(&db->linfo); db->table = (NTable)NULL; db->mbstate = (XPointer)NULL; +#ifdef _XP_PRINT_SERVER_ + db->methods = NULL; +#else db->methods = _XrmInitParseInfo(&db->mbstate); +#endif if (!db->methods) db->methods = &mb_methods; } @@ -2322,7 +2319,7 @@ { register LTable *list; register LTable table; - register VEntry entry; + register VEntry entry = NULL; int flags; /* find tight or loose entry */ Index: xc/lib/X11/XrmI.h diff -u xc/lib/X11/XrmI.h:1.4 xc/lib/X11/XrmI.h:1.5 --- xc/lib/X11/XrmI.h:1.4 Wed Jan 17 14:41:50 2001 +++ xc/lib/X11/XrmI.h Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XrmI.h,v 1.3 2000/08/17 19:45:08 cpqbld Exp $ */ +/* $Xorg: XrmI.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/Xutil.h diff -u xc/lib/X11/Xutil.h:3.3 xc/lib/X11/Xutil.h:3.4 --- xc/lib/X11/Xutil.h:3.3 Wed Jan 17 14:41:50 2001 +++ xc/lib/X11/Xutil.h Fri Dec 14 14:54:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xutil.h,v 1.7 2000/08/17 19:45:08 cpqbld Exp $ */ +/* $Xorg: Xutil.h,v 1.8 2001/02/09 02:03:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/Xutil.h,v 3.3 2001/01/17 19:41:50 dawes Exp $ */ +/* $XFree86: xc/lib/X11/Xutil.h,v 3.4 2001/12/14 19:54:10 dawes Exp $ */ #ifndef _XUTIL_H_ #define _XUTIL_H_ Index: xc/lib/X11/Xvarargs.h diff -u xc/lib/X11/Xvarargs.h:1.3 xc/lib/X11/Xvarargs.h:removed --- xc/lib/X11/Xvarargs.h:1.3 Wed Jan 17 14:41:50 2001 +++ xc/lib/X11/Xvarargs.h Fri Jan 18 15:23:13 2002 @@ -1,38 +0,0 @@ -/* $Xorg: Xvarargs.h,v 1.3 2000/08/17 19:45:08 cpqbld Exp $ */ -/* - -Copyright 1985, 1986, 1987, 1988, 1989, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/X11/Xvarargs.h,v 1.3 2001/01/17 19:41:50 dawes Exp $ */ - -#ifndef _XVARARGS_H_ -#define _XVARARGS_H_ - -#if NeedVarargsPrototypes -# include -# define Va_start(a,b) va_start(a,b) -#else -# include -# define Va_start(a,b) va_start(a) -#endif - -#endif /* _XVARARGS_H_ */ Index: xc/lib/X11/cmsColNm.c diff -u xc/lib/X11/cmsColNm.c:3.7 xc/lib/X11/cmsColNm.c:3.9 --- xc/lib/X11/cmsColNm.c:3.7 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/cmsColNm.c Sat Oct 27 23:32:34 2001 @@ -31,7 +31,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.7 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsColNm.c,v 3.9 2001/10/28 03:32:34 tsi Exp $ */ #include "Xlibint.h" #include "Xcmsint.h" @@ -49,11 +49,6 @@ * that are not already declared in any of the included header * files (external includes or internal includes). */ -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -extern void qsort(); -extern char *bsearch(); -#endif extern XcmsColorSpace **_XcmsDIColorSpaces; /* CvCols.c */ @@ -260,11 +255,7 @@ */ static int FirstCmp(p1, p2) -#ifdef __STDC__ const void *p1, *p2; -#else - XcmsPair *p1, *p2; -#endif /* * DESCRIPTION * Compares the color names of XcmsColorTuples. @@ -413,7 +404,7 @@ register int i, j, left, right; int len; const char *tmpName; - XcmsPair *pair; + XcmsPair *pair = NULL; /* * Check state of Database: Index: xc/lib/X11/cmsLkCol.c diff -u xc/lib/X11/cmsLkCol.c:1.3 xc/lib/X11/cmsLkCol.c:1.4 --- xc/lib/X11/cmsLkCol.c:1.3 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/cmsLkCol.c Wed Jul 25 11:04:44 2001 @@ -32,7 +32,7 @@ * * */ -/* $XFree86: xc/lib/X11/cmsLkCol.c,v 1.3 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsLkCol.c,v 1.4 2001/07/25 15:04:44 dawes Exp $ */ #define NEED_REPLIES #include @@ -50,9 +50,6 @@ /* cmsColNm.c */ extern Status _XcmsResolveColorString(); -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif /* * NAME Index: xc/lib/X11/cmsMath.c diff -u xc/lib/X11/cmsMath.c:3.2 xc/lib/X11/cmsMath.c:3.5 --- xc/lib/X11/cmsMath.c:3.2 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/cmsMath.c Fri Dec 14 14:54:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: cmsMath.c,v 1.3 2000/08/17 19:45:09 cpqbld Exp $ */ +/* $Xorg: cmsMath.c,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,6 +25,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/cmsMath.c,v 3.5 2001/12/14 19:54:10 dawes Exp $ */ /* * Stephen Gildea, MIT X Consortium, January 1991 @@ -29,9 +34,7 @@ #include "Xlibint.h" #include "Xcmsint.h" -#if !defined(X_NOT_STDC_ENV) && (defined(__STDC__) || !(defined(sun) || (defined(sony) && !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV)))) #include -#endif #ifndef DBL_EPSILON #define DBL_EPSILON 1e-6 #endif Index: xc/lib/X11/cmsTrig.c diff -u xc/lib/X11/cmsTrig.c:3.6 xc/lib/X11/cmsTrig.c:3.8 --- xc/lib/X11/cmsTrig.c:3.6 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/cmsTrig.c Sat Oct 27 23:32:34 2001 @@ -24,7 +24,7 @@ * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/X11/cmsTrig.c,v 3.6 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/cmsTrig.c,v 3.8 2001/10/28 03:32:34 tsi Exp $ */ /* * It should be pointed out that for simplicity's sake, the * environment parameters are defined as floating point constants, @@ -64,11 +64,6 @@ * DEFINES */ -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif #define XCMS_MAXERROR 0.000001 #define XCMS_MAXITER 10000 #define XCMS_PI 3.14159265358979323846264338327950 @@ -98,28 +93,28 @@ * LOCAL VARIABLES */ -static double Const cos_pcoeffs[] = { +static double const cos_pcoeffs[] = { 0.12905394659037374438e7, -0.37456703915723204710e6, 0.13432300986539084285e5, -0.11231450823340933092e3 }; -static double Const cos_qcoeffs[] = { +static double const cos_qcoeffs[] = { 0.12905394659037373590e7, 0.23467773107245835052e5, 0.20969518196726306286e3, 1.0 }; -static double Const sin_pcoeffs[] = { +static double const sin_pcoeffs[] = { 0.20664343336995858240e7, -0.18160398797407332550e6, 0.35999306949636188317e4, -0.20107483294588615719e2 }; -static double Const sin_qcoeffs[] = { +static double const sin_qcoeffs[] = { 0.26310659102647698963e7, 0.39270242774649000308e5, 0.27811919481083844087e3, @@ -384,7 +379,7 @@ static double _XcmsPolynomial (order, coeffs, x) register int order; -double Const *coeffs; +double const *coeffs; double x; { auto double rtn_value; @@ -572,7 +567,7 @@ * Returns the arctangent */ { - double ai, a1, bi, b1, l, d; + double ai, a1 = 0.0, bi, b1 = 0.0, l, d; double maxerror; int i; Index: xc/lib/X11/cursorfont.h diff -u xc/lib/X11/cursorfont.h:1.1.1.3 xc/lib/X11/cursorfont.h:1.2 --- xc/lib/X11/cursorfont.h:1.1.1.3 Tue Jan 16 17:11:01 2001 +++ xc/lib/X11/cursorfont.h Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cursorfont.h,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ +/* $Xorg: cursorfont.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/evtomask.c diff -u xc/lib/X11/evtomask.c:3.2 xc/lib/X11/evtomask.c:3.5 --- xc/lib/X11/evtomask.c:3.2 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/evtomask.c Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: evtomask.c,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ +/* $Xorg: evtomask.c,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,20 +24,15 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/evtomask.c,v 3.5 2001/12/14 19:54:10 dawes Exp $ */ #include -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - /* * This array can be used given an event type to determine the mask bits * that could have generated it. */ -long Const _Xevent_to_mask [LASTEvent] = { +long const _Xevent_to_mask [LASTEvent] = { 0, /* no event 0 */ 0, /* no event 1 */ KeyPressMask, /* KeyPress */ Index: xc/lib/X11/globals.c diff -u xc/lib/X11/globals.c:3.2 xc/lib/X11/globals.c:3.5 --- xc/lib/X11/globals.c:3.2 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/globals.c Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: globals.c,v 1.3 2000/08/17 19:45:10 cpqbld Exp $ */ +/* $Xorg: globals.c,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,8 +26,8 @@ from The Open Group. */ +/* $XFree86: xc/lib/X11/globals.c,v 3.5 2001/12/14 19:54:10 dawes Exp $ */ - /* * * Global data @@ -49,7 +53,7 @@ /* * If we need to define extra variables for each global */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define ZEROINIT(t,var,val) SetZero(t,var,val); \ SetZero (long, _libX_##var##Flag, 0); \ SetZero (void *, _libX_##var##Ptr, NULL) Index: xc/lib/X11/imCallbk.c diff -u xc/lib/X11/imCallbk.c:3.5 xc/lib/X11/imCallbk.c:3.7 --- xc/lib/X11/imCallbk.c:3.5 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/imCallbk.c Fri Aug 17 22:41:28 2001 @@ -32,7 +32,7 @@ makoto@sm.sony.co.jp ***********************************************************************/ -/* $XFree86: xc/lib/X11/imCallbk.c,v 3.5 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imCallbk.c,v 3.7 2001/08/18 02:41:28 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -90,7 +90,6 @@ #define _XimFlushData(im) im->private.proto.flush((im)) #if NeedFunctionPrototypes -Public Bool _XimCbDispatch(Xim xim, INT16 len, XPointer data, XPointer call_data); Private XimCbStatus _XimGeometryCallback(Xim, Xic, char*, int); Private XimCbStatus _XimStrConversionCallback(Xim, Xic, char*, int); Private XimCbStatus _XimPreeditStartCallback(Xim, Xic, char*, int); @@ -117,15 +116,10 @@ Private XimCbStatus _XimPreeditStateNotifyCallback(); #endif /* NeedFunctionPrototypes */ -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif #if defined(__STDC__) && ((defined(sun) && defined(SVR4)) || defined(WIN32)) #define RConst /**/ #else -#define RConst Const +#define RConst const #endif /* NOTE: Index: xc/lib/X11/imDefIm.c diff -u xc/lib/X11/imDefIm.c:1.8 xc/lib/X11/imDefIm.c:1.9 --- xc/lib/X11/imDefIm.c:1.8 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/imDefIm.c Sat Oct 27 23:32:34 2001 @@ -31,7 +31,7 @@ makoto@sm.sony.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefIm.c,v 1.8 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefIm.c,v 1.9 2001/10/28 03:32:34 tsi Exp $ */ #include #define NEED_EVENTS @@ -391,7 +391,7 @@ unsigned long bytes_after; unsigned char *prop_return; Atom *atoms; - Window im_window; + Window im_window = 0; register int i; if((imserver = XInternAtom(display, XIM_SERVERS, True)) == (Atom)None) @@ -1460,7 +1460,7 @@ INT16 len; CARD32 reply32[BUFSIZE/4]; char *reply = (char *)reply32; - XPointer preply; + XPointer preply = NULL; int buf_size; int ret_code; char *makeid_name; @@ -1626,9 +1626,9 @@ CARD16 category = buf[0]; CARD16 idx = buf[1]; int len; - XlcConv ctom_conv; - XlcConv ctow_conv; - XlcConv ctoutf8_conv; + XlcConv ctom_conv = NULL; + XlcConv ctow_conv = NULL; + XlcConv ctoutf8_conv = NULL; XlcConv conv; XimProtoPrivateRec *private = &im->private.proto; Index: xc/lib/X11/imDefLkup.c diff -u xc/lib/X11/imDefLkup.c:3.8 xc/lib/X11/imDefLkup.c:3.9 --- xc/lib/X11/imDefLkup.c:3.8 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/imDefLkup.c Mon Aug 13 17:46:46 2001 @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imDefLkup.c,v 3.8 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imDefLkup.c,v 3.9 2001/08/13 21:46:46 dawes Exp $ */ #include #define NEED_EVENTS @@ -898,10 +898,6 @@ return True; } -#ifndef MAXINT -#define MAXINT (~((unsigned int)1 << ((8 * sizeof(int)) - 1))) -#endif /* !MAXINT */ - Private int _Ximctsconvert(conv, from, from_len, to, to_len, state) XlcConv conv; @@ -919,6 +915,7 @@ int to_cnvlen; char *from_buf; char *to_buf; + char scratchbuf[BUFSIZ]; Status tmp_state; if (!state) @@ -929,6 +926,10 @@ return 0; } + /* Reset the converter. The CompoundText at 'from' starts in + initial state. */ + _XlcResetConverter(conv); + if (to && to_len) { from_left = from_len; to_left = to_len; @@ -962,10 +963,10 @@ from_left = from_len; from_cnvlen = 0; to_cnvlen = 0; - to_buf = NULL; for (;;) { from_savelen = from_left; - to_left = MAXINT; + to_buf = scratchbuf; + to_left = BUFSIZ; from_buf = &from[from_cnvlen]; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { @@ -973,7 +974,7 @@ return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (MAXINT - to_left); + to_cnvlen += (BUFSIZ - to_left); if (from_left == 0) { if (to_cnvlen > 0) *state = XBufferOverflow; @@ -1017,6 +1018,7 @@ int to_cnvlen; char *from_buf; wchar_t *to_buf; + wchar_t scratchbuf[BUFSIZ]; Status tmp_state; if (!state) @@ -1027,6 +1029,10 @@ return 0; } + /* Reset the converter. The CompoundText at 'from' starts in + initial state. */ + _XlcResetConverter(conv); + if (to && to_len) { from_left = from_len; to_left = to_len; @@ -1060,10 +1066,10 @@ from_left = from_len; from_cnvlen = 0; to_cnvlen = 0; - to_buf = (wchar_t *)NULL; for (;;) { from_savelen = from_left; - to_left = MAXINT; + to_buf = scratchbuf; + to_left = BUFSIZ * sizeof(wchar_t); from_buf = &from[from_cnvlen]; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { @@ -1071,7 +1077,7 @@ return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (MAXINT - to_left); + to_cnvlen += (BUFSIZ * sizeof(wchar_t) - to_left); if (from_left == 0) { if (to_cnvlen > 0) *state = XBufferOverflow; Index: xc/lib/X11/imExten.c diff -u xc/lib/X11/imExten.c:1.1.1.4 xc/lib/X11/imExten.c:1.2 --- xc/lib/X11/imExten.c:1.1.1.4 Tue Jan 16 17:11:24 2001 +++ xc/lib/X11/imExten.c Sat Oct 27 23:32:34 2001 @@ -26,6 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/imExten.c,v 1.2 2001/10/28 03:32:34 tsi Exp $ */ #include #define NEED_EVENTS @@ -75,11 +76,12 @@ int n = XIMNumber(extensions) - 1; for (i = 0; i < n; i++) { - if (extensions[i].idx == idx) + if (extensions[i].idx == idx) { if (extensions[i].is_support) return i; else break; + } } return -1; } Index: xc/lib/X11/imInt.c diff -u xc/lib/X11/imInt.c:3.9 xc/lib/X11/imInt.c:3.10 --- xc/lib/X11/imInt.c:3.9 Wed Jan 17 14:41:51 2001 +++ xc/lib/X11/imInt.c Thu Nov 15 19:52:27 2001 @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imInt.c,v 3.9 2001/01/17 19:41:51 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imInt.c,v 3.10 2001/11/16 00:52:27 dawes Exp $ */ #include #include @@ -209,7 +209,7 @@ return ret; } -Private XIM +Public XIM #if NeedFunctionPrototypes _XimOpenIM( XLCd lcd, Index: xc/lib/X11/imKStoUCS.c diff -u xc/lib/X11/imKStoUCS.c:1.1 xc/lib/X11/imKStoUCS.c:1.2 --- xc/lib/X11/imKStoUCS.c:1.1 Tue Nov 28 12:25:08 2000 +++ xc/lib/X11/imKStoUCS.c Wed Jul 25 11:04:45 2001 @@ -1,14 +1,8 @@ -/* $XFree86: xc/lib/X11/imKStoUCS.c,v 1.1 2000/11/28 17:25:08 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imKStoUCS.c,v 1.2 2001/07/25 15:04:45 dawes Exp $ */ #include "Xlibint.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - -static unsigned short Const keysym_to_unicode_1a1_1ff[] = { +static unsigned short const keysym_to_unicode_1a1_1ff[] = { 0x0104, 0x02d8, 0x0141, 0x0000, 0x013d, 0x015a, 0x0000, /* 0x01a0-0x01a7 */ 0x0000, 0x0160, 0x015e, 0x0164, 0x0179, 0x0000, 0x017d, 0x017b, /* 0x01a8-0x01af */ 0x0000, 0x0105, 0x02db, 0x0142, 0x0000, 0x013e, 0x015b, 0x02c7, /* 0x01b0-0x01b7 */ @@ -23,7 +17,7 @@ 0x0159, 0x016f, 0x0000, 0x0171, 0x0000, 0x0000, 0x0163, 0x02d9 /* 0x01f8-0x01ff */ }; -static unsigned short Const keysym_to_unicode_2a1_2fe[] = { +static unsigned short const keysym_to_unicode_2a1_2fe[] = { 0x0126, 0x0000, 0x0000, 0x0000, 0x0000, 0x0124, 0x0000, /* 0x02a0-0x02a7 */ 0x0000, 0x0130, 0x0000, 0x011e, 0x0134, 0x0000, 0x0000, 0x0000, /* 0x02a8-0x02af */ 0x0000, 0x0127, 0x0000, 0x0000, 0x0000, 0x0000, 0x0125, 0x0000, /* 0x02b0-0x02b7 */ @@ -38,7 +32,7 @@ 0x011d, 0x0000, 0x0000, 0x0000, 0x0000, 0x016d, 0x015d /* 0x02f8-0x02ff */ }; -static unsigned short Const keysym_to_unicode_3a2_3fe[] = { +static unsigned short const keysym_to_unicode_3a2_3fe[] = { 0x0138, 0x0156, 0x0000, 0x0128, 0x013b, 0x0000, /* 0x03a0-0x03a7 */ 0x0000, 0x0000, 0x0112, 0x0122, 0x0166, 0x0000, 0x0000, 0x0000, /* 0x03a8-0x03af */ 0x0000, 0x0000, 0x0000, 0x0157, 0x0000, 0x0129, 0x013c, 0x0000, /* 0x03b0-0x03b7 */ @@ -53,7 +47,7 @@ 0x0000, 0x0173, 0x0000, 0x0000, 0x0000, 0x0169, 0x016b /* 0x03f8-0x03ff */ }; -static unsigned short Const keysym_to_unicode_4a1_4df[] = { +static unsigned short const keysym_to_unicode_4a1_4df[] = { 0x3002, 0x3008, 0x3009, 0x3001, 0x30fb, 0x30f2, 0x30a1, /* 0x04a0-0x04a7 */ 0x30a3, 0x30a5, 0x30a7, 0x30a9, 0x30e3, 0x30e5, 0x30e7, 0x30c3, /* 0x04a8-0x04af */ 0x30fc, 0x30a2, 0x30a4, 0x30a6, 0x30a8, 0x30aa, 0x30ab, 0x30ad, /* 0x04b0-0x04b7 */ @@ -64,7 +58,7 @@ 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ef, 0x30f3, 0x309b, 0x309c /* 0x04d8-0x04df */ }; -static unsigned short Const keysym_to_unicode_590_5fe[] = { +static unsigned short const keysym_to_unicode_590_5fe[] = { 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */ 0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x066a, 0x0670, 0x0679, /* 0x05a0-0x05a7 */ @@ -101,7 +95,7 @@ 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a /* 0x06f8-0x06ff */ }; -static unsigned short Const keysym_to_unicode_7a1_7f9[] = { +static unsigned short const keysym_to_unicode_7a1_7f9[] = { 0x0386, 0x0388, 0x0389, 0x038a, 0x03aa, 0x0000, 0x038c, /* 0x07a0-0x07a7 */ 0x038e, 0x03ab, 0x0000, 0x038f, 0x0000, 0x0000, 0x0385, 0x2015, /* 0x07a8-0x07af */ 0x0000, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03ca, 0x0390, 0x03cc, /* 0x07b0-0x07b7 */ @@ -116,7 +110,7 @@ 0x03c8, 0x03c9 /* 0x07f8-0x07ff */ }; -static unsigned short Const keysym_to_unicode_8a4_8fe[] = { +static unsigned short const keysym_to_unicode_8a4_8fe[] = { 0x2320, 0x2321, 0x0000, 0x231c, /* 0x08a0-0x08a7 */ 0x231d, 0x231e, 0x231f, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08a8-0x08af */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08b0-0x08b7 */ @@ -131,7 +125,7 @@ 0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 /* 0x08f8-0x08ff */ }; -static unsigned short Const keysym_to_unicode_9df_9f8[] = { +static unsigned short const keysym_to_unicode_9df_9f8[] = { 0x2422, /* 0x09d8-0x09df */ 0x2666, 0x25a6, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000, /* 0x09e0-0x09e7 */ 0x240a, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x2500, /* 0x09e8-0x09ef */ @@ -139,7 +133,7 @@ 0x2502 /* 0x09f8-0x09ff */ }; -static unsigned short Const keysym_to_unicode_aa1_afe[] = { +static unsigned short const keysym_to_unicode_aa1_afe[] = { 0x2003, 0x2002, 0x2004, 0x2005, 0x2007, 0x2008, 0x2009, /* 0x0aa0-0x0aa7 */ 0x200a, 0x2014, 0x2013, 0x0000, 0x0000, 0x0000, 0x2026, 0x2025, /* 0x0aa8-0x0aaf */ 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159, 0x215a, /* 0x0ab0-0x0ab7 */ @@ -156,7 +150,7 @@ /* none of the APL keysyms match the Unicode characters */ -static unsigned short Const keysym_to_unicode_cdf_cfa[] = { +static unsigned short const keysym_to_unicode_cdf_cfa[] = { 0x2017, /* 0x0cd8-0x0cdf */ 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, /* 0x0ce0-0x0ce7 */ 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, /* 0x0ce8-0x0cef */ @@ -164,7 +158,7 @@ 0x05e8, 0x05e9, 0x05ea /* 0x0cf8-0x0cff */ }; -static unsigned short Const keysym_to_unicode_da1_df9[] = { +static unsigned short const keysym_to_unicode_da1_df9[] = { 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, /* 0x0da0-0x0da7 */ 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, /* 0x0da8-0x0daf */ 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, /* 0x0db0-0x0db7 */ @@ -179,7 +173,7 @@ 0x0e58, 0x0e59 /* 0x0df8-0x0dff */ }; -static unsigned short Const keysym_to_unicode_ea0_eff[] = { +static unsigned short const keysym_to_unicode_ea0_eff[] = { 0x0000, 0x1101, 0x1101, 0x11aa, 0x1102, 0x11ac, 0x11ad, 0x1103, /* 0x0ea0-0x0ea7 */ 0x1104, 0x1105, 0x11b0, 0x11b1, 0x11b2, 0x11b3, 0x11b4, 0x11b5, /* 0x0ea8-0x0eaf */ 0x11b6, 0x1106, 0x1107, 0x1108, 0x11b9, 0x1109, 0x110a, 0x110b, /* 0x0eb0-0x0eb7 */ @@ -209,7 +203,7 @@ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177 /* 0x12f0-0x12ff */ }; -static unsigned short Const keysym_to_unicode_13bc_13be[] = { +static unsigned short const keysym_to_unicode_13bc_13be[] = { 0x0152, 0x0153, 0x0178 /* 0x13b8-0x13bf */ }; @@ -250,7 +244,7 @@ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0259 /* 0x16f0-0x16f6 */ }; -static unsigned short Const keysym_to_unicode_1e9f_1eff[] = { +static unsigned short const keysym_to_unicode_1e9f_1eff[] = { 0x0303, 0x1ea0, 0x1ea1, 0x1ea2, 0x1ea3, 0x1ea4, 0x1ea5, 0x1ea6, 0x1ea7, /* 0x1ea0-0x1ea7 */ 0x1ea8, 0x1ea9, 0x1eaa, 0x1eab, 0x1eac, 0x1ead, 0x1eae, 0x1eaf, /* 0x1ea8-0x1eaf */ @@ -266,7 +260,7 @@ 0x1ef8, 0x1ef9, 0x01a0, 0x01a1, 0x01af, 0x01b0, 0x0309, 0x0323 /* 0x1ef8-0x1eff */ }; -static unsigned short Const keysym_to_unicode_20a0_20ac[] = { +static unsigned short const keysym_to_unicode_20a0_20ac[] = { 0x20a0, 0x20a1, 0x20a2, 0x20a3, 0x20a4, 0x20a5, 0x20a6, 0x20a7, /* 0x20a0-0x20a7 */ 0x20a8, 0x20a9, 0x20aa, 0x20ab, 0x20ac /* 0x20a8-0x20af */ }; Index: xc/lib/X11/imLcLkup.c diff -u xc/lib/X11/imLcLkup.c:3.5 xc/lib/X11/imLcLkup.c:3.6 --- xc/lib/X11/imLcLkup.c:3.5 Wed Jan 17 14:41:52 2001 +++ xc/lib/X11/imLcLkup.c Mon Aug 13 17:46:46 2001 @@ -29,7 +29,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcLkup.c,v 3.5 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcLkup.c,v 3.6 2001/08/13 21:46:46 dawes Exp $ */ #include #include @@ -213,10 +213,6 @@ return (ret); } -#ifndef MAXINT -#define MAXINT (~((unsigned int)1 << ((8 * sizeof(int)) - 1))) -#endif /* !MAXINT */ - Private int _XimLcctsconvert(conv, from, from_len, to, to_len, state) XlcConv conv; @@ -234,6 +230,7 @@ int to_cnvlen; char *from_buf; char *to_buf; + char scratchbuf[BUFSIZ]; Status tmp_state; if (!state) @@ -244,6 +241,10 @@ return 0; } + /* Reset the converter. The CompoundText at 'from' starts in + initial state. */ + _XlcResetConverter(conv); + if (to && to_len) { from_left = from_len; to_left = to_len; @@ -277,10 +278,10 @@ from_left = from_len; from_cnvlen = 0; to_cnvlen = 0; - to_buf = NULL; for (;;) { from_savelen = from_left; - to_left = MAXINT; + to_buf = scratchbuf; + to_left = BUFSIZ; from_buf = &from[from_cnvlen]; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { @@ -288,7 +289,7 @@ return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (MAXINT - to_left); + to_cnvlen += (BUFSIZ - to_left); if (from_left == 0) { if (to_cnvlen > 0) *state = XBufferOverflow; @@ -332,6 +333,7 @@ int to_cnvlen; char *from_buf; wchar_t *to_buf; + wchar_t scratchbuf[BUFSIZ]; Status tmp_state; if (!state) @@ -342,6 +344,10 @@ return 0; } + /* Reset the converter. The CompoundText at 'from' starts in + initial state. */ + _XlcResetConverter(conv); + if (to && to_len) { from_left = from_len; to_left = to_len; @@ -375,10 +381,10 @@ from_left = from_len; from_cnvlen = 0; to_cnvlen = 0; - to_buf = (wchar_t *)NULL; for (;;) { from_savelen = from_left; - to_left = MAXINT; + to_buf = scratchbuf; + to_left = BUFSIZ * sizeof(wchar_t); from_buf = &from[from_cnvlen]; if (_XlcConvert(conv, (XPointer *)&from_buf, &from_left, (XPointer *)&to_buf, &to_left, NULL, 0) < 0) { @@ -386,7 +392,7 @@ return 0; } from_cnvlen += (from_savelen - from_left); - to_cnvlen += (MAXINT - to_left); + to_cnvlen += (BUFSIZ * sizeof(wchar_t) - to_left); if (from_left == 0) { if (to_cnvlen > 0) *state = XBufferOverflow; Index: xc/lib/X11/imLcPrs.c diff -u xc/lib/X11/imLcPrs.c:1.6 xc/lib/X11/imLcPrs.c:1.7 --- xc/lib/X11/imLcPrs.c:1.6 Wed Jan 17 14:41:52 2001 +++ xc/lib/X11/imLcPrs.c Sat Oct 27 23:32:34 2001 @@ -30,7 +30,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.6 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.7 2001/10/28 03:32:34 tsi Exp $ */ #include #include @@ -317,9 +317,9 @@ unsigned modifier; unsigned tmp; KeySym keysym = NoSymbol; - DefTree *p; + DefTree *p = NULL; Bool exclam, tilde; - KeySym rhs_keysym; + KeySym rhs_keysym = 0; char *rhs_string_mb; int l; int lastch = 0; Index: xc/lib/X11/imRmAttr.c diff -u xc/lib/X11/imRmAttr.c:1.5 xc/lib/X11/imRmAttr.c:1.6 --- xc/lib/X11/imRmAttr.c:1.5 Wed Jan 17 14:41:52 2001 +++ xc/lib/X11/imRmAttr.c Sat Oct 27 23:32:34 2001 @@ -26,7 +26,7 @@ fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ -/* $XFree86: xc/lib/X11/imRmAttr.c,v 1.5 2001/01/17 19:41:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imRmAttr.c,v 1.6 2001/10/28 03:32:34 tsi Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -704,7 +704,7 @@ XFontSet font = (XFontSet)value; Xic ic = (Xic)param; char *base_name = NULL; - int length; + int length = 0; CARD16 *buf_s = (CARD16 *)buf; if (!font) { Index: xc/lib/X11/imThaiFlt.c diff -u xc/lib/X11/imThaiFlt.c:3.8 xc/lib/X11/imThaiFlt.c:3.11 --- xc/lib/X11/imThaiFlt.c:3.8 Wed Feb 28 19:56:52 2001 +++ xc/lib/X11/imThaiFlt.c Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: imThaiFlt.c,v 1.4 2000/08/17 19:45:15 cpqbld Exp $ */ +/* $Xorg: imThaiFlt.c,v 1.5 2001/02/09 02:03:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.8 2001/03/01 00:56:52 dawes Exp $ */ +/* $XFree86: xc/lib/X11/imThaiFlt.c,v 3.11 2001/12/14 19:54:10 dawes Exp $ */ /* **++ @@ -408,6 +412,7 @@ return iskeyvalid; } +#if 0 Private void #if NeedFunctionPrototypes THAI_apply_write_rules( @@ -495,7 +500,7 @@ } return position; } - +#endif Private int #if NeedFunctionPrototypes @@ -541,15 +546,19 @@ /* The following functions are copied from XKeyBind.c */ +#if 0 Private void ComputeMaskFromKeytrans(); +#endif Private int IsCancelComposeKey(); Private void SetLed(); Private CARD8 FindKeyCode(); /* The following functions are specific to this module */ +#if 0 Private int XThaiTranslateKey(); Private int XThaiTranslateKeySym(); +#endif Private KeySym HexIMNormalKey(); Private KeySym HexIMFirstComposeKey(); @@ -680,6 +689,7 @@ !IsShift((event)->state)) \ ? True : False) +#if 0 /* * State handler to implement the Thai hex input method. */ @@ -690,6 +700,7 @@ HexIMFirstComposeKey, HexIMSecondComposeKey }; +#endif /* * Table for 'Thai Compose' character input. @@ -743,6 +754,7 @@ return False; } +#if 0 Private int XThaiTranslateKey(dpy, keycode, modifiers, modifiers_return, keysym_return, lsym_return, usym_return) @@ -835,7 +847,7 @@ unsigned char *buffer; int nbytes; { - KeySym ckey; + KeySym ckey = 0; register struct _XKeytrans *p; int length; unsigned long hiBytes; @@ -930,6 +942,7 @@ return 1; } } +#endif /* * given a KeySym, returns the first keycode containing it, if any. @@ -952,7 +965,7 @@ return 0; } - +#if 0 /* * given a list of modifiers, computes the mask necessary for later matching. * This routine must lookup the key in the Keymap and then search to see @@ -986,7 +999,7 @@ } p->state &= AllMods; } - +#endif /************************************************************************ * @@ -1207,14 +1220,16 @@ XPointer client_data; { Xic ic = (Xic)client_data; - unsigned int modifiers; KeySym symbol; - KeySym lsym,usym; int count; int isc_mode; /* Thai Input Sequence Check mode */ unsigned char previous_char; /* Last inputted Thai char */ +#if 0 + unsigned int modifiers; + KeySym lsym,usym; int state; XicThaiPart *thai_part; +#endif char buf[10]; int i; Index: xc/lib/X11/lcCT.c diff -u xc/lib/X11/lcCT.c:3.24 xc/lib/X11/lcCT.c:3.26 --- xc/lib/X11/lcCT.c:3.24 Thu Feb 8 19:02:53 2001 +++ xc/lib/X11/lcCT.c Sat Oct 27 23:32:34 2001 @@ -36,7 +36,7 @@ * Modifier: Ivan Pascal The XFree86 Project * Modifier: Bruno Haible The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcCT.c,v 3.24 2001/02/09 00:02:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcCT.c,v 3.26 2001/10/28 03:32:34 tsi Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -115,11 +115,13 @@ /* Backward compatibility with XFree86 3.x */ { "ISO8859-14:GR", "\033%/1" }, { "ISO8859-15:GR", "\033%/1" }, + /* For use by utf8 -> ctext */ + { "BIG5-0:GLGR", "\033%/2"}, /* used by Emacs, but not backed by ISO-IR */ - { "BIG5-0:GL", "\033$(0" }, - { "BIG5-0:GR", "\033$)0" }, - { "BIG5-1:GL", "\033$(1" }, - { "BIG5-1:GR", "\033$)1" }, + { "BIG5-E0:GL", "\033$(0" }, + { "BIG5-E0:GR", "\033$)0" }, + { "BIG5-E1:GL", "\033$(1" }, + { "BIG5-E1:GR", "\033$)1" }, }; @@ -859,7 +861,7 @@ { State state = (State) conv->state; XlcSide side; - unsigned char min_ch, max_ch; + unsigned char min_ch = 0, max_ch = 0; int length, unconv_num; CTInfo ct_info; XlcCharSet charset; @@ -1262,7 +1264,10 @@ charset = _XlcAddCT(ct_data->name, ct_data->ct_sequence); if (charset == NULL) continue; - charset->source = CSsrcStd; + if (strncmp(charset->ct_sequence, "\x1b\x25\x2f", 3) != 0) + charset->source = CSsrcStd; + else + charset->source = CSsrcXLC; } /* Register CompoundText and CharSet converters. */ Index: xc/lib/X11/lcCharSet.c diff -u xc/lib/X11/lcCharSet.c:3.8 xc/lib/X11/lcCharSet.c:3.9 --- xc/lib/X11/lcCharSet.c:3.8 Wed Jan 17 14:41:53 2001 +++ xc/lib/X11/lcCharSet.c Wed Jul 25 11:04:45 2001 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcCharSet.c,v 3.8 2001/01/17 19:41:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcCharSet.c,v 3.9 2001/07/25 15:04:45 dawes Exp $ */ #include #include "Xlibint.h" @@ -137,26 +137,19 @@ /* Retrieves a number of attributes of an XlcCharSet. Return NULL if successful, otherwise the name of the first argument specifiying a nonexistent attribute. */ -#if NeedVarargsPrototypes char * _XlcGetCSValues(XlcCharSet charset, ...) -#else -char * -_XlcGetCSValues(charset, va_alist) - XlcCharSet charset; - va_dcl -#endif { va_list var; XlcArgList args; char *ret; int num_args; - Va_start(var, charset); + va_start(var, charset); _XlcCountVaList(var, &num_args); va_end(var); - Va_start(var, charset); + va_start(var, charset); _XlcVaToArgList(var, num_args, &args); va_end(var); Index: xc/lib/X11/lcDB.c diff -u xc/lib/X11/lcDB.c:3.13 xc/lib/X11/lcDB.c:3.14 --- xc/lib/X11/lcDB.c:3.13 Wed Jan 17 14:41:53 2001 +++ xc/lib/X11/lcDB.c Thu Aug 9 15:14:06 2001 @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/lcDB.c,v 3.13 2001/01/17 19:41:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDB.c,v 3.14 2001/08/09 19:14:06 dawes Exp $ */ @@ -355,16 +355,16 @@ } } #endif - if (!quoted) { - if (cur > 1 && str[cur - 2] == SYM_BACKSLASH && - (str[cur - 1] == SYM_NEWLINE || str[cur-1] == SYM_CR)) { - /* the line is ended backslash followed by newline. - need to concatinate the next line. */ - cur -= 2; - str[cur] = '\0'; - } else { - break; - } + if (!quoted && cur > 1 && str[cur - 2] == SYM_BACKSLASH && + (str[cur - 1] == SYM_NEWLINE || str[cur-1] == SYM_CR)) { + /* the line is ended backslash followed by newline. + need to concatinate the next line. */ + cur -= 2; + str[cur] = '\0'; + } else if (len < BUFSIZE - 1 || buf[len - 1] == SYM_NEWLINE || + buf[len - 1] == SYM_CR) { + /* the line is shorter than BUFSIZE. */ + break; } } if (quoted) { Index: xc/lib/X11/lcDefConv.c diff -u xc/lib/X11/lcDefConv.c:1.6 xc/lib/X11/lcDefConv.c:1.7 --- xc/lib/X11/lcDefConv.c:1.6 Wed Jan 17 14:41:53 2001 +++ xc/lib/X11/lcDefConv.c Wed Jul 25 11:04:45 2001 @@ -27,7 +27,7 @@ * 2000 * Modifier: Ivan Pascal The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcDefConv.c,v 1.6 2001/01/17 19:41:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDefConv.c,v 1.7 2001/07/25 15:04:45 dawes Exp $ */ /* * The default locale loader. @@ -43,7 +43,7 @@ #define MB_LEN_MAX 6 #endif -#if !defined(X_NOT_STDC_ENV) && !defined(macII) && !defined(Lynx_22) && !defined(X_LOCALE) +#if !defined(macII) && !defined(Lynx_22) && !defined(X_LOCALE) #define STDCVT #endif Index: xc/lib/X11/lcDynamic.c diff -u xc/lib/X11/lcDynamic.c:1.4 xc/lib/X11/lcDynamic.c:1.5 --- xc/lib/X11/lcDynamic.c:1.4 Wed Jan 17 14:41:53 2001 +++ xc/lib/X11/lcDynamic.c Fri Dec 14 14:54:10 2001 @@ -1,8 +1,12 @@ -/* $Xorg: lcDynamic.c,v 1.3 2000/08/17 19:45:17 cpqbld Exp $ */ +/* $Xorg: lcDynamic.c,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -28,7 +32,7 @@ * Modifier: Takanori Tateno FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/lcDynamic.c,v 1.4 2001/01/17 19:41:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcDynamic.c,v 1.5 2001/12/14 19:54:10 dawes Exp $ */ /* * A dynamically loaded locale. Index: xc/lib/X11/lcFile.c diff -u xc/lib/X11/lcFile.c:3.23 xc/lib/X11/lcFile.c:3.25 --- xc/lib/X11/lcFile.c:3.23 Fri May 18 19:35:28 2001 +++ xc/lib/X11/lcFile.c Mon Nov 19 10:33:38 2001 @@ -1,4 +1,4 @@ -/* $Xorg: lcFile.c,v 1.4 2000/08/17 19:45:17 cpqbld Exp $ */ +/* $Xorg: lcFile.c,v 1.5 2000/12/12 12:44:05 coskrey Exp $ */ /* * * Copyright IBM Corporation 1993 @@ -23,7 +23,7 @@ * SOFTWARE. * */ -/* $XFree86: xc/lib/X11/lcFile.c,v 3.23 2001/05/18 23:35:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcFile.c,v 3.25 2001/11/19 15:33:38 tsi Exp $ */ #include #include @@ -382,4 +382,60 @@ xlocaledir(buf, buf_len); } return 1; +} + +char * +_XlcLocaleDirName(dir_name, lc_name) + char *dir_name; + char *lc_name; +{ + char dir[PATH_MAX], buf[PATH_MAX], *name = NULL; + int i, n; + char *args[NUM_LOCALEDIR]; + static char locale_alias[] = LOCALE_ALIAS; + char *target_name = (char*)0; + char *target_dir = (char*)0; + + xlocaledir (dir, PATH_MAX); + n = _XlcParsePath(dir, args, 256); + for (i = 0; i < n; ++i){ + if ((2 + (args[i] ? strlen(args[i]) : 0) + + strlen(locale_alias)) < PATH_MAX) { + sprintf (buf, "%s/%s", args[i], locale_alias); + name = resolve_name(lc_name, buf, LtoR); + } + + /* If name is not an alias, use lc_name for locale.dir search */ + if (name == NULL) + name = lc_name; + + /* look at locale.dir */ + + target_dir = args[i]; + if (!target_dir) { + /* something wrong */ + continue; + } + if ((1 + (target_dir ? strlen (target_dir) : 0) + + strlen("locale.dir")) < PATH_MAX) { + sprintf(buf, "%s/locale.dir", target_dir); + target_name = resolve_name(name, buf, RtoL); + } + if (target_name != NULL) { + char *p = 0; + if ((p = strstr(target_name, "/XLC_LOCALE"))) { + *p = '\0'; + break; + } + } + } + if (target_name == NULL) { + /* vendor locale name == Xlocale name, no expansion of alias */ + target_dir = args[0]; + target_name = lc_name; + } + strcpy(dir_name, target_dir); + strcat(dir_name, "/"); + strcat(dir_name, target_name); + return dir_name; } Index: xc/lib/X11/lcGenConv.c diff -u xc/lib/X11/lcGenConv.c:3.18 xc/lib/X11/lcGenConv.c:3.24 --- xc/lib/X11/lcGenConv.c:3.18 Wed Jan 17 14:41:54 2001 +++ xc/lib/X11/lcGenConv.c Wed Dec 19 18:07:00 2001 @@ -35,7 +35,7 @@ * 2000 * Modifier: Ivan Pascal The XFree86 Project */ -/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.18 2001/01/17 19:41:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcGenConv.c,v 3.24 2001/12/19 23:07:00 tsi Exp $ */ /* * A generic locale loader for all kinds of ISO-2022 based codesets. @@ -52,14 +52,10 @@ #include "XlcGeneric.h" #include -#if !defined(X_NOT_STDC_ENV) && !defined(macII) && !defined(Lynx_22) && !defined(X_LOCALE) +#if !defined(macII) && !defined(Lynx_22) && !defined(X_LOCALE) #define STDCVT #endif -#ifdef __CYGWIN__ -int __mb_cur_max = 1; -#endif - typedef struct _CTDataRec { char *name; char *encoding; /* Compound Text encoding */ @@ -332,7 +328,7 @@ ByteInfoListRec byteM_rec; ByteInfo byteinfo; ByteInfoRec byteinfo_rec; - Bool hit; + Bool hit = False; int i, j, k; int codeset_num = XLC_GENERIC(lcd, codeset_num); @@ -381,7 +377,7 @@ XlcCharSet *charset_list = codeset->charset_list; int num_charsets = codeset->num_charsets; ExtdSegment ctextseg = codeset->ctextseg; - XlcCharSet charset; + XlcCharSet charset = NULL; int area_num; FontScope area; @@ -475,18 +471,20 @@ inbufptr += seq_len; byte_m = *inbufptr++; byte_l = *inbufptr++; - name_len = ((byte_m - 128) * 128) + (byte_l - 128); - total_len = seq_len + name_len; + name_len = strlen(encoding_name); - /* compare encoding names */ - if ( strncmp(inbufptr, encoding_name, name_len - 3) != 0 ) + if (((byte_m - 128) * 128 + (byte_l - 128) - 1) < name_len) return(0); + if ( _XlcNCompareISOLatin1(inbufptr, encoding_name, name_len) != 0 ) + return(0); + /* check STX (Start of Text) */ - inbufptr = inbufptr + name_len - 3; + inbufptr = inbufptr + name_len; if ( *inbufptr != STX ) return(0); + total_len = seq_len + name_len + 3; return(total_len); } @@ -626,7 +624,7 @@ XlcCharSet *charset_list; int codeset_num, num_charsets; Conversion ctconv; - unsigned long glyph_index_tmp; + unsigned long glyph_index_tmp = 0; ExtdSegment ctextseg; codeset_num = XLC_GENERIC(lcd, codeset_num); @@ -1079,7 +1077,7 @@ const wchar_t *inbufptr = (const wchar_t *) *from; char *outbufptr = *to; int from_size = *from_left; - + char *ext_seg_len = NULL; if (*from_left > *to_left) *from_left = *to_left; @@ -1132,14 +1130,21 @@ name_len = 0; total_len = seq_len; } else { - name_len = 2 + strlen(charset->encoding_name) + 1; - total_len = seq_len + name_len; + name_len = strlen(charset->encoding_name) + 1; + total_len = seq_len + name_len + 2; } /* output escape sequence of CT */ if ( (charset != old_charset) && !(first_flag && charset->string_encoding) ){ + if ( (ext_seg_len != NULL) && outbufptr) { + int i = (outbufptr - ext_seg_len) - 2; + *ext_seg_len++ = i / 128 + 128; + *ext_seg_len = i % 128 + 128; + ext_seg_len = NULL; + } + if (*to_left < total_len + 1) { unconv_num++; break; @@ -1150,10 +1155,12 @@ outbufptr += seq_len; if (!standard_flag) { - *outbufptr++ = name_len / 128 + 128; - *outbufptr++ = name_len % 128 + 128; - strcpy((char *)outbufptr, charset->encoding_name); - outbufptr = outbufptr + name_len - 2 - 1; + const char *i = charset->encoding_name; + ext_seg_len = outbufptr; + outbufptr += 2; + for (; *i ; i++) + *outbufptr++ = ((*i >= 'A') && (*i <= 'Z')) ? + *i - 'A' + 'a' : *i; *outbufptr++ = STX; } } @@ -1181,6 +1188,12 @@ } /* end of while */ + if ( (ext_seg_len != NULL) && outbufptr) { + int i = (outbufptr - ext_seg_len) - 2; + *ext_seg_len++ = i / 128 + 128; + *ext_seg_len = i % 128 + 128; + } + *from = (XPointer) ((const char *) *from + from_size); *from_left = 0; *to = (XPointer) outbufptr; @@ -1289,7 +1302,7 @@ if ( !ct_parse_csi(inbufptr - 1, &ctr_seq_len) ) goto skip_the_seg; - if (*from_left < ctr_seq_len) { + if (*from_left + 1 < ctr_seq_len) { inbufptr--; (*from_left)++; unconv_num += *from_left; @@ -1325,7 +1338,7 @@ state->GR_charset = state->charset; } - if (*from_left < ctr_seq_len) { + if (*from_left + 1 < ctr_seq_len) { inbufptr--; (*from_left)++; unconv_num += *from_left; @@ -1757,7 +1770,7 @@ XlcSide side; CodeSet codeset = NULL; - XlcCharSet charset; + XlcCharSet charset = NULL; const char *inbufptr = *from; char *outbufptr = *to; @@ -2097,7 +2110,7 @@ XlcSide side; CodeSet codeset; - XlcCharSet charset; + XlcCharSet charset = NULL; const wchar_t *inbufptr = (const wchar_t *) *from; char *outbufptr = *to; @@ -3073,7 +3086,9 @@ const char *name) { XLCd lcd; +#ifdef STDCVT XLCdGenericPart *gen; +#endif lcd = _XlcCreateLC(name, _XlcGenericMethods); Index: xc/lib/X11/lcGeneric.c diff -u xc/lib/X11/lcGeneric.c:3.14 xc/lib/X11/lcGeneric.c:3.16 --- xc/lib/X11/lcGeneric.c:3.14 Wed Jan 17 14:41:54 2001 +++ xc/lib/X11/lcGeneric.c Thu Nov 15 19:52:27 2001 @@ -1,4 +1,4 @@ -/* $Xorg: lcGeneric.c,v 1.6 2000/08/17 19:45:18 cpqbld Exp $ */ +/* $Xorg: lcGeneric.c,v 1.7 2000/12/12 12:44:05 coskrey Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -28,7 +28,7 @@ * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. */ -/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.14 2001/01/17 19:41:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcGeneric.c,v 3.16 2001/11/16 00:52:27 dawes Exp $ */ #include #include "Xlibint.h" @@ -723,7 +723,6 @@ gen->wc_shift_bits = atoi(value[0]); if (gen->wc_shift_bits < 1) gen->wc_shift_bits = 8; -#ifndef X_NOT_STDC_ENV /***** use_stdc_env *****/ _XlcGetResource(lcd, "XLC_XLOCALE", "use_stdc_env", &value, &num); if (num > 0 && !_XlcCompareISOLatin1(value[0], "True")) @@ -736,7 +735,6 @@ gen->force_convert_to_mb = True; else gen->force_convert_to_mb = False; -#endif for (i = 0; ; i++) { CodeSetRec *codeset = NULL; @@ -989,6 +987,22 @@ return False; } +#ifdef USE_DYNAMIC_LC +/* override the open_om and open_im methods which were set by + super_class's initialize method() */ + +static Bool +initialize_core(lcd) + XLCd lcd; +{ + _XInitDynamicOM(lcd); + + _XInitDynamicIM(lcd); + + return True; +} +#endif + static Bool initialize(lcd) XLCd lcd; @@ -1001,6 +1015,11 @@ if ((*superclass->pub.initialize)(lcd) == False) return False; } + +#ifdef USE_DYNAMIC_LC + if (initialize_core(lcd) == False) + return False; +#endif if (load_generic(lcd) == False) return False; Index: xc/lib/X11/lcInit.c diff -u xc/lib/X11/lcInit.c:3.8 xc/lib/X11/lcInit.c:3.9 --- xc/lib/X11/lcInit.c:3.8 Wed Jan 17 14:41:54 2001 +++ xc/lib/X11/lcInit.c Thu Nov 15 19:52:27 2001 @@ -1,5 +1,48 @@ -/* $Xorg: lcInit.c,v 1.3 2000/08/17 19:45:18 cpqbld Exp $ */ /* +Copyright 1985, 1986, 1987, 1991, 1998 The Open Group + +Portions Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: The above copyright notice and this +permission notice shall be included in all copies or substantial +portions of the Software. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF +ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. + + +Except as contained in this notice, the names of The Open Group and/or +Sun Microsystems, Inc. shall not be used in advertising or otherwise to +promote the sale, use or other dealings in this Software without prior +written authorization from The Open Group and/or Sun Microsystems, +Inc., as applicable. + + +X Window System is a trademark of The Open Group + +OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF +logo, LBX, X Window System, and Xinerama are trademarks of the Open +Group. All other trademarks and registered trademarks mentioned herein +are the property of their respective owners. No right, title or +interest in or to any trademark, service mark, logo or trade name of +Sun Microsystems, Inc. or its licensors is granted. + +*/ +/* $Xorg: lcInit.c,v 1.4 2000/12/12 12:44:05 coskrey Exp $ */ +/* * Copyright 1992, 1993 by TOSHIBA Corp. * * Permission to use, copy, modify, and distribute this software and its @@ -31,11 +74,16 @@ * Modifier: Masayoshi Shimamura FUJITSU LIMITED * */ -/* $XFree86: xc/lib/X11/lcInit.c,v 3.8 2001/01/17 19:41:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcInit.c,v 3.9 2001/11/16 00:52:27 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" +#ifdef USE_DYNAMIC_LC +#undef USE_DEFAULT_LOADER +#undef USE_GENERIC_LOADER +#undef USE_UTF8_LOADER +#else #define USE_GENERIC_LOADER #define USE_DEFAULT_LOADER #define USE_UTF8_LOADER @@ -44,6 +92,7 @@ # define USE_SJIS_LOADER # define USE_JIS_LOADER #endif +#endif /* * The _XlcInitLoader function initializes the locale object loader list @@ -53,6 +102,11 @@ void _XlcInitLoader() { + +#ifdef USE_DYNAMIC_LC + _XlcAddLoader(_XlcDynamicLoad, XlcHead); +#else /* USE_DYNAMIC_LC */ + #ifdef USE_GENERIC_LOADER _XlcAddLoader(_XlcGenericLoader, XlcHead); #endif @@ -80,4 +134,6 @@ #ifdef USE_DYNAMIC_LOADER _XlcAddLoader(_XlcDynamicLoader, XlcHead); #endif + +#endif /* USE_DYNAMIC_LC */ } Index: xc/lib/X11/lcJis.c diff -u xc/lib/X11/lcJis.c:1.7 xc/lib/X11/lcJis.c:1.8 --- xc/lib/X11/lcJis.c:1.7 Wed Jan 17 14:41:54 2001 +++ xc/lib/X11/lcJis.c Wed Jul 25 11:04:45 2001 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcJis.c,v 1.7 2001/01/17 19:41:54 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcJis.c,v 1.8 2001/07/25 15:04:45 dawes Exp $ */ /* * A Japanese JIS locale. @@ -38,7 +38,7 @@ #include "XlcGeneric.h" #include -#if !defined(X_NOT_STDC_ENV) && !defined(macII) && !defined(X_LOCALE) +#if !defined(macII) && !defined(X_LOCALE) #define STDCVT #endif Index: xc/lib/X11/lcPrTxt.c diff -u xc/lib/X11/lcPrTxt.c:1.6 xc/lib/X11/lcPrTxt.c:1.7 --- xc/lib/X11/lcPrTxt.c:1.6 Wed Jan 17 14:41:55 2001 +++ xc/lib/X11/lcPrTxt.c Sat Oct 27 23:32:35 2001 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.6 2001/01/17 19:41:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPrTxt.c,v 1.7 2001/10/28 03:32:35 tsi Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -114,7 +114,7 @@ XPointer **list_ret, int *count_ret) { - XlcConv conv; + XlcConv conv = NULL; const char *from_type; XPointer from, to, buf; char *str_ptr, *last_ptr; Index: xc/lib/X11/lcPubWrap.c diff -u xc/lib/X11/lcPubWrap.c:1.4 xc/lib/X11/lcPubWrap.c:1.5 --- xc/lib/X11/lcPubWrap.c:1.4 Wed Jan 17 14:41:55 2001 +++ xc/lib/X11/lcPubWrap.c Wed Jul 25 11:04:45 2001 @@ -23,20 +23,13 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPubWrap.c,v 1.4 2001/01/17 19:41:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPubWrap.c,v 1.5 2001/07/25 15:04:45 dawes Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" -#if NeedVarargsPrototypes char * _XGetLCValues(XLCd lcd, ...) -#else -char * -_XGetLCValues(lcd, va_alist) - XLCd lcd; - va_dcl -#endif { va_list var; XlcArgList args; @@ -44,11 +37,11 @@ int num_args; XLCdPublicMethodsPart *methods = XLC_PUBLIC_METHODS(lcd); - Va_start(var, lcd); + va_start(var, lcd); _XlcCountVaList(var, &num_args); va_end(var); - Va_start(var, lcd); + va_start(var, lcd); _XlcVaToArgList(var, num_args, &args); va_end(var); Index: xc/lib/X11/lcPublic.c diff -u xc/lib/X11/lcPublic.c:1.9 xc/lib/X11/lcPublic.c:1.11 --- xc/lib/X11/lcPublic.c:1.9 Wed Jan 17 14:41:55 2001 +++ xc/lib/X11/lcPublic.c Thu Nov 15 19:52:28 2001 @@ -1,4 +1,4 @@ -/* $Xorg: lcPublic.c,v 1.3 2000/08/17 19:45:19 cpqbld Exp $ */ +/* $Xorg: lcPublic.c,v 1.4 2000/12/12 12:44:05 coskrey Exp $ */ /* * Copyright 1992, 1993 by TOSHIBA Corp. * @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcPublic.c,v 1.9 2001/01/17 19:41:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcPublic.c,v 1.11 2001/11/16 00:52:28 dawes Exp $ */ #include #include "Xlibint.h" @@ -151,10 +151,18 @@ methods->map_modifiers = core->map_modifiers; if (methods->open_om == NULL) +#ifdef USE_DYNAMIC_LC + _XInitDefaultOM(lcd); +#else _XInitOM(lcd); +#endif if (methods->open_im == NULL) +#ifdef USE_DYNAMIC_LC + _XInitDefaultIM(lcd); +#else _XInitIM(lcd); +#endif if (methods->init_parse_info == NULL) methods->init_parse_info = core->init_parse_info; @@ -194,7 +202,7 @@ XLCdPublicMethodsPart *pub_methods = &publicMethods.pub; XLCdPublicPart *pub = XLC_PUBLIC_PART(lcd); char *name; -#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE) +#if !defined(X_LOCALE) int len; char sinamebuf[256]; char* siname; @@ -207,7 +215,7 @@ return False; name = lcd->core->name; -#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE) +#if !defined(X_LOCALE) /* * _XlMapOSLocaleName will return the same string or a substring * of name, so strlen(name) is okay @@ -222,12 +230,12 @@ #endif /* _XlcResolveLocaleName will lookup the SI's name for the locale */ if (_XlcResolveLocaleName(name, pub) == 0) { -#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE) +#if !defined(X_LOCALE) if (siname != sinamebuf) Xfree (siname); #endif return False; } -#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE) +#if !defined(X_LOCALE) if (siname != sinamebuf) Xfree (siname); #endif Index: xc/lib/X11/lcTxtPr.c diff -u xc/lib/X11/lcTxtPr.c:3.3 xc/lib/X11/lcTxtPr.c:3.4 --- xc/lib/X11/lcTxtPr.c:3.3 Wed Jan 17 14:41:55 2001 +++ xc/lib/X11/lcTxtPr.c Sat Oct 27 23:32:35 2001 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/lcTxtPr.c,v 3.3 2001/01/17 19:41:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcTxtPr.c,v 3.4 2001/10/28 03:32:35 tsi Exp $ */ #include "Xlibint.h" #include "XlcPubI.h" @@ -77,11 +77,11 @@ Atom encoding; XlcConv conv; const char *to_type; - char **mb_list; - wchar_t **wc_list; + char **mb_list = NULL; + wchar_t **wc_list = NULL; XPointer from; char *to, *buf, *value; - int from_left, to_left, buf_len, nitems, unconv_num, ret, i; + int from_left, to_left, buf_len, nitems, unconv_num = 0, ret, i; Bool is_wide_char = False; if (strcmp(XlcNWideChar, from_type) == 0) Index: xc/lib/X11/lcUTF8.c diff -u xc/lib/X11/lcUTF8.c:1.12 xc/lib/X11/lcUTF8.c:1.14 --- xc/lib/X11/lcUTF8.c:1.12 Thu Feb 8 19:02:53 2001 +++ xc/lib/X11/lcUTF8.c Thu Nov 15 19:52:28 2001 @@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.12 2001/02/09 00:02:53 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUTF8.c,v 1.14 2001/11/16 00:52:28 dawes Exp $ */ /* * This file contains: @@ -37,10 +37,12 @@ * sets is an anachronism. * 3. For conversion from keysym to locale encoding. * - * II. An UTF-8 locale loader. + * II. Conversion files for an UTF-8 locale loader. * Supports: all locales with codeset UTF-8. * How: Provides converters for UTF-8. * Platforms: all systems. + * + * The loader itself is located in lcUTF8.c. */ /* @@ -331,9 +333,12 @@ cp1256_mbtowc, cp1256_wctomb }, { "BIG5-0", NULLQUARK, + big5_mbtowc, big5_wctomb + }, + { "BIG5-E0", NULLQUARK, big5_0_mbtowc, big5_0_wctomb }, - { "BIG5-1", NULLQUARK, + { "BIG5-E1", NULLQUARK, big5_1_mbtowc, big5_1_wctomb }, @@ -1131,7 +1136,7 @@ } /***************************************************************************/ -/* Part II: An UTF-8 locale loader. +/* Part II: UTF-8 locale loader conversion files * * Here we can assume that "multi-byte" is UTF-8 and that `wchar_t' is Unicode. */ @@ -1798,23 +1803,12 @@ return create_tofontcs_conv(from_lcd, &methods_utf8tocs); } -XLCd -_XlcUtf8Loader( - const char *name) -{ - XLCd lcd; - - lcd = _XlcCreateLC(name, _XlcGenericMethods); - if (lcd == (XLCd) NULL) - return lcd; - - /* The official IANA name for UTF-8 is "UTF-8" in upper case with a dash. */ - if (!XLC_PUBLIC_PART(lcd)->codeset || - (_XlcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "UTF-8"))) { - _XlcDestroyLC(lcd); - return (XLCd) NULL; - } +/* Registers UTF-8 converters for a UTF-8 locale. */ +void +_XlcAddUtf8LocaleConverters( + XLCd lcd) +{ /* Register elementary converters. */ _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_utf8towcs); @@ -1843,8 +1837,4 @@ /* Register converters for XlcNFontCharSet */ _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNFontCharSet, open_utf8tofcs); _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNFontCharSet, open_wcstofcs); - - _XlcAddUtf8Converters(lcd); - - return lcd; } Index: xc/lib/X11/lcUTF8Load.c diff -u /dev/null xc/lib/X11/lcUTF8Load.c:1.1 --- /dev/null Fri Jan 18 15:23:14 2002 +++ xc/lib/X11/lcUTF8Load.c Fri Nov 16 09:40:46 2001 @@ -0,0 +1,61 @@ +/* $TOG: $ */ +/****************************************************************** + + Copyright 1993 by SunSoft, Inc. + Copyright 1999-2000 by Bruno Haible + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the names of SunSoft, Inc. and +Bruno Haible not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. SunSoft, Inc. and Bruno Haible make no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +SunSoft Inc. AND Bruno Haible DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL SunSoft, Inc. OR Bruno Haible BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +******************************************************************/ +/* $XFree86: xc/lib/X11/lcUTF8Load.c,v 1.1 2001/11/16 14:40:46 dawes Exp $ */ + +/* + * This file contains the UTF-8 locale loader. + * Supports: all locales with codeset UTF-8. + * Platforms: all systems. + */ + +#include +#include "Xlibint.h" +#include "XlcPubI.h" +#include "XlcGeneric.h" + +XLCd +_XlcUtf8Loader( + const char *name) +{ + XLCd lcd; + + lcd = _XlcCreateLC(name, _XlcGenericMethods); + if (lcd == (XLCd) NULL) + return lcd; + + /* The official IANA name for UTF-8 is "UTF-8" in upper case with a dash. */ + if (!XLC_PUBLIC_PART(lcd)->codeset || + (_XlcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "UTF-8"))) { + _XlcDestroyLC(lcd); + return (XLCd) NULL; + } + + _XlcAddUtf8LocaleConverters(lcd); + _XlcAddUtf8Converters(lcd); + + return lcd; +} Index: xc/lib/X11/lcWrap.c diff -u xc/lib/X11/lcWrap.c:3.10 xc/lib/X11/lcWrap.c:3.13 --- xc/lib/X11/lcWrap.c:3.10 Wed Jan 17 14:41:55 2001 +++ xc/lib/X11/lcWrap.c Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: lcWrap.c,v 1.4 2000/08/17 19:45:20 cpqbld Exp $ */ +/* $Xorg: lcWrap.c,v 1.6 2001/02/09 02:03:39 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -49,7 +53,7 @@ * * Katsuhisa Yano TOSHIBA Corp. */ -/* $XFree86: xc/lib/X11/lcWrap.c,v 3.10 2001/01/17 19:41:55 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcWrap.c,v 3.13 2001/12/14 19:54:10 dawes Exp $ */ #include #include "Xlibint.h" @@ -243,7 +247,7 @@ XLCd lcd; XlcLoaderList loader; XLCdList cur; -#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE) +#if !defined(X_LOCALE) int len; char sinamebuf[256]; char* siname = sinamebuf; @@ -252,7 +256,7 @@ if (name == NULL) { name = setlocale (LC_CTYPE, (char *)NULL); -#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE) +#if !defined(X_LOCALE) /* * _XlMapOSLocaleName will return the same string or a substring * of name, so strlen(name) is okay @@ -307,7 +311,7 @@ found: _XUnlockMutex(_Xi18n_lock); -#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE) +#if !defined(X_LOCALE) if (siname != sinamebuf) Xfree(siname); #endif @@ -542,7 +546,7 @@ int count; for (count = 0; va_arg(var, char *); count++) - va_arg(var, XPointer); + (void)va_arg(var, XPointer); *count_ret = count; } Index: xc/lib/X11/locking.c diff -u xc/lib/X11/locking.c:1.1.1.3 xc/lib/X11/locking.c:1.4 --- xc/lib/X11/locking.c:1.1.1.3 Tue Jan 16 17:13:01 2001 +++ xc/lib/X11/locking.c Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: locking.c,v 1.4 2000/08/17 19:45:20 cpqbld Exp $ */ +/* $Xorg: locking.c,v 1.5 2001/02/09 02:03:40 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,6 +24,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/locking.c,v 1.4 2001/12/14 19:54:10 dawes Exp $ */ /* * Author: Stephen Gildea, MIT X Consortium @@ -41,10 +46,6 @@ #endif #define NUM_FREE_CVLS 4 - -/* in XOpenDis.c */ -extern int (*_XInitDisplayLock_fn)(); -extern void (*_XFreeDisplayLock_fn)(); /* in lcWrap.c */ extern LockInfoPtr _Xi18n_lock; Index: xc/lib/X11/locking.h diff -u xc/lib/X11/locking.h:1.1.1.3 xc/lib/X11/locking.h:1.4 --- xc/lib/X11/locking.h:1.1.1.3 Tue Jan 16 17:13:05 2001 +++ xc/lib/X11/locking.h Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: locking.h,v 1.3 2000/08/17 19:45:20 cpqbld Exp $ */ +/* $Xorg: locking.h,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,6 +24,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/locking.h,v 1.4 2001/12/14 19:54:10 dawes Exp $ */ /* * Author: Stephen Gildea, MIT X Consortium @@ -165,5 +170,9 @@ typedef struct _LockInfoRec { xmutex_t lock; } LockInfoRec; + +/* XOpenDis.c */ +extern int (*_XInitDisplayLock_fn)(Display *dpy); +extern void (*_XFreeDisplayLock_fn)(Display *dpy); #endif /* _X_locking_H_ */ Index: xc/lib/X11/mbWMProps.c diff -u xc/lib/X11/mbWMProps.c:1.4 xc/lib/X11/mbWMProps.c:1.5 --- xc/lib/X11/mbWMProps.c:1.4 Wed Jan 17 14:41:56 2001 +++ xc/lib/X11/mbWMProps.c Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: mbWMProps.c,v 1.3 2000/08/17 19:45:21 cpqbld Exp $ */ +/* $Xorg: mbWMProps.c,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/mbWMProps.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/mbWMProps.c,v 1.5 2001/12/14 19:54:10 dawes Exp $ */ #include #include Index: xc/lib/X11/mbWrap.c diff -u xc/lib/X11/mbWrap.c:1.4 xc/lib/X11/mbWrap.c:1.6 --- xc/lib/X11/mbWrap.c:1.4 Wed Jan 17 14:41:56 2001 +++ xc/lib/X11/mbWrap.c Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: mbWrap.c,v 1.3 2000/08/17 19:45:21 cpqbld Exp $ */ +/* $Xorg: mbWrap.c,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ * * M. Collins OSF */ -/* $XFree86: xc/lib/X11/mbWrap.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/mbWrap.c,v 1.6 2001/12/14 19:54:10 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -72,7 +76,7 @@ int nitems; #endif { - register XFontSet fs; + register XFontSet fs = NULL; register XmbTextItem *p = text_items; register int i = nitems; register int esc; Index: xc/lib/X11/omText.c diff -u xc/lib/X11/omText.c:1.4 xc/lib/X11/omText.c:1.5 --- xc/lib/X11/omText.c:1.4 Wed Jan 17 14:41:56 2001 +++ xc/lib/X11/omText.c Sat Oct 27 23:32:35 2001 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omText.c,v 1.4 2001/01/17 19:41:56 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omText.c,v 1.5 2001/10/28 03:32:35 tsi Exp $ */ /* * Copyright 1995 by FUJITSU LIMITED * This is source code modified by FUJITSU LIMITED under the Joint @@ -176,7 +176,7 @@ unsigned char *ptr; int ptr_len, char_len = 0; FontData fd; - int ret; + int ret = 0; ptr = (unsigned char *)text; is_xchar2b = fs->is_xchar2b; Index: xc/lib/X11/omTextPer.c diff -u xc/lib/X11/omTextPer.c:1.4 xc/lib/X11/omTextPer.c:1.5 --- xc/lib/X11/omTextPer.c:1.4 Wed Jan 17 14:41:57 2001 +++ xc/lib/X11/omTextPer.c Sat Oct 27 23:32:35 2001 @@ -23,7 +23,7 @@ * Author: Katsuhisa Yano TOSHIBA Corp. * mopi@osa.ilab.toshiba.co.jp */ -/* $XFree86: xc/lib/X11/omTextPer.c,v 1.4 2001/01/17 19:41:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/omTextPer.c,v 1.5 2001/10/28 03:32:35 tsi Exp $ */ #include "Xlibint.h" #include "XomGeneric.h" @@ -48,7 +48,7 @@ Bool is_xchar2b; XPointer args[2]; XChar2b xchar2b_buf[BUFSIZ], *xchar2b_ptr; - char *xchar_ptr; + char *xchar_ptr = NULL; XCharStruct *def, *cs, overall; int buf_len, left, require_num; int logical_ascent, logical_descent; Index: xc/lib/X11/poly.h diff -u xc/lib/X11/poly.h:1.1.1.3 xc/lib/X11/poly.h:1.2 --- xc/lib/X11/poly.h:1.1.1.3 Tue Jan 16 17:13:23 2001 +++ xc/lib/X11/poly.h Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: poly.h,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ +/* $Xorg: poly.h,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ /************************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/region.h diff -u xc/lib/X11/region.h:1.1.1.3 xc/lib/X11/region.h:1.2 --- xc/lib/X11/region.h:1.1.1.3 Tue Jan 16 17:13:25 2001 +++ xc/lib/X11/region.h Fri Dec 14 14:54:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: region.h,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ +/* $Xorg: region.h,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ /************************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/X11/udcInf.c diff -u xc/lib/X11/udcInf.c:1.6 xc/lib/X11/udcInf.c:1.7 --- xc/lib/X11/udcInf.c:1.6 Wed Jan 17 14:41:57 2001 +++ xc/lib/X11/udcInf.c Fri Dec 14 14:54:11 2001 @@ -1,8 +1,12 @@ -/* $Xorg: udcInf.c,v 1.6 2000/08/17 19:45:23 cpqbld Exp $ */ +/* $Xorg: udcInf.c,v 1.7 2001/02/09 02:03:40 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -29,7 +33,7 @@ * */ -/* $XFree86: xc/lib/X11/udcInf.c,v 1.6 2001/01/17 19:41:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/udcInf.c,v 1.7 2001/12/14 19:54:11 dawes Exp $ */ #include #include Index: xc/lib/X11/utf8WMProps.c diff -u xc/lib/X11/utf8WMProps.c:1.1 xc/lib/X11/utf8WMProps.c:1.2 --- xc/lib/X11/utf8WMProps.c:1.1 Tue Nov 28 13:49:58 2000 +++ xc/lib/X11/utf8WMProps.c Fri Dec 14 14:54:11 2001 @@ -3,7 +3,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE * OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/X11/utf8WMProps.c,v 1.1 2000/11/28 18:49:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/utf8WMProps.c,v 1.2 2001/12/14 19:54:11 dawes Exp $ */ #include #include Index: xc/lib/X11/utf8Wrap.c diff -u xc/lib/X11/utf8Wrap.c:1.1 xc/lib/X11/utf8Wrap.c:1.3 --- xc/lib/X11/utf8Wrap.c:1.1 Tue Nov 28 13:49:58 2000 +++ xc/lib/X11/utf8Wrap.c Fri Dec 14 14:54:11 2001 @@ -3,7 +3,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -68,7 +72,7 @@ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE * OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/lib/X11/utf8Wrap.c,v 1.1 2000/11/28 18:49:58 dawes Exp $ */ +/* $XFree86: xc/lib/X11/utf8Wrap.c,v 1.3 2001/12/14 19:54:11 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -94,7 +98,7 @@ int nitems; #endif { - register XFontSet fs; + register XFontSet fs = NULL; register XmbTextItem *p = text_items; register int i = nitems; register int esc; Index: xc/lib/X11/wcWrap.c diff -u xc/lib/X11/wcWrap.c:1.4 xc/lib/X11/wcWrap.c:1.6 --- xc/lib/X11/wcWrap.c:1.4 Wed Jan 17 14:41:57 2001 +++ xc/lib/X11/wcWrap.c Fri Dec 14 14:54:11 2001 @@ -1,9 +1,13 @@ -/* $Xorg: wcWrap.c,v 1.3 2000/08/17 19:45:23 cpqbld Exp $ */ +/* $Xorg: wcWrap.c,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -47,7 +51,7 @@ * * M. Collins OSF */ -/* $XFree86: xc/lib/X11/wcWrap.c,v 1.4 2001/01/17 19:41:57 dawes Exp $ */ +/* $XFree86: xc/lib/X11/wcWrap.c,v 1.6 2001/12/14 19:54:11 dawes Exp $ */ #include "Xlibint.h" #include "Xlcint.h" @@ -73,7 +77,7 @@ int nitems; #endif { - register XFontSet fs; + register XFontSet fs = NULL; register XwcTextItem *p = text_items; register int i = nitems; register int esc; Index: xc/lib/X11/lcUniConv/gb2312.h diff -u xc/lib/X11/lcUniConv/gb2312.h:1.3 xc/lib/X11/lcUniConv/gb2312.h:1.4 --- xc/lib/X11/lcUniConv/gb2312.h:1.3 Wed Nov 29 12:40:28 2000 +++ xc/lib/X11/lcUniConv/gb2312.h Thu Aug 9 15:14:07 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/gb2312.h,v 1.3 2000/11/29 17:40:28 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/gb2312.h,v 1.4 2001/08/09 19:14:07 dawes Exp $ */ /* * GB2312.1980-0 @@ -1063,10 +1063,10 @@ static int gb2312_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) { - unsigned char c1 = s[0]; + unsigned char c1 = (s[0] & 0x7F); if ((c1 >= 0x21 && c1 <= 0x29) || (c1 >= 0x30 && c1 <= 0x77)) { if (n >= 2) { - unsigned char c2 = s[1]; + unsigned char c2 = (s[1] & 0x7F); if (c2 >= 0x21 && c2 < 0x7f) { unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21); unsigned short wc = 0xfffd; Index: xc/lib/X11/lcUniConv/jisx0208.h diff -u xc/lib/X11/lcUniConv/jisx0208.h:1.3 xc/lib/X11/lcUniConv/jisx0208.h:1.5 --- xc/lib/X11/lcUniConv/jisx0208.h:1.3 Wed Nov 29 12:40:33 2000 +++ xc/lib/X11/lcUniConv/jisx0208.h Wed Nov 21 16:20:56 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/jisx0208.h,v 1.3 2000/11/29 17:40:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/jisx0208.h,v 1.5 2001/11/21 21:20:56 dawes Exp $ */ /* * JISX0208.1990-0 @@ -9,7 +9,7 @@ 0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b, 0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e, 0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, 0x4edd, - 0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, 0x005c, + 0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, 0xff3c, 0x301c, 0x2016, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, 0x201c, 0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b, 0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, @@ -994,10 +994,10 @@ static int jisx0208_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) { - unsigned char c1 = s[0]; + unsigned char c1 = (s[0] & 0x7F); if ((c1 >= 0x21 && c1 <= 0x28) || (c1 >= 0x30 && c1 <= 0x74)) { if (n >= 2) { - unsigned char c2 = s[1]; + unsigned char c2 = (s[1] & 0x7F); if (c2 >= 0x21 && c2 < 0x7f) { unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21); unsigned short wc = 0xfffd; Index: xc/lib/X11/lcUniConv/jisx0212.h diff -u xc/lib/X11/lcUniConv/jisx0212.h:1.3 xc/lib/X11/lcUniConv/jisx0212.h:1.4 --- xc/lib/X11/lcUniConv/jisx0212.h:1.3 Wed Nov 29 12:40:33 2000 +++ xc/lib/X11/lcUniConv/jisx0212.h Thu Aug 9 15:14:08 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/jisx0212.h,v 1.3 2000/11/29 17:40:33 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/jisx0212.h,v 1.4 2001/08/09 19:14:08 dawes Exp $ */ /* * JISX0212.1990-0 @@ -895,10 +895,10 @@ static int jisx0212_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) { - unsigned char c1 = s[0]; + unsigned char c1 = (s[0] & 0x7F); if ((c1 == 0x22) || (c1 >= 0x26 && c1 <= 0x27) || (c1 >= 0x29 && c1 <= 0x2b) || (c1 >= 0x30 && c1 <= 0x6d)) { if (n >= 2) { - unsigned char c2 = s[1]; + unsigned char c2 = (s[1] & 0x7F); if (c2 >= 0x21 && c2 < 0x7f) { unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21); unsigned short wc = 0xfffd; Index: xc/lib/X11/lcUniConv/ksc5601.h diff -u xc/lib/X11/lcUniConv/ksc5601.h:1.3 xc/lib/X11/lcUniConv/ksc5601.h:1.4 --- xc/lib/X11/lcUniConv/ksc5601.h:1.3 Wed Nov 29 12:40:34 2000 +++ xc/lib/X11/lcUniConv/ksc5601.h Thu Aug 9 15:14:09 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/X11/lcUniConv/ksc5601.h,v 1.3 2000/11/29 17:40:34 dawes Exp $ */ +/* $XFree86: xc/lib/X11/lcUniConv/ksc5601.h,v 1.4 2001/08/09 19:14:09 dawes Exp $ */ /* * KSC5601.1987-0 @@ -1170,10 +1170,10 @@ static int ksc5601_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) { - unsigned char c1 = s[0]; + unsigned char c1 = (s[0] & 0x7F); if ((c1 >= 0x21 && c1 <= 0x2c) || (c1 >= 0x30 && c1 <= 0x48) || (c1 >= 0x4a && c1 <= 0x7d)) { if (n >= 2) { - unsigned char c2 = s[1]; + unsigned char c2 = (s[1] & 0x7F); if (c2 >= 0x21 && c2 < 0x7f) { unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21); unsigned short wc = 0xfffd; Index: xc/lib/X11/util/makekeys.c diff -u xc/lib/X11/util/makekeys.c:3.5 xc/lib/X11/util/makekeys.c:3.7 --- xc/lib/X11/util/makekeys.c:3.5 Wed Jan 17 14:42:20 2001 +++ xc/lib/X11/util/makekeys.c Fri Dec 14 14:54:32 2001 @@ -1,9 +1,13 @@ -/* $Xorg: makekeys.c,v 1.4 2000/08/17 19:45:24 cpqbld Exp $ */ +/* $Xorg: makekeys.c,v 1.5 2001/02/09 02:03:40 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/X11/util/makekeys.c,v 3.5 2001/01/17 19:42:20 dawes Exp $ */ +/* $XFree86: xc/lib/X11/util/makekeys.c,v 3.7 2001/12/14 19:54:32 dawes Exp $ */ /* Constructs hash tables for XStringToKeysym and XKeysymToString. */ @@ -30,12 +34,7 @@ #include #include #include - -#ifndef X_NOT_STDC_ENV #include -#else -char *malloc(); -#endif #if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ char *malloc(); #endif /* macII */ @@ -142,7 +141,7 @@ z = best_z; printf("#ifdef NEEDKTABLE\n"); - printf("Const unsigned char _XkeyTable[] = {\n"); + printf("const unsigned char _XkeyTable[] = {\n"); printf("0,\n"); k = 1; for (i = 0; i < ksnum; i++) { @@ -171,7 +170,7 @@ printf("#define KTABLESIZE %d\n", z); printf("#define KMAXHASH %d\n", best_max_rehash + 1); printf("\n"); - printf("static Const unsigned short hashString[KTABLESIZE] = {\n"); + printf("static const unsigned short hashString[KTABLESIZE] = {\n"); for (i = 0; i < z;) { printf("0x%.4x", offsets[i]); i++; @@ -241,7 +240,7 @@ printf("#define VTABLESIZE %d\n", z); printf("#define VMAXHASH %d\n", best_max_rehash + 1); printf("\n"); - printf("static Const unsigned short hashKeysym[VTABLESIZE] = {\n"); + printf("static const unsigned short hashKeysym[VTABLESIZE] = {\n"); for (i = 0; i < z;) { printf("0x%.4x", offsets[i]); i++; Index: xc/lib/X11/xlibi18n/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/Imakefile Thu Nov 15 19:52:28 2001 @@ -0,0 +1,9 @@ +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" + +SUBDIRS = lc im om + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +MakeLintLibSubdirs($(LINTSUBDIRS)) +MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) Index: xc/lib/X11/xlibi18n/Xi18nLib.conf diff -u /dev/null xc/lib/X11/xlibi18n/Xi18nLib.conf:1.4 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/Xi18nLib.conf Thu Jan 17 12:14:49 2002 @@ -0,0 +1,81 @@ +XCOMM $XFree86: xc/lib/X11/xlibi18n/Xi18nLib.conf,v 1.4 2002/01/17 17:14:49 dawes Exp $ + +#define DoNormalLib NO +#define DoSharedLib YES +#define DoDebugLib DebugLibX11 +#define DoProfileLib ProfileLibX11 +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" + +#include + + SOXI18NREV = 2 + POSTLOCALE = common + +#if Malloc0ReturnsNull + MALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif +#if NeedLibInsideFlag + LIB_DEFINES = -D_XLIBINT_ +#endif + +DYNAMIC_DEFINES = -DDYNAMIC_LOAD + DEFINES = $(MALLOC_DEFINES) $(LIB_DEFINES) $(SUNSOFT_DEFINES) + +#include + +#ifdef HPArchitecture && OSMajorVersion > 9 + EXTRA_SHLIBLDFLAGS = +s +b $(USRLIBDIR) +#else + EXTRA_SHLIBLDFLAGS = +#endif + +#if defined(SparcArchitecture) +#if HasSunC +CFLAGS += -xregs=no%appl +#endif +#if HasGcc +CFLAGS += -mno-app-regs +#endif +#endif + +all:: + $(_NULLCMD_) +.c.o: + $(_NULLCMD_) + $(_NULLCMD_) + $(_NULLCMD_) + $(RM) $@ + $(CC) -c $(CFLAGS) $(_NOOP_) $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $*.c + +DependTarget() + +clean:: + rm -rf *.so.$(SOXI18NREV) + +lint:: + $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) + +#ifndef Xi18nLibraryTarget +#if 0 +#define Xi18nLibraryTarget(libname) @@\ +all:: libname.so.$(SOXI18NREV) @@\ +libname.so.$(SOXI18NREV): $(OBJS) @@\ + $(RM) $@~ @@\ + (cd .; T=`echo $@ | sed 's/\.[^\.]*$$//'`; $(LD) -o ./$@~ $(SHLIBLDFLAGS) $(OBJS) $(REQUIREDLIBS) $(EXTRA_SHLIBLDFLAGS); $(RM) $$T && $(LN) $@ $$T) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ +install:: libname.so.$(SOXI18NREV) @@\ + @if [ -d $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE) ]; then set +x; \ @@\ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)); fi @@\ + $(RM) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) libname.so.$(SOXI18NREV) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE) +#else +#define Xi18nLibraryTarget(libname) @@\ +SharedLibraryTarget(libname,$(SOXI18NREV),$(OBJS),.,.) @@\ +install:: Concat(lib,libname.so.$(SOXI18NREV)) @@\ + MakeDir($(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)) @@\ + $(RM) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) @@\ + $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.$(SOXI18NREV)) $(DESTDIR)$(XLOCALEDIR)/$(POSTLOCALE)/libname.so.$(SOXI18NREV) + +#endif +#endif Index: xc/lib/X11/xlibi18n/im/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/im/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/im/Imakefile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,10 @@ +XCOMM $XConsortium: Imakefile,v 1.27 94/04/07 15:01:48 rws Exp $ +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" + +SUBDIRS = ximcp + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +MakeLintLibSubdirs($(LINTSUBDIRS)) +MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) Index: xc/lib/X11/xlibi18n/im/ximcp/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/im/ximcp/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/im/ximcp/Imakefile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,51 @@ +#include "../../Xi18nLib.conf" + + EXTRA_INCLUDES = -I../../.. + SRCS = imCallbk.c imDefFlt.c imDefIc.c \ + imDefIm.c imDefLkup.c imDispch.c imEvToWire.c \ + imExten.c imImSw.c imInsClbk.c imInt.c \ + imLcFlt.c imLcGIc.c imLcIc.c imLcIm.c imLcLkup.c \ + imLcPrs.c imLcSIc.c \ + imRm.c imRmAttr.c \ + imThaiFlt.c imThaiIc.c imThaiIm.c \ + imTrX.c imTransR.c imTrans.c + OBJS = ${SRCS:.c=.o} + + CONN_DEFINES = ConnectionFlags + XTRANS_XIM_DEFINES = -DXIM_t -DTRANS_CLIENT + REQUIREDLIBS = -L$(XENVLIBDIR) -lX11 -lc + +LinkSourceFile(imCallbk.c, ../../..) +LinkSourceFile(imDefFlt.c, ../../..) +LinkSourceFile(imDefIc.c, ../../..) +LinkSourceFile(imDefIm.c, ../../..) +LinkSourceFile(imDefLkup.c, ../../..) +LinkSourceFile(imDispch.c, ../../..) +LinkSourceFile(imEvToWire.c, ../../..) +LinkSourceFile(imExten.c, ../../..) +LinkSourceFile(imImSw.c, ../../..) +LinkSourceFile(imInsClbk.c, ../../..) +LinkSourceFile(imInt.c, ../../..) +LinkSourceFile(imLcFlt.c, ../../..) +LinkSourceFile(imLcGIc.c, ../../..) +LinkSourceFile(imLcIc.c, ../../..) +LinkSourceFile(imLcIm.c, ../../..) +LinkSourceFile(imLcLkup.c, ../../..) +LinkSourceFile(imLcPrs.c, ../../..) +LinkSourceFile(imLcSIc.c, ../../..) +LinkSourceFile(imThaiFlt.c, ../../..) +LinkSourceFile(imThaiIc.c, ../../..) +LinkSourceFile(imThaiIm.c, ../../..) +LinkSourceFile(imRm.c, ../../..) +LinkSourceFile(imRmAttr.c, ../../..) +LinkSourceFile(imTrX.c, ../../..) +LinkSourceFile(imTransR.c, ../../..) +LinkSourceFile(imTrans.c, ../../..) + +SpecialCLibObjectRule(imTransR,$(ICONFIGFILES),$(CONN_DEFINES) $(XTRANS_XIM_DEFINES)) +SpecialCLibObjectRule(imTrans,$(ICONFIGFILES),$(CONN_DEFINES) $(XTRANS_XIM_DEFINES)) +#if BuildXKBlib +SpecialCLibObjectRule(imConv,$(ICONFIGFILES),$(XKB_DEFINES)) +#endif + +Xi18nLibraryTarget(ximcp) Index: xc/lib/X11/xlibi18n/im/ximcp/Ximcp.mapfile diff -u /dev/null xc/lib/X11/xlibi18n/im/ximcp/Ximcp.mapfile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/im/ximcp/Ximcp.mapfile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,6 @@ +{ + local: + *; + global: + _XimOpenIM; +}; Index: xc/lib/X11/xlibi18n/lc/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/lc/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/lc/Imakefile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,10 @@ +XCOMM $XConsortium: Imakefile,v 1.27 94/04/07 15:01:48 rws Exp $ +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" + +SUBDIRS = gen def Utf8 xlocale + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +MakeLintLibSubdirs($(LINTSUBDIRS)) +MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) Index: xc/lib/X11/xlibi18n/lc/Utf8/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/lc/Utf8/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/lc/Utf8/Imakefile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,11 @@ +#include "../../Xi18nLib.conf" + + EXTRA_INCLUDES = -I../../.. + XI18NLIBNAME = xlibi18n + SRCS = lcUTF8Load.c + OBJS = ${SRCS:.c=.o} + REQUIREDLIBS = -L$(XENVLIBDIR) -lX11 -lc + +LinkSourceFile(lcUTF8Load.c, ../../..) + +Xi18nLibraryTarget(xlcUTF8Load) Index: xc/lib/X11/xlibi18n/lc/def/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/lc/def/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/lc/def/Imakefile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,11 @@ +#include "../../Xi18nLib.conf" + + EXTRA_INCLUDES = -I../../.. + XI18NLIBNAME = xlcDef + SRCS = lcDefConv.c + OBJS = ${SRCS:.c=.o} + REQUIREDLIBS = -L$(XENVLIBDIR) -lX11 -lc + +LinkSourceFile(lcDefConv.c, ../../..) + +Xi18nLibraryTarget(xlcDef) Index: xc/lib/X11/xlibi18n/lc/def/Xlc.mapfile diff -u /dev/null xc/lib/X11/xlibi18n/lc/def/Xlc.mapfile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/lc/def/Xlc.mapfile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,6 @@ +{ + local: + *; + global: + _XlcDefaultLoader; +}; Index: xc/lib/X11/xlibi18n/lc/gen/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/lc/gen/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/lc/gen/Imakefile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,11 @@ +#include "../../Xi18nLib.conf" + + EXTRA_INCLUDES = -I../../.. + XI18NLIBNAME = xlibi18n + SRCS = lcGenConv.c + OBJS = ${SRCS:.c=.o} + REQUIREDLIBS = -L$(XENVLIBDIR) -lX11 -lc + +LinkSourceFile(lcGenConv.c, ../../..) + +Xi18nLibraryTarget(xlibi18n) Index: xc/lib/X11/xlibi18n/lc/gen/Xlc.mapfile diff -u /dev/null xc/lib/X11/xlibi18n/lc/gen/Xlc.mapfile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/lc/gen/Xlc.mapfile Thu Nov 15 19:52:29 2001 @@ -0,0 +1,6 @@ +{ + local: + *; + global: + _XlcGenericLoader; +}; Index: xc/lib/X11/xlibi18n/lc/xlocale/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/lc/xlocale/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/lc/xlocale/Imakefile Thu Nov 15 19:52:30 2001 @@ -0,0 +1,13 @@ +#include "../../Xi18nLib.conf" + + EXTRA_INCLUDES = -I../../.. + XI18NLIBNAME = xlocale + SRCS = lcEuc.c lcSjis.c lcJis.c + OBJS = ${SRCS:.c=.o} + REQUIREDLIBS = -L$(XENVLIBDIR) -lX11 -lc + +LinkSourceFile(lcEuc.c, ../../..) +LinkSourceFile(lcSjis.c, ../../..) +LinkSourceFile(lcJis.c, ../../..) + +Xi18nLibraryTarget(xlocale) Index: xc/lib/X11/xlibi18n/om/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/om/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/om/Imakefile Thu Nov 15 19:52:30 2001 @@ -0,0 +1,10 @@ +XCOMM $XConsortium: Imakefile,v 1.27 94/04/07 15:01:48 rws Exp $ +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" + +SUBDIRS = generic + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +MakeLintLibSubdirs($(LINTSUBDIRS)) +MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) Index: xc/lib/X11/xlibi18n/om/generic/Imakefile diff -u /dev/null xc/lib/X11/xlibi18n/om/generic/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/om/generic/Imakefile Thu Nov 15 19:52:30 2001 @@ -0,0 +1,19 @@ +#include "../../Xi18nLib.conf" + + EXTRA_INCLUDES = -I../../.. + SRCS = omDefault.c omGeneric.c omImText.c omText.c \ + omTextEsc.c omTextExt.c omTextPer.c omXChar.c + + OBJS = ${SRCS:.c=.o} + REQUIREDLIBS = -L$(XENVLIBDIR) -lX11 -lc + +LinkSourceFile(omDefault.c, ../../..) +LinkSourceFile(omGeneric.c, ../../..) +LinkSourceFile(omImText.c, ../../..) +LinkSourceFile(omText.c, ../../..) +LinkSourceFile(omTextEsc.c, ../../..) +LinkSourceFile(omTextExt.c, ../../..) +LinkSourceFile(omTextPer.c, ../../..) +LinkSourceFile(omXChar.c, ../../..) + +Xi18nLibraryTarget(xomGeneric) Index: xc/lib/X11/xlibi18n/om/generic/Xom.mapfile diff -u /dev/null xc/lib/X11/xlibi18n/om/generic/Xom.mapfile:1.1 --- /dev/null Fri Jan 18 15:23:16 2002 +++ xc/lib/X11/xlibi18n/om/generic/Xom.mapfile Thu Nov 15 19:52:30 2001 @@ -0,0 +1,6 @@ +{ + local: + *; + global: + _XomGenericOpenOM; +}; Index: xc/lib/XIE/XIElib.h diff -u xc/lib/XIE/XIElib.h:3.2 xc/lib/XIE/XIElib.h:3.3 --- xc/lib/XIE/XIElib.h:3.2 Wed Jan 17 14:42:20 2001 +++ xc/lib/XIE/XIElib.h Fri Dec 14 14:54:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XIElib.h,v 1.5 2000/08/17 19:45:25 cpqbld Exp $ */ +/* $Xorg: XIElib.h,v 1.6 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/XIE/XIElibint.h diff -u xc/lib/XIE/XIElibint.h:3.4 xc/lib/XIE/XIElibint.h:3.6 --- xc/lib/XIE/XIElibint.h:3.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/XIElibint.h Fri Dec 14 14:54:32 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XIElibint.h,v 1.4 2000/08/17 19:45:25 cpqbld Exp $ */ +/* $Xorg: XIElibint.h,v 1.5 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/XIElibint.h,v 3.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/XIElibint.h,v 3.6 2001/12/14 19:54:32 dawes Exp $ */ #ifndef _XIELIBINT_H_ #define _XIELIBINT_H_ @@ -153,7 +157,7 @@ * Request names and opcodes. */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define REQNAME(_name_) xie##_name_##Req #define REQOPCODE(_name_) X_ie##_name_ #define REQSIZE(_name_) sz_xie##_name_##Req Index: xc/lib/XIE/abort.c diff -u xc/lib/XIE/abort.c:1.4 xc/lib/XIE/abort.c:1.5 --- xc/lib/XIE/abort.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/abort.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: abort.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ +/* $Xorg: abort.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/abort.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/abort.c,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/await.c diff -u xc/lib/XIE/await.c:1.4 xc/lib/XIE/await.c:1.5 --- xc/lib/XIE/await.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/await.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: await.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ +/* $Xorg: await.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/await.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/await.c,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/clientdata.c diff -u xc/lib/XIE/clientdata.c:1.4 xc/lib/XIE/clientdata.c:1.5 --- xc/lib/XIE/clientdata.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/clientdata.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: clientdata.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ +/* $Xorg: clientdata.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/clientdata.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/clientdata.c,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/colorlist.c diff -u xc/lib/XIE/colorlist.c:1.5 xc/lib/XIE/colorlist.c:1.6 --- xc/lib/XIE/colorlist.c:1.5 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/colorlist.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: colorlist.c,v 1.3 2000/08/17 19:45:25 cpqbld Exp $ */ +/* $Xorg: colorlist.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/colorlist.c,v 1.5 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/colorlist.c,v 1.6 2001/12/14 19:54:33 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/conven.c diff -u xc/lib/XIE/conven.c:1.4 xc/lib/XIE/conven.c:1.5 --- xc/lib/XIE/conven.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/conven.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: conven.c,v 1.5 2000/08/17 19:45:25 cpqbld Exp $ */ +/* $Xorg: conven.c,v 1.6 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/conven.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/conven.c,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/elements.c diff -u xc/lib/XIE/elements.c:1.4 xc/lib/XIE/elements.c:1.5 --- xc/lib/XIE/elements.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/elements.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: elements.c,v 1.5 2000/08/17 19:45:26 cpqbld Exp $ */ +/* $Xorg: elements.c,v 1.6 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/elements.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/elements.c,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ #include "XIElibint.h" #include "elements.h" Index: xc/lib/XIE/elements.h diff -u xc/lib/XIE/elements.h:3.2 xc/lib/XIE/elements.h:3.5 --- xc/lib/XIE/elements.h:3.2 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/elements.h Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: elements.h,v 1.3 2000/08/17 19:45:26 cpqbld Exp $ */ +/* $Xorg: elements.h,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,11 +27,12 @@ from The Open Group. */ +/* $XFree86: xc/lib/XIE/elements.h,v 3.5 2001/12/14 19:54:33 dawes Exp $ */ #ifndef _ELEMENTS_H_ #define _ELEMENTS_H_ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define ELEM_NAME(_name_) xieFlo##_name_ #define ELEM_SIZE(_name_) sz_xieFlo##_name_ #else Index: xc/lib/XIE/errors.c diff -u xc/lib/XIE/errors.c:3.4 xc/lib/XIE/errors.c:3.5 --- xc/lib/XIE/errors.c:3.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/errors.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: errors.c,v 1.5 2000/08/17 19:45:26 cpqbld Exp $ */ +/* $Xorg: errors.c,v 1.6 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/errors.c,v 3.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/errors.c,v 3.5 2001/12/14 19:54:33 dawes Exp $ */ #define NEED_EVENTS /* so XErrorEvent will get pulled in */ Index: xc/lib/XIE/events.c diff -u xc/lib/XIE/events.c:1.4 xc/lib/XIE/events.c:1.5 --- xc/lib/XIE/events.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/events.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: events.c,v 1.3 2000/08/17 19:45:26 cpqbld Exp $ */ +/* $Xorg: events.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/events.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/events.c,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ #define NEED_EVENTS /* so xEvent will get pulled in */ #include "XIElibint.h" Index: xc/lib/XIE/free.c diff -u xc/lib/XIE/free.c:1.4 xc/lib/XIE/free.c:1.5 --- xc/lib/XIE/free.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/free.c Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: free.c,v 1.3 2000/08/17 19:45:26 cpqbld Exp $ */ +/* $Xorg: free.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/free.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/free.c,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/globals.h diff -u xc/lib/XIE/globals.h:1.4 xc/lib/XIE/globals.h:1.5 --- xc/lib/XIE/globals.h:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/globals.h Fri Dec 14 14:54:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: globals.h,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: globals.h,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/globals.h,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/globals.h,v 1.5 2001/12/14 19:54:33 dawes Exp $ */ extern void _XieElemImportClientLUT (char **, XiePhotoElement *); extern void _XieElemImportClientPhoto (char **, XiePhotoElement *); Index: xc/lib/XIE/ieee.c diff -u xc/lib/XIE/ieee.c:1.4 xc/lib/XIE/ieee.c:1.5 --- xc/lib/XIE/ieee.c:1.4 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/ieee.c Fri Dec 14 14:54:34 2001 @@ -1,4 +1,4 @@ -/* $Xorg: ieee.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: ieee.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /****************************************************************************** NOTICE @@ -45,7 +45,11 @@ Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -64,7 +68,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/ieee.c,v 1.4 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/ieee.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" #include Index: xc/lib/XIE/init.c diff -u xc/lib/XIE/init.c:3.5 xc/lib/XIE/init.c:3.6 --- xc/lib/XIE/init.c:3.5 Wed Jan 17 14:42:21 2001 +++ xc/lib/XIE/init.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: init.c,v 1.5 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: init.c,v 1.6 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/init.c,v 3.5 2001/01/17 19:42:21 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/init.c,v 3.6 2001/12/14 19:54:34 dawes Exp $ */ #define NEED_EVENTS /* so XErrorEvent will get pulled in */ Index: xc/lib/XIE/init.h diff -u xc/lib/XIE/init.h:1.1.1.3 xc/lib/XIE/init.h:1.2 --- xc/lib/XIE/init.h:1.1.1.3 Tue Jan 16 17:14:14 2001 +++ xc/lib/XIE/init.h Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: init.h,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: init.h,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/XIE/lut.c diff -u xc/lib/XIE/lut.c:1.4 xc/lib/XIE/lut.c:1.5 --- xc/lib/XIE/lut.c:1.4 Wed Jan 17 14:42:22 2001 +++ xc/lib/XIE/lut.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: lut.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: lut.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/lut.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/lut.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/photoflo.c diff -u xc/lib/XIE/photoflo.c:1.4 xc/lib/XIE/photoflo.c:1.5 --- xc/lib/XIE/photoflo.c:1.4 Wed Jan 17 14:42:22 2001 +++ xc/lib/XIE/photoflo.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: photoflo.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: photoflo.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/photoflo.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/photoflo.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/photomap.c diff -u xc/lib/XIE/photomap.c:1.4 xc/lib/XIE/photomap.c:1.5 --- xc/lib/XIE/photomap.c:1.4 Wed Jan 17 14:42:22 2001 +++ xc/lib/XIE/photomap.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: photomap.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: photomap.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/photomap.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/photomap.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/photospace.c diff -u xc/lib/XIE/photospace.c:1.4 xc/lib/XIE/photospace.c:1.5 --- xc/lib/XIE/photospace.c:1.4 Wed Jan 17 14:42:22 2001 +++ xc/lib/XIE/photospace.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: photospace.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: photospace.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/photospace.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/photospace.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/roi.c diff -u xc/lib/XIE/roi.c:1.4 xc/lib/XIE/roi.c:1.5 --- xc/lib/XIE/roi.c:1.4 Wed Jan 17 14:42:22 2001 +++ xc/lib/XIE/roi.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: roi.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: roi.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/roi.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/roi.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XIE/technique.c diff -u xc/lib/XIE/technique.c:1.4 xc/lib/XIE/technique.c:1.5 --- xc/lib/XIE/technique.c:1.4 Wed Jan 17 14:42:22 2001 +++ xc/lib/XIE/technique.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: technique.c,v 1.3 2000/08/17 19:45:27 cpqbld Exp $ */ +/* $Xorg: technique.c,v 1.4 2001/02/09 02:03:41 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/technique.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/technique.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" #include "technique.h" Index: xc/lib/XIE/technique.h diff -u xc/lib/XIE/technique.h:1.1.1.3 xc/lib/XIE/technique.h:1.2 --- xc/lib/XIE/technique.h:1.1.1.3 Tue Jan 16 17:14:33 2001 +++ xc/lib/XIE/technique.h Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: technique.h,v 1.3 2000/08/17 19:45:28 cpqbld Exp $ */ +/* $Xorg: technique.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/XIE/utils.c diff -u xc/lib/XIE/utils.c:1.4 xc/lib/XIE/utils.c:1.5 --- xc/lib/XIE/utils.c:1.4 Wed Jan 17 14:42:22 2001 +++ xc/lib/XIE/utils.c Fri Dec 14 14:54:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: utils.c,v 1.3 2000/08/17 19:45:28 cpqbld Exp $ */ +/* $Xorg: utils.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/XIE/utils.c,v 1.4 2001/01/17 19:42:22 dawes Exp $ */ +/* $XFree86: xc/lib/XIE/utils.c,v 1.5 2001/12/14 19:54:34 dawes Exp $ */ #include "XIElibint.h" Index: xc/lib/XThrStub/UIThrStubs.c diff -u xc/lib/XThrStub/UIThrStubs.c:3.2 xc/lib/XThrStub/UIThrStubs.c:3.3 --- xc/lib/XThrStub/UIThrStubs.c:3.2 Tue Oct 24 14:07:37 2000 +++ xc/lib/XThrStub/UIThrStubs.c Sun Nov 18 16:13:26 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/XThrStub/UIThrStubs.c,v 3.2 2000/10/24 18:07:37 dawes Exp $ + * $XFree86: xc/lib/XThrStub/UIThrStubs.c,v 3.3 2001/11/18 21:13:26 herrb Exp $ * * Copyright (c) 1995 David E. Wexelblat. All rights reserved * @@ -109,6 +109,10 @@ #pragma weak pthread_cond_wait = _Xthr_zero_stub_ #pragma weak pthread_cond_signal = _Xthr_zero_stub_ #pragma weak pthread_cond_broadcast = _Xthr_zero_stub_ +/* These are added for libGL */ +#pragma weak pthread_key_create = _Xthr_zero_stub_ +#pragma weak pthread_getspecific = _Xthr_zero_stub_ +#pragma weak pthread_setspecific = _Xthr_zero_stub_ #if defined(_DECTHREADS_) || defined(linux) #pragma weak pthread_equal = _Xthr_equal_stub_ /* See Xthreads.h! */ int Index: xc/lib/XTrap/Imakefile diff -u /dev/null xc/lib/XTrap/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/Imakefile Fri Nov 2 18:29:27 2001 @@ -0,0 +1,30 @@ +XCOMM $XFree86: xc/lib/XTrap/Imakefile,v 1.1 2001/11/02 23:29:27 dawes Exp $ + +#define DoNormalLib NormalLibXTrap +#define DoSharedLib SharedLibXTrap +#define DoDebugLib DebugLibXTrap +#define DoProfileLib ProfileLibXTrap +#define LibName XTrap +#define SoRev SOXTRAPREV +#define LibHeaders NO + +#include + +#ifdef SharedXmuReqs +REQUIREDLIBS = SharedXmuReqs +#endif + +XCOMM wish this weren't necessary, but need xlib and xt internals... +INCLUDES=-I$(TOP)/include -I$(TOOLKITSRC) + + + SRCS = XECallBcks.c XEConTxt.c XEDsptch.c XEPrInfo.c \ + XERqsts.c XEStrMap.c XETrapInit.c XEWrappers.c + OBJS = XECallBcks.o XEConTxt.o XEDsptch.o XEPrInfo.o \ + XERqsts.o XEStrMap.o XETrapInit.o XEWrappers.o + +LINTLIBS = $(LINTXLIB) + +#include + +DependTarget() Index: xc/lib/XTrap/XECallBcks.c diff -u /dev/null xc/lib/XTrap/XECallBcks.c:1.1 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XECallBcks.c Fri Nov 2 18:29:27 2001 @@ -0,0 +1,175 @@ +/* $XFree86: xc/lib/XTrap/XECallBcks.c,v 1.1 2001/11/02 23:29:27 dawes Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + */ +/* + * This file contains XETrap Callback initilization routines. + * The callback data hang off of the TC and are freed as part of the + * XEFreeTC routine. + */ + +#include +#include +#include + +int XEAddRequestCB(XETC *tc, CARD8 req, void_function func, BYTE *data) +{ + if (!tc->values.req_cb) + { /* This is the first time for this particular TC, need to malloc */ + if ((tc->values.req_cb = + (XETrapCB *)XtCalloc(256L,sizeof(XETrapCB))) == NULL) + { + /* XtCalloc already reported the error */ + return(False); + } + } + tc->values.req_cb[req].func = func; + tc->values.req_cb[req].data = data; + + return(True); +} + +int XEAddRequestCBs(XETC *tc, ReqFlags req_flags, void_function func, + BYTE *data) +{ + int i; + int status = True; + + for (i=0; i<=255L; i++) + { + if (BitIsTrue(req_flags, i)) + { + status = XEAddRequestCB(tc, (CARD8)i, func, data); + } + } + return(status); +} + +int XEAddEventCB(XETC *tc, CARD8 evt, void_function func, BYTE *data) +{ + if (!tc->values.evt_cb) + { /* This is the first time for this particular TC, need to malloc */ + if ((tc->values.evt_cb = + (XETrapCB *)XtCalloc(XETrapCoreEvents,sizeof(XETrapCB))) == NULL) + { + /* XtCalloc already reported the error */ + return(False); + } + } + tc->values.evt_cb[evt].func = func; + tc->values.evt_cb[evt].data = data; + + return(True); +} + +int XEAddEventCBs(XETC *tc, EventFlags evt_flags, void_function func, + BYTE *data) +{ + int i; + int status = True; + + for (i=KeyPress; i<=MotionNotify; i++) + { + if (BitIsTrue(evt_flags, i)) + { + status = XEAddEventCB(tc, (CARD8)i, func, data); + } + } + return(status); +} + +void XERemoveRequestCB(XETC *tc, CARD8 req) +{ + if (!tc->values.req_cb) + { /* We gotta problem! CB struct not allocated! */ + return; + } + tc->values.req_cb[req].func = (void_function)NULL; + tc->values.req_cb[req].data = (BYTE *)NULL; + return; +} +void XERemoveRequestCBs(XETC *tc, ReqFlags req_flags) +{ + int i; + + for (i=0; i<=255L; i++) + { + if (BitIsTrue(req_flags, i)) + { + XERemoveRequestCB(tc, (CARD8)i); + } + } +} + +void XERemoveAllRequestCBs(XETC *tc) +{ + if (!tc->values.req_cb) + { /* We gotta problem! CB struct not allocated! */ + return; + } + XtFree((XtPointer)tc->values.req_cb); +} + +void XERemoveEventCB(XETC *tc, CARD8 evt) +{ + if (!tc->values.evt_cb) + { /* We gotta problem! CB struct not allocated! */ + return; + } + tc->values.evt_cb[evt].func = (void_function)NULL; + tc->values.evt_cb[evt].data = (BYTE *)NULL; + return; +} + +void XERemoveEventCBs(XETC *tc, EventFlags evt_flags) +{ + int i; + + for (i=KeyPress; i<=MotionNotify; i++) + { + if (BitIsTrue(evt_flags, i)) + { + XERemoveEventCB(tc, (CARD8)i); + } + } +} + +void XERemoveAllEventCBs(XETC *tc) +{ + if (!tc->values.evt_cb) + { /* We gotta problem! CB struct not allocated! */ + return; + } + XtFree((XtPointer)tc->values.evt_cb); +} Index: xc/lib/XTrap/XEConTxt.c diff -u /dev/null xc/lib/XTrap/XEConTxt.c:1.2 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XEConTxt.c Mon Nov 19 10:33:39 2001 @@ -0,0 +1,589 @@ +/* $XFree86: xc/lib/XTrap/XEConTxt.c,v 1.2 2001/11/19 15:33:39 tsi Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + */ + +#define NEED_REPLIES +#define NEED_EVENTS + + +#include +#include + +#ifndef TRUE +# define TRUE 1L +#endif +#ifndef FALSE +# define FALSE 0L +#endif + +extern char *extensionData; + +static XETC TC; + +/* + * This function is used to create a new XTrap context structure. The new + * context is initialized to a hard coded default, then modified by the + * valuemask and values passed in by the caller. + */ + +XETC *XECreateTC(Display *dpy, CARD32 valuemask, XETCValues *value) +{ + static Bool firsttime = True; + register XETC *tc = &TC; + register XETC *last_tc; + XETrapGetAvailRep rep; + + /* If this is the first time here, then initialize the default TC */ + if (firsttime == True) + { + firsttime = False; + /* The first Trap Context is the Template (default) TC */ + (void)memset(tc,0L,sizeof(tc)); + tc->eventBase = 0x7FFFFFFFL; + tc->errorBase = 0x7FFFFFFFL; + tc->values.v.max_pkt_size = 0x7FFFL; + } + + /* Position to the end of the list */ + for (;tc->next != NULL; tc = tc->next); + + /* Allocate memory for the new context */ + last_tc = tc; /* save the address of the last on the list */ + if ((tc = (tc->next = (XETC *)XtMalloc(sizeof(*tc)))) == NULL) + { /* No memory to build TC, XtMalloc has already reported the error */ + return(NULL); + } + + /* Use the original TC as the template to start from */ + (void)memcpy(tc,&TC,sizeof(TC)); + tc->next = NULL; + tc->dpy = dpy; + tc->xmax_size = XMaxRequestSize(tc->dpy); + + /* Initialize Extension */ + if (!XETrapQueryExtension(dpy,&(tc->eventBase),&(tc->errorBase), + &(tc->extOpcode))) + { + char *params = XTrapExtName; + unsigned int num_params = 1L; + XtWarningMsg("CantLoadExt", "XECreateTC", "XTrapToolkitError", + "Can't load %s extension", ¶ms, &num_params); + (void)XtFree((XtPointer)tc); + last_tc->next = NULL; /* Clear now nonexistant forward pointer */ + return(NULL); + } + + /* Allocate memory for the XLIB transport */ + if ((tc->xbuff = (BYTE *)XtMalloc(tc->xmax_size * sizeof(CARD32) + + SIZEOF(XETrapHeader))) == NULL) + { /* No memory to build TC, XtMalloc has already reported the error */ + (void)XtFree((XtPointer)tc); /* free the allocated TC */ + last_tc->next = NULL; /* Clear now nonexistant forward pointer */ + return(NULL); + } + + /* Decide on a protocol version to communicate with */ + /* would *like* to use XEGetVersionRequest() but it's broken in V3.1 */ + if (XEGetAvailableRequest(tc,&rep) == True) + { + /* stow the protocol number */ + switch (rep.xtrap_protocol) + { + /* known acceptable protocols */ + case 31: + case XETrapProtocol: + tc->protocol = rep.xtrap_protocol; + break; + /* all else */ + default: /* stay backwards compatible */ + tc->protocol = 31; + break; + } + /* TC to contain *oldest* release/version/revision */ + if (XETrapGetAvailRelease(&rep) <= XETrapRelease) + { + tc->release = XETrapGetAvailRelease(&rep); + if (XETrapGetAvailVersion(&rep) <= XETrapVersion) + { + tc->version = XETrapGetAvailVersion(&rep); + tc->revision = (XETrapGetAvailRevision(&rep) <= XETrapRevision ? + XETrapGetAvailRevision(&rep) : XETrapRevision); + } + else + { + tc->version = XETrapVersion; + tc->revision = XETrapRevision; + } + } + else + { + tc->release = XETrapRelease; + tc->version = XETrapVersion; + tc->revision = XETrapRevision; + } + } + else + { /* We can't seem to communicate with the extension! */ + char *params = XTrapExtName; + unsigned int num_params = 1L; + XtWarningMsg("CantComm", "XECreateTC", "XTrapToolkitError", + "Can't communicate with extension %s", ¶ms, &num_params); + (void)XtFree((XtPointer)tc->xbuff);/* de-allocate memory just alloc'd */ + (void)XtFree((XtPointer)tc); /* free the allocated TC */ + last_tc->next = NULL; /* Clear now nonexistant forward pointer */ + return(NULL); + } + + /* Assign the context values the caller provided */ + (void)XEChangeTC(tc, valuemask, value); + + return (tc); +} + + +static int CheckChangeBits(XETrapFlags *dest, XETrapFlags *src, INT32 bit) +{ + int chg_flag = False; + + if (!(BitIsFalse(dest->valid,bit) && BitIsFalse(src->valid,bit)) || + !(BitIsTrue(dest->valid,bit) && BitIsTrue(src->valid,bit))) + { + BitCopy(dest->valid, src->valid, bit); + chg_flag = True; + } + if (!(BitIsFalse(dest->data,bit) && BitIsFalse(src->data,bit)) || + !(BitIsTrue(dest->data,bit) && BitIsTrue(src->data,bit))) + { + BitCopy(dest->data, src->data, bit); + chg_flag = True; + } + return(chg_flag); +} + +/* + * This function is called to change one or more parameters used to define + * a context in which XTrap is or will be running. + */ +int XEChangeTC(XETC *tc, CARD32 mask, XETCValues *values) +{ + int status = True; + register XETCValues *tval = &(tc->values); + register int i; + + if (mask & TCStatistics) + { /* Statistics need changing */ + if(CheckChangeBits(&(tval->v.flags), &(values->v.flags), + XETrapStatistics)) + { + tc->dirty |= TCStatistics; + } + } + if (mask & TCRequests) + { /* Requests need changing */ + CheckChangeBits(&(tval->v.flags), &(values->v.flags), XETrapRequest); + for (i=0; i<256L; i++) + { + XETrapSetCfgFlagReq(tval, i, BitValue(values->v.flags.req,i)); + } + tc->dirty |= TCRequests; + } + if (mask & TCEvents) + { /* Events need changing */ + CheckChangeBits(&(tval->v.flags), &(values->v.flags), XETrapEvent); + for (i=KeyPress; i<=MotionNotify; i++) + { + XETrapSetCfgFlagEvt(tval, i, BitValue(values->v.flags.event,i)); + } + tc->dirty |= TCEvents; + } + if (mask & TCMaxPacket) + { /* MaxPacket needs changing */ + CheckChangeBits(&(tval->v.flags), &(values->v.flags), XETrapMaxPacket); + XETrapSetCfgMaxPktSize(tval, values->v.max_pkt_size); + tc->dirty |= TCMaxPacket; + } + if (mask & TCCmdKey) + { /* CmdKey needs changing */ + CheckChangeBits(&(tval->v.flags), &(values->v.flags), XETrapCmd); + tval->v.cmd_key = values->v.cmd_key; + CheckChangeBits(&(tval->v.flags), &(values->v.flags), XETrapCmdKeyMod); + tc->dirty |= TCCmdKey; + } + if (mask & TCTimeStamps) + { /* TimeStamps needs changing */ + if (CheckChangeBits(&(tval->v.flags), &(values->v.flags), XETrapTimestamp)) + { + tc->dirty |= TCTimeStamps; + } + BitCopy(tval->tc_flags, values->tc_flags, XETCDeltaTimes); + } + if (mask & TCWinXY) + { /* Window XY's need changing */ + if (CheckChangeBits(&(tval->v.flags), &(values->v.flags), XETrapWinXY)) + { + tc->dirty |= TCWinXY; + } + } + if (mask & TCCursor) + { /* Window XY's need changing */ + if (CheckChangeBits(&(tval->v.flags), &(values->v.flags),XETrapCursor)) + { + tc->dirty |= TCCursor; + } + } + if (mask & TCXInput) + { /* XInput flag needs changing */ + if (CheckChangeBits(&(tval->v.flags), &(values->v.flags),XETrapXInput)) + { + tc->dirty |= TCXInput; + } + } + if (mask & TCColorReplies) + { /* ColorReplies flag needs changing */ + if (CheckChangeBits(&(tval->v.flags), &(values->v.flags), + XETrapColorReplies)) + { + tc->dirty |= TCColorReplies; + } + } + if (mask & TCGrabServer ) + { /* GrabServer flag needs changing */ + if (CheckChangeBits(&(tval->v.flags), &(values->v.flags), + XETrapGrabServer )) + { + tc->dirty |= TCGrabServer; + } + } + if (XETrapGetTCFlagTrapActive(tc)) + { + status = XEFlushConfig(tc); + } +#ifdef VMS + sys$setast(True); /* Make sure AST's are enabled */ +#endif /* VMS */ + return(status); +} + + +void XEFreeTC(XETC *tc) +{ + register XETC *list = &TC; + + if (tc) + { + while(list->next != NULL) + { + if (list->next == tc) + list->next = list->next->next; /* Got it, remove from list */ + else + list = list->next; /* Update the list pointer */ + } + if (tc->values.req_cb) + { + XtFree((XtPointer)tc->values.req_cb); + } + if (tc->values.evt_cb) + { + XtFree((XtPointer)tc->values.evt_cb); + } + if (tc->xbuff != NULL) + { + XtFree((XtPointer)tc->xbuff); + } + + XtFree((XtPointer)tc); + if (extensionData) + { + XtFree(extensionData); + } + } + return; +} + +/* The following are Convenience routines for setting values within + * the Trap Context. These are analogous to the GC's Convenience + * Functions such as XSetState & XSetForeground + */ +int XETrapSetMaxPacket(XETC *tc, Bool set_flag, CARD16 size) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagMaxPacket(&tcv, valid, True); + XETrapSetCfgFlagMaxPacket(&tcv, data, set_flag); + XETrapSetCfgMaxPktSize(&tcv, size); + status = XEChangeTC(tc, TCMaxPacket, &tcv); + return(status); +} +int XETrapSetCommandKey(XETC *tc, Bool set_flag, KeySym cmd_key, Bool mod_flag) +{ + XETCValues tcv; + int status = True; + KeyCode cmd_keycode; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagCmd(&tcv, valid, True); + XETrapSetCfgFlagCmd(&tcv, data, set_flag); + if (set_flag == True) + { + XETrapSetCfgFlagCmdKeyMod(&tcv, valid, True); + XETrapSetCfgFlagCmdKeyMod(&tcv, data, mod_flag); + if (!(cmd_keycode = XKeysymToKeycode(XETrapGetDpy(tc), cmd_key))) + { + status = False; + } + else + { + XETrapSetCfgCmdKey(&tcv, cmd_keycode); + } + } + else + { /* Clear command key */ + XETrapSetCfgFlagCmdKeyMod(&tcv, valid, True); + XETrapSetCfgFlagCmdKeyMod(&tcv, data, False); + XETrapSetCfgCmdKey(&tcv, 0); + } + if (status == True) + { + status = XEChangeTC(tc, TCCmdKey, &tcv); + } + return(status); +} + +int XETrapSetTimestamps(XETC *tc, Bool set_flag, Bool delta_flag) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagTimestamp(&tcv, valid, True); + XETrapSetCfgFlagTimestamp(&tcv, data, set_flag); + XETrapSetValFlagDeltaTimes(&tcv, delta_flag); + status = XEChangeTC(tc, TCTimeStamps, &tcv); + return(status); +} + +int XETrapSetWinXY(XETC *tc, Bool set_flag) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagWinXY(&tcv, valid, True); + XETrapSetCfgFlagWinXY(&tcv, data, set_flag); + status = XEChangeTC(tc, TCWinXY, &tcv); + return(status); +} + +int XETrapSetCursor(XETC *tc, Bool set_flag) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagCursor(&tcv, valid, True); + XETrapSetCfgFlagCursor(&tcv, data, set_flag); + status = XEChangeTC(tc, TCCursor, &tcv); + return(status); +} + +int XETrapSetXInput(XETC *tc, Bool set_flag) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagXInput(&tcv, valid, True); + XETrapSetCfgFlagXInput(&tcv, data, set_flag); + status = XEChangeTC(tc, TCXInput, &tcv); + return(status); +} + +int XETrapSetColorReplies(XETC *tc, Bool set_flag) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagColorReplies(&tcv, valid, True); + XETrapSetCfgFlagColorReplies(&tcv, data, set_flag); + status = XEChangeTC(tc, TCColorReplies, &tcv); + return(status); +} + +int XETrapSetGrabServer(XETC *tc, Bool set_flag) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagGrabServer(&tcv, valid, True); + XETrapSetCfgFlagGrabServer(&tcv, data, set_flag); + status = XEChangeTC(tc, TCGrabServer, &tcv); + return(status); +} + +int XETrapSetStatistics(XETC *tc, Bool set_flag) +{ + XETCValues tcv; + int status = True; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagStatistics(&tcv, valid, True); + XETrapSetCfgFlagStatistics(&tcv, data, set_flag); + status = XEChangeTC(tc, TCStatistics, &tcv); + return(status); +} + +int XETrapSetRequests(XETC *tc, Bool set_flag, ReqFlags requests) +{ + XETCValues tcv; + int status = True; + int i; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagRequest(&tcv, valid, True); + XETrapSetCfgFlagRequest(&tcv, data, set_flag); + for (i=0; i<256L; i++) + { + XETrapSetCfgFlagReq(&tcv, i, BitValue(requests, i)); + } + status = XEChangeTC(tc, TCRequests, &tcv); + return(status); +} + +int XETrapSetEvents(XETC *tc, Bool set_flag, EventFlags events) +{ + XETCValues tcv; + int status = True; + int i; + + (void)memset((char *)&tcv,0L,sizeof(tcv)); + XETrapSetCfgFlagEvent(&tcv, valid, True); + XETrapSetCfgFlagEvent(&tcv, data, set_flag); + for (i=KeyPress; i<=MotionNotify; i++) + { + XETrapSetCfgFlagEvt(&tcv, i, BitValue(events, i)); + } + status = XEChangeTC(tc, (CARD32)TCEvents, &tcv); + return(status); +} + +Bool XESetCmdGateState(XETC *tc, CARD8 type, Bool *gate_closed, + CARD8 *next_key, Bool *key_ignore) +{ + + *key_ignore = False; + if (XETrapGetTCFlagCmdKeyMod(tc,data) == True) + { + switch (type) + { + case KeyPress: + if (*next_key == XEKeyIsEcho) + { + break; + } + *gate_closed = True; + *next_key = XEKeyIsClear; + break; + + case KeyRelease: + if (*next_key == XEKeyIsEcho) + { + *next_key = XEKeyIsClear; + break; + } + if (*next_key == XEKeyIsClear) + { + *next_key = XEKeyIsEcho; + } + else + { /* it's XEKeyIsOther, so Clear it */ + *next_key = XEKeyIsClear; + } + *gate_closed = False; + *key_ignore = True; + break; + + default: break; + } + } + else + { + switch (type) + { + case KeyPress: + if (*next_key == XEKeyIsEcho) + { + *gate_closed = False; + break; + } + /* Open gate on cmd key release */ + if ((*next_key == XEKeyIsOther) && + *gate_closed == True) + { + break; + } + *gate_closed = True; + *next_key = XEKeyIsClear; + break; + + case KeyRelease: + if (*next_key == XEKeyIsClear) + { + *next_key = XEKeyIsEcho; + break; + } + + if (*next_key == XEKeyIsEcho) + { + *next_key = XEKeyIsClear; + break; + } + + *gate_closed = False; + *key_ignore = True; + *next_key = XEKeyIsClear; + break; + + default: + break; + } + } + + return(*gate_closed); +} Index: xc/lib/XTrap/XEDsptch.c diff -u /dev/null xc/lib/XTrap/XEDsptch.c:1.1 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XEDsptch.c Fri Nov 2 18:29:27 2001 @@ -0,0 +1,111 @@ +/* $XFree86: xc/lib/XTrap/XEDsptch.c,v 1.1 2001/11/02 23:29:27 dawes Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Dan Coutu + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + */ + +#include +#include +#include +#include + +static void XETrapDispatchCB(XETC *tc, XETrapDatum *pdatum) +{ + void_function pfunc = NULL; + BYTE *userp = NULL; + + /* Need to deal with Delta Timestamps here before calling client CB */ + if (XETrapGetTCFlagDeltaTimes(tc)) + { + CARD32 last_time = XETrapGetTCTime(tc); + if (XETrapHeaderIsEvent(&pdatum->hdr)) + { /* then we can play with the timestamps */ + pdatum->hdr.timestamp = + pdatum->u.event.u.keyButtonPointer.time; + } + else + { /* + * the current one from GetTimeInMillis is worthless + * as it's only updated during event instances (e.g. not + * wall clock). + */ + pdatum->hdr.timestamp = last_time; + } + if (!pdatum->hdr.timestamp) + { /* for dual monitor bug */ + pdatum->hdr.timestamp = last_time; + } + if (!last_time) + { /* first one! Prime it! */ + last_time = pdatum->hdr.timestamp; + } + tc->values.last_time = pdatum->hdr.timestamp; /* no macro! */ + if (pdatum->hdr.timestamp < last_time) + { /* for clock rollover */ + pdatum->hdr.timestamp = 0; + } + else + { /* the real delta */ + pdatum->hdr.timestamp = pdatum->hdr.timestamp - last_time; + } + } + /* Get the user supplied callback function */ + if (XETrapHeaderIsEvent(&pdatum->hdr)) + { + pfunc = tc->values.evt_cb[pdatum->u.event.u.u.type].func; + userp = tc->values.evt_cb[pdatum->u.event.u.u.type].data; + } + else if (XETrapHeaderIsRequest(&pdatum->hdr) || + XETrapHeaderIsReply(&pdatum->hdr)) + { + pfunc = tc->values.req_cb[pdatum->u.req.reqType].func; + userp = tc->values.req_cb[pdatum->u.req.reqType].data; + } + + /* If there is a callback then call it with the data */ + if (pfunc != NULL) + { + (*pfunc)(tc,pdatum,userp); + } +} + +Boolean XETrapDispatchXLib(XETrapDataEvent *event, XETC *tc) +{ + memcpy(&tc->xbuff[event->idx*sz_EventData], event->data, sz_EventData); + + if (event->detail == XETrapDataLast) + { + XETrapDispatchCB(tc, (XETrapDatum *)tc->xbuff); + } + return True; +} Index: xc/lib/XTrap/XEPrInfo.c diff -u /dev/null xc/lib/XTrap/XEPrInfo.c:1.1 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XEPrInfo.c Fri Nov 2 18:29:27 2001 @@ -0,0 +1,274 @@ +/* $XFree86: xc/lib/XTrap/XEPrInfo.c,v 1.1 2001/11/02 23:29:27 dawes Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +#include +#include +#include +#include + +#ifndef TRUE +# define TRUE 1L +#endif +#ifndef FALSE +# define FALSE 0L +#endif + +void XEPrintRelease( FILE *ofp, XETrapGetAvailRep *pavail) +{ + + fprintf(ofp,"\tRelease: %d.%d-%d\n", XETrapGetAvailRelease(pavail), + XETrapGetAvailVersion(pavail), XETrapGetAvailRevision(pavail)); +} +void XEPrintTkRelease( FILE *ofp, XETC *tc) +{ + fprintf(ofp,"\tRelease: %d.%d-%d\n", XEGetRelease(tc), XEGetVersion(tc), + XEGetRevision(tc)); +} + +void XEPrintPlatform( FILE *ofp, XETrapGetAvailRep *pavail) +{ + fprintf(ofp,"\tPlatform: %s (0x%02x)\n", + XEPlatformIDToString(XETrapGetAvailPFIdent(pavail)), + (int)XETrapGetAvailPFIdent(pavail)); +} + +void XEPrintAvailFlags( FILE *ofp, XETrapGetAvailRep *pavail) +{ + + CARD8 f[4L]; + + XETrapGetAvailFlags(pavail,f); + fprintf(ofp,"\tFlags: "); + if (XETrapGetAvailFlagTimestamp(pavail)) fputs("Timestamps ", ofp); + if (XETrapGetAvailFlagCmd(pavail)) fputs("CmdKey ", ofp); + if (XETrapGetAvailFlagCmdKeyMod(pavail)) fputs("CmdKeyMod ", ofp); + if (XETrapGetAvailFlagRequest(pavail)) fputs("Requests ", ofp); + if (XETrapGetAvailFlagEvent(pavail)) fputs("Events ", ofp); + if (XETrapGetAvailFlagMaxPacket(pavail)) fputs("MaxPkt ", ofp); + if (XETrapGetAvailFlagStatistics(pavail)) fputs("Statistics ", ofp); + if (XETrapGetAvailFlagWinXY(pavail)) fputs("WinXY ", ofp); + if (XETrapGetAvailFlagCursor(pavail)) fputs("Cursor ", ofp); + if (XETrapGetAvailFlagXInput(pavail)) fputs("XInput ", ofp); + if (XETrapGetAvailFlagVecEvt(pavail)) fputs("Vect_Evnts ", ofp); + if (XETrapGetAvailFlagColorReplies(pavail)) fputs("ColorRep ", ofp); + if (XETrapGetAvailFlagGrabServer(pavail)) fputs("GrabServer ", ofp); + fprintf(ofp," (0x%02x%02x%02x%02x)\n", f[0], f[1], f[2], f[3]); +} + +void XEPrintAvailPktSz( FILE *ofp, XETrapGetAvailRep *pavail) +{ + + fprintf(ofp,"\tMax Packet Size: %d\n", XETrapGetAvailMaxPktSize(pavail)); +} +void XEPrintStateFlags( FILE *ofp, XETrapGetCurRep *pcur) +{ + + CARD8 f[2]; + XETrapGetCurSFlags(pcur, f); + fputs("\tFlags: ",ofp); + if (BitIsTrue(f,XETrapTrapActive)) fputs("I/O Active ", ofp); + fprintf(ofp," (0x%02x%02x)\n", f[0], f[1]); +} + +void XEPrintMajOpcode( FILE *ofp, XETrapGetAvailRep *pavail) +{ + + fprintf(ofp,"\tMajor Opcode: %d\n", (int)XETrapGetAvailOpCode(pavail)); +} +void XEPrintCurXY( FILE *ofp, XETrapGetAvailRep *pavail) +{ + + fprintf(ofp,"\tCurrent (x,y): (%d,%d)\n", XETrapGetCurX(pavail), + XETrapGetCurY(pavail)); +} + +void XEPrintTkFlags( FILE *ofp, XETC *tc) +{ + + CARD8 f[2]; + XETrapGetTCLFlags(tc, f); + fputs("\tFlags: ",ofp); + if (XETrapGetTCFlagDeltaTimes(tc)) fputs("Delta Times ", ofp); + if (XETrapGetTCFlagTrapActive(tc)) fputs("Trap Active ", ofp); + fprintf(ofp," (0x%02x%02x)\n", f[0], f[1]); +} + +void XEPrintLastTime( FILE *ofp, XETC *tc) +{ + + fprintf(ofp,"\tLast Relative Time: %d\n", (int)XETrapGetTCTime(tc)); +} + +void XEPrintCfgFlags( FILE *ofp, XETrapGetCurRep *pcur) +{ + + CARD8 f[4L]; + + XETrapGetCurCFlags(pcur,data,f); + fprintf(ofp,"\tFlags: "); + if (XETrapGetCurFlagTimestamp(pcur,data)) fputs("Timestamps ", ofp); + if (XETrapGetCurFlagCmd(pcur,data)) fputs("CmdKey ", ofp); + if (XETrapGetCurFlagCmdKeyMod(pcur,data)) fputs("CmdKeyMod ", ofp); + if (XETrapGetCurFlagRequest(pcur,data)) fputs("Requests ", ofp); + if (XETrapGetCurFlagEvent(pcur,data)) fputs("Events ", ofp); + if (XETrapGetCurFlagMaxPacket(pcur,data)) fputs("MaxPkt ", ofp); + if (XETrapGetCurFlagStatistics(pcur,data)) fputs("Statistics ", ofp); + if (XETrapGetCurFlagWinXY(pcur,data)) fputs("WinXY ", ofp); + if (XETrapGetCurFlagCursor(pcur,data)) fputs("Cursor ", ofp); + if (XETrapGetCurFlagXInput(pcur,data)) fputs("XInput ", ofp); + if (XETrapGetCurFlagColorReplies(pcur,data)) fputs("ColorReplies ", ofp); + if (XETrapGetCurFlagGrabServer(pcur,data)) fputs("GrabServer ", ofp); + fprintf(ofp," (0x%02x%02x%02x%02x)\n", f[0], f[1], f[2], f[3]); +} + +void XEPrintRequests( FILE *ofp, XETrapGetCurRep *pcur) +{ + + long i; + fprintf(ofp,"\tX Requests: "); + for (i=0L; i<=XETrapMaxRequest-1; i++) + { /* Not using the macro cause we're doing things + * a byte at a time rather than a bit. + */ + fprintf(ofp,"%02x ", pcur->config.flags.req[i]); + if ((i+1L)%4L == 0L) + { + fprintf(ofp," "); + } + if ((i+1L)%16L == 0L) + { + fprintf(ofp,"\n\t\t "); + } + } + fprintf(ofp,"\n"); +} + +void XEPrintEvents( FILE *ofp, XETrapGetCurRep *pcur) +{ + + int i; + fprintf(ofp,"\tX Events: "); + for (i=0L; iconfig.flags.event[i]); + if ((i+1L)%4L == 0L) + { + fprintf(ofp," "); + } + if ((i+1L)%16L == 0L) + { + fprintf(ofp,"\n\t\t "); + } + } + fprintf(ofp,"\n"); +} + +void XEPrintCurPktSz( FILE *ofp, XETrapGetCurRep *pcur) +{ + + fprintf(ofp,"\tMax Packet Size: %d\n", XETrapGetCurMaxPktSize(pcur)); +} + +void XEPrintCmdKey( FILE *ofp, XETrapGetCurRep *pcur) +{ + + fprintf(ofp,"\tcmd_key: 0x%02x\n", XETrapGetCurCmdKey(pcur)); +} + +void XEPrintEvtStats( FILE *ofp, XETrapGetStatsRep *pstats, XETC *tc) +{ + + int i; + fprintf(ofp,"\tX Events:\n"); + for (i=0; i +#define NEED_REPLIES +#define NEED_EVENTS +#include +#else /* NO_DEC_BUG_FIX */ +#include +#define NEED_REPLIES +#define NEED_EVENTS +#include +#endif /* NO_DEC_BUG_FIX */ +/* the following's a hack to support V3.1 protocol */ +#if defined(__STDC__) && !defined(UNIXCPP) +#define GetOldReq(name, req, old_length) \ + WORD64ALIGN\ + if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ + _XFlush(dpy);\ + req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ + req->reqType = X_##name;\ + req->length = old_length>>2;\ + dpy->bufptr += old_length;\ + dpy->request++ + +#else /* non-ANSI C uses empty comment instead of "##" for token concat */ +#define GetOldReq(name, req, old_length) \ + WORD64ALIGN\ + if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\ + _XFlush(dpy);\ + req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ + req->reqType = X_/**/name;\ + req->length = old_length>>2;\ + dpy->bufptr += old_length;\ + dpy->request++ +#endif + +#ifndef vms +#include +#else /* vms */ +#define SyncHandle() \ + if (dpy->synchandler) (*dpy->synchandler)(dpy) +/* + * LockDisplay uses an undocumented feature in V5 of VMS that allows + * disabling ASTs without calling $SETAST. A bit is set in P1 space + * that disables a user mode AST from being delivered to this process. + * + */ +#define LockDisplay(dis) \ +{ globalref char ctl$gb_soft_ast_disable; \ + globalref char ctl$gb_lib_lock; \ + globalref short ctl$gw_soft_ast_lock_depth; \ + if ( ctl$gb_soft_ast_disable == 0 ) { \ + ctl$gb_soft_ast_disable = 1; \ + ctl$gb_lib_lock = 1; \ + ctl$gw_soft_ast_lock_depth = 1; \ + } \ + else ctl$gw_soft_ast_lock_depth++; \ +} + +/* + * UnlockDisplay clears the AST disable bit, then checks to see if an + * AST delivery attempt was made during the critical section. If so, + * reenable_ASTs is set, and $SETAST must be called to turn AST delivery + * back on. + * + * Note that it assumed that LockDisplay and UnlockDisplay appear in + * matched sets within a single routine. + */ +#define UnlockDisplay(dis) \ +{ globalref char ctl$gb_reenable_asts; \ + globalref char ctl$gb_soft_ast_disable; \ + globalref char ctl$gb_lib_lock; \ + globalref short ctl$gw_soft_ast_lock_depth; \ + if (!--ctl$gw_soft_ast_lock_depth) \ + if ( ctl$gb_lib_lock ) { \ + ctl$gb_lib_lock = 0; \ + ctl$gb_soft_ast_disable = 0; \ + if (ctl$gb_reenable_asts != 0) \ + sys$setast(1); \ + } \ +} + +#define WORD64ALIGN +#if defined(__STDC__) && !defined(UNIXCPP) +#define GetReq(name, req) \ + WORD64ALIGN\ + if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ + _XFlush(dpy);\ + req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ + req->reqType = X_##name;\ + req->length = (SIZEOF(x##name##Req))>>2;\ + dpy->bufptr += SIZEOF(x##name##Req);\ + dpy->request++ + +#else /* non-ANSI C uses empty comment instead of "##" for token concat */ +#define GetReq(name, req) \ + WORD64ALIGN\ + if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\ + _XFlush(dpy);\ + req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ + req->reqType = X_/**/name;\ + req->length = (SIZEOF(x/**/name/**/Req))>>2;\ + dpy->bufptr += SIZEOF(x/**/name/**/Req);\ + dpy->request++ +#endif +#endif /* vms */ + +#include +#include + +/* Returns the all important protocol number to be used. + * The only request guaranteed to be of the same request/reply + * size is XEGetVersionRequest. All others need the protocol + * number to determine how to communicate. + * Unfortunately, this was broken for V3.1 so GetAvailable will + * have to be used to determine the protocol version. + */ +int XEGetVersionRequest(XETC *tc, XETrapGetVersRep *ret) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrapGet = tc->extOpcode; + xXTrapGetReq *reqptr; + xXTrapGetVersReply rep; + int numlongs = (SIZEOF(xXTrapGetVersReply) - + SIZEOF(xReply) + SIZEOF(CARD32) -1 ) / SIZEOF(CARD32); + LockDisplay(dpy); + GetReq(XTrapGet,reqptr); + reqptr->minor_opcode = XETrap_GetVersion; + reqptr->protocol = XETrapProtocol; + status = _XReply(dpy,(xReply *)&rep,numlongs,xTrue); + SyncHandle(); + UnlockDisplay(dpy); + memcpy((char *)ret,&(rep.data),sizeof(XETrapGetVersRep)); + return(status); +} + +int XEGetAvailableRequest(XETC *tc, XETrapGetAvailRep *ret) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrapGet = tc->extOpcode; + xXTrapGetReq *reqptr; + xXTrapGetAvailReply rep; + int numlongs = (SIZEOF(xXTrapGetAvailReply) - + SIZEOF(xReply) + SIZEOF(CARD32) -1 ) / SIZEOF(CARD32); + LockDisplay(dpy); + GetReq(XTrapGet,reqptr); + reqptr->minor_opcode = XETrap_GetAvailable; + reqptr->protocol = XETrapProtocol; + status = _XReply(dpy,(xReply *)&rep,numlongs,xTrue); + SyncHandle(); + UnlockDisplay(dpy); + memcpy((char *)ret,&(rep.data),sizeof(XETrapGetAvailRep)); + return(status); +} + +/* should not be called directly by clients */ +static int XEConfigRequest(XETC *tc) +{ /* protocol changed between V3.1 and V3.2! */ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrapConfig = tc->extOpcode; + xXTrapConfigReq *reqptr; + if (tc->protocol == 31) + { /* hack to allocate the old request length */ + GetOldReq(XTrapConfig,reqptr,276); + } + else + { + GetReq(XTrapConfig,reqptr); + } + reqptr->minor_opcode = XETrap_Config; + + memcpy((char *)reqptr->config_flags_valid, + (char *)tc->values.v.flags.valid,4); + memcpy((char *)reqptr->config_flags_data, + (char *)tc->values.v.flags.data,4); + memcpy((char *)reqptr->config_flags_req, + (char *)tc->values.v.flags.req,XETrapMaxRequest); + memcpy((char *)reqptr->config_flags_event, + (char *)tc->values.v.flags.event,XETrapMaxEvent); + reqptr->config_max_pkt_size=tc->values.v.max_pkt_size; + reqptr->config_cmd_key=tc->values.v.cmd_key; + + XFlush(dpy); + SyncHandle(); + tc->dirty = 0L; /* Configuration is no longer dirty */ + return(status); +} + +/* Flush out any pending configuration */ +int XEFlushConfig(XETC *tc) +{ + return((tc->dirty) ? XEConfigRequest(tc) : True); +} +int XEResetRequest(XETC *tc) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrap = tc->extOpcode; + xXTrapReq *reqptr; + status = XEFlushConfig(tc); /* Flushout any pending configuration first */ + if (status == True) + { + GetReq(XTrap,reqptr); + reqptr->minor_opcode = XETrap_Reset; + XFlush(dpy); + SyncHandle(); + } + return(status); +} + + +int XEGetLastInpTimeRequest(XETC *tc, XETrapGetLastInpTimeRep *ret) +{ /* this was broken in V3.1! */ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrap = tc->extOpcode; + xXTrapReq *reqptr; + xXTrapGetLITimReply rep; + int numlongs = (SIZEOF(xXTrapGetLITimReply) - + SIZEOF(xReply) + SIZEOF(CARD32) - 1) / SIZEOF(CARD32); + LockDisplay(dpy); + GetReq(XTrap,reqptr); + reqptr->minor_opcode = XETrap_GetLastInpTime; + status = _XReply(dpy,(xReply *)&rep,numlongs,xTrue); + SyncHandle(); + UnlockDisplay(dpy); + + ret->last_time=rep.data_last_time; + + return(status); +} + +int XEStartTrapRequest(XETC *tc) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrap = tc->extOpcode; + xXTrapReq *reqptr; + status = XEFlushConfig(tc); /* Flushout any pending configuration first */ + if (status == True) + { + /* Add our event handler for the XLib transport */ + XETrapSetEventHandler(tc, XETrapData, XETrapDispatchXLib); + GetReq(XTrap,reqptr); + reqptr->minor_opcode = XETrap_StartTrap; + XFlush(dpy); + SyncHandle(); + BitTrue(tc->values.tc_flags, XETCTrapActive); + } + return(status); +} +int XEStopTrapRequest(XETC *tc) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrap = tc->extOpcode; + xXTrapReq *reqptr; + status = XEFlushConfig(tc); /* Flushout any pending configuration first */ + if (status == True) + { + GetReq(XTrap,reqptr); + reqptr->minor_opcode = XETrap_StopTrap; + XFlush(dpy); + SyncHandle(); + BitFalse(tc->values.tc_flags, XETCTrapActive); + /* Remove our event handler for the XLib transport */ + XETrapSetEventHandler(tc, XETrapData, NULL); + } + + return(status); +} + +#ifndef _XINPUT +int XESimulateXEventRequest(XETC *tc, CARD8 type, CARD8 detail, + CARD16 x, CARD16 y, CARD8 screen) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrapInput = tc->extOpcode; + xXTrapInputReq *reqptr; + status = XEFlushConfig(tc); /* Flushout any pending configuration first */ + if (status == True) + { /* write out the input event */ + GetReq(XTrapInput,reqptr); + reqptr->minor_opcode = XETrap_SimulateXEvent; + reqptr->input.type = type; + reqptr->input.detail = detail; + reqptr->input.x = x; + reqptr->input.y = y; + reqptr->input.screen = screen; + XFlush(dpy); + } + return(status); +} +#endif +int XEGetCurrentRequest(XETC *tc, XETrapGetCurRep *ret) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrap = tc->extOpcode; + xXTrapReq *reqptr; + xXTrapGetCurReply rep; + int numlongs = (SIZEOF(xXTrapGetCurReply) - + SIZEOF(xReply) + SIZEOF(CARD32) -1 ) / SIZEOF(CARD32); + status = XEFlushConfig(tc); /* Flushout any pending configuration first */ + if (status == True) + { + LockDisplay(dpy); + GetReq(XTrap,reqptr); + reqptr->minor_opcode = XETrap_GetCurrent; + /* to support comm. w/ V3.1 extensions */ + if (tc->protocol == 31) + { + char tmp[284]; /* need space for the big *old* reply */ + numlongs = (284-sizeof(xReply)+sizeof(long)-1)/sizeof(long); + status = _XReply(dpy,(xReply *)tmp,numlongs,xTrue); + memcpy(&rep,tmp,sizeof(rep)); /* move just what's needed */ + } + else + { + status = _XReply(dpy,(xReply *)&rep,numlongs,xTrue); + } + SyncHandle(); + UnlockDisplay(dpy); + + memcpy((char *)ret->state_flags,rep.data_state_flags,2); + memcpy((char *)ret->config.flags.valid,rep.data_config_flags_valid,4); + memcpy((char *)ret->config.flags.data,rep.data_config_flags_data,4); + memcpy((char *)ret->config.flags.req,rep.data_config_flags_req, + XETrapMaxRequest); + memcpy((char *)ret->config.flags.event,rep.data_config_flags_event, + XETrapMaxEvent); + ret->config.max_pkt_size=rep.data_config_max_pkt_size; + ret->config.cmd_key=rep.data_config_cmd_key; + + } + return(status); +} + +int XEGetStatisticsRequest(XETC *tc, XETrapGetStatsRep *ret) +{ + int status = True; + Display *dpy = tc->dpy; + CARD32 X_XTrap = tc->extOpcode; + xXTrapReq *reqptr; + xXTrapGetStatsReply rep; + status = XEFlushConfig(tc); /* Flushout any pending configuration first */ + if (status == True) + { + LockDisplay(dpy); + GetReq(XTrap,reqptr); + reqptr->minor_opcode = XETrap_GetStatistics; + /* to support comm. w/ V3.1 extensions */ +#ifndef CRAY + if (tc->protocol == 31) + { /* this is the way we used to do it which breaks Cray's */ +#ifndef VECTORED_EVENTS + int numlongs = (1060-sizeof(xReply)+sizeof(long)-1)/sizeof(long); +#else + int numlongs = (1544-sizeof(xReply)+sizeof(long)-1)/sizeof(long); +#endif + status = _XReply(dpy,(xReply *)&rep,numlongs,xTrue); + if (status == True) + { /* need to shift it back into the data struct */ + xXTrapGetStatsReply tmp; + tmp = rep; + memcpy(&(rep.data),&(tmp.pad0), sizeof(rep.data)); + } + } + else +#endif /* CRAY */ + { /* this is the way we do it for V3.2 */ + int numbytes = SIZEOF(xXTrapGetStatsReply) - SIZEOF(xReply); + status = _XReply(dpy, (xReply *)&rep, 0, xFalse); + if (status == True) + { + status = _XRead(dpy, (char *)&rep.data, numbytes); + } + } + SyncHandle(); + UnlockDisplay(dpy); + memcpy(ret,&(rep.data),sizeof(XETrapGetStatsRep)); + } + return(status); +} Index: xc/lib/XTrap/XEStrMap.c diff -u /dev/null xc/lib/XTrap/XEStrMap.c:1.2 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XEStrMap.c Wed Nov 7 23:00:12 2001 @@ -0,0 +1,284 @@ +/* $XFree86: xc/lib/XTrap/XEStrMap.c,v 1.2 2001/11/08 04:00:12 tsi Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1994 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +#include +#include +#include +#include + +static char *eventName[] = { + "", "", + "KeyPress", "KeyRelease", "ButtonPress", + "ButtonRelease", "MotionNotify", "EnterNotify", + "LeaveNotify", "FocusIn", "FocusOut", + "KeymapNotify", "Expose", "GraphicsExpose", + "NoExpose", "VisibilityNotify", "CreateNotify", + "DestroyNotify", "UnmapNotify", "MapNotify", + "MapRequest", "ReparentNotify", "ConfigureNotify", + "ConfigureRequest", "GravityNotify", "ResizeRequest", + "CirculateNotify", "CirculateRequest", "PropertyNotify", + "SelectionClear", "SelectionRequest", "SelectionNotify", + "ColormapNotify", "ClientMessage", "MappingNotify", + "LASTEvent", +}; + +static char *requestName[] = { + "Invalid", + "X_CreateWindow", "X_ChangeWindowAttributes", + "X_GetWindowAttributes", "X_DestroyWindow", + "X_DestroySubwindows", "X_ChangeSaveSet", + "X_ReparentWindow", "X_MapWindow", + "X_MapSubwindows", "X_UnmapWindow", + "X_UnmapSubwindows", "X_ConfigureWindow", + "X_CirculateWindow", "X_GetGeometry", + "X_QueryTree", "X_InternAtom", + "X_GetAtomName", "X_ChangeProperty", + "X_DeleteProperty", "X_GetProperty", + "X_ListProperties", "X_SetSelectionOwner", + "X_GetSelectionOwner", "X_ConvertSelection", + "X_SendEvent", "X_GrabPointer", + "X_UngrabPointer", "X_GrabButton", + "X_UngrabButton", "X_ChangeActivePointerGrab", + "X_GrabKeyboard", "X_UngrabKeyboard", + "X_GrabKey", "X_UngrabKey", + "X_AllowEvents", "X_GrabServer", + "X_UngrabServer", "X_QueryPointer", + "X_GetMotionEvents", "X_TranslateCoords", + "X_WarpPointer", "X_SetInputFocus", + "X_GetInputFocus", "X_QueryKeymap", + "X_OpenFont", "X_CloseFont", + "X_QueryFont", "X_QueryTextExtents", + "X_ListFonts", "X_ListFontsWithInfo", + "X_SetFontPath", "X_GetFontPath", + "X_CreatePixmap", "X_FreePixmap", + "X_CreateGC", "X_ChangeGC", + "X_CopyGC", "X_SetDashes", + "X_SetClipRectangles", "X_FreeGC", + "X_ClearArea", "X_CopyArea", + "X_CopyPlane", "X_PolyPoint", + "X_PolyLine", "X_PolySegment", + "X_PolyRectangle", "X_PolyArc", + "X_FillPoly", "X_PolyFillRectangle", + "X_PolyFillArc", "X_PutImage", + "X_GetImage", "X_PolyText8", + "X_PolyText16", "X_ImageText8", + "X_ImageText16", "X_CreateColormap", + "X_FreeColormap", "X_CopyColormapAndFree", + "X_InstallColormap", "X_UninstallColormap", + "X_ListInstalledColormaps", "X_AllocColor", + "X_AllocNamedColor", "X_AllocColorCells", + "X_AllocColorPlanes", "X_FreeColors", + "X_StoreColors", "X_StoreNamedColor", + "X_QueryColors", "X_LookupColor", + "X_CreateCursor", "X_CreateGlyphCursor", + "X_FreeCursor", "X_RecolorCursorSize", + "X_QueryBestSize", "X_QueryExtension", + "X_ListExtensions", "X_ChangeKeyboardMapping", + "X_GetKeyboardMapping", "X_ChangeKeyboardControl", + "X_GetKeyboardControl", "X_Bell", + "X_ChangePointerControl", "X_GetPointerControl", + "X_SetScreenSaver", "X_GetScreenSaver", + "X_ChangeHosts", "X_ListHosts", + "X_SetAccessControl", "X_SetCloseDownMode", + "X_KillClient", "X_RotateProperties", + "X_ForceScreenSaver", "X_SetPointerMapping", + "X_GetPointerMapping", "X_SetModifierMapping", + "X_GetModifierMapping", "Invalid", + "Invalid", "Invalid", + "Invalid", "Invalid", + "Invalid", "Invalid", + "X_NoOperation", +}; + +typedef struct +{ + char *extName; + int extEvent; +} _extensionData; +_extensionData *extensionData; +int numExtension = -1; + +static struct _pf_tbl {CARD32 id; char *str;} pf_tbl[] = +{ + {PF_Apollo, "Apollo"}, + {PF_ATT, "ATT"}, + {PF_Cray1, "Cray1"}, + {PF_Cray2, "Cray2"}, + {PF_DECUltrix, "DECUltrix"}, + {PF_DECVMS, "DECVMS"}, + {PF_DECELN, "DECELN"}, + {PF_DECOSF1, "DECOSF1"}, + {PF_DECVT1000, "DECVT1000"}, + {PF_DECXTerm, "DECXTerm"}, + {PF_HP9000s800, "HP9000s800"}, + {PF_HP9000s300, "HP9000s300"}, + {PF_IBMAT, "IBMAT"}, + {PF_IBMRT, "IBMRT"}, + {PF_IBMPS2, "IBMPS2"}, + {PF_IBMRS, "IBMRS"}, + {PF_MacII, "MacII"}, + {PF_Pegasus, "Pegasus"}, + {PF_SGI, "SGI"}, + {PF_Sony, "Sony"}, + {PF_Sun3, "Sun3"}, + {PF_Sun386i, "Sun386i"}, + {PF_SunSparc, "SunSparc"}, + {PF_Other, "Other"} /* always the last one! */ +}; + +static char unknown[] = "unknown"; + +#define ASize(array) (sizeof(array)/sizeof((array)[0])) + +static INT16 _StringToID(register char *match, register char **strings, + INT16 nstrings) +{ + register INT16 id = nstrings; + + if (match && *match) + { while ((--id >= 0L) && (strcmp(match,strings[id]) != 0L)); } + else + { id = -1L; } + + return(id); +} +static void loadExtStrings(XETC *tc) +{ + char **extensionName=XListExtensions(tc->dpy,&numExtension); + if (numExtension) + { + int i; + extensionData = (_extensionData *)XtCalloc(numExtension, + sizeof(_extensionData)); + for (i = 0; i < numExtension; i++) + { /* Arrange extensions in opcode order */ + int opcode,event,error; + if (XQueryExtension(tc->dpy,extensionName[i],&opcode,&event, + &error)) + { + extensionData[opcode-128].extName = extensionName[i]; + extensionData[opcode-128].extEvent = event; + } + else + { /* This extension didn't load! Error! */ + extensionData[opcode-128].extName = "Invalid_Extension"; + } + } + XFreeExtensionList(extensionName); + } +} + +INT16 XEEventStringToID(register char *string) +{ + return(_StringToID(string,eventName,ASize(eventName))); +} + +INT16 XERequestStringToID(register char *string) +{ + return(_StringToID(string,requestName,ASize(requestName))); +} + +CARD32 XEPlatformStringToID(register char *string) +{ + struct _pf_tbl *ptr = &(pf_tbl[0]); + while(ptr->id != PF_Other) + { + if (!strncmp(ptr->str, string, strlen(ptr->str))) + { + return(ptr->id); + } + ptr++; + } + return((!strncmp(ptr->str,string,strlen(ptr->str))) ? ptr->id : -1L); +} + +char *XEEventIDToString(register CARD8 id, XETC *tc) +{ + int i; + if (id < ASize(eventName)) + return(eventName[id]); + /* either erroneous or an extension event */ + if (numExtension < 0) + { /* + * This is unfortunate, but necessary. The client + * program has requested the string identifier for + * an extension request/event. Since there's no Xlib + * equivalent for this, we have to query *all* the + * extensions looking for a match. Chances are + * if a client wants one, it'll want them all, + * so just go through and initialize the extension + * list once. + */ + loadExtStrings(tc); + } + /* Find id within extensionData */ + for (i=0; i=0 && extid < numExtension) ? + extensionData[extid].extName : unknown); +} + + +char *XERequestIDToString(register CARD8 id, XETC *tc) +{ + return((id < ASize(requestName)) ? requestName[id] : + XERequestIDToExtString(id,tc)); +} + +char *XEPlatformIDToString(register CARD32 id) +{ + struct _pf_tbl *ptr = &(pf_tbl[0]); + while((ptr->id != PF_Other) || (id == ptr->id)) + { + if (id == ptr->id) + { + return(ptr->str); + } + ptr++; + } + return(unknown); +} Index: xc/lib/XTrap/XETrapInit.c diff -u /dev/null xc/lib/XTrap/XETrapInit.c:1.2 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XETrapInit.c Wed Nov 7 23:00:12 2001 @@ -0,0 +1,218 @@ +/* $XFree86: xc/lib/XTrap/XETrapInit.c,v 1.2 2001/11/08 04:00:12 tsi Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1992 by Digital Equipment Corp., +Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +#define NEED_EVENTS +#define NEED_REPLIES + +#include +#include +#include +#include +#include + +#ifndef XETrapNumberErrors +#define XETrapNumberErrors 0 +#endif + +#ifdef UWS40 +#define _XSetLastRequestRead _SetLastRequestRead +#endif +#ifndef vms +extern unsigned long _XSetLastRequestRead(Display *dpy, xGenericReply *rep); +#else +static unsigned long _XSetLastRequestRead(Display *dpy, xGenericReply *rep); +#endif + +static XExtensionInfo *xtrap_info = NULL; +static /* const */ char *xtrap_extension_name = XTrapExtName; + +#define XTrapCheckExtension(dpy,i,val) \ + XextCheckExtension(dpy, i, xtrap_extension_name, val) +#define XTrapSimpleCheckExtension(dpy,i) \ + XextSimpleCheckExtension(dpy, i, xtrap_extension_name) + +static XEXT_CLOSE_DISPLAY_PROTO(close_display); +static Bool wire_to_event(Display *dpy, XEvent *event, xEvent *wire_ev); +static Status event_to_wire(Display *dpy, XEvent *event, xEvent *wire_ev); + +#ifdef X11R3 +static int error_string(); +#else +static XEXT_ERROR_STRING_PROTO(error_string); +#endif +static /* const */ XExtensionHooks xtrap_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + wire_to_event, /* wire_to_event */ + event_to_wire, /* event_to_wire */ + NULL, /* error */ + error_string /* error_string */ +}; + +static /* const */ char *xtrap_error_list[] = { + "BadTransport (I/O transport not available)", + "BadMailbox (Cannot connect/disconnect to mailbox)", + "BadIO (I/O error while reading/writing in extension)", + "BadHostname (Cannot locate requested host)", + "BadStatistics (Statistics not configured/available)", + "BadDevices (Devices not properly vectored)", + "BadSocket (Cannot connect to INTERNET socket)", + "BadScreen (Cannot send event to given screen)", + "BadSwapReq (Cannot trap extension requests for swapped client)", +}; + +static XEXT_GENERATE_FIND_DISPLAY (find_display, xtrap_info, + xtrap_extension_name, + &xtrap_extension_hooks, + XETrapNumberEvents, NULL) + +static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xtrap_info) + +static XEXT_GENERATE_ERROR_STRING (error_string, xtrap_extension_name, + XETrapNumErrors, xtrap_error_list) + +static Bool event_to_wire(Display *dpy, XEvent *libevent, xEvent *netevent) +{ + Bool status = False; + XExtDisplayInfo *info = find_display(dpy); + + XTrapCheckExtension(dpy,info,False); + + /* If we had more then one event */ +#if XETrapNumberErrors > 1 + switch((netevent->u.u.type & 0x7f) - info->codes->first_event) + { case XETrapData: +#endif + { + XETrapDataEvent *ev = (XETrapDataEvent *) libevent; + xETrapDataEvent *event = (xETrapDataEvent *) netevent; + + event->type = ev->type; + event->detail = ev->detail; + event->sequenceNumber = (ev->serial & 0xFFFF); + event->idx = ev->idx; + (void)memcpy(event->data,ev->data,sizeof(event->data)); + status = True; + } +#if XETrapNumberErrors > 1 + } +#endif + return(status); +} + +static Bool wire_to_event(Display *dpy, XEvent *libevent, xEvent *netevent) +{ + Bool status = False; + XExtDisplayInfo *info = find_display(dpy); + + XTrapCheckExtension(dpy,info,False); + + /* If we had more then one event */ +#if XETrapNumberErrors > 1 + switch((netevent->u.u.type & 0x7f) - info->codes->first_event) + { case XETrapData: +#endif + { + XETrapDataEvent *ev = (XETrapDataEvent *) libevent; + xETrapDataEvent *event = (xETrapDataEvent *) netevent; + + ev->type = event->type & 0x7F; + ev->detail = event->detail; + ev->serial = _XSetLastRequestRead(dpy,(xGenericReply *)netevent); + ev->synthetic = ((event->type & 0x80) != 0); + ev->display = dpy; + ev->idx = event->idx; + (void)memcpy(ev->data,event->data,sizeof(ev->data)); + status = True; + } +#if XETrapNumberErrors > 1 + } +#endif + return(status); +} + +/* + * XETrapQueryExtension - + * Returns True if the DEC-XTRAP extension is available + * on the given display. If the extension exists, the value of the + * first event code is stored into event_base and the value of the first + * error code is stored into error_base. + */ +Bool XETrapQueryExtension(Display *dpy,INT32 *event_base_return, + INT32 *error_base_return, INT32 *opcode_return) +{ + Bool status = True; + XExtDisplayInfo *info = find_display (dpy); + + if (XextHasExtension (info)) + { + *event_base_return = (INT32)(info->codes->first_event); + *error_base_return = (INT32)(info->codes->first_error); + *opcode_return = (INT32)(info->codes->major_opcode); + } + else + { + status = False; + } + return(status); +} + +#ifdef vms +/* Hard-coded since this didn't make it into XLibShr's xfer vector */ +/* From [.XLIBEL.SRC]XLibInt.c in VMS Source Pool */ +unsigned long _XSetLastRequestRead(Display *dpy, xGenericReply *rep) +{ + register unsigned long newseq, lastseq; + + /* + * KeymapNotify has no sequence number, but is always guaranteed + * to immediately follow another event, except when generated via + * SendEvent (hmmm). + */ + if ((rep->type & 0x7f) == KeymapNotify) + return(dpy->last_request_read); + + newseq = (dpy->last_request_read & ~((unsigned long)0xffff)) | + rep->sequenceNumber; + lastseq = dpy->last_request_read; + while (newseq < lastseq) { + newseq += 0x10000; + if (newseq > dpy->request) { + (void) fprintf (stderr, + "Xlib: sequence lost (0x%lx > 0x%lx) in reply type 0x%x!\n", + newseq, dpy->request, + (unsigned int) rep->type); + newseq -= 0x10000; + break; + } + } + + dpy->last_request_read = newseq; + return(newseq); +} +#endif + Index: xc/lib/XTrap/XEWrappers.c diff -u /dev/null xc/lib/XTrap/XEWrappers.c:1.1 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XEWrappers.c Fri Nov 2 18:29:27 2001 @@ -0,0 +1,329 @@ +/* $XFree86: xc/lib/XTrap/XEWrappers.c,v 1.1 2001/11/02 23:29:27 dawes Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., +Maynard, MA +X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*****************************************************************************/ +#include +#include +#include +#ifdef vms +#define IS_AT_OR_AFTER(t1, t2) (((t2).high > (t1).high) \ + || (((t2).high == (t1).high)&& ((t2).low >= (t1).low))) +typedef struct _vms_time { + unsigned long low; + unsigned long high; +}vms_time; /* from IntrinsicP.h */ +#ifdef VMSDW_V3 +typedef struct _ModToKeysymTable { + Modifiers mask; + int count; + int index; +} ModToKeysymTable; /* from TranslateI.h */ +typedef struct _ConverterRec **ConverterTable; /* from ConvertI.h */ +#include "libdef.h" +typedef struct _CallbackRec *CallbackList; /* from CallbackI.h */ +typedef struct _XtGrabRec *XtGrabList; /* from EventI.h */ +#include "PassivGraI.h" +#include "InitialI.h" +#else /* VMSDW_V3 */ +typedef struct _ModToKeysymTable { + Modifiers mask; + int count; + int index; +} ModToKeysymTable; /* from TranslateI.h */ +typedef struct _ConverterRec **ConverterTable; /* from ConvertI.h */ +#include "libdef.h" +#define NFDBITS (sizeof(fd_mask) * 8) +typedef long fd_mask; +#ifndef howmany +#define howmany(x, y) (((x)+((y)-1))/(y)) +#endif /* howmany */ +typedef struct Fd_set { + fd_mask fds_bits[howmany(256, NFDBITS)]; +} Fd_set; /* from fd.h */ +#include "InitializeI.h" +#endif /* VMSDW_V3 */ +#else /* !vms */ +#include "IntrinsicI.h" +#define IS_AT_OR_AFTER(t1, t2) (((t2).tv_sec > (t1).tv_sec) \ + || (((t2).tv_sec == (t1).tv_sec)&& ((t2).tv_usec >= (t1).tv_usec))) +#endif /* vms */ + +/* The following has been lifted from NextEvent.c in X11R4 */ + +#ifndef NEEDS_NTPD_FIXUP +# ifdef sun +# define NEEDS_NTPD_FIXUP 1 +# else +# define NEEDS_NTPD_FIXUP 0 +# endif +#endif + +#if NEEDS_NTPD_FIXUP +#define FIXUP_TIMEVAL(t) { \ + while ((t).tv_usec >= 1000000) { \ + (t).tv_usec -= 1000000; \ + (t).tv_sec++; \ + } \ + while ((t).tv_usec < 0) { \ + if ((t).tv_sec > 0) { \ + (t).tv_usec += 1000000; \ + (t).tv_sec--; \ + } else { \ + (t).tv_usec = 0; \ + break; \ + } \ + }} +#else +#define FIXUP_TIMEVAL(t) +#endif /*NEEDS_NTPD_FIXUP*/ + + +/* The following code is required for the use of the XLIB transport of XTrap + * events. This is in line with what MIT wants to see proper extension + * implementations do, as compared to using one of the core input event masks. + */ + +Boolean (*XETrapGetEventHandler(XETC *tc, CARD32 id))(XETrapDataEvent *event, XETC *tc) +{ + return((id < XETrapNumberEvents) ? tc->eventFunc[id] : NULL); +} + +Boolean (*XETrapSetEventHandler(XETC *tc, CARD32 id, + Boolean (*pfunc)(XETrapDataEvent *event, XETC *tc)))(XETrapDataEvent *event, XETC *tc) +{ + register Boolean (*rfunc)(XETrapDataEvent *event, XETC *tc) = NULL; + + if (id < XETrapNumberEvents) + { + rfunc = XETrapGetEventHandler(tc,id); + tc->eventFunc[id] = pfunc; + } + return(rfunc); +} + +Boolean XETrapDispatchEvent(XEvent *pevent, XETC *tc) +{ + Boolean status = False; + register CARD32 id = pevent->type; + register CARD32 firstEvent = tc->eventBase; + register CARD32 lastEvent = tc->eventBase + XETrapNumberEvents - 1L; + + /* If it is our extension event, handle it specially, otherwise, pass + * it off to Xt. + */ + if (firstEvent != 0 && id >= firstEvent && id <= lastEvent) + { + /* We may be ignoring the event */ + if (tc->eventFunc[id - firstEvent] != NULL) + { + status = (*tc->eventFunc[id - firstEvent])((XETrapDataEvent*)pevent,tc); + } + } + else + { + status = XtDispatchEvent(pevent); + } + return(status); +} + +XtInputMask XETrapAppPending(XtAppContext app) +{ + TimerEventRec *te_ptr; +#ifndef VMS + struct timeval cur_time; +#else /* vms */ + vms_time cur_time; + long efnMask = 0L; + int status; +#endif /* vms */ + XtInputMask retmask = XtAppPending(app); /* Prime XtIMEvent */ + + retmask &= ~(XtIMTimer | XtIMAlternateInput); /* clear timer & input */ + /* Now test for timer */ + te_ptr = app->timerQueue; + while (te_ptr != NULL) + { +#ifndef vms + (void)gettimeofday(&cur_time, NULL); + FIXUP_TIMEVAL(cur_time); +#else + sys$gettim(&cur_time); +#endif /* vms */ + if (IS_AT_OR_AFTER(te_ptr->te_timer_value, cur_time)) + { /* this timer is due to fire */ + retmask |= XtIMTimer; + break; + } + te_ptr = te_ptr->te_next; + } + + /* Now test for alternate input */ +#ifndef vms + if (app->outstandingQueue != NULL) + { + retmask |= XtIMAlternateInput; + } +#else /* vms */ + if ((app->Input_EF_Mask != 0L) && ((status=SYS$READEF(1,&efnMask)) == 1)) + { /* we have input configured & retrieved the efn cluster 0 */ + efnMask &= app->Input_EF_Mask; /* mask out non-input */ + if (efnMask) /* any left? */ + { /* yes, an alt-input efn is set */ + retmask |= XtIMAlternateInput; + } + } +#endif /* vms */ + return(retmask); +} + +void XETrapAppMainLoop(XtAppContext app, XETC *tc) +{ + XEvent event; + XtInputMask imask; + + while (1) + { + imask = XETrapAppPending(app); + /* Check to see what's going on so that we don't block + * in either NextEvent or ProcessEvent since neither + * of these routines can correctly deal with XTrap Events + */ + if (imask & XtIMXEvent) + { + (void)XtAppNextEvent(app,&event); + (void)XETrapDispatchEvent(&event,tc); + } + else if (imask & (XtIMTimer | XtIMAlternateInput)) + { + XtAppProcessEvent(app, (XtIMTimer | XtIMAlternateInput)); + } + else + { /* Nothing going on, so we need to block */ + (void)XETrapWaitForSomething(app); + } + } +} + +int XETrapAppWhileLoop(XtAppContext app, XETC *tc, Bool *done) +{ + XEvent event; + XtInputMask imask; + int status = True; + + if(done) + { + while (!(*done)) + { + imask = XETrapAppPending(app); + /* Check to see what's going on so that we don't block + * in either NextEvent or ProcessEvent since neither + * of these routines can correctly deal with XTrap Events + */ + if (imask & XtIMXEvent) + { + (void)XtAppNextEvent(app, &event); + (void)XETrapDispatchEvent(&event,tc); + } + else if (imask & (XtIMTimer | XtIMAlternateInput)) + { + XtAppProcessEvent(app, (XtIMTimer | XtIMAlternateInput)); + } + else + { /* Nothing going on, so we need to block */ + (void)XETrapWaitForSomething(app); + } + } + } + else + { + status = False; + } + return(status); +} + +/* Wait for either Timer, Alternate Input, or an X Event to arrive */ +int XETrapWaitForSomething(XtAppContext app) +{ +#ifndef vms +#ifndef X11R5 + return(_XtWaitForSomething(app, FALSE, FALSE, FALSE, FALSE, TRUE +#ifdef XTHREADS + , FALSE +#endif /* XTHREADS */ + , 0L)); +#else /* X11R5 */ + return(_XtwaitForSomething(FALSE, FALSE, FALSE, TRUE, 0L, app)); +#endif /* X11R5 */ +#else /* vms */ +#define IS_AFTER(t1,t2) (((t2).high > (t1).high) \ + ||(((t2).high == (t1).high)&& ((t2).low > (t1).low))) + long retval = 0L; + TimerEventRec *te_ptr; + vms_time cur_time,result_time; + int status = 0; + long quotient, remainder = 0; + int d; + + if (app->timerQueue!= NULL) + { /* check timeout queue */ + cur_time.low = cur_time.high = result_time.low = result_time.high = 0; + te_ptr = app->timerQueue; + sys$gettim(&cur_time); + if ((IS_AFTER(app->timerQueue->te_timer_value, cur_time)) && + (app->timerQueue->te_proc != 0)) + { /* it's fired! return! */ + return(0); + } + /* Jump through hoops to get the time specified in the queue into + * milliseconds + */ + status = lib$sub_times (&(te_ptr->te_timer_value.low), &cur_time, + &result_time); + /* + * See if this timer has expired. A timer is considered expired + * if it's value in the past (the NEGTIM case) or if there is + * less than one integral milli second before it would go off. + */ + + if (status == LIB$_NEGTIM || + (result_time.high == -1 && result_time.low > -10000)) + { /* We've got a timer and it's ready to fire! */ + return(0); + } + else if ((status & 1) == 1) + { + lib$ediv (&(10000), &result_time, "ient, &remainder); + quotient *= -1; /* flip the sign bit */ + + return(XMultiplexInput(app->count, &(app->list[0L]), + app->Input_EF_Mask, quotient, 0L, &retval)); + } + else + { + status = -1; + } + } + + return((status == -1 ? -1 : XMultiplexInput(app->count, &(app->list[0L]), + app->Input_EF_Mask, 0L, 0L, &retval))); +#endif /* vms */ +} Index: xc/lib/XTrap/XTrap-def.cpp diff -u /dev/null xc/lib/XTrap/XTrap-def.cpp:1.1 --- /dev/null Fri Jan 18 15:23:17 2002 +++ xc/lib/XTrap/XTrap-def.cpp Thu Nov 15 07:56:17 2001 @@ -0,0 +1,76 @@ +/* $XFree86: xc/lib/XTrap/XTrap-def.cpp,v 1.1 2001/11/15 12:56:17 alanh Exp $ */ +LIBRARY XTrap +VERSION LIBRARY_VERSION +EXPORTS + XEAddEventCB + XEAddEventCBs + XEAddRequestCB + XEAddRequestCBs + XERemoveAllEventCBs + XERemoveAllRequestCBs + XERemoveEventCB + XERemoveEventCBs + XERemoveRequestCB + XERemoveRequestCBs + XEChangeTC + XECreateTC + XEFreeTC + XESetCmdGateState + XETrapSetColorReplies + XETrapSetCommandKey + XETrapSetCursor + XETrapSetEvents + XETrapSetGrabServer + XETrapSetMaxPacket + XETrapSetRequests + XETrapSetStatistics + XETrapSetTimestamps + XETrapSetWinXY + XETrapSetXInput + XETrapDispatchXLib + XEPrintAvail + XEPrintAvailFlags + XEPrintAvailPktSz + XEPrintCfgFlags + XEPrintCmdKey + XEPrintCurPktSz + XEPrintCurXY + XEPrintCurrent + XEPrintEvents + XEPrintEvtStats + XEPrintLastTime + XEPrintMajOpcode + XEPrintPlatform + XEPrintRelease + XEPrintReqStats + XEPrintRequests + XEPrintStateFlags + XEPrintStatistics + XEPrintTkFlags + XEPrintTkRelease + XEPrintTkState + XEFlushConfig + XEGetAvailableRequest + XEGetCurrentRequest + XEGetLastInpTimeRequest + XEGetStatisticsRequest + XEGetVersionRequest + XEResetRequest + XESimulateXEventRequest + XEStartTrapRequest + XEStopTrapRequest + XEEventIDToString + XEEventStringToID + XEPlatformIDToString + XEPlatformStringToID + XERequestIDToExtString + XERequestIDToString + XERequestStringToID + XETrapQueryExtension + XETrapAppMainLoop + XETrapAppPending + XETrapAppWhileLoop + XETrapDispatchEvent + XETrapGetEventHandler + XETrapSetEventHandler + XETrapWaitForSomething Index: xc/lib/Xau/AuDispose.c diff -u xc/lib/Xau/AuDispose.c:1.3 xc/lib/Xau/AuDispose.c:1.5 --- xc/lib/Xau/AuDispose.c:1.3 Wed Jan 17 14:42:23 2001 +++ xc/lib/Xau/AuDispose.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuDispose.c,v 1.3 2000/08/17 19:45:28 cpqbld Exp $ */ +/* $Xorg: AuDispose.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,15 +25,10 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuDispose.c,v 1.3 2001/01/17 19:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuDispose.c,v 1.5 2001/12/14 19:54:36 dawes Exp $ */ #include - -#ifdef X_NOT_STDC_ENV -extern void free(); -#else #include -#endif void XauDisposeAuth (auth) Index: xc/lib/Xau/AuFileName.c diff -u xc/lib/Xau/AuFileName.c:3.5 xc/lib/Xau/AuFileName.c:3.7 --- xc/lib/Xau/AuFileName.c:3.5 Wed Jan 17 14:42:23 2001 +++ xc/lib/Xau/AuFileName.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuFileName.c,v 1.4 2000/08/17 19:45:28 cpqbld Exp $ */ +/* $Xorg: AuFileName.c,v 1.5 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,16 +25,11 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuFileName.c,v 3.5 2001/01/17 19:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuFileName.c,v 3.7 2001/12/14 19:54:36 dawes Exp $ */ #include #include - -#ifdef X_NOT_STDC_ENV -char *malloc (), *getenv (); -#else #include -#endif char * XauFileName () Index: xc/lib/Xau/AuGetAddr.c diff -u xc/lib/Xau/AuGetAddr.c:1.4 xc/lib/Xau/AuGetAddr.c:1.5 --- xc/lib/Xau/AuGetAddr.c:1.4 Wed Jan 17 14:42:23 2001 +++ xc/lib/Xau/AuGetAddr.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuGetAddr.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: AuGetAddr.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuGetAddr.c,v 1.4 2001/01/17 19:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuGetAddr.c,v 1.5 2001/12/14 19:54:36 dawes Exp $ */ #include #include Index: xc/lib/Xau/AuGetBest.c diff -u xc/lib/Xau/AuGetBest.c:1.4 xc/lib/Xau/AuGetBest.c:1.7 --- xc/lib/Xau/AuGetBest.c:1.4 Wed Jan 17 14:42:23 2001 +++ xc/lib/Xau/AuGetBest.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuGetBest.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: AuGetBest.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuGetBest.c,v 1.4 2001/01/17 19:42:23 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuGetBest.c,v 1.7 2001/12/14 19:54:36 dawes Exp $ */ #include #include @@ -100,7 +104,9 @@ #ifdef hpux if (family == FamilyLocal) { +#ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; +#endif struct hostent *hostp; /* make sure we try fully-qualified hostname */ Index: xc/lib/Xau/AuLock.c diff -u xc/lib/Xau/AuLock.c:3.3 xc/lib/Xau/AuLock.c:3.5 --- xc/lib/Xau/AuLock.c:3.3 Wed Jan 17 14:42:24 2001 +++ xc/lib/Xau/AuLock.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuLock.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: AuLock.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,20 +25,14 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuLock.c,v 3.3 2001/01/17 19:42:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuLock.c,v 3.5 2001/12/14 19:54:36 dawes Exp $ */ #include #include #include #include -#if defined(X_NOT_STDC_ENV) -extern int errno; -#define Time_t long -extern Time_t time (); -#else #include #define Time_t time_t -#endif #ifndef X_NOT_POSIX #include #else Index: xc/lib/Xau/AuRead.c diff -u xc/lib/Xau/AuRead.c:1.4 xc/lib/Xau/AuRead.c:1.6 --- xc/lib/Xau/AuRead.c:1.4 Wed Jan 17 14:42:24 2001 +++ xc/lib/Xau/AuRead.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuRead.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: AuRead.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,16 +25,10 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuRead.c,v 1.4 2001/01/17 19:42:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuRead.c,v 1.6 2001/12/14 19:54:36 dawes Exp $ */ #include - -#ifdef X_NOT_STDC_ENV -extern void free(); -extern char *malloc(); -#else #include -#endif static int read_short (unsigned short *shortp, FILE *file) Index: xc/lib/Xau/AuUnlock.c diff -u xc/lib/Xau/AuUnlock.c:1.3 xc/lib/Xau/AuUnlock.c:1.4 --- xc/lib/Xau/AuUnlock.c:1.3 Wed Jan 17 14:42:24 2001 +++ xc/lib/Xau/AuUnlock.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuUnlock.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: AuUnlock.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuUnlock.c,v 1.3 2001/01/17 19:42:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuUnlock.c,v 1.4 2001/12/14 19:54:36 dawes Exp $ */ #include #include Index: xc/lib/Xau/AuWrite.c diff -u xc/lib/Xau/AuWrite.c:1.3 xc/lib/Xau/AuWrite.c:1.4 --- xc/lib/Xau/AuWrite.c:1.3 Wed Jan 17 14:42:24 2001 +++ xc/lib/Xau/AuWrite.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AuWrite.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: AuWrite.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xau/AuWrite.c,v 1.3 2001/01/17 19:42:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/AuWrite.c,v 1.4 2001/12/14 19:54:36 dawes Exp $ */ #include Index: xc/lib/Xau/Autest.c diff -u xc/lib/Xau/Autest.c:1.1.1.3 xc/lib/Xau/Autest.c:1.2 --- xc/lib/Xau/Autest.c:1.1.1.3 Tue Jan 16 17:14:57 2001 +++ xc/lib/Xau/Autest.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Autest.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: Autest.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xau/Xauth.h diff -u xc/lib/Xau/Xauth.h:1.4 xc/lib/Xau/Xauth.h:1.5 --- xc/lib/Xau/Xauth.h:1.4 Wed Jan 17 14:42:24 2001 +++ xc/lib/Xau/Xauth.h Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xauth.h,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: Xauth.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xau/Xauth.h,v 1.4 2001/01/17 19:42:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xau/Xauth.h,v 1.5 2001/12/14 19:54:36 dawes Exp $ */ #ifndef _Xauth_h #define _Xauth_h Index: xc/lib/Xau/k5encode.c diff -u xc/lib/Xau/k5encode.c:1.1.1.4 xc/lib/Xau/k5encode.c:1.2 --- xc/lib/Xau/k5encode.c:1.1.1.4 Tue Jan 16 17:15:05 2001 +++ xc/lib/Xau/k5encode.c Fri Dec 14 14:54:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: k5encode.c,v 1.3 2000/08/17 19:45:29 cpqbld Exp $ */ +/* $Xorg: k5encode.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xaw/Actions.c diff -u xc/lib/Xaw/Actions.c:3.15 xc/lib/Xaw/Actions.c:3.16 --- xc/lib/Xaw/Actions.c:3.15 Tue Sep 26 11:56:53 2000 +++ xc/lib/Xaw/Actions.c Mon Oct 29 23:56:38 2001 @@ -25,7 +25,7 @@ * XFree86 Project. */ -/* $XFree86: xc/lib/Xaw/Actions.c,v 3.15 2000/09/26 15:56:53 tsi Exp $ */ +/* $XFree86: xc/lib/Xaw/Actions.c,v 3.16 2001/10/30 04:56:38 paulo Exp $ */ #include #include @@ -275,6 +275,7 @@ /* '\\' may have been used to escape a resource name. */ + succed = True; info->value = info->parse_proc(info->widget, value, info->event, &succed) & 1; if (!succed) Index: xc/lib/Xaw/AllWidgets.c diff -u xc/lib/Xaw/AllWidgets.c:1.1.1.3 xc/lib/Xaw/AllWidgets.c:1.4 --- xc/lib/Xaw/AllWidgets.c:1.1.1.3 Tue Jan 16 17:15:09 2001 +++ xc/lib/Xaw/AllWidgets.c Fri Dec 14 14:54:38 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AllWidgets.c,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ +/* $Xorg: AllWidgets.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright (c) 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,6 +25,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xaw/AllWidgets.c,v 1.4 2001/12/14 19:54:38 dawes Exp $ */ #include #include @@ -31,9 +36,6 @@ extern WidgetClass asciiTextWidgetClass; extern WidgetClass boxWidgetClass; extern WidgetClass commandWidgetClass; -extern WidgetClass compositeWidgetClass; -extern WidgetClass constraintWidgetClass; -extern WidgetClass coreWidgetClass; extern WidgetClass dialogWidgetClass; extern WidgetClass formWidgetClass; extern WidgetClass gripWidgetClass; @@ -42,12 +44,10 @@ extern WidgetClass menuButtonWidgetClass; extern WidgetClass multiSinkObjectClass; extern WidgetClass multiSrcObjectClass; -extern WidgetClass objectClass; extern WidgetClass overrideShellWidgetClass; extern WidgetClass panedWidgetClass; extern WidgetClass pannerWidgetClass; extern WidgetClass portholeWidgetClass; -extern WidgetClass rectObjClass; extern WidgetClass repeaterWidgetClass; extern WidgetClass scrollbarWidgetClass; extern WidgetClass shellWidgetClass; Index: xc/lib/Xaw/AllWidgets.h diff -u xc/lib/Xaw/AllWidgets.h:1.1.1.3 xc/lib/Xaw/AllWidgets.h:1.2 --- xc/lib/Xaw/AllWidgets.h:1.1.1.3 Tue Jan 16 17:15:10 2001 +++ xc/lib/Xaw/AllWidgets.h Fri Dec 14 14:54:38 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: AllWidgets.h,v 1.4 2000/08/17 19:45:30 cpqbld Exp $ + * $Xorg: AllWidgets.h,v 1.5 2001/02/09 02:03:42 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xaw/AsciiSink.c diff -u xc/lib/Xaw/AsciiSink.c:1.23 xc/lib/Xaw/AsciiSink.c:1.27 --- xc/lib/Xaw/AsciiSink.c:1.23 Wed Jan 17 14:42:24 2001 +++ xc/lib/Xaw/AsciiSink.c Fri Jan 4 18:04:17 2002 @@ -1,10 +1,14 @@ -/* $Xorg: AsciiSink.c,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ +/* $Xorg: AsciiSink.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,9 +46,10 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSink.c,v 1.23 2001/01/17 19:42:24 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSink.c,v 1.27 2002/01/04 23:04:17 paulo Exp $ */ #include +#include #include #include #include @@ -206,7 +211,6 @@ { #ifndef OLDXAW AsciiSinkObjectClass cclass = (AsciiSinkObjectClass)wc; - TextSinkObjectClass super = (TextSinkObjectClass)cclass->object_class.superclass; XrmQuark record_type = XrmPermStringToQuark("TextSink"); TextSinkExt ext = cclass->text_sink_class.extension; @@ -443,6 +447,9 @@ XFontStruct *font; XawTextPaintStruct *paint; + if (!sink->ascii_sink.echo) + return; + /* pass 1: calculate ascent/descent values and x coordinate */ /* XXX the MAX ascent/descent value should be in the line table XXX */ /* XXX the x coordinate can be a parameter, but since it is required @@ -730,9 +737,12 @@ XmuScanline *scan; XmuSegment *seg; XawTextPaintList *list = sink->text_sink.paint; - XawTextPaintStruct *base, *head, *paint = list->paint; +#if 0 + XawTextPaintStruct *base, *head; +#endif + XawTextPaintStruct *paint = list->paint; XawTextProperty *property; - XFontStruct *font; + XFontStruct *font = NULL; XRectangle *rects; int n_rects, i_rects; GC gc; @@ -756,7 +766,8 @@ /* pass 2: optimize drawing list to avoid too much GC change requests */ /* XXX this assumes there will not exist entities drawn over other entities. */ - /*while (paint) { +#if 0 + while (paint) { base = paint; head = paint->next; while (head) { @@ -770,7 +781,8 @@ head = head->next; } paint = paint->next; - }*/ + } +#endif if (paint && paint->next) { XawTextPaintStruct **paints; int i = 0, n_paints = 0; @@ -1270,8 +1282,6 @@ TextWidget ctx = (TextWidget)XtParent(w); XawTextPosition position = XawTextGetInsertionPoint((Widget)ctx); Boolean overflow = (x & 0xffff8000) != 0; - GC gc; - int ascent; #ifndef OLDXAW XawTextAnchor *anchor; XawTextEntity *entity; @@ -1283,6 +1293,36 @@ XawTextBlock block; XawTextPosition selection_start, selection_end; Boolean has_selection; + + if (!sink->ascii_sink.echo) { + if (sink->ascii_sink.laststate != state) { + int width = CharWidth(sink, font, 0, ' ') - 1; + + x = ctx->text.margin.left; + y = ctx->text.margin.top; + font = sink->ascii_sink.font; + fheight = font->ascent + font->descent; + if (state == XawisOn) { + if (ctx->text.hasfocus) + XFillRectangle(XtDisplay(ctx), XtWindow(ctx), + sink->ascii_sink.xorgc, x, y, + width + 1, fheight + 1); + else + XDrawRectangle(XtDisplay(ctx), XtWindow(ctx), + sink->ascii_sink.xorgc, x, y, + width, fheight); + + } + else + _XawTextSinkClearToBackground(w, x, y, + width + 1, fheight + 1); + } + sink->ascii_sink.cursor_x = x; + sink->ascii_sink.cursor_y = y; + sink->ascii_sink.laststate = state; + return; + } + XawTextGetSelectionPos((Widget)ctx, &selection_start, &selection_end); has_selection = selection_start != selection_end; Index: xc/lib/Xaw/AsciiSink.h diff -u xc/lib/Xaw/AsciiSink.h:1.5 xc/lib/Xaw/AsciiSink.h:1.6 --- xc/lib/Xaw/AsciiSink.h:1.5 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/AsciiSink.h Fri Dec 14 14:54:38 2001 @@ -1,12 +1,16 @@ /* - * $Xorg: AsciiSink.h,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ + * $Xorg: AsciiSink.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSink.h,v 1.5 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSink.h,v 1.6 2001/12/14 19:54:38 dawes Exp $ */ #ifndef _XawAsciiSink_h #define _XawAsciiSink_h Index: xc/lib/Xaw/AsciiSinkP.h diff -u xc/lib/Xaw/AsciiSinkP.h:1.9 xc/lib/Xaw/AsciiSinkP.h:1.10 --- xc/lib/Xaw/AsciiSinkP.h:1.9 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/AsciiSinkP.h Fri Dec 14 14:54:38 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: AsciiSinkP.h,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ +* $Xorg: AsciiSinkP.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSinkP.h,v 1.9 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSinkP.h,v 1.10 2001/12/14 19:54:38 dawes Exp $ */ #ifndef _XawAsciiSinkP_h #define _XawAsciiSinkP_h Index: xc/lib/Xaw/AsciiSrc.c diff -u xc/lib/Xaw/AsciiSrc.c:1.27 xc/lib/Xaw/AsciiSrc.c:1.30 --- xc/lib/Xaw/AsciiSrc.c:1.27 Fri Jan 26 17:35:23 2001 +++ xc/lib/Xaw/AsciiSrc.c Fri Dec 14 14:54:38 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AsciiSrc.c,v 1.3 2000/08/17 19:45:30 cpqbld Exp $ */ +/* $Xorg: AsciiSrc.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xaw/AsciiSrc.c,v 1.27 2001/01/26 22:35:23 herrb Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSrc.c,v 1.30 2001/12/14 19:54:38 dawes Exp $ */ /* * AsciiSrc.c - AsciiSrc object. (For use with the text widget). @@ -30,9 +34,7 @@ */ #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #include #include @@ -201,9 +203,6 @@ }; #undef offset -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif #define Superclass (&textSrcClassRec) AsciiSrcClassRec asciiSrcClassRec = { @@ -1484,7 +1483,7 @@ } if (!src->ascii_src.is_tempfile) { - if ((fd = open(src->ascii_src.string, open_mode, 0666))) { + if ((fd = open(src->ascii_src.string, open_mode, 0666)) != -1) { if ((file = fdopen(fd, fdopen_mode))) { (void)fseek(file, 0, SEEK_END); src->ascii_src.length = (XawTextPosition)ftell(file); Index: xc/lib/Xaw/AsciiSrc.h diff -u xc/lib/Xaw/AsciiSrc.h:1.7 xc/lib/Xaw/AsciiSrc.h:1.8 --- xc/lib/Xaw/AsciiSrc.h:1.7 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/AsciiSrc.h Fri Dec 14 14:54:38 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AsciiSrc.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ +/* $Xorg: AsciiSrc.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/AsciiSrc.h,v 1.7 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSrc.h,v 1.8 2001/12/14 19:54:38 dawes Exp $ */ /* Index: xc/lib/Xaw/AsciiSrcP.h diff -u xc/lib/Xaw/AsciiSrcP.h:1.8 xc/lib/Xaw/AsciiSrcP.h:1.9 --- xc/lib/Xaw/AsciiSrcP.h:1.8 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/AsciiSrcP.h Fri Dec 14 14:54:38 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: AsciiSrcP.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ +* $Xorg: AsciiSrcP.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiSrcP.h,v 1.8 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiSrcP.h,v 1.9 2001/12/14 19:54:38 dawes Exp $ */ /* * AsciiSrcP.h - Private Header for Ascii Text Source. Index: xc/lib/Xaw/AsciiText.c diff -u xc/lib/Xaw/AsciiText.c:3.9 xc/lib/Xaw/AsciiText.c:3.10 --- xc/lib/Xaw/AsciiText.c:3.9 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/AsciiText.c Fri Dec 14 14:54:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AsciiText.c,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ +/* $Xorg: AsciiText.c,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/lib/Xaw/AsciiText.c,v 3.9 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiText.c,v 3.10 2001/12/14 19:54:39 dawes Exp $ */ /* * AsciiText.c - Source code for AsciiText Widget Index: xc/lib/Xaw/AsciiText.h diff -u xc/lib/Xaw/AsciiText.h:1.5 xc/lib/Xaw/AsciiText.h:1.6 --- xc/lib/Xaw/AsciiText.h:1.5 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/AsciiText.h Fri Dec 14 14:54:39 2001 @@ -1,12 +1,16 @@ /* - * $Xorg: AsciiText.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ + * $Xorg: AsciiText.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiText.h,v 1.5 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiText.h,v 1.6 2001/12/14 19:54:39 dawes Exp $ */ /* * AsciiText.h - Public header file for AsciiText Widget Index: xc/lib/Xaw/AsciiTextP.h diff -u xc/lib/Xaw/AsciiTextP.h:1.8 xc/lib/Xaw/AsciiTextP.h:1.9 --- xc/lib/Xaw/AsciiTextP.h:1.8 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/AsciiTextP.h Fri Dec 14 14:54:39 2001 @@ -1,12 +1,16 @@ /* - * $Xorg: AsciiTextP.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ + * $Xorg: AsciiTextP.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/AsciiTextP.h,v 1.8 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/AsciiTextP.h,v 1.9 2001/12/14 19:54:39 dawes Exp $ */ /* * AsciiText.c - Private header file for AsciiText Widget. Index: xc/lib/Xaw/Box.c diff -u xc/lib/Xaw/Box.c:1.14 xc/lib/Xaw/Box.c:1.15 --- xc/lib/Xaw/Box.c:1.14 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/Box.c Fri Dec 14 14:54:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Box.c,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ +/* $Xorg: Box.c,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Box.c,v 1.14 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Box.c,v 1.15 2001/12/14 19:54:39 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Box.h diff -u xc/lib/Xaw/Box.h:1.7 xc/lib/Xaw/Box.h:1.8 --- xc/lib/Xaw/Box.h:1.7 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/Box.h Fri Dec 14 14:54:39 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: Box.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ +* $Xorg: Box.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Box.h,v 1.7 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Box.h,v 1.8 2001/12/14 19:54:39 dawes Exp $ */ #ifndef _XawBox_h #define _XawBox_h Index: xc/lib/Xaw/BoxP.h diff -u xc/lib/Xaw/BoxP.h:1.10 xc/lib/Xaw/BoxP.h:1.11 --- xc/lib/Xaw/BoxP.h:1.10 Wed Jan 17 14:42:25 2001 +++ xc/lib/Xaw/BoxP.h Fri Dec 14 14:54:39 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: BoxP.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ +* $Xorg: BoxP.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/BoxP.h,v 1.10 2001/01/17 19:42:25 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/BoxP.h,v 1.11 2001/12/14 19:54:39 dawes Exp $ */ #ifndef _XawBoxP_h #define _XawBoxP_h Index: xc/lib/Xaw/Cardinals.h diff -u xc/lib/Xaw/Cardinals.h:1.1.1.3 xc/lib/Xaw/Cardinals.h:1.2 --- xc/lib/Xaw/Cardinals.h:1.1.1.3 Tue Jan 16 17:15:44 2001 +++ xc/lib/Xaw/Cardinals.h Fri Dec 14 14:54:39 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Cardinals.h,v 1.3 2000/08/17 19:45:31 cpqbld Exp $ */ +/* $Xorg: Cardinals.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xaw/Command.c diff -u xc/lib/Xaw/Command.c:1.12 xc/lib/Xaw/Command.c:1.14 --- xc/lib/Xaw/Command.c:1.12 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/Command.c Thu Dec 27 16:17:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Command.c,v 1.4 2000/08/17 19:45:31 cpqbld Exp $ */ +/* $Xorg: Command.c,v 1.5 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Command.c,v 1.12 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Command.c,v 1.14 2001/12/27 21:17:54 paulo Exp $ */ /* * Command.c - Command button widget @@ -508,9 +512,6 @@ Boolean redisplay = False; if (oldcbw->core.sensitive != cbw->core.sensitive && !cbw->core.sensitive) { - if (cbw->command.set) - XawCommandToggle(cnew); - cbw->command.set = False; cbw->command.highlighted = HighlightNone; redisplay = True; } Index: xc/lib/Xaw/Command.h diff -u xc/lib/Xaw/Command.h:1.5 xc/lib/Xaw/Command.h:1.6 --- xc/lib/Xaw/Command.h:1.5 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/Command.h Fri Dec 14 14:54:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Command.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ +/* $Xorg: Command.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Command.h,v 1.5 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Command.h,v 1.6 2001/12/14 19:54:39 dawes Exp $ */ #ifndef _XawCommand_h #define _XawCommand_h Index: xc/lib/Xaw/CommandP.h diff -u xc/lib/Xaw/CommandP.h:1.7 xc/lib/Xaw/CommandP.h:1.8 --- xc/lib/Xaw/CommandP.h:1.7 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/CommandP.h Fri Dec 14 14:54:39 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: CommandP.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ +* $Xorg: CommandP.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/CommandP.h,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/CommandP.h,v 1.8 2001/12/14 19:54:39 dawes Exp $ */ #ifndef _XawCommandP_h #define _XawCommandP_h Index: xc/lib/Xaw/Dialog.c diff -u xc/lib/Xaw/Dialog.c:1.7 xc/lib/Xaw/Dialog.c:1.8 --- xc/lib/Xaw/Dialog.c:1.7 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/Dialog.c Fri Dec 14 14:54:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Dialog.c,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ +/* $Xorg: Dialog.c,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Dialog.c,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Dialog.c,v 1.8 2001/12/14 19:54:39 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Dialog.h diff -u xc/lib/Xaw/Dialog.h:1.5 xc/lib/Xaw/Dialog.h:1.6 --- xc/lib/Xaw/Dialog.h:1.5 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/Dialog.h Fri Dec 14 14:54:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Dialog.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ +/* $Xorg: Dialog.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Dialog.h,v 1.5 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Dialog.h,v 1.6 2001/12/14 19:54:39 dawes Exp $ */ #ifndef _XawDialog_h #define _XawDialog_h Index: xc/lib/Xaw/DialogP.h diff -u xc/lib/Xaw/DialogP.h:1.8 xc/lib/Xaw/DialogP.h:1.9 --- xc/lib/Xaw/DialogP.h:1.8 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/DialogP.h Fri Dec 14 14:54:39 2001 @@ -1,11 +1,15 @@ -/* $Xorg: DialogP.h,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ +/* $Xorg: DialogP.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/DialogP.h,v 1.8 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/DialogP.h,v 1.9 2001/12/14 19:54:39 dawes Exp $ */ #ifndef _DialogP_h #define _DialogP_h Index: xc/lib/Xaw/Form.c diff -u xc/lib/Xaw/Form.c:1.20 xc/lib/Xaw/Form.c:1.21 --- xc/lib/Xaw/Form.c:1.20 Mon Feb 5 17:38:04 2001 +++ xc/lib/Xaw/Form.c Fri Dec 14 14:54:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Form.c,v 1.3 2000/08/17 19:45:32 cpqbld Exp $ */ +/* $Xorg: Form.c,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Form.c,v 1.20 2001/02/05 22:38:04 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Form.c,v 1.21 2001/12/14 19:54:39 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Form.h diff -u xc/lib/Xaw/Form.h:1.8 xc/lib/Xaw/Form.h:1.9 --- xc/lib/Xaw/Form.h:1.8 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/Form.h Fri Dec 14 14:54:40 2001 @@ -1,11 +1,15 @@ -/* $Xorg: Form.h,v 1.4 2000/08/17 19:45:32 cpqbld Exp $ */ +/* $Xorg: Form.h,v 1.5 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Form.h,v 1.8 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Form.h,v 1.9 2001/12/14 19:54:40 dawes Exp $ */ #ifndef _XawForm_h #define _XawForm_h Index: xc/lib/Xaw/FormP.h diff -u xc/lib/Xaw/FormP.h:1.12 xc/lib/Xaw/FormP.h:1.14 --- xc/lib/Xaw/FormP.h:1.12 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/FormP.h Wed Dec 19 16:37:30 2001 @@ -1,10 +1,14 @@ -/* $Xorg: FormP.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ +/* $Xorg: FormP.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,16 +46,20 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/FormP.h,v 1.12 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/FormP.h,v 1.14 2001/12/19 21:37:30 dawes Exp $ */ /* Form widget private definitions */ #ifndef _XawFormP_h #define _XawFormP_h +#include + #include #include +_XFUNCPROTOBEGIN + #define XtREdgeType "EdgeType" typedef enum { @@ -128,5 +136,7 @@ typedef struct _FormConstraintsRec { FormConstraintsPart form; } FormConstraintsRec, *FormConstraints; + +_XFUNCPROTOEND #endif /* _XawFormP_h */ Index: xc/lib/Xaw/Grip.c diff -u xc/lib/Xaw/Grip.c:1.7 xc/lib/Xaw/Grip.c:1.8 --- xc/lib/Xaw/Grip.c:1.7 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/Grip.c Fri Dec 14 14:54:40 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Grip.c,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ +/* $Xorg: Grip.c,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Grip.c,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Grip.c,v 1.8 2001/12/14 19:54:40 dawes Exp $ */ /* * Grip.c - Grip Widget (Used by Paned Widget) Index: xc/lib/Xaw/Grip.h diff -u xc/lib/Xaw/Grip.h:1.6 xc/lib/Xaw/Grip.h:1.7 --- xc/lib/Xaw/Grip.h:1.6 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/Grip.h Fri Dec 14 14:54:40 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Grip.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ +/* $Xorg: Grip.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Grip.h,v 1.6 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Grip.h,v 1.7 2001/12/14 19:54:40 dawes Exp $ */ /* * Grip.h - Public Definitions for Grip widget (used by VPane Widget) Index: xc/lib/Xaw/GripP.h diff -u xc/lib/Xaw/GripP.h:1.7 xc/lib/Xaw/GripP.h:1.8 --- xc/lib/Xaw/GripP.h:1.7 Wed Jan 17 14:42:26 2001 +++ xc/lib/Xaw/GripP.h Fri Dec 14 14:54:40 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: GripP.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ +* $Xorg: GripP.h,v 1.4 2001/02/09 02:03:43 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/GripP.h,v 1.7 2001/01/17 19:42:26 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/GripP.h,v 1.8 2001/12/14 19:54:40 dawes Exp $ */ #ifndef _XawGripP_h #define _XawGripP_h Index: xc/lib/Xaw/Label.c diff -u xc/lib/Xaw/Label.c:1.12 xc/lib/Xaw/Label.c:1.13 --- xc/lib/Xaw/Label.c:1.12 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/Label.c Fri Dec 14 14:54:40 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Label.c,v 1.4 2000/08/17 19:45:33 cpqbld Exp $ */ +/* $Xorg: Label.c,v 1.5 2001/02/09 02:03:43 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Label.c,v 1.12 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Label.c,v 1.13 2001/12/14 19:54:40 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Label.h diff -u xc/lib/Xaw/Label.h:1.6 xc/lib/Xaw/Label.h:1.7 --- xc/lib/Xaw/Label.h:1.6 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/Label.h Fri Dec 14 14:54:40 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Label.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ +/* $Xorg: Label.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Label.h,v 1.6 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Label.h,v 1.7 2001/12/14 19:54:40 dawes Exp $ */ #ifndef _XawLabel_h #define _XawLabel_h Index: xc/lib/Xaw/LabelP.h diff -u xc/lib/Xaw/LabelP.h:1.7 xc/lib/Xaw/LabelP.h:1.8 --- xc/lib/Xaw/LabelP.h:1.7 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/LabelP.h Fri Dec 14 14:54:40 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: LabelP.h,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ +* $Xorg: LabelP.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/LabelP.h,v 1.7 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/LabelP.h,v 1.8 2001/12/14 19:54:40 dawes Exp $ */ #ifndef _XawLabelP_h #define _XawLabelP_h Index: xc/lib/Xaw/List.c diff -u xc/lib/Xaw/List.c:1.16 xc/lib/Xaw/List.c:1.17 --- xc/lib/Xaw/List.c:1.16 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/List.c Fri Dec 14 14:54:40 2001 @@ -1,9 +1,13 @@ -/* $Xorg: List.c,v 1.3 2000/08/17 19:45:33 cpqbld Exp $ */ +/* $Xorg: List.c,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/List.c,v 1.16 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/List.c,v 1.17 2001/12/14 19:54:40 dawes Exp $ */ /* * List.c - List widget Index: xc/lib/Xaw/List.h diff -u xc/lib/Xaw/List.h:1.7 xc/lib/Xaw/List.h:1.8 --- xc/lib/Xaw/List.h:1.7 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/List.h Fri Dec 14 14:54:40 2001 @@ -1,9 +1,13 @@ -/* $Xorg: List.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ +/* $Xorg: List.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/List.h,v 1.7 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/List.h,v 1.8 2001/12/14 19:54:40 dawes Exp $ */ /* This is the List widget, it is useful to display a list, without the * overhead of having a widget for each item in the list. It allows Index: xc/lib/Xaw/ListP.h diff -u xc/lib/Xaw/ListP.h:1.8 xc/lib/Xaw/ListP.h:1.9 --- xc/lib/Xaw/ListP.h:1.8 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/ListP.h Fri Dec 14 14:54:40 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ListP.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ +/* $Xorg: ListP.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/ListP.h,v 1.8 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ListP.h,v 1.9 2001/12/14 19:54:40 dawes Exp $ */ /* Index: xc/lib/Xaw/MenuButtoP.h diff -u xc/lib/Xaw/MenuButtoP.h:1.7 xc/lib/Xaw/MenuButtoP.h:1.8 --- xc/lib/Xaw/MenuButtoP.h:1.7 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/MenuButtoP.h Fri Dec 14 14:54:41 2001 @@ -1,8 +1,12 @@ -/* $Xorg: MenuButtoP.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ +/* $Xorg: MenuButtoP.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ * Copyright 1989,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -18,7 +22,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/MenuButtoP.h,v 1.7 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MenuButtoP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */ /* * MenuButtonP.h - Private Header file for MenuButton widget. Index: xc/lib/Xaw/MenuButton.c diff -u xc/lib/Xaw/MenuButton.c:3.8 xc/lib/Xaw/MenuButton.c:3.10 --- xc/lib/Xaw/MenuButton.c:3.8 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/MenuButton.c Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ -/* $Xorg: MenuButton.c,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ +/* $Xorg: MenuButton.c,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * */ -/* $XFree86: xc/lib/Xaw/MenuButton.c,v 3.8 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MenuButton.c,v 3.10 2001/12/14 19:54:41 dawes Exp $ */ /* * MenuButton.c - Source code for MenuButton widget. @@ -48,6 +52,9 @@ * Class Methods */ static void XawMenuButtonClassInitialize(void); +static void XawMenuButtonInitialize(Widget, Widget, ArgList, Cardinal*); +static void XawMenuButtonDestroy(Widget); +static Boolean XawMenuButtonSetValues(Widget, Widget, Widget, ArgList, Cardinal*); /* * Actions @@ -64,6 +71,8 @@ ":" "reset()\n" "Any:" "reset() PopupMenu()\n"; +static char default_menu_name[] = "menu"; + #define offset(field) XtOffsetOf(MenuButtonRec, field) static XtResource resources[] = { { @@ -73,7 +82,7 @@ sizeof(String), offset(menu_button.menu_name), XtRString, - (XtPointer)"menu" + (XtPointer)default_menu_name }, }; #undef offset @@ -92,7 +101,7 @@ XawMenuButtonClassInitialize, /* class_initialize */ NULL, /* class_part_initialize */ False, /* class_inited */ - NULL, /* initialize */ + XawMenuButtonInitialize, /* initialize */ NULL, /* initialize_hook */ XtInheritRealize, /* realize */ actionsList, /* actions */ @@ -104,10 +113,10 @@ True, /* compress_exposure */ True, /* compress_enterleave */ False, /* visible_interest */ - NULL, /* destroy */ + XawMenuButtonDestroy, /* destroy */ XtInheritResize, /* resize */ XtInheritExpose, /* expose */ - NULL, /* set_values */ + XawMenuButtonSetValues, /* set_values */ NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ NULL, /* get_values_hook */ @@ -149,6 +158,45 @@ XtRegisterGrabAction(PopupMenu, True, ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync); +} + +/*ARGSUSED*/ +static void +XawMenuButtonInitialize(Widget request, Widget cnew, + ArgList args, Cardinal *num_args) +{ + MenuButtonWidget mbw = (MenuButtonWidget)cnew; + + if (mbw->menu_button.menu_name != default_menu_name) + mbw->menu_button.menu_name = XtNewString(mbw->menu_button.menu_name); +} + +static void +XawMenuButtonDestroy(Widget w) +{ + MenuButtonWidget mbw = (MenuButtonWidget)w; + + if (mbw->menu_button.menu_name != default_menu_name) + XtFree(mbw->menu_button.menu_name); +} + +/*ARGSUSED*/ +static Boolean +XawMenuButtonSetValues(Widget current, Widget request, Widget cnew, + ArgList args, Cardinal *num_args) +{ + MenuButtonWidget mbw_old = (MenuButtonWidget)current; + MenuButtonWidget mbw_new = (MenuButtonWidget)cnew; + + if (mbw_old->menu_button.menu_name != mbw_new->menu_button.menu_name) { + if (mbw_old->menu_button.menu_name != default_menu_name) + XtFree(mbw_old->menu_button.menu_name); + if (mbw_new->menu_button.menu_name != default_menu_name) + mbw_new->menu_button.menu_name = + XtNewString(mbw_new->menu_button.menu_name); + } + + return (False); } /*ARGSUSED*/ Index: xc/lib/Xaw/MenuButton.h diff -u xc/lib/Xaw/MenuButton.h:1.5 xc/lib/Xaw/MenuButton.h:1.6 --- xc/lib/Xaw/MenuButton.h:1.5 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/MenuButton.h Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: MenuButton.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ + * $Xorg: MenuButton.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/MenuButton.h,v 1.5 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MenuButton.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xaw/MultiSink.c diff -u xc/lib/Xaw/MultiSink.c:1.19 xc/lib/Xaw/MultiSink.c:1.20 --- xc/lib/Xaw/MultiSink.c:1.19 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/MultiSink.c Fri Dec 14 14:54:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: MultiSink.c,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ +/* $Xorg: MultiSink.c,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -28,7 +28,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSink.c,v 1.19 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSink.c,v 1.20 2001/12/14 19:54:41 dawes Exp $ */ #include #include Index: xc/lib/Xaw/MultiSink.h diff -u xc/lib/Xaw/MultiSink.h:1.5 xc/lib/Xaw/MultiSink.h:1.6 --- xc/lib/Xaw/MultiSink.h:1.5 Wed Jan 17 14:42:27 2001 +++ xc/lib/Xaw/MultiSink.h Fri Dec 14 14:54:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: MultiSink.h,v 1.3 2000/08/17 19:45:34 cpqbld Exp $ */ +/* $Xorg: MultiSink.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -28,7 +28,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSink.h,v 1.5 2001/01/17 19:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSink.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */ #ifndef _XawMultiSink_h #define _XawMultiSink_h Index: xc/lib/Xaw/MultiSinkP.h diff -u xc/lib/Xaw/MultiSinkP.h:1.8 xc/lib/Xaw/MultiSinkP.h:1.9 --- xc/lib/Xaw/MultiSinkP.h:1.8 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/MultiSinkP.h Fri Dec 14 14:54:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: MultiSinkP.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ +/* $Xorg: MultiSinkP.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -29,7 +29,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSinkP.h,v 1.8 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSinkP.h,v 1.9 2001/12/14 19:54:41 dawes Exp $ */ #ifndef _XawMultiSinkP_h #define _XawMultiSinkP_h Index: xc/lib/Xaw/MultiSrc.c diff -u xc/lib/Xaw/MultiSrc.c:1.21 xc/lib/Xaw/MultiSrc.c:1.24 --- xc/lib/Xaw/MultiSrc.c:1.21 Fri Jan 26 17:45:59 2001 +++ xc/lib/Xaw/MultiSrc.c Fri Dec 14 14:54:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: MultiSrc.c,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ +/* $Xorg: MultiSrc.c,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -27,13 +27,17 @@ * * Much code taken from X11R3 String and Disk Sources. */ -/* $XFree86: xc/lib/Xaw/MultiSrc.c,v 1.21 2001/01/26 22:45:59 herrb Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSrc.c,v 1.24 2001/12/14 19:54:41 dawes Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -82,9 +86,6 @@ #define Size_t size_t #endif -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif /* * Class Methods @@ -1162,7 +1163,7 @@ static FILE * InitStringOrFile(MultiSrcObject src, Bool newString) { - mode_t open_mode; + mode_t open_mode = 0; const char *fdopen_mode = NULL; int fd; FILE *file; Index: xc/lib/Xaw/MultiSrc.h diff -u xc/lib/Xaw/MultiSrc.h:1.6 xc/lib/Xaw/MultiSrc.h:1.7 --- xc/lib/Xaw/MultiSrc.h:1.6 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/MultiSrc.h Fri Dec 14 14:54:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: MultiSrc.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ +/* $Xorg: MultiSrc.h,v 1.4 2001/02/09 02:03:44 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -28,7 +28,11 @@ Copyright 1989, 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/MultiSrc.h,v 1.6 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSrc.h,v 1.7 2001/12/14 19:54:41 dawes Exp $ */ /* * This file was modified from AsciiSrc.h. Index: xc/lib/Xaw/MultiSrcP.h diff -u xc/lib/Xaw/MultiSrcP.h:1.8 xc/lib/Xaw/MultiSrcP.h:1.9 --- xc/lib/Xaw/MultiSrcP.h:1.8 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/MultiSrcP.h Fri Dec 14 14:54:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: MultiSrcP.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ +/* $Xorg: MultiSrcP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -29,7 +29,11 @@ Copyright 1987, 1988, 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/MultiSrcP.h,v 1.8 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/MultiSrcP.h,v 1.9 2001/12/14 19:54:41 dawes Exp $ */ /* * MultiSrcP.h - Private Header for Multi Text Source. Index: xc/lib/Xaw/Paned.c diff -u xc/lib/Xaw/Paned.c:1.10 xc/lib/Xaw/Paned.c:1.12 --- xc/lib/Xaw/Paned.c:1.10 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/Paned.c Fri Dec 14 14:54:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Paned.c,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ */ +/* $Xorg: Paned.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Paned.c,v 1.10 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Paned.c,v 1.12 2001/12/14 19:54:41 dawes Exp $ */ /* * Updated and significantly modified from the Athena VPaned Widget. @@ -1334,11 +1338,12 @@ XtSetArg(arglist[num_args], XtNtranslations, pw->paned.grip_translations); num_args++; - if ((cursor = pw->paned.grip_cursor) == None) + if ((cursor = pw->paned.grip_cursor) == None) { if (IsVert(pw)) cursor = pw->paned.v_grip_cursor; else cursor = pw->paned.h_grip_cursor; + } XtSetArg(arglist[num_args], XtNcursor, cursor); num_args++; @@ -1451,11 +1456,12 @@ Arg arglist[1]; Cursor cursor; - if ((cursor = pw->paned.grip_cursor) == None) + if ((cursor = pw->paned.grip_cursor) == None) { if (IsVert(pw)) cursor = pw->paned.v_grip_cursor; else cursor = pw->paned.h_grip_cursor; + } if (HasGrip(*childP)) { XtSetArg(arglist[0], XtNcursor, cursor); Index: xc/lib/Xaw/Paned.h diff -u xc/lib/Xaw/Paned.h:1.6 xc/lib/Xaw/Paned.h:1.7 --- xc/lib/Xaw/Paned.h:1.6 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/Paned.h Fri Dec 14 14:54:41 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: Paned.h,v 1.4 2000/08/17 19:45:35 cpqbld Exp $ +* $Xorg: Paned.h,v 1.5 2001/02/09 02:03:45 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Paned.h,v 1.6 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Paned.h,v 1.7 2001/12/14 19:54:41 dawes Exp $ */ /* * Paned.h - Paned Composite Widget's public header file. Index: xc/lib/Xaw/PanedP.h diff -u xc/lib/Xaw/PanedP.h:1.7 xc/lib/Xaw/PanedP.h:1.8 --- xc/lib/Xaw/PanedP.h:1.7 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/PanedP.h Fri Dec 14 14:54:41 2001 @@ -1,11 +1,15 @@ /*********************************************************** - $Xorg: PanedP.h,v 1.3 2000/08/17 19:45:35 cpqbld Exp $ + $Xorg: PanedP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/PanedP.h,v 1.7 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/PanedP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */ /* * Updated and significantly modified from the Athena VPaned Widget. Index: xc/lib/Xaw/Panner.c diff -u xc/lib/Xaw/Panner.c:3.6 xc/lib/Xaw/Panner.c:3.9 --- xc/lib/Xaw/Panner.c:3.6 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/Panner.c Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Panner.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: Panner.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Panner.c,v 3.6 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Panner.c,v 3.9 2001/12/14 19:54:41 dawes Exp $ */ #include #include @@ -39,10 +43,8 @@ #if defined(ISC) && __STDC__ && !defined(ISC30) extern double atof(char *); #else -#if !defined(X_NOT_STDC_ENV) || defined(SCO) #include /* for atof() */ #endif -#endif /* * Class Methods @@ -516,9 +518,9 @@ if (XtHeight(pw) <= vpad) vpad = 0; - pw->panner.haspect = ((double)XtWidth(pw) - hpad) + pw->panner.haspect = ((double)XtWidth(pw) - hpad + .5) / (double)pw->panner.canvas_width; - pw->panner.vaspect = ((double)XtHeight(pw) - vpad) + pw->panner.vaspect = ((double)XtHeight(pw) - vpad + .5) / (double)pw->panner.canvas_height; scale_knob(pw, True, True); } Index: xc/lib/Xaw/Panner.h diff -u xc/lib/Xaw/Panner.h:1.5 xc/lib/Xaw/Panner.h:1.6 --- xc/lib/Xaw/Panner.h:1.5 Wed Jan 17 14:42:28 2001 +++ xc/lib/Xaw/Panner.h Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Panner.h,v 1.4 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: Panner.h,v 1.5 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Panner.h,v 1.5 2001/01/17 19:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Panner.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */ #ifndef _XawPanner_h #define _XawPanner_h Index: xc/lib/Xaw/PannerP.h diff -u xc/lib/Xaw/PannerP.h:1.7 xc/lib/Xaw/PannerP.h:1.8 --- xc/lib/Xaw/PannerP.h:1.7 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/PannerP.h Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: PannerP.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: PannerP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/PannerP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/PannerP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */ #ifndef _XawPannerP_h #define _XawPannerP_h Index: xc/lib/Xaw/Porthole.c diff -u xc/lib/Xaw/Porthole.c:1.6 xc/lib/Xaw/Porthole.c:1.7 --- xc/lib/Xaw/Porthole.c:1.6 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/Porthole.c Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Porthole.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: Porthole.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -24,7 +28,7 @@ * This widget is a trivial clipping widget. It is typically used with a * panner or scrollbar to navigate. */ -/* $XFree86: xc/lib/Xaw/Porthole.c,v 1.6 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Porthole.c,v 1.7 2001/12/14 19:54:41 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Porthole.h diff -u xc/lib/Xaw/Porthole.h:1.5 xc/lib/Xaw/Porthole.h:1.6 --- xc/lib/Xaw/Porthole.h:1.5 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/Porthole.h Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Porthole.h,v 1.4 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: Porthole.h,v 1.5 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Porthole.h,v 1.5 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Porthole.h,v 1.6 2001/12/14 19:54:41 dawes Exp $ */ #ifndef _XawPorthole_h #define _XawPorthole_h Index: xc/lib/Xaw/PortholeP.h diff -u xc/lib/Xaw/PortholeP.h:1.7 xc/lib/Xaw/PortholeP.h:1.8 --- xc/lib/Xaw/PortholeP.h:1.7 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/PortholeP.h Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: PortholeP.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: PortholeP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/PortholeP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/PortholeP.h,v 1.8 2001/12/14 19:54:41 dawes Exp $ */ #ifndef _XawPortholeP_h #define _XawPortholeP_h Index: xc/lib/Xaw/Repeater.c diff -u xc/lib/Xaw/Repeater.c:1.6 xc/lib/Xaw/Repeater.c:1.7 --- xc/lib/Xaw/Repeater.c:1.6 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/Repeater.c Fri Dec 14 14:54:41 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Repeater.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: Repeater.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * * This widget is used for press-and-hold style buttons. */ -/* $XFree86: xc/lib/Xaw/Repeater.c,v 1.6 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Repeater.c,v 1.7 2001/12/14 19:54:41 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Repeater.h diff -u xc/lib/Xaw/Repeater.h:1.5 xc/lib/Xaw/Repeater.h:1.6 --- xc/lib/Xaw/Repeater.h:1.5 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/Repeater.h Fri Dec 14 14:54:42 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Repeater.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: Repeater.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/Repeater.h,v 1.5 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Repeater.h,v 1.6 2001/12/14 19:54:42 dawes Exp $ */ #ifndef _XawRepeater_h #define _XawRepeater_h Index: xc/lib/Xaw/RepeaterP.h diff -u xc/lib/Xaw/RepeaterP.h:1.7 xc/lib/Xaw/RepeaterP.h:1.8 --- xc/lib/Xaw/RepeaterP.h:1.7 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/RepeaterP.h Fri Dec 14 14:54:42 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: RepeaterP.h,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: RepeaterP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/RepeaterP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/RepeaterP.h,v 1.8 2001/12/14 19:54:42 dawes Exp $ */ #ifndef _XawRepeaterP_h #define _XawRepeaterP_h Index: xc/lib/Xaw/Reports.h diff -u xc/lib/Xaw/Reports.h:1.1.1.3 xc/lib/Xaw/Reports.h:1.2 --- xc/lib/Xaw/Reports.h:1.1.1.3 Tue Jan 16 17:17:10 2001 +++ xc/lib/Xaw/Reports.h Fri Dec 14 14:54:42 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Reports.h,v 1.4 2000/08/17 19:45:36 cpqbld Exp $ + * $Xorg: Reports.h,v 1.5 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xaw/Scrollbar.c diff -u xc/lib/Xaw/Scrollbar.c:1.12 xc/lib/Xaw/Scrollbar.c:1.13 --- xc/lib/Xaw/Scrollbar.c:1.12 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/Scrollbar.c Fri Dec 14 14:54:42 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Scrollbar.c,v 1.3 2000/08/17 19:45:36 cpqbld Exp $ */ +/* $Xorg: Scrollbar.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Scrollbar.c,v 1.12 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Scrollbar.c,v 1.13 2001/12/14 19:54:42 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Scrollbar.h diff -u xc/lib/Xaw/Scrollbar.h:1.6 xc/lib/Xaw/Scrollbar.h:1.7 --- xc/lib/Xaw/Scrollbar.h:1.6 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/Scrollbar.h Fri Dec 14 14:54:42 2001 @@ -1,11 +1,15 @@ -/* $Xorg: Scrollbar.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ +/* $Xorg: Scrollbar.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Scrollbar.h,v 1.6 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Scrollbar.h,v 1.7 2001/12/14 19:54:42 dawes Exp $ */ #ifndef _Scrollbar_h #define _Scrollbar_h Index: xc/lib/Xaw/ScrollbarP.h diff -u xc/lib/Xaw/ScrollbarP.h:1.7 xc/lib/Xaw/ScrollbarP.h:1.8 --- xc/lib/Xaw/ScrollbarP.h:1.7 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/ScrollbarP.h Fri Dec 14 14:54:42 2001 @@ -1,5 +1,5 @@ /* - * $Xorg: ScrollbarP.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ + * $Xorg: ScrollbarP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/ScrollbarP.h,v 1.7 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ScrollbarP.h,v 1.8 2001/12/14 19:54:42 dawes Exp $ */ #ifndef _ScrollbarP_h #define _ScrollbarP_h Index: xc/lib/Xaw/Simple.c diff -u xc/lib/Xaw/Simple.c:1.15 xc/lib/Xaw/Simple.c:1.17 --- xc/lib/Xaw/Simple.c:1.15 Wed Jan 17 14:42:29 2001 +++ xc/lib/Xaw/Simple.c Fri Dec 14 14:54:42 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Simple.c,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ +/* $Xorg: Simple.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Simple.c,v 1.15 2001/01/17 19:42:29 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Simple.c,v 1.17 2001/12/14 19:54:42 dawes Exp $ */ #include #include @@ -64,6 +68,8 @@ static void XawSimpleClassInitialize(void); static void XawSimpleClassPartInitialize(WidgetClass); #ifndef OLDXAW +static void XawSimpleInitialize(Widget, Widget, ArgList, Cardinal*); +static void XawSimpleDestroy(Widget); static void XawSimpleExpose(Widget, XEvent*, Region); #endif static void XawSimpleRealize(Widget, Mask*, XSetWindowAttributes*); @@ -174,7 +180,11 @@ XawSimpleClassInitialize, /* class_initialize */ XawSimpleClassPartInitialize, /* class_part_initialize */ False, /* class_inited */ +#ifndef OLDXAW + XawSimpleInitialize, /* initialize */ +#else NULL, /* initialize */ +#endif NULL, /* initialize_hook */ XawSimpleRealize, /* realize */ #ifndef OLDXAW @@ -191,7 +201,11 @@ True, /* compress_exposure */ True, /* compress_enterleave */ False, /* visible_interest */ +#ifndef OLDXAW + XawSimpleDestroy, /* destroy */ +#else NULL, /* destroy */ +#endif NULL, /* resize */ #ifndef OLDXAW XawSimpleExpose, /* expose */ @@ -271,7 +285,29 @@ c->simple_class.change_sensitive = super->simple_class.change_sensitive; } +#ifndef OLDXAW +/*ARGSUSED*/ static void +XawSimpleInitialize(Widget request, Widget cnew, + ArgList args, Cardinal *num_args) +{ + SimpleWidget simple = (SimpleWidget)cnew; + + if (simple->simple.tip) + simple->simple.tip = XtNewString(simple->simple.tip); +} + +static void +XawSimpleDestroy(Widget w) +{ + SimpleWidget simple = (SimpleWidget)w; + + if (simple->simple.tip) + XtFree((XtPointer)simple->simple.tip); +} +#endif + +static void XawSimpleRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) { #ifndef OLDXAW @@ -406,6 +442,13 @@ s_new->core.depth); if ((npix && npix->mask) || (opix && opix->mask)) XawReshapeWidget(cnew, npix); + } + + if (s_old->simple.tip != s_new->simple.tip) { + if (s_old->simple.tip) + XtFree((XtPointer)s_old->simple.tip); + if (s_new->simple.tip) + s_new->simple.tip = XtNewString(s_new->simple.tip); } if (s_old->simple.tip && !s_new->simple.tip) Index: xc/lib/Xaw/Simple.h diff -u xc/lib/Xaw/Simple.h:1.8 xc/lib/Xaw/Simple.h:1.9 --- xc/lib/Xaw/Simple.h:1.8 Wed Jan 17 14:42:30 2001 +++ xc/lib/Xaw/Simple.h Fri Dec 14 14:54:42 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Simple.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ +/* $Xorg: Simple.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Simple.h,v 1.8 2001/01/17 19:42:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Simple.h,v 1.9 2001/12/14 19:54:42 dawes Exp $ */ #ifndef _Simple_h #define _Simple_h Index: xc/lib/Xaw/SimpleMenP.h diff -u xc/lib/Xaw/SimpleMenP.h:1.12 xc/lib/Xaw/SimpleMenP.h:1.13 --- xc/lib/Xaw/SimpleMenP.h:1.12 Wed Jan 17 14:42:30 2001 +++ xc/lib/Xaw/SimpleMenP.h Fri Dec 14 14:54:42 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: SimpleMenP.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ + * $Xorg: SimpleMenP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. * */ -/* $XFree86: xc/lib/Xaw/SimpleMenP.h,v 1.12 2001/01/17 19:42:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleMenP.h,v 1.13 2001/12/14 19:54:42 dawes Exp $ */ /* * SimpleMenuP.h - Private Header file for SimpleMenu widget. Index: xc/lib/Xaw/SimpleMenu.c diff -u xc/lib/Xaw/SimpleMenu.c:3.21 xc/lib/Xaw/SimpleMenu.c:3.22 --- xc/lib/Xaw/SimpleMenu.c:3.21 Fri Mar 23 18:59:15 2001 +++ xc/lib/Xaw/SimpleMenu.c Fri Dec 14 14:54:42 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SimpleMenu.c,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ */ +/* $Xorg: SimpleMenu.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SimpleMenu.c,v 3.21 2001/03/23 23:59:15 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleMenu.c,v 3.22 2001/12/14 19:54:42 dawes Exp $ */ /* * SimpleMenu.c - Source code file for SimpleMenu widget. Index: xc/lib/Xaw/SimpleMenu.h diff -u xc/lib/Xaw/SimpleMenu.h:1.7 xc/lib/Xaw/SimpleMenu.h:1.8 --- xc/lib/Xaw/SimpleMenu.h:1.7 Wed Jan 17 14:42:30 2001 +++ xc/lib/Xaw/SimpleMenu.h Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: SimpleMenu.h,v 1.3 2000/08/17 19:45:37 cpqbld Exp $ + * $Xorg: SimpleMenu.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SimpleMenu.h,v 1.7 2001/01/17 19:42:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleMenu.h,v 1.8 2001/12/14 19:54:43 dawes Exp $ */ /* * SimpleMenu.h - Public Header file for SimpleMenu widget. Index: xc/lib/Xaw/SimpleP.h diff -u xc/lib/Xaw/SimpleP.h:1.11 xc/lib/Xaw/SimpleP.h:1.13 --- xc/lib/Xaw/SimpleP.h:1.11 Wed Jan 17 14:42:30 2001 +++ xc/lib/Xaw/SimpleP.h Wed Dec 19 16:37:31 2001 @@ -1,11 +1,15 @@ /*********************************************************** - $Xorg: SimpleP.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ + $Xorg: SimpleP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,12 +47,17 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/SimpleP.h,v 1.11 2001/01/17 19:42:30 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SimpleP.h,v 1.13 2001/12/19 21:37:31 dawes Exp $ */ #ifndef _SimpleP_h #define _SimpleP_h +#include + #include + +_XFUNCPROTOBEGIN + #include typedef struct { @@ -87,5 +96,7 @@ CorePart core; SimplePart simple; } SimpleRec; + +_XFUNCPROTOEND #endif /* _SimpleP_h */ Index: xc/lib/Xaw/Sme.c diff -u xc/lib/Xaw/Sme.c:1.6 xc/lib/Xaw/Sme.c:1.7 --- xc/lib/Xaw/Sme.c:1.6 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/Sme.c Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Sme.c,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ */ +/* $Xorg: Sme.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Sme.c,v 1.6 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Sme.c,v 1.7 2001/12/14 19:54:43 dawes Exp $ */ /* * Date: September 26, 1989 Index: xc/lib/Xaw/Sme.h diff -u xc/lib/Xaw/Sme.h:1.5 xc/lib/Xaw/Sme.h:1.6 --- xc/lib/Xaw/Sme.h:1.5 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/Sme.h Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Sme.h,v 1.4 2000/08/17 19:45:38 cpqbld Exp $ + * $Xorg: Sme.h,v 1.5 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Sme.h,v 1.5 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Sme.h,v 1.6 2001/12/14 19:54:43 dawes Exp $ */ /* * This is the public header file for the Athena Sme object. Index: xc/lib/Xaw/SmeBSB.c diff -u xc/lib/Xaw/SmeBSB.c:1.11 xc/lib/Xaw/SmeBSB.c:1.12 --- xc/lib/Xaw/SmeBSB.c:1.11 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/SmeBSB.c Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SmeBSB.c,v 1.4 2000/08/17 19:45:38 cpqbld Exp $ */ +/* $Xorg: SmeBSB.c,v 1.5 2001/02/09 02:03:45 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SmeBSB.c,v 1.11 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeBSB.c,v 1.12 2001/12/14 19:54:43 dawes Exp $ */ /* * SmeBSB.c - Source code file for BSB Menu Entry object. Index: xc/lib/Xaw/SmeBSB.h diff -u xc/lib/Xaw/SmeBSB.h:1.6 xc/lib/Xaw/SmeBSB.h:1.7 --- xc/lib/Xaw/SmeBSB.h:1.6 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/SmeBSB.h Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: SmeBSB.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ + * $Xorg: SmeBSB.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SmeBSB.h,v 1.6 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeBSB.h,v 1.7 2001/12/14 19:54:43 dawes Exp $ */ /* * SmeBSB.h - Public Header file for SmeBSB object. Index: xc/lib/Xaw/SmeBSBP.h diff -u xc/lib/Xaw/SmeBSBP.h:1.8 xc/lib/Xaw/SmeBSBP.h:1.9 --- xc/lib/Xaw/SmeBSBP.h:1.8 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/SmeBSBP.h Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: SmeBSBP.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ + * $Xorg: SmeBSBP.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SmeBSBP.h,v 1.8 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeBSBP.h,v 1.9 2001/12/14 19:54:43 dawes Exp $ */ #ifndef _XawSmeBSBP_h #define _XawSmeBSBP_h Index: xc/lib/Xaw/SmeLine.c diff -u xc/lib/Xaw/SmeLine.c:1.7 xc/lib/Xaw/SmeLine.c:1.8 --- xc/lib/Xaw/SmeLine.c:1.7 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/SmeLine.c Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ -/* $Xorg: SmeLine.c,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ */ +/* $Xorg: SmeLine.c,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SmeLine.c,v 1.7 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeLine.c,v 1.8 2001/12/14 19:54:43 dawes Exp $ */ /* * Sme.c - Source code for the generic menu entry Index: xc/lib/Xaw/SmeLine.h diff -u xc/lib/Xaw/SmeLine.h:1.5 xc/lib/Xaw/SmeLine.h:1.6 --- xc/lib/Xaw/SmeLine.h:1.5 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/SmeLine.h Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: SmeLine.h,v 1.3 2000/08/17 19:45:38 cpqbld Exp $ + * $Xorg: SmeLine.h,v 1.4 2001/02/09 02:03:45 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. * */ -/* $XFree86: xc/lib/Xaw/SmeLine.h,v 1.5 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeLine.h,v 1.6 2001/12/14 19:54:43 dawes Exp $ */ /* * This is the public header file for the Athena SmeLine object. Index: xc/lib/Xaw/SmeLineP.h diff -u xc/lib/Xaw/SmeLineP.h:1.7 xc/lib/Xaw/SmeLineP.h:1.8 --- xc/lib/Xaw/SmeLineP.h:1.7 Wed Jan 17 14:42:31 2001 +++ xc/lib/Xaw/SmeLineP.h Fri Dec 14 14:54:43 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: SmeLineP.h,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ + * $Xorg: SmeLineP.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Chris D. Peterson, MIT X Consortium */ -/* $XFree86: xc/lib/Xaw/SmeLineP.h,v 1.7 2001/01/17 19:42:31 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeLineP.h,v 1.8 2001/12/14 19:54:43 dawes Exp $ */ #ifndef _XawSmeLineP_h #define _XawSmeLineP_h Index: xc/lib/Xaw/SmeP.h diff -u xc/lib/Xaw/SmeP.h:1.7 xc/lib/Xaw/SmeP.h:1.9 --- xc/lib/Xaw/SmeP.h:1.7 Wed Jan 17 14:42:32 2001 +++ xc/lib/Xaw/SmeP.h Wed Dec 19 16:37:31 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: SmeP.h,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ + * $Xorg: SmeP.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/SmeP.h,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/SmeP.h,v 1.9 2001/12/19 21:37:31 dawes Exp $ */ /* * This is the private header file for the Athena Sme object. @@ -38,8 +42,12 @@ /* * Sme Widget Private Data */ +#include + #include +_XFUNCPROTOBEGIN + /* New fields for the Sme widget class */ typedef struct _SmeClassPart { XtWidgetProc highlight; @@ -76,5 +84,7 @@ #define XtInheritHighlight ((XtWidgetProc)_XtInherit) #define XtInheritUnhighlight XtInheritHighlight #define XtInheritNotify XtInheritHighlight + +_XFUNCPROTOEND #endif /* _XawSmeP_h */ Index: xc/lib/Xaw/StripCharP.h diff -u xc/lib/Xaw/StripCharP.h:1.7 xc/lib/Xaw/StripCharP.h:1.8 --- xc/lib/Xaw/StripCharP.h:1.7 Wed Jan 17 14:42:32 2001 +++ xc/lib/Xaw/StripCharP.h Fri Dec 14 14:54:43 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: StripCharP.h,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ +* $Xorg: StripCharP.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/StripCharP.h,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/StripCharP.h,v 1.8 2001/12/14 19:54:43 dawes Exp $ */ #ifndef _XawStripChartP_h #define _XawStripChartP_h Index: xc/lib/Xaw/StripChart.c diff -u xc/lib/Xaw/StripChart.c:1.7 xc/lib/Xaw/StripChart.c:1.8 --- xc/lib/Xaw/StripChart.c:1.7 Wed Jan 17 14:42:32 2001 +++ xc/lib/Xaw/StripChart.c Fri Dec 14 14:54:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StripChart.c,v 1.3 2000/08/17 19:45:39 cpqbld Exp $ */ +/* $Xorg: StripChart.c,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/StripChart.c,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/StripChart.c,v 1.8 2001/12/14 19:54:44 dawes Exp $ */ #include #include Index: xc/lib/Xaw/StripChart.h diff -u xc/lib/Xaw/StripChart.h:1.5 xc/lib/Xaw/StripChart.h:1.6 --- xc/lib/Xaw/StripChart.h:1.5 Wed Jan 17 14:42:32 2001 +++ xc/lib/Xaw/StripChart.h Fri Dec 14 14:54:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StripChart.h,v 1.4 2000/08/17 19:45:39 cpqbld Exp $ */ +/* $Xorg: StripChart.h,v 1.5 2001/02/09 02:03:46 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/StripChart.h,v 1.5 2001/01/17 19:42:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/StripChart.h,v 1.6 2001/12/14 19:54:44 dawes Exp $ */ #ifndef _XawStripChart_h #define _XawStripChart_h Index: xc/lib/Xaw/Template.c diff -u xc/lib/Xaw/Template.c:1.7 xc/lib/Xaw/Template.c:1.9 --- xc/lib/Xaw/Template.c:1.7 Wed Jan 17 14:42:32 2001 +++ xc/lib/Xaw/Template.c Fri Dec 14 14:54:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Template.c,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ +/* $Xorg: Template.c,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,11 +25,11 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Template.c,v 1.7 2001/01/17 19:42:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Template.c,v 1.9 2001/12/14 19:54:44 dawes Exp $ */ #include #include -#include "TemplateP.h" +#include /* * Class Methods Index: xc/lib/Xaw/Template.h diff -u xc/lib/Xaw/Template.h:1.5 xc/lib/Xaw/Template.h:1.6 --- xc/lib/Xaw/Template.h:1.5 Wed Jan 17 14:42:32 2001 +++ xc/lib/Xaw/Template.h Fri Dec 14 14:54:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Template.h,v 1.4 2000/08/17 19:45:40 cpqbld Exp $ */ +/* $Xorg: Template.h,v 1.5 2001/02/09 02:03:46 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Template.h,v 1.5 2001/01/17 19:42:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Template.h,v 1.6 2001/12/14 19:54:44 dawes Exp $ */ #ifndef _Template_h #define _Template_h Index: xc/lib/Xaw/TemplateP.h diff -u xc/lib/Xaw/TemplateP.h:1.6 xc/lib/Xaw/TemplateP.h:1.7 --- xc/lib/Xaw/TemplateP.h:1.6 Wed Jan 17 14:42:32 2001 +++ xc/lib/Xaw/TemplateP.h Fri Dec 14 14:54:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: TemplateP.h,v 1.4 2000/08/17 19:45:40 cpqbld Exp $ */ +/* $Xorg: TemplateP.h,v 1.5 2001/02/09 02:03:46 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TemplateP.h,v 1.6 2001/01/17 19:42:32 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TemplateP.h,v 1.7 2001/12/14 19:54:44 dawes Exp $ */ #ifndef _TemplateP_h #define _TemplateP_h Index: xc/lib/Xaw/Text.c diff -u xc/lib/Xaw/Text.c:3.42.2.1 xc/lib/Xaw/Text.c:3.50 --- xc/lib/Xaw/Text.c:3.42.2.1 Fri May 25 17:44:59 2001 +++ xc/lib/Xaw/Text.c Mon Dec 17 15:29:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Text.c,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ +/* $Xorg: Text.c,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -70,7 +74,7 @@ * XFree86 Project. */ -/* $XFree86: xc/lib/Xaw/Text.c,v 3.42.2.1 2001/05/25 21:44:59 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/Text.c,v 3.50 2001/12/17 20:29:18 paulo Exp $ */ #include #include @@ -232,7 +236,6 @@ /* Not used by other modules, but were extern on previous versions * of the library */ -void _XawTextNeedsUpdating(TextWidget, XawTextPosition, XawTextPosition); void _XawTextShowPosition(TextWidget); /* @@ -3309,6 +3312,9 @@ void (*display_text)(Widget, XawTextPosition, XawTextPosition); if (XtIsRealized((Widget)ctx)) { + ctx->text.s.right = XawMin(ctx->text.s.right, ctx->text.lastPos); + ctx->text.s.left = XawMin(ctx->text.s.left, ctx->text.s.right); + #ifndef OLDXAW if (XawTextSinkBeginPaint(ctx->text.sink) == False) #endif @@ -3858,7 +3864,6 @@ Bool resolve = False; #endif - _XawTextPrepareToUpdate(ctx); #ifndef OLDXAW if (source != ctx->text.source) _XawSourceRemoveText(ctx->text.source, w, ctx->text.source && @@ -3872,8 +3877,11 @@ #endif ctx->text.source = source; ctx->text.s.left = ctx->text.s.right = 0; - ctx->text.insertPos = ctx->text.old_insert = startPos; ctx->text.lastPos = GETLASTPOS; + top = FindGoodPosition(ctx, top); + startPos = FindGoodPosition(ctx, startPos); + ctx->text.insertPos = ctx->text.old_insert = startPos; + _XawTextPrepareToUpdate(ctx); _XawTextBuildLineTable(ctx, top, True); Index: xc/lib/Xaw/Text.h diff -u xc/lib/Xaw/Text.h:1.14 xc/lib/Xaw/Text.h:1.15 --- xc/lib/Xaw/Text.h:1.14 Wed Jan 17 14:42:34 2001 +++ xc/lib/Xaw/Text.h Fri Dec 14 14:54:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Text.h,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ +/* $Xorg: Text.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Text.h,v 1.14 2001/01/17 19:42:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Text.h,v 1.15 2001/12/14 19:54:44 dawes Exp $ */ #ifndef _XawText_h #define _XawText_h Index: xc/lib/Xaw/TextAction.c diff -u xc/lib/Xaw/TextAction.c:3.41 xc/lib/Xaw/TextAction.c:3.44 --- xc/lib/Xaw/TextAction.c:3.41 Fri Feb 23 16:25:06 2001 +++ xc/lib/Xaw/TextAction.c Fri Jan 4 18:04:17 2002 @@ -1,10 +1,14 @@ -/* $Xorg: TextAction.c,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ */ +/* $Xorg: TextAction.c,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextAction.c,v 3.41 2001/02/23 21:25:06 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/TextAction.c,v 3.44 2002/01/04 23:04:17 paulo Exp $ */ #include #include @@ -2868,6 +2872,21 @@ if (event->xfocus.detail == NotifyPointer) return; + if (event->xfocus.send_event) { + Window root, child; + int rootx, rooty, x, y; + unsigned int mask; + + if (ctx->text.hasfocus) + return; + + if (XQueryPointer(XtDisplay(w), XtWindow(w), &root, &child, + &rootx, &rooty, &x, &y, &mask)) { + if (child) + return; + } + } + /* Let the input method know focus has arrived. */ _XawImSetFocusValues(w, NULL, 0); @@ -3139,6 +3158,7 @@ XawTextPosition insertPos = ctx->text.insertPos, pos, tmp, last; char left, right = text.ptr[0]; int level = 0; + XtAppContext app_context = XtWidgetToApplicationContext(w); left = right == ')' ? '(' : right == ']' ? '[' : '{'; @@ -3169,8 +3189,14 @@ EndAction(ctx); XSync(XtDisplay(w), False); - while (XtAppPending(XtWidgetToApplicationContext(w)) & XtIMXEvent) - XtAppProcessEvent(XtWidgetToApplicationContext(w), XtIMXEvent); + while (XtAppPending(app_context) & XtIMXEvent) { + XEvent ev; + if (! XtAppPeekEvent(app_context, &ev)) + break; + if (ev.type == KeyPress || ev.type == ButtonPress) + break; + XtAppProcessEvent(app_context, XtIMXEvent); + } FD_ZERO(&fds); FD_SET(ConnectionNumber(XtDisplay(w)), &fds); (void)select(FD_SETSIZE, &fds, NULL, NULL, &tmval); Index: xc/lib/Xaw/TextP.h diff -u xc/lib/Xaw/TextP.h:3.19 xc/lib/Xaw/TextP.h:3.22 --- xc/lib/Xaw/TextP.h:3.19 Wed Jan 17 14:42:34 2001 +++ xc/lib/Xaw/TextP.h Wed Dec 19 16:37:31 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: TextP.h,v 1.3 2000/08/17 19:45:40 cpqbld Exp $ +* $Xorg: TextP.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,14 +49,18 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextP.h,v 3.19 2001/01/17 19:42:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextP.h,v 3.22 2001/12/19 21:37:31 dawes Exp $ */ #ifndef _XawTextP_h #define _XawTextP_h +#include + #include #include +_XFUNCPROTOBEGIN + #define MAXCUT 30000 /* Maximum number of characters that can be cut */ #define XawTextGetLastPosition(ctx) \ @@ -300,5 +308,14 @@ Position *x, Position *y ); + +void _XawTextNeedsUpdating +( + TextWidget ctx, + XawTextPosition left, + XawTextPosition right + ); + +_XFUNCPROTOEND #endif /* _XawTextP_h */ Index: xc/lib/Xaw/TextPop.c diff -u xc/lib/Xaw/TextPop.c:1.18 xc/lib/Xaw/TextPop.c:1.20 --- xc/lib/Xaw/TextPop.c:1.18 Mon Feb 5 17:38:05 2001 +++ xc/lib/Xaw/TextPop.c Fri Dec 14 14:54:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: TextPop.c,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ */ +/* $Xorg: TextPop.c,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xaw/TextPop.c,v 1.18 2001/02/05 22:38:05 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/TextPop.c,v 1.20 2001/12/14 19:54:44 dawes Exp $ */ /* * This file is broken up into three sections one dealing with @@ -58,10 +62,6 @@ #include #include #include "XawI18n.h" - -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif static char* INSERT_FILE = "Enter Filename:"; static char* SEARCH_LABEL_1 = "Use to change fields."; Index: xc/lib/Xaw/TextSink.c diff -u xc/lib/Xaw/TextSink.c:1.18 xc/lib/Xaw/TextSink.c:1.20 --- xc/lib/Xaw/TextSink.c:1.18 Wed Jan 17 14:42:34 2001 +++ xc/lib/Xaw/TextSink.c Fri Dec 14 14:54:45 2001 @@ -1,9 +1,13 @@ -/* $Xorg: TextSink.c,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ */ +/* $Xorg: TextSink.c,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextSink.c,v 1.18 2001/01/17 19:42:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSink.c,v 1.20 2001/12/14 19:54:45 dawes Exp $ */ /* * Author: Chris Peterson, MIT X Consortium. @@ -934,12 +938,14 @@ (w, y, line, from, to, highlight); } +#if 0 /*ARGSUSED*/ static void PreparePaint(Widget w, int y, int line, XawTextPosition from, XawTextPosition to, Bool highlight) { } +#endif void XawTextSinkDoPaint(Widget w) @@ -949,11 +955,13 @@ (*cclass->text_sink_class.extension->DoPaint)(w); } +#if 0 /*ARGSUSED*/ static void DoPaint(Widget w) { } +#endif Bool XawTextSinkEndPaint(Widget w) @@ -997,6 +1005,7 @@ XtFree((XtPointer)sink->text_sink.paint); sink->text_sink.paint = NULL; + return (True); } static XawTextPropertyList **prop_lists; @@ -1148,7 +1157,7 @@ XtFree((char*)list); } -XawTextProperty * +static XawTextProperty * _XawTextSinkGetProperty(XawTextPropertyList *list, XrmQuark property) { if (property != NULLQUARK && list && list->properties) { @@ -1189,7 +1198,7 @@ return (ret); } -XawTextProperty * +static XawTextProperty * _XawTextSinkAddProperty(XawTextPropertyList *list, XawTextProperty *property, Bool replace) { Index: xc/lib/Xaw/TextSink.h diff -u xc/lib/Xaw/TextSink.h:1.9 xc/lib/Xaw/TextSink.h:1.10 --- xc/lib/Xaw/TextSink.h:1.9 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/TextSink.h Fri Dec 14 14:54:45 2001 @@ -1,12 +1,16 @@ /* - * $Xorg: TextSink.h,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ + * $Xorg: TextSink.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSink.h,v 1.9 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSink.h,v 1.10 2001/12/14 19:54:45 dawes Exp $ */ #ifndef _XawTextSink_h #define _XawTextSink_h Index: xc/lib/Xaw/TextSinkP.h diff -u xc/lib/Xaw/TextSinkP.h:1.11 xc/lib/Xaw/TextSinkP.h:1.12 --- xc/lib/Xaw/TextSinkP.h:1.11 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/TextSinkP.h Fri Dec 14 14:54:45 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: TextSinkP.h,v 1.3 2000/08/17 19:45:41 cpqbld Exp $ +* $Xorg: TextSinkP.h,v 1.4 2001/02/09 02:03:46 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSinkP.h,v 1.11 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSinkP.h,v 1.12 2001/12/14 19:54:45 dawes Exp $ */ #ifndef _XawTextSinkP_h #define _XawTextSinkP_h Index: xc/lib/Xaw/TextSrc.c diff -u xc/lib/Xaw/TextSrc.c:1.27 xc/lib/Xaw/TextSrc.c:1.30 --- xc/lib/Xaw/TextSrc.c:1.27 Tue Jan 30 10:03:34 2001 +++ xc/lib/Xaw/TextSrc.c Fri Dec 14 14:54:45 2001 @@ -1,9 +1,13 @@ -/* $Xorg: TextSrc.c,v 1.4 2000/08/17 19:45:41 cpqbld Exp $ */ +/* $Xorg: TextSrc.c,v 1.5 2001/02/09 02:03:47 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ */ -/* $XFree86: xc/lib/Xaw/TextSrc.c,v 1.27 2001/01/30 15:03:34 paulo Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrc.c,v 1.30 2001/12/14 19:54:45 dawes Exp $ */ /* * Author: Chris Peterson, MIT X Consortium. @@ -983,7 +987,7 @@ * or similar function, to speed up */ if ((anchor = XawTextSourceFindAnchor(w, left))) { XawTextEntity *eprev, *entity, *enext; - XawTextPosition offset, diff = block->length - (right - left); + XawTextPosition offset = 0, diff = block->length - (right - left); for (i = 0; i < src->textSrc.num_anchors; i++) if (src->textSrc.anchors[i] == anchor) @@ -1572,8 +1576,6 @@ if (position - panchor->position < ANCHORS_DIST) return (panchor); - anchor = XtNew(XawTextAnchor); - if (panchor->cache && panchor->position + panchor->cache->offset + panchor->cache->length < position) pentity = entity = panchor->cache; @@ -1591,6 +1593,10 @@ if (panchor->position + entity->offset < position) position = panchor->position + entity->offset; + if (position == panchor->position) + return (panchor); + + anchor = XtNew(XawTextAnchor); diff = position - panchor->position; panchor->cache = NULL; @@ -1604,8 +1610,10 @@ entity = entity->next; } } - else + else { + anchor = XtNew(XawTextAnchor); anchor->entities = NULL; + } } else { anchor = XtNew(XawTextAnchor); @@ -1943,8 +1951,10 @@ anchor = XawTextSourceFindAnchor(w, position); + position -= position % ANCHORS_DIST; + if (position - anchor->position >= ANCHORS_DIST) - return (XawTextSourceAddAnchor(w, position - (position % ANCHORS_DIST))); + return (XawTextSourceAddAnchor(w, position)); return (anchor); } Index: xc/lib/Xaw/TextSrc.h diff -u xc/lib/Xaw/TextSrc.h:1.11 xc/lib/Xaw/TextSrc.h:1.12 --- xc/lib/Xaw/TextSrc.h:1.11 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/TextSrc.h Fri Dec 14 14:54:45 2001 @@ -1,12 +1,16 @@ /* - * $Xorg: TextSrc.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ + * $Xorg: TextSrc.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSrc.h,v 1.11 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrc.h,v 1.12 2001/12/14 19:54:45 dawes Exp $ */ #ifndef _XawTextSrc_h #define _XawTextSrc_h Index: xc/lib/Xaw/TextSrcP.h diff -u xc/lib/Xaw/TextSrcP.h:1.13 xc/lib/Xaw/TextSrcP.h:1.15 --- xc/lib/Xaw/TextSrcP.h:1.13 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/TextSrcP.h Wed Dec 19 16:37:31 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: TextSrcP.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ +* $Xorg: TextSrcP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/TextSrcP.h,v 1.13 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextSrcP.h,v 1.15 2001/12/19 21:37:31 dawes Exp $ */ #ifndef _XawTextSrcP_h #define _XawTextSrcP_h @@ -53,9 +57,13 @@ /* * TextSrc Object Private Data */ +#include + #include #include /* This source works with the Text widget */ +_XFUNCPROTOBEGIN + #ifndef OLDXAW struct _XawTextAnchor { XawTextPosition position; @@ -250,5 +258,7 @@ #define XtTextSrcExtVersion 1 #define XtTextSrcExtTypeString "XT_TEXTSRC_EXT" #endif + +_XFUNCPROTOEND #endif /* _XawTextSrcP_h */ Index: xc/lib/Xaw/TextTr.c diff -u xc/lib/Xaw/TextTr.c:3.15 xc/lib/Xaw/TextTr.c:3.16 --- xc/lib/Xaw/TextTr.c:3.15 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/TextTr.c Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: TextTr.c,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ +/* $Xorg: TextTr.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/TextTr.c,v 3.15 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TextTr.c,v 3.16 2001/12/14 19:54:45 dawes Exp $ */ /* INTERNATIONALIZATION: Index: xc/lib/Xaw/Toggle.c diff -u xc/lib/Xaw/Toggle.c:1.7 xc/lib/Xaw/Toggle.c:1.9 --- xc/lib/Xaw/Toggle.c:1.7 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/Toggle.c Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Toggle.c,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ +/* $Xorg: Toggle.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Toggle.c,v 1.7 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Toggle.c,v 1.9 2001/12/14 19:54:45 dawes Exp $ */ /* * Author: Chris D. Peterson @@ -498,11 +502,12 @@ if (tw->command.set && radio_group != NULL) XawToggleUnsetCurrent(radio_group); - if (radio_group != NULL) + if (radio_group != NULL) { if ((group = GetRadioGroup(radio_group)) == NULL) CreateRadioGroup(w, radio_group); - else - AddToRadioGroup(group, w); + else + AddToRadioGroup(group, w); + } } /* Index: xc/lib/Xaw/Toggle.h diff -u xc/lib/Xaw/Toggle.h:1.5 xc/lib/Xaw/Toggle.h:1.6 --- xc/lib/Xaw/Toggle.h:1.5 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/Toggle.h Fri Dec 14 14:54:45 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: Toggle.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ + * $Xorg: Toggle.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/Toggle.h,v 1.5 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Toggle.h,v 1.6 2001/12/14 19:54:45 dawes Exp $ */ /* * ToggleP.h - Private definitions for Toggle widget Index: xc/lib/Xaw/ToggleP.h diff -u xc/lib/Xaw/ToggleP.h:1.7 xc/lib/Xaw/ToggleP.h:1.8 --- xc/lib/Xaw/ToggleP.h:1.7 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/ToggleP.h Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ToggleP.h,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ */ +/* $Xorg: ToggleP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/ToggleP.h,v 1.7 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ToggleP.h,v 1.8 2001/12/14 19:54:45 dawes Exp $ */ /* * Author: Chris D. Peterson Index: xc/lib/Xaw/Tree.c diff -u xc/lib/Xaw/Tree.c:1.9 xc/lib/Xaw/Tree.c:1.10 --- xc/lib/Xaw/Tree.c:1.9 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/Tree.c Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Tree.c,v 1.3 2000/08/17 19:45:42 cpqbld Exp $ + * $Xorg: Tree.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ * Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. */ -/* $XFree86: xc/lib/Xaw/Tree.c,v 1.9 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Tree.c,v 1.10 2001/12/14 19:54:45 dawes Exp $ */ #include #include Index: xc/lib/Xaw/Tree.h diff -u xc/lib/Xaw/Tree.h:1.6 xc/lib/Xaw/Tree.h:1.7 --- xc/lib/Xaw/Tree.h:1.6 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/Tree.h Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Tree.h,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ + * $Xorg: Tree.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ * Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. */ -/* $XFree86: xc/lib/Xaw/Tree.h,v 1.6 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Tree.h,v 1.7 2001/12/14 19:54:45 dawes Exp $ */ #ifndef _XawTree_h Index: xc/lib/Xaw/TreeP.h diff -u xc/lib/Xaw/TreeP.h:1.6 xc/lib/Xaw/TreeP.h:1.7 --- xc/lib/Xaw/TreeP.h:1.6 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/TreeP.h Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: TreeP.h,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ + * $Xorg: TreeP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. */ -/* $XFree86: xc/lib/Xaw/TreeP.h,v 1.6 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/TreeP.h,v 1.7 2001/12/14 19:54:45 dawes Exp $ */ #ifndef _XawTreeP_h Index: xc/lib/Xaw/Vendor.c diff -u xc/lib/Xaw/Vendor.c:1.7 xc/lib/Xaw/Vendor.c:1.8 --- xc/lib/Xaw/Vendor.c:1.7 Wed Jan 17 14:42:35 2001 +++ xc/lib/Xaw/Vendor.c Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Vendor.c,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ */ +/* $Xorg: Vendor.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Vendor.c,v 1.7 2001/01/17 19:42:35 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Vendor.c,v 1.8 2001/12/14 19:54:45 dawes Exp $ */ /* * This is a copy of Xt/Vendor.c with an additional ClassInitialize Index: xc/lib/Xaw/VendorEP.h diff -u xc/lib/Xaw/VendorEP.h:1.5 xc/lib/Xaw/VendorEP.h:1.6 --- xc/lib/Xaw/VendorEP.h:1.5 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/VendorEP.h Fri Dec 14 14:54:45 2001 @@ -1,4 +1,4 @@ -/* $Xorg: VendorEP.h,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ */ +/* $Xorg: VendorEP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -30,7 +30,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -47,7 +51,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/VendorEP.h,v 1.5 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/VendorEP.h,v 1.6 2001/12/14 19:54:45 dawes Exp $ */ #ifndef _VendorEP_h #define _VendorEP_h Index: xc/lib/Xaw/Viewport.c diff -u xc/lib/Xaw/Viewport.c:1.9 xc/lib/Xaw/Viewport.c:1.11 --- xc/lib/Xaw/Viewport.c:1.9 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/Viewport.c Fri Dec 14 14:54:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Viewport.c,v 1.3 2000/08/17 19:45:43 cpqbld Exp $ */ +/* $Xorg: Viewport.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xaw/Viewport.c,v 1.9 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Viewport.c,v 1.11 2001/12/14 19:54:45 dawes Exp $ */ #include #include @@ -755,17 +759,19 @@ if (w->viewport.allowvert || w->viewport.allowhoriz) { XtQueryGeometry(child, intended, &preferred); - if (!(intended->request_mode & CWWidth)) + if (!(intended->request_mode & CWWidth)) { if (preferred.request_mode & CWWidth) intended->width = preferred.width; else intended->width = XtWidth(child); + } - if (!(intended->request_mode & CWHeight)) + if (!(intended->request_mode & CWHeight)) { if (preferred.request_mode & CWHeight) intended->height = preferred.height; else intended->height = XtHeight(child); + } } } else { Index: xc/lib/Xaw/Viewport.h diff -u xc/lib/Xaw/Viewport.h:1.6 xc/lib/Xaw/Viewport.h:1.7 --- xc/lib/Xaw/Viewport.h:1.6 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/Viewport.h Fri Dec 14 14:54:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Viewport.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ +/* $Xorg: Viewport.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /************************************************************ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xaw/Viewport.h,v 1.6 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/Viewport.h,v 1.7 2001/12/14 19:54:46 dawes Exp $ */ #ifndef _XawViewport_h #define _XawViewport_h Index: xc/lib/Xaw/ViewportP.h diff -u xc/lib/Xaw/ViewportP.h:1.7 xc/lib/Xaw/ViewportP.h:1.8 --- xc/lib/Xaw/ViewportP.h:1.7 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/ViewportP.h Fri Dec 14 14:54:46 2001 @@ -1,5 +1,5 @@ /* - * $Xorg: ViewportP.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ + * $Xorg: ViewportP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ * Private declarations for ViewportWidgetClass */ @@ -7,7 +7,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xaw/ViewportP.h,v 1.7 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/ViewportP.h,v 1.8 2001/12/14 19:54:46 dawes Exp $ */ #ifndef _ViewportP_h #define _ViewportP_h Index: xc/lib/Xaw/Xaw.man diff -u xc/lib/Xaw/Xaw.man:1.5 xc/lib/Xaw/Xaw.man:1.7 --- xc/lib/Xaw/Xaw.man:1.5 Sat Jan 27 13:20:39 2001 +++ xc/lib/Xaw/Xaw.man Sun Nov 4 16:16:39 2001 @@ -10,7 +10,7 @@ .\" .\" The above copyright notice and this permission notice shall be included in .\" all copies or substantial portions of the Software. -.\" +.\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -26,90 +26,89 @@ .\" .\" Author: Paulo César Pereira de Andrade .\" -.\" $XFree86: xc/lib/Xaw/Xaw.man,v 1.5 2001/01/27 18:20:39 dawes Exp $ +.\" $XFree86: xc/lib/Xaw/Xaw.man,v 1.7 2001/11/04 21:16:39 paulo Exp $ .\" .de TQ .br .ns .TP \\$1 .. -.TH XAW 3 __vendorversion__ - +.TH Xaw 3 __vendorversion__ .SH NAME - XAW \- X Athena Widgets - + Xaw \- X Athena Widgets .SH DESCRIPTION .B Xaw -is a Widget set based on the Xt Intrinsics. This manual page describes the -XFree86 additions and modifications to the Xaw library, as well as some of -the common interfaces. - +is a widget set based on the X Toolkit Intrinsics (Xt) Library. This +manual page describes the additions and modifications to the Xaw library +made by XFree86 (Xaw7), as well as some of the common interfaces between +its version and the previous X Consortium release (Xaw6). .SH ACTIONS -All the \fIXaw\fR widgets now have the additional translations +All of the \fIXaw\fR widgets now have the additional translations .B call-proc, declare, get-values -and \fBset-values\fP. The syntax for these actions is: -.br -.I action-name(boolean-expression, arguments) -.br +and \fBset-values\fP. The syntax for these actions is: +.PP +.I action-name \fP(\fIboolean-expression\fP, \fIarguments\fP) +.PP \fBAction-name\fP is one of \fIcall-proc\fP, \fIdeclare\fP, \fIget-values\fP or \fIset-values\fP. -.br +.PP \fBBoolean-expression\fP is composed with the operators \fI|\fR (or), \fI&\fR (and), \fI^\fR (xor), and \fI~\fR (not). The operands can be a variable name, -that starts with a \fI$\fR; a resource name without the bindings \fI.\fP -and \fI*\fP; or a constant name, including \fImine\fP (event->xany.window +which starts with a \fI$\fR; a resource name without the bindings \fI.\fP +or \fI*\fP; or a constant name, including \fImine\fP (event->xany.window == XtWindow(widget)), \fIfaked\fP (event->xany.send_event != 0), \fItrue\fP (1) and \fIfalse\fP (0). -.br -\fBArguments\fP are self explanatory, when starting with a \fI$\fP they name -a variable, else, a resource name. +.PP +\fBArguments\fP are self-explanatory; when starting with a \fI$\fP they name +a variable, otherise, they indicate a resource name. .TP 8 -.B call-proc -This action allows the evaluation of a boolean expression, in the first -parameter, before calling a action procedure. Only if the expression resolves -to true the procedure is called. Example: +.B call-proc \fP(\fIboolean-expression\fP, \fIprocedure-name\fP) +This action allows the evaluation of a boolean expression in the first +parameter before calling a action procedure. The procedure is only called +if the expression evaluates as true. Example: .br .I call-proc("$inside & $pressed", notify) .TP 8 -.B declare -This action, like \fIget-values\fP is used to create new variables, or -change their value. Example: +.B declare \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...) +This action is used to create new variables or change their values. Any +number of variable-value tuples may be specified. Example: .br .I declare(1, $pressed, 1) .TP 8 -.B get-values -This actions allows reading a resource value into a variable. -Example: +.B get-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...) +This action reads a widget resource value into a variable. Any number of +variable-value tuples may be specified. Example: .br .I get-values(1, $fg, foreground, $bg, background) .TP 8 -.B set-values -This action allow setting a resource in the widget. Example: +.B set-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...) +This action sets a widget resource to the given value, which may be a +variable. Any number of variable-value tuples may be specified. Example: .br .I set-values(1, foreground, $bg, background, $fg) - .PP -Sample translation to make a label widget behave like a button: +Here is a sample translation to make a label widget behave like a button: +.PP .nf : get-values(1, $fg, foreground, $bg, background)\\n\\ : set-values(1, foreground, yellow, background, gray30)\\n\\ : set-values(1, foreground, $fg, background, $bg) .fi - .SH DISPLAY LISTS -All the \fBXaw\fP widgets have now the additional resource \fIdisplayList\fP. -This resource allows drawing the widget decorations with commands embedded -in the resource string. -The displayList resource has the syntax: -.br +All of the \fBXaw\fP widgets have now the additional resource +\fIdisplayList\fP. This resource allows drawing the widget decorations +using commands embedded in a resource string. The displayList resource has +the syntax: +.PP \fI[class-name:]function-name arguments[[{;\\n}]...]\fP -.br +.PP \fBClass-name\fP is any registered set of functions to draw in the widget. -Currently the only existing class is \fIxlib\fP. -.br +Currently the only existing class is \fIxlib\fP, which provides access to +the Xlib drawing primitives. +.PP \fBFunction-name\fP is the drawing or configuration function to be called, described bellow. -.br +.PP \fBArguments\fP may be anything suitable to the displayList function being called. When the function requires a coordinate, the syntax is \fI{+-}\fP or \fI/\fP. Examples: @@ -119,284 +118,283 @@ -+10,-+10 bottom+10, right+10 +0,1/2 left, vertical-center .fi - .TP 8 .B arc-mode \fPmode -Sets the arc mode. Accepted parameters are "pieslice" and "chord", that sets -the arc to ArcPieSlice or ArcChord, respectively. Example: +Sets the arc mode. Accepted \fImode\fPs are "pieslice" and "chord", which +set the arc to ArcPieSlice or ArcChord, respectively. Example: .br .I arc-mode chord .TP 8 .B bg \fPcolor-spec .TQ .B background \fPcolor-spec -Sets the background color. Argument must as valid color specification. -Example: +Sets the background color. \fIcolor-spec\fP must a valid color +specification. Example: .br .I background red .TP 8 .B cap-style \fPstyle -Sets the cap style. Accepted parameters are "notlast", "butt", "round", and -"projecting", that sets the cap style to CapNotLast, CapBut, CapRound or -CapProjecting, respectively. Example: +Sets the cap style. Accepted \fIstyle\fPs are "notlast", "butt", "round", +and "projecting", which set the cap style to CapNotLast, CapBut, CapRound +or CapProjecting, respectively. Example: .br .I cap-style round .TP 8 .B clip-mask \fPpixmap-spec -Sets the pixmap for the clip mask. Requires a pixmap parameter, as described -in the \fBPIXMAPS\fP section of this man page. Example: +Sets the pixmap for the clip mask. Requires a pixmap parameter, as +described in the \fBPIXMAPS\fP section below. Example: .br .I clip-mask xlogo11 .TP 8 .B clip-origin \fPx,y -Sets the clip x and y origin. Requires two arguments, a x and y coordinate. -Example: +Sets the clip x and y origin. Requires two arguments, the x and y +coordinates. Example: .br .I clip-origin 10,10 .TP 8 .B clip-rects \fPx1,y1,x2,y2 [...,xn,yn] .TQ .B clip-rectangles \fPx1,y1,x2,y2 [...,xn,yn] -Sets a list of rectangles to the clip mask. The number of arguments must be -a multiple of four. The arguments are coordinates. The parser calculates the -width and height of the rectangles. Example: +Sets a list of rectangles to the clip mask. The number of arguments must +be a multiple of four. The arguments are coordinates. The parser +calculates the width and height of the rectangles. Example: .br .I clip-rects 0,0,10,20, 20,10,30,30 .TP 8 .B coord-mode \fPmode -Changes the coord mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and -\fIdraw-points\fP. Accepted parameters are "modeorigin" and "previous", that -sets the coord mode to CoordModeOrigin or CoordModePrevious, respectively. -Example: +Changes the coord mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and +\fIdraw-points\fP. Accepted parameters are "modeorigin" and "previous", +that sets the coord mode to CoordModeOrigin or CoordModePrevious, +respectively. Example: .br .I coord-mode previous .TP 8 .B copy-area \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy] -Calls XCopyArea. The character \fI.\fP means copy the window contents, -pixmap-spec is as defined in the \fIPIXMAPS\fP sction of this manual page. -\fIX2\fP, and \fIy2\fP are coordinates of the end copy, not the width and -height; if not defined, the parser calculates it. \fISrc_x\fP and -\fIsrc_y\fP defaults to zero. Example: +Calls XCopyArea. The character \fI.\fP means copy the window contents; +pixmap-spec is as defined in the \fBPIXMAPS\fP section below. \fIX2\fP and +\fIy2\fP are the coordinates of the end copy, not the width and height; if +not defined, the parser calculates them. \fIsrc_x\fP and \fIsrc_y\fP +default to zero. Example: .br .I copy-area Term,10,10 .TP 8 .B copy-plane \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy,plane] -Calls XCopyPlane. The character \fI.\fP means copy the window contents, -pixmap-spec is as defined in the \fIPIXMAPS\fP sction of this manual page. -\fIX2\fP, and \fIy2\fP are coordinates of the end copy, not the width and -height; if not defined, the parser calculates it. \fISrc_x\fP and -\fIsrc_y\fP defaults to zero. \fIPlane\fP defaults to one. Example: +Calls XCopyPlane. The character \fI.\fP means copy the window contents; +pixmap-spec is as defined in the \fBPIXMAPS\fP section below. \fIX2\fP and +\fIy2\fP are the coordinates of the end copy, not the width and height; if +not defined, the parser calculates them. \fIsrc_x\fP and \fIsrc_y\fP +default to zero. \fIPlane\fP defaults to one. Example: .br .I copy-plane star,10,10 .TP 8 .B dashes \fPi1[...,in] -Sets the dashes for line drawing. Accepts up to 127 arguments. Example: +Sets the dashes for line drawing. Accepts up to 127 arguments. Example: .br .I dashes 3,7 9,10 .TP 8 .B draw-arc \fPx1,y1,x2,y2[,start-angle,end-angle] -Draws an arc. The four first arguments are the rectangle enclosing the arc. -The two remaining arguments, if any, are the start and end angle, in -degrees. Example: +Draws an arc. The four first arguments are the rectangle enclosing the +arc. The two remaining arguments, if specified, are the start and end +angle, in degrees. Example: .br .I draw-arc +0,+0,-1,-1,0,90 .TP 8 .B draw-rect \fPx1,y1,x2,y2 .TQ .B draw-rectangle \fPx1,y1,x2,y2 -Draws a rectangle. Requires four arguments, that are the start and end -coordinates. Example: +Draws a rectangle. Requires four arguments, which are the start and end +coordinate pairs. Example: .br .I draw-rect +1,+1,-5,-5 .TP 8 .B draw-string \fPx,y,"string" -Draws a text string. Requires three arguments, a x coordinate, a y -coordinate and a string. Strings that have white spaces can be quoted with -the \fI"\fP character, the character \fI\\\fP can also be used, but, you -need to escape this character twice. Example: +Draws a text string. Requires three arguments, a x coordinate, a y +coordinate, and a string. Strings that have white space can be quoted with +the \fI"\fP character; the backslash character \fI\\\fP can also be used, +but it will be necessary escape it twice. Example: .br \fI draw-string 10,10, "Hello world!"\fP .TP 8 .B exposures \fPboolean -Sets the graphics exposures in the GC. Allowed parameters are a integer or -the strings "true", "false", "on" and "off". Example: +Sets graphics exposures in the GC. Allowed parameters are a integer or the +strings "true", "false", "on" and "off". Example: .br .I exposures true .TP 8 .B fill-arc \fPx1,y1,x2,y2[,start-angle,end-angle] -Like \fIdraw-arc\fP, but fills the contents of the arc with the currently -selected foreground. Example: +Like \fIdraw-arc\fP, but fills the contents of the arc with the currently +selected foreground. Example: .br .I fill-arc +0,+0,-1,-1,0,180 .TP 8 .B fill-poly \fPx1,y1 [...,xn,yn] .TQ .B fill-polygon \fPx1,y1 [...,xn,yn] -Like \fIdraw-lines\fP, but fills the enclosed polygon and joins the first -and last point, if they are not at the same position. Example: +Like \fIdraw-lines\fP, but fills the enclosed polygon and joins the first +and last point, if they are not at the same position. Example: .br .I fill-poly +0,+10, +10,+20, +30,+0 .TP .B fill-rect \fPx1,y1,x2,y2 .TQ .B fill-rectangle \fPx1,y1,x2,y2 -Like \fIdraw-rect\fP, but fills the contents of the rectangle with the -selected foreground color. Example: +Like \fIdraw-rect\fP, but fills the contents of the rectangle with the +selected foreground color. Example: .br .I fill-rect +10,+10,-20,-20 .TP 8 .B fill-rule \fPrule -Sets the fill rule. Accepted parameters are "evenodd" and "winding", that -sets the fill rule to EvenOddRule or WindingRule, respectively. Example: +Sets the fill rule. Accepted parameters are "evenodd" and "winding", which +set the fill rule to EvenOddRule or WindingRule, respectively. Example: .br .I fill-rule winding .TP 8 .B fill-style \fPstyle -Sets the fill style. Allowed parameters are "solid", "tiled", "stippled" and -"opaquestippled", that sets the fill style to FillSolid, FillTiled, -FillStippled or FillOpaqueStippled, respectively. Example: +Sets the fill style. Allowed parameters are "solid", "tiled", "stippled" and +"opaquestippled", which set the fill style to FillSolid, FillTiled, +FillStippled or FillOpaqueStippled, respectively. Example: .br .I fill-style tiled .TP 8 .B font \fPfont-spec -Sets the font for text functions. Example: +Sets the font for text functions. Example: .br .I font -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1 .TP 8 .B fg \fPcolor-spec .TQ .B foreground \fPcolor-spec -Like \fIbackground\fP, but sets the current foreground color. Example: +Like \fIbackground\fP, but sets the current foreground color. Example: .br .I foreground blue .TP 8 .B mask -This command is useful when you want to draw only in the region that really -needs to be repainted. Requires no arguments. +This command is useful when you want to draw only in the region that really +needs to be repainted. Requires no arguments. .TP 8 .B function \fPfunction-spec -Sets the specific GC function. Allowed parameters are "set", "clear", "and", -"andreverse", "copy", "andinverted", "noop", "xor", "or", "nor", "equiv", -"invert", "orreverse", "copyinverted" and "nand", that set the function to -GXset, GXclear, GXand, GXandReverse, GXcopy, GXandInverted, GXnoop, GXxor, -GXor, GXnor, GXequiv, GXinvert, GXorReverse, GXcopyInverted or GXnand, -respectively. Example: +Sets the specific GC function. Allowed parameters are "set", "clear", "and", +"andreverse", "copy", "andinverted", "noop", "xor", "or", "nor", "equiv", +"invert", "orreverse", "copyinverted" and "nand", which set the function to +GXset, GXclear, GXand, GXandReverse, GXcopy, GXandInverted, GXnoop, GXxor, +GXor, GXnor, GXequiv, GXinvert, GXorReverse, GXcopyInverted or GXnand, +respectively. Example: .br .I function xor .TP 8 .B join-style \fPstyle -Sets the join style. Allowed parameters are "miter", "round" and "bevel", -that sets the join style to JoinMiter, JoinRound and JoinBevel, -respectively. Example: +Sets the join style. Allowed parameters are "miter", "round" and "bevel", +which set the join style to JoinMiter, JoinRound and JoinBevel, +respectively. Example: .br .I join-style round .TP 8 .B image \fP{pixmap-spec},xs,ys,[xe,ye] -This function is implemented as a way to quickly compose complex decorations in -widgets. \fIPixmap-spec\fP is as defined in the \fIPIXMAPS\fP section of this -manual page, \fIxs\fP and \fIys\fP are the coodinates from where start copying -the pixmap, \fIxe\fP and \fIye\fP are optional (defaults to xs + pixmap.width -and ys + pixmap.height respectively). If the pixmap has a mask, the copy is -masked accordingly. Example: +This function is implemented as a way to quickly compose complex +decorations in widgets. \fIPixmap-spec\fP is as defined in the +\fBPIXMAPS\fP section below. \fIxs\fP and \fIys\fP are the coodinates from +where to start copying the pixmap; \fIxe\fP and \fIye\fP are optional (they +default to xs + pixmap.width and ys + pixmap.height, respectively). If the +pixmap has a mask, the copy is masked accordingly. Example: .br .I image pixmap.xpm,0,0,20,20 .TP 8 .B line \fPx1,y1,x2,y2 .TQ .B draw-line \fPx1,y1,x2,y2 -Draws a line with the current foreground color. Require four arguments. -Example: +Draws a line with the current foreground color. Requires four arguments, +the starting and ending coordinate pairs. Example: .br .I line +0,+0, -1,-1 .TP 8 .B line-width \fPinteger -Allow selecting a different line width for the drawing. Example: +Selects a line width for drawing. Example: .br .I line-width 2 .TP 8 .B line-style \fPstyle -Sets the line style. Accepted parameters are "solid", "onoffdash" and -"doubledash", that sets the line style to LineSolid, LineOnOffDash or -LineDoubleDash, respectively. Example: +Sets the line style. Accepted parameters are "solid", "onoffdash" and +"doubledash", which set the line style to LineSolid, LineOnOffDash or +LineDoubleDash, respectively. Example: .br .I line-style onoffdash .TP 8 .B lines \fPx1,y1,x2,y2 [...,xn,yn] .TQ .B draw-lines \fPx1,y1,x2,y2 [...,xn,yn] -Draws a list of lines. Any number of arguments may be supplied. Example: +Draws a list of lines. Any number of argument pairs may be supplied. +Example: .br .I lines +0,-1, -1,-1, -1,+0 .TP 8 .B paint-string \fPx,y,"string" -Identical to draw-string, but also uses the background color. Example: +Identical to draw-string, but also uses the background color. Example: .br \fI paint-string 10,20, "Sample text"\fP .TP 8 .B point \fPx,y .TQ .B draw-point \fPx,y -Draws a point. Requires two arguments. Example: +Draws a point. Requires two arguments, a coordinate pair. Example: .br .I point +10,+10 .TP 8 .B plane-mask \fPinteger -Allows setting the plane mask. Requires a integer parameter. Example: +Sets the plane mask. Requires an integer parameter. Example: .br .I plane-mask -1 .TP 8 .B points \fPx1,y1 [...,xn,yn] .TQ .B draw-points \fPx1,y1 [...,xn,yn] -Draws a list of points at the specified coordinates. Example: +Draws a list of points at the specified coordinates. Example: .br .I points +1,+2, +1,+4, +1,+6 .TP 8 .B segments \fPx1,y1,x2,y2 [...,xn,yn] .TQ .B draw-segments \fPx1,y1,x2,y2 [...,xn,yn] -Draws a list of segment lines. Number of parameters must be multiple of 4. -Example: +Draws a list of segment lines. The number of parameters must be multiple +of 4. Example: .br .I segments +1,+2,+1,-3, +2,-2,-3,-2 .TP 8 .B shape-mode \fPmode -Allows setting the shape mode used in \fIfill-polygon\fP. Accepted -parameters are "complex", "convex" or "nonconvex", that sets the shape mode -to Complex, Convex or Nonconvex, accordingly. Example: +Sets the shape mode used in \fIfill-polygon\fP. Accepted parameters are +"complex", "convex" or "nonconvex", which set the shape mode to Complex, +Convex or Nonconvex, accordingly. Example: .br .I shape-mode convex .TP 8 .B stipple \fPpixmap-spec -Sets the pixmap for the stipple. Requires a pixmap parameter, as described -in the \fBPIXMAPS\fP section of this man page. Example: +Sets the pixmap for a stipple. Requires a pixmap parameter, as described +in the \fBPIXMAPS\fP section below. Example: .br .I stipple plaid .TP 8 .B subwindow-mode \fPmode -Sets the subwindow mode in the GC. Accepted parameters are -"includeinferiors" and "clipbychildren", that sets the subwindow mode to -IncludeInferiors or ClipByChildren, respectively. Example: +Sets the subwindow mode in the GC. Accepted parameters are +"includeinferiors" and "clipbychildren", which set the subwindow mode to +IncludeInferiors or ClipByChildren, respectively. Example: .br .I subwindow-mode includeinferiors .TP 8 .B tile \fPpixmap-spec -Sets the pixmap for the tile. Requires a pixmap parameter, as described in -the \fBPIXMAPS\fP section of this man page. Example: +Sets the pixmap for a tile. Requires a pixmap parameter, as described +in the \fBPIXMAPS\fP section below. Example: .br .I tile xlogo11?foreground=red&background=gray80 .TP 8 .B ts-origin \fPx,y -Sets the tile stipple x and y origin. Requires two arguments, a x and y -coordinate. Example: +Sets the tile stipple x and y origin. Requires two arguments, a x and y +coordinate. Example: .br .I ts-origin 10,10 .TP 8 .B umask -Disables the gc mask, when it was set with the command \fImask\fP. Requires -no arguments. - +Disables the GC mask, if it has been set with the command \fImask\fP. +Requires no arguments. .PP Example for drawing a shadow effect in a widget: .nf @@ -405,81 +403,94 @@ foreground gray85;\\ draw-lines -1,+0,+0,+0,+0,-1 .fi - .SH PIXMAPS -A String to Pixmap converter was added to \fBXaw\fP. This converter is meant to -be extended, and has enough abstraction to allow loading several image formats. -It uses a format that resembles a \fIURL\fP, with the syntax: -.br +A String to Pixmap converter has been added to \fBXaw\fP. This converter +is meant to be extended, and has enough abstraction to allow loading +several image formats. It uses a format that resembles a \fIURL\fP, with +the syntax: +.PP .I [type:]name[?arg=val[{&}...]] -.br -\fBType\fP actually can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP. -.br +.PP +\fBType\fP can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP. +.PP \fBName\fP may be a file name, or, in the case of type \fIgradient\fP, may be either \fIvertical\fP or \fIhorizontal\fP. -.br -\fBArg=val\fP is a list of arguments to the converter. The most common arguments -are \fIforeground\fP and \fIbackground\fP. Gradients supports also the arguments -\fIstart\fP and \fIend\fP (colors to start and end the gradient); the -\fPsteps\fP argument, to allow using less colors; and the \fIsize\fP argument -to specify the size of the gradient. The \fIxpm\fP converter understands the -\fIcloseness\fP argument, that helps using less colors (useful if you have a -limited colormap). - +.PP +\fBArg=val\fP is a list of arguments to the converter. An argument list is +preceded by a question mark, and multiple arguments are separated by +ampersands. The most common arguments are \fIforeground\fP and +\fIbackground\fP. Gradients also support the arguments \fIstart\fP and +\fIend\fP (colors with which to start and end the gradient); the +\fPsteps\fP argument, to allow using less colors; and the \fIdimension\fP +argument to specify the size of the gradient. The \fIxpm\fP converter +understands the \fIcloseness\fP argument, which aids in using fewer colors +(useful if you have a limited colormap). .SH TEXT WIDGET Most of the changes to this version of the Xaw library were done in the -TextWidget, TextSrcObject, TextSinkObject and related files. The text widget -is based in the emacs text editor. In this release, the emacs compatibility -was increased. New text actions include: +TextWidget, TextSrcObject, TextSinkObject and related files. +.PP +A couple of highly visible changes in the Text widget are due to many bugs +in the Xaw6 implementation involving scrollbars and auto-resizing. +Scrollbars being added or removed caused several problems in keeping the +text cursor visible, and in Xaw6 it was very easy to have a widget thinking +the cursor was visible, when it was not. Also, permitting automatic +resizing of the widget to a larger geometry created other problems, making +it difficult to have a consistent layout in the application, and, if the +window manager did not interfere, windows larger than the screen could +result. Therefore, some functionality involving scrollbars and +auto-resizing has been disabled; see the section on new and modified +Text widget resources below. +.PP +The Text widget's default key bindings were originally based on the Emacs +text editor. In this release, even more operations familiar to Emacs users +have been added. New text actions include: .TP 8 .B indent -This action allow indenting text blocks. It is not enabled by default. A -translation to call this action was added to the \fIxedit\fP editor, binded to -\fIControlX,Tab\fP. +Indents text blocks. Not bound by default. The Text widget also does not +attempt to perform auto-indentation of its source object by default. .TP 8 .B keyboard-reset -Resets the keyboard state. Reverts the multiply to 1, and if undo is enabled, -toggle between undo and redo. Binded by default to \fIControlG\fP. +Resets the keyboard state. Reverts the action multiplier to 1, and if undo +is enabled, toggles between undo and redo. Bound by default to +\fIControlG\fP. .TP 8 .B kill-ring-yank In this version of Xaw, text killed in any text field is kept in memory, -allowing to cut and paste internally to the program between text fields. -The default key binding to this actions is \fIMetaY\fP. +allowing cut and paste operations internally to the program between text +fields. Bound by default to \fIMetaY\fP. .TP 8 .B numeric -Listed here only for purposes of documentation. It is called by default when -one of the characters \fI1, 2, 3, 4, 5, 6, 7, 8, 9, 0,\fP or \fI-\fP is typed, -allowing composing the multiplication number of text actions. +Listed here only for purposes of documentation. Called by default when one +of the characters \fI1, 2, 3, 4, 5, 6, 7, 8, 9, 0,\fP or \fI-\fP is typed, +allowing composition of the multiplication number of text actions. .TP 8 .B set-keyboard-focus -This action is normally binded to the \fI\fP event. Will set the input -focus on the top level widget to the text field. Not enabled by default. +Sets the input focus of the top level widget to the text field. Not +enabled by default, but bound to the \fI\fP event. .TP 8 .B toggle-overwrite -This action toggles overwrite mode. In overwrite mode, any text inserted in -a text field will replace existing text. Normally binded to \fIInsert\fP. +Toggles overwrite mode. In overwrite mode, any text inserted in a text +field will replace existing text. Bound by default to \fIInsert\fP. .TP 8 .B undo -Binded by default to \fIControl_\fP, will call the undo function. Undo is -not enabled by default. It is enabled setting the \fIenableUndo\fP resource of -the textSrcObject. - +Sets the \fIenableUndo\fP resource of the textSrcObject. Not enabled by +default, but bound to \fIControl_\fP. .PP -The new text resources include: +New and modified Text widget resources include: .TP 8 .B justify (\fPClass\fB Justify) -Sets the text justification. Can be one of \fIleft, right, center\fP or -\fIfull\fP. Only enabled when the \fIautoFill\fP resource is set, and the +Sets the text justification. Can be one of \fIleft, right, center\fP, or +\fIfull\fP. Only enabled when the \fIautoFill\fP resource is set, and the resources \fIleftColumn\fP and \fIrightColumn\fP are correctly set. .TP 8 .B leftColumn (\fPClass\fB Column) -Specifies the left column to break text. Text lines started with a alphanumeric -character will automatically start at this column. +Specifies the left column at which to break text. Text lines started with +an alphanumeric character will automatically start at this column. .TP 8 .B positionCallback (\fPClass\fB Callback) -Allows installing a callback that will be called every time the cursor is -moved and/or the file change its size. The callback is called with a pointer -containing the following data: +Allows installation of a callback to be called every time the cursor is +moved, and/or the file changes its size. The callback is called with a +pointer to a structure containing the following data: .nf typedef struct { int line_number; @@ -489,67 +500,87 @@ Boolean overwrite_mode; } XawTextPositionInfo; .fi -This callback is intended to help programmers to write text editors based on -the Xaw widget set. +This callback is intended to help programmers write text editors based +on the Xaw widget set. .TP 8 +.B resize (\fPClass\fB Resize) +No longer supported, but recognized for backward compatibility with +resource specifications written for the Xaw6 Text widget. +.TP 8 .B rightColumn (\fPClass\fB Column) -Specifies the right column to break text. Text lines started with a alphanumeric -character will automatically end at this column. - +Specifies the right column at which to break text. Text lines started with +an alphanumeric character will automatically end at this column. +.TP 8 +.B scrollHorizontal (\fPClass\fB Scroll) +.TQ +.B scrollVertical (\fPClass\fB Scroll) +These resources control the placement of scrollbars on the left and bottom +edges of the Text widget. They accept the values \fIXawtextScrollAlways\fP +and \fIXawtextScrollNever\fP. A converter is registerd for this resource +that will convert the following strings: \fIalways\fP and \fInever\fP. The +value \fIXawtextScrollWhenNeeded\fP (and \fIwhenNeeded\fP, recognized by +the converter), is accepted for backwards compatibilty with resource +specifications written for the Xaw6 Text widget, but ignored (effectively +treated as \fIXawtextScrollNever\fP). .SH TEXT SOURCE OBJECT -The textSrcObject was modified to allow showing its contents in more than one -window, and also store undo information. The new resources for the textSrcObject +The textSrcObject allows display of its contents to more than one window, +and also stores undo information. The new resources for the textSrcObject are: .TP 8 .B callback (\fPClass\fB Callback) -Previous versions of Xaw had this resource in the subclasses. This was changed -to make it possible to tell the callback the state of the text, when undo is -enabled. +Previous versions of Xaw had this resource in subclasses of the TextSource +object. This was changed to make it possible to tell the callback the +state of the text when undo is enabled. .TP 8 .B enableUndo (\fPClass\fB Undo) -A boolean resource, that enables or disables the undo function. The default +A boolean resource that enables or disables the undo function. The default value is False. .TP 8 .B sourceChanged (\fPClass\fB Changed) -Like the callback resource, it was on the subclasses on previous versions. Now -it is in the textSrcObject to control the changed/unchanged state, when undo -is enabled. - +Like the callback resource, this resource was previously in subclasses of +the TextSource object. It is now in the textSrcObject to control the +changed/unchanged state when undo is enabled. .SH TEXT SINK OBJECT -The textSinkObject subclasses asciiSinkObject and multiSinkObject were slightly -changed to offer a new cursor shape, that indicates the input focus of the -text widget and allow setting its color. The new resource is: +The textSinkObject subclasses asciiSinkObject and multiSinkObject have been +changed slightly to use a new cursor shape (no longer a caret at the +baseline) that indicates the input focus of the text widget, and allow +specification of the cursor color. The new resource is: .TP 8 .B cursorColor (\fPClass\fB Color) -Allows setting the cursor color of the text. This color is also used to draw +Sets the cursor color of the text. This color is also used to draw selected text. - .SH SIMPLE MENU WIDGET -The simpleMenuWidget algorithm to lay out menu entries was changed to -enable multiple columns when one single column does not fit in the screen. -It was also modified to enable sub menus. - +The simpleMenuWidget algorithm to lay out menu entries has been changed to +enable multiple columns when a single column does not fit on the screen. +It was also modified to enable submenus. .SH SME BSB OBJECT -A new resource was added to the smeBSBObject, to allow binding sub menus to -it. The new resource is: +A new resource has been added to the smeBSBObject to allow binding submenus +to it. The new resource is: .TP 8 .B menuName (\fPClass\fB MenuName) -The name of the popup widget to be popped up when the pointer is over the -menu entry, or NULL. Note that the named menu must be a child of the popup -parent of the smeBSBObject. - +Specifies the name of the popup widget to be popped up when the pointer is +over the menu entry, or NULL. Note that the named menu must be a child of +the popup parent of the smeBSBObject. .SH RESTRICTIONS .B Xaw -is actually being actively worked. Programs intending to be fully compatible -with future releases of the Xaw library should use only the public -interfaces. While widget subclassification is not a bad, and some times -encouraged programming practice, programs that access private data -structures may have problems with newer releases, in the current stage of -the +is actively being developed. Programs intending to be fully compatible +with future releases of the Xaw library should use only the public +interfaces. While widget subclassification is not a bad thing, and +sometimes an encouraged programming practice, programs that access private +data structures may have problems with newer releases in the current stage +of .I Xaw -development. Several efforts are being done to avoid such problems, and, at -least, guarantee that newer releases will be source and binary compatible. - +development. Efforts are being made to avoid such problems and to guarantee +that newer releases will be source and binary compatible. .SH AUTHORS -The XFree86 additions and modifications to \fIXaw\fR, were written by Paulo -Cesar Pereira de Andrade +The original X Consortium version of the Athena Widget Set and its +documentation were the work of many people, including Chris D. Peterson, +Ralph Swick, Mark Ackerman, Donna Converse, Jim Fulton, Loretta +Guarino-Reid, Charles Haynes, Rich Hyde, Mary Larson, Joel McCormack, Ron +Newman, Jeanne Rich, Terry Weissman, Mike Gancarz, Phil Karlton, Kathleen +Langone, Ram Rao, Smokey Wallace, Al Mento, and Jean Diaz. +.PP +XFree86's additions and modifications to \fIXaw\fR were written by Paulo +C\('esar Pereira de Andrade. +.SH SEE ALSO +.I Athena Widget Set - C Language Interface Index: xc/lib/Xaw/XawI18n.c diff -u xc/lib/Xaw/XawI18n.c:1.7 xc/lib/Xaw/XawI18n.c:1.8 --- xc/lib/Xaw/XawI18n.c:1.7 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/XawI18n.c Fri Dec 14 14:54:46 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XawI18n.c,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ +/* $Xorg: XawI18n.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /* Copyright 1991 NCR Corporation - Dayton, Ohio, USA */ @@ -32,7 +32,11 @@ Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -49,7 +53,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawI18n.c,v 1.7 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawI18n.c,v 1.8 2001/12/14 19:54:46 dawes Exp $ */ #include #include "XawI18n.h" Index: xc/lib/Xaw/XawI18n.h diff -u xc/lib/Xaw/XawI18n.h:3.11 xc/lib/Xaw/XawI18n.h:3.14 --- xc/lib/Xaw/XawI18n.h:3.11 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/XawI18n.h Fri Dec 14 14:54:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XawI18n.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ +/* $Xorg: XawI18n.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /************************************************************ Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -/* $XFree86: xc/lib/Xaw/XawI18n.h,v 3.11 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawI18n.h,v 3.14 2001/12/14 19:54:46 dawes Exp $ */ #ifdef HAS_WCTYPE_H #include @@ -56,13 +60,11 @@ #endif #endif -#ifdef __QNX__ +#ifdef QNX4 #define toascii( c ) ((unsigned)(c) & 0x007f) #endif -#ifndef X_NOT_STDC_ENV #include -#endif #ifdef USE_XWCHAR_STRING int _Xwcslen Index: xc/lib/Xaw/XawIm.c diff -u xc/lib/Xaw/XawIm.c:1.12 xc/lib/Xaw/XawIm.c:1.14 --- xc/lib/Xaw/XawIm.c:1.12 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/XawIm.c Fri Dec 14 14:54:46 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XawIm.c,v 1.4 2000/08/17 19:45:44 cpqbld Exp $ */ +/* $Xorg: XawIm.c,v 1.6 2001/02/09 02:03:47 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -31,7 +31,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,7 +52,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawIm.c,v 1.12 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawIm.c,v 1.14 2001/12/14 19:54:46 dawes Exp $ */ #include #include @@ -63,13 +67,7 @@ #include "XawI18n.h" #include -#if NeedVarargsPrototypes -# include -# define Va_start(a,b) va_start(a,b) -#else -# include -# define Va_start(a,b) va_start(a) -#endif +#include #define maxAscentOfFontSet(fontset) \ ( - (XExtentsOfFontSet((fontset)))->max_logical_extent.y) Index: xc/lib/Xaw/XawImP.h diff -u xc/lib/Xaw/XawImP.h:3.8 xc/lib/Xaw/XawImP.h:3.9 --- xc/lib/Xaw/XawImP.h:3.8 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/XawImP.h Fri Dec 14 14:54:46 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XawImP.h,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ */ +/* $Xorg: XawImP.h,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /* * Copyright 1991 by OMRON Corporation @@ -30,7 +30,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -47,7 +51,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawImP.h,v 3.8 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawImP.h,v 3.9 2001/12/14 19:54:46 dawes Exp $ */ #ifndef _XawImP_h #define _XawImP_h Index: xc/lib/Xaw/XawInit.c diff -u xc/lib/Xaw/XawInit.c:1.9 xc/lib/Xaw/XawInit.c:1.10 --- xc/lib/Xaw/XawInit.c:1.9 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/XawInit.c Fri Dec 14 14:54:46 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: XawInit.c,v 1.3 2000/08/17 19:45:44 cpqbld Exp $ + * $Xorg: XawInit.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -28,7 +32,7 @@ * call this routine from their ClassInitialize procs (this routine may be * used as the class init proc). */ -/* $XFree86: xc/lib/Xaw/XawInit.c,v 1.9 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawInit.c,v 1.10 2001/12/14 19:54:46 dawes Exp $ */ #include #include Index: xc/lib/Xaw/XawInit.h diff -u xc/lib/Xaw/XawInit.h:1.12 xc/lib/Xaw/XawInit.h:1.13 --- xc/lib/Xaw/XawInit.h:1.12 Wed Jan 17 14:42:36 2001 +++ xc/lib/Xaw/XawInit.h Fri Dec 14 14:54:46 2001 @@ -1,8 +1,12 @@ -/* $Xorg: XawInit.h,v 1.4 2000/08/17 19:45:44 cpqbld Exp $ +/* $Xorg: XawInit.h,v 1.5 2001/02/09 02:03:47 xorgcvs Exp $ * Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -18,7 +22,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xaw/XawInit.h,v 1.12 2001/01/17 19:42:36 dawes Exp $ */ +/* $XFree86: xc/lib/Xaw/XawInit.h,v 1.13 2001/12/14 19:54:46 dawes Exp $ */ #ifndef _XawInit_h #define _XawInit_h Index: xc/lib/Xaw/sharedlib.c diff -u xc/lib/Xaw/sharedlib.c:1.1.1.3 xc/lib/Xaw/sharedlib.c:1.2 --- xc/lib/Xaw/sharedlib.c:1.1.1.3 Tue Jan 16 17:18:58 2001 +++ xc/lib/Xaw/sharedlib.c Fri Dec 14 14:54:46 2001 @@ -1,9 +1,13 @@ -/* $Xorg: sharedlib.c,v 1.3 2000/08/17 19:45:45 cpqbld Exp $ */ +/* $Xorg: sharedlib.c,v 1.4 2001/02/09 02:03:47 xorgcvs Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xbsd/Berklib.c diff -u xc/lib/Xbsd/Berklib.c:3.7 xc/lib/Xbsd/Berklib.c:3.9 --- xc/lib/Xbsd/Berklib.c:3.7 Wed Jan 17 14:42:42 2001 +++ xc/lib/Xbsd/Berklib.c Fri Dec 14 14:54:54 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Berklib.c,v 1.3 2000/08/17 19:45:46 cpqbld Exp $ */ +/* $Xorg: Berklib.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/Xbsd/Berklib.c,v 3.7 2001/01/17 19:42:42 dawes Exp $ */ +/* $XFree86: xc/lib/Xbsd/Berklib.c,v 3.9 2001/12/14 19:54:54 dawes Exp $ */ /* @@ -77,7 +81,7 @@ #include -#if (__STDC__ && !defined(X_NOT_STDC_ENV)) || defined(SVR4) || defined(hpux) +#if (__STDC__) || defined(SVR4) || defined(hpux) #include Index: xc/lib/Xdmcp/A8Eq.c diff -u xc/lib/Xdmcp/A8Eq.c:1.1.1.3 xc/lib/Xdmcp/A8Eq.c:1.2 --- xc/lib/Xdmcp/A8Eq.c:1.1.1.3 Tue Jan 16 17:19:09 2001 +++ xc/lib/Xdmcp/A8Eq.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: A8Eq.c,v 1.3 2000/08/17 19:45:46 cpqbld Exp $ + * $Xorg: A8Eq.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/AA16.c diff -u xc/lib/Xdmcp/AA16.c:1.3 xc/lib/Xdmcp/AA16.c:1.4 --- xc/lib/Xdmcp/AA16.c:1.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/AA16.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: AA16.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ + * $Xorg: AA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AA16.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AA16.c,v 1.4 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/AA32.c diff -u xc/lib/Xdmcp/AA32.c:1.3 xc/lib/Xdmcp/AA32.c:1.4 --- xc/lib/Xdmcp/AA32.c:1.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/AA32.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: AA32.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ + * $Xorg: AA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AA32.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AA32.c,v 1.4 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/AA8.c diff -u xc/lib/Xdmcp/AA8.c:1.3 xc/lib/Xdmcp/AA8.c:1.4 --- xc/lib/Xdmcp/AA8.c:1.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/AA8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: AA8.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ + * $Xorg: AA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AA8.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AA8.c,v 1.4 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Alloc.c diff -u xc/lib/Xdmcp/Alloc.c:3.3 xc/lib/Xdmcp/Alloc.c:3.5 --- xc/lib/Xdmcp/Alloc.c:3.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/Alloc.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Alloc.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ + * $Xorg: Alloc.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Alloc.c,v 3.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Alloc.c,v 3.5 2001/12/14 19:54:54 dawes Exp $ */ /* stubs for use when Xalloc, Xrealloc and Xfree are not defined */ @@ -31,12 +35,7 @@ #include #include #include - -#ifndef X_NOT_STDC_ENV #include -#else -char *malloc(size_t), *realloc(char *, size_t); -#endif void * Xalloc (unsigned long amount) Index: xc/lib/Xdmcp/AofA8.c diff -u xc/lib/Xdmcp/AofA8.c:1.3 xc/lib/Xdmcp/AofA8.c:1.4 --- xc/lib/Xdmcp/AofA8.c:1.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/AofA8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: AofA8.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ + * $Xorg: AofA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/AofA8.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/AofA8.c,v 1.4 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/CA8.c diff -u xc/lib/Xdmcp/CA8.c:1.1.1.3 xc/lib/Xdmcp/CA8.c:1.2 --- xc/lib/Xdmcp/CA8.c:1.1.1.3 Tue Jan 16 17:19:21 2001 +++ xc/lib/Xdmcp/CA8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: CA8.c,v 1.3 2000/08/17 19:45:47 cpqbld Exp $ + * $Xorg: CA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/CmpKey.c diff -u xc/lib/Xdmcp/CmpKey.c:1.3 xc/lib/Xdmcp/CmpKey.c:1.4 --- xc/lib/Xdmcp/CmpKey.c:1.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/CmpKey.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: CmpKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: CmpKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/CmpKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/CmpKey.c,v 1.4 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/DA16.c diff -u xc/lib/Xdmcp/DA16.c:1.5 xc/lib/Xdmcp/DA16.c:1.6 --- xc/lib/Xdmcp/DA16.c:1.5 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/DA16.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: DA16.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: DA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/DA16.c,v 1.5 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/DA16.c,v 1.6 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/DA32.c diff -u xc/lib/Xdmcp/DA32.c:1.4 xc/lib/Xdmcp/DA32.c:1.5 --- xc/lib/Xdmcp/DA32.c:1.4 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/DA32.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: DA32.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: DA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/DA8.c diff -u xc/lib/Xdmcp/DA8.c:1.4 xc/lib/Xdmcp/DA8.c:1.5 --- xc/lib/Xdmcp/DA8.c:1.4 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/DA8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: DA8.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: DA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/DAofA8.c diff -u xc/lib/Xdmcp/DAofA8.c:1.4 xc/lib/Xdmcp/DAofA8.c:1.5 --- xc/lib/Xdmcp/DAofA8.c:1.4 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/DAofA8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: DAofA8.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: DAofA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/DecKey.c diff -u xc/lib/Xdmcp/DecKey.c:1.3 xc/lib/Xdmcp/DecKey.c:1.4 --- xc/lib/Xdmcp/DecKey.c:1.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/DecKey.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: DecKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: DecKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/DecKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/DecKey.c,v 1.4 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Fill.c diff -u xc/lib/Xdmcp/Fill.c:3.7 xc/lib/Xdmcp/Fill.c:3.9 --- xc/lib/Xdmcp/Fill.c:3.7 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/Fill.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Fill.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: Fill.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Fill.c,v 3.7 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Fill.c,v 3.9 2001/12/14 19:54:54 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ @@ -39,17 +43,14 @@ #ifdef WIN32 #include #else -#ifndef MINIX #ifndef Lynx #include #else #include #endif /* !Lynx */ -#endif /* !MINIX */ #endif #endif -#ifndef MINIX int XdmcpFill (fd, buffer, from, fromlen) int fd; @@ -96,49 +97,3 @@ } return TRUE; } -#else /* MINIX */ -int -MNX_XdmcpFill (fd, buffer, from, fromlen, data, datalen) - int fd; - XdmcpBufferPtr buffer; - XdmcpNetaddr from; /* return */ - int *fromlen; /* return */ - char *data; - int datalen; -{ - BYTE *newBuf; - struct sockaddr_in *from_addr; - udp_io_hdr_t *udp_io_hdr; - - if (buffer->size < XDM_MAX_MSGLEN) - { - newBuf = (BYTE *) Xalloc (XDM_MAX_MSGLEN); - if (newBuf) - { - Xfree (buffer->data); - buffer->data = newBuf; - buffer->size = XDM_MAX_MSGLEN; - } - } - buffer->pointer = 0; - udp_io_hdr= (udp_io_hdr_t *)data; - data += sizeof(udp_io_hdr_t) + udp_io_hdr->uih_ip_opt_len; - datalen -= sizeof(udp_io_hdr_t) + udp_io_hdr->uih_ip_opt_len; - buffer->count= udp_io_hdr->uih_data_len; - if (buffer->count > datalen) - { - buffer->count= 0; - return FALSE; - } - bcopy(data, (char *)buffer->data, buffer->count); - from_addr= (struct sockaddr_in *)from; - from_addr->sin_family= AF_INET; - from_addr->sin_addr.s_addr= udp_io_hdr->uih_src_addr; - from_addr->sin_port= udp_io_hdr->uih_src_port; - if (buffer->count < 6) { - buffer->count = 0; - return FALSE; - } - return TRUE; -} -#endif /* !MINIX */ Index: xc/lib/Xdmcp/Flush.c diff -u xc/lib/Xdmcp/Flush.c:3.6 xc/lib/Xdmcp/Flush.c:3.8 --- xc/lib/Xdmcp/Flush.c:3.6 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/Flush.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Flush.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: Flush.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Flush.c,v 3.6 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Flush.c,v 3.8 2001/12/14 19:54:54 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ @@ -39,13 +43,11 @@ #ifdef WIN32 #include #else -#ifndef MINIX #ifndef Lynx #include #else #include #endif /* !Lynx */ -#endif /* !MINIX */ #endif #endif @@ -57,13 +59,6 @@ int tolen; { int result; -#ifdef MINIX - struct sockaddr_in *to_addr; - char *b; - udp_io_hdr_t *udp_io_hdr; - int flags, s_errno; -#endif /* MINIX */ - #ifdef STREAMSCONN struct t_unitdata dataunit; @@ -76,33 +71,10 @@ if (result < 0) return FALSE; #else -#ifndef MINIX result = sendto (fd, (char *)buffer->data, buffer->pointer, 0, (struct sockaddr *)to, tolen); if (result != buffer->pointer) return FALSE; -#else /* MINIX */ - to_addr= (struct sockaddr_in *)to; - b= (char *)Xalloc(buffer->pointer + sizeof(udp_io_hdr_t)); - if (b == NULL) - return FALSE; - udp_io_hdr= (udp_io_hdr_t *)b; - bcopy((char *)buffer->data, b+sizeof(udp_io_hdr_t), buffer->pointer); - udp_io_hdr->uih_dst_addr= to_addr->sin_addr.s_addr; - udp_io_hdr->uih_dst_port= to_addr->sin_port; - udp_io_hdr->uih_ip_opt_len= 0; - udp_io_hdr->uih_data_len= buffer->pointer; - - /* Make the write synchronous by turning of asynch I/O */ - flags= fcntl(fd, F_GETFD); - fcntl(fd, F_SETFD, flags & ~FD_ASYNCHIO); - result= write(fd, b, buffer->pointer + sizeof(udp_io_hdr_t)); - s_errno= errno; - Xfree(b); - fcntl(fd, F_SETFD, flags); - if (result != buffer->pointer + sizeof(udp_io_hdr_t)) - return FALSE; -#endif /* MINIX */ #endif return TRUE; } Index: xc/lib/Xdmcp/GenKey.c diff -u xc/lib/Xdmcp/GenKey.c:3.6 xc/lib/Xdmcp/GenKey.c:3.8 --- xc/lib/Xdmcp/GenKey.c:3.6 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/GenKey.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: GenKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: GenKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/GenKey.c,v 3.6 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/GenKey.c,v 3.8 2001/12/14 19:54:54 dawes Exp $ */ #include #include @@ -39,19 +43,9 @@ dst[3] = (data >> 24) & 0xff; } -/* EMX is not STDC, but sometimes it is */ -#if defined(X_NOT_STDC_ENV) && !defined(__EMX__) -#define Time_t long -extern Time_t time (); -#else #define Time_t time_t -#endif -#ifndef X_NOT_STDC_ENV #include -#else -long random(); -#endif #if defined(SYSV) || defined(SVR4) #define srandom srand48 Index: xc/lib/Xdmcp/IncKey.c diff -u xc/lib/Xdmcp/IncKey.c:1.3 xc/lib/Xdmcp/IncKey.c:1.4 --- xc/lib/Xdmcp/IncKey.c:1.3 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/IncKey.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: IncKey.c,v 1.3 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: IncKey.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/IncKey.c,v 1.3 2001/01/17 19:42:43 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/IncKey.c,v 1.4 2001/12/14 19:54:54 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RA16.c diff -u xc/lib/Xdmcp/RA16.c:1.4 xc/lib/Xdmcp/RA16.c:1.5 --- xc/lib/Xdmcp/RA16.c:1.4 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/RA16.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RA16.c,v 1.4 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: RA16.c,v 1.5 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RA32.c diff -u xc/lib/Xdmcp/RA32.c:1.4 xc/lib/Xdmcp/RA32.c:1.5 --- xc/lib/Xdmcp/RA32.c:1.4 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/RA32.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RA32.c,v 1.4 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: RA32.c,v 1.5 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RA8.c diff -u xc/lib/Xdmcp/RA8.c:1.4 xc/lib/Xdmcp/RA8.c:1.5 --- xc/lib/Xdmcp/RA8.c:1.4 Wed Jan 17 14:42:43 2001 +++ xc/lib/Xdmcp/RA8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RA8.c,v 1.4 2000/08/17 19:45:48 cpqbld Exp $ + * $Xorg: RA8.c,v 1.5 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RAofA8.c diff -u xc/lib/Xdmcp/RAofA8.c:1.4 xc/lib/Xdmcp/RAofA8.c:1.5 --- xc/lib/Xdmcp/RAofA8.c:1.4 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/RAofA8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RAofA8.c,v 1.5 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RAofA8.c,v 1.6 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RC16.c diff -u xc/lib/Xdmcp/RC16.c:1.1.1.3 xc/lib/Xdmcp/RC16.c:1.2 --- xc/lib/Xdmcp/RC16.c:1.1.1.3 Tue Jan 16 17:19:46 2001 +++ xc/lib/Xdmcp/RC16.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RC16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RC16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RC32.c diff -u xc/lib/Xdmcp/RC32.c:1.1.1.3 xc/lib/Xdmcp/RC32.c:1.2 --- xc/lib/Xdmcp/RC32.c:1.1.1.3 Tue Jan 16 17:19:48 2001 +++ xc/lib/Xdmcp/RC32.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RC32.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RC32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RC8.c diff -u xc/lib/Xdmcp/RC8.c:1.1.1.3 xc/lib/Xdmcp/RC8.c:1.2 --- xc/lib/Xdmcp/RC8.c:1.1.1.3 Tue Jan 16 17:19:48 2001 +++ xc/lib/Xdmcp/RC8.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RC8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RC8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RHead.c diff -u xc/lib/Xdmcp/RHead.c:1.1.1.3 xc/lib/Xdmcp/RHead.c:1.2 --- xc/lib/Xdmcp/RHead.c:1.1.1.3 Tue Jan 16 17:19:49 2001 +++ xc/lib/Xdmcp/RHead.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RHead.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RHead.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RR.c diff -u xc/lib/Xdmcp/RR.c:1.1.1.3 xc/lib/Xdmcp/RR.c:1.2 --- xc/lib/Xdmcp/RR.c:1.1.1.3 Tue Jan 16 17:19:50 2001 +++ xc/lib/Xdmcp/RR.c Fri Dec 14 14:54:54 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RR.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RR.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/RaA16.c diff -u xc/lib/Xdmcp/RaA16.c:1.3 xc/lib/Xdmcp/RaA16.c:1.4 --- xc/lib/Xdmcp/RaA16.c:1.3 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/RaA16.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RaA16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RaA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaA16.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaA16.c,v 1.4 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RaA32.c diff -u xc/lib/Xdmcp/RaA32.c:1.3 xc/lib/Xdmcp/RaA32.c:1.4 --- xc/lib/Xdmcp/RaA32.c:1.3 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/RaA32.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RaA32.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RaA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaA32.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaA32.c,v 1.4 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RaA8.c diff -u xc/lib/Xdmcp/RaA8.c:1.3 xc/lib/Xdmcp/RaA8.c:1.4 --- xc/lib/Xdmcp/RaA8.c:1.3 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/RaA8.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RaA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RaA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaA8.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaA8.c,v 1.4 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/RaAoA8.c diff -u xc/lib/Xdmcp/RaAoA8.c:1.3 xc/lib/Xdmcp/RaAoA8.c:1.4 --- xc/lib/Xdmcp/RaAoA8.c:1.3 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/RaAoA8.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: RaAoA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: RaAoA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/RaAoA8.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/RaAoA8.c,v 1.4 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Unwrap.c diff -u xc/lib/Xdmcp/Unwrap.c:1.3 xc/lib/Xdmcp/Unwrap.c:1.4 --- xc/lib/Xdmcp/Unwrap.c:1.3 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/Unwrap.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Unwrap.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: Unwrap.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Unwrap.c,v 1.4 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/WA16.c diff -u xc/lib/Xdmcp/WA16.c:1.1.1.3 xc/lib/Xdmcp/WA16.c:1.2 --- xc/lib/Xdmcp/WA16.c:1.1.1.3 Tue Jan 16 17:19:57 2001 +++ xc/lib/Xdmcp/WA16.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: WA16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: WA16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/WA32.c diff -u xc/lib/Xdmcp/WA32.c:1.1.1.3 xc/lib/Xdmcp/WA32.c:1.2 --- xc/lib/Xdmcp/WA32.c:1.1.1.3 Tue Jan 16 17:19:58 2001 +++ xc/lib/Xdmcp/WA32.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: WA32.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: WA32.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/WA8.c diff -u xc/lib/Xdmcp/WA8.c:1.1.1.3 xc/lib/Xdmcp/WA8.c:1.2 --- xc/lib/Xdmcp/WA8.c:1.1.1.3 Tue Jan 16 17:19:59 2001 +++ xc/lib/Xdmcp/WA8.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: WA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: WA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/WAofA8.c diff -u xc/lib/Xdmcp/WAofA8.c:1.1.1.3 xc/lib/Xdmcp/WAofA8.c:1.2 --- xc/lib/Xdmcp/WAofA8.c:1.1.1.3 Tue Jan 16 17:20:01 2001 +++ xc/lib/Xdmcp/WAofA8.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: WAofA8.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: WAofA8.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xdmcp/WC16.c diff -u xc/lib/Xdmcp/WC16.c:1.4 xc/lib/Xdmcp/WC16.c:1.5 --- xc/lib/Xdmcp/WC16.c:1.4 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/WC16.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: WC16.c,v 1.3 2000/08/17 19:45:49 cpqbld Exp $ + * $Xorg: WC16.c,v 1.4 2001/02/09 02:03:48 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/WC16.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/WC16.c,v 1.5 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/WC32.c diff -u xc/lib/Xdmcp/WC32.c:1.4 xc/lib/Xdmcp/WC32.c:1.5 --- xc/lib/Xdmcp/WC32.c:1.4 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/WC32.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: WC32.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ + * $Xorg: WC32.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ * * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/WC32.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/WC32.c,v 1.5 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/WC8.c diff -u xc/lib/Xdmcp/WC8.c:1.4 xc/lib/Xdmcp/WC8.c:1.5 --- xc/lib/Xdmcp/WC8.c:1.4 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/WC8.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: WC8.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ + * $Xorg: WC8.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/WC8.c,v 1.4 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/WC8.c,v 1.5 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Whead.c diff -u xc/lib/Xdmcp/Whead.c:1.3 xc/lib/Xdmcp/Whead.c:1.4 --- xc/lib/Xdmcp/Whead.c:1.3 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/Whead.c Fri Dec 14 14:54:55 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Whead.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ + * $Xorg: Whead.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Whead.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Whead.c,v 1.4 2001/12/14 19:54:55 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Wrap.c diff -u xc/lib/Xdmcp/Wrap.c:1.3 xc/lib/Xdmcp/Wrap.c:1.4 --- xc/lib/Xdmcp/Wrap.c:1.3 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/Wrap.c Fri Dec 14 14:54:56 2001 @@ -1,10 +1,14 @@ /* - * $Xorg: Wrap.c,v 1.3 2000/08/17 19:45:50 cpqbld Exp $ + * $Xorg: Wrap.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xdmcp/Wrap.c,v 1.3 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Wrap.c,v 1.4 2001/12/14 19:54:56 dawes Exp $ */ #include #include Index: xc/lib/Xdmcp/Xdmcp.h diff -u xc/lib/Xdmcp/Xdmcp.h:3.4 xc/lib/Xdmcp/Xdmcp.h:3.6 --- xc/lib/Xdmcp/Xdmcp.h:3.4 Wed Jan 17 14:42:44 2001 +++ xc/lib/Xdmcp/Xdmcp.h Wed Dec 19 16:37:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Xdmcp.h,v 1.6 2000/08/17 19:45:50 cpqbld Exp $ */ +/* $Xorg: Xdmcp.h,v 1.7 2001/04/13 14:43:00 steve Exp $ */ /* * Copyright 1989 Network Computing Devices, Inc., Mountain View, California. * @@ -13,13 +13,17 @@ * without express or implied warranty. * */ -/* $XFree86: xc/lib/Xdmcp/Xdmcp.h,v 3.4 2001/01/17 19:42:44 dawes Exp $ */ +/* $XFree86: xc/lib/Xdmcp/Xdmcp.h,v 3.6 2001/12/19 21:37:31 dawes Exp $ */ #ifndef _XDMCP_H_ #define _XDMCP_H_ #include +#include + +_XFUNCPROTOBEGIN + #define XDM_PROTOCOL_VERSION 1 #define XDM_UDP_PORT 177 #define XDM_MAX_MSGLEN 8192 @@ -121,11 +125,7 @@ extern int XdmcpReadCARD8(XdmcpBufferPtr buffer, CARD8Ptr valuep); extern int XdmcpReadHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header); -#ifndef MINIX extern int XdmcpFill(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr from, int *fromlen); -#else -extern int MNX_XdmcpFill(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr from, int *fromlen, char *data, int datalen); -#endif extern int XdmcpReadRemaining(XdmcpBufferPtr buffer); @@ -168,5 +168,7 @@ extern int XdmcpReallocARRAY32 (ARRAY32Ptr array, int length); extern int XdmcpReallocARRAY8 (ARRAY8Ptr array, int length); extern int XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length); + +_XFUNCPROTOEND #endif /* _XDMCP_H_ */ Index: xc/lib/Xext/MITMisc.c diff -u xc/lib/Xext/MITMisc.c:1.1.1.3 xc/lib/Xext/MITMisc.c:1.2 --- xc/lib/Xext/MITMisc.c:1.1.1.3 Tue Jan 16 17:20:13 2001 +++ xc/lib/Xext/MITMisc.c Fri Dec 14 14:54:59 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: MITMisc.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ + * $Xorg: MITMisc.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xext/XAppgroup.c diff -u xc/lib/Xext/XAppgroup.c:1.7 xc/lib/Xext/XAppgroup.c:1.9 --- xc/lib/Xext/XAppgroup.c:1.7 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XAppgroup.c Fri Dec 14 14:54:59 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.7 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.9 2001/12/14 19:54:59 dawes Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $Xorg: XAppgroup.c,v 1.4 2000/08/17 19:45:51 cpqbld Exp $ */ +/* $Xorg: XAppgroup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ #ifdef WIN32 #define BOOL wBOOL @@ -39,11 +43,7 @@ #include "Xext.h" #include "extutil.h" -#if NeedVarargsPrototypes -#define Va_start(a,b) va_start(a,b) -#else -#define Va_start(a,b) va_start(a) -#endif +#include struct xagstuff { int attrib_mask; @@ -269,17 +269,10 @@ } Bool -#if NeedVarargsPrototypes XagGetApplicationGroupAttributes( Display* dpy, XAppGroup app_group, ...) -#else -XagGetApplicationGroupAttributes(dpy, app_group, va_alist) - Display* dpy; - XAppGroup app_group; - va_dcl -#endif { va_list var; XExtDisplayInfo *info = find_display (dpy); @@ -299,7 +292,7 @@ SyncHandle(); return False; } - Va_start (var, app_group); + va_start (var, app_group); for (attr = va_arg(var, int); attr != 0; attr = va_arg(var, int)) { void* ptr; Index: xc/lib/Xext/XMultibuf.c diff -u xc/lib/Xext/XMultibuf.c:1.4 xc/lib/Xext/XMultibuf.c:1.5 --- xc/lib/Xext/XMultibuf.c:1.4 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XMultibuf.c Fri Dec 14 14:55:00 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: XMultibuf.c,v 1.5 2000/08/17 19:45:51 cpqbld Exp $ + * $Xorg: XMultibuf.c,v 1.6 2001/02/09 02:03:49 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Authors: Jim Fulton, MIT X Consortium */ -/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.4 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.5 2001/12/14 19:55:00 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/lib/Xext/XSecurity.c diff -u xc/lib/Xext/XSecurity.c:1.3 xc/lib/Xext/XSecurity.c:1.4 --- xc/lib/Xext/XSecurity.c:1.3 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XSecurity.c Fri Dec 14 14:55:00 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XSecurity.c,v 1.5 2000/08/17 19:45:51 cpqbld Exp $ */ +/* $Xorg: XSecurity.c,v 1.6 2001/02/09 02:03:49 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XSecurity.c,v 1.4 2001/12/14 19:55:00 dawes Exp $ */ #include #include Index: xc/lib/Xext/XShape.c diff -u xc/lib/Xext/XShape.c:1.1.1.3 xc/lib/Xext/XShape.c:1.2 --- xc/lib/Xext/XShape.c:1.1.1.3 Tue Jan 16 17:20:23 2001 +++ xc/lib/Xext/XShape.c Fri Dec 14 14:55:00 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: XShape.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ + * $Xorg: XShape.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xext/XShm.c diff -u xc/lib/Xext/XShm.c:1.3 xc/lib/Xext/XShm.c:1.4 --- xc/lib/Xext/XShm.c:1.3 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XShm.c Fri Dec 14 14:55:00 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: XShm.c,v 1.3 2000/08/17 19:45:52 cpqbld Exp $ + * $Xorg: XShm.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Bob Scheifler and Keith Packard, MIT X Consortium */ -/* $XFree86: xc/lib/Xext/XShm.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XShm.c,v 1.4 2001/12/14 19:55:00 dawes Exp $ */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ Index: xc/lib/Xext/XSync.c diff -u xc/lib/Xext/XSync.c:1.4 xc/lib/Xext/XSync.c:1.5 --- xc/lib/Xext/XSync.c:1.4 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XSync.c Fri Dec 14 14:55:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XSync.c,v 1.4 2000/08/17 19:45:52 cpqbld Exp $ */ +/* $Xorg: XSync.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ /* Copyright 1991, 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xext/XSync.c,v 1.4 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XSync.c,v 1.5 2001/12/14 19:55:01 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/Xext/XTestExt1.c diff -u xc/lib/Xext/XTestExt1.c:1.3 xc/lib/Xext/XTestExt1.c:1.4 --- xc/lib/Xext/XTestExt1.c:1.3 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/XTestExt1.c Fri Dec 14 14:55:01 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XTestExt1.c,v 1.3 2000/08/17 19:45:52 cpqbld Exp $ */ +/* $Xorg: XTestExt1.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ */ /* * File: xtestext1lib.c * @@ -10,7 +10,11 @@ Copyright 1986, 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -47,7 +51,7 @@ University of California. */ -/* $XFree86: xc/lib/Xext/XTestExt1.c,v 1.3 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/XTestExt1.c,v 1.4 2001/12/14 19:55:01 dawes Exp $ */ /****************************************************************************** * include files Index: xc/lib/Xext/Xcup.c diff -u xc/lib/Xext/Xcup.c:1.5 xc/lib/Xext/Xcup.c:1.6 --- xc/lib/Xext/Xcup.c:1.5 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/Xcup.c Fri Dec 14 14:55:01 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/lib/Xext/Xcup.c,v 1.5 2001/01/17 19:42:46 dawes Exp $ */ +/* $XFree86: xc/lib/Xext/Xcup.c,v 1.6 2001/12/14 19:55:01 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $Xorg: Xcup.c,v 1.4 2000/08/17 19:45:53 cpqbld Exp $ */ +/* $Xorg: Xcup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ #ifdef WIN32 #define BOOL wBOOL Index: xc/lib/Xext/Xdbe.c diff -u xc/lib/Xext/Xdbe.c:3.4 xc/lib/Xext/Xdbe.c:3.5 --- xc/lib/Xext/Xdbe.c:3.4 Sun Apr 1 10:00:01 2001 +++ xc/lib/Xext/Xdbe.c Wed Jul 25 11:04:50 2001 @@ -30,7 +30,7 @@ * Xlib DBE code * *****************************************************************************/ -/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.4 2001/04/01 14:00:01 tsi Exp $ */ +/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.5 2001/07/25 15:04:50 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES @@ -50,7 +50,7 @@ #define DbeSimpleCheckExtension(dpy,i) \ XextSimpleCheckExtension (dpy, i, dbe_extension_name) -#if defined(__STDC__) && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define DbeGetReq(name,req,info) GetReq (name, req); \ req->reqType = info->codes->major_opcode; \ req->dbeReqType = X_##name; Index: xc/lib/Xext/extutil.c diff -u xc/lib/Xext/extutil.c:1.1.1.4 xc/lib/Xext/extutil.c:1.4 --- xc/lib/Xext/extutil.c:1.1.1.4 Tue Jan 16 17:20:32 2001 +++ xc/lib/Xext/extutil.c Fri Dec 14 14:55:02 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: extutil.c,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ + * $Xorg: extutil.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,6 +45,7 @@ * XSetExtensionErrorHandler establish an extension error handler * XMissingExtension raise an error about missing ext */ +/* $XFree86: xc/lib/Xext/extutil.c,v 1.4 2001/12/14 19:55:02 dawes Exp $ */ #include #include "Xlibint.h" @@ -232,10 +237,10 @@ -static int _default_exterror (dpy, ext_name, reason) - Display *dpy; - char *ext_name; - char *reason; +static int _default_exterror ( + Display *dpy, + char *ext_name, + char *reason) { fprintf (stderr, "Xlib: extension \"%s\" %s on display \"%s\".\n", ext_name, reason, DisplayString(dpy)); Index: xc/lib/Xext/globals.c diff -u xc/lib/Xext/globals.c:3.2 xc/lib/Xext/globals.c:3.5 --- xc/lib/Xext/globals.c:3.2 Wed Jan 17 14:42:46 2001 +++ xc/lib/Xext/globals.c Fri Dec 14 14:55:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: globals.c,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ */ +/* $Xorg: globals.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,16 +26,14 @@ from The Open Group. */ +/* $XFree86: xc/lib/Xext/globals.c,v 3.5 2001/12/14 19:55:02 dawes Exp $ */ + /* * This file should contain only those objects which must be predefined. */ #include #include -#ifndef X_NOT_STDC_ENV #include /* for definition of NULL */ -#else -#include -#endif /* * If possible, it is useful to have the global data default to a null value. @@ -48,7 +50,7 @@ /* * If we need to define extra variables for each global */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define ZEROINIT(t,var,val) SetZero(t,var,val); \ SetZero (long, _libX_##var##Flag, 0); \ SetZero (void *, _libX_##var##Ptr, NULL) Index: xc/lib/Xfontcache/Imakefile diff -u xc/lib/Xfontcache/Imakefile:1.2 xc/lib/Xfontcache/Imakefile:1.3 --- xc/lib/Xfontcache/Imakefile:1.2 Wed Feb 23 15:29:32 2000 +++ xc/lib/Xfontcache/Imakefile Sat Aug 18 07:55:49 2001 @@ -1,5 +1,9 @@ XCOMM Id: Imakefile,v 1.3 1999/01/31 12:54:33 akiyama Exp $ + + +XCOMM $XFree86: xc/lib/Xfontcache/Imakefile,v 1.3 2001/08/18 11:55:49 tsi Exp $ + #define DoNormalLib NormalLibXfontcache #define DoSharedLib SharedLibXfontcache #define DoExtraLib SharedLibXfontcache Index: xc/lib/Xft/Imakefile diff -u xc/lib/Xft/Imakefile:1.14 xc/lib/Xft/Imakefile:1.15 --- xc/lib/Xft/Imakefile:1.14 Fri Apr 27 10:55:22 2001 +++ xc/lib/Xft/Imakefile Sat Sep 29 13:47:16 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.14 2001/04/27 14:55:22 tsi Exp $ +XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.15 2001/09/29 17:47:16 herrb Exp $ #define DoNormalLib NormalLibXft #define DoSharedLib SharedLibXft @@ -48,7 +48,7 @@ xftdraw.c xftextent.c xftfont.c xftfs.c xftgram.c \ xftinit.c xftlex.c xftlist.c xftmatch.c xftmatrix.c \ xftname.c xftpat.c xftstr.c xftxlfd.c $(FT_SRCS) - + OBJS = xftcfg.o xftcolor.o xftcore.o xftdbg.o xftdpy.o \ xftdraw.o xftextent.o xftfont.o xftfs.o xftgram.o \ xftinit.o xftlex.o xftlist.o xftmatch.o xftmatrix.o \ Index: xc/lib/Xft/XftConfig.cpp diff -u xc/lib/Xft/XftConfig.cpp:1.6 xc/lib/Xft/XftConfig.cpp:1.8 --- xc/lib/Xft/XftConfig.cpp:1.6 Fri Apr 27 10:55:22 2001 +++ xc/lib/Xft/XftConfig.cpp Wed Nov 21 18:41:12 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.6 2001/04/27 14:55:22 tsi Exp $ +XCOMM $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.8 2001/11/21 23:41:12 keithp Exp $ dir XFT_TYPE1_DIR @@ -13,11 +13,11 @@ includeif "~/.xftconfig" XCOMM -XCOMM Use Lucidux fonts for default faces +XCOMM Use Luxi fonts for default faces XCOMM -match any family == "serif" edit family += "LuciduxSerif"; -match any family == "sans" edit family += "LuciduxSans"; -match any family == "mono" edit family += "LuciduxMono"; +match any family == "serif" edit family += "Luxi Serif"; +match any family == "sans" edit family += "Luxi Sans"; +match any family == "mono" edit family += "Luxi Mono"; XCOMM XCOMM Alias between XLFD families and font file family name, prefer local @@ -26,11 +26,14 @@ match any family == "charter" edit family += "bitstream charter"; match any family == "bitstream charter" edit family =+ "charter"; -match any family == "Lucidux Serif" edit family += "LuciduxSerif"; -match any family == "LuciduxSerif" edit family =+ "Lucidux Serif"; +XCOMM +XCOMM Alias older name for Luxi fonts +XCOMM +match any family == "LuciduxSerif" edit family += "Luxi Serif"; +match any family == "Lucidux Serif" edit family += "Luxi Serif"; -match any family == "Lucidux Sans" edit family += "LuciduxSans"; -match any family == "LuciduxSans" edit family =+ "Lucidux Sans"; +match any family == "LuciduxSans" edit family += "Luxi Sans"; +match any family == "Lucidux Sans" edit family += "Luxi Sans"; -match any family == "Lucidux Mono" edit family += "LuciduxMono"; -match any family == "LuciduxMono" edit family =+ "Lucidux Mono"; +match any family == "LuciduxMono" edit family += "Luxi Mono"; +match any family == "Lucidux Mono" edit family += "Luxi Mono"; Index: xc/lib/Xft/xftcache.c diff -u xc/lib/Xft/xftcache.c:1.1 xc/lib/Xft/xftcache.c:1.2 --- xc/lib/Xft/xftcache.c:1.1 Mon Jan 1 21:46:51 2001 +++ xc/lib/Xft/xftcache.c Mon Jun 11 18:53:30 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftcache.c,v 1.1 2001/01/02 02:46:51 keithp Exp $ + * $XFree86: xc/lib/Xft/xftcache.c,v 1.2 2001/06/11 22:53:30 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -112,7 +112,7 @@ } if (!name) return 0; - *count = maxid; + *count = maxid + 1; return name->name; } Index: xc/lib/Xft/xftcfg.c diff -u xc/lib/Xft/xftcfg.c:1.9 xc/lib/Xft/xftcfg.c:1.10 --- xc/lib/Xft/xftcfg.c:1.9 Fri Mar 30 20:57:20 2001 +++ xc/lib/Xft/xftcfg.c Sat Jan 12 15:46:42 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftcfg.c,v 1.9 2001/03/31 01:57:20 keithp Exp $ + * $XFree86: xc/lib/Xft/xftcfg.c,v 1.10 2002/01/12 20:46:42 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -39,7 +39,6 @@ char *XftConfigCache = 0; static XftSubst *XftSubsts; -/* #define XFT_DEBUG_EDIT */ Bool XftConfigAddDir (char *d) @@ -137,10 +136,11 @@ subst->next = 0; subst->test = test; subst->edit = edit; -#ifdef XFT_DEBUG_EDIT - printf ("Add Subst "); - XftSubstPrint (subst); -#endif + if (_XftFontDebug () & XFT_DBG_EDIT) + { + printf ("Add Subst "); + XftSubstPrint (subst); + } num = 0; for (t = test; t; t = t->next) num++; @@ -485,7 +485,7 @@ return v; } -static Bool +static XftValueList * _XftConfigAdd (XftValueList **head, XftValueList *position, Bool append, @@ -518,33 +518,36 @@ if (*prev == position) break; } -#ifdef XFT_DEBUG - if (!*prev) - printf ("position not on list\n"); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + if (!*prev) + printf ("position not on list\n"); + } } -#ifdef XFT_DEBUG_EDIT - printf ("%s list before ", append ? "Append" : "Prepend"); - XftValueListPrint (*head); - printf ("\n"); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("%s list before ", append ? "Append" : "Prepend"); + XftValueListPrint (*head); + printf ("\n"); + } new->next = *prev; *prev = new; -#ifdef XFT_DEBUG_EDIT - printf ("%s list after ", append ? "Append" : "Prepend"); - XftValueListPrint (*head); - printf ("\n"); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("%s list after ", append ? "Append" : "Prepend"); + XftValueListPrint (*head); + printf ("\n"); + } - return True; + return new; bail1: free (new); bail0: - return False; + return 0; } static void @@ -579,18 +582,20 @@ if (!st && XftSubstsMaxObjects) return False; -#ifdef XFT_DEBUG_EDIT - printf ("XftConfigSubstitute "); - XftPatternPrint (p); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("XftConfigSubstitute "); + XftPatternPrint (p); + } for (s = XftSubsts; s; s = s->next) { for (t = s->test, i = 0; t; t = t->next, i++) { -#ifdef XFT_DEBUG_EDIT - printf ("XftConfigSubstitute test "); - XftTestPrint (t); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("XftConfigSubstitute test "); + XftTestPrint (t); + } st[i].elt = XftPatternFind (p, t->field, False); if (!st[i].elt) { @@ -605,15 +610,17 @@ } if (t) { -#ifdef XFT_DEBUG_EDIT - printf ("No match\n"); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("No match\n"); + } continue; } -#ifdef XFT_DEBUG_EDIT - printf ("Substitute "); - XftSubstPrint (s); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("Substitute "); + XftSubstPrint (s); + } for (e = s->edit; e; e = e->next) { v = _XftConfigEvaluate (p, e->expr); @@ -626,8 +633,13 @@ case XftOpAssign: if (t) { - _XftConfigAdd (&st[i].elt->values, st[i].value, True, v); - _XftConfigDel (&st[i].elt->values, st[i].value); + XftValueList *new; + new = _XftConfigAdd (&st[i].elt->values, st[i].value, True, v); + if (new) + { + _XftConfigDel (&st[i].elt->values, st[i].value); + st[i].value = new; + } } else { @@ -651,15 +663,17 @@ break; } } -#ifdef XFT_DEBUG_EDIT - printf ("XftConfigSubstitute edit"); - XftPatternPrint (p); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("XftConfigSubstitute edit"); + XftPatternPrint (p); + } } free (st); -#ifdef XFT_DEBUG_EDIT - printf ("XftConfigSubstitute done"); - XftPatternPrint (p); -#endif + if (_XftFontDebug() & XFT_DBG_EDIT) + { + printf ("XftConfigSubstitute done"); + XftPatternPrint (p); + } return True; } Index: xc/lib/Xft/xftdpy.c diff -u xc/lib/Xft/xftdpy.c:1.7 xc/lib/Xft/xftdpy.c:1.8 --- xc/lib/Xft/xftdpy.c:1.7 Sat Apr 28 23:21:17 2001 +++ xc/lib/Xft/xftdpy.c Thu Dec 13 12:26:00 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftdpy.c,v 1.7 2001/04/29 03:21:17 keithp Exp $ + * $XFree86: xc/lib/Xft/xftdpy.c,v 1.8 2001/12/13 17:26:00 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -49,7 +49,7 @@ return 0; } -static XftDisplayInfo * +XftDisplayInfo * _XftDisplayInfoGet (Display *dpy) { XftDisplayInfo *info, **prev; @@ -82,6 +82,7 @@ info->defaults = 0; info->coreFonts = 0; info->hasRender = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0; + info->glyphSets = 0; if (_XftFontDebug () & XFT_DBG_RENDER) { Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy)); Index: xc/lib/Xft/xftfreetype.c diff -u xc/lib/Xft/xftfreetype.c:1.13 xc/lib/Xft/xftfreetype.c:1.16 --- xc/lib/Xft/xftfreetype.c:1.13 Wed May 16 06:32:54 2001 +++ xc/lib/Xft/xftfreetype.c Thu Dec 13 12:26:00 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.13 2001/05/16 10:32:54 keithp Exp $ + * $XFree86: xc/lib/Xft/xftfreetype.c,v 1.16 2001/12/13 17:26:00 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -298,11 +298,10 @@ XftFontStruct font; } XftFtGlyphSet; -static XftFtGlyphSet *_XftFtGlyphSets; - XftFontStruct * XftFreeTypeOpen (Display *dpy, XftPattern *pattern) { + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); XftFtFile *file; FT_Face face; XftFtGlyphSet *gs; @@ -323,7 +322,9 @@ FT_Matrix matrix; XftMatrix *font_matrix; +#if 0 int extra; +#endif int height, ascent, descent; XRenderPictFormat pf, *format; @@ -452,7 +453,7 @@ /* * Match an existing glyphset */ - for (gs = _XftFtGlyphSets; gs; gs = gs->next) + for (gs = info->glyphSets; gs; gs = gs->next) { if (gs->file == file && gs->minspace == minspace && @@ -564,6 +565,7 @@ else { height = face->size->metrics.height >> 6; +#if 0 extra = (height - (ascent + descent)); if (extra > 0) { @@ -572,6 +574,7 @@ } else if (extra < 0) height = ascent + descent; +#endif } font->ascent = ascent; font->descent = descent; @@ -582,8 +585,8 @@ else font->max_advance_width = face->size->metrics.max_advance >> 6; - gs->next = _XftFtGlyphSets; - _XftFtGlyphSets = gs; + gs->next = info->glyphSets; + info->glyphSets = gs; font->glyphset = XRenderCreateGlyphSet (dpy, format); @@ -614,8 +617,9 @@ XftFreeTypeClose (Display *dpy, XftFontStruct *font) { XftFtGlyphSet *gs, **prev; + XftDisplayInfo *info = _XftDisplayInfoGet (dpy); - for (prev = &_XftFtGlyphSets; (gs = *prev); prev = &gs->next) + for (prev = &info->glyphSets; (gs = *prev); prev = &gs->next) { if (&gs->font == font) { Index: xc/lib/Xft/xftglyphs.c diff -u xc/lib/Xft/xftglyphs.c:1.13 xc/lib/Xft/xftglyphs.c:1.14 --- xc/lib/Xft/xftglyphs.c:1.13 Wed May 16 06:32:54 2001 +++ xc/lib/Xft/xftglyphs.c Sat Nov 17 03:22:45 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.13 2001/05/16 10:32:54 keithp Exp $ + * $XFree86: xc/lib/Xft/xftglyphs.c,v 1.14 2001/11/17 08:22:45 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -124,7 +124,7 @@ } else glyphindex = (FT_UInt) charcode; - error = FT_Load_Glyph (font->face, glyphindex, 0/*|FT_LOAD_NO_HINTING */); + error = FT_Load_Glyph (font->face, glyphindex, FT_LOAD_NO_BITMAP); if (error) continue; Index: xc/lib/Xft/xftint.h diff -u xc/lib/Xft/xftint.h:1.25 xc/lib/Xft/xftint.h:1.28 --- xc/lib/Xft/xftint.h:1.25 Fri May 18 12:03:06 2001 +++ xc/lib/Xft/xftint.h Sat Jan 12 15:46:42 2002 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftint.h,v 1.25 2001/05/18 16:03:06 tsi Exp $ + * $XFree86: xc/lib/Xft/xftint.h,v 1.28 2002/01/12 20:46:42 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -77,6 +77,7 @@ XftPattern *defaults; XftFontSet *coreFonts; Bool hasRender; + struct _XftFtGlyphSet *glyphSets; } XftDisplayInfo; extern XftFontSet *_XftGlobalFontSet; @@ -101,6 +102,7 @@ #define XFT_DBG_CACHEV 256 #define XFT_DBG_MATCH 512 #define XFT_DBG_MATCHV 1024 +#define XFT_DBG_EDIT 2048 typedef enum _XftOp { XftOpInteger, XftOpDouble, XftOpString, XftOpMatrix, XftOpBool, XftOpNil, @@ -264,7 +266,7 @@ XChar2b xcloc[XFT_CORE_N16LOCAL]); XChar2b * -XftCoreConvert32 (unsigned int *string, +XftCoreConvert32 (XftChar32 *string, int len, XChar2b xcloc[XFT_CORE_N16LOCAL]); @@ -291,7 +293,7 @@ void XftCoreExtents32 (Display *dpy, XFontStruct *fs, - unsigned int *string, + XftChar32 *string, int len, XGlyphInfo *extents); @@ -305,7 +307,7 @@ Bool XftCoreGlyphExists (Display *dpy, XFontStruct *fs, - unsigned int glyph); + XftChar32 glyph); /* xftdbg.c */ void @@ -324,6 +326,9 @@ XftSubstPrint (XftSubst *subst); /* xftdpy.c */ +XftDisplayInfo * +_XftDisplayInfoGet (Display *dpy); + int XftDefaultParseBool (char *v); Index: xc/lib/Xft/xftmatch.c diff -u xc/lib/Xft/xftmatch.c:1.5 xc/lib/Xft/xftmatch.c:1.6 --- xc/lib/Xft/xftmatch.c:1.5 Tue Mar 6 13:00:26 2001 +++ xc/lib/Xft/xftmatch.c Fri Sep 21 15:54:53 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftmatch.c,v 1.5 2001/03/06 18:00:26 keithp Exp $ + * $XFree86: xc/lib/Xft/xftmatch.c,v 1.6 2001/09/21 19:54:53 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -97,7 +97,6 @@ static XftMatcher _XftMatchers [] = { { XFT_FOUNDRY, _XftCompareString, }, { XFT_ENCODING, _XftCompareString, }, - { XFT_ANTIALIAS, _XftCompareBool, }, { XFT_FAMILY, _XftCompareString, }, { XFT_SPACING, _XftCompareInteger, }, { XFT_PIXEL_SIZE, _XftCompareSize, }, @@ -105,6 +104,7 @@ { XFT_SLANT, _XftCompareInteger, }, { XFT_WEIGHT, _XftCompareInteger, }, { XFT_RASTERIZER, _XftCompareString, }, + { XFT_ANTIALIAS, _XftCompareBool, }, { XFT_OUTLINE, _XftCompareBool, }, }; Index: xc/lib/Xft/xftrender.c diff -u xc/lib/Xft/xftrender.c:1.7 xc/lib/Xft/xftrender.c:1.8 --- xc/lib/Xft/xftrender.c:1.7 Sat Apr 21 12:58:02 2001 +++ xc/lib/Xft/xftrender.c Fri Jul 13 14:16:10 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xft/xftrender.c,v 1.7 2001/04/21 16:58:02 keithp Exp $ + * $XFree86: xc/lib/Xft/xftrender.c,v 1.8 2001/07/13 18:16:10 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -32,7 +32,7 @@ int x, int y, XftChar8 *string, int len) { - unsigned int missing[XFT_NMISSING]; + XftChar32 missing[XFT_NMISSING]; int nmissing; XftChar8 *s; int l; @@ -41,7 +41,7 @@ l = len; nmissing = 0; while (l--) - XftGlyphCheck (dpy, font, (unsigned int) *s++, missing, &nmissing); + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); if (nmissing) XftGlyphLoad (dpy, font, missing, nmissing); XRenderCompositeString8 (dpy, PictOpOver, src, dst, @@ -56,7 +56,7 @@ int x, int y, XftChar16 *string, int len) { - unsigned int missing[XFT_NMISSING]; + XftChar32 missing[XFT_NMISSING]; int nmissing; XftChar16 *s; int l; @@ -65,7 +65,7 @@ l = len; nmissing = 0; while (l--) - XftGlyphCheck (dpy, font, (unsigned int) *s++, missing, &nmissing); + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); if (nmissing) XftGlyphLoad (dpy, font, missing, nmissing); XRenderCompositeString16 (dpy, PictOpOver, src, dst, @@ -78,18 +78,18 @@ XftFontStruct *font, Picture dst, int srcx, int srcy, int x, int y, - unsigned int *string, int len) + XftChar32 *string, int len) { - unsigned int missing[XFT_NMISSING]; + XftChar32 missing[XFT_NMISSING]; int nmissing; - unsigned int *s; + XftChar32 *s; int l; s = string; l = len; nmissing = 0; while (l--) - XftGlyphCheck (dpy, font, (unsigned int) *s++, missing, &nmissing); + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); if (nmissing) XftGlyphLoad (dpy, font, missing, nmissing); XRenderCompositeString32 (dpy, PictOpOver, src, dst, @@ -191,7 +191,7 @@ int len, XGlyphInfo *extents) { - unsigned int missing[XFT_NMISSING]; + XftChar32 missing[XFT_NMISSING]; int nmissing; XftChar8 *s, c; int l; @@ -205,7 +205,7 @@ l = len; nmissing = 0; while (l--) - XftGlyphCheck (dpy, font, (unsigned int) *s++, missing, &nmissing); + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); if (nmissing) XftGlyphLoad (dpy, font, missing, nmissing); @@ -268,22 +268,25 @@ void XftRenderExtents16 (Display *dpy, XftFontStruct *font, - XftChar16 *string, + XftChar16 *string, int len, XGlyphInfo *extents) { - unsigned int missing[XFT_NMISSING]; + XftChar32 missing[XFT_NMISSING]; int nmissing; XftChar16 *s, c; int l; XGlyphInfo *gi; int x, y; + int left, right, top, bottom; + int overall_left, overall_right; + int overall_top, overall_bottom; s = string; l = len; nmissing = 0; while (l--) - XftGlyphCheck (dpy, font, (unsigned int) *s++, missing, &nmissing); + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); if (nmissing) XftGlyphLoad (dpy, font, missing, nmissing); @@ -306,26 +309,39 @@ extents->xOff = 0; return; } - *extents = *gi; - x = gi->xOff; - y = gi->yOff; + x = 0; + y = 0; + overall_left = x - gi->x; + overall_top = y - gi->y; + overall_right = overall_left + (int) gi->width; + overall_bottom = overall_top + (int) gi->height; + x += gi->xOff; + y += gi->yOff; while (len--) { c = *string++; gi = c < font->nrealized ? font->realized[c] : 0; if (!gi) continue; - if (gi->x + x < extents->x) - extents->x = gi->x + x; - if (gi->y + y < extents->y) - extents->y = gi->y + y; - if (gi->width + x > extents->width) - extents->width = gi->width + x; - if (gi->height + y > extents->height) - extents->height = gi->height + y; + left = x - gi->x; + top = y - gi->y; + right = left + (int) gi->width; + bottom = top + (int) gi->height; + if (left < overall_left) + overall_left = left; + if (top < overall_top) + overall_top = top; + if (right > overall_right) + overall_right = right; + if (bottom > overall_bottom) + overall_bottom = bottom; x += gi->xOff; y += gi->yOff; } + extents->x = -overall_left; + extents->y = -overall_top; + extents->width = overall_right - overall_left; + extents->height = overall_bottom - overall_top; extents->xOff = x; extents->yOff = y; } @@ -333,22 +349,25 @@ void XftRenderExtents32 (Display *dpy, XftFontStruct *font, - unsigned int *string, + XftChar32 *string, int len, XGlyphInfo *extents) { - unsigned int missing[XFT_NMISSING]; + XftChar32 missing[XFT_NMISSING]; int nmissing; - unsigned int *s, c; + XftChar32 *s, c; int l; XGlyphInfo *gi; int x, y; + int left, right, top, bottom; + int overall_left, overall_right; + int overall_top, overall_bottom; s = string; l = len; nmissing = 0; while (l--) - XftGlyphCheck (dpy, font, (unsigned int) *s++, missing, &nmissing); + XftGlyphCheck (dpy, font, (XftChar32) *s++, missing, &nmissing); if (nmissing) XftGlyphLoad (dpy, font, missing, nmissing); @@ -371,26 +390,39 @@ extents->xOff = 0; return; } - *extents = *gi; - x = gi->xOff; - y = gi->yOff; + x = 0; + y = 0; + overall_left = x - gi->x; + overall_top = y - gi->y; + overall_right = overall_left + (int) gi->width; + overall_bottom = overall_top + (int) gi->height; + x += gi->xOff; + y += gi->yOff; while (len--) { c = *string++; gi = c < font->nrealized ? font->realized[c] : 0; if (!gi) continue; - if (gi->x + x < extents->x) - extents->x = gi->x + x; - if (gi->y + y < extents->y) - extents->y = gi->y + y; - if (gi->width + x > extents->width) - extents->width = gi->width + x; - if (gi->height + y > extents->height) - extents->height = gi->height + y; + left = x - gi->x; + top = y - gi->y; + right = left + (int) gi->width; + bottom = top + (int) gi->height; + if (left < overall_left) + overall_left = left; + if (top < overall_top) + overall_top = top; + if (right > overall_right) + overall_right = right; + if (bottom > overall_bottom) + overall_bottom = bottom; x += gi->xOff; y += gi->yOff; } + extents->x = -overall_left; + extents->y = -overall_top; + extents->width = overall_right - overall_left; + extents->height = overall_bottom - overall_top; extents->xOff = x; extents->yOff = y; } @@ -402,13 +434,16 @@ int len, XGlyphInfo *extents) { - unsigned int missing[XFT_NMISSING]; + XftChar32 missing[XFT_NMISSING]; int nmissing; XftChar8 *s; XftChar32 c; int l, clen; XGlyphInfo *gi; int x, y; + int left, right, top, bottom; + int overall_left, overall_right; + int overall_top, overall_bottom; s = string; l = len; @@ -418,7 +453,7 @@ clen = XftUtf8ToUcs4 (s, &c, l); if (clen < 0) break; - XftGlyphCheck (dpy, font, c, missing, &nmissing); + XftGlyphCheck (dpy, font, (XftChar32) c, missing, &nmissing); s += clen; l -= clen; } @@ -450,9 +485,14 @@ extents->xOff = 0; return; } - *extents = *gi; - x = gi->xOff; - y = gi->yOff; + x = 0; + y = 0; + overall_left = x - gi->x; + overall_top = y - gi->y; + overall_right = overall_left + (int) gi->width; + overall_bottom = overall_top + (int) gi->height; + x += gi->xOff; + y += gi->yOff; while (len) { clen = XftUtf8ToUcs4 (string, &c, len); @@ -463,17 +503,25 @@ gi = c < font->nrealized ? font->realized[c] : 0; if (!gi) continue; - if (gi->x + x < extents->x) - extents->x = gi->x + x; - if (gi->y + y < extents->y) - extents->y = gi->y + y; - if (gi->width + x > extents->width) - extents->width = gi->width + x; - if (gi->height + y > extents->height) - extents->height = gi->height + y; + left = x - gi->x; + top = y - gi->y; + right = left + (int) gi->width; + bottom = top + (int) gi->height; + if (left < overall_left) + overall_left = left; + if (top < overall_top) + overall_top = top; + if (right > overall_right) + overall_right = right; + if (bottom > overall_bottom) + overall_bottom = bottom; x += gi->xOff; y += gi->yOff; } + extents->x = -overall_left; + extents->y = -overall_top; + extents->width = overall_right - overall_left; + extents->height = overall_bottom - overall_top; extents->xOff = x; extents->yOff = y; } Index: xc/lib/Xi/XAllowDv.c diff -u xc/lib/Xi/XAllowDv.c:3.2 xc/lib/Xi/XAllowDv.c:3.3 --- xc/lib/Xi/XAllowDv.c:3.2 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/XAllowDv.c Fri Dec 14 14:55:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XAllowDv.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XAllowDv.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XAllowDv.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XAllowDv.c,v 3.3 2001/12/14 19:55:03 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgDCtl.c diff -u xc/lib/Xi/XChgDCtl.c:3.2 xc/lib/Xi/XChgDCtl.c:3.3 --- xc/lib/Xi/XChgDCtl.c:3.2 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/XChgDCtl.c Fri Dec 14 14:55:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XChgDCtl.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XChgDCtl.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgDCtl.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgDCtl.c,v 3.3 2001/12/14 19:55:03 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgFCtl.c diff -u xc/lib/Xi/XChgFCtl.c:3.2 xc/lib/Xi/XChgFCtl.c:3.3 --- xc/lib/Xi/XChgFCtl.c:3.2 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/XChgFCtl.c Fri Dec 14 14:55:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XChgFCtl.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XChgFCtl.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgFCtl.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgFCtl.c,v 3.3 2001/12/14 19:55:03 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgKMap.c diff -u xc/lib/Xi/XChgKMap.c:3.2 xc/lib/Xi/XChgKMap.c:3.3 --- xc/lib/Xi/XChgKMap.c:3.2 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/XChgKMap.c Fri Dec 14 14:55:04 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XChgKMap.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XChgKMap.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgKMap.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgKMap.c,v 3.3 2001/12/14 19:55:04 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgKbd.c diff -u xc/lib/Xi/XChgKbd.c:3.2 xc/lib/Xi/XChgKbd.c:3.3 --- xc/lib/Xi/XChgKbd.c:3.2 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/XChgKbd.c Fri Dec 14 14:55:04 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XChgKbd.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XChgKbd.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgKbd.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgKbd.c,v 3.3 2001/12/14 19:55:04 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgPnt.c diff -u xc/lib/Xi/XChgPnt.c:3.2 xc/lib/Xi/XChgPnt.c:3.3 --- xc/lib/Xi/XChgPnt.c:3.2 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/XChgPnt.c Fri Dec 14 14:55:04 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XChgPnt.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XChgPnt.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgPnt.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgPnt.c,v 3.3 2001/12/14 19:55:04 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XChgProp.c diff -u xc/lib/Xi/XChgProp.c:3.2 xc/lib/Xi/XChgProp.c:3.3 --- xc/lib/Xi/XChgProp.c:3.2 Wed Jan 17 14:42:47 2001 +++ xc/lib/Xi/XChgProp.c Fri Dec 14 14:55:05 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XChgProp.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XChgProp.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XChgProp.c,v 3.2 2001/01/17 19:42:47 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XChgProp.c,v 3.3 2001/12/14 19:55:05 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XCloseDev.c diff -u xc/lib/Xi/XCloseDev.c:3.2 xc/lib/Xi/XCloseDev.c:3.3 --- xc/lib/Xi/XCloseDev.c:3.2 Wed Jan 17 14:42:48 2001 +++ xc/lib/Xi/XCloseDev.c Fri Dec 14 14:55:06 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XCloseDev.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XCloseDev.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XCloseDev.c,v 3.2 2001/01/17 19:42:48 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XCloseDev.c,v 3.3 2001/12/14 19:55:06 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XDevBell.c diff -u xc/lib/Xi/XDevBell.c:3.2 xc/lib/Xi/XDevBell.c:3.3 --- xc/lib/Xi/XDevBell.c:3.2 Wed Jan 17 14:42:48 2001 +++ xc/lib/Xi/XDevBell.c Fri Dec 14 14:55:08 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XDevBell.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XDevBell.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XDevBell.c,v 3.2 2001/01/17 19:42:48 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XDevBell.c,v 3.3 2001/12/14 19:55:08 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XExtInt.c diff -u xc/lib/Xi/XExtInt.c:3.4 xc/lib/Xi/XExtInt.c:3.6 --- xc/lib/Xi/XExtInt.c:3.4 Wed Jan 17 14:42:48 2001 +++ xc/lib/Xi/XExtInt.c Fri Dec 14 14:55:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XExtInt.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XExtInt.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XExtInt.c,v 3.4 2001/01/17 19:42:48 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XExtInt.c,v 3.6 2001/12/14 19:55:09 dawes Exp $ */ /*********************************************************************** * @@ -173,6 +177,7 @@ * */ +int _XiCheckExtInit(dpy, version_index) register Display *dpy; register int version_index; Index: xc/lib/Xi/XExtToWire.c diff -u xc/lib/Xi/XExtToWire.c:3.2 xc/lib/Xi/XExtToWire.c:3.4 --- xc/lib/Xi/XExtToWire.c:3.2 Wed Jan 17 14:42:49 2001 +++ xc/lib/Xi/XExtToWire.c Fri Dec 14 14:55:11 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XExtToWire.c,v 1.3 2000/08/17 19:45:54 cpqbld Exp $ */ +/* $Xorg: XExtToWire.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XExtToWire.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XExtToWire.c,v 3.4 2001/12/14 19:55:11 dawes Exp $ */ /**************************************************************** * @@ -79,7 +83,7 @@ *count = 2; kev = (deviceKeyButtonPointer *) Xmalloc (*count * sizeof (xEvent)); if (!kev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) kev; kev->type = ev->type; @@ -126,7 +130,7 @@ *count = 2; pev = (deviceKeyButtonPointer *) Xmalloc (*count * sizeof (xEvent)); if (!pev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) pev; pev->type = ev->type; @@ -173,7 +177,7 @@ *count = 2; bev = (deviceKeyButtonPointer *) Xmalloc (*count * sizeof (xEvent)); if (!bev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) bev; bev->type = ev->type; @@ -220,7 +224,7 @@ *count = 2; mev = (deviceKeyButtonPointer *) Xmalloc (*count * sizeof (xEvent)); if (!mev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) mev; mev->type = ev->type; @@ -267,7 +271,7 @@ *count = 1; fev = (deviceFocus *) Xmalloc (*count * sizeof (xEvent)); if (!fev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) fev; fev->type = ev->type; @@ -286,7 +290,7 @@ *count = 1; mev = (deviceMappingNotify *) Xmalloc (*count * sizeof (xEvent)); if (!mev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) mev; mev->type = ev->type; @@ -332,7 +336,7 @@ sev = (deviceStateNotify *) Xmalloc (*count * sizeof (xEvent)); if (!sev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) sev; tev = (xEvent *) (sev+1); @@ -432,7 +436,7 @@ *count = 1; cev = (changeDeviceNotify *) Xmalloc (*count * sizeof (xEvent)); if (!cev) - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); *event = (xEvent *) cev; cev->type = ev->type; @@ -442,7 +446,7 @@ break; } default: - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); } return(1); } Index: xc/lib/Xi/XFreeLst.c diff -u xc/lib/Xi/XFreeLst.c:1.1.1.3 xc/lib/Xi/XFreeLst.c:1.2 --- xc/lib/Xi/XFreeLst.c:1.1.1.3 Tue Jan 16 17:20:48 2001 +++ xc/lib/Xi/XFreeLst.c Fri Dec 14 14:55:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XFreeLst.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ +/* $Xorg: XFreeLst.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xi/XGMotion.c diff -u xc/lib/Xi/XGMotion.c:3.2 xc/lib/Xi/XGMotion.c:3.3 --- xc/lib/Xi/XGMotion.c:3.2 Wed Jan 17 14:42:49 2001 +++ xc/lib/Xi/XGMotion.c Fri Dec 14 14:55:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGMotion.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ +/* $Xorg: XGMotion.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGMotion.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGMotion.c,v 3.3 2001/12/14 19:55:12 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetBMap.c diff -u xc/lib/Xi/XGetBMap.c:3.2 xc/lib/Xi/XGetBMap.c:3.3 --- xc/lib/Xi/XGetBMap.c:3.2 Wed Jan 17 14:42:49 2001 +++ xc/lib/Xi/XGetBMap.c Fri Dec 14 14:55:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGetBMap.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ +/* $Xorg: XGetBMap.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetBMap.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetBMap.c,v 3.3 2001/12/14 19:55:13 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetDCtl.c diff -u xc/lib/Xi/XGetDCtl.c:3.2 xc/lib/Xi/XGetDCtl.c:3.3 --- xc/lib/Xi/XGetDCtl.c:3.2 Wed Jan 17 14:42:49 2001 +++ xc/lib/Xi/XGetDCtl.c Fri Dec 14 14:55:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGetDCtl.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ +/* $Xorg: XGetDCtl.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetDCtl.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetDCtl.c,v 3.3 2001/12/14 19:55:13 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetFCtl.c diff -u xc/lib/Xi/XGetFCtl.c:3.2 xc/lib/Xi/XGetFCtl.c:3.3 --- xc/lib/Xi/XGetFCtl.c:3.2 Wed Jan 17 14:42:49 2001 +++ xc/lib/Xi/XGetFCtl.c Fri Dec 14 14:55:14 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGetFCtl.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ +/* $Xorg: XGetFCtl.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetFCtl.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetFCtl.c,v 3.3 2001/12/14 19:55:14 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetKMap.c diff -u xc/lib/Xi/XGetKMap.c:3.2 xc/lib/Xi/XGetKMap.c:3.3 --- xc/lib/Xi/XGetKMap.c:3.2 Wed Jan 17 14:42:49 2001 +++ xc/lib/Xi/XGetKMap.c Fri Dec 14 14:55:15 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGetKMap.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ +/* $Xorg: XGetKMap.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetKMap.c,v 3.2 2001/01/17 19:42:49 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetKMap.c,v 3.3 2001/12/14 19:55:15 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetMMap.c diff -u xc/lib/Xi/XGetMMap.c:3.2 xc/lib/Xi/XGetMMap.c:3.3 --- xc/lib/Xi/XGetMMap.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGetMMap.c Fri Dec 14 14:55:16 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGetMMap.c,v 1.3 2000/08/17 19:45:55 cpqbld Exp $ */ +/* $Xorg: XGetMMap.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetMMap.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetMMap.c,v 3.3 2001/12/14 19:55:16 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetProp.c diff -u xc/lib/Xi/XGetProp.c:3.2 xc/lib/Xi/XGetProp.c:3.3 --- xc/lib/Xi/XGetProp.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGetProp.c Fri Dec 14 14:55:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGetProp.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XGetProp.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetProp.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetProp.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGetVers.c diff -u xc/lib/Xi/XGetVers.c:3.2 xc/lib/Xi/XGetVers.c:3.3 --- xc/lib/Xi/XGetVers.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGetVers.c Fri Dec 14 14:55:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGetVers.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XGetVers.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGetVers.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGrDvBut.c diff -u xc/lib/Xi/XGrDvBut.c:3.3 xc/lib/Xi/XGrDvBut.c:3.4 --- xc/lib/Xi/XGrDvBut.c:3.3 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGrDvBut.c Fri Dec 14 14:55:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGrDvBut.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XGrDvBut.c,v 1.4 2001/02/09 02:03:50 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrDvBut.c,v 3.3 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrDvBut.c,v 3.4 2001/12/14 19:55:17 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGrDvKey.c diff -u xc/lib/Xi/XGrDvKey.c:3.2 xc/lib/Xi/XGrDvKey.c:3.3 --- xc/lib/Xi/XGrDvKey.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGrDvKey.c Fri Dec 14 14:55:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGrDvKey.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XGrDvKey.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrDvKey.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrDvKey.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGrabDev.c diff -u xc/lib/Xi/XGrabDev.c:3.2 xc/lib/Xi/XGrabDev.c:3.3 --- xc/lib/Xi/XGrabDev.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGrabDev.c Fri Dec 14 14:55:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGrabDev.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XGrabDev.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGrabDev.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGrabDev.c,v 3.3 2001/12/14 19:55:17 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGtFocus.c diff -u xc/lib/Xi/XGtFocus.c:3.2 xc/lib/Xi/XGtFocus.c:3.3 --- xc/lib/Xi/XGtFocus.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGtFocus.c Fri Dec 14 14:55:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGtFocus.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XGtFocus.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGtFocus.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGtFocus.c,v 3.3 2001/12/14 19:55:18 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XGtSelect.c diff -u xc/lib/Xi/XGtSelect.c:3.2 xc/lib/Xi/XGtSelect.c:3.3 --- xc/lib/Xi/XGtSelect.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XGtSelect.c Fri Dec 14 14:55:19 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XGtSelect.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XGtSelect.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XGtSelect.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XGtSelect.c,v 3.3 2001/12/14 19:55:19 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XIint.h diff -u xc/lib/Xi/XIint.h:3.0 xc/lib/Xi/XIint.h:3.1 --- xc/lib/Xi/XIint.h:3.0 Sun Aug 25 09:52:55 1996 +++ xc/lib/Xi/XIint.h Tue Jul 31 20:44:39 2001 @@ -1,12 +1,24 @@ -/* $XFree86: xc/lib/Xi/XIint.h,v 3.0 1996/08/25 13:52:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XIint.h,v 3.1 2001/08/01 00:44:39 tsi Exp $ */ /* * XIint.h - Header definition and support file for the internal * support routines used by the Xi library. */ -XExtDisplayInfo * XInput_find_display( +#ifndef _XIINT_H_ +#define _XIINT_H_ + +extern XExtDisplayInfo * XInput_find_display( +#if NeedFunctionPrototypes + Display* +#endif +); + +extern int _XiCheckExtInit( #if NeedFunctionPrototypes - Display* + Display*, + int +#endif +); + #endif - ); Index: xc/lib/Xi/XListDev.c diff -u xc/lib/Xi/XListDev.c:3.2 xc/lib/Xi/XListDev.c:3.4 --- xc/lib/Xi/XListDev.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XListDev.c Fri Dec 14 14:55:19 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XListDev.c,v 1.4 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XListDev.c,v 1.5 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XListDev.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XListDev.c,v 3.4 2001/12/14 19:55:19 dawes Exp $ */ /*********************************************************************** * @@ -67,8 +71,8 @@ int size; xListInputDevicesReq *req; xListInputDevicesReply rep; - xDeviceInfo *list, *slist; - XDeviceInfo *sclist; + xDeviceInfo *list, *slist = NULL; + XDeviceInfo *sclist = NULL; XDeviceInfo *clist = NULL; xAnyClassPtr any, sav_any; XAnyClassPtr Any; Index: xc/lib/Xi/XOpenDev.c diff -u xc/lib/Xi/XOpenDev.c:3.2 xc/lib/Xi/XOpenDev.c:3.3 --- xc/lib/Xi/XOpenDev.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XOpenDev.c Fri Dec 14 14:55:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XOpenDev.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XOpenDev.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XOpenDev.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XOpenDev.c,v 3.3 2001/12/14 19:55:20 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XQueryDv.c diff -u xc/lib/Xi/XQueryDv.c:3.2 xc/lib/Xi/XQueryDv.c:3.3 --- xc/lib/Xi/XQueryDv.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XQueryDv.c Fri Dec 14 14:55:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XQueryDv.c,v 1.3 2000/08/17 19:45:56 cpqbld Exp $ */ +/* $Xorg: XQueryDv.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XQueryDv.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XQueryDv.c,v 3.3 2001/12/14 19:55:20 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSelect.c diff -u xc/lib/Xi/XSelect.c:3.2 xc/lib/Xi/XSelect.c:3.3 --- xc/lib/Xi/XSelect.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XSelect.c Fri Dec 14 14:55:21 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XSelect.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XSelect.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSelect.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSelect.c,v 3.3 2001/12/14 19:55:21 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetBMap.c diff -u xc/lib/Xi/XSetBMap.c:3.2 xc/lib/Xi/XSetBMap.c:3.3 --- xc/lib/Xi/XSetBMap.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XSetBMap.c Fri Dec 14 14:55:21 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XSetBMap.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XSetBMap.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetBMap.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetBMap.c,v 3.3 2001/12/14 19:55:21 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetDVal.c diff -u xc/lib/Xi/XSetDVal.c:3.2 xc/lib/Xi/XSetDVal.c:3.3 --- xc/lib/Xi/XSetDVal.c:3.2 Wed Jan 17 14:42:50 2001 +++ xc/lib/Xi/XSetDVal.c Fri Dec 14 14:55:22 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XSetDVal.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XSetDVal.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetDVal.c,v 3.2 2001/01/17 19:42:50 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetDVal.c,v 3.3 2001/12/14 19:55:22 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetMMap.c diff -u xc/lib/Xi/XSetMMap.c:3.2 xc/lib/Xi/XSetMMap.c:3.3 --- xc/lib/Xi/XSetMMap.c:3.2 Wed Jan 17 14:42:51 2001 +++ xc/lib/Xi/XSetMMap.c Fri Dec 14 14:55:22 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XSetMMap.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XSetMMap.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetMMap.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetMMap.c,v 3.3 2001/12/14 19:55:22 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSetMode.c diff -u xc/lib/Xi/XSetMode.c:3.2 xc/lib/Xi/XSetMode.c:3.3 --- xc/lib/Xi/XSetMode.c:3.2 Wed Jan 17 14:42:51 2001 +++ xc/lib/Xi/XSetMode.c Fri Dec 14 14:55:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XSetMode.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XSetMode.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSetMode.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSetMode.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XSndExEv.c diff -u xc/lib/Xi/XSndExEv.c:3.2 xc/lib/Xi/XSndExEv.c:3.3 --- xc/lib/Xi/XSndExEv.c:3.2 Wed Jan 17 14:42:51 2001 +++ xc/lib/Xi/XSndExEv.c Fri Dec 14 14:55:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XSndExEv.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XSndExEv.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XSndExEv.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XSndExEv.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XStFocus.c diff -u xc/lib/Xi/XStFocus.c:3.2 xc/lib/Xi/XStFocus.c:3.3 --- xc/lib/Xi/XStFocus.c:3.2 Wed Jan 17 14:42:51 2001 +++ xc/lib/Xi/XStFocus.c Fri Dec 14 14:55:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XStFocus.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XStFocus.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XStFocus.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XStFocus.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XUngrDev.c diff -u xc/lib/Xi/XUngrDev.c:3.2 xc/lib/Xi/XUngrDev.c:3.3 --- xc/lib/Xi/XUngrDev.c:3.2 Wed Jan 17 14:42:51 2001 +++ xc/lib/Xi/XUngrDev.c Fri Dec 14 14:55:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XUngrDev.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XUngrDev.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDev.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDev.c,v 3.3 2001/12/14 19:55:23 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XUngrDvB.c diff -u xc/lib/Xi/XUngrDvB.c:3.2 xc/lib/Xi/XUngrDvB.c:3.3 --- xc/lib/Xi/XUngrDvB.c:3.2 Wed Jan 17 14:42:51 2001 +++ xc/lib/Xi/XUngrDvB.c Fri Dec 14 14:55:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XUngrDvB.c,v 1.3 2000/08/17 19:45:57 cpqbld Exp $ */ +/* $Xorg: XUngrDvB.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDvB.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDvB.c,v 3.3 2001/12/14 19:55:25 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xi/XUngrDvK.c diff -u xc/lib/Xi/XUngrDvK.c:3.2 xc/lib/Xi/XUngrDvK.c:3.3 --- xc/lib/Xi/XUngrDvK.c:3.2 Wed Jan 17 14:42:51 2001 +++ xc/lib/Xi/XUngrDvK.c Fri Dec 14 14:55:26 2001 @@ -1,10 +1,14 @@ -/* $Xorg: XUngrDvK.c,v 1.3 2000/08/17 19:45:58 cpqbld Exp $ */ +/* $Xorg: XUngrDvK.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/Xi/XUngrDvK.c,v 3.2 2001/01/17 19:42:51 dawes Exp $ */ +/* $XFree86: xc/lib/Xi/XUngrDvK.c,v 3.3 2001/12/14 19:55:26 dawes Exp $ */ /*********************************************************************** * Index: xc/lib/Xinerama/Xinerama.c diff -u xc/lib/Xinerama/Xinerama.c:1.1 xc/lib/Xinerama/Xinerama.c:1.2 --- xc/lib/Xinerama/Xinerama.c:1.1 Sun Feb 27 18:10:04 2000 +++ xc/lib/Xinerama/Xinerama.c Mon Jul 23 13:20:28 2001 @@ -1,25 +1,29 @@ -/* $TOG: XPanoramiX.c /main/2 1997/11/16 08:45:41 kaleb $ */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ -/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.1 2000/02/27 23:10:04 mvojkovi Exp $ */ +/* $Xorg: XPanoramiX.c,v 1.4 2000/08/17 19:45:51 cpqbld Exp $ */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.2 2001/07/23 17:20:28 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/lib/Xmu/AllCmap.c diff -u xc/lib/Xmu/AllCmap.c:1.7 xc/lib/Xmu/AllCmap.c:1.8 --- xc/lib/Xmu/AllCmap.c:1.7 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/AllCmap.c Fri Dec 14 14:55:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: AllCmap.c,v 1.3 2000/08/17 19:45:58 cpqbld Exp $ */ +/* $Xorg: AllCmap.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/AllCmap.c,v 1.7 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/AllCmap.c,v 1.8 2001/12/14 19:55:32 dawes Exp $ */ #include #include Index: xc/lib/Xmu/Atoms.c diff -u xc/lib/Xmu/Atoms.c:3.6 xc/lib/Xmu/Atoms.c:3.8 --- xc/lib/Xmu/Atoms.c:3.6 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/Atoms.c Fri Dec 14 14:55:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Atoms.c,v 1.3 2000/08/17 19:45:58 cpqbld Exp $ */ +/* $Xorg: Atoms.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Atoms.c,v 3.6 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Atoms.c,v 3.8 2001/12/14 19:55:33 dawes Exp $ */ /* * This file contains routines to cache atoms, avoiding multiple @@ -56,7 +60,7 @@ #define STATIC static #endif -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define DeclareAtom(atom,text) \ STATIC struct _AtomRec __##atom = { text, NULL }; \ AtomPtr _##atom = &__##atom; Index: xc/lib/Xmu/Atoms.h diff -u xc/lib/Xmu/Atoms.h:1.6 xc/lib/Xmu/Atoms.h:1.7 --- xc/lib/Xmu/Atoms.h:1.6 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/Atoms.h Fri Dec 14 14:55:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Atoms.h,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: Atoms.h,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Atoms.h,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Atoms.h,v 1.7 2001/12/14 19:55:33 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/CharSet.h diff -u xc/lib/Xmu/CharSet.h:1.7 xc/lib/Xmu/CharSet.h:1.8 --- xc/lib/Xmu/CharSet.h:1.7 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/CharSet.h Fri Dec 14 14:55:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CharSet.h,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CharSet.h,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/CharSet.h,v 1.7 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CharSet.h,v 1.8 2001/12/14 19:55:33 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/ClientWin.c diff -u xc/lib/Xmu/ClientWin.c:1.6 xc/lib/Xmu/ClientWin.c:1.7 --- xc/lib/Xmu/ClientWin.c:1.6 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/ClientWin.c Fri Dec 14 14:55:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ClientWin.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: ClientWin.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ClientWin.c,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ClientWin.c,v 1.7 2001/12/14 19:55:34 dawes Exp $ */ #include #include Index: xc/lib/Xmu/CloseHook.c diff -u xc/lib/Xmu/CloseHook.c:3.4 xc/lib/Xmu/CloseHook.c:3.6 --- xc/lib/Xmu/CloseHook.c:3.4 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/CloseHook.c Fri Dec 14 14:55:35 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CloseHook.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CloseHook.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CloseHook.c,v 3.4 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CloseHook.c,v 3.6 2001/12/14 19:55:35 dawes Exp $ */ /* * CloseDisplayHook package - provide callback on XCloseDisplay @@ -54,12 +58,7 @@ #include #include #include - -#ifdef X_NOT_STDC_ENV -extern char *malloc(); /* should be void * */ -#else #include -#endif /* * Private data Index: xc/lib/Xmu/CloseHook.h diff -u xc/lib/Xmu/CloseHook.h:1.6 xc/lib/Xmu/CloseHook.h:1.7 --- xc/lib/Xmu/CloseHook.h:1.6 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/CloseHook.h Fri Dec 14 14:55:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CloseHook.h,v 1.4 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CloseHook.h,v 1.5 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CloseHook.h,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CloseHook.h,v 1.7 2001/12/14 19:55:35 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/CmapAlloc.c diff -u xc/lib/Xmu/CmapAlloc.c:1.6 xc/lib/Xmu/CmapAlloc.c:1.7 --- xc/lib/Xmu/CmapAlloc.c:1.6 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/CmapAlloc.c Fri Dec 14 14:55:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CmapAlloc.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CmapAlloc.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CmapAlloc.c,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CmapAlloc.c,v 1.7 2001/12/14 19:55:35 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/Converters.h diff -u xc/lib/Xmu/Converters.h:1.5 xc/lib/Xmu/Converters.h:1.6 --- xc/lib/Xmu/Converters.h:1.5 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/Converters.h Fri Dec 14 14:55:35 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Converters.h,v 1.4 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: Converters.h,v 1.5 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/Converters.h,v 1.5 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Converters.h,v 1.6 2001/12/14 19:55:35 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/CrCmap.c diff -u xc/lib/Xmu/CrCmap.c:3.6 xc/lib/Xmu/CrCmap.c:3.7 --- xc/lib/Xmu/CrCmap.c:3.6 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/CrCmap.c Fri Dec 14 14:55:36 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CrCmap.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CrCmap.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CrCmap.c,v 3.6 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CrCmap.c,v 3.7 2001/12/14 19:55:36 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/CrPixFBit.c diff -u xc/lib/Xmu/CrPixFBit.c:1.6 xc/lib/Xmu/CrPixFBit.c:1.7 --- xc/lib/Xmu/CrPixFBit.c:1.6 Wed Jan 17 14:42:53 2001 +++ xc/lib/Xmu/CrPixFBit.c Fri Dec 14 14:55:37 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CrPixFBit.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CrPixFBit.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CrPixFBit.c,v 1.6 2001/01/17 19:42:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CrPixFBit.c,v 1.7 2001/12/14 19:55:37 dawes Exp $ */ /* * This file contains miscellaneous utility routines and is not part of the Index: xc/lib/Xmu/CurUtil.h diff -u xc/lib/Xmu/CurUtil.h:1.5 xc/lib/Xmu/CurUtil.h:1.6 --- xc/lib/Xmu/CurUtil.h:1.5 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/CurUtil.h Fri Dec 14 14:55:38 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CurUtil.h,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CurUtil.h,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CurUtil.h,v 1.5 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CurUtil.h,v 1.6 2001/12/14 19:55:38 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/CursorName.c diff -u xc/lib/Xmu/CursorName.c:3.6 xc/lib/Xmu/CursorName.c:3.7 --- xc/lib/Xmu/CursorName.c:3.6 Thu Mar 29 21:15:19 2001 +++ xc/lib/Xmu/CursorName.c Fri Dec 14 14:55:38 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CursorName.c,v 1.3 2000/08/17 19:45:59 cpqbld Exp $ */ +/* $Xorg: CursorName.c,v 1.4 2001/02/09 02:03:51 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CursorName.c,v 3.6 2001/03/30 02:15:19 keithp Exp $ */ +/* $XFree86: xc/lib/Xmu/CursorName.c,v 3.7 2001/12/14 19:55:38 dawes Exp $ */ #include #include Index: xc/lib/Xmu/CvtCache.c diff -u xc/lib/Xmu/CvtCache.c:3.4 xc/lib/Xmu/CvtCache.c:3.7 --- xc/lib/Xmu/CvtCache.c:3.4 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/CvtCache.c Fri Dec 14 14:55:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CvtCache.c,v 1.4 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: CvtCache.c,v 1.5 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CvtCache.c,v 3.4 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CvtCache.c,v 3.7 2001/12/14 19:55:39 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -31,12 +35,7 @@ #include #include #include - -#ifdef X_NOT_STDC_ENV -extern char *malloc(); -#else #include -#endif /* * Prototypes @@ -44,12 +43,6 @@ static int _CloseDisplay(XmuDisplayQueue*, XmuDisplayQueueEntry*); static int _FreeCCDQ(XmuDisplayQueue*); static void _InitializeCvtCache(XmuCvtCache*); - -/* - * From LocBitmap.c - */ -void _XmuStringToBitmapFreeCache(register XmuCvtCache*); -void _XmuStringToBitmapInitCache(register XmuCvtCache*); /* * Initialization Index: xc/lib/Xmu/CvtCache.h diff -u xc/lib/Xmu/CvtCache.h:1.6 xc/lib/Xmu/CvtCache.h:1.7 --- xc/lib/Xmu/CvtCache.h:1.6 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/CvtCache.h Fri Dec 14 14:55:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CvtCache.h,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: CvtCache.h,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CvtCache.h,v 1.6 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CvtCache.h,v 1.7 2001/12/14 19:55:39 dawes Exp $ */ /* * Public Interfaces Index: xc/lib/Xmu/CvtStdSel.c diff -u xc/lib/Xmu/CvtStdSel.c:3.15 xc/lib/Xmu/CvtStdSel.c:3.20 --- xc/lib/Xmu/CvtStdSel.c:3.15 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/CvtStdSel.c Fri Dec 14 14:55:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CvtStdSel.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: CvtStdSel.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/CvtStdSel.c,v 3.15 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/CvtStdSel.c,v 3.20 2001/12/14 19:55:39 dawes Exp $ */ /* * This file contains routines to handle common selection targets. @@ -64,9 +68,7 @@ #endif #include -#ifndef X_NOT_STDC_ENV #include -#endif #include "Atoms.h" #include "StdSel.h" #include "SysUtil.h" @@ -88,11 +90,6 @@ #endif #endif /*X_OS_FILE*/ #ifdef USE_UNAME -#ifdef ultrix -#ifndef __STDC__ -#include /* fixed in Ultrix 3.0 */ -#endif -#endif #include #endif #endif @@ -217,10 +214,12 @@ *format = 8; return True; } -#if defined(TCPCONN) || defined(MNX_TCPCONN) +#if defined(TCPCONN) if (*target == XA_IP_ADDRESS(d)) { char hostname[1024]; +#ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; +#endif struct hostent *hostp; hostname[0] = '\0'; Index: xc/lib/Xmu/DefErrMsg.c diff -u xc/lib/Xmu/DefErrMsg.c:1.7 xc/lib/Xmu/DefErrMsg.c:1.8 --- xc/lib/Xmu/DefErrMsg.c:1.7 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/DefErrMsg.c Fri Dec 14 14:55:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DefErrMsg.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: DefErrMsg.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DefErrMsg.c,v 1.7 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DefErrMsg.c,v 1.8 2001/12/14 19:55:39 dawes Exp $ */ #include #define NEED_EVENTS Index: xc/lib/Xmu/DelCmap.c diff -u xc/lib/Xmu/DelCmap.c:1.6 xc/lib/Xmu/DelCmap.c:1.7 --- xc/lib/Xmu/DelCmap.c:1.6 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/DelCmap.c Fri Dec 14 14:55:40 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DelCmap.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: DelCmap.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DelCmap.c,v 1.6 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DelCmap.c,v 1.7 2001/12/14 19:55:40 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/DisplayQue.c diff -u xc/lib/Xmu/DisplayQue.c:3.3 xc/lib/Xmu/DisplayQue.c:3.5 --- xc/lib/Xmu/DisplayQue.c:3.3 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/DisplayQue.c Fri Dec 14 14:55:40 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DisplayQue.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: DisplayQue.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DisplayQue.c,v 3.3 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DisplayQue.c,v 3.5 2001/12/14 19:55:40 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -29,9 +33,7 @@ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include /* Index: xc/lib/Xmu/DisplayQue.h diff -u xc/lib/Xmu/DisplayQue.h:1.5 xc/lib/Xmu/DisplayQue.h:1.6 --- xc/lib/Xmu/DisplayQue.h:1.5 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/DisplayQue.h Fri Dec 14 14:55:40 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DisplayQue.h,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: DisplayQue.h,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DisplayQue.h,v 1.5 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DisplayQue.h,v 1.6 2001/12/14 19:55:40 dawes Exp $ */ #ifndef _XMU_DISPLAYQUE_H_ #define _XMU_DISPLAYQUE_H_ Index: xc/lib/Xmu/Distinct.c diff -u xc/lib/Xmu/Distinct.c:3.4 xc/lib/Xmu/Distinct.c:3.6 --- xc/lib/Xmu/Distinct.c:3.4 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/Distinct.c Fri Dec 14 14:55:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Distinct.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: Distinct.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,16 +25,14 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Distinct.c,v 3.4 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Distinct.c,v 3.6 2001/12/14 19:55:41 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium */ -# include -# ifndef X_NOT_STDC_ENV -# include -# endif +#include +#include #include #include Index: xc/lib/Xmu/DrRndRect.c diff -u xc/lib/Xmu/DrRndRect.c:1.6 xc/lib/Xmu/DrRndRect.c:1.7 --- xc/lib/Xmu/DrRndRect.c:1.6 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/DrRndRect.c Fri Dec 14 14:55:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DrRndRect.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: DrRndRect.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DrRndRect.c,v 1.6 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DrRndRect.c,v 1.7 2001/12/14 19:55:41 dawes Exp $ */ /* * XmuDrawRoundedRectangle, XmuFillRoundedRectangle Index: xc/lib/Xmu/DrawLogo.c diff -u xc/lib/Xmu/DrawLogo.c:1.7 xc/lib/Xmu/DrawLogo.c:1.8 --- xc/lib/Xmu/DrawLogo.c:1.7 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/DrawLogo.c Fri Dec 14 14:55:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: DrawLogo.c,v 1.3 2000/08/17 19:46:00 cpqbld Exp $ */ +/* $Xorg: DrawLogo.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/DrawLogo.c,v 1.7 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/DrawLogo.c,v 1.8 2001/12/14 19:55:41 dawes Exp $ */ #include #include Index: xc/lib/Xmu/Drawing.h diff -u xc/lib/Xmu/Drawing.h:1.5 xc/lib/Xmu/Drawing.h:1.6 --- xc/lib/Xmu/Drawing.h:1.5 Wed Jan 17 14:42:54 2001 +++ xc/lib/Xmu/Drawing.h Fri Dec 14 14:55:42 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Drawing.h,v 1.4 2000/08/17 19:46:01 cpqbld Exp $ */ +/* $Xorg: Drawing.h,v 1.5 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Drawing.h,v 1.5 2001/01/17 19:42:54 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Drawing.h,v 1.6 2001/12/14 19:55:42 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/Editres.h diff -u xc/lib/Xmu/Editres.h:1.5 xc/lib/Xmu/Editres.h:1.6 --- xc/lib/Xmu/Editres.h:1.5 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/Editres.h Fri Dec 14 14:55:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Editres.h,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ +/* $Xorg: Editres.h,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Editres.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Editres.h,v 1.6 2001/12/14 19:55:43 dawes Exp $ */ #include Index: xc/lib/Xmu/EditresCom.c diff -u xc/lib/Xmu/EditresCom.c:1.15 xc/lib/Xmu/EditresCom.c:1.16 --- xc/lib/Xmu/EditresCom.c:1.15 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/EditresCom.c Fri Dec 14 14:55:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: EditresCom.c,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ +/* $Xorg: EditresCom.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.15 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.16 2001/12/14 19:55:43 dawes Exp $ */ /* * Author: Chris D. Peterson, Dave Sternlicht, MIT X Consortium Index: xc/lib/Xmu/EditresP.h diff -u xc/lib/Xmu/EditresP.h:1.5 xc/lib/Xmu/EditresP.h:1.6 --- xc/lib/Xmu/EditresP.h:1.5 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/EditresP.h Fri Dec 14 14:55:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: EditresP.h,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ +/* $Xorg: EditresP.h,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/EditresP.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/EditresP.h,v 1.6 2001/12/14 19:55:44 dawes Exp $ */ /* * Author: Chris D. Peterson, MIT X Consortium Index: xc/lib/Xmu/Error.h diff -u xc/lib/Xmu/Error.h:1.5 xc/lib/Xmu/Error.h:1.6 --- xc/lib/Xmu/Error.h:1.5 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/Error.h Fri Dec 14 14:55:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Error.h,v 1.4 2000/08/17 19:46:01 cpqbld Exp $ */ +/* $Xorg: Error.h,v 1.5 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Error.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Error.h,v 1.6 2001/12/14 19:55:45 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/ExtAgent.c diff -u xc/lib/Xmu/ExtAgent.c:1.6 xc/lib/Xmu/ExtAgent.c:1.7 --- xc/lib/Xmu/ExtAgent.c:1.6 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/ExtAgent.c Fri Dec 14 14:55:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ExtAgent.c,v 1.3 2000/08/17 19:46:01 cpqbld Exp $ */ +/* $Xorg: ExtAgent.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ExtAgent.c,v 1.6 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ExtAgent.c,v 1.7 2001/12/14 19:55:45 dawes Exp $ */ #include #include Index: xc/lib/Xmu/ExtAgent.h diff -u xc/lib/Xmu/ExtAgent.h:1.5 xc/lib/Xmu/ExtAgent.h:1.6 --- xc/lib/Xmu/ExtAgent.h:1.5 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/ExtAgent.h Fri Dec 14 14:55:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ExtAgent.h,v 1.4 2000/08/17 19:46:01 cpqbld Exp $ */ +/* $Xorg: ExtAgent.h,v 1.5 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1994,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ExtAgent.h,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ExtAgent.h,v 1.6 2001/12/14 19:55:45 dawes Exp $ */ #include #include Index: xc/lib/Xmu/FToCback.c diff -u xc/lib/Xmu/FToCback.c:1.6 xc/lib/Xmu/FToCback.c:1.7 --- xc/lib/Xmu/FToCback.c:1.6 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/FToCback.c Fri Dec 14 14:55:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: FToCback.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: FToCback.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/FToCback.c,v 1.6 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/FToCback.c,v 1.7 2001/12/14 19:55:45 dawes Exp $ */ #include #include Index: xc/lib/Xmu/GetHost.c diff -u xc/lib/Xmu/GetHost.c:3.6 xc/lib/Xmu/GetHost.c:3.8 --- xc/lib/Xmu/GetHost.c:3.6 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/GetHost.c Fri Dec 14 14:55:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GetHost.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: GetHost.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/GetHost.c,v 3.6 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/GetHost.c,v 3.8 2001/12/14 19:55:46 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -30,10 +34,8 @@ */ #include -#ifndef X_NOT_STDC_ENV #include #include -#endif #ifdef WIN32 #include Index: xc/lib/Xmu/GrayPixmap.c diff -u xc/lib/Xmu/GrayPixmap.c:1.5 xc/lib/Xmu/GrayPixmap.c:1.6 --- xc/lib/Xmu/GrayPixmap.c:1.5 Wed Jan 17 14:42:55 2001 +++ xc/lib/Xmu/GrayPixmap.c Fri Dec 14 14:55:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: GrayPixmap.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: GrayPixmap.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xmu/GrayPixmap.c,v 1.5 2001/01/17 19:42:55 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/GrayPixmap.c,v 1.6 2001/12/14 19:55:46 dawes Exp $ */ #include #include Index: xc/lib/Xmu/Initer.c diff -u xc/lib/Xmu/Initer.c:1.6 xc/lib/Xmu/Initer.c:1.7 --- xc/lib/Xmu/Initer.c:1.6 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/Initer.c Fri Dec 14 14:55:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Initer.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: Initer.c,v 1.4 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Initer.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Initer.c,v 1.7 2001/12/14 19:55:46 dawes Exp $ */ /* Created By: Chris D. Peterson * MIT X Consortium Index: xc/lib/Xmu/Initer.h diff -u xc/lib/Xmu/Initer.h:1.5 xc/lib/Xmu/Initer.h:1.6 --- xc/lib/Xmu/Initer.h:1.5 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/Initer.h Fri Dec 14 14:55:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Initer.h,v 1.4 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: Initer.h,v 1.5 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Initer.h,v 1.5 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Initer.h,v 1.6 2001/12/14 19:55:46 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/LocBitmap.c diff -u xc/lib/Xmu/LocBitmap.c:3.6 xc/lib/Xmu/LocBitmap.c:3.9 --- xc/lib/Xmu/LocBitmap.c:3.6 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/LocBitmap.c Fri Dec 14 14:55:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: LocBitmap.c,v 1.6 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: LocBitmap.c,v 1.7 2001/02/09 02:03:52 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,17 +25,15 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/LocBitmap.c,v 3.6 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/LocBitmap.c,v 3.9 2001/12/14 19:55:47 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium */ #include -#ifndef X_NOT_STDC_ENV #include #include -#endif #include #include #include @@ -104,7 +106,9 @@ XmuCvtCache *cache = _XmuCCLookupDisplay (dpy); char **file_paths = (char **) NULL; char filename[PATH_MAX]; +#if 0 char* bitmapdir = BITMAPDIR; +#endif unsigned int width, height; int xhot, yhot; int i; Index: xc/lib/Xmu/Lookup.c diff -u xc/lib/Xmu/Lookup.c:3.7 xc/lib/Xmu/Lookup.c:3.8 --- xc/lib/Xmu/Lookup.c:3.7 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/Lookup.c Fri Dec 14 14:55:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Lookup.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: Lookup.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Lookup.c,v 3.7 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Lookup.c,v 3.8 2001/12/14 19:55:47 dawes Exp $ */ #include Index: xc/lib/Xmu/LookupCmap.c diff -u xc/lib/Xmu/LookupCmap.c:1.6 xc/lib/Xmu/LookupCmap.c:1.8 --- xc/lib/Xmu/LookupCmap.c:1.6 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/LookupCmap.c Fri Dec 14 14:55:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: LookupCmap.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: LookupCmap.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/LookupCmap.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/LookupCmap.c,v 1.8 2001/12/14 19:55:47 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium @@ -32,12 +36,7 @@ #include #include #include - -#ifndef X_NOT_STDC_ENV #include -#else -extern char *malloc(); -#endif /* * Prototypes Index: xc/lib/Xmu/Lower.c diff -u xc/lib/Xmu/Lower.c:1.10 xc/lib/Xmu/Lower.c:1.12 --- xc/lib/Xmu/Lower.c:1.10 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/Lower.c Fri Dec 14 14:55:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Lower.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: Lower.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/Lower.c,v 1.10 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Lower.c,v 1.12 2001/12/14 19:55:47 dawes Exp $ */ #define XK_LATIN1 #include @@ -37,13 +41,7 @@ #include "snprintf.c" #endif -#if NeedVarargsPrototypes #include -#define Va_start(a,b) va_start(a,b) -#else -#include -#define Va_start(a,b) va_start(a) -#endif /* * ISO Latin-1 case conversion routine @@ -143,7 +141,7 @@ if (size <= 0) return (size); - Va_start(ap, fmt); + va_start(ap, fmt); #if 0 retval = vsprintf(str, fmt, ap); Index: xc/lib/Xmu/Misc.h diff -u xc/lib/Xmu/Misc.h:1.1.1.3 xc/lib/Xmu/Misc.h:1.2 --- xc/lib/Xmu/Misc.h:1.1.1.3 Tue Jan 16 17:22:15 2001 +++ xc/lib/Xmu/Misc.h Fri Dec 14 14:55:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Misc.h,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: Misc.h,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xmu/RdBitF.c diff -u xc/lib/Xmu/RdBitF.c:3.11 xc/lib/Xmu/RdBitF.c:3.12 --- xc/lib/Xmu/RdBitF.c:3.11 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/RdBitF.c Fri Dec 14 14:55:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: RdBitF.c,v 1.3 2000/08/17 19:46:02 cpqbld Exp $ */ +/* $Xorg: RdBitF.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/RdBitF.c,v 3.11 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/RdBitF.c,v 3.12 2001/12/14 19:55:48 dawes Exp $ */ /* * This file contains miscellaneous utility routines and is not part of the Index: xc/lib/Xmu/ScrOfWin.c diff -u xc/lib/Xmu/ScrOfWin.c:1.6 xc/lib/Xmu/ScrOfWin.c:1.7 --- xc/lib/Xmu/ScrOfWin.c:1.6 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/ScrOfWin.c Fri Dec 14 14:55:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ScrOfWin.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: ScrOfWin.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ScrOfWin.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ScrOfWin.c,v 1.7 2001/12/14 19:55:48 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/ShapeWidg.c diff -u xc/lib/Xmu/ShapeWidg.c:1.7 xc/lib/Xmu/ShapeWidg.c:1.8 --- xc/lib/Xmu/ShapeWidg.c:1.7 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/ShapeWidg.c Fri Dec 14 14:55:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ShapeWidg.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: ShapeWidg.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/ShapeWidg.c,v 1.7 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/ShapeWidg.c,v 1.8 2001/12/14 19:55:48 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StdCmap.c diff -u xc/lib/Xmu/StdCmap.c:1.5 xc/lib/Xmu/StdCmap.c:1.6 --- xc/lib/Xmu/StdCmap.c:1.5 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/StdCmap.c Fri Dec 14 14:55:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StdCmap.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StdCmap.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StdCmap.c,v 1.5 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StdCmap.c,v 1.6 2001/12/14 19:55:48 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/StdCmap.h diff -u xc/lib/Xmu/StdCmap.h:1.8 xc/lib/Xmu/StdCmap.h:1.9 --- xc/lib/Xmu/StdCmap.h:1.8 Tue Jan 23 12:38:14 2001 +++ xc/lib/Xmu/StdCmap.h Fri Dec 14 14:55:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StdCmap.h,v 1.4 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StdCmap.h,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StdCmap.h,v 1.8 2001/01/23 17:38:14 keithp Exp $ */ +/* $XFree86: xc/lib/Xmu/StdCmap.h,v 1.9 2001/12/14 19:55:49 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/StdSel.h diff -u xc/lib/Xmu/StdSel.h:1.7 xc/lib/Xmu/StdSel.h:1.8 --- xc/lib/Xmu/StdSel.h:1.7 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/StdSel.h Fri Dec 14 14:55:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StdSel.h,v 1.4 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StdSel.h,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StdSel.h,v 1.7 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StdSel.h,v 1.8 2001/12/14 19:55:50 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/StrToBS.c diff -u xc/lib/Xmu/StrToBS.c:1.6 xc/lib/Xmu/StrToBS.c:1.7 --- xc/lib/Xmu/StrToBS.c:1.6 Wed Jan 17 14:42:56 2001 +++ xc/lib/Xmu/StrToBS.c Fri Dec 14 14:55:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToBS.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StrToBS.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/StrToBS.c,v 1.6 2001/01/17 19:42:56 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToBS.c,v 1.7 2001/12/14 19:55:50 dawes Exp $ */ #include #include "Converters.h" Index: xc/lib/Xmu/StrToBmap.c diff -u xc/lib/Xmu/StrToBmap.c:1.5 xc/lib/Xmu/StrToBmap.c:1.6 --- xc/lib/Xmu/StrToBmap.c:1.5 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToBmap.c Fri Dec 14 14:55:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToBmap.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StrToBmap.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xmu/StrToBmap.c,v 1.5 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToBmap.c,v 1.6 2001/12/14 19:55:50 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToCurs.c diff -u xc/lib/Xmu/StrToCurs.c:1.7 xc/lib/Xmu/StrToCurs.c:1.9 --- xc/lib/Xmu/StrToCurs.c:1.7 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToCurs.c Fri Dec 14 14:55:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToCurs.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StrToCurs.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ ******************************************************************/ -/* $XFree86: xc/lib/Xmu/StrToCurs.c,v 1.7 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToCurs.c,v 1.9 2001/12/14 19:55:51 dawes Exp $ */ #include #include @@ -128,7 +132,7 @@ Screen *screen; register int i; char maskname[PATH_MAX]; - Pixmap source, mask; + Pixmap source, mask = 0; /* XXX - make fg/bg resources */ static XColor bgColor = {0, 0xffff, 0xffff, 0xffff}; static XColor fgColor = {0, 0, 0, 0}; Index: xc/lib/Xmu/StrToGrav.c diff -u xc/lib/Xmu/StrToGrav.c:1.6 xc/lib/Xmu/StrToGrav.c:1.7 --- xc/lib/Xmu/StrToGrav.c:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToGrav.c Fri Dec 14 14:55:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToGrav.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StrToGrav.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToGrav.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToGrav.c,v 1.7 2001/12/14 19:55:52 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToJust.c diff -u xc/lib/Xmu/StrToJust.c:1.6 xc/lib/Xmu/StrToJust.c:1.7 --- xc/lib/Xmu/StrToJust.c:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToJust.c Fri Dec 14 14:55:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToJust.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StrToJust.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/StrToJust.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToJust.c,v 1.7 2001/12/14 19:55:52 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToLong.c diff -u xc/lib/Xmu/StrToLong.c:1.7 xc/lib/Xmu/StrToLong.c:1.9 --- xc/lib/Xmu/StrToLong.c:1.7 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToLong.c Fri Dec 14 14:55:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToLong.c,v 1.3 2000/08/17 19:46:03 cpqbld Exp $ */ +/* $Xorg: StrToLong.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,12 +25,12 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToLong.c,v 1.7 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToLong.c,v 1.9 2001/12/14 19:55:52 dawes Exp $ */ #include #include -#include "SysUtil.h" -#include "Converters.h" +#include +#include void XmuCvtStringToLong(XrmValuePtr args, Cardinal *num_args, Index: xc/lib/Xmu/StrToOrnt.c diff -u xc/lib/Xmu/StrToOrnt.c:1.6 xc/lib/Xmu/StrToOrnt.c:1.7 --- xc/lib/Xmu/StrToOrnt.c:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToOrnt.c Fri Dec 14 14:55:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToOrnt.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: StrToOrnt.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/StrToOrnt.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToOrnt.c,v 1.7 2001/12/14 19:55:52 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToShap.c diff -u xc/lib/Xmu/StrToShap.c:1.6 xc/lib/Xmu/StrToShap.c:1.7 --- xc/lib/Xmu/StrToShap.c:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToShap.c Fri Dec 14 14:55:53 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToShap.c,v 1.4 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: StrToShap.c,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToShap.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToShap.c,v 1.7 2001/12/14 19:55:53 dawes Exp $ */ #include #include Index: xc/lib/Xmu/StrToWidg.c diff -u xc/lib/Xmu/StrToWidg.c:1.6 xc/lib/Xmu/StrToWidg.c:1.7 --- xc/lib/Xmu/StrToWidg.c:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/StrToWidg.c Fri Dec 14 14:55:53 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrToWidg.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: StrToWidg.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/StrToWidg.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/StrToWidg.c,v 1.7 2001/12/14 19:55:53 dawes Exp $ */ /* * XmuCvtStringToWidget Index: xc/lib/Xmu/SysUtil.h diff -u xc/lib/Xmu/SysUtil.h:1.7 xc/lib/Xmu/SysUtil.h:1.9 --- xc/lib/Xmu/SysUtil.h:1.7 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/SysUtil.h Fri Dec 14 14:55:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SysUtil.h,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: SysUtil.h,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.7 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.9 2001/12/14 19:55:55 dawes Exp $ */ #ifndef _SYSUTIL_H_ #define _SYSUTIL_H_ @@ -36,6 +40,7 @@ int maxlen ); +#ifndef _XMU_H_ int XmuSnprintf ( char *str, @@ -43,6 +48,7 @@ _Xconst char *fmt, ... ); +#endif _XFUNCPROTOEND Index: xc/lib/Xmu/UpdMapHint.c diff -u xc/lib/Xmu/UpdMapHint.c:1.6 xc/lib/Xmu/UpdMapHint.c:1.7 --- xc/lib/Xmu/UpdMapHint.c:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/UpdMapHint.c Fri Dec 14 14:55:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: UpdMapHint.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: UpdMapHint.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/UpdMapHint.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/UpdMapHint.c,v 1.7 2001/12/14 19:55:55 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/VisCmap.c diff -u xc/lib/Xmu/VisCmap.c:1.6 xc/lib/Xmu/VisCmap.c:1.7 --- xc/lib/Xmu/VisCmap.c:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/VisCmap.c Fri Dec 14 14:55:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: VisCmap.c,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: VisCmap.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/VisCmap.c,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/VisCmap.c,v 1.7 2001/12/14 19:55:56 dawes Exp $ */ /* * Author: Donna Converse, MIT X Consortium Index: xc/lib/Xmu/WhitePoint.h diff -u xc/lib/Xmu/WhitePoint.h:1.1.1.3 xc/lib/Xmu/WhitePoint.h:1.2 --- xc/lib/Xmu/WhitePoint.h:1.1.1.3 Tue Jan 16 17:22:48 2001 +++ xc/lib/Xmu/WhitePoint.h Fri Dec 14 14:55:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: WhitePoint.h,v 1.3 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: WhitePoint.h,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xmu/WidgetNode.c diff -u xc/lib/Xmu/WidgetNode.c:1.9 xc/lib/Xmu/WidgetNode.c:1.10 --- xc/lib/Xmu/WidgetNode.c:1.9 Sun Apr 1 10:00:01 2001 +++ xc/lib/Xmu/WidgetNode.c Fri Dec 14 14:55:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: WidgetNode.c,v 1.4 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: WidgetNode.c,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/Xmu/WidgetNode.c,v 1.9 2001/04/01 14:00:01 tsi Exp $ */ +/* $XFree86: xc/lib/Xmu/WidgetNode.c,v 1.10 2001/12/14 19:55:57 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/WidgetNode.h diff -u xc/lib/Xmu/WidgetNode.h:1.5 xc/lib/Xmu/WidgetNode.h:1.6 --- xc/lib/Xmu/WidgetNode.h:1.5 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/WidgetNode.h Fri Dec 14 14:55:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: WidgetNode.h,v 1.4 2000/08/17 19:46:04 cpqbld Exp $ */ +/* $Xorg: WidgetNode.h,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/WidgetNode.h,v 1.5 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/WidgetNode.h,v 1.6 2001/12/14 19:55:58 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium Index: xc/lib/Xmu/WinUtil.h diff -u xc/lib/Xmu/WinUtil.h:1.6 xc/lib/Xmu/WinUtil.h:1.7 --- xc/lib/Xmu/WinUtil.h:1.6 Wed Jan 17 14:42:57 2001 +++ xc/lib/Xmu/WinUtil.h Fri Dec 14 14:55:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: WinUtil.h,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ +/* $Xorg: WinUtil.h,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/WinUtil.h,v 1.6 2001/01/17 19:42:57 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/WinUtil.h,v 1.7 2001/12/14 19:55:58 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities Index: xc/lib/Xmu/Xct.c diff -u xc/lib/Xmu/Xct.c:1.7 xc/lib/Xmu/Xct.c:1.9 --- xc/lib/Xmu/Xct.c:1.7 Wed Jan 17 14:42:58 2001 +++ xc/lib/Xmu/Xct.c Fri Dec 14 14:55:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xct.c,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ +/* $Xorg: Xct.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Xct.c,v 1.7 2001/01/17 19:42:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xct.c,v 1.9 2001/12/14 19:55:58 dawes Exp $ */ #include #include "Xct.h" @@ -45,12 +49,7 @@ #define IsMore(priv) ((priv)->ptr != (priv)->ptrend) #define AmountLeft(priv) ((priv)->ptrend - (priv)->ptr) -#ifndef X_NOT_STDC_ENV #include -#else -extern char *malloc(); -extern char *realloc(); -#endif #define HT 0x09 #define NL 0x0a Index: xc/lib/Xmu/Xct.h diff -u xc/lib/Xmu/Xct.h:1.6 xc/lib/Xmu/Xct.h:1.7 --- xc/lib/Xmu/Xct.h:1.6 Wed Jan 17 14:42:58 2001 +++ xc/lib/Xmu/Xct.h Fri Dec 14 14:55:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xct.h,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ +/* $Xorg: Xct.h,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Xct.h,v 1.6 2001/01/17 19:42:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xct.h,v 1.7 2001/12/14 19:55:59 dawes Exp $ */ #ifndef _Xct_h #define _Xct_h Index: xc/lib/Xmu/Xmu.h diff -u xc/lib/Xmu/Xmu.h:1.6 xc/lib/Xmu/Xmu.h:1.9 --- xc/lib/Xmu/Xmu.h:1.6 Wed Jan 17 14:42:58 2001 +++ xc/lib/Xmu/Xmu.h Fri Dec 14 14:55:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Xmu.h,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ +/* $Xorg: Xmu.h,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.6 2001/01/17 19:42:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.9 2001/12/14 19:55:59 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -110,6 +114,10 @@ XmuScanline *XmuScanlineAndSegment(XmuScanline*, XmuSegment*); XmuScanline *XmuScanlineXorSegment(XmuScanline*, XmuSegment*); #endif /* notdef */ + +#ifndef _SYSUTIL_H_ +int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...); +#endif #endif /* _XMU_H_ */ Index: xc/lib/Xmu/sharedlib.c diff -u xc/lib/Xmu/sharedlib.c:3.3 xc/lib/Xmu/sharedlib.c:3.5 --- xc/lib/Xmu/sharedlib.c:3.3 Wed Jan 17 14:42:58 2001 +++ xc/lib/Xmu/sharedlib.c Fri Dec 14 14:56:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sharedlib.c,v 1.3 2000/08/17 19:46:05 cpqbld Exp $ */ +/* $Xorg: sharedlib.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xmu/sharedlib.c,v 3.3 2001/01/17 19:42:58 dawes Exp $ */ +/* $XFree86: xc/lib/Xmu/sharedlib.c,v 3.5 2001/12/14 19:56:00 dawes Exp $ */ #if defined(SUNSHLIB) && !defined(SHAREDCODE) @@ -32,7 +36,7 @@ struct _DisplayRec* head; }; -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define DeclareAtom(atom) \ extern struct _AtomRec __##atom; \ AtomPtr _##atom = &__##atom; Index: xc/lib/Xp/XpContext.c diff -u xc/lib/Xp/XpContext.c:1.5 xc/lib/Xp/XpContext.c:1.6 --- xc/lib/Xp/XpContext.c:1.5 Wed Jan 17 14:43:01 2001 +++ xc/lib/Xp/XpContext.c Sat Oct 27 23:32:39 2001 @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpContext.c,v 1.5 2001/01/17 19:43:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpContext.c,v 1.6 2001/10/28 03:32:39 tsi Exp $ */ #define NEED_REPLIES @@ -201,7 +201,7 @@ XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); int i; - Screen *checkScr; + Screen *checkScr = NULL; int ok; Index: xc/lib/Xp/XpExtUtil.c diff -u xc/lib/Xp/XpExtUtil.c:1.4 xc/lib/Xp/XpExtUtil.c:1.6 --- xc/lib/Xp/XpExtUtil.c:1.4 Wed Jan 17 14:43:01 2001 +++ xc/lib/Xp/XpExtUtil.c Sat Oct 27 23:32:39 2001 @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpExtUtil.c,v 1.4 2001/01/17 19:43:01 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpExtUtil.c,v 1.6 2001/10/28 03:32:39 tsi Exp $ */ #define NEED_EVENTS #define NEED_REPLIES @@ -50,7 +50,6 @@ static XExtensionInfo xp_info_data; static XExtensionInfo *xp_info = &xp_info_data; static /* const */ char *xp_extension_name = XP_PRINTNAME; -static /* const */ XEvent emptyevent; static int XpClose(); static char *XpError(); @@ -284,7 +283,6 @@ register int *count; { XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); - int i; switch ((re->type & 0x7f) - info->codes->first_event) { @@ -294,6 +292,7 @@ register XDeviceKeyEvent *ev = (XDeviceKeyEvent*) re; register deviceKeyButtonPointer *kev; register deviceValuator *vev; + int i; *count = 2; kev = (deviceKeyButtonPointer *) Xmalloc (*count * sizeof (xEvent)); @@ -337,7 +336,6 @@ #endif /* PRINT_SomeEventExample2 */ default: - return(_XUnknownNativeEvent(dpy, re, event)); + return(_XUnknownNativeEvent(dpy, re, *event)); } } - Index: xc/lib/Xp/XpExtUtil.h diff -u xc/lib/Xp/XpExtUtil.h:1.1 xc/lib/Xp/XpExtUtil.h:1.2 --- xc/lib/Xp/XpExtUtil.h:1.1 Tue Sep 26 11:56:57 2000 +++ xc/lib/Xp/XpExtUtil.h Tue Jul 31 20:44:40 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xp/XpExtUtil.h,v 1.1 2000/09/26 15:56:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xp/XpExtUtil.h,v 1.2 2001/08/01 00:44:40 tsi Exp $ */ /* * Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved. * @@ -28,8 +28,16 @@ #ifndef _XPEXTUTIL_H #define _XPEXTUTIL_H 1 +#include #include "extutil.h" extern XEXT_FIND_DISPLAY_PROTO(xp_find_display); + +extern int XpCheckExtInit( +#if NeedFunctionPrototypes + Display * /* dpy */, + int /* version_index */ +#endif +); #endif /* _XPEXTUTIL_H */ Index: xc/lib/Xp/XpNotifyPdm.c diff -u xc/lib/Xp/XpNotifyPdm.c:1.4 xc/lib/Xp/XpNotifyPdm.c:1.5 --- xc/lib/Xp/XpNotifyPdm.c:1.4 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpNotifyPdm.c Sat Oct 27 23:32:39 2001 @@ -41,6 +41,7 @@ ** ****************************************************************************** *****************************************************************************/ +/* $XFree86: xc/lib/Xp/XpNotifyPdm.c,v 1.5 2001/10/28 03:32:39 tsi Exp $ */ #include "Print.h" #include "X11/Xlibint.h" @@ -212,7 +213,6 @@ int *nelements /* return value */ ) { - Display *sel_display; XTextProperty text_prop; int status; char str1[128], str2[128], str3[128]; @@ -241,14 +241,14 @@ * locale_hint */ list[0] = XDisplayString( video_display ); - sprintf( str1, "0x%x", video_window ); + sprintf( str1, "0x%lx", (long)video_window ); list[1] = str1; list[2] = XDisplayString( print_display ); - sprintf( str2, "0x%x", print_window ); + sprintf( str2, "0x%lx", (long)print_window ); list[3] = str2; - sprintf( str3, "0x%x", print_context ); + sprintf( str3, "0x%lx", (long)print_context ); list[4] = str3; list[5] = XpGetLocaleNetString(); @@ -469,13 +469,14 @@ /* * Error - cannot determine or establish a selection_display. */ - return( (Status) NULL ); + return (Status)0; } /* * Create property and transfer data to. */ *sel_target_atom = XInternAtom( *sel_display, "PDM_MBOX", False ); + return (Status)1; } Index: xc/lib/Xp/XpPage.c diff -u xc/lib/Xp/XpPage.c:1.3 xc/lib/Xp/XpPage.c:1.4 --- xc/lib/Xp/XpPage.c:1.3 Wed Jan 17 14:43:02 2001 +++ xc/lib/Xp/XpPage.c Wed Dec 19 16:28:44 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XpPage.c,v 1.3 2000/08/17 19:46:07 cpqbld Exp $ */ +/* $Xorg: XpPage.c,v 1.4 2001/03/06 13:59:02 pookie Exp $ */ /****************************************************************************** ****************************************************************************** ** @@ -34,7 +34,7 @@ ** ****************************************************************************** *****************************************************************************/ -/* $XFree86: xc/lib/Xp/XpPage.c,v 1.3 2001/01/17 19:43:02 dawes Exp $ */ +/* $XFree86: xc/lib/Xp/XpPage.c,v 1.4 2001/12/19 21:28:44 dawes Exp $ */ #include "Printstr.h" #include "Xlibint.h" @@ -73,6 +73,7 @@ xPrintStartPageReq *req; XExtDisplayInfo *info = (XExtDisplayInfo *) xp_find_display (dpy); + XMapWindow(dpy, window); if (XpCheckExtInit(dpy, XP_INITIAL_RELEASE) == -1) return; /* NoSuchExtension */ Index: xc/lib/Xrandr/Imakefile diff -u /dev/null xc/lib/Xrandr/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:31 2002 +++ xc/lib/Xrandr/Imakefile Tue May 22 23:29:44 2001 @@ -0,0 +1,33 @@ +XCOMM $XFree86: xc/lib/Xrandr/Imakefile,v 1.1 2001/05/23 03:29:44 keithp Exp $ + + +#define DoNormalLib NormalLibXrandr +#define DoSharedLib SharedLibXrandr +#define DoDebugLib DebugLibXrandr +#define DoProfileLib ProfileLibXrandr +#define LibName Xrandr +#define SoRev SOXRANDRREV +#define IncSubdir X11 +#define IncSubSubdir extensions + +#include + +#ifdef SharedXrandrReqs +REQUIREDLIBS = SharedXrandrReqs +#endif + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + + DEFINES = $(ALLOC_DEFINES) + INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) + SRCS = Xrandr.c + OBJS = Xrandr.o + LINTLIBS = $(LINTXLIB) + +HEADERS = Xrandr.h + +#include + +DependTarget() Index: xc/lib/Xrandr/Xrandr-def.cpp diff -u /dev/null xc/lib/Xrandr/Xrandr-def.cpp:1.1 --- /dev/null Fri Jan 18 15:23:31 2002 +++ xc/lib/Xrandr/Xrandr-def.cpp Sun Aug 19 11:22:58 2001 @@ -0,0 +1,18 @@ +LIBRARY Xrandr +VERSION LIBRARY_VERSION +EXPORTS + XRRCurrentConfig + XRRFindDisplay + XRRFreeScreenInfo + XRRGetScreenInfo + XRRQueryExtension + XRRQueryVersion + XRRRootToScreen + XRRRotations + XRRScreenChangeSelectInput + XRRSetScreenConfig + XRRSizes + XRRTimes + XRRVisualIDToVisual + XRRVisualToDepth +/* $XFree86: xc/lib/Xrandr/Xrandr-def.cpp,v 1.1 2001/08/19 15:22:58 alanh Exp $ */ Index: xc/lib/Xrandr/Xrandr.c diff -u /dev/null xc/lib/Xrandr/Xrandr.c:1.6 --- /dev/null Fri Jan 18 15:23:31 2002 +++ xc/lib/Xrandr/Xrandr.c Sun Jun 10 21:37:53 2001 @@ -0,0 +1,472 @@ +/* + * $XFree86: xc/lib/Xrandr/Xrandr.c,v 1.6 2001/06/11 01:37:53 keithp Exp $ + * + * Copyright © 2000 Compaq Computer Corporation, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Compaq not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Compaq makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Jim Gettys, Compaq Computer Corporation, Inc. + */ +#include +#include +#include "Xrandrint.h" + +XExtensionInfo XRRExtensionInfo; +char XRRExtensionName[] = RANDR_NAME; + +static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire); +static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire); + +static int +XRRCloseDisplay (Display *dpy, XExtCodes *codes); + +static /* const */ XExtensionHooks rr_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + XRRCloseDisplay, /* close_display */ + XRRWireToEvent, /* wire_to_event */ + XRREventToWire, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + XRRScreenChangeNotifyEvent *aevent; + xRRScreenChangeNotifyEvent *awire; + + RRCheckExtension(dpy, info, False); + + switch ((wire->u.u.type & 0x7F) - info->codes->first_event) + { + case RRScreenChangeNotify: + awire = (xRRScreenChangeNotifyEvent *) wire; + aevent = (XRRScreenChangeNotifyEvent *) event; + aevent->type = awire->type & 0x7F; + aevent->serial = _XSetLastRequestRead(dpy, + (xGenericReply *) wire); + aevent->send_event = (awire->type & 0x80) != 0; + aevent->display = dpy; + aevent->window = awire->window; + aevent->root = awire->root; + aevent->timestamp = awire->timestamp; + aevent->config_timestamp = awire->configTimestamp; + aevent->size_index = awire->sizeID; + aevent->visual_group_index = awire->visualGroupID; + aevent->rotation = awire->rotation; + aevent->width = awire->widthInPixels; + aevent->height = awire->heightInPixels; + aevent->mwidth = awire->widthInMillimeters; + aevent->mheight = awire->heightInMillimeters; + return True; + } + + return False; +} + +static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + XRRScreenChangeNotifyEvent *aevent; + xRRScreenChangeNotifyEvent *awire; + + RRCheckExtension(dpy, info, False); + + switch ((event->type & 0x7F) - info->codes->first_event) + { + case RRScreenChangeNotify: + awire = (xRRScreenChangeNotifyEvent *) wire; + aevent = (XRRScreenChangeNotifyEvent *) event; + awire->type = aevent->type | (aevent->send_event ? 0x80 : 0); + awire->rotation = (CARD8) aevent->rotation; + awire->sequenceNumber = aevent->serial & 0xFFFF; + awire->timestamp = aevent->timestamp; + awire->configTimestamp = aevent->config_timestamp; + awire->root = aevent->root; + awire->window = aevent->window; + awire->sizeID = aevent->size_index; + awire->visualGroupID = aevent->visual_group_index; + awire->widthInPixels = aevent->width; + awire->heightInPixels = aevent->height; + awire->widthInMillimeters = aevent->mwidth; + awire->heightInMillimeters = aevent->mheight; + return True; + } + return False; +} + +XExtDisplayInfo * +XRRFindDisplay (Display *dpy) +{ + XExtDisplayInfo *dpyinfo; + + dpyinfo = XextFindDisplay (&XRRExtensionInfo, dpy); + if (!dpyinfo) + dpyinfo = XextAddDisplay (&XRRExtensionInfo, dpy, + XRRExtensionName, + &rr_extension_hooks, + RRNumberEvents, 0); + return dpyinfo; +} + +static int +XRRCloseDisplay (Display *dpy, XExtCodes *codes) +{ + XExtDisplayInfo *info = XRRFindDisplay (dpy); + if (info->data) XFree (info->data); + + return XextRemoveDisplay (&XRRExtensionInfo, dpy); +} + +/**************************************************************************** + * * + * RandR public interfaces * + * * + ****************************************************************************/ +int XRRVisualToDepth(Display *dpy, Visual *visual) +{ + int s; + for (s = 0; s < ScreenCount(dpy); s++) { + Screen *sp = ScreenOfDisplay(dpy, s); + int d; + for (d = 0; d < sp->ndepths; d++) { + int v; + for (v = 0; v < sp->depths[s].nvisuals; v++) { + if ( &sp->depths[s].visuals[v] == visual ) return d; + } + } + } + return -1; /* should not ever happen */ +} + +Visual *XRRVisualIDToVisual(Display *dpy, int screen, VisualID id) +{ + int d, v; + Screen *sp = ScreenOfDisplay(dpy, screen); + for (d = 0; d < sp->ndepths; d++) { + for (v = 0; v < sp->depths[d].nvisuals; v++) { + if ( sp->depths[d].visuals[v].visualid == id ) + return (&sp->depths[d].visuals[v]); + } + } + return NULL; +} + +Rotation XRRRotations(XRRScreenConfiguration *config, Rotation *current_rotation) +{ + *current_rotation = config->current_rotation; + return config->rotations; +} + +XRRScreenSize *XRRSizes(XRRScreenConfiguration *config, int *nsizes) +{ + *nsizes = config->nsizes; + return config->sizes; +} + +Time XRRTimes (XRRScreenConfiguration *config, Time *config_timestamp) +{ + *config_timestamp = config->config_timestamp; + return config->timestamp; +} + +SizeID XRRCurrentConfig (XRRScreenConfiguration *config, VisualGroupID *visual_group, Rotation *rotation) +{ + *visual_group = (VisualGroupID) config->current_visual_group; + *rotation = (Rotation) config->current_rotation; + return (SizeID) config->current_size; +} + +int XRRRootToScreen(Display *dpy, Window root) +{ + int snum; + for (snum = 0; snum < ScreenCount(dpy); snum++) { + if (RootWindow(dpy, snum) == root) return snum; + } + return -1; +} + + +Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep) +{ + XExtDisplayInfo *info = XRRFindDisplay (dpy); + + if (XextHasExtension(info)) { + *event_basep = info->codes->first_event; + *error_basep = info->codes->first_error; + return True; + } else { + return False; + } +} + + +Status XRRQueryVersion (Display *dpy, + int *major_versionp, + int *minor_versionp) +{ + XExtDisplayInfo *info = XRRFindDisplay (dpy); + xRRQueryVersionReply rep; + xRRQueryVersionReq *req; + + RRCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (RRQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRQueryVersion; + req->majorVersion = RANDR_MAJOR; + req->minorVersion = RANDR_MINOR; + if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { + UnlockDisplay (dpy); + SyncHandle (); + return 0; + } + *major_versionp = rep.majorVersion; + *minor_versionp = rep.minorVersion; + UnlockDisplay (dpy); + SyncHandle (); + return 1; +} + +XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, Window window) +{ + XExtDisplayInfo *info = XRRFindDisplay(dpy); + xRRGetScreenInfoReply rep; + xRRGetScreenInfoReq *req; + int nbytes, rbytes; + int i, j; + int nvisuals, ngroups; + int snum; + xScreenSizes *psize; + char *data; + struct _XRRScreenConfiguration *scp; + XRRVisualGroup *vgp; + XRRGroupOfVisualGroup *gvgp; + XRRVisualGroup **gp; + XRRScreenSize *ssp; + Visual **vgpp; + CARD32 *data32; + CARD16 *data16; + + RRCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (RRGetScreenInfo, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRGetScreenInfo; + req->window = window; + if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) + { + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + nbytes = (long) rep.length << 2; + data = (char *) Xmalloc ((unsigned) nbytes); + if (!data) + { + _XEatData (dpy, (unsigned long) nbytes); + UnlockDisplay (dpy); + SyncHandle (); + return NULL; + } + _XReadPad (dpy, data, nbytes); + UnlockDisplay (dpy); + SyncHandle (); + + /* + * first we must compute how much space to allocate for + * randr library's use; we'll allocate the structures in a single + * allocation, on cleanlyness grounds. + */ + + /* pick up in the protocol buffer after the protocol size information */ + psize = (xScreenSizes *) data; + data32 = (CARD32 *) &psize[rep.nSizes]; + vgp = (XRRVisualGroup *) ssp; /* visual groups after size structures */ + /* and groups of visual groups structures after the array of visual groups */ + gvgp = (XRRGroupOfVisualGroup *) &vgp[rep.nVisualGroups]; + + /* + * first we count up the number of groups + */ + nvisuals = 0; + for (i = 0; i < rep.nVisualGroups; i++) { + j = *data32; + data32 += j + 1; + nvisuals += j; + } + + /* + * Next comes the groups of visual groups + */ + + data16 = (CARD16 *) data32; + /* + * We count up the number of groups + */ + ngroups = 0; + for (i = 0; i < rep.nGroupsOfVisualGroups; i++) { + j = *data16; + data16 += j + 1; + ngroups += j; + } + + rbytes = sizeof (XRRScreenConfiguration) + + (rep.nVisualGroups * sizeof (XRRVisualGroup)) + + (rep.nGroupsOfVisualGroups * sizeof (XRRGroupOfVisualGroup)) + + (rep.nSizes * sizeof (XRRScreenSize)) + + (nvisuals * sizeof (Visual *)) + + (ngroups * sizeof (XRRGroupOfVisualGroup *)); + + scp = (struct _XRRScreenConfiguration *) Xmalloc(rbytes); + if (scp == NULL) return NULL; + + + ssp = (XRRScreenSize *)(scp + 1); + vgp = (XRRVisualGroup *) (&ssp[rep.nSizes]); + gvgp = (XRRGroupOfVisualGroup *) (&vgp[rep.nVisualGroups]); + vgpp = (Visual **) (&gvgp[rep.nGroupsOfVisualGroups]); + gp = (XRRVisualGroup **) (&vgpp[ngroups]); + /* set up the screen configuration structure */ + scp->screen = ScreenOfDisplay (dpy, (snum = XRRRootToScreen(dpy, rep.root))); + + scp->visual_group = vgp; + scp->groups_of_visual_groups = gvgp; + scp->sizes = ssp; + scp->rotations = rep.setOfRotations; + scp->current_size = rep.sizeID; + scp->current_visual_group = rep.visualGroupID; + scp->current_rotation = rep.rotation; + scp->timestamp = rep.timestamp; + scp->config_timestamp = rep.configTimestamp; + scp->nsizes = rep.nSizes; + + /* + * Time to unpack the data from the server. + */ + + /* + * First comes the size information + */ + psize = (xScreenSizes *) data; + for (i = 0; i < rep.nSizes; i++) { + ssp[i].width = psize[i].widthInPixels; + ssp[i].height = psize[i].heightInPixels; + ssp[i].mwidth = psize[i].widthInMillimeters; + ssp[i].mheight = psize[i].heightInMillimeters; + ssp[i].group = psize[i].visualGroup; + } + /* + * Next comes the visual groups + */ + + data32 = (CARD32 *) &psize[i]; + + for (i = 0; i < rep.nVisualGroups; i++) { + vgp[i].visuals = vgpp; + vgp[i].nvisuals = (int) *data32++; + for (j = 0; j < vgp->nvisuals; j++) { + *vgpp = XRRVisualIDToVisual(dpy, snum, (VisualID) *data32++); + vgpp += 1; + } + } + + + data16 = (CARD16 *) data32; + + for (i = 0; i < rep.nGroupsOfVisualGroups; i++) { + gvgp[i].groups = gp; + gvgp[i].ngroups = (int) *data16++; + for (j = 0; j < gvgp[i].ngroups; j++) { + gvgp[i].groups[j] = &vgp[*data16++]; + gp += 1; + } + } + + return (XRRScreenConfiguration *)(scp); +} + +void XRRFreeScreenInfo (XRRScreenConfiguration *config) +{ + Xfree (config); +} + +void XRRScreenChangeSelectInput (Display *dpy, Window window, Bool enable) +{ + XExtDisplayInfo *info = XRRFindDisplay (dpy); + xRRScreenChangeSelectInputReq *req; + + RRSimpleCheckExtension (dpy, info); + + LockDisplay (dpy); + GetReq (RRScreenChangeSelectInput, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRScreenChangeSelectInput; + req->window = window; + req->enable = xFalse; + if (enable) req->enable = xTrue; + UnlockDisplay (dpy); + SyncHandle (); + return; +} + +Status XRRSetScreenConfig (Display *dpy, + XRRScreenConfiguration *config, + Drawable draw, + int size_index, + int visual_group_index, + Rotation rotation, Time timestamp) +{ + XExtDisplayInfo *info = XRRFindDisplay (dpy); + xRRSetScreenConfigReply rep; + xRRSetScreenConfigReq *req; + + RRCheckExtension (dpy, info, 0); + + LockDisplay (dpy); + GetReq (RRSetScreenConfig, req); + req->reqType = info->codes->major_opcode; + req->randrReqType = X_RRSetScreenConfig; + req->drawable = draw; + req->sizeID = size_index; + req->visualGroupID = visual_group_index; + req->rotation = rotation; + req->timestamp = timestamp; + req->configTimestamp = config->config_timestamp; + (void) _XReply (dpy, (xReply *) &rep, 0, xTrue); + + if (rep.status == RRSetConfigSuccess) { + /* if we succeed, set our view of reality to what we set it to */ + config->config_timestamp = rep.newConfigTimestamp; + config->timestamp = rep.newTimestamp; + config->screen = ScreenOfDisplay (dpy, XRRRootToScreen(dpy, rep.root)); + config->current_size = size_index; + config->current_rotation = rotation; + config->current_visual_group = visual_group_index; + } + UnlockDisplay (dpy); + SyncHandle (); + return(rep.status); +} Index: xc/lib/Xrandr/Xrandr.h diff -u /dev/null xc/lib/Xrandr/Xrandr.h:1.8 --- /dev/null Fri Jan 18 15:23:31 2002 +++ xc/lib/Xrandr/Xrandr.h Fri Nov 23 18:26:38 2001 @@ -0,0 +1,113 @@ +/* + * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.8 2001/11/23 23:26:38 keithp Exp $ + * + * Copyright © 2000 Compaq Computer Corporation, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Compaq not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Compaq makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Jim Gettys, Compaq Computer Corporation + */ + +#ifndef _XRANDR_H_ +#define _XRANDR_H_ + +#include + +#include + +_XFUNCPROTOBEGIN + +typedef struct { + int nvisuals; + Visual **visuals; +} XRRVisualGroup; + +typedef struct { + int ngroups; + XRRVisualGroup **groups; +} XRRGroupOfVisualGroup; + +typedef struct { + int width, height; + int mwidth, mheight; + int group; +} XRRScreenSize; + +/* + * Events + */ + +typedef struct { + int type; /* event base */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window which selected for this event */ + Window root; /* Root window for changed screen */ + Time timestamp; + Time config_timestamp; + SizeID size_index; + VisualGroupID visual_group_index; + Rotation rotation; + int width; + int height; + int mwidth; + int mheight; +} XRRScreenChangeNotifyEvent; + +/* internal representation is private to the library */ +typedef struct _XRRScreenConfiguration XRRScreenConfiguration; + +Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep); + +Status XRRQueryVersion (Display *dpy, + int *major_versionp, + int *minor_versionp); + +XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, + Drawable draw); + +void XRRFreeScreenInfo (XRRScreenConfiguration *config); + +Status XRRSetScreenConfig (Display *dpy, + XRRScreenConfiguration *config, + Drawable draw, + int size_index, + int visual_group_index, + Rotation rotation, + Time timestamp); + +XRRScreenSize *XRRSizes(XRRScreenConfiguration *config, int *nsizes); + +void XRRScreenChangeSelectInput (Display *dpy, Window window, Bool enable); + +Visual *XRRVisualIDToVisual(Display *dpy, int screen, VisualID id); + +int XRRVisualToDepth(Display *dpy, Visual *visual); + +Rotation XRRRotations(XRRScreenConfiguration *config, Rotation *current_rotation); + +Time XRRTimes (XRRScreenConfiguration *config, Time *config_timestamp); + +SizeID XRRCurrentConfig (XRRScreenConfiguration *config, VisualGroupID *visual_group, Rotation *rotation); + +int XRRRootToScreen(Display *dpy, Window root); + +_XFUNCPROTOEND + +#endif /* _XRANDR_H_ */ Index: xc/lib/Xrandr/Xrandrint.h diff -u /dev/null xc/lib/Xrandr/Xrandrint.h:1.2 --- /dev/null Fri Jan 18 15:23:31 2002 +++ xc/lib/Xrandr/Xrandrint.h Thu Jun 7 11:33:43 2001 @@ -0,0 +1,67 @@ +/* + * $XFree86: xc/lib/Xrandr/Xrandrint.h,v 1.2 2001/06/07 15:33:43 keithp Exp $ + * + * Copyright © 2000 Compaq Computer Corporation, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Compaq not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Compaq makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * COMPAQ DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Jim Gettys, Compaq Computer Corporation, Inc. + */ + +#ifndef _XRANDRINT_H_ +#define _XRANDRINT_H_ + +#define NEED_EVENTS +#define NEED_REPLIES +#include +#include +#include "Xext.h" /* in ../include */ +#include "extutil.h" /* in ../include */ +#include "Xrandr.h" +#include "randr.h" +#include "randrproto.h" + +extern XExtensionInfo XrandrExtensionInfo; +extern char XrandrExtensionName[]; + +#define RRCheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, XRRExtensionName, val) + +#define RRSimpleCheckExtension(dpy,i) \ + XextSimpleCheckExtension (dpy, i, XRRExtensionName) + +XExtDisplayInfo * +XRRFindDisplay (Display *dpy); + +/* deliberately opaque internal data structure; can be extended, + but not reordered */ +struct _XRRScreenConfiguration { + Screen *screen; /* the root window in GetScreenInfo */ + XRRVisualGroup *visual_group; + XRRGroupOfVisualGroup *groups_of_visual_groups; + XRRScreenSize *sizes; + Rotation rotations; + Rotation current_rotation; + int nsizes; + int current_size; + int current_visual_group; + Time timestamp; + Time config_timestamp; +}; + +#endif /* _XRANDRINT_H_ */ Index: xc/lib/Xrandr/test.c diff -u /dev/null xc/lib/Xrandr/test.c:1.2 --- /dev/null Fri Jan 18 15:23:31 2002 +++ xc/lib/Xrandr/test.c Mon Aug 6 17:46:03 2001 @@ -0,0 +1,21 @@ +/* $XFree86: xc/lib/Xrandr/test.c,v 1.2 2001/08/06 21:46:03 dawes Exp $ */ + +#include +#include +#include "Xrandr.h" + +main (int argc, char **argv) + +{ + char *display_name = ":0"; + Display *display; + int major, minor, status; + + if ((display = XOpenDisplay (display_name)) == NULL) { + fprintf(stderr, "Can't open display!\n"); + } + status = XRRQueryVersion (display, &major, &minor); + fprintf(stderr, "status = %d, major = %d, minor = %d\n, + status, major, minor"); + +} Index: xc/lib/Xrender/FillRect.c diff -u xc/lib/Xrender/FillRect.c:1.1 xc/lib/Xrender/FillRect.c:1.2 --- xc/lib/Xrender/FillRect.c:1.1 Mon Nov 20 02:13:09 2000 +++ xc/lib/Xrender/FillRect.c Sun Dec 16 13:27:55 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/FillRect.c,v 1.1 2000/11/20 07:13:09 keithp Exp $ + * $XFree86: xc/lib/Xrender/FillRect.c,v 1.2 2001/12/16 18:27:55 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -33,7 +33,7 @@ XRenderFillRectangle (Display *dpy, int op, Picture dst, - XRenderColor *color, + _Xconst XRenderColor *color, int x, int y, unsigned int width, Index: xc/lib/Xrender/FillRects.c diff -u xc/lib/Xrender/FillRects.c:1.1 xc/lib/Xrender/FillRects.c:1.2 --- xc/lib/Xrender/FillRects.c:1.1 Mon Nov 20 02:13:10 2000 +++ xc/lib/Xrender/FillRects.c Sun Dec 16 13:27:55 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/FillRects.c,v 1.1 2000/11/20 07:13:10 keithp Exp $ + * $XFree86: xc/lib/Xrender/FillRects.c,v 1.2 2001/12/16 18:27:55 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -30,12 +30,12 @@ #define size (SIZEOF(xRenderFillRectanglesReq) + FRCTSPERBATCH * SIZEOF(xRectangle)) void -XRenderFillRectangles (Display *dpy, - int op, - Picture dst, - XRenderColor *color, - XRectangle *rectangles, - int n_rects) +XRenderFillRectangles (Display *dpy, + int op, + Picture dst, + _Xconst XRenderColor *color, + _Xconst XRectangle *rectangles, + int n_rects) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); xRenderFillRectanglesReq *req; Index: xc/lib/Xrender/Glyph.c diff -u xc/lib/Xrender/Glyph.c:1.5 xc/lib/Xrender/Glyph.c:1.7 --- xc/lib/Xrender/Glyph.c:1.5 Sat Dec 2 04:38:02 2000 +++ xc/lib/Xrender/Glyph.c Wed Dec 26 20:16:00 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Glyph.c,v 1.5 2000/12/02 09:38:02 keithp Exp $ + * $XFree86: xc/lib/Xrender/Glyph.c,v 1.7 2001/12/27 01:16:00 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -26,7 +26,7 @@ #include "Xrenderint.h" GlyphSet -XRenderCreateGlyphSet (Display *dpy, XRenderPictFormat *format) +XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); GlyphSet gsid; @@ -82,10 +82,10 @@ void XRenderAddGlyphs (Display *dpy, GlyphSet glyphset, - Glyph *gids, - XGlyphInfo *glyphs, + _Xconst Glyph *gids, + _Xconst XGlyphInfo *glyphs, int nglyphs, - char *images, + _Xconst char *images, int nbyte_images) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); @@ -113,7 +113,7 @@ void XRenderFreeGlyphs (Display *dpy, GlyphSet glyphset, - Glyph *gids, + _Xconst Glyph *gids, int nglyphs) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); @@ -138,13 +138,13 @@ int op, Picture src, Picture dst, - XRenderPictFormat *maskFormat, + _Xconst XRenderPictFormat *maskFormat, GlyphSet glyphset, int xSrc, int ySrc, int xDst, int yDst, - char *string, + _Xconst char *string, int nchar) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); @@ -222,13 +222,13 @@ int op, Picture src, Picture dst, - XRenderPictFormat *maskFormat, + _Xconst XRenderPictFormat *maskFormat, GlyphSet glyphset, int xSrc, int ySrc, int xDst, int yDst, - unsigned short *string, + _Xconst unsigned short *string, int nchar) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); @@ -301,13 +301,13 @@ int op, Picture src, Picture dst, - XRenderPictFormat *maskFormat, + _Xconst XRenderPictFormat *maskFormat, GlyphSet glyphset, int xSrc, int ySrc, int xDst, int yDst, - unsigned int *string, + _Xconst unsigned int *string, int nchar) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); @@ -369,6 +369,307 @@ elt->deltax = xDst; elt->deltay = yDst; memcpy ((char *) (elt + 1), (char *) string, nchar * 4); + } + + UnlockDisplay(dpy); + SyncHandle(); +} + +void +XRenderCompositeText8 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt8 *elts, + int nelt) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderCompositeGlyphs8Req *req; + long len; + long elen; + xGlyphElt *elt; + int i; + _Xconst char *chars; + int nchars; + + if (!nelt) + return; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + + GetReq(RenderCompositeGlyphs8, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderCompositeGlyphs8; + req->op = op; + req->src = src; + req->dst = dst; + req->maskFormat = maskFormat ? maskFormat->id : None; + req->glyphset = elts[0].glyphset; + req->xSrc = xSrc; + req->ySrc = ySrc; + + /* + * Compute the space necessary + */ + len = 0; + + for (i = 0; i < nelt; i++) + { + if (elts[i].glyphset != req->glyphset) + len += (SIZEOF (xGlyphElt) + 4) >> 2; + nchars = elts[i].nchars; + /* + * xGlyphElt must be aligned on a 32-bit boundary; this is + * easily done by filling no more than 252 glyphs in each + * bucket + */ + elen = SIZEOF(xGlyphElt) * ((nchars + MAX_8-1) / MAX_8) + nchars; + len += (elen + 3) >> 2; + } + + req->length += len; + /* + * If the entire request does not fit into the remaining space in the + * buffer, flush the buffer first. + */ + + if (dpy->bufptr + (len << 2) > dpy->bufmax) + _XFlush (dpy); + + for (i = 0; i < nelt; i++) + { + /* + * Switch glyphsets + */ + if (elts[i].glyphset != req->glyphset) + { + BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); + elt->len = 0xff; + elt->deltax = 0; + elt->deltay = 0; + Data32(dpy, &elts[i].glyphset, 4); + } + nchars = elts[i].nchars; + xDst = elts[i].xOff; + yDst = elts[i].yOff; + chars = elts[i].chars; + while (nchars) + { + BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) + elt->len = nchars > MAX_8 ? MAX_8 : nchars; + elt->deltax = xDst; + elt->deltay = yDst; + xDst = 0; + yDst = 0; + Data (dpy, chars, elt->len); + nchars -= elt->len; + chars += elt->len; + } + } + + UnlockDisplay(dpy); + SyncHandle(); +} + +void +XRenderCompositeText16 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt16 *elts, + int nelt) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderCompositeGlyphs16Req *req; + long len; + long elen; + xGlyphElt *elt; + int i; + _Xconst unsigned short *chars; + int nchars; + + if (!nelt) + return; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + + GetReq(RenderCompositeGlyphs16, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderCompositeGlyphs16; + req->op = op; + req->src = src; + req->dst = dst; + req->maskFormat = maskFormat ? maskFormat->id : None; + req->glyphset = elts[0].glyphset; + req->xSrc = xSrc; + req->ySrc = ySrc; + + /* + * Compute the space necessary + */ + len = 0; + + for (i = 0; i < nelt; i++) + { + if (elts[i].glyphset != req->glyphset) + len += (SIZEOF (xGlyphElt) + 4) >> 2; + nchars = elts[i].nchars; + /* + * xGlyphElt must be aligned on a 32-bit boundary; this is + * easily done by filling no more than 254 glyphs in each + * bucket + */ + elen = SIZEOF(xGlyphElt) * ((nchars + MAX_16-1) / MAX_16) + nchars * 2; + len += (elen + 3) >> 2; + } + + req->length += len; + /* + * If the entire request does not fit into the remaining space in the + * buffer, flush the buffer first. + */ + + if (dpy->bufptr + (len << 2) > dpy->bufmax) + _XFlush (dpy); + + for (i = 0; i < nelt; i++) + { + /* + * Switch glyphsets + */ + if (elts[i].glyphset != req->glyphset) + { + BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); + elt->len = 0xff; + elt->deltax = 0; + elt->deltay = 0; + Data32(dpy, &elts[i].glyphset, 4); + } + nchars = elts[i].nchars; + xDst = elts[i].xOff; + yDst = elts[i].yOff; + chars = elts[i].chars; + while (nchars) + { + BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) + elt->len = nchars > MAX_16 ? MAX_16 : nchars; + elt->deltax = xDst; + elt->deltay = yDst; + xDst = 0; + yDst = 0; + Data16 (dpy, chars, elt->len * 2); + nchars -= elt->len; + chars += elt->len; + } + } + + UnlockDisplay(dpy); + SyncHandle(); +} + +void +XRenderCompositeText32 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt32 *elts, + int nelt) +{ + XExtDisplayInfo *info = XRenderFindDisplay (dpy); + xRenderCompositeGlyphs32Req *req; + long len; + long elen; + xGlyphElt *elt; + int i; + _Xconst unsigned int *chars; + int nchars; + + if (!nelt) + return; + + RenderSimpleCheckExtension (dpy, info); + LockDisplay(dpy); + + GetReq(RenderCompositeGlyphs32, req); + req->reqType = info->codes->major_opcode; + req->renderReqType = X_RenderCompositeGlyphs32; + req->op = op; + req->src = src; + req->dst = dst; + req->maskFormat = maskFormat ? maskFormat->id : None; + req->glyphset = elts[0].glyphset; + req->xSrc = xSrc; + req->ySrc = ySrc; + + /* + * Compute the space necessary + */ + len = 0; + + for (i = 0; i < nelt; i++) + { + if (elts[i].glyphset != req->glyphset) + len += (SIZEOF (xGlyphElt) + 4) >> 2; + nchars = elts[i].nchars; + elen = SIZEOF(xGlyphElt) * ((nchars + MAX_32) / MAX_32) + nchars *4; + len += (elen + 3) >> 2; + } + + req->length += len; + /* + * If the entire request does not fit into the remaining space in the + * buffer, flush the buffer first. + */ + + if (dpy->bufptr + (len << 2) > dpy->bufmax) + _XFlush (dpy); + + for (i = 0; i < nelt; i++) + { + /* + * Switch glyphsets + */ + if (elts[i].glyphset != req->glyphset) + { + BufAlloc (xGlyphElt *, elt, SIZEOF (xGlyphElt)); + elt->len = 0xff; + elt->deltax = 0; + elt->deltay = 0; + Data32(dpy, &elts[i].glyphset, 4); + } + nchars = elts[i].nchars; + xDst = elts[i].xOff; + yDst = elts[i].yOff; + chars = elts[i].chars; + while (nchars) + { + BufAlloc (xGlyphElt *, elt, SIZEOF(xGlyphElt)) + elt->len = nchars > MAX_32 ? MAX_32 : nchars; + elt->deltax = xDst; + elt->deltay = yDst; + xDst = 0; + yDst = 0; + Data32 (dpy, chars, elt->len * 4); + nchars -= elt->len; + chars += elt->len; + } } UnlockDisplay(dpy); Index: xc/lib/Xrender/Picture.c diff -u xc/lib/Xrender/Picture.c:1.7 xc/lib/Xrender/Picture.c:1.8 --- xc/lib/Xrender/Picture.c:1.7 Thu Dec 7 18:55:56 2000 +++ xc/lib/Xrender/Picture.c Sun Dec 16 13:27:55 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Picture.c,v 1.7 2000/12/07 23:55:56 keithp Exp $ + * $XFree86: xc/lib/Xrender/Picture.c,v 1.8 2001/12/16 18:27:55 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -30,7 +30,7 @@ _XRenderProcessPictureAttributes (Display *dpy, xRenderChangePictureReq *req, unsigned long valuemask, - XRenderPictureAttributes *attributes) + _Xconst XRenderPictureAttributes *attributes) { unsigned long values[32]; register unsigned long *value = values; @@ -72,9 +72,9 @@ Picture XRenderCreatePicture (Display *dpy, Drawable drawable, - XRenderPictFormat *format, + _Xconst XRenderPictFormat *format, unsigned long valuemask, - XRenderPictureAttributes *attributes) + _Xconst XRenderPictureAttributes *attributes) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); Picture pid; @@ -102,7 +102,7 @@ XRenderChangePicture (Display *dpy, Picture picture, unsigned long valuemask, - XRenderPictureAttributes *attributes) + _Xconst XRenderPictureAttributes *attributes) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); xRenderChangePictureReq *req; @@ -128,7 +128,7 @@ Picture picture, int xOrigin, int yOrigin, - XRectangle *rects, + _Xconst XRectangle *rects, int n) { xRenderSetPictureClipRectanglesReq *req; @@ -151,7 +151,7 @@ Picture picture, int xOrigin, int yOrigin, - XRectangle *rects, + _Xconst XRectangle *rects, int n) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); Index: xc/lib/Xrender/Xrender.c diff -u xc/lib/Xrender/Xrender.c:1.4 xc/lib/Xrender/Xrender.c:1.8 --- xc/lib/Xrender/Xrender.c:1.4 Wed May 16 06:33:16 2001 +++ xc/lib/Xrender/Xrender.c Sun Dec 16 13:27:55 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Xrender.c,v 1.4 2001/05/16 10:33:16 keithp Exp $ + * $XFree86: xc/lib/Xrender/Xrender.c,v 1.8 2001/12/16 18:27:55 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -129,20 +129,7 @@ static Visual * _XRenderFindVisual (Display *dpy, VisualID vid) { - XVisualInfo temp, *vi; - Visual *v; - int nvi; - - temp.visualid = vid; - vi = XGetVisualInfo (dpy, VisualIDMask, &temp, &nvi); - if (vi) - { - v = vi->visual; - XFree (vi); - } - else - v = 0; - return v; + return _XVIDtoVisual (dpy, vid); } Status @@ -166,6 +153,11 @@ RenderCheckExtension (dpy, info, 0); LockDisplay (dpy); + if (info->data) + { + UnlockDisplay (dpy); + return 1; + } GetReq (RenderQueryPictFormats, req); req->reqType = info->codes->major_opcode; req->renderReqType = X_RenderQueryPictFormats; @@ -193,7 +185,7 @@ rep.numVisuals * sizeof (xPictVisual)); xData = (void *) Xmalloc (rlength); - if (!xri || !xFormat) + if (!xri || !xData) { if (xri) Xfree (xri); if (xData) Xfree (xData); @@ -250,13 +242,15 @@ } xScreen = (xPictScreen *) xDepth; } - Xfree (xData); info->data = (XPointer) xri; + UnlockDisplay (dpy); + SyncHandle (); + Xfree (xData); return 1; } XRenderPictFormat * -XRenderFindVisualFormat (Display *dpy, Visual *visual) +XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); int nv; @@ -264,11 +258,8 @@ XRenderVisual *xrv; RenderCheckExtension (dpy, info, 0); - if (!info->data) - { - if (!XRenderQueryFormats (dpy)) - return 0; - } + if (!XRenderQueryFormats (dpy)) + return 0; xri = (XRenderInfo *) info->data; for (nv = 0, xrv = xri->visual; nv < xri->nvisual; nv++, xrv++) if (xrv->visual == visual) @@ -279,7 +270,7 @@ XRenderPictFormat * XRenderFindFormat (Display *dpy, unsigned long mask, - XRenderPictFormat *template, + _Xconst XRenderPictFormat *template, int count) { XExtDisplayInfo *info = XRenderFindDisplay (dpy); @@ -287,11 +278,8 @@ XRenderInfo *xri; RenderCheckExtension (dpy, info, 0); - if (!info->data) - { - if (!XRenderQueryFormats (dpy)) - return 0; - } + if (!XRenderQueryFormats (dpy)) + return 0; xri = (XRenderInfo *) info->data; for (nf = 0; nf < xri->nformat; nf++) { Index: xc/lib/Xrender/Xrender.h diff -u xc/lib/Xrender/Xrender.h:1.7 xc/lib/Xrender/Xrender.h:1.10 --- xc/lib/Xrender/Xrender.h:1.7 Mon Dec 4 22:13:30 2000 +++ xc/lib/Xrender/Xrender.h Wed Dec 26 20:16:00 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xrender/Xrender.h,v 1.7 2000/12/05 03:13:30 keithp Exp $ + * $XFree86: xc/lib/Xrender/Xrender.h,v 1.10 2001/12/27 01:16:00 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -26,7 +26,7 @@ #ifndef _XRENDER_H_ #define _XRENDER_H_ -#include "render.h" +#include #include #include @@ -124,6 +124,30 @@ short yOff; } XGlyphInfo; +typedef struct _XGlyphElt8 { + GlyphSet glyphset; + _Xconst char *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt8; + +typedef struct _XGlyphElt16 { + GlyphSet glyphset; + _Xconst unsigned short *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt16; + +typedef struct _XGlyphElt32 { + GlyphSet glyphset; + _Xconst unsigned int *chars; + int nchars; + int xOff; + int yOff; +} XGlyphElt32; + _XFUNCPROTOBEGIN Bool XRenderQueryExtension (Display *dpy, int *event_basep, int *error_basep); @@ -135,34 +159,34 @@ Status XRenderQueryFormats (Display *dpy); XRenderPictFormat * -XRenderFindVisualFormat (Display *dpy, Visual *visual); +XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual); XRenderPictFormat * -XRenderFindFormat (Display *dpy, - unsigned long mask, - XRenderPictFormat *templ, - int count); +XRenderFindFormat (Display *dpy, + unsigned long mask, + _Xconst XRenderPictFormat *templ, + int count); Picture -XRenderCreatePicture (Display *dpy, - Drawable drawable, - XRenderPictFormat *format, - unsigned long valuemask, - XRenderPictureAttributes *attributes); - -void -XRenderChangePicture (Display *dpy, - Picture picture, - unsigned long valuemask, - XRenderPictureAttributes *attributes); - -void -XRenderSetPictureClipRectangles (Display *dpy, - Picture picture, - int xOrigin, - int yOrigin, - XRectangle *rects, - int n); +XRenderCreatePicture (Display *dpy, + Drawable drawable, + _Xconst XRenderPictFormat *format, + unsigned long valuemask, + _Xconst XRenderPictureAttributes *attributes); + +void +XRenderChangePicture (Display *dpy, + Picture picture, + unsigned long valuemask, + _Xconst XRenderPictureAttributes *attributes); + +void +XRenderSetPictureClipRectangles (Display *dpy, + Picture picture, + int xOrigin, + int yOrigin, + _Xconst XRectangle *rects, + int n); void XRenderSetPictureClipRegion (Display *dpy, @@ -189,7 +213,7 @@ unsigned int height); GlyphSet -XRenderCreateGlyphSet (Display *dpy, XRenderPictFormat *format); +XRenderCreateGlyphSet (Display *dpy, _Xconst XRenderPictFormat *format); GlyphSet XRenderReferenceGlyphSet (Display *dpy, GlyphSet existing); @@ -198,79 +222,118 @@ XRenderFreeGlyphSet (Display *dpy, GlyphSet glyphset); void -XRenderAddGlyphs (Display *dpy, - GlyphSet glyphset, - Glyph *gids, - XGlyphInfo *glyphs, - int nglyphs, - char *images, - int nbyte_images); - -void -XRenderFreeGlyphs (Display *dpy, - GlyphSet glyphset, - Glyph *gids, - int nglyphs); - -void -XRenderCompositeString8 (Display *dpy, - int op, - Picture src, - Picture dst, - XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - char *string, - int nchar); - -void -XRenderCompositeString16 (Display *dpy, - int op, - Picture src, - Picture dst, - XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - unsigned short *string, - int nchar); - -void -XRenderCompositeString32 (Display *dpy, - int op, - Picture src, - Picture dst, - XRenderPictFormat *maskFormat, - GlyphSet glyphset, - int xSrc, - int ySrc, - int xDst, - int yDst, - unsigned int *string, - int nchar); - -void -XRenderFillRectangle (Display *dpy, - int op, - Picture dst, - XRenderColor *color, - int x, - int y, - unsigned int width, - unsigned int height); - -void -XRenderFillRectangles (Display *dpy, - int op, - Picture dst, - XRenderColor *color, - XRectangle *rectangles, - int n_rects); +XRenderAddGlyphs (Display *dpy, + GlyphSet glyphset, + _Xconst Glyph *gids, + _Xconst XGlyphInfo *glyphs, + int nglyphs, + _Xconst char *images, + int nbyte_images); + +void +XRenderFreeGlyphs (Display *dpy, + GlyphSet glyphset, + _Xconst Glyph *gids, + int nglyphs); + +void +XRenderCompositeString8 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst char *string, + int nchar); + +void +XRenderCompositeString16 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst unsigned short *string, + int nchar); + +void +XRenderCompositeString32 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + GlyphSet glyphset, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst unsigned int *string, + int nchar); + +void +XRenderCompositeText8 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt8 *elts, + int nelt); + +void +XRenderCompositeText16 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt16 *elts, + int nelt); + +void +XRenderCompositeText32 (Display *dpy, + int op, + Picture src, + Picture dst, + _Xconst XRenderPictFormat *maskFormat, + int xSrc, + int ySrc, + int xDst, + int yDst, + _Xconst XGlyphElt32 *elts, + int nelt); + +void +XRenderFillRectangle (Display *dpy, + int op, + Picture dst, + _Xconst XRenderColor *color, + int x, + int y, + unsigned int width, + unsigned int height); + +void +XRenderFillRectangles (Display *dpy, + int op, + Picture dst, + _Xconst XRenderColor *color, + _Xconst XRectangle *rectangles, + int n_rects); _XFUNCPROTOEND Index: xc/lib/Xss/XScrnSaver.c diff -u xc/lib/Xss/XScrnSaver.c:3.0 xc/lib/Xss/XScrnSaver.c:3.1 --- xc/lib/Xss/XScrnSaver.c:3.0 Tue Jun 28 08:22:28 1994 +++ xc/lib/Xss/XScrnSaver.c Sat Oct 27 23:32:40 2001 @@ -26,6 +26,7 @@ * * Author: Keith Packard, MIT X Consortium */ +/* $XFree86: xc/lib/Xss/XScrnSaver.c,v 3.1 2001/10/28 03:32:40 tsi Exp $ */ #define NEED_EVENTS #define NEED_REPLIES @@ -341,7 +342,7 @@ else req->visualID = visual->visualid; /* abuse an Xlib internal interface - is this legal for us? */ - if (req->mask = valuemask) + if ((req->mask = valuemask)) XScreenSaverProcessWindowAttributes (dpy, (xChangeWindowAttributesReq *)req, valuemask, attributes); Index: xc/lib/Xt/ActionHook.c diff -u xc/lib/Xt/ActionHook.c:1.1.1.4 xc/lib/Xt/ActionHook.c:1.3 --- xc/lib/Xt/ActionHook.c:1.1.1.4 Tue Jan 16 17:23:41 2001 +++ xc/lib/Xt/ActionHook.c Fri Dec 14 14:56:05 2001 @@ -1,4 +1,4 @@ -/* $Xorg: ActionHook.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ +/* $Xorg: ActionHook.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /*LINTLIBRARY*/ @@ -39,7 +39,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -56,6 +60,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/ActionHook.c,v 1.3 2001/12/14 19:56:05 dawes Exp $ */ /* * Contains XtAppAddActionHook, XtRemoveActionHook @@ -65,10 +70,10 @@ /*ARGSUSED*/ -static void FreeActionHookList( widget, closure, call_data ) - Widget widget; /* unused (and invalid) */ - XtPointer closure; /* ActionHook* */ - XtPointer call_data; /* unused */ +static void FreeActionHookList( + Widget widget, /* unused (and invalid) */ + XtPointer closure, /* ActionHook* */ + XtPointer call_data) /* unused */ { ActionHook list = *(ActionHook*)closure; while (list != NULL) { Index: xc/lib/Xt/Alloc.c diff -u xc/lib/Xt/Alloc.c:1.5 xc/lib/Xt/Alloc.c:1.9 --- xc/lib/Xt/Alloc.c:1.5 Wed Jan 17 14:43:03 2001 +++ xc/lib/Xt/Alloc.c Fri Dec 14 14:56:07 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Alloc.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ +/* $Xorg: Alloc.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Alloc.c,v 1.9 2001/12/14 19:56:07 dawes Exp $ */ /* * X Toolkit Memory Allocation Routines @@ -62,13 +67,10 @@ */ #include "IntrinsicI.h" +#include "InitialI.h" #undef _XBCOPYFUNC -#ifndef X_NOT_STDC_ENV #include -#else -char *malloc(), *realloc(), *calloc(); -#endif #define Xmalloc(size) malloc((size)) #define Xrealloc(ptr, size) realloc((ptr), (size)) Index: xc/lib/Xt/ArgList.c diff -u xc/lib/Xt/ArgList.c:1.4 xc/lib/Xt/ArgList.c:1.5 --- xc/lib/Xt/ArgList.c:1.4 Wed Jan 17 14:43:03 2001 +++ xc/lib/Xt/ArgList.c Fri Dec 14 14:56:07 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ArgList.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ +/* $Xorg: ArgList.c,v 1.4 2001/02/09 02:03:53 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Callback.c diff -u xc/lib/Xt/Callback.c:1.6 xc/lib/Xt/Callback.c:1.8 --- xc/lib/Xt/Callback.c:1.6 Wed Jan 17 14:43:03 2001 +++ xc/lib/Xt/Callback.c Fri Dec 14 14:56:08 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Callback.c,v 1.3 2000/08/17 19:46:08 cpqbld Exp $ */ +/* $Xorg: Callback.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,7 +58,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Callback.c,v 1.6 2001/01/17 19:43:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Callback.c,v 1.8 2001/12/14 19:56:08 dawes Exp $ */ #include "IntrinsicI.h" @@ -67,9 +71,9 @@ /* However it doesn't contain a final NULL record */ #define ToList(p) ((XtCallbackList) ((p)+1)) -static InternalCallbackList* FetchInternalList(widget, name) - Widget widget; - String name; +static InternalCallbackList* FetchInternalList( + Widget widget, + _Xconst char *name) { XrmQuark quark; int n; @@ -187,10 +191,10 @@ } /* XtAddCallback */ /* ARGSUSED */ -static void AddCallbacks(widget, callbacks, newcallbacks) - Widget widget; - InternalCallbackList *callbacks; - XtCallbackList newcallbacks; +static void AddCallbacks( + Widget widget, + InternalCallbackList *callbacks, + XtCallbackList newcallbacks) { register InternalCallbackList icl; register int i, j; Index: xc/lib/Xt/CallbackI.h diff -u xc/lib/Xt/CallbackI.h:1.1.1.3 xc/lib/Xt/CallbackI.h:1.2 --- xc/lib/Xt/CallbackI.h:1.1.1.3 Tue Jan 16 17:23:46 2001 +++ xc/lib/Xt/CallbackI.h Fri Dec 14 14:56:08 2001 @@ -1,9 +1,13 @@ -/* $Xorg: CallbackI.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: CallbackI.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/ClickTime.c diff -u xc/lib/Xt/ClickTime.c:1.1.1.3 xc/lib/Xt/ClickTime.c:1.2 --- xc/lib/Xt/ClickTime.c:1.1.1.3 Tue Jan 16 17:23:47 2001 +++ xc/lib/Xt/ClickTime.c Fri Dec 14 14:56:08 2001 @@ -1,4 +1,4 @@ -/* $Xorg: ClickTime.c,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: ClickTime.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Composite.c diff -u xc/lib/Xt/Composite.c:1.4 xc/lib/Xt/Composite.c:1.6 --- xc/lib/Xt/Composite.c:1.4 Wed Jan 17 14:43:03 2001 +++ xc/lib/Xt/Composite.c Fri Dec 14 14:56:08 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Composite.c,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: Composite.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Composite.c,v 1.6 2001/12/14 19:56:08 dawes Exp $ */ #define COMPOSITE #include "IntrinsicI.h" @@ -163,7 +168,7 @@ WidgetClass widgetClass; { register CompositePartPtr wcPtr; - register CompositePartPtr superPtr; + register CompositePartPtr superPtr = NULL; wcPtr = (CompositePartPtr) &(((CompositeWidgetClass)widgetClass)->composite_class); @@ -172,10 +177,6 @@ /* don't compute possible bogus pointer */ superPtr = (CompositePartPtr)&(((CompositeWidgetClass)widgetClass ->core_class.superclass)->composite_class); -#ifdef lint - else - superPtr = NULL; -#endif /* We don't need to check for null super since we'll get to composite eventually, and it had better define them! */ Index: xc/lib/Xt/Composite.h diff -u xc/lib/Xt/Composite.h:1.1.1.3 xc/lib/Xt/Composite.h:1.2 --- xc/lib/Xt/Composite.h:1.1.1.3 Tue Jan 16 17:23:49 2001 +++ xc/lib/Xt/Composite.h Fri Dec 14 14:56:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Composite.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: Composite.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/CompositeP.h diff -u xc/lib/Xt/CompositeP.h:1.1.1.3 xc/lib/Xt/CompositeP.h:1.2 --- xc/lib/Xt/CompositeP.h:1.1.1.3 Tue Jan 16 17:23:50 2001 +++ xc/lib/Xt/CompositeP.h Fri Dec 14 14:56:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: CompositeP.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: CompositeP.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/ConstrainP.h diff -u xc/lib/Xt/ConstrainP.h:1.1.1.3 xc/lib/Xt/ConstrainP.h:1.2 --- xc/lib/Xt/ConstrainP.h:1.1.1.3 Tue Jan 16 17:23:52 2001 +++ xc/lib/Xt/ConstrainP.h Fri Dec 14 14:56:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ConstrainP.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: ConstrainP.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /* $oHeader: ConstrainP.h,v 1.2 88/08/18 15:54:15 asente Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Constraint.c diff -u xc/lib/Xt/Constraint.c:1.1.1.3 xc/lib/Xt/Constraint.c:1.3 --- xc/lib/Xt/Constraint.c:1.1.1.3 Tue Jan 16 17:23:53 2001 +++ xc/lib/Xt/Constraint.c Fri Dec 14 14:56:09 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Constraint.c,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: Constraint.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,12 +58,13 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Constraint.c,v 1.3 2001/12/14 19:56:09 dawes Exp $ */ #define CONSTRAINT #include "IntrinsicI.h" #include "StringDefs.h" -static void ConstraintPartInitialize(); +static void ConstraintPartInitialize(WidgetClass wc); externaldef(constraintclassrec) ConstraintClassRec constraintClassRec = { { /******* CorePart *******/ /* superclass */ (WidgetClass) &compositeClassRec, Index: xc/lib/Xt/Constraint.h diff -u xc/lib/Xt/Constraint.h:1.1.1.3 xc/lib/Xt/Constraint.h:1.2 --- xc/lib/Xt/Constraint.h:1.1.1.3 Tue Jan 16 17:23:55 2001 +++ xc/lib/Xt/Constraint.h Fri Dec 14 14:56:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Constraint.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: Constraint.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /* $oHeader: Constraint.h,v 1.2 88/08/18 15:54:18 asente Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Convert.c diff -u xc/lib/Xt/Convert.c:3.5 xc/lib/Xt/Convert.c:3.7 --- xc/lib/Xt/Convert.c:3.5 Wed Jan 17 14:43:03 2001 +++ xc/lib/Xt/Convert.c Fri Dec 14 14:56:09 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Convert.c,v 1.4 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: Convert.c,v 1.5 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Convert.c,v 3.5 2001/01/17 19:43:03 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Convert.c,v 3.7 2001/12/14 19:56:09 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -608,13 +612,8 @@ break; case XtBaseOffset: -#if defined(CRAY1) && !defined(__STDC__) args[i].addr = - (XPointer)((int)widget + (int)convert_args[i].address_id); -#else - args[i].addr = (XPointer)((char *)widget + (long)convert_args[i].address_id); -#endif break; case XtWidgetBaseOffset: @@ -625,13 +624,8 @@ ancestor = _XtWindowedAncestor(widget); } -#if defined(CRAY1) && !defined(__STDC__) - args[i].addr = - (XPointer)((int)ancestor + (int)convert_args[i].address_id); -#else args[i].addr = (XPointer)((char *)ancestor + (long)convert_args[i].address_id); -#endif break; case XtImmediate: @@ -661,11 +655,7 @@ params,&num_params); offset = 0; } -#if defined(CRAY1) && !defined(__STDC__) - args[i].addr = (XPointer)((int)widget + offset); -#else args[i].addr = (XPointer)((char *)widget + offset); -#endif break; default: params[0] = XtName(widget); Index: xc/lib/Xt/ConvertI.h diff -u xc/lib/Xt/ConvertI.h:1.1.1.3 xc/lib/Xt/ConvertI.h:1.3 --- xc/lib/Xt/ConvertI.h:1.1.1.3 Tue Jan 16 17:23:58 2001 +++ xc/lib/Xt/ConvertI.h Fri Dec 14 14:56:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ConvertI.h,v 1.3 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: ConvertI.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,6 +46,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/ConvertI.h,v 1.3 2001/12/14 19:56:09 dawes Exp $ */ /* Representation types */ @@ -96,4 +101,6 @@ XtCacheRef* /* cache_ref_return */ #endif ); + +void _XtConvertInitialize(void); Index: xc/lib/Xt/Converters.c diff -u xc/lib/Xt/Converters.c:3.8 xc/lib/Xt/Converters.c:3.11 --- xc/lib/Xt/Converters.c:3.8 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/Converters.c Fri Dec 14 14:56:09 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Converters.c,v 1.4 2000/08/17 19:46:09 cpqbld Exp $ */ +/* $Xorg: Converters.c,v 1.5 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Converters.c,v 3.8 2001/01/17 19:43:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Converters.c,v 3.11 2001/12/14 19:56:09 dawes Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -68,16 +72,6 @@ #include #include /* for StringToDirectoryString */ -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif - -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - #ifdef __EMX__ #define IsNewline(str) ((str) == '\n' || (str) == '\r') #define IsWhitespace(str) ((str)== ' ' || (str) == '\t' || (str) == '\r') @@ -86,9 +80,9 @@ #define IsWhitespace(str) ((str)== ' ' || (str) == '\t') #endif -static Const String XtNwrongParameters = "wrongParameters"; -static Const String XtNconversionError = "conversionError"; -static Const String XtNmissingCharsetList = "missingCharsetList"; +static const String XtNwrongParameters = "wrongParameters"; +static const String XtNconversionError = "conversionError"; +static const String XtNmissingCharsetList = "missingCharsetList"; /* Representation types */ @@ -434,7 +428,7 @@ return False; } -XtConvertArgRec Const colorConvertArgs[] = { +XtConvertArgRec const colorConvertArgs[] = { {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen), sizeof(Screen *)}, {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.colormap), @@ -567,7 +561,7 @@ /* no longer used by Xt, but it's in the spec */ -XtConvertArgRec Const screenConvertArg[] = { +XtConvertArgRec const screenConvertArg[] = { {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen), sizeof(Screen *)} }; @@ -589,7 +583,7 @@ value->addr = (XPointer)&DisplayOfScreen(XtScreenOfObject(widget)); } -static XtConvertArgRec Const displayConvertArg[] = { +static XtConvertArgRec const displayConvertArg[] = { {XtProcedureArg, (XtPointer)FetchDisplayArg, 0}, }; @@ -603,8 +597,8 @@ XtPointer *closure_ret; { - static Const struct _CursorName { - Const char *name; + static const struct _CursorName { + const char *name; unsigned int shape; } cursor_names[] = { {"X_cursor", XC_X_cursor}, @@ -685,7 +679,7 @@ {"watch", XC_watch}, {"xterm", XC_xterm}, }; - Const struct _CursorName *nP; + const struct _CursorName *nP; char *name = (char *)fromVal->addr; register int i; @@ -909,13 +903,13 @@ } } /* Should really do XListFonts, but most servers support this */ - f = XLoadFont(display, "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1"); + f = XLoadFont(display, "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*"); if (f != 0) goto Done; XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "noFont","cvtStringToFont",XtCXtToolkitError, - "Unable to load any usable ISO8859-1 font", + "Unable to load any usable ISO8859 font", (String *) NULL, (Cardinal *)NULL); return False; @@ -1098,7 +1092,7 @@ value->addr = (XPointer)&locale; } -static XtConvertArgRec Const localeDisplayConvertArgs[] = { +static XtConvertArgRec const localeDisplayConvertArgs[] = { {XtProcedureArg, (XtPointer)FetchDisplayArg, 0}, {XtProcedureArg, (XtPointer)FetchLocaleArg, 0}, }; @@ -1168,13 +1162,13 @@ } } /* Should really do XListFonts, but most servers support this */ - f = XLoadQueryFont(display, "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1"); + f = XLoadQueryFont(display, "-*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-*"); if (f != NULL) goto Done; XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "noFont","cvtStringToFontStruct",XtCXtToolkitError, - "Unable to load any usable ISO8859-1 font", + "Unable to load any usable ISO8859 font", (String *) NULL, (Cardinal *)NULL); return False; @@ -1466,7 +1460,7 @@ return False; } -static XtConvertArgRec Const visualConvertArgs[] = { +static XtConvertArgRec const visualConvertArgs[] = { {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.screen), sizeof(Screen *)}, {XtWidgetBaseOffset, (XtPointer)XtOffsetOf(WidgetRec, core.depth), Index: xc/lib/Xt/Core.c diff -u xc/lib/Xt/Core.c:1.1.1.3 xc/lib/Xt/Core.c:1.2 --- xc/lib/Xt/Core.c:1.1.1.3 Tue Jan 16 17:24:01 2001 +++ xc/lib/Xt/Core.c Fri Dec 14 14:56:10 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Core.c,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ */ +/* $Xorg: Core.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Core.h diff -u xc/lib/Xt/Core.h:1.1.1.3 xc/lib/Xt/Core.h:1.2 --- xc/lib/Xt/Core.h:1.1.1.3 Tue Jan 16 17:24:03 2001 +++ xc/lib/Xt/Core.h Fri Dec 14 14:56:10 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: Core.h,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ +* $Xorg: Core.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ * $oHeader: Core.h,v 1.2 88/08/18 15:54:32 asente Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/CoreP.h diff -u xc/lib/Xt/CoreP.h:1.1.1.3 xc/lib/Xt/CoreP.h:1.2 --- xc/lib/Xt/CoreP.h:1.1.1.3 Tue Jan 16 17:24:06 2001 +++ xc/lib/Xt/CoreP.h Fri Dec 14 14:56:10 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: CoreP.h,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ +* $Xorg: CoreP.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ * $oHeader: CoreP.h,v 1.2 88/08/18 15:54:37 asente Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Create.c diff -u xc/lib/Xt/Create.c:3.7 xc/lib/Xt/Create.c:3.9 --- xc/lib/Xt/Create.c:3.7 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/Create.c Fri Dec 14 14:56:10 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Create.c,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ */ +/* $Xorg: Create.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Create.c,v 3.7 2001/01/17 19:43:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Create.c,v 3.9 2001/12/14 19:56:10 dawes Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -59,6 +63,7 @@ #include "IntrinsicI.h" #include "VarargsI.h" #include "ShellP.h" +#include "CreateI.h" #ifndef X_NO_RESOURCE_CONFIGURATION_MANAGEMENT #include "ResConfigP.h" #endif @@ -68,8 +73,7 @@ static String XtNxtCreatePopupShell = "xtCreatePopupShell"; static void -CallClassPartInit(ancestor, wc) - WidgetClass ancestor, wc; +CallClassPartInit(WidgetClass ancestor, WidgetClass wc) { if (ancestor->core_class.superclass != NULL) { CallClassPartInit(ancestor->core_class.superclass, wc); @@ -189,12 +193,12 @@ } static void -CallInitialize (class, req_widget, new_widget, args, num_args) - WidgetClass class; - Widget req_widget; - Widget new_widget; - ArgList args; - Cardinal num_args; +CallInitialize ( + WidgetClass class, + Widget req_widget, + Widget new_widget, + ArgList args, + Cardinal num_args) { WidgetClass superclass; XtInitProc initialize; @@ -218,11 +222,12 @@ } static void -CallConstraintInitialize (class, req_widget, new_widget, args, num_args) - ConstraintWidgetClass class; - Widget req_widget, new_widget; - ArgList args; - Cardinal num_args; +CallConstraintInitialize ( + ConstraintWidgetClass class, + Widget req_widget, + Widget new_widget, + ArgList args, + Cardinal num_args) { WidgetClass superclass; XtInitProc initialize; @@ -241,16 +246,15 @@ } static Widget -xtWidgetAlloc(widget_class, parent_constraint_class, parent, name, - args, num_args, typed_args, num_typed_args) - WidgetClass widget_class; - ConstraintWidgetClass parent_constraint_class; - Widget parent; - String name; - ArgList args; /* must be NULL if typed_args is non-NULL */ - Cardinal num_args; - XtTypedArgList typed_args; /* must be NULL if args is non-NULL */ - Cardinal num_typed_args; +xtWidgetAlloc( + WidgetClass widget_class, + ConstraintWidgetClass parent_constraint_class, + Widget parent, + String name, + ArgList args, /* must be NULL if typed_args is non-NULL */ + Cardinal num_args, + XtTypedArgList typed_args, /* must be NULL if args is non-NULL */ + Cardinal num_typed_args) { Widget widget; Cardinal wsize, csize = 0; @@ -300,8 +304,8 @@ } static void -CompileCallbacks(widget) - Widget widget; +CompileCallbacks( + Widget widget) { CallbackTable offsets; InternalCallbackList* cl; @@ -321,26 +325,25 @@ } static Widget -xtCreate(name, class, widget_class, parent, default_screen, - args, num_args, typed_args, num_typed_args, parent_constraint_class, - post_proc) - char *name, *class; - WidgetClass widget_class; - Widget parent; - Screen* default_screen; /* undefined when creating a nonwidget */ - ArgList args; /* must be NULL if typed_args is non-NULL */ - Cardinal num_args; - XtTypedArgList typed_args; /* must be NULL if args is non-NULL */ - Cardinal num_typed_args; - ConstraintWidgetClass parent_constraint_class; +xtCreate( + char *name, + char *class, + WidgetClass widget_class, + Widget parent, + Screen* default_screen, /* undefined when creating a nonwidget */ + ArgList args, /* must be NULL if typed_args is non-NULL */ + Cardinal num_args, + XtTypedArgList typed_args, /* must be NULL if args is non-NULL */ + Cardinal num_typed_args, + ConstraintWidgetClass parent_constraint_class, /* NULL if not a subclass of Constraint or if child is popup shell */ - XtWidgetProc post_proc; + XtWidgetProc post_proc) { /* need to use strictest alignment rules possible in next two decls. */ double widget_cache[100]; double constraint_cache[20]; Widget req_widget; - XtPointer req_constraints; + XtPointer req_constraints = NULL; Cardinal wsize, csize; Widget widget; XtCacheRef *cache_refs; @@ -410,7 +413,9 @@ } else req_widget->core.constraints = NULL; CallConstraintInitialize(parent_constraint_class, req_widget, widget, args, num_args); - if (csize) XtStackFree(req_constraints, constraint_cache); + if (csize) { + XtStackFree(req_constraints, constraint_cache); + } } XtStackFree((XtPointer)req_widget, widget_cache); if (post_proc != (XtWidgetProc) NULL) { @@ -451,8 +456,7 @@ } static void -widgetPostProc(w) - Widget w; +widgetPostProc(Widget w) { XtWidgetProc insert_child; Widget parent = XtParent(w); @@ -478,15 +482,14 @@ } Widget -_XtCreateWidget(name, widget_class, parent, - args, num_args, typed_args, num_typed_args) - String name; - WidgetClass widget_class; - Widget parent; - ArgList args; - Cardinal num_args; - XtTypedArgList typed_args; - Cardinal num_typed_args; +_XtCreateWidget( + String name, + WidgetClass widget_class, + Widget parent, + ArgList args, + Cardinal num_args, + XtTypedArgList typed_args, + Cardinal num_typed_args) { register Widget widget; ConstraintWidgetClass cwc; @@ -582,7 +585,7 @@ WIDGET_TO_APPCON(parent); LOCK_APP(app); - retval = _XtCreateWidget(name, widget_class, parent, args, num_args, + retval = _XtCreateWidget((String)name, widget_class, parent, args, num_args, (XtTypedArgList)NULL, (Cardinal)0); UNLOCK_APP(app); return retval; @@ -613,16 +616,15 @@ LOCK_APP(app); XtCheckSubclass(parent, compositeWidgetClass, "in XtCreateManagedWidget"); - widget = _XtCreateWidget(name, widget_class, parent, args, num_args, - (XtTypedArgList)NULL, (Cardinal) 0); + widget = _XtCreateWidget((String)name, widget_class, parent, args, + num_args, (XtTypedArgList)NULL, (Cardinal) 0); XtManageChild(widget); UNLOCK_APP(app); return widget; } static void -popupPostProc(w) - Widget w; +popupPostProc(Widget w) { Widget parent = XtParent(w); @@ -693,8 +695,8 @@ WIDGET_TO_APPCON(parent); LOCK_APP(app); - retval = _XtCreatePopupShell(name, widget_class, parent, args, num_args, - (XtTypedArgList)NULL, (Cardinal)0); + retval = _XtCreatePopupShell((String)name, widget_class, parent, args, + num_args, (XtTypedArgList)NULL, (Cardinal)0); UNLOCK_APP(app); return retval; } @@ -757,8 +759,8 @@ DPY_TO_APPCON(display); LOCK_APP(app); - retval = _XtAppCreateShell(name, class, widget_class, display, args, - num_args, (XtTypedArgList)NULL, (Cardinal)0); + retval = _XtAppCreateShell((String)name, (String)class, widget_class, + display, args, num_args, (XtTypedArgList)NULL, (Cardinal)0); UNLOCK_APP(app); return retval; } Index: xc/lib/Xt/CreateI.h diff -u /dev/null xc/lib/Xt/CreateI.h:1.1 --- /dev/null Fri Jan 18 15:23:32 2002 +++ xc/lib/Xt/CreateI.h Wed Aug 22 18:52:17 2001 @@ -0,0 +1,37 @@ +/* $XFree86: xc/lib/Xt/CreateI.h,v 1.1 2001/08/22 22:52:17 dawes Exp $ */ + +#ifndef _XtcreateI_h +#define _XtcreateI_h + +extern Widget _XtCreateWidget(String name, WidgetClass widget_class, + Widget parent, ArgList args, Cardinal num_args, + XtTypedArgList typed_args, + Cardinal num_typed_args); +extern Widget _XtCreatePopupShell(String name, WidgetClass widget_class, + Widget parent, ArgList args, + Cardinal num_args, XtTypedArgList typed_args, + Cardinal num_typed_args); +extern Widget _XtAppCreateShell(String name, String class, + WidgetClass widget_class, Display *display, + ArgList args, Cardinal num_args, + XtTypedArgList typed_args, + Cardinal num_typed_args); +extern Widget _XtCreateHookObj(Screen *screen); + + +#include + +/* VarCreate.c */ +extern Widget _XtVaOpenApplication(XtAppContext *app_context_return, + _Xconst char* application_class, + XrmOptionDescList options, Cardinal num_options, + int *argc_in_out, String *argv_in_out, + String *fallback_resources, WidgetClass widget_class, + va_list var_args); +extern Widget _XtVaAppInitialize(XtAppContext *app_context_return, + _Xconst char* application_class, + XrmOptionDescList options, Cardinal num_options, + int *argc_in_out, String *argv_in_out, + String *fallback_resources, va_list var_args); + +#endif /* _XtcreateI_h */ Index: xc/lib/Xt/Destroy.c diff -u xc/lib/Xt/Destroy.c:1.1.1.4 xc/lib/Xt/Destroy.c:1.3 --- xc/lib/Xt/Destroy.c:1.1.1.4 Tue Jan 16 17:24:09 2001 +++ xc/lib/Xt/Destroy.c Fri Dec 14 14:56:11 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Destroy.c,v 1.3 2000/08/17 19:46:10 cpqbld Exp $ */ +/* $Xorg: Destroy.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Destroy.c,v 1.3 2001/12/14 19:56:11 dawes Exp $ */ #include "IntrinsicI.h" @@ -184,7 +189,7 @@ static void XtPhase2Destroy (widget) register Widget widget; { - Display *display; + Display *display = NULL; Window window; Widget parent; XtAppContext app = XtWidgetToApplicationContext(widget); @@ -240,9 +245,6 @@ */ if (XtIsShell(widget) || !XtIsWidget(widget)) { window = 0; -#ifdef lint - display = 0; -#endif } else { display = XtDisplay(widget); Index: xc/lib/Xt/Display.c diff -u xc/lib/Xt/Display.c:3.10 xc/lib/Xt/Display.c:3.13 --- xc/lib/Xt/Display.c:3.10 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/Display.c Fri Dec 14 14:56:11 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Display.c,v 1.4 2000/08/17 19:46:10 cpqbld Exp $ */ +/* $Xorg: Display.c,v 1.6 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Display.c,v 3.10 2001/01/17 19:43:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Display.c,v 3.13 2001/12/14 19:56:11 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -61,11 +65,7 @@ #include "ResConfigP.h" #endif -#ifndef X_NOT_STDC_ENV #include -#else -extern char* getenv(); -#endif #ifdef XTHREADS void (*_XtProcessLock)() = NULL; @@ -75,10 +75,6 @@ static String XtNnoPerDisplay = "noPerDisplay"; -extern void _XtHeapInit(); -extern void _XtHeapFree(); -extern XrmDatabase _XtPreparseCommandLine(); - ProcessContext _XtGetProcessContext() { static ProcessContextRec processContextRec = { @@ -174,7 +170,6 @@ String name; String classname; { - extern void _XtAllocTMContext(); XtPerDisplay pd; AddToAppContext(dpy, app); @@ -265,10 +260,11 @@ LOCK_APP(app); LOCK_PROCESS; /* parse the command line for name, display, and/or language */ - db = _XtPreparseCommandLine(urlist, num_urs, *argc, argv, &applName, - (displayName ? NULL : &displayName), - (app->process->globalLangProcRec.proc ? - &language : NULL)); + db = _XtPreparseCommandLine(urlist, num_urs, *argc, argv, + (String *)&applName, + (String *)(displayName ? NULL : &displayName), + (app->process->globalLangProcRec.proc ? + &language : NULL)); UNLOCK_PROCESS; d = XOpenDisplay(displayName); @@ -592,11 +588,8 @@ XtPerDisplay _XtSortPerDisplayList(dpy) Display *dpy; { - register PerDisplayTablePtr pd, opd; + register PerDisplayTablePtr pd, opd = NULL; -#ifdef lint - opd = NULL; -#endif LOCK_PROCESS; for (pd = _XtperDisplayList; pd != NULL && pd->dpy != dpy; @@ -634,13 +627,10 @@ Display *dpy; { register XtPerDisplay xtpd; - register PerDisplayTablePtr pd, opd; + register PerDisplayTablePtr pd, opd = NULL; XrmDatabase db; int i; -#ifdef lint - opd = NULL; -#endif XtDestroyWidget(XtHooksOfDisplay(dpy)); LOCK_PROCESS; @@ -662,7 +652,6 @@ xtpd = &(pd->perDpy); if (xtpd != NULL) { - extern void _XtGClistFree(); if (xtpd->destroy_callbacks != NULL) { XtCallCallbackList((Widget) NULL, (XtCallbackList)xtpd->destroy_callbacks, Index: xc/lib/Xt/Error.c diff -u xc/lib/Xt/Error.c:3.11 xc/lib/Xt/Error.c:3.12 --- xc/lib/Xt/Error.c:3.11 Sun Apr 1 10:00:02 2001 +++ xc/lib/Xt/Error.c Fri Dec 14 14:56:11 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Error.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ +/* $Xorg: Error.c,v 1.5 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Error.c,v 3.11 2001/04/01 14:00:02 tsi Exp $ */ +/* $XFree86: xc/lib/Xt/Error.c,v 3.12 2001/12/14 19:56:11 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Event.c diff -u xc/lib/Xt/Event.c:3.6 xc/lib/Xt/Event.c:3.10 --- xc/lib/Xt/Event.c:3.6 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/Event.c Fri Dec 14 14:56:11 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Event.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ +/* $Xorg: Event.c,v 1.5 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,17 +58,12 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Event.c,v 3.10 2001/12/14 19:56:11 dawes Exp $ */ #include "IntrinsicI.h" #include "Shell.h" #include "StringDefs.h" -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - typedef struct _XtEventRecExt { int type; XtPointer select_data[1]; /* actual dimension is [mask] */ @@ -265,7 +264,7 @@ XtListPosition position; { register XtEventRec *p, **pp; - EventMask oldMask, eventMask; + EventMask oldMask = 0, eventMask = 0; if (!has_type_specifier) { eventMask = *(EventMask*)select_data & ~NonMaskableMask; @@ -579,7 +578,7 @@ WWPair pairs; /* bogus entries */ } *WWTable; -static Const WidgetRec WWfake; /* placeholder for deletions */ +static const WidgetRec WWfake; /* placeholder for deletions */ #define WWHASH(tab,win) ((win) & tab->mask) #define WWREHASHVAL(tab,win) ((((win) % tab->rehash) + 2) | 1) @@ -1235,7 +1234,7 @@ return(FALSE); } -static EventMask Const masks[] = { +static EventMask const masks[] = { 0, /* Error, should never see */ 0, /* Reply, should never see */ KeyPressMask, /* KeyPress */ @@ -1310,11 +1309,12 @@ XtGrabList gl; for (gl = grabList; gl != NULL; gl = gl->next) { - if (gl->spring_loaded) + if (gl->spring_loaded) { if (XtIsSensitive(gl->widget)) return gl->widget; else return NULL; + } if (gl->exclusive) break; } return NULL; @@ -1334,10 +1334,10 @@ if (nextEvent.type == LeaveNotify && event->xcrossing.window == nextEvent.xcrossing.window && nextEvent.xcrossing.mode == NotifyNormal && - (event->xcrossing.detail != NotifyInferior && - nextEvent.xcrossing.detail != NotifyInferior || - event->xcrossing.detail == NotifyInferior && - nextEvent.xcrossing.detail == NotifyInferior)) { + ((event->xcrossing.detail != NotifyInferior && + nextEvent.xcrossing.detail != NotifyInferior) || + (event->xcrossing.detail == NotifyInferior && + nextEvent.xcrossing.detail == NotifyInferior))) { /* skip the enter/leave pair */ XNextEvent(event->xcrossing.display, &nextEvent); return False; @@ -1428,8 +1428,6 @@ EventMask mask = _XtConvertTypeToMask(event->type); Widget dspWidget; Boolean was_filtered = False; - extern Widget _XtFindRemapWidget(); - extern void _XtUngrabBadGrabs(); dspWidget = _XtFindRemapWidget(event, widget, mask, pdi); Index: xc/lib/Xt/EventI.h diff -u xc/lib/Xt/EventI.h:1.1.1.3 xc/lib/Xt/EventI.h:1.3 --- xc/lib/Xt/EventI.h:1.1.1.3 Tue Jan 16 17:24:15 2001 +++ xc/lib/Xt/EventI.h Fri Dec 14 14:56:12 2001 @@ -1,11 +1,15 @@ -/* $Xorg: EventI.h,v 1.3 2000/08/17 19:46:11 cpqbld Exp $ */ +/* $Xorg: EventI.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /* $oHeader: EventI.h,v 1.3 88/08/24 09:21:11 asente Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,6 +47,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/EventI.h,v 1.3 2001/12/14 19:56:12 dawes Exp $ */ /* * Event.h - exported types and functions for toolkit event handler @@ -58,6 +63,8 @@ typedef struct _XtGrabRec *XtGrabList; +#include "PassivGraI.h" + extern void _XtEventInitialize( #if NeedFunctionPrototypes void @@ -119,5 +126,17 @@ int /* eventType */ #endif ); + +/* EventUtil.c */ +extern Widget _XtFindRemapWidget(XEvent *event, Widget widget, + EventMask mask, XtPerDisplayInput pdi); +extern void _XtUngrabBadGrabs(XEvent *event, Widget widget, + EventMask mask, XtPerDisplayInput pdi); +extern void _XtFillAncestorList(Widget **listPtr, int *maxElemsPtr, + int *numElemsPtr, Widget start, + Widget breakWidget); + +/* NextEvent.c */ +extern Boolean XtAppPeekEvent_SkipTimer; #endif /* _Event_h_ */ Index: xc/lib/Xt/EventUtil.c diff -u xc/lib/Xt/EventUtil.c:1.4 xc/lib/Xt/EventUtil.c:1.6 --- xc/lib/Xt/EventUtil.c:1.4 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/EventUtil.c Fri Dec 14 14:56:13 2001 @@ -1,4 +1,4 @@ -/* $Xorg: EventUtil.c,v 1.3 2000/08/17 19:46:11 cpqbld Exp $ */ +/* $Xorg: EventUtil.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /******************************************************** @@ -38,7 +38,11 @@ Copyright 1987, 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -55,10 +59,12 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/EventUtil.c,v 1.6 2001/12/14 19:56:13 dawes Exp $ */ #include "IntrinsicI.h" #include "PassivGraI.h" #include "StringDefs.h" +#include "EventI.h" static XContext perWidgetInputContext = 0; Index: xc/lib/Xt/Functions.c diff -u xc/lib/Xt/Functions.c:1.4 xc/lib/Xt/Functions.c:1.5 --- xc/lib/Xt/Functions.c:1.4 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/Functions.c Fri Dec 14 14:56:14 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Functions.c,v 1.3 2000/08/17 19:46:11 cpqbld Exp $ */ +/* $Xorg: Functions.c,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */ /* @@ -27,7 +27,11 @@ Copyright 1985, 1986, 1987, 1988, 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/GCManager.c diff -u xc/lib/Xt/GCManager.c:1.4 xc/lib/Xt/GCManager.c:1.6 --- xc/lib/Xt/GCManager.c:1.4 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/GCManager.c Fri Dec 14 14:56:14 2001 @@ -1,4 +1,4 @@ -/* $Xorg: GCManager.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ +/* $Xorg: GCManager.c,v 1.5 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/GCManager.c,v 1.6 2001/12/14 19:56:14 dawes Exp $ */ #include "IntrinsicI.h" @@ -85,13 +90,13 @@ GCClipXOrigin | GCClipYOrigin | GCDashOffset | \ GCArcMode) -static Bool Matches(dpy, ptr, valueMask, v, readOnlyMask, dynamicMask) - Display *dpy; - GCptr ptr; - register XtGCMask valueMask; - register XGCValues *v; - XtGCMask readOnlyMask; - XtGCMask dynamicMask; +static Bool Matches( + Display *dpy, + GCptr ptr, + register XtGCMask valueMask, + register XGCValues *v, + XtGCMask readOnlyMask, + XtGCMask dynamicMask) { XGCValues gcv; register XtGCMask checkMask; Index: xc/lib/Xt/Geometry.c diff -u xc/lib/Xt/Geometry.c:1.9 xc/lib/Xt/Geometry.c:1.12 --- xc/lib/Xt/Geometry.c:1.9 Wed Jan 17 14:43:04 2001 +++ xc/lib/Xt/Geometry.c Fri Dec 14 14:56:15 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Geometry.c,v 1.4 2000/08/17 19:46:11 cpqbld Exp $ */ +/* $Xorg: Geometry.c,v 1.5 2001/02/09 02:03:54 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,14 +58,15 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Geometry.c,v 1.9 2001/01/17 19:43:04 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Geometry.c,v 1.12 2001/12/14 19:56:15 dawes Exp $ */ #include "IntrinsicI.h" #include "ShellP.h" +#include "ShellI.h" -static void ClearRectObjAreas(r, old) - RectObj r; - XWindowChanges* old; +static void ClearRectObjAreas( + RectObj r, + XWindowChanges* old) { Widget pw = _XtWindowedAncestor((Widget)r); int bw2; @@ -409,11 +414,12 @@ if (req.changeMask & CWStackMode) { req.changes.stack_mode = request->stack_mode; CALLGEOTAT(_XtGeoTrace(widget,"stack_mode changing\n")); - if (req.changeMask & CWSibling) + if (req.changeMask & CWSibling) { if (XtIsWidget(request->sibling)) req.changes.sibling = XtWindow(request->sibling); else req.changeMask &= ~(CWStackMode | CWSibling); + } } #ifdef XT_GEO_TATTLER @@ -531,16 +537,18 @@ } else { r = _XtMakeGeometryRequest(widget, &request, &reply, &junk); } - if (replyWidth != NULL) + if (replyWidth != NULL) { if (r == XtGeometryAlmost && reply.request_mode & CWWidth) *replyWidth = reply.width; else *replyWidth = width; - if (replyHeight != NULL) + } + if (replyHeight != NULL) { if (r == XtGeometryAlmost && reply.request_mode & CWHeight) *replyHeight = reply.height; else *replyHeight = height; + } UNLOCK_APP(app); return ((r == XtGeometryDone) ? XtGeometryYes : r); } /* XtMakeResizeRequest */ @@ -744,7 +752,6 @@ (String *)NULL, (Cardinal *)NULL); else { Position x, y; - extern void _XtShellGetCoordinates(); _XtShellGetCoordinates( w, &x, &y ); *rootx += x + w->core.border_width; *rooty += y + w->core.border_width; Index: xc/lib/Xt/GetActKey.c diff -u xc/lib/Xt/GetActKey.c:1.1.1.3 xc/lib/Xt/GetActKey.c:1.2 --- xc/lib/Xt/GetActKey.c:1.1.1.3 Tue Jan 16 17:24:22 2001 +++ xc/lib/Xt/GetActKey.c Fri Dec 14 14:56:16 2001 @@ -1,4 +1,4 @@ -/* $Xorg: GetActKey.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: GetActKey.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*LINTLIBRARY*/ @@ -39,7 +39,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/GetResList.c diff -u xc/lib/Xt/GetResList.c:3.4 xc/lib/Xt/GetResList.c:3.6 --- xc/lib/Xt/GetResList.c:3.4 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/GetResList.c Fri Dec 14 14:56:16 2001 @@ -1,4 +1,4 @@ -/* $Xorg: GetResList.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: GetResList.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/GetResList.c,v 3.4 2001/01/17 19:43:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/GetResList.c,v 3.6 2001/12/14 19:56:16 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -115,8 +119,7 @@ } -static Boolean ClassIsSubclassOf(class, superclass) - WidgetClass class, superclass; +static Boolean ClassIsSubclassOf(WidgetClass class, WidgetClass superclass) { for (; class != NULL; class = class->core_class.superclass) { if (class == superclass) return True; Index: xc/lib/Xt/GetValues.c diff -u xc/lib/Xt/GetValues.c:1.1.1.4 xc/lib/Xt/GetValues.c:1.3 --- xc/lib/Xt/GetValues.c:1.1.1.4 Tue Jan 16 17:24:25 2001 +++ xc/lib/Xt/GetValues.c Fri Dec 14 14:56:16 2001 @@ -1,4 +1,4 @@ -/* $Xorg: GetValues.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: GetValues.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*LINTLIBRARY*/ /*********************************************************** @@ -38,7 +38,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -55,19 +59,17 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/GetValues.c,v 1.3 2001/12/14 19:56:16 dawes Exp $ */ #include "IntrinsicI.h" #include "StringDefs.h" -extern void _XtCopyToArg(); -extern XrmResourceList* _XtCreateIndirectionTable(); - -static int GetValues(base, res, num_resources, args, num_args) - char* base; /* Base address to fetch values from */ - XrmResourceList* res; /* The current resource values. */ - register Cardinal num_resources; /* number of items in resources */ - ArgList args; /* The resource values requested */ - Cardinal num_args; /* number of items in arg list */ +static int GetValues( + char* base, /* Base address to fetch values from */ + XrmResourceList* res, /* The current resource values. */ + register Cardinal num_resources, /* number of items in resources */ + ArgList args, /* The resource values requested */ + Cardinal num_args) /* number of items in arg list */ { register ArgList arg; register int i; @@ -118,11 +120,11 @@ return translation_arg_num; } /* GetValues */ -static void CallGetValuesHook(widget_class, w, args, num_args) - WidgetClass widget_class; - Widget w; - ArgList args; - Cardinal num_args; +static void CallGetValuesHook( + WidgetClass widget_class, + Widget w, + ArgList args, + Cardinal num_args) { WidgetClass superclass; XtArgsProc get_values_hook; @@ -142,11 +144,11 @@ -static void CallConstraintGetValuesHook(widget_class, w, args, num_args) - WidgetClass widget_class; - Widget w; - ArgList args; - Cardinal num_args; +static void CallConstraintGetValuesHook( + WidgetClass widget_class, + Widget w, + ArgList args, + Cardinal num_args) { ConstraintClassExtension ext; Index: xc/lib/Xt/HookObj.c diff -u xc/lib/Xt/HookObj.c:1.1.1.3 xc/lib/Xt/HookObj.c:1.3 --- xc/lib/Xt/HookObj.c:1.1.1.3 Tue Jan 16 17:24:26 2001 +++ xc/lib/Xt/HookObj.c Fri Dec 14 14:56:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: HookObj.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: HookObj.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,6 +25,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/HookObj.c,v 1.3 2001/12/14 19:56:17 dawes Exp $ */ #include "IntrinsicI.h" #include "StringDefs.h" @@ -52,7 +57,9 @@ XtOffsetOf(HookObjRec, hooks.num_shells), XtRImmediate, (XtPointer) 0 } }; -static void GetValuesHook(), Initialize(); +static void GetValuesHook(Widget widget, ArgList args, Cardinal *num_args); +static void Initialize(Widget req, Widget new, ArgList args, + Cardinal *num_args); externaldef(hookobjclassrec) HookObjClassRec hookObjClassRec = { { /* Object Class Part */ @@ -97,9 +104,10 @@ externaldef(hookObjectClass) WidgetClass hookObjectClass = (WidgetClass)&hookObjClassRec; -static void FreeShellList(w, closure, call_data) - Widget w; - XtPointer closure, call_data; +static void FreeShellList( + Widget w, + XtPointer closure, + XtPointer call_data) { HookObject h = (HookObject)w; if (h->hooks.shells != NULL) Index: xc/lib/Xt/HookObjI.h diff -u xc/lib/Xt/HookObjI.h:1.1.1.3 xc/lib/Xt/HookObjI.h:1.2 --- xc/lib/Xt/HookObjI.h:1.1.1.3 Tue Jan 16 17:24:26 2001 +++ xc/lib/Xt/HookObjI.h Fri Dec 14 14:56:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: HookObjI.h,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: HookObjI.h,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Hooks.c diff -u xc/lib/Xt/Hooks.c:1.1.1.3 xc/lib/Xt/Hooks.c:1.3 --- xc/lib/Xt/Hooks.c:1.1.1.3 Tue Jan 16 17:24:28 2001 +++ xc/lib/Xt/Hooks.c Fri Dec 14 14:56:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Hooks.c,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: Hooks.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,15 +25,17 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Hooks.c,v 1.3 2001/12/14 19:56:18 dawes Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" +#include "CreateI.h" -static void FreeBlockHookList( widget, closure, call_data ) - Widget widget; /* unused (and invalid) */ - XtPointer closure; /* ActionHook* */ - XtPointer call_data; /* unused */ +static void FreeBlockHookList( + Widget widget, /* unused (and invalid) */ + XtPointer closure, /* ActionHook* */ + XtPointer call_data) /* unused */ { BlockHook list = *(BlockHook*)closure; while (list != NULL) { @@ -84,9 +90,10 @@ UNLOCK_APP(app); } -static void DeleteShellFromHookObj(shell, closure, call_data) - Widget shell; - XtPointer closure, call_data; +static void DeleteShellFromHookObj( + Widget shell, + XtPointer closure, + XtPointer call_data) { /* app_con is locked when this function is called */ int ii, jj; @@ -143,7 +150,6 @@ Widget XtHooksOfDisplay(dpy) Display* dpy; { - extern Widget _XtCreateHookObj(); Widget retval; XtPerDisplay pd; DPY_TO_APPCON(dpy); Index: xc/lib/Xt/Imakefile diff -u xc/lib/Xt/Imakefile:3.15 xc/lib/Xt/Imakefile:3.16 --- xc/lib/Xt/Imakefile:3.15 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/Imakefile Mon Jul 23 09:15:42 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.15 2001/01/17 19:43:05 dawes Exp $ +XCOMM $XFree86: xc/lib/Xt/Imakefile,v 3.16 2001/07/23 13:15:42 dawes Exp $ #define DoNormalLib NormalLibXt #define DoSharedLib SharedLibXt @@ -244,10 +244,6 @@ #endif #if ItsyCompilerBug SpecialCLibObjectRule(PassivGrab,$(_NOOP_),-O0) -#endif - -#ifdef MinixArchitecture -SpecialCLibObjectRule(Shell,$(ICONFIGFILES),-DXT_NO_SM) #endif STRINGS_FILES = StringDefs.c StringDefs.h Shell.h Index: xc/lib/Xt/InitialI.h diff -u xc/lib/Xt/InitialI.h:3.7 xc/lib/Xt/InitialI.h:3.10 --- xc/lib/Xt/InitialI.h:3.7 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/InitialI.h Fri Dec 14 14:56:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: InitialI.h,v 1.3 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: InitialI.h,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,6 +46,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/InitialI.h,v 3.10 2001/12/14 19:56:18 dawes Exp $ */ #ifndef _XtinitialI_h #define _XtinitialI_h @@ -76,6 +81,7 @@ #endif #endif +#include #include typedef struct _TimerEventRec { @@ -195,6 +201,9 @@ #endif } XtAppStruct; +extern void _XtHeapInit(Heap* heap); +extern void _XtHeapFree(Heap* heap); + #ifdef XTTRACEMEMORY @@ -452,5 +461,11 @@ XtPerDisplay pd #endif ); + +extern String _XtGetUserName(String dest, int len); +extern XrmDatabase _XtPreparseCommandLine(XrmOptionDescRec *urlist, + Cardinal num_urs, int argc, String *argv, + String *applName, String *displayName, + String *language); #endif /* _XtinitialI_h */ Index: xc/lib/Xt/Initialize.c diff -u xc/lib/Xt/Initialize.c:3.16 xc/lib/Xt/Initialize.c:3.19 --- xc/lib/Xt/Initialize.c:3.16 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/Initialize.c Fri Dec 14 14:56:21 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Initialize.c,v 1.7 2000/08/17 19:46:12 cpqbld Exp $ */ +/* $Xorg: Initialize.c,v 1.8 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Initialize.c,v 3.16 2001/01/17 19:43:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Initialize.c,v 3.19 2001/12/14 19:56:21 dawes Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -73,19 +77,7 @@ #include #endif -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ -#endif - -#ifndef X_NOT_STDC_ENV #include -#else -extern char *getenv(); -#endif - -extern void _XtConvertInitialize(); #if (defined(SUNSHLIB) || defined(AIXSHLIB)) && defined(SHAREDCODE) /* @@ -123,7 +115,7 @@ policy, which the toolkit avoids but I hate differing programs at this level. */ -static XrmOptionDescRec Const opTable[] = { +static XrmOptionDescRec const opTable[] = { {"+rv", "*reverseVideo", XrmoptionNoArg, (XtPointer) "off"}, {"+synchronous","*synchronous", XrmoptionNoArg, (XtPointer) "off"}, {"-background", "*background", XrmoptionSepArg, (XtPointer) NULL}, @@ -156,13 +148,12 @@ * GetHostname - emulates gethostname() on non-bsd systems. */ -static void GetHostname (buf, maxlen) - char *buf; - int maxlen; +static void GetHostname ( + char *buf, + int maxlen) { - int len; - #ifdef USE_UNAME + int len; struct utsname name; if (maxlen <= 0 || buf == NULL) @@ -203,8 +194,6 @@ void XtToolkitInitialize() { - extern void _XtResourceListInitialize(); - extern Boolean XtAppPeekEvent_SkipTimer; static Boolean initialized = False; LOCK_PROCESS; @@ -263,9 +252,9 @@ } -static String GetRootDirName(dest, len) - String dest; - int len; +static String GetRootDirName( + String dest, + int len) { #ifdef WIN32 register char *ptr1; @@ -311,9 +300,9 @@ return dest; } -static void CombineAppUserDefaults(dpy, pdb) - Display *dpy; - XrmDatabase *pdb; +static void CombineAppUserDefaults( + Display *dpy, + XrmDatabase *pdb) { char* filename; char* path; @@ -351,9 +340,9 @@ if (deallocate) DEALLOCATE_LOCAL(path); } -static void CombineUserDefaults(dpy, pdb) - Display *dpy; - XrmDatabase *pdb; +static void CombineUserDefaults( + Display *dpy, + XrmDatabase *pdb) { char *slashDotXdefaults = "/.Xdefaults"; char *dpy_defaults = XResourceManagerString(dpy); @@ -370,20 +359,19 @@ } /*ARGSUSED*/ -static Bool StoreDBEntry(db, bindings, quarks, type, value, data) - XrmDatabase *db; - XrmBindingList bindings; - XrmQuarkList quarks; - XrmRepresentation *type; - XrmValuePtr value; - XPointer data; +static Bool StoreDBEntry( + XrmDatabase *db, + XrmBindingList bindings, + XrmQuarkList quarks, + XrmRepresentation *type, + XrmValuePtr value, + XPointer data) { XrmQPutResource((XrmDatabase *)data, bindings, quarks, *type, value); return False; } -static XrmDatabase CopyDB(db) - XrmDatabase db; +static XrmDatabase CopyDB(XrmDatabase db) { XrmDatabase copy = NULL; XrmQuark empty = NULLQUARK; @@ -394,10 +382,10 @@ } /*ARGSUSED*/ -static String _XtDefaultLanguageProc(dpy, xnl, closure) - Display *dpy; /* unused */ - String xnl; - XtPointer closure; /* unused */ +static String _XtDefaultLanguageProc( + Display *dpy, /* unused */ + String xnl, + XtPointer closure) /* unused */ { if (! setlocale(LC_ALL, xnl)) XtWarning("locale not supported by C library, locale unchanged"); @@ -570,14 +558,17 @@ * Caller is responsible for freeing the returned option table. */ -static void _MergeOptionTables(src1, num_src1, src2, num_src2, dst, num_dst) - XrmOptionDescRec *src1, *src2; - Cardinal num_src1, num_src2; - XrmOptionDescRec **dst; - Cardinal *num_dst; +static void _MergeOptionTables( + const XrmOptionDescRec *src1, + Cardinal num_src1, + const XrmOptionDescRec *src2, + Cardinal num_src2, + XrmOptionDescRec **dst, + Cardinal *num_dst) { XrmOptionDescRec *table, *endP; - register XrmOptionDescRec *opt1, *opt2, *whereP, *dstP; + register XrmOptionDescRec *opt1, *whereP, *dstP; + const register XrmOptionDescRec *opt2; int i1, i2, dst_len, order; Boolean found; enum {Check, NotSorted, IsSorted} sort_order = Check; @@ -640,11 +631,13 @@ /* NOTE: name, class, and type must be permanent strings */ -static Boolean _GetResource(dpy, list, name, class, type, value) - Display *dpy; - XrmSearchList list; - String name, class, type; - XrmValue* value; +static Boolean _GetResource( + Display *dpy, + XrmSearchList list, + String name, + String class, + String type, + XrmValue* value) { XrmRepresentation db_type; XrmValue db_value; @@ -725,9 +718,9 @@ } -static void GetLanguage(dpy, pd) - Display *dpy; - XtPerDisplay pd; +static void GetLanguage( + Display *dpy, + XtPerDisplay pd) { XrmRepresentation type; XrmValue value; @@ -761,20 +754,20 @@ UNLOCK_PROCESS; } -static void ProcessInternalConnection (client_data, fd, id) - XtPointer client_data; - int* fd; - XtInputId* id; +static void ProcessInternalConnection ( + XtPointer client_data, + int* fd, + XtInputId* id) { XProcessInternalConnection ((Display *) client_data, *fd); } -static void ConnectionWatch (dpy, client_data, fd, opening, watch_data) - Display* dpy; - XPointer client_data; - int fd; - Bool opening; - XPointer* watch_data; +static void ConnectionWatch ( + Display* dpy, + XPointer client_data, + int fd, + Bool opening, + XPointer* watch_data) { XtInputId* iptr; XtAppContext app = XtDisplayToApplicationContext(dpy); Index: xc/lib/Xt/Intrinsic.c diff -u xc/lib/Xt/Intrinsic.c:3.17 xc/lib/Xt/Intrinsic.c:3.20 --- xc/lib/Xt/Intrinsic.c:3.17 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/Intrinsic.c Fri Dec 14 14:56:21 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Intrinsic.c,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ +/* $Xorg: Intrinsic.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.17 2001/01/17 19:43:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Intrinsic.c,v 3.20 2001/12/14 19:56:21 dawes Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,11 +71,7 @@ #include #endif /* VMS */ -#ifndef X_NOT_STDC_ENV #include -#else -extern char *getenv(); -#endif String XtCXtToolkitError = "XtToolkitError"; @@ -579,7 +579,7 @@ NameMatchProc matchproc; int in_depth, *out_depth, *found_depth; { - Widget w1, w2; + Widget w1 = 0, w2; int d1, d2; if (XtIsComposite(root)) { @@ -1251,7 +1251,7 @@ start += strlen(STARTSTR); # endif - if (end = strchr (start, ENDCHAR)) { + if ((end = strchr (start, ENDCHAR))) { len = end - start; if (buf != NULL) XtFree (buf); buf = XtMalloc (len + 1); @@ -1636,19 +1636,13 @@ void -#if NeedVarargsPrototypes _XtGeoTrace (Widget widget, ...) -#else -_XtGeoTrace (widget, va_alist) -Widget widget; -va_dcl -#endif { va_list args; char *fmt; int i ; if (IsTattled(widget)) { - Va_start(args, widget); + va_start(args, widget); fmt = va_arg(args, char *); for (i=0; i /* for R4 compatibility */ #else #include -#ifndef X_NOT_STDC_ENV #include /* for XtNewString */ -#else -#ifdef SYSV -#include -#else -#include -#endif /* SYSV else */ -#endif /* !X_NOT_STDC_ENV else */ #endif /* XT_BC else */ #define XtSpecificationRelease 6 @@ -98,9 +94,7 @@ #endif /* NeedFunctionPrototypes */ -#ifndef NULL -#define NULL 0 -#endif +#include #ifdef VMS #define externalref globalref @@ -747,13 +741,8 @@ #endif ); -#ifdef __STDC__ externalref XtConvertArgRec const colorConvertArgs[]; externalref XtConvertArgRec const screenConvertArg[]; -#else -externalref XtConvertArgRec colorConvertArgs[]; -externalref XtConvertArgRec screenConvertArg[]; -#endif extern void XtAppAddConverter( /* obsolete */ #if NeedFunctionPrototypes @@ -2054,25 +2043,11 @@ #define XtDefaultFont "XtDefaultFont" #define XtDefaultFontSet "XtDefaultFontSet" -#if defined(CRAY) || defined(__ACK) -#if __STDC__ && !defined(__ACK) +#if defined(CRAY) #define XtOffset(p_type,field) _Offsetof(p_type,field) -#else -#ifdef CRAY2 +#else /* ! CRAY */ #define XtOffset(p_type,field) \ - (sizeof(int)*((unsigned int)&(((p_type)NULL)->field))) - -#else /* !CRAY2 */ - -#define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field)) - -#endif /* !CRAY2 */ -#endif /* __STDC__ */ -#else /* ! (CRAY || __arm || __ACK) */ - -#define XtOffset(p_type,field) \ ((Cardinal) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) - #endif /* !CRAY */ #ifdef offsetof Index: xc/lib/Xt/IntrinsicI.h diff -u xc/lib/Xt/IntrinsicI.h:3.5 xc/lib/Xt/IntrinsicI.h:3.8 --- xc/lib/Xt/IntrinsicI.h:3.5 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/IntrinsicI.h Fri Dec 14 14:56:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: IntrinsicI.h,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ +/* $Xorg: IntrinsicI.h,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/IntrinsicI.h,v 3.5 2001/01/17 19:43:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/IntrinsicI.h,v 3.8 2001/12/14 19:56:25 dawes Exp $ */ #ifndef _XtintrinsicI_h #define _XtintrinsicI_h @@ -61,14 +65,6 @@ #include "ConvertI.h" #include "TranslateI.h" -#include "CallbackI.h" -#include "EventI.h" -#include "HookObjI.h" -#include "PassivGraI.h" -#include "ThreadsI.h" -#include "InitialI.h" -#include "ResourceI.h" -#include "StringDefs.h" #define RectObjClassFlag 0x02 #define WidgetClassFlag 0x04 @@ -230,16 +226,17 @@ #endif ); +/* GCManager.c */ +extern void _XtGClistFree(Display *dpy, XtPerDisplay pd); + /** GeoTattler stuff */ #ifdef XT_GEO_TATTLER extern void _XtGeoTab (); extern void _XtGeoTrace ( -#if NeedVarargsPrototypes Widget widget, ... -#endif ); #define CALLGEOTAT(f) f Index: xc/lib/Xt/IntrinsicP.h diff -u xc/lib/Xt/IntrinsicP.h:1.1.1.3 xc/lib/Xt/IntrinsicP.h:1.2 --- xc/lib/Xt/IntrinsicP.h:1.1.1.3 Tue Jan 16 17:24:39 2001 +++ xc/lib/Xt/IntrinsicP.h Fri Dec 14 14:56:26 2001 @@ -1,10 +1,14 @@ -/* $Xorg: IntrinsicP.h,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ +/* $Xorg: IntrinsicP.h,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Keyboard.c diff -u xc/lib/Xt/Keyboard.c:3.2 xc/lib/Xt/Keyboard.c:3.4 --- xc/lib/Xt/Keyboard.c:3.2 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/Keyboard.c Fri Dec 14 14:56:26 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Keyboard.c,v 1.4 2000/08/17 19:46:13 cpqbld Exp $ */ +/* $Xorg: Keyboard.c,v 1.5 2001/02/09 02:03:55 xorgcvs Exp $ */ /******************************************************** @@ -38,7 +38,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -55,13 +59,14 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Keyboard.c,v 3.4 2001/12/14 19:56:26 dawes Exp $ */ #include "IntrinsicI.h" #include "PassivGraI.h" +#include "EventI.h" #define _GetWindowedAncestor(w) (XtIsWidget(w) ? w : _XtWindowedAncestor(w)) -extern void _XtFillAncestorList(); extern void _XtSendFocusEvent(); /* InActiveSubtree cache of the current focus source and its ancestors */ Index: xc/lib/Xt/Manage.c diff -u xc/lib/Xt/Manage.c:3.6 xc/lib/Xt/Manage.c:3.8 --- xc/lib/Xt/Manage.c:3.6 Wed Jan 17 14:43:05 2001 +++ xc/lib/Xt/Manage.c Fri Dec 14 14:56:26 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Manage.c,v 1.3 2000/08/17 19:46:13 cpqbld Exp $ */ +/* $Xorg: Manage.c,v 1.4 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Manage.c,v 3.6 2001/01/17 19:43:05 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Manage.c,v 3.8 2001/12/14 19:56:26 dawes Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -63,18 +67,18 @@ static String XtNxtManageChildren = "xtManageChildren"; static String XtNxtChangeManagedSet = "xtChangeManagedSet"; -static void UnmanageChildren(children, num_children, parent, num_unique_children, call_change_managed, caller_func) - WidgetList children; - Cardinal num_children; - Widget parent; - Cardinal* num_unique_children; - Boolean call_change_managed; - String caller_func; +static void UnmanageChildren( + WidgetList children, + Cardinal num_children, + Widget parent, + Cardinal* num_unique_children, + Boolean call_change_managed, + String caller_func) { Widget child; Cardinal i; - XtWidgetProc change_managed; - Bool parent_realized; + XtWidgetProc change_managed = NULL; + Bool parent_realized = False; *num_unique_children = 0; @@ -186,20 +190,20 @@ } /* XtUnmanageChild */ -static void ManageChildren(children, num_children, parent, call_change_managed, caller_func) - WidgetList children; - Cardinal num_children; - Widget parent; - Boolean call_change_managed; - String caller_func; +static void ManageChildren( + WidgetList children, + Cardinal num_children, + Widget parent, + Boolean call_change_managed, + String caller_func) { #define MAXCHILDREN 100 Widget child; Cardinal num_unique_children, i; - XtWidgetProc change_managed; + XtWidgetProc change_managed = NULL; WidgetList unique_children; Widget cache[MAXCHILDREN]; - Bool parent_realized; + Bool parent_realized = False; if (XtIsComposite((Widget) parent)) { LOCK_PROCESS; Index: xc/lib/Xt/NextEvent.c diff -u xc/lib/Xt/NextEvent.c:3.18 xc/lib/Xt/NextEvent.c:3.24 --- xc/lib/Xt/NextEvent.c:3.18 Sat Feb 10 23:41:28 2001 +++ xc/lib/Xt/NextEvent.c Mon Dec 17 15:52:24 2001 @@ -1,4 +1,4 @@ -/* $Xorg: NextEvent.c,v 1.6 2000/08/17 19:46:14 cpqbld Exp $ */ +/* $Xorg: NextEvent.c,v 1.8 2001/02/09 02:03:55 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -35,9 +35,13 @@ /* -Copyright 1987, 1988, 1994, 1998 The Open Group +Copyright 1987, 1988, 1994, 1998, 2001 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,24 +58,16 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.18 2001/02/11 04:41:28 keithp Exp $ */ +/* $XFree86: xc/lib/Xt/NextEvent.c,v 3.24 2001/12/17 20:52:24 dawes Exp $ */ #include "IntrinsicI.h" #include #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif #ifdef __EMX__ #include #endif -#ifdef MINIX -#include -#define select(n,r,w,x,t) nbio_select(n,r,w,x,t) -#endif - static TimerEventRec* freeTimerRecs; static WorkProcRec* freeWorkRecs; static SignalEventRec* freeSignalRecs; @@ -153,12 +149,6 @@ *howlong -= (time_spent.tv_sec*1000+time_spent.tv_usec/1000); } -#ifdef AMOEBA -/* For IoWait emulation: */ -static int DoIgnoreEvents; -static int DoIgnoreInputs; -#endif - typedef struct { struct timeval cur_time; struct timeval start_time; @@ -175,7 +165,7 @@ static struct timeval zero_time = { 0 , 0}; #ifndef USE_POLL -static fd_set zero_fd = { 0 }; +static fd_set zero_fd; #else #define X_BLOCK -1 #define X_DONT_BLOCK 0 @@ -234,7 +224,6 @@ { int ii; app->rebuild_fdlist = FALSE; -#ifndef AMOEBA #ifndef USE_POLL wf->nfds = app->fds.nfds; if( !ignoreInputs ) { @@ -249,26 +238,26 @@ FD_SET (ConnectionNumber(app->list[ii]), &wf->rmask); } #else -#ifdef POLLRDNORM -#define XPOLL_READ POLLIN|POLLRDNORM -#else -#define XPOLL_READ POLLIN +#ifndef POLLRDNORM +#define POLLRDNORM 0 #endif -#ifdef POLLWRNORM -#if (POLLWRNORM == POLLOUT) -#define XPOLL_WRITE POLLOUT -#else -#define XPOLL_WRITE POLLOUT|POLLWRNORM + +#ifndef POLLRDBAND +#define POLLRDBAND 0 #endif -#else -#define XPOLL_WRITE POLLOUT + +#ifndef POLLWRNORM +#define POLLWRNORM 0 #endif -#ifdef POLLRDBAND -#define XPOLL_EXCEPT POLLPRI|POLLRDBAND -#else -#define XPOLL_EXCEPT POLLPRI + +#ifndef POLLWRBAND +#define POLLWRBAND 0 #endif +#define XPOLL_READ (POLLIN|POLLRDNORM|POLLPRI|POLLRDBAND) +#define XPOLL_WRITE (POLLOUT|POLLWRNORM|POLLWRBAND) +#define XPOLL_EXCEPT 0 + if (!ignoreEvents) wf->fdlistlen = wf->num_dpys = app->count; else @@ -317,10 +306,6 @@ } } #endif -#else /* AMOEBA */ - DoIgnoreEvents = ignoreEvents; - DoIgnoreInputs = ignoreInputs; -#endif /* AMOEBA */ } static void AdjustTimes (app, block, howlong, ignoreTimers, wt) @@ -351,7 +336,6 @@ #endif } -#ifndef AMOEBA static int IoWait (wt, wf) wait_times_ptr_t wt; @@ -365,44 +349,7 @@ #endif } -#else /* AMOEBA */ -static int AppIoWait (app, wt, wf) - XtAppContext app; - wait_times_ptr_t wt; - wait_fds_ptr_t wf; -{ - /* Unfortunately we cannot use select() under Amoeba. We call - * _X11TransAmSelect to wait for the display to produce input - * or until the timer runs out. This has two disadvantages: - * - We cannot wait for multiple displays (we just wait for the - * first display). - * - We cannot wait for other file descriptors (there is no easy solution - * for this, but it seems that not too many applications need it). - * There is a workaround, however, in the form of XamSetSema and XamBlock, - * which allow you to wait for X events or other things. - */ - long timout; - int nfound; - - if (wt->wait_time_ptr != NULL) { - timout = wt->wait_time_ptr->tv_sec*1000 + - (wt->wait_time_ptr->tv_usec+999)/1000; - } else { - timout = -1; - } - if ((DoIgnoreEvents || app->count == 0) && timout >= 0) { - millisleep(timout); - nfound = 0; - } else { - nfound = _X11TransAmSelect(ConnectionNumber(app->list[0]), timout); - } - - return nfound; -} - -#endif /* AMOEBA */ - static void FindInputs (app, wf, nfds, ignoreEvents, ignoreInputs, dpy_no, found_input) XtAppContext app; wait_fds_ptr_t wf; @@ -415,7 +362,6 @@ XtInputMask condition; InputEvent *ep; int ii; -#ifndef AMOEBA #ifndef USE_POLL /* { check ready file descriptors block */ #ifdef XTHREADS fd_set rmask; @@ -549,26 +495,6 @@ } } #endif /* } */ -#else /* AMOEBA */ - int dd; - - *dpy_no = -1; - *found_input = False; - - for (ii = 0; ii < app->fds.nfds && nfds > 0; ii++) { - if (!ignoreEvents) { - for (dd = 0; dd < app->count; dd++) { - if (ii == ConnectionNumber (app->list[dd])) { - if (*dpy_no == -1) { - if (XEventsQueued (app->list[dd], QueuedAfterReading)) - *dpy_no = dd; - } - } - } - } - /* Inputs not implemented */ - } -#endif /* AMOEBA */ } /* @@ -706,11 +632,7 @@ RESTORE_APP_LOCK(app, level, &pushed_thread); } else #endif /* } */ -#ifndef AMOEBA nfds = IoWait (&wt, &wf); -#else - nfds = AppIoWait (app, &wt, &wf); -#endif if (nfds == -1) { /* * interrupt occured recalculate time value and wait again. @@ -1070,7 +992,6 @@ XtInputCallbackProc proc; XtPointer closure; { -#ifndef AMOEBA InputEvent* sptr; XtInputMask condition = (XtInputMask) Condition; @@ -1114,10 +1035,6 @@ app->rebuild_fdlist = TRUE; UNLOCK_APP(app); return((XtInputId)sptr); -#else /* AMOEBA */ - printf("XtAppAddInput not yet implemented\n"); - abort(); -#endif /* AMOEBA */ } void XtRemoveInput( id ) Index: xc/lib/Xt/Object.c diff -u xc/lib/Xt/Object.c:1.5 xc/lib/Xt/Object.c:1.6 --- xc/lib/Xt/Object.c:1.5 Wed Jan 17 14:43:06 2001 +++ xc/lib/Xt/Object.c Fri Dec 14 14:56:26 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Object.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: Object.c,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,7 +58,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/Object.c,v 1.5 2001/01/17 19:43:06 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Object.c,v 1.6 2001/12/14 19:56:26 dawes Exp $ */ #define OBJECT #include "IntrinsicI.h" Index: xc/lib/Xt/Object.h diff -u xc/lib/Xt/Object.h:1.1.1.3 xc/lib/Xt/Object.h:1.2 --- xc/lib/Xt/Object.h:1.1.1.3 Tue Jan 16 17:24:47 2001 +++ xc/lib/Xt/Object.h Fri Dec 14 14:56:26 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Object.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: Object.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /* $oHeader: Object.h,v 1.2 88/08/18 15:55:32 asente Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/ObjectP.h diff -u xc/lib/Xt/ObjectP.h:1.1.1.3 xc/lib/Xt/ObjectP.h:1.2 --- xc/lib/Xt/ObjectP.h:1.1.1.3 Tue Jan 16 17:24:48 2001 +++ xc/lib/Xt/ObjectP.h Fri Dec 14 14:56:27 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ObjectP.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: ObjectP.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/PassivGraI.h diff -u xc/lib/Xt/PassivGraI.h:1.1.1.3 xc/lib/Xt/PassivGraI.h:1.3 --- xc/lib/Xt/PassivGraI.h:1.1.1.3 Tue Jan 16 17:24:49 2001 +++ xc/lib/Xt/PassivGraI.h Fri Dec 14 14:56:27 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: PassivGraI.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ +* $Xorg: PassivGraI.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /******************************************************** @@ -30,7 +30,11 @@ Copyright 1987, 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -47,6 +51,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/PassivGraI.h,v 1.3 2001/12/14 19:56:27 dawes Exp $ */ #ifndef _PDI_h_ #define _PDI_h_ @@ -183,6 +188,12 @@ ); extern void _XtRegisterPassiveGrabs( +#if NeedFunctionPrototypes + Widget /* widget */ +#endif +); + +extern void _XtClearAncestorCache( #if NeedFunctionPrototypes Widget /* widget */ #endif Index: xc/lib/Xt/PassivGrab.c diff -u xc/lib/Xt/PassivGrab.c:3.4 xc/lib/Xt/PassivGrab.c:3.5 --- xc/lib/Xt/PassivGrab.c:3.4 Wed Jan 17 14:43:06 2001 +++ xc/lib/Xt/PassivGrab.c Fri Dec 14 14:56:27 2001 @@ -1,4 +1,4 @@ -/* $Xorg: PassivGrab.c,v 1.4 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: PassivGrab.c,v 1.5 2001/02/09 02:03:56 xorgcvs Exp $ */ /******************************************************** @@ -38,7 +38,11 @@ Copyright 1987, 1988, 1989, 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Pointer.c diff -u xc/lib/Xt/Pointer.c:1.1.1.3 xc/lib/Xt/Pointer.c:1.2 --- xc/lib/Xt/Pointer.c:1.1.1.3 Tue Jan 16 17:24:51 2001 +++ xc/lib/Xt/Pointer.c Fri Dec 14 14:56:27 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Pointer.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: Pointer.c,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /******************************************************** @@ -28,7 +28,11 @@ Copyright 1987, 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Popup.c diff -u xc/lib/Xt/Popup.c:1.1.1.4 xc/lib/Xt/Popup.c:1.2 --- xc/lib/Xt/Popup.c:1.1.1.4 Tue Jan 16 17:24:51 2001 +++ xc/lib/Xt/Popup.c Fri Dec 14 14:56:27 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Popup.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: Popup.c,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/PopupCB.c diff -u xc/lib/Xt/PopupCB.c:1.1.1.3 xc/lib/Xt/PopupCB.c:1.2 --- xc/lib/Xt/PopupCB.c:1.1.1.3 Tue Jan 16 17:24:52 2001 +++ xc/lib/Xt/PopupCB.c Fri Dec 14 14:56:27 2001 @@ -1,10 +1,14 @@ -/* $Xorg: PopupCB.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: PopupCB.c,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/RectObj.c diff -u xc/lib/Xt/RectObj.c:1.1.1.3 xc/lib/Xt/RectObj.c:1.3 --- xc/lib/Xt/RectObj.c:1.1.1.3 Tue Jan 16 17:24:53 2001 +++ xc/lib/Xt/RectObj.c Fri Dec 14 14:56:27 2001 @@ -1,10 +1,14 @@ -/* $Xorg: RectObj.c,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: RectObj.c,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,10 +46,13 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/RectObj.c,v 1.3 2001/12/14 19:56:27 dawes Exp $ */ #define RECTOBJ #include "IntrinsicI.h" #include "StringDefs.h" +#include "CreateI.h" + /****************************************************************** * * Rectangle Object Resources Index: xc/lib/Xt/RectObj.h diff -u xc/lib/Xt/RectObj.h:1.1.1.3 xc/lib/Xt/RectObj.h:1.2 --- xc/lib/Xt/RectObj.h:1.1.1.3 Tue Jan 16 17:24:54 2001 +++ xc/lib/Xt/RectObj.h Fri Dec 14 14:56:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: RectObj.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: RectObj.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /* $oHeader: RectObj.h,v 1.2 88/08/18 17:39:17 asente Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/RectObjP.h diff -u xc/lib/Xt/RectObjP.h:1.1.1.3 xc/lib/Xt/RectObjP.h:1.2 --- xc/lib/Xt/RectObjP.h:1.1.1.3 Tue Jan 16 17:24:55 2001 +++ xc/lib/Xt/RectObjP.h Fri Dec 14 14:56:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: RectObjP.h,v 1.3 2000/08/17 19:46:15 cpqbld Exp $ */ +/* $Xorg: RectObjP.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /* $oHeader: RectObjP.h,v 1.2 88/08/18 15:55:52 asente Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/ResConfig.c diff -u xc/lib/Xt/ResConfig.c:3.5 xc/lib/Xt/ResConfig.c:3.8 --- xc/lib/Xt/ResConfig.c:3.5 Wed Jan 17 14:43:06 2001 +++ xc/lib/Xt/ResConfig.c Fri Dec 14 14:56:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ResConfig.c,v 1.4 2000/08/17 19:46:16 cpqbld Exp $ */ +/* $Xorg: ResConfig.c,v 1.5 2001/02/09 02:03:56 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,6 +52,7 @@ Corporation. ******************************************************************/ +/* $XFree86: xc/lib/Xt/ResConfig.c,v 3.8 2001/12/14 19:56:28 dawes Exp $ */ #include "Intrinsic.h" #include "IntrinsicI.h" @@ -57,10 +62,8 @@ #include "StringDefs.h" #include "ResConfigP.h" #include - -#ifdef DEBUG #include -#endif +#include #define MAX_BUFFER 512 @@ -696,7 +699,7 @@ { Widget parent = w; char *last_part; - char *remainder; + char *remainder = NULL; char last_token; char *indx, *copy; char *loose, *tight; @@ -988,7 +991,7 @@ * resource and value fields. */ if (data) { - resource_len = Strtoul (data, &data_ptr, 10); + resource_len = Strtoul ((void *)data, &data_ptr, 10); data_ptr++; data_ptr[resource_len] = '\0'; Index: xc/lib/Xt/ResConfigP.h diff -u xc/lib/Xt/ResConfigP.h:3.4 xc/lib/Xt/ResConfigP.h:3.7 --- xc/lib/Xt/ResConfigP.h:3.4 Wed Jan 17 14:43:07 2001 +++ xc/lib/Xt/ResConfigP.h Thu Dec 20 14:40:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ResConfigP.h,v 1.4 2000/08/17 19:46:16 cpqbld Exp $ */ +/* $Xorg: ResConfigP.h,v 1.5 2001/02/09 02:03:56 xorgcvs Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,10 +52,15 @@ Corporation. ******************************************************************/ +/* $XFree86: xc/lib/Xt/ResConfigP.h,v 3.7 2001/12/20 19:40:59 tsi Exp $ */ #ifndef _RESCONFIGP_H #define _RESCONFIGP_H +#include + +_XFUNCPROTOBEGIN + /* * Atom names for resource configuration management customization tool. */ @@ -65,5 +74,7 @@ XEvent * /* event */ #endif ); + +_XFUNCPROTOEND #endif Index: xc/lib/Xt/ResourceI.h diff -u xc/lib/Xt/ResourceI.h:1.1.1.3 xc/lib/Xt/ResourceI.h:1.5 --- xc/lib/Xt/ResourceI.h:1.1.1.3 Tue Jan 16 17:24:58 2001 +++ xc/lib/Xt/ResourceI.h Fri Dec 14 14:56:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ResourceI.h,v 1.3 2000/08/17 19:46:16 cpqbld Exp $ */ +/* $Xorg: ResourceI.h,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,6 +46,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/ResourceI.h,v 1.5 2001/12/14 19:56:28 dawes Exp $ */ /**************************************************************** * @@ -49,6 +54,9 @@ * ****************************************************************/ +#ifndef _XtresourceI_h +#define _XtresourceI_h + #define StringToQuark(string) XrmStringToQuark(string) #define StringToName(string) XrmStringToName(string) #define StringToClass(string) XrmStringToClass(string) @@ -82,3 +90,12 @@ XrmValue* /* value */ #endif ); + +extern void _XtCopyToArg(char *src, XtArgVal *dst, unsigned int size); +extern void _XtCopyFromArg(XtArgVal src, char *dst, unsigned int size); +extern XrmResourceList* _XtCreateIndirectionTable(XtResourceList resources, + Cardinal num_resources); +extern void _XtResourceListInitialize(void); + + +#endif /* _XtresourceI_h */ Index: xc/lib/Xt/Resources.c diff -u xc/lib/Xt/Resources.c:1.7 xc/lib/Xt/Resources.c:1.9 --- xc/lib/Xt/Resources.c:1.7 Wed Jan 17 14:43:07 2001 +++ xc/lib/Xt/Resources.c Fri Dec 14 14:56:28 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Resources.c,v 1.3 2000/08/17 19:46:16 cpqbld Exp $ */ +/* $Xorg: Resources.c,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -55,7 +59,7 @@ */ -/* $XFree86: xc/lib/Xt/Resources.c,v 1.7 2001/01/17 19:43:07 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Resources.c,v 1.9 2001/12/14 19:56:28 dawes Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" @@ -368,12 +372,8 @@ xrmres->xrm_name = PSToQ(resources->resource_name); xrmres->xrm_class = PSToQ(resources->resource_class); xrmres->xrm_type = PSToQ(resources->resource_type); -#if defined(CRAY1) && !defined(__STDC__) - xrmres->xrm_offset = -(resources->resource_offset * sizeof(long) + 1); -#else xrmres->xrm_offset = (Cardinal) (-(int)resources->resource_offset - 1); -#endif xrmres->xrm_default_type = PSToQ(resources->default_type); } #undef PSToQ @@ -393,12 +393,8 @@ xrmres->xrm_name = StringToName(resources->resource_name); xrmres->xrm_class = StringToClass(resources->resource_class); xrmres->xrm_type = StringToQuark(resources->resource_type); -#if defined(CRAY1) && !defined(__STDC__) - xrmres->xrm_offset = -(resources->resource_offset * sizeof(long) + 1); -#else xrmres->xrm_offset = (Cardinal) (-(int)resources->resource_offset - 1); -#endif xrmres->xrm_default_type = StringToQuark(resources->default_type); } #undef xrmres Index: xc/lib/Xt/Selection.c diff -u xc/lib/Xt/Selection.c:3.6 xc/lib/Xt/Selection.c:3.9 --- xc/lib/Xt/Selection.c:3.6 Wed Jan 17 14:43:08 2001 +++ xc/lib/Xt/Selection.c Fri Dec 14 14:56:29 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Selection.c,v 1.3 2000/08/17 19:46:16 cpqbld Exp $ */ +/* $Xorg: Selection.c,v 1.4 2001/02/09 02:03:56 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,11 +58,13 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Selection.c,v 3.9 2001/12/14 19:56:29 dawes Exp $ */ #include "IntrinsicI.h" #include "StringDefs.h" #include "SelectionI.h" #include +#include void _XtSetDefaultSelectionTimeout(timeout) unsigned long *timeout; @@ -610,13 +616,14 @@ XtRemoveTimeOut(req->timeout); #endif if (req->allSent) { - if (ctx->notify) + if (ctx->notify) { if (ctx->incremental) { (*(XtSelectionDoneIncrProc)ctx->notify) (ctx->widget, &ctx->selection, &req->target, (XtRequestId*)&req, ctx->owner_closure); } else (*ctx->notify)(ctx->widget, &ctx->selection, &req->target); + } RemoveHandler(req, (EventMask)PropertyChangeMask, HandlePropertyGone, closure); XtFree((char*)req); Index: xc/lib/Xt/SelectionI.h diff -u xc/lib/Xt/SelectionI.h:1.1.1.3 xc/lib/Xt/SelectionI.h:1.2 --- xc/lib/Xt/SelectionI.h:1.1.1.3 Tue Jan 16 17:25:01 2001 +++ xc/lib/Xt/SelectionI.h Fri Dec 14 14:56:29 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SelectionI.h,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ +/* $Xorg: SelectionI.h,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/SetSens.c diff -u xc/lib/Xt/SetSens.c:1.1.1.3 xc/lib/Xt/SetSens.c:1.3 --- xc/lib/Xt/SetSens.c:1.1.1.3 Tue Jan 16 17:25:01 2001 +++ xc/lib/Xt/SetSens.c Fri Dec 14 14:56:29 2001 @@ -1,4 +1,4 @@ -/* $Xorg: SetSens.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ +/* $Xorg: SetSens.c,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/SetSens.c,v 1.3 2001/12/14 19:56:29 dawes Exp $ */ #include "IntrinsicI.h" #include "StringDefs.h" @@ -62,9 +67,9 @@ * XtSetSensitive() */ -static void SetAncestorSensitive(widget, ancestor_sensitive) - register Widget widget; - Boolean ancestor_sensitive; +static void SetAncestorSensitive( + register Widget widget, + Boolean ancestor_sensitive) { Arg args[1]; register Cardinal i; Index: xc/lib/Xt/SetValues.c diff -u xc/lib/Xt/SetValues.c:1.1.1.5 xc/lib/Xt/SetValues.c:1.3 --- xc/lib/Xt/SetValues.c:1.1.1.5 Tue Jan 16 17:25:03 2001 +++ xc/lib/Xt/SetValues.c Fri Dec 14 14:56:30 2001 @@ -1,4 +1,4 @@ -/* $Xorg: SetValues.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ +/* $Xorg: SetValues.c,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/SetValues.c,v 1.3 2001/12/14 19:56:30 dawes Exp $ */ #include "IntrinsicI.h" @@ -62,15 +67,12 @@ */ -extern void _XtCopyFromArg(); -extern XrmResourceList* _XtCreateIndirectionTable(); - -static void SetValues(base, res, num_resources, args, num_args) - char* base; /* Base address to write values to */ - XrmResourceList* res; /* The current resource values. */ - register Cardinal num_resources; /* number of items in resources */ - ArgList args; /* The resource values to set */ - Cardinal num_args; /* number of items in arg list */ +static void SetValues( + char* base, /* Base address to write values to */ + XrmResourceList* res, /* The current resource values. */ + register Cardinal num_resources, /* number of items in resources */ + ArgList args, /* The resource values to set */ + Cardinal num_args) /* number of items in arg list */ { register ArgList arg; register int i; @@ -93,11 +95,13 @@ } } /* SetValues */ -static Boolean CallSetValues (class, current, request, new, args, num_args) - WidgetClass class; - Widget current, request, new; - ArgList args; - Cardinal num_args; +static Boolean CallSetValues ( + WidgetClass class, + Widget current, + Widget request, + Widget new, + ArgList args, + Cardinal num_args) { Boolean redisplay = FALSE; WidgetClass superclass; @@ -126,11 +130,13 @@ } static Boolean -CallConstraintSetValues (class, current, request, new, args, num_args) - ConstraintWidgetClass class; - Widget current, request, new; - ArgList args; - Cardinal num_args; +CallConstraintSetValues ( + ConstraintWidgetClass class, + Widget current, + Widget request, + Widget new, + ArgList args, + Cardinal num_args) { Boolean redisplay = FALSE; XtSetValuesFunc set_values; @@ -185,7 +191,7 @@ XtGeometryResult result; XtWidgetGeometry geoReq, geoReply; WidgetClass wc; - ConstraintWidgetClass cwc; + ConstraintWidgetClass cwc = 0; Boolean hasConstraints; XtAlmostProc set_values_almost; XtAppContext app = XtWidgetToApplicationContext(w); Index: xc/lib/Xt/SetWMCW.c diff -u xc/lib/Xt/SetWMCW.c:1.4 xc/lib/Xt/SetWMCW.c:1.5 --- xc/lib/Xt/SetWMCW.c:1.4 Wed Jan 17 14:43:08 2001 +++ xc/lib/Xt/SetWMCW.c Fri Dec 14 14:56:30 2001 @@ -1,4 +1,4 @@ -/* $Xorg: SetWMCW.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ +/* $Xorg: SetWMCW.c,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /* * Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. @@ -19,7 +19,11 @@ Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Shell.c diff -u xc/lib/Xt/Shell.c:3.9 xc/lib/Xt/Shell.c:3.15 --- xc/lib/Xt/Shell.c:3.9 Wed Jan 17 14:43:09 2001 +++ xc/lib/Xt/Shell.c Fri Dec 14 14:56:30 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Shell.c,v 1.3 2000/08/17 19:46:17 cpqbld Exp $ */ +/* $Xorg: Shell.c,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Shell.c,v 3.9 2001/01/17 19:43:09 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Shell.c,v 3.15 2001/12/14 19:56:30 dawes Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,12 +70,14 @@ #include "StringDefs.h" #include "Shell.h" #include "ShellP.h" +#include "ShellI.h" #include "Vendor.h" #include "VendorP.h" #include #include #include #include +#include #ifdef EDITRES #include @@ -1084,8 +1090,6 @@ #define XtRestartStyleHintMask (1L<<7) #define XtShutdownCommandMask (1L<<8) -extern char *getenv(); - static void JoinSession(); static void SetSessionProperties(); static void StopManagingSession(); @@ -1930,7 +1934,7 @@ return FALSE; } -static _wait_for_response(w, event, request_num) +static Boolean _wait_for_response(w, event, request_num) ShellWidget w; XEvent *event; unsigned long request_num; @@ -1982,7 +1986,7 @@ unsigned int mask = request->request_mode; XEvent event; Boolean wm; - register struct _OldXSizeHints *hintp; + register struct _OldXSizeHints *hintp = NULL; int oldx, oldy, oldwidth, oldheight, oldborder_width; unsigned long request_num; @@ -2252,13 +2256,14 @@ if (! (ow->shell.client_specified & _XtShellPositionValid)) { Cardinal n; - void _XtShellGetCoordinates(); for (n = *num_args; n; n--, args++) { if (strcmp(XtNx, args->name) == 0) { - _XtShellGetCoordinates(ow, &ow->core.x, &ow->core.y); + _XtShellGetCoordinates((Widget)ow, &ow->core.x, + &ow->core.y); } else if (strcmp(XtNy, args->name) == 0) { - _XtShellGetCoordinates(ow, &ow->core.x, &ow->core.y); + _XtShellGetCoordinates((Widget)ow, &ow->core.x, + &ow->core.y); } } } @@ -2690,7 +2695,6 @@ Cardinal* num_args; { ShellWidget w = (ShellWidget) widget; - extern void _XtCopyToArg(); /* x and y resource values may be invalid after a shell resize */ if (XtIsRealized(widget) && @@ -2740,13 +2744,6 @@ #define XtSessionCheckpoint 0 #define XtSessionInteract 1 -extern String _XtGetUserName( -#if NeedFunctionPrototypes - String /* dest_dir */, - int /* len */ -#endif -); - static void CallSaveCallbacks(); static String *EditCommand(); static Boolean ExamineToken(); @@ -3010,7 +3007,7 @@ user_name = _XtGetUserName(nam_buf, sizeof nam_buf); if (user_name) props[num_props++] = ArrayPack(SmUserID, &user_name); - sprintf(pid, "%d", getpid()); + sprintf(pid, "%ld", (long)getpid()); props[num_props++] = ArrayPack(SmProcessID, &pidp); if (num_props) { @@ -3050,10 +3047,6 @@ SessionShellWidget w = (SessionShellWidget) client_data; IceProcessMessagesStatus status; -#ifdef MINIX - if (!MNX_IceMessagesAvailable(SmcGetIceConnection(w->session.connection))) - return; -#endif status = IceProcessMessages(SmcGetIceConnection(w->session.connection), NULL, NULL); Index: xc/lib/Xt/ShellI.h diff -u /dev/null xc/lib/Xt/ShellI.h:1.1 --- /dev/null Fri Jan 18 15:23:34 2002 +++ xc/lib/Xt/ShellI.h Fri Aug 17 22:41:29 2001 @@ -0,0 +1,12 @@ +/* $XFree86: xc/lib/Xt/ShellI.h,v 1.1 2001/08/18 02:41:29 dawes Exp $ */ + +#ifndef _XtShellInternal_h +#define _XtShellInternal_h + +#include + +_XFUNCPROTOBEGIN + +extern void _XtShellGetCoordinates(Widget widget, Position *x, Position *y); + +#endif /* _XtShellInternal_h */ Index: xc/lib/Xt/ShellP.h diff -u xc/lib/Xt/ShellP.h:1.1.1.3 xc/lib/Xt/ShellP.h:1.2 --- xc/lib/Xt/ShellP.h:1.1.1.3 Tue Jan 16 17:25:08 2001 +++ xc/lib/Xt/ShellP.h Fri Dec 14 14:56:30 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ShellP.h,v 1.3 2000/08/17 19:46:18 cpqbld Exp $ */ +/* $Xorg: ShellP.h,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/TMaction.c diff -u xc/lib/Xt/TMaction.c:3.5 xc/lib/Xt/TMaction.c:3.7 --- xc/lib/Xt/TMaction.c:3.5 Wed Jan 17 14:43:09 2001 +++ xc/lib/Xt/TMaction.c Fri Dec 14 14:56:30 2001 @@ -1,4 +1,4 @@ -/* $Xorg: TMaction.c,v 1.4 2000/08/17 19:46:18 cpqbld Exp $ */ +/* $Xorg: TMaction.c,v 1.5 2001/02/09 02:03:58 xorgcvs Exp $ */ /*LINTLIBRARY*/ /*********************************************************** @@ -38,7 +38,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -55,6 +59,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/TMaction.c,v 3.7 2001/12/14 19:56:30 dawes Exp $ */ /* TMaction.c -- maintains the state table of actions for the translation * manager. @@ -588,8 +593,8 @@ int globalUnbound = 0; Cardinal i; TMBindData bindData = (TMBindData)tm->proc_table; - TMSimpleBindProcs simpleBindProcs; - TMComplexBindProcs complexBindProcs; + TMSimpleBindProcs simpleBindProcs = NULL; + TMComplexBindProcs complexBindProcs = NULL; XtActionProc *newProcs; Widget bindWidget; Index: xc/lib/Xt/TMgrab.c diff -u xc/lib/Xt/TMgrab.c:1.1.1.3 xc/lib/Xt/TMgrab.c:1.3 --- xc/lib/Xt/TMgrab.c:1.1.1.3 Tue Jan 16 17:25:11 2001 +++ xc/lib/Xt/TMgrab.c Fri Dec 14 14:56:30 2001 @@ -1,4 +1,4 @@ -/* $Xorg: TMgrab.c,v 1.3 2000/08/17 19:46:18 cpqbld Exp $ */ +/* $Xorg: TMgrab.c,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/TMgrab.c,v 1.3 2001/12/14 19:56:30 dawes Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" @@ -68,11 +73,11 @@ static GrabActionRec *grabActionList = NULL; -static void GrabAllCorrectKeys(widget, typeMatch, modMatch, grabP) - Widget widget; - TMTypeMatch typeMatch; - TMModifierMatch modMatch; - GrabActionRec* grabP; +static void GrabAllCorrectKeys( + Widget widget, + TMTypeMatch typeMatch, + TMModifierMatch modMatch, + GrabActionRec* grabP) { Display *dpy = XtDisplay(widget); KeyCode *keycodes, *keycodeP; @@ -152,9 +157,9 @@ GrabActionRec *grabP; }DoGrabRec; -static Boolean DoGrab(state, data) - StatePtr state; - XtPointer data; +static Boolean DoGrab( + StatePtr state, + XtPointer data) { DoGrabRec *doGrabP = (DoGrabRec *)data; GrabActionRec* grabP = doGrabP->grabP; Index: xc/lib/Xt/TMkey.c diff -u xc/lib/Xt/TMkey.c:3.6 xc/lib/Xt/TMkey.c:3.10 --- xc/lib/Xt/TMkey.c:3.6 Wed Jan 17 14:43:10 2001 +++ xc/lib/Xt/TMkey.c Fri Dec 14 14:56:30 2001 @@ -1,4 +1,4 @@ -/* $Xorg: TMkey.c,v 1.3 2000/08/17 19:46:18 cpqbld Exp $ */ +/* $Xorg: TMkey.c,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*LINTLIBRARY*/ /*********************************************************** @@ -38,7 +38,11 @@ Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -55,6 +59,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/TMkey.c,v 3.10 2001/12/14 19:56:30 dawes Exp $ */ #define XK_MISCELLANY #define XK_LATIN1 @@ -64,11 +69,8 @@ #include "IntrinsicI.h" #include - -#ifdef __STDC__ -#define Const const -#else -#define Const /**/ +#ifdef XKB +#include #endif #define FLUSHKEYCACHE(ctx) \ @@ -82,7 +84,7 @@ */ #define FM(i) i >> (8 - TMKEYCACHELOG2) -static Const unsigned char modmix[256] = { +static const unsigned char modmix[256] = { FM(0x0f), FM(0x8f), FM(0x4f), FM(0xcf), FM(0x2f), FM(0xaf), FM(0x6f), FM(0xef), FM(0x1f), FM(0x9f), FM(0x5f), FM(0xdf), FM(0x3f), FM(0xbf), FM(0x7f), FM(0xff), FM(0x07), FM(0x87), FM(0x47), FM(0xc7), FM(0x27), FM(0xa7), FM(0x67), FM(0xe7), @@ -215,8 +217,7 @@ pd->tm_context = ctx; } -static unsigned int num_bits(mask) - unsigned long mask; +static unsigned int num_bits(unsigned long mask) { register unsigned long y; @@ -597,9 +598,7 @@ } #else { - XkbLookupKeySym(dpy, keycode, modifiers, modifiers_return, - keysym_return); - return; + XkbLookupKeySym(dpy, keycode, modifiers, modifiers_return, keysym_return); } #endif @@ -688,7 +687,7 @@ KeySym lsym, usym; unsigned maxcodes = 0; unsigned ncodes = 0; - KeyCode *keycodes, *codeP; + KeyCode *keycodes, *codeP = NULL; DPY_TO_APPCON(dpy); LOCK_APP(app); Index: xc/lib/Xt/TMparse.c diff -u xc/lib/Xt/TMparse.c:3.5 xc/lib/Xt/TMparse.c:3.8 --- xc/lib/Xt/TMparse.c:3.5 Wed Jan 17 14:43:10 2001 +++ xc/lib/Xt/TMparse.c Fri Dec 14 14:56:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: TMparse.c,v 1.5 2000/08/17 19:46:18 cpqbld Exp $ */ +/* $Xorg: TMparse.c,v 1.6 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/TMparse.c,v 3.5 2001/01/17 19:43:10 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMparse.c,v 3.8 2001/12/14 19:56:31 dawes Exp $ */ /* Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -59,6 +63,7 @@ #include "IntrinsicI.h" #include "StringDefs.h" #include +#include #ifndef NOTASCII #define XK_LATIN1 #endif @@ -1236,7 +1241,7 @@ ActionPtr **actionsP; { EventRec upEventRec; - register EventPtr event, downEvent, lastDownEvent; + register EventPtr event, downEvent, lastDownEvent = NULL; EventPtr upEvent = &upEventRec; register int i; @@ -1342,7 +1347,7 @@ ActionPtr **actionsP; { EventRec upEventRec; - register EventPtr event, downEvent, lastUpEvent; + register EventPtr event, downEvent, lastUpEvent = NULL; EventPtr upEvent = &upEventRec; register int i; Index: xc/lib/Xt/TMprint.c diff -u xc/lib/Xt/TMprint.c:1.4 xc/lib/Xt/TMprint.c:1.6 --- xc/lib/Xt/TMprint.c:1.4 Wed Jan 17 14:43:11 2001 +++ xc/lib/Xt/TMprint.c Fri Dec 14 14:56:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: TMprint.c,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ +/* $Xorg: TMprint.c,v 1.4 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts @@ -37,7 +37,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -54,6 +58,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/TMprint.c,v 1.6 2001/12/14 19:56:31 dawes Exp $ */ /*LINTLIBRARY*/ #include "IntrinsicI.h" @@ -192,7 +197,7 @@ if (mask != 0) { if (mask != (unsigned long)~0L) (void) sprintf(sb->current, "0x%lx:0x%lx", mask, code); - else (void) sprintf(sb->current, /*"0x%lx"*/ "%d", code); + else (void) sprintf(sb->current, /*"0x%lx"*/ "%d", (unsigned)code); sb->current += strlen(sb->current); } } Index: xc/lib/Xt/TMstate.c diff -u xc/lib/Xt/TMstate.c:1.5 xc/lib/Xt/TMstate.c:1.8 --- xc/lib/Xt/TMstate.c:1.5 Wed Jan 17 14:43:11 2001 +++ xc/lib/Xt/TMstate.c Fri Dec 14 14:56:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: TMstate.c,v 1.4 2000/08/17 19:46:19 cpqbld Exp $ */ +/* $Xorg: TMstate.c,v 1.6 2001/02/09 02:03:58 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, @@ -32,13 +32,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/TMstate.c,v 1.5 2001/01/17 19:43:11 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/TMstate.c,v 1.8 2001/12/14 19:56:31 dawes Exp $ */ /* Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -239,7 +243,7 @@ TMShortCard i, j = TM_TYPE_SEGMENT_SIZE; TMShortCard typeIndex = 0; TMTypeMatch typeMatch; - TMTypeMatch segment; + TMTypeMatch segment = NULL; LOCK_PROCESS; for (i = 0; i < _XtGlobalTM.numTypeMatchSegments; i++) { @@ -322,7 +326,7 @@ TMShortCard i, j = TM_MOD_SEGMENT_SIZE; TMShortCard modIndex = 0; TMModifierMatch modMatch; - TMModifierMatch segment; + TMModifierMatch segment = NULL; LOCK_PROCESS; for (i = 0; i < _XtGlobalTM.numModMatchSegments; i++) { @@ -765,12 +769,12 @@ TMSimpleStateTree stateTree; TMContext *contextPtr = GetContextPtr(tmRecPtr); TMShortCard i; - ActionRec *actions; + ActionRec *actions = NULL; Boolean matchExact = False; Boolean match = False; StatePtr complexMatchState = NULL; int currIndex; - TMShortCard typeIndex, modIndex; + TMShortCard typeIndex = 0, modIndex = 0; int matchTreeIndex = TM_NO_MATCH; LOCK_PROCESS; @@ -991,7 +995,7 @@ { XtTranslations xlations = tmRecPtr->translations; TMContext *contextPtr = GetContextPtr(tmRecPtr); - TMShortCard i, matchTreeIndex; + TMShortCard i, matchTreeIndex = 0; StatePtr matchState = NULL, candState; TMComplexStateTree *stateTreePtr = (TMComplexStateTree *)&xlations->stateTreeTbl[0]; @@ -1713,10 +1717,16 @@ UNLOCK_PROCESS; return NULL; } - UNLOCK_PROCESS; + UNLOCK_PROCESS; + +#ifndef REFCNT_TRANSLATIONS + if (cache_ref) XtAddCallback(dest, XtNdestroyCallback, XtCallbackReleaseCacheRef, (XtPointer)cache_ref); + +#endif + return newTable; } @@ -1805,7 +1815,7 @@ Widget source; TMShortCard *numNewRtn; { - XtTranslations newTable, xlations; + XtTranslations newTable = NULL, xlations; TMComplexBindProcs bindings; TMShortCard i, j; TMStateTree *treePtr; @@ -1926,10 +1936,10 @@ { XtTranslations newTable, oldXlations; XtTranslations accNewXlations; - EventMask oldMask; + EventMask oldMask = 0; TMBindData bindData; TMComplexBindProcs oldBindings = NULL; - TMShortCard numOldBindings, numNewBindings = 0, numBytes; + TMShortCard numOldBindings = 0, numNewBindings = 0, numBytes; TMComplexBindProcsRec stackBindings[16], *newBindings; /* Index: xc/lib/Xt/Threads.c diff -u xc/lib/Xt/Threads.c:3.4 xc/lib/Xt/Threads.c:3.6 --- xc/lib/Xt/Threads.c:3.4 Wed Jan 17 14:43:11 2001 +++ xc/lib/Xt/Threads.c Fri Dec 14 14:56:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Threads.c,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ +/* $Xorg: Threads.c,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /************************************************************ Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. @@ -32,7 +32,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -49,6 +53,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Threads.c,v 3.6 2001/12/14 19:56:31 dawes Exp $ */ #include "IntrinsicI.h" @@ -89,7 +94,7 @@ static LockPtr process_lock = NULL; static void -InitProcessLock() +InitProcessLock(void) { if(!process_lock) { process_lock = XtNew(LockRec); @@ -105,7 +110,7 @@ } static void -ProcessLock() +ProcessLock(void) { #ifdef _XMUTEX_NESTS xmutex_lock(process_lock->mutex); @@ -137,7 +142,7 @@ } static void -ProcessUnlock() +ProcessUnlock(void) { #ifdef _XMUTEX_NESTS process_lock->level--; @@ -209,7 +214,9 @@ app_lock->level--; xmutex_unlock(app_lock->mutex); #else - xthread_t self = xthread_self(); + xthread_t self; + + self = xthread_self(); xmutex_lock(app_lock->mutex); assert(xthread_equal(app_lock->holder, self)); if (app_lock->level != 0) { Index: xc/lib/Xt/ThreadsI.h diff -u xc/lib/Xt/ThreadsI.h:3.2 xc/lib/Xt/ThreadsI.h:3.5 --- xc/lib/Xt/ThreadsI.h:3.2 Wed Jan 17 14:43:12 2001 +++ xc/lib/Xt/ThreadsI.h Fri Dec 14 14:56:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: ThreadsI.h,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ +/* $Xorg: ThreadsI.h,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /************************************************************ Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. @@ -32,7 +32,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -49,6 +53,11 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/ThreadsI.h,v 3.5 2001/12/14 19:56:31 dawes Exp $ */ + +#ifndef _XtThreadsI_h +#define _XtThreadsI_h + #ifdef XTHREADS typedef struct _LockRec *LockPtr; @@ -128,3 +137,4 @@ #define DPY_TO_APPCON(d) #endif /* !defined(XTHREADS) */ +#endif /* _XtThreadsI_h */ Index: xc/lib/Xt/TranslateI.h diff -u xc/lib/Xt/TranslateI.h:1.1.1.3 xc/lib/Xt/TranslateI.h:1.3 --- xc/lib/Xt/TranslateI.h:1.1.1.3 Tue Jan 16 17:25:20 2001 +++ xc/lib/Xt/TranslateI.h Fri Dec 14 14:56:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: TranslateI.h,v 1.3 2000/08/17 19:46:19 cpqbld Exp $ */ +/* $Xorg: TranslateI.h,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,6 +46,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/TranslateI.h,v 1.3 2001/12/14 19:56:32 dawes Exp $ */ /* * TranslateI.h - Header file private to translation management @@ -66,8 +71,13 @@ typedef unsigned long TMLongCard; typedef short TMShortInt; -typedef Boolean (*MatchProc)(); - /* Event *parsed, TMEventPtr incoming */ +typedef struct _TMTypeMatchRec *TMTypeMatch; +typedef struct _TMModifierMatchRec *TMModifierMatch; +typedef struct _TMEventRec *TMEventPtr; + +typedef Boolean (*MatchProc)(TMTypeMatch typeMatch, + TMModifierMatch modMatch, + TMEventPtr eventSeq); typedef struct _ModToKeysymTable { Modifiers mask; @@ -118,14 +128,14 @@ TMLongCard modifierMask; LateBindingsPtr lateModifiers; Boolean standard; -}TMModifierMatchRec, *TMModifierMatch; +}TMModifierMatchRec; typedef struct _TMTypeMatchRec{ TMLongCard eventType; TMLongCard eventCode; TMLongCard eventCodeMask; MatchProc matchEvent; -}TMTypeMatchRec, *TMTypeMatch; +}TMTypeMatchRec; typedef struct _TMBranchHeadRec { unsigned int isSimple:1; @@ -280,7 +290,7 @@ typedef struct _TMEventRec { XEvent *xev; Event event; -}TMEventRec,*TMEventPtr; +}TMEventRec; typedef struct _ActionHookRec { struct _ActionHookRec* next; /* must remain first */ @@ -442,8 +452,17 @@ #endif ); -extern void _XtBuildKeysymTables(); +#include "CallbackI.h" +#include "EventI.h" +#include "HookObjI.h" +#include "PassivGraI.h" +#include "ThreadsI.h" +#include "InitialI.h" +#include "ResourceI.h" +#include "StringDefs.h" +extern void _XtBuildKeysymTables(Display *dpy, XtPerDisplay pd); + #ifndef NO_MIT_HACKS extern void _XtDisplayTranslations( #if NeedFunctionPrototypes @@ -649,3 +668,7 @@ XtTranslations /* xlations */ #endif ); + +/* TMKey.c */ +extern void _XtAllocTMContext(XtPerDisplay pd); + Index: xc/lib/Xt/VarCreate.c diff -u xc/lib/Xt/VarCreate.c:3.3 xc/lib/Xt/VarCreate.c:3.7 --- xc/lib/Xt/VarCreate.c:3.3 Wed Jan 17 14:43:12 2001 +++ xc/lib/Xt/VarCreate.c Fri Dec 14 14:56:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: VarCreate.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ +/* $Xorg: VarCreate.c,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /* @@ -31,7 +31,11 @@ Copyright 1885, 1986, 1987, 1988, 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,27 +52,25 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/VarCreate.c,v 3.7 2001/12/14 19:56:32 dawes Exp $ */ #include "IntrinsicI.h" #include "StringDefs.h" #include "Shell.h" #include "VarargsI.h" +#include "CreateI.h" #if (defined(SUNSHLIB) || defined(AIXSHLIB)) && defined(SHAREDCODE) #define XtToolkitInitialize _XtToolkitInitialize #endif /* (SUNSHLIB || AIXSHLIB) && SHAREDCODE */ -extern Widget _XtCreateWidget(); -extern Widget _XtAppCreateShell(); -extern Widget _XtCreatePopupShell(); - static Widget -_XtVaCreateWidget(name, widget_class, parent, var, count) - String name; - WidgetClass widget_class; - Widget parent; - va_list var; - int count; +_XtVaCreateWidget( + String name, + WidgetClass widget_class, + Widget parent, + va_list var, + int count) { register Widget widget; XtTypedArgList typed_args = NULL; @@ -87,21 +89,12 @@ } -#if NeedVarargsPrototypes Widget XtVaCreateWidget( _Xconst char* name, WidgetClass widget_class, Widget parent, ...) -#else -/*VARARGS3*/ -Widget XtVaCreateWidget(name, widget_class, parent, va_alist) - String name; - WidgetClass widget_class; - Widget parent; - va_dcl -#endif { va_list var; register Widget widget; @@ -109,33 +102,25 @@ WIDGET_TO_APPCON(parent); LOCK_APP(app); - Va_start(var,parent); + va_start(var,parent); _XtCountVaList(var, &total_count, &typed_count); va_end(var); - Va_start(var,parent); - widget = _XtVaCreateWidget(name, widget_class, parent, var, total_count); + va_start(var,parent); + widget = _XtVaCreateWidget((String)name, widget_class, parent, var, + total_count); va_end(var); UNLOCK_APP(app); return widget; } -#if NeedVarargsPrototypes Widget XtVaCreateManagedWidget( _Xconst char* name, WidgetClass widget_class, Widget parent, ...) -#else -/*VARARGS3*/ -Widget XtVaCreateManagedWidget(name, widget_class, parent, va_alist) - String name; - WidgetClass widget_class; - Widget parent; - va_dcl -#endif { va_list var; register Widget widget; @@ -143,12 +128,13 @@ WIDGET_TO_APPCON(parent); LOCK_APP(app); - Va_start(var,parent); + va_start(var,parent); _XtCountVaList(var, &total_count, &typed_count); va_end(var); - Va_start(var,parent); - widget = _XtVaCreateWidget(name, widget_class, parent, var, total_count); + va_start(var,parent); + widget = _XtVaCreateWidget((String)name, widget_class, parent, var, + total_count); XtManageChild(widget); va_end(var); UNLOCK_APP(app); @@ -156,7 +142,6 @@ } -#if NeedVarargsPrototypes Widget XtVaAppCreateShell( _Xconst char* name, @@ -164,15 +149,6 @@ WidgetClass widget_class, Display* display, ...) -#else -/*VARARGS4*/ -Widget XtVaAppCreateShell(name, class, widget_class, display, va_alist) - String name; - String class; - WidgetClass widget_class; - Display* display; - va_dcl -#endif { va_list var; register Widget widget; @@ -182,15 +158,15 @@ DPY_TO_APPCON(display); LOCK_APP(app); - Va_start(var,display); + va_start(var,display); _XtCountVaList(var, &total_count, &typed_count); va_end(var); - Va_start(var,display); + va_start(var,display); _XtVaToTypedArgList(var, total_count, &typed_args, &num_args); - widget = _XtAppCreateShell(name, class, widget_class, display, - (ArgList)NULL, (Cardinal)0, typed_args, num_args); + widget = _XtAppCreateShell((String)name, (String)class, widget_class, + display, (ArgList)NULL, (Cardinal)0, typed_args, num_args); if (typed_args != NULL) { XtFree((XtPointer)typed_args); } @@ -201,21 +177,12 @@ } -#if NeedVarargsPrototypes Widget XtVaCreatePopupShell( _Xconst char* name, WidgetClass widget_class, Widget parent, ...) -#else -/*VARARGS3*/ -Widget XtVaCreatePopupShell(name, widget_class, parent, va_alist) - String name; - WidgetClass widget_class; - Widget parent; - va_dcl -#endif { va_list var; register Widget widget; @@ -225,14 +192,14 @@ WIDGET_TO_APPCON(parent); LOCK_APP(app); - Va_start(var,parent); + va_start(var,parent); _XtCountVaList(var, &total_count, &typed_count); va_end(var); - Va_start(var,parent); + va_start(var,parent); _XtVaToTypedArgList(var, total_count, &typed_args, &num_args); - widget = _XtCreatePopupShell(name, widget_class, parent, + widget = _XtCreatePopupShell((String)name, widget_class, parent, (ArgList)NULL, (Cardinal)0, typed_args, num_args); if (typed_args != NULL) { XtFree((XtPointer)typed_args); @@ -243,15 +210,8 @@ return widget; } -#if NeedVarargsPrototypes void XtVaSetValues(Widget widget, ...) -#else -/*VARARGS1*/ -void XtVaSetValues(widget, va_alist) - Widget widget; - va_dcl -#endif { va_list var; ArgList args = NULL; @@ -260,11 +220,11 @@ WIDGET_TO_APPCON(widget); LOCK_APP(app); - Va_start(var,widget); + va_start(var,widget); _XtCountVaList(var, &total_count, &typed_count); va_end(var); - Va_start(var,widget); + va_start(var,widget); _XtVaToArgList(widget, var, total_count, &args, &num_args); XtSetValues(widget, args, num_args); @@ -275,24 +235,15 @@ } -#if NeedVarargsPrototypes void XtVaSetSubvalues(XtPointer base, XtResourceList resources, Cardinal num_resources, ...) -#else -/*VARARGS3*/ -void XtVaSetSubvalues(base, resources, num_resources, va_alist) - XtPointer base; - XtResourceList resources; - Cardinal num_resources; - va_dcl -#endif { va_list var; ArgList args; Cardinal num_args; int total_count, typed_count; - Va_start(var, num_resources); + va_start(var, num_resources); _XtCountVaList(var, &total_count, &typed_count); va_end(var); @@ -300,7 +251,7 @@ XtWarning("XtVaTypedArg is not valid in XtVaSetSubvalues()\n"); } - Va_start(var, num_resources); + va_start(var, num_resources); _XtVaToArgList((Widget)NULL, var, total_count, &args, &num_args); XtSetSubvalues(base, resources, num_resources, args, num_args); @@ -312,7 +263,6 @@ va_end(var); } -#if NeedVarargsPrototypes Widget _XtVaOpenApplication( XtAppContext *app_context_return, @@ -324,21 +274,6 @@ String *fallback_resources, WidgetClass widget_class, va_list var_args) -#else -/*VARARGS8*/ -Widget _XtVaOpenApplication(app_context_return, application_class, options, - num_options, argc_in_out, argv_in_out, - fallback_resources, widget_class, var_args) - XtAppContext *app_context_return; - char *application_class; - XrmOptionDescList options; - Cardinal num_options; - int *argc_in_out; - String *argv_in_out; - String *fallback_resources; - WidgetClass widget_class; - va_list var_args; -#endif { XtAppContext app_con; Display * dpy; @@ -393,7 +328,6 @@ return(root); } -#if NeedVarargsPrototypes Widget _XtVaAppInitialize( XtAppContext *app_context_return, @@ -404,20 +338,6 @@ String *argv_in_out, String *fallback_resources, va_list var_args) -#else -/*VARARGS7*/ -Widget _XtVaAppInitialize(app_context_return, application_class, options, - num_options, argc_in_out, argv_in_out, - fallback_resources, var_args) - XtAppContext *app_context_return; - char *application_class; - XrmOptionDescList options; - Cardinal num_options; - int *argc_in_out; - String *argv_in_out; - String *fallback_resources; - va_list var_args; -#endif { return _XtVaOpenApplication(app_context_return, application_class, options, num_options, @@ -432,7 +352,6 @@ * _XtVaOpenApplication and to _XtVaAppInitialize. */ -#if NeedVarargsPrototypes Widget XtVaOpenApplication( XtAppContext *app_context_return, @@ -444,30 +363,15 @@ String *fallback_resources, WidgetClass widget_class, ...) -#else -Widget XtVaOpenApplication(app_context_return, application_class, options, - num_options, argc_in_out, argv_in_out, - fallback_resources, widget_class, va_alist) - XtAppContext *app_context_return; - String application_class; - XrmOptionDescList options; - Cardinal num_options; - int *argc_in_out; - String *argv_in_out; - String *fallback_resources; - WidgetClass widget_class; - va_dcl -#endif { va_list var; - Va_start(var, widget_class); + va_start(var, widget_class); return _XtVaOpenApplication(app_context_return, (String)application_class, options, num_options, argc_in_out, argv_in_out, fallback_resources, widget_class, var); } -#if NeedVarargsPrototypes Widget XtVaAppInitialize( XtAppContext *app_context_return, @@ -478,23 +382,10 @@ String *argv_in_out, String *fallback_resources, ...) -#else -Widget XtVaAppInitialize(app_context_return, application_class, options, - num_options, argc_in_out, argv_in_out, - fallback_resources, va_alist) - XtAppContext *app_context_return; - String application_class; - XrmOptionDescList options; - Cardinal num_options; - int *argc_in_out; - String *argv_in_out; - String *fallback_resources; - va_dcl -#endif { va_list var; - Va_start(var, fallback_resources); + va_start(var, fallback_resources); return _XtVaOpenApplication(app_context_return, (String)application_class, options, num_options, argc_in_out, argv_in_out, fallback_resources, Index: xc/lib/Xt/VarGet.c diff -u xc/lib/Xt/VarGet.c:1.5 xc/lib/Xt/VarGet.c:1.8 --- xc/lib/Xt/VarGet.c:1.5 Wed Jan 17 14:43:12 2001 +++ xc/lib/Xt/VarGet.c Fri Dec 14 14:56:32 2001 @@ -1,4 +1,4 @@ -/* $Xorg: VarGet.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ +/* $Xorg: VarGet.c,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /* Copyright 1993 by Sun Microsystems, Inc. Mountain View, CA. @@ -30,7 +30,11 @@ Copyright 1985, 1986, 1987, 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -47,6 +51,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/VarGet.c,v 1.8 2001/12/14 19:56:32 dawes Exp $ */ #include "IntrinsicI.h" #include "VarargsI.h" @@ -54,7 +59,6 @@ static String XtNxtGetTypedArg = "xtGetTypedArg"; -#if NeedVarargsPrototypes void XtVaGetSubresources( Widget widget, @@ -64,17 +68,6 @@ XtResourceList resources, Cardinal num_resources, ...) -#else -/*VARARGS6*/ -void XtVaGetSubresources(widget, base, name, class, resources, num_resources, va_alist) - Widget widget; - XtPointer base; - String name; - String class; - XtResourceList resources; - Cardinal num_resources; - va_dcl -#endif { va_list var; XtTypedArgList args; @@ -83,11 +76,11 @@ WIDGET_TO_APPCON(widget); LOCK_APP(app); - Va_start(var, num_resources); + va_start(var, num_resources); _XtCountVaList(var, &total_count, &typed_count); va_end(var); - Va_start(var, num_resources); + va_start(var, num_resources); _XtVaToTypedArgList(var, total_count, &args, &num_args); @@ -103,18 +96,8 @@ } -#if NeedVarargsPrototypes void XtVaGetApplicationResources(Widget widget, XtPointer base, XtResourceList resources, Cardinal num_resources, ...) -#else -/*VARARGS4*/ -void XtVaGetApplicationResources(widget, base, resources, num_resources, va_alist) - Widget widget; - XtPointer base; - XtResourceList resources; - Cardinal num_resources; - va_dcl -#endif { va_list var; XtTypedArgList args; @@ -123,11 +106,11 @@ WIDGET_TO_APPCON(widget); LOCK_APP(app); - Va_start(var,num_resources); + va_start(var,num_resources); _XtCountVaList(var, &total_count, &typed_count); va_end(var); - Va_start(var,num_resources); + va_start(var,num_resources); _XtVaToTypedArgList(var, total_count, &args, &num_args); @@ -238,15 +221,8 @@ return(count); } -#if NeedVarargsPrototypes void XtVaGetValues(Widget widget, ...) -#else -/*VARARGS1*/ -void XtVaGetValues(widget, va_alist) - Widget widget; - va_dcl -#endif { va_list var; String attr; @@ -258,7 +234,7 @@ WIDGET_TO_APPCON(widget); LOCK_APP(app); - Va_start(var,widget); + va_start(var,widget); _XtCountVaList(var, &total_count, &typed_count); @@ -269,7 +245,7 @@ else args = NULL; /* for lint; really unused */ va_end(var); - Va_start(var,widget); + va_start(var,widget); for(attr = va_arg(var, String), count = 0 ; attr != NULL; attr = va_arg(var, String)) { if (strcmp(attr, XtVaTypedArg) == 0) { @@ -309,24 +285,15 @@ UNLOCK_APP(app); } -#if NeedVarargsPrototypes void XtVaGetSubvalues(XtPointer base,XtResourceList resources, Cardinal num_resources, ...) -#else -/*VARARGS3*/ -void XtVaGetSubvalues(base, resources, num_resources, va_alist) - XtPointer base; - XtResourceList resources; - Cardinal num_resources; - va_dcl -#endif { va_list var; ArgList args; Cardinal num_args; int total_count, typed_count; - Va_start(var,num_resources); + va_start(var,num_resources); _XtCountVaList(var, &total_count, &typed_count); @@ -335,7 +302,7 @@ } va_end(var); - Va_start(var,num_resources); + va_start(var,num_resources); _XtVaToArgList((Widget)NULL, var, total_count, &args, &num_args); va_end(var); Index: xc/lib/Xt/Varargs.c diff -u xc/lib/Xt/Varargs.c:3.6 xc/lib/Xt/Varargs.c:3.10 --- xc/lib/Xt/Varargs.c:3.6 Wed Jan 17 14:43:12 2001 +++ xc/lib/Xt/Varargs.c Fri Dec 14 14:56:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Varargs.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ +/* $Xorg: Varargs.c,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1987, 1988, 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,6 +25,7 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/Varargs.c,v 3.10 2001/12/14 19:56:32 dawes Exp $ */ #include "IntrinsicI.h" #include "VarargsI.h" @@ -34,10 +39,10 @@ * attributes that are typed. The list is counted recursively. */ static void -_XtCountNestedList(avlist, total_count, typed_count) - XtTypedArgList avlist; - int *total_count; - int *typed_count; +_XtCountNestedList( + XtTypedArgList avlist, + int *total_count, + int *typed_count) { for (; avlist->name != NULL; avlist++) { if (strcmp(avlist->name, XtVaNestedList) == 0) { @@ -78,17 +83,17 @@ for(attr = va_arg(var, String) ; attr != NULL; attr = va_arg(var, String)) { if (strcmp(attr, XtVaTypedArg) == 0) { - va_arg(var, String); - va_arg(var, String); - va_arg(var, XtArgVal); - va_arg(var, int); + (void)va_arg(var, String); + (void)va_arg(var, String); + (void)va_arg(var, XtArgVal); + (void)va_arg(var, int); ++(*total_count); ++(*typed_count); } else if (strcmp(attr, XtVaNestedList) == 0) { _XtCountNestedList(va_arg(var, XtTypedArgList), total_count, typed_count); } else { - va_arg(var, XtArgVal); + (void)va_arg(var, XtArgVal); ++(*total_count); } } @@ -100,16 +105,8 @@ * constructs an attribute-value list of type XtTypedArgList and * returns the list. */ -#if NeedVarargsPrototypes XtVarArgsList XtVaCreateArgsList(XtPointer unused, ...) -#else -/*ARGSUSED*/ -/*VARARGS1*/ -XtVarArgsList XtVaCreateArgsList(unused, va_alist) - XtPointer unused; - va_dcl -#endif { va_list var; XtTypedArgList avlist; @@ -121,22 +118,22 @@ * Note: The count is required only to allocate enough space to store * the list. Therefore nested lists are not counted recursively. */ - Va_start(var,unused); + va_start(var,unused); for(attr = va_arg(var, String) ; attr != NULL; attr = va_arg(var, String)) { ++count; if (strcmp(attr, XtVaTypedArg) == 0) { - va_arg(var, String); - va_arg(var, String); - va_arg(var, XtArgVal); - va_arg(var, int); + (void)va_arg(var, String); + (void)va_arg(var, String); + (void)va_arg(var, XtArgVal); + (void)va_arg(var, int); } else { - va_arg(var, XtArgVal); + (void)va_arg(var, XtArgVal); } } va_end(var); - Va_start(var,unused); + va_start(var,unused); avlist = _XtVaCreateTypedArgList(var, count); va_end(var); return (XtVarArgsList)avlist; @@ -186,14 +183,13 @@ * 1 if the conversion succeeded and 0 if the conversion failed. */ static int -TypedArgToArg(widget, typed_arg, arg_return, resources, num_resources, - memory_return) - Widget widget; - XtTypedArgList typed_arg; - ArgList arg_return; - XtResourceList resources; - Cardinal num_resources; - ArgList memory_return; +TypedArgToArg( + Widget widget, + XtTypedArgList typed_arg, + ArgList arg_return, + XtResourceList resources, + Cardinal num_resources, + ArgList memory_return) { String to_type = NULL; XrmValue from_val, to_val; @@ -275,14 +271,13 @@ * an ArgList/count. */ static int -NestedArgtoArg(widget, avlist, args, resources, num_resources, - memory_return) - Widget widget; - XtTypedArgList avlist; - ArgList args; - XtResourceList resources; - Cardinal num_resources; - ArgList memory_return; +NestedArgtoArg( + Widget widget, + XtTypedArgList avlist, + ArgList args, + XtResourceList resources, + Cardinal num_resources, + ArgList memory_return) { int count = 0; @@ -352,7 +347,8 @@ } -static void GetResources(); +static void GetResources(Widget widget, XtResourceList *res_list, + Cardinal *number); /* @@ -481,9 +477,9 @@ } } -static int NestedArgtoTypedArg(args, avlist) - XtTypedArgList args; - XtTypedArgList avlist; +static int NestedArgtoTypedArg( + XtTypedArgList args, + XtTypedArgList avlist) { int count = 0; Index: xc/lib/Xt/VarargsI.h diff -u xc/lib/Xt/VarargsI.h:3.3 xc/lib/Xt/VarargsI.h:3.6 --- xc/lib/Xt/VarargsI.h:3.3 Wed Jan 17 14:43:13 2001 +++ xc/lib/Xt/VarargsI.h Fri Dec 14 14:56:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: VarargsI.h,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ +/* $Xorg: VarargsI.h,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /* Copyright 1985, 1986, 1987, 1988, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,17 +25,12 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xt/VarargsI.h,v 3.6 2001/12/14 19:56:32 dawes Exp $ */ #ifndef _VarargsI_h_ #define _VarargsI_h_ -#if NeedVarargsPrototypes -# include -# define Va_start(a,b) va_start(a,b) -#else -# include -# define Va_start(a,b) va_start(a) -#endif +#include /* private routines */ Index: xc/lib/Xt/Vendor.c diff -u xc/lib/Xt/Vendor.c:1.5 xc/lib/Xt/Vendor.c:1.6 --- xc/lib/Xt/Vendor.c:1.5 Wed Jan 17 14:43:13 2001 +++ xc/lib/Xt/Vendor.c Fri Dec 14 14:56:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Vendor.c,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ */ +/* $Xorg: Vendor.c,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Vendor.c,v 1.5 2001/01/17 19:43:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Vendor.c,v 1.6 2001/12/14 19:56:32 dawes Exp $ */ /* Make sure all wm properties can make it out of the resource manager */ Index: xc/lib/Xt/Vendor.h diff -u xc/lib/Xt/Vendor.h:1.1.1.3 xc/lib/Xt/Vendor.h:1.2 --- xc/lib/Xt/Vendor.h:1.1.1.3 Tue Jan 16 17:25:27 2001 +++ xc/lib/Xt/Vendor.h Fri Dec 14 14:56:33 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: Vendor.h,v 1.4 2000/08/17 19:46:20 cpqbld Exp $ +* $Xorg: Vendor.h,v 1.5 2001/02/09 02:03:59 xorgcvs Exp $ * $oHeader: Vendor.h,v 1.2 88/08/18 15:56:44 asente Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/VendorP.h diff -u xc/lib/Xt/VendorP.h:1.1.1.3 xc/lib/Xt/VendorP.h:1.2 --- xc/lib/Xt/VendorP.h:1.1.1.3 Tue Jan 16 17:25:28 2001 +++ xc/lib/Xt/VendorP.h Fri Dec 14 14:56:33 2001 @@ -1,5 +1,5 @@ /* -* $Xorg: VendorP.h,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ +* $Xorg: VendorP.h,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ * $oHeader: VendorP.h,v 1.2 88/08/18 15:56:48 asente Exp $ */ @@ -7,7 +7,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/Xt/Xtos.h diff -u xc/lib/Xt/Xtos.h:3.5 xc/lib/Xt/Xtos.h:3.9 --- xc/lib/Xt/Xtos.h:3.5 Wed Jan 17 14:43:13 2001 +++ xc/lib/Xt/Xtos.h Fri Dec 14 14:56:33 2001 @@ -1,12 +1,16 @@ /* -* $Xorg: Xtos.h,v 1.3 2000/08/17 19:46:20 cpqbld Exp $ +* $Xorg: Xtos.h,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xt/Xtos.h,v 3.5 2001/01/17 19:43:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/Xtos.h,v 3.9 2001/12/14 19:56:33 dawes Exp $ */ #ifndef _Xtos_h #define _Xtos_h @@ -58,7 +62,10 @@ #endif #if defined(__alpha) || defined(__alpha__) || \ - defined(__ia64__) || defined(ia64) + defined(__ia64__) || defined(ia64) || \ + defined(__sparc64__) || \ + defined(__s390x__) || \ + (defined(__hppa__) && defined(__LP64__)) #define LONG64 #endif Index: xc/lib/Xt/sharedlib.c diff -u xc/lib/Xt/sharedlib.c:3.3 xc/lib/Xt/sharedlib.c:3.6 --- xc/lib/Xt/sharedlib.c:3.3 Wed Jan 17 14:43:13 2001 +++ xc/lib/Xt/sharedlib.c Fri Dec 14 14:56:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sharedlib.c,v 1.3 2000/08/17 19:46:21 cpqbld Exp $ */ +/* $Xorg: sharedlib.c,v 1.4 2001/02/09 02:03:59 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,13 +25,14 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.3 2001/01/17 19:43:13 dawes Exp $ */ +/* $XFree86: xc/lib/Xt/sharedlib.c,v 3.6 2001/12/14 19:56:33 dawes Exp $ */ #if (defined(SUNSHLIB) || defined(AIXSHLIB)) && !defined(SHAREDCODE) #include "IntrinsicI.h" #include "VarargsI.h" #include "ShellP.h" #include "VendorP.h" +#include "CreateI.h" #if defined(AIXSHLIB) || defined(__EMX__) @@ -135,7 +140,6 @@ fallback_resources, args_in, num_args_in); } -#if NeedVarargsPrototypes Widget XtVaAppInitialize( XtAppContext *app_context_return, @@ -146,25 +150,12 @@ String *argv_in_out, String *fallback_resources, ...) -#else -Widget XtVaAppInitialize(app_context_return, application_class, options, - num_options, argc_in_out, argv_in_out, - fallback_resources, va_alist) - XtAppContext *app_context_return; - String application_class; - XrmOptionDescList options; - Cardinal num_options; - int *argc_in_out; - String *argv_in_out; - String *fallback_resources; - va_dcl -#endif { va_list var; extern Widget _XtVaAppInitialize(); VENDORINIT - Va_start(var, fallback_resources); + va_start(var, fallback_resources); return _XtVaAppInitialize(app_context_return, application_class, options, num_options, argc_in_out, argv_in_out, fallback_resources, var); @@ -207,7 +198,6 @@ args_in, num_args_in); } -#if NeedVarargsPrototypes Widget XtVaOpenApplication( XtAppContext *app_context_return, @@ -219,26 +209,12 @@ String *fallback_resources, WidgetClass widget_class, ...) -#else -Widget XtVaOpenApplication(app_context_return, application_class, options, - num_options, argc_in_out, argv_in_out, - fallback_resources, widget_class, va_alist) - XtAppContext *app_context_return; - String application_class; - XrmOptionDescList options; - Cardinal num_options; - int *argc_in_out; - String *argv_in_out; - String *fallback_resources; - WidgetClass widget_class; - va_dcl -#endif { va_list var; extern Widget _XtVaOpenApplication(); VENDORINIT - Va_start(var, widget_class); + va_start(var, widget_class); return _XtVaOpenApplication(app_context_return, application_class, options, num_options, argc_in_out, argv_in_out, fallback_resources, widget_class, var); Index: xc/lib/Xt/util/Shell.ht diff -u xc/lib/Xt/util/Shell.ht:3.2 xc/lib/Xt/util/Shell.ht:3.5 --- xc/lib/Xt/util/Shell.ht:3.2 Wed Jan 17 14:43:15 2001 +++ xc/lib/Xt/util/Shell.ht Fri Dec 14 14:56:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Shell.ht,v 1.4 2000/08/17 19:46:22 cpqbld Exp $ */ +/* $Xorg: Shell.ht,v 1.5 2001/02/09 02:03:59 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,6 +46,7 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/util/Shell.ht,v 3.5 2001/12/14 19:56:39 dawes Exp $ */ #ifndef _XtShell_h #define _XtShell_h @@ -59,11 +64,7 @@ */ #ifndef XTSTRINGDEFINES -#ifdef __STDC__ #define _XtShell_h_Const const -#else -#define _XtShell_h_Const /**/ -#endif #endif <<>> Index: xc/lib/Xt/util/StrDefs.ct diff -u xc/lib/Xt/util/StrDefs.ct:3.2 xc/lib/Xt/util/StrDefs.ct:3.5 --- xc/lib/Xt/util/StrDefs.ct:3.2 Wed Jan 17 14:43:16 2001 +++ xc/lib/Xt/util/StrDefs.ct Fri Dec 14 14:56:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrDefs.ct,v 1.3 2000/08/17 19:46:22 cpqbld Exp $ */ +/* $Xorg: StrDefs.ct,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,12 +46,9 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/util/StrDefs.ct,v 3.5 2001/12/14 19:56:39 dawes Exp $ */ -#ifdef __STDC__ #define Const const -#else -#define Const /**/ -#endif <<>> Index: xc/lib/Xt/util/StrDefs.ht diff -u xc/lib/Xt/util/StrDefs.ht:3.2 xc/lib/Xt/util/StrDefs.ht:3.5 --- xc/lib/Xt/util/StrDefs.ht:3.2 Wed Jan 17 14:43:16 2001 +++ xc/lib/Xt/util/StrDefs.ht Fri Dec 14 14:56:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: StrDefs.ht,v 1.3 2000/08/17 19:46:22 cpqbld Exp $ */ +/* $Xorg: StrDefs.ht,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1988, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,16 +46,13 @@ SOFTWARE. ******************************************************************/ +/* $XFree86: xc/lib/Xt/util/StrDefs.ht,v 3.5 2001/12/14 19:56:39 dawes Exp $ */ #ifndef _XtStringDefs_h_ #define _XtStringDefs_h_ #ifndef XTSTRINGDEFINES -#ifdef __STDC__ #define _XtStringDefs_h_Const const -#else -#define _XtStringDefs_h_Const /**/ -#endif #endif <<>> Index: xc/lib/Xtst/XRecord.c diff -u xc/lib/Xtst/XRecord.c:1.1.1.5 xc/lib/Xtst/XRecord.c:1.4 --- xc/lib/Xtst/XRecord.c:1.1.1.5 Tue Jan 16 17:25:40 2001 +++ xc/lib/Xtst/XRecord.c Fri Dec 14 14:56:39 2001 @@ -1,11 +1,15 @@ /* -$Xorg: XRecord.c,v 1.3 2000/08/17 19:46:23 cpqbld Exp $ +$Xorg: XRecord.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ XRecord.c - client-side library for RECORD extension Copyright 1995, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,6 +50,7 @@ /* * By Stephen Gildea, X Consortium, and Martha Zimet, NCD. */ +/* $XFree86: xc/lib/Xtst/XRecord.c,v 1.4 2001/12/14 19:56:39 dawes Exp $ */ #include #include @@ -735,7 +740,7 @@ XPointer closure; { int current_index; - int datum_bytes; + int datum_bytes = 0; XRecordInterceptData *data; /* call the callback for each protocol element in the reply */ @@ -924,7 +929,6 @@ register record_async_state *state = (record_async_state *)adata; struct reply_buffer *reply; enum parser_return status; - extern void _XGetAsyncData(); if (dpy->last_request_read != state->enable_seq) { @@ -953,7 +957,7 @@ return False; } - _XGetAsyncData(dpy, reply->buf, buf, len, + _XGetAsyncData(dpy, (char *)reply->buf, buf, len, SIZEOF(xRecordEnableContextReply), rep->generic.length << 2, 0); } else { Index: xc/lib/Xtst/XTest.c diff -u xc/lib/Xtst/XTest.c:1.3 xc/lib/Xtst/XTest.c:1.5 --- xc/lib/Xtst/XTest.c:1.3 Wed Jan 17 14:43:16 2001 +++ xc/lib/Xtst/XTest.c Fri Dec 14 14:56:40 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XTest.c,v 1.4 2000/08/17 19:46:23 cpqbld Exp $ */ +/* $Xorg: XTest.c,v 1.5 2001/02/09 02:04:00 xorgcvs Exp $ */ /* Copyright 1990, 1991 by UniSoft Group Limited */ @@ -7,7 +7,11 @@ Copyright 1992, 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26,7 +30,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/Xtst/XTest.c,v 1.3 2001/01/17 19:43:16 dawes Exp $ */ +/* $XFree86: xc/lib/Xtst/XTest.c,v 1.5 2001/12/14 19:56:40 dawes Exp $ */ #define NEED_REPLIES #include "Xlibint.h" @@ -163,6 +167,7 @@ return XTestCompareCursorWithWindow(dpy, window, XTestCurrentCursor); } +int XTestFakeKeyEvent(dpy, keycode, is_press, delay) Display *dpy; unsigned int keycode; @@ -186,6 +191,7 @@ return 1; } +int XTestFakeButtonEvent(dpy, button, is_press, delay) Display *dpy; unsigned int button; @@ -209,6 +215,7 @@ return 1; } +int XTestFakeMotionEvent(dpy, screen, x, y, delay) Display *dpy; int screen; @@ -238,6 +245,7 @@ return 1; } +int XTestFakeRelativeMotionEvent(dpy, dx, dy, delay) Display *dpy; int dx, dy; @@ -307,6 +315,7 @@ } } +int XTestFakeDeviceKeyEvent(dpy, dev, keycode, is_press, axes, n_axes, delay) Display *dpy; XDevice *dev; @@ -337,6 +346,7 @@ return 1; } +int XTestFakeDeviceButtonEvent(dpy, dev, button, is_press, axes, n_axes, delay) Display *dpy; XDevice *dev; @@ -367,6 +377,7 @@ return 1; } +int XTestFakeProximityEvent(dpy, dev, in_prox, axes, n_axes, delay) Display *dpy; XDevice *dev; @@ -395,6 +406,7 @@ return 1; } +int XTestFakeDeviceMotionEvent(dpy, dev, is_relative, first_axis, axes, n_axes, delay) Display *dpy; @@ -424,6 +436,7 @@ return 1; } +int XTestGrabControl(dpy, impervious) Display *dpy; Bool impervious; Index: xc/lib/Xv/Xvlibint.h diff -u xc/lib/Xv/Xvlibint.h:1.4 xc/lib/Xv/Xvlibint.h:1.5 --- xc/lib/Xv/Xvlibint.h:1.4 Wed Jun 7 18:02:57 2000 +++ xc/lib/Xv/Xvlibint.h Wed Jul 25 11:04:53 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.4 2000/06/07 22:02:57 tsi Exp $ */ +/* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.5 2001/07/25 15:04:53 dawes Exp $ */ #ifndef XVLIBINT_H #define XVLIBINT_H @@ -47,7 +47,7 @@ #include "Xvproto.h" #include "Xvlib.h" -#if defined(__STDC__) && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define XvGetReq(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xv##name##Req)) > dpy->bufmax)\ Index: xc/lib/XvMC/Imakefile diff -u xc/lib/XvMC/Imakefile:1.2 xc/lib/XvMC/Imakefile:1.4 --- xc/lib/XvMC/Imakefile:1.2 Sun Apr 1 10:00:02 2001 +++ xc/lib/XvMC/Imakefile Tue Oct 9 03:46:46 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/XvMC/Imakefile,v 1.2 2001/04/01 14:00:02 tsi Exp $ +XCOMM $XFree86: xc/lib/XvMC/Imakefile,v 1.4 2001/10/09 07:46:46 alanh Exp $ #define DoNormalLib NormalLibXvMC #define DoSharedLib SharedLibXvMC @@ -25,5 +25,15 @@ LINTLIBS = $(LINTXLIB) #include + +#define PassCDebugFlags + +#if defined(LinuxArchitecture) +#define IHaveSubdirs +SUBDIRS = hw/i810 + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif DependTarget() Index: xc/lib/XvMC/XvMC.c diff -u xc/lib/XvMC/XvMC.c:1.3 xc/lib/XvMC/XvMC.c:1.4 --- xc/lib/XvMC/XvMC.c:1.3 Sun Apr 1 10:00:02 2001 +++ xc/lib/XvMC/XvMC.c Wed Nov 14 16:54:38 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/XvMC/XvMC.c,v 1.3 2001/04/01 14:00:02 tsi Exp $ */ +/* $XFree86: xc/lib/XvMC/XvMC.c,v 1.4 2001/11/14 21:54:38 mvojkovi Exp $ */ #define NEED_REPLIES @@ -114,7 +114,6 @@ _XRead(dpy, (char*)&sinfo, sizeof(xvmcSurfaceInfo)); surface_info[i].surface_type_id = sinfo.surface_type_id; surface_info[i].chroma_format = sinfo.chroma_format; - surface_info[i].color_description = sinfo.color_description; surface_info[i].max_width = sinfo.max_width; surface_info[i].max_height = sinfo.max_height; surface_info[i].subpicture_max_width = Index: xc/lib/XvMC/XvMClibint.h diff -u xc/lib/XvMC/XvMClibint.h:1.3 xc/lib/XvMC/XvMClibint.h:1.4 --- xc/lib/XvMC/XvMClibint.h:1.3 Sun Apr 1 10:00:02 2001 +++ xc/lib/XvMC/XvMClibint.h Wed Jul 25 11:04:54 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/XvMC/XvMClibint.h,v 1.3 2001/04/01 14:00:02 tsi Exp $ */ +/* $XFree86: xc/lib/XvMC/XvMClibint.h,v 1.4 2001/07/25 15:04:54 dawes Exp $ */ #ifndef _XVMCLIBINT_H #define _XVMCLIBINT_H @@ -13,7 +13,7 @@ XextCheckExtension(dpy, i, xvmc_extension_name, val) -#if defined(__STDC__) && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define XvMCGetReq(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + sizeof(xvmc##name##Req)) > dpy->bufmax)\ Index: xc/lib/XvMC/hw/i810/I810XvMC.c diff -u /dev/null xc/lib/XvMC/hw/i810/I810XvMC.c:1.7 --- /dev/null Fri Jan 18 15:23:37 2002 +++ xc/lib/XvMC/hw/i810/I810XvMC.c Mon Dec 17 23:23:55 2001 @@ -0,0 +1,4509 @@ +/*************************************************************************** + +Copyright 2001 Intel Corporation. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL INTEL, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/************************************************************************* +** File libI810XvMC.c +** +** Authors: +** Matt Sottek +** Bob Paauwe +** +** +***************************************************************************/ +/* $XFree86: xc/lib/XvMC/hw/i810/I810XvMC.c,v 1.7 2001/12/18 04:23:55 dawes Exp $ */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "I810XvMC.h" + +static int error_base; +static int event_base; + +/*************************************************************************** +// Function: i810_get_free_buffer +// Description: Allocates a free dma page using kernel ioctls, then +// programs the data into the already allocated dma buffer list. +// Arguments: pI810XvMC private data structure from the current context. +// Notes: We faked the drmMapBufs for the i810's security so now we have +// to insert an allocated page into the correct spot in the faked +// list to keep up appearences. +// Concept for this function was taken from Mesa sources. +// Returns: drmBufPtr containing the information about the allocated page. +***************************************************************************/ +drmBufPtr i810_get_free_buffer(i810XvMCContext *pI810XvMC) { + drm_i810_dma_t dma; + drmBufPtr buf; + + dma.granted = 0; + dma.request_size = 4096; + while(!dma.granted) { + if(GET_BUFFER(pI810XvMC, &dma) || !dma.granted) + FLUSH(pI810XvMC); + } /* No DMA granted */ + + buf = &(pI810XvMC->dmabufs->list[dma.request_idx]); + buf->idx = dma.request_idx; + buf->used = 0; + buf->total = dma.request_size; + buf->address = (drmAddress)dma.virtual; + return buf; +} + +/*************************************************************************** +// Function: free_privContext +// Description: Free's the private context structure if the reference +// count is 0. +***************************************************************************/ +void i810_free_privContext(i810XvMCContext *pI810XvMC) { + + I810_LOCK(pI810XvMC,DRM_LOCK_QUIESCENT); + + + pI810XvMC->ref--; + if(!pI810XvMC->ref) { + drmUnmapBufs(pI810XvMC->dmabufs); + drmUnmap(pI810XvMC->overlay.address,pI810XvMC->overlay.size); + drmUnmap(pI810XvMC->surfaces.address,pI810XvMC->surfaces.size); + drmClose(pI810XvMC->fd); + + free(pI810XvMC->dmabufs->list); + free(pI810XvMC); + } + + I810_UNLOCK(pI810XvMC); +} + + +/*************************************************************************** +// Function: XvMCCreateContext +// Description: Create a XvMC context for the given surface parameters. +// Arguments: +// display - Connection to the X server. +// port - XvPortID to use as avertised by the X connection. +// surface_type_id - Unique identifier for the Surface type. +// width - Width of the surfaces. +// height - Height of the surfaces. +// flags - one or more of the following +// XVMC_DIRECT - A direct rendered context is requested. +// +// Notes: surface_type_id and width/height parameters must match those +// returned by XvMCListSurfaceTypes. +// Returns: Status +***************************************************************************/ +Status XvMCCreateContext(Display *display, XvPortID port, + int surface_type_id, int width, int height, int flags, + XvMCContext *context) { + i810XvMCContext *pI810XvMC; + char busIdString[10]; + int priv_count; + uint *priv_data; + uint magic; + Status ret; + int major, minor; + + /* Verify Obvious things first */ + if(context == NULL) { + return XvMCBadContext; + } + + if(!flags & XVMC_DIRECT) { + /* Indirect */ + printf("Indirect Rendering not supported!\nUsing Direct."); + } + + /* Limit use to root for now */ + if(geteuid()) { + printf("Use of XvMC on i810 is currently limited to root\n"); + return BadAccess; + } + + /* FIXME: Check $DISPLAY for legal values here */ + + context->surface_type_id = surface_type_id; + context->width = (unsigned short)width; + context->height = (unsigned short)height; + context->flags = flags; + context->port = port; + /* + Width, Height, and flags are checked against surface_type_id + and port for validity inside the X server, no need to check + here. + */ + + /* Allocate private Context data */ + context->privData = (void *)malloc(sizeof(i810XvMCContext)); + if(!context->privData) { + printf("Unable to allocate resources for XvMC context.\n"); + return BadAlloc; + } + pI810XvMC = (i810XvMCContext *)context->privData; + + + /* Verify the XvMC extension exists */ + if(! XvMCQueryExtension(display, &event_base, + &error_base)) { + printf("XvMC Extension is not available!\n"); + return BadAlloc; + } + /* Verify XvMC version */ + ret = XvMCQueryVersion(display, &major, &minor); + if(ret) { + printf("XvMCQuery Version Failed, unable to determine protocol version\n"); + } + /* FIXME: Check Major and Minor here */ + + /* Check for drm */ + if(! drmAvailable()) { + printf("Direct Rendering is not avilable on this system!\n"); + return BadAlloc; + } + + /* + Build the Attribute Atoms, and Initialize the ones that exist + in Xv. + */ + pI810XvMC->xv_colorkey = XInternAtom(display,"XV_COLORKEY",0); + if(!pI810XvMC->xv_colorkey) { + return XvBadPort; + } + ret = XvGetPortAttribute(display,port,pI810XvMC->xv_colorkey, + &pI810XvMC->colorkey); + if(ret) { + return ret; + } + pI810XvMC->xv_brightness = XInternAtom(display,"XV_BRIGHTNESS",0); + pI810XvMC->xv_saturation = XInternAtom(display,"XV_SATURATION",0); + pI810XvMC->xv_contrast = XInternAtom(display,"XV_CONTRAST",0); + pI810XvMC->brightness = 0; + pI810XvMC->saturation = 0x80; /* 1.0 in 3.7 format */ + pI810XvMC->contrast = 0x40; /* 1.0 in 3.6 format */ + + /* Open DRI Device */ + if((pI810XvMC->fd = drmOpen("i810",NULL)) < 0) { + printf("DRM Device for i810 could not be opened.\n"); + free(busIdString); + free(pI810XvMC); + return BadAccess; + } /* !pI810XvMC->fd */ + + /* Get magic number and put it in privData for passing */ + drmGetMagic(pI810XvMC->fd,&magic); + context->flags = (uint)magic; + + /* + Pass control to the X server to create a drmContext for us and + validate the with/height and flags. + */ + if((ret = _xvmc_create_context(display, context, &priv_count, &priv_data))) { + printf("Unable to create XvMC Context.\n"); + return ret; + } + + /* + X server returns a structure like this: + drmContext + fbBase + OverlayOffset + OverlaySize + SurfacesOffset + SurfacesSize + busIdString = 9 char + 1 + */ + if(priv_count != 9) { + printf("_xvmc_create_context() returned incorrect data size!\n"); + printf("\tExpected 9, got %d\n",priv_count); + _xvmc_destroy_context(display, context); + free(pI810XvMC); + return BadAlloc; + } + pI810XvMC->drmcontext = priv_data[0]; + pI810XvMC->fb_base = priv_data[1]; + pI810XvMC->overlay.offset = priv_data[2] + priv_data[1]; + pI810XvMC->overlay.size = priv_data[3]; + pI810XvMC->surfaces.offset = priv_data[4] + priv_data[1]; + pI810XvMC->surfaces.size = priv_data[5]; + strncpy(pI810XvMC->busIdString,(char *)&priv_data[6],9); + pI810XvMC->busIdString[9] = '\0'; + + /* Must free the private data we were passed from X */ + free(priv_data); + + /* Initialize private context values */ + pI810XvMC->current = 0; + pI810XvMC->lock = 0; + pI810XvMC->last_flip = 0; + pI810XvMC->dual_prime = 0; + + /* + Map dma Buffers: Not really, this would be a drmMapBufs + but due to the i810 security model we have to just create an + empty data structure to fake it. + */ + pI810XvMC->dmabufs = (drmBufMapPtr)malloc(sizeof(drmBufMap)); + if(pI810XvMC->dmabufs == NULL) { + printf("Dma Bufs could not be mapped.\n"); + _xvmc_destroy_context(display, context); + free(pI810XvMC); + return BadAlloc; + } /* pI810XvMC->dmabufs == NULL */ + memset(pI810XvMC->dmabufs, 0, sizeof(drmBufMap)); + pI810XvMC->dmabufs->list = (drmBufPtr)malloc(sizeof(drmBuf) * + I810_DMA_BUF_NR); + if(pI810XvMC->dmabufs->list == NULL) { + printf("Dma Bufs could not be mapped.\n"); + _xvmc_destroy_context(display, context); + free(pI810XvMC); + return BadAlloc; + } /* pI810XvMC->dmabufs->list == NULL */ + memset(pI810XvMC->dmabufs->list, 0, sizeof(drmBuf) * I810_DMA_BUF_NR); + + /* Map the Overlay memory */ + if(drmMap(pI810XvMC->fd,pI810XvMC->overlay.offset, + pI810XvMC->overlay.size,&(pI810XvMC->overlay.address)) < 0) { + printf("Unable to map Overlay at offset 0x%x and size 0x%x\n", + (unsigned int)pI810XvMC->overlay.offset,pI810XvMC->overlay.size); + _xvmc_destroy_context(display, context); + free(pI810XvMC->dmabufs->list); + free(pI810XvMC); + return BadAlloc; + } /* drmMap() < 0 */ + + /* Overlay Regs are offset 1024 into Overlay Map */ + pI810XvMC->oregs = (i810OverlayRec *) + ((unsigned char *)pI810XvMC->overlay.address + 1024); + + /* Map Surfaces */ + if(drmMap(pI810XvMC->fd,pI810XvMC->surfaces.offset, + pI810XvMC->surfaces.size,&(pI810XvMC->surfaces.address)) < 0) { + printf("Unable to map XvMC Surfaces.\n"); + _xvmc_destroy_context(display, context); + free(pI810XvMC->dmabufs->list); + free(pI810XvMC); + return BadAlloc; + } /* drmMap() < 0 */ + + /* + There is a tiny chance that someone was using the overlay and + issued a flip that hasn't finished. To be 100% sure I'll just + take the lock and sleep for the worst case time for a flip. + */ + I810_LOCK(pI810XvMC,DRM_LOCK_QUIESCENT); + usleep(20000); /* 1/50th Sec for 50hz refresh */ + + /* Set up Overlay regs with Initial Values */ + pI810XvMC->oregs->YRGB_VPH = 0; + pI810XvMC->oregs->UV_VPH = 0; + pI810XvMC->oregs->HORZ_PH = 0; + pI810XvMC->oregs->INIT_PH = 0; + pI810XvMC->oregs->DWINPOS = 0; + pI810XvMC->oregs->DWINSZ = (I810_XVMC_MAXHEIGHT << 16) | + I810_XVMC_MAXWIDTH; + pI810XvMC->oregs->SWID = I810_XVMC_MAXWIDTH | (I810_XVMC_MAXWIDTH << 15); + pI810XvMC->oregs->SWIDQW = (I810_XVMC_MAXWIDTH >> 3) | + (I810_XVMC_MAXWIDTH << 12); + pI810XvMC->oregs->SHEIGHT = I810_XVMC_MAXHEIGHT | + (I810_XVMC_MAXHEIGHT << 15); + pI810XvMC->oregs->YRGBSCALE = 0x80004000; /* scale factor 1 */ + pI810XvMC->oregs->UVSCALE = 0x80004000; /* scale factor 1 */ + pI810XvMC->oregs->OV0CLRC0 = 0x4000; /* brightness: 0 contrast: 1.0 */ + pI810XvMC->oregs->OV0CLRC1 = 0x80; /* saturation: bypass */ + + /* Destination Colorkey Setup */ + pI810XvMC->oregs->DCLRKV = RGB16ToColorKey(pI810XvMC->colorkey); + pI810XvMC->oregs->DCLRKM = 0x80070307; + + + pI810XvMC->oregs->SCLRKVH = 0; + pI810XvMC->oregs->SCLRKVL = 0; + pI810XvMC->oregs->SCLRKM = 0; /* source color key disable */ + pI810XvMC->oregs->OV0CONF = 0; /* two 720 pixel line buffers */ + + pI810XvMC->oregs->OV0CMD = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | + Y_ADJUST | YUV_420; + + pI810XvMC->ref = 1; + + I810_UNLOCK(pI810XvMC); + + return Success; + +} + +/*************************************************************************** +// Function: XvMCDestroyContext +// Description: Destorys the specified context. +// +// Arguments: +// display - Specifies the connection to the server. +// context - The context to be destroyed. +// +// Returns: Status +***************************************************************************/ +Status XvMCDestroyContext(Display *display, XvMCContext *context) { + i810XvMCContext *pI810XvMC; + + if(context == NULL) { + return (error_base + XvMCBadContext); + } + if(context->privData == NULL) { + return (error_base + XvMCBadContext); + } + pI810XvMC = (i810XvMCContext *)context->privData; + + /* Turn off the overlay */ + if(pI810XvMC->last_flip) { + I810_LOCK(pI810XvMC,DRM_LOCK_QUIESCENT); + + /* Make sure last flip is done */ + BLOCK_OVERLAY(pI810XvMC,pI810XvMC->current); + + pI810XvMC->oregs->OV0CMD = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | + Y_ADJUST; + pI810XvMC->current = !pI810XvMC->current; + if(pI810XvMC->current == 1) { + pI810XvMC->oregs->OV0CMD |= BUFFER1_FIELD0; + } + else { + pI810XvMC->oregs->OV0CMD |= BUFFER0_FIELD0; + } + OVERLAY_FLIP(pI810XvMC); + pI810XvMC->last_flip++; + + /* Wait for the flip */ + BLOCK_OVERLAY(pI810XvMC,pI810XvMC->current); + + I810_UNLOCK(pI810XvMC); + } + + /* Pass Control to the X server to destroy the drmContext */ + _xvmc_destroy_context(display, context); + + i810_free_privContext(pI810XvMC); + context->privData = NULL; + + return Success; +} + + +/*************************************************************************** +// Function: XvMCCreateSurface +***************************************************************************/ +Status XvMCCreateSurface( Display *display, XvMCContext *context, + XvMCSurface *surface) { + i810XvMCContext *pI810XvMC; + i810XvMCSurface *pI810Surface; + int priv_count; + uint *priv_data; + Status ret; + + if((surface == NULL) || (context == NULL) || (display == NULL)){ + return BadValue; + } + + pI810XvMC = (i810XvMCContext *)context->privData; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadContext); + } + + + surface->privData = (i810XvMCSurface *)malloc(sizeof(i810XvMCSurface)); + if(!surface->privData) { + return BadAlloc; + } + pI810Surface = (i810XvMCSurface *)surface->privData; + + /* Initialize private values */ + pI810Surface->privContext = pI810XvMC; + pI810Surface->last_render = 0; + pI810Surface->last_flip = 0; + pI810Surface->second_field = 0; + + if((ret = _xvmc_create_surface(display, context, surface, + &priv_count, &priv_data))) { + free(pI810Surface); + printf("Unable to create XvMCSurface.\n"); + return ret; + } + + /* + _xvmc_create_subpicture returns 2 uints with the offset into + the DRM map for the Y surface and UV surface. + */ + if(priv_count != 2) { + printf("_xvmc_create_surface() return incorrect data size.\n"); + printf("Expected 2 got %d\n",priv_count); + free(priv_data); + free(pI810Surface); + return BadAlloc; + } + /* Data == Client Address, offset == Physical address offset */ + pI810Surface->data = pI810XvMC->surfaces.address; + pI810Surface->offset = pI810XvMC->surfaces.offset; + + + /* + i810's MC Engine needs surfaces of 2^x (x= 9,10,11,12) pitch + and the Tiler need 512k aligned surfaces, basically we are + stuck with fixed memory with pitch 1024 for Y data. UV = 512. + */ + pI810Surface->pitch = 10; + if((surface->surface_type_id == FOURCC_UYVY) || + (surface->surface_type_id == FOURCC_YUY2)) { + /* This is not implemented server side. */ + pI810Surface->pitch++; + } + + /* + offsets[0,1,2] == Offsets from either data or offset for the Y + U and V surfaces. + */ + pI810Surface->offsets[0] = priv_data[0]; + if(((uint)pI810Surface->data + pI810Surface->offsets[0]) & 4095) { + printf("XvMCCreateSurface: Surface offset 0 is not 4096 aligned\n"); + } + + if((surface->surface_type_id == FOURCC_UYVY) || + (surface->surface_type_id == FOURCC_YUY2)) { + /* Packed surface, not fully implemented */ + pI810Surface->offsets[1] = 0; + pI810Surface->offsets[2] = 0; + } + else { + /* Planar surface */ + pI810Surface->offsets[1] = priv_data[1]; + if(((uint)pI810Surface->data + pI810Surface->offsets[1]) & 2047) { + printf("XvMCCreateSurface: Surface offset 1 is not 2048 aligned\n"); + } + + pI810Surface->offsets[2] = ((uint)pI810Surface->offsets[1] + + (1<<(pI810Surface->pitch - 1)) * 288); + if(((uint)pI810Surface->data + pI810Surface->offsets[2]) & 2047) { + printf("XvMCCreateSurface: Surface offset 2 is not 2048 aligned\n"); + } + + } + + /* Free data returned from xvmc_create_surface */ + free(priv_data); + + /* Clear the surface to 0 */ + memset((void *)((unsigned int)pI810Surface->data + + (unsigned int)pI810Surface->offsets[0]),0, + ((1<pitch) * surface->height)); + + switch(surface->surface_type_id) { + case FOURCC_YV12: + case FOURCC_I420: + /* Destination buffer info command */ + pI810Surface->dbi1y = ((((unsigned int)pI810Surface->offset + + pI810Surface->offsets[0]) & ~0xfc000fff) | + (pI810Surface->pitch - 9)); + pI810Surface->dbi1u = ((((unsigned int)pI810Surface->offset + + pI810Surface->offsets[1]) & ~0xfc000fff) | + (pI810Surface->pitch - 10)); + pI810Surface->dbi1v = ((((unsigned int)pI810Surface->offset + + pI810Surface->offsets[2]) & ~0xfc000fff) | + (pI810Surface->pitch - 10)); + + /* Destination buffer variables command */ + pI810Surface->dbv1 = (0x8<<20) | (0x8<<16); + /* Map info command */ + pI810Surface->mi1y = (0x1<<24) | (1<<9) | (pI810Surface->pitch - 3); + pI810Surface->mi1u = (0x1<<24) | (1<<9) | (pI810Surface->pitch - 4); + pI810Surface->mi1v = (0x1<<24) | (1<<9) | (pI810Surface->pitch - 4); + + pI810Surface->mi2y = (((unsigned int)surface->height - 1)<<16) | + ((unsigned int)surface->width - 1); + pI810Surface->mi2u = (((unsigned int)surface->height - 1)<<15) | + (((unsigned int)surface->width - 1)>>1); + pI810Surface->mi2v = pI810Surface->mi2u; + + pI810Surface->mi3y = ((unsigned int)pI810Surface->offset + + pI810Surface->offsets[0]) & ~0x0000000f; + pI810Surface->mi3u = ((unsigned int)pI810Surface->offset + + pI810Surface->offsets[1]) & ~0x0000000f; + pI810Surface->mi3v = ((unsigned int)pI810Surface->offset + + pI810Surface->offsets[2]) & ~0x0000000f; + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + /* Destination buffer info command */ + pI810Surface->dbi1y = ((((unsigned int)pI810Surface->offset + + pI810Surface->offsets[0]) & ~0xfc000fff) | + (pI810Surface->pitch - 9)); + /* Destination buffer variables command */ + if(surface->surface_type_id == FOURCC_YUY2) { + pI810Surface->dbv1 = 0x5<<8; + pI810Surface->mi1y = 0x5<<24 | pI810Surface->pitch | 0x1<<21; + } + else { + pI810Surface->dbv1 = 0x4<<8; + pI810Surface->mi1y = 0x5<<24 | (pI810Surface->pitch - 3); + } + pI810Surface->mi2y = (((unsigned int)surface->width - 1)<<16) | + ((unsigned int)surface->height - 1); + pI810Surface->mi3y = ((unsigned int)pI810Surface->offset + + pI810Surface->offsets[0]) & ~0xfc000fff; + break; + } + pI810XvMC->ref++; + + return Success; +} + + +/*************************************************************************** +// Function: XvMCDestroySurface +***************************************************************************/ +Status XvMCDestroySurface(Display *display, XvMCSurface *surface) { + i810XvMCSurface *pI810Surface; + i810XvMCContext *pI810XvMC; + + if((display == NULL) || (surface == NULL)) { + return BadValue; + } + if(surface->privData == NULL) { + return (error_base + XvMCBadSurface); + } + + pI810Surface = (i810XvMCSurface *)surface->privData; + if(pI810Surface->last_flip) { + XvMCSyncSurface(display,surface); + } + pI810XvMC = (i810XvMCContext *)pI810Surface->privContext; + + _xvmc_destroy_surface(display,surface); + + i810_free_privContext(pI810XvMC); + + free(pI810Surface); + surface->privData = NULL; + return Success; +} + +/*************************************************************************** +// Function: XvMCCreateBlocks +***************************************************************************/ +Status XvMCCreateBlocks(Display *display, XvMCContext *context, + unsigned int num_blocks, + XvMCBlockArray *block) { + + if((display == NULL) || (context == NULL) || (num_blocks == 0)) { + return BadValue; + } + + block->blocks = (short *)malloc(num_blocks<<6 * sizeof(short)); + if(block->blocks == NULL) { + return BadAlloc; + } + + block->num_blocks = num_blocks; + block->context_id = context->context_id; + + block->privData = NULL; + + return Success; +} + +/*************************************************************************** +// Function: XvMCDestroyBlocks +***************************************************************************/ +Status XvMCDestroyBlocks(Display *display, XvMCBlockArray *block) { + if(display == NULL) { + return BadValue; + } + + free(block->blocks); + block->num_blocks = 0; + block->context_id = 0; + block->privData = NULL; + return Success; +} + +/*************************************************************************** +// Function: XvMCCreateMacroBlocks +***************************************************************************/ +Status XvMCCreateMacroBlocks(Display *display, XvMCContext *context, + unsigned int num_blocks, + XvMCMacroBlockArray *blocks) { + + if((display == NULL) || (context == NULL) || (blocks == NULL) || + (num_blocks == 0)) { + return BadValue; + } + memset(blocks,0,sizeof(XvMCMacroBlockArray)); + blocks->context_id = context->context_id; + blocks->privData = NULL; + + blocks->macro_blocks = (XvMCMacroBlock *) + malloc(num_blocks * sizeof(XvMCMacroBlock)); + if(blocks->macro_blocks == NULL) { + return BadAlloc; + } + blocks->num_blocks = num_blocks; + + return Success; +} + +/*************************************************************************** +// Function: XvMCDestroyMacroBlocks +***************************************************************************/ +Status XvMCDestroyMacroBlocks(Display *display, XvMCMacroBlockArray *block) { + if((display == NULL) || (block == NULL)) { + return BadValue; + } + if(block->macro_blocks) { + free(block->macro_blocks); + } + block->context_id = 0; + block->num_blocks = 0; + block->privData = NULL; + + return Success; +} + + +/*************************************************************************** +// Function: dp (Debug Print) +// Description: This function prints out in hex i * uint32_t at the address +// supplied. This enables you to print out the dma buffers from +// within the debugger even though they are not in your address space. +***************************************************************************/ +void dp(unsigned int *address, unsigned int i) { + int j; + + printf("DebugPrint:\n"); + for(j=0; jaddress; + *data++ = CMD_FLUSH; + *data++ = BOOLEAN_ENA_2; + *data++ = CMD_FLUSH; + *data++ = DEST_BUFFER_INFO; + *data++ = privTarget->dbi1y; + *data++ = DEST_BUFFER_VAR; + *data++ = privTarget->dbv1; + /* Past Surface */ + *data++ = CMD_MAP_INFO; + *data++ = privPast->mi1y; + *data++ = privPast->mi2y; + *data++ = privPast->mi3y; + /* Future Surface */ + *data++ = CMD_MAP_INFO; + *data++ = privFuture->mi1y | 0x1<<28; + *data++ = privFuture->mi2y; + *data++ = privFuture->mi3y; + + mc.idx = pDMA->idx; + mc.used = (uint)data - (uint)pDMA->address; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); +} + +static __inline__ void renderError(void) { + printf("Invalid Macroblock Parameters found.\n"); + return; +} + +/*************************************************************************** +// Function: renderIntrainFrame +// Description: inline function that sets hardware parameters for an Intra +// encoded macroblock in a Frame picture. +***************************************************************************/ +static __inline__ void renderIntrainFrame(uint **datay,uint **datau, + uint **datav, + XvMCMacroBlock *mb, + short *block_ptr) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Y Blocks */ + *dy++ = GFXBLOCK + 68; + *dy++ = (1<<30) | (3<<28) | (0xf<<24); + *dy++ = ((uint)mb->x<<20) | ((uint)mb->y<<4); + *dy++ = (16<<16) | 16; + *dy++ = 0; + *dy++ = 0; + PACK_INTRA_DATA(dy,block_ptr,256); + dy += 64; + block_ptr += 256; + /* End Y Blocks */ + + /* U Block */ + *du++ = GFXBLOCK + 20; + *du++ = (2<<30) | (1<<28) | (1<<23); + *du++ = (((uint)mb->x)<<19) | (((uint)mb->y)<<3); + *du++ = (8<<16) | 8; + *du++ = 0; + *du++ = 0; + PACK_INTRA_DATA(du,block_ptr,64); + du += 16; + block_ptr += 64; + + /* V Block */ + *dv++ = GFXBLOCK + 20; + *dv++ = (3<<30) | (1<<28) | (1<<22); + *dv++ = (((uint)mb->x)<<19) | (((uint)mb->y)<<3); + *dv++ = (8<<16) | 8; + *dv++ = 0; + *dv++ = 0; + PACK_INTRA_DATA(dv,block_ptr,64); + dv += 16; + block_ptr += 64; + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderIntrainFrameDCT1 +// Description: inline function that sets hardware parameters for an Intra +// encoded macroblock in a Frame picture with DCT type 1. +***************************************************************************/ +static __inline__ void renderIntrainFrameDCT1(uint **datay,uint **datau, + uint **datav,XvMCMacroBlock *mb, + short *block_ptr,uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + + /* Y Blocks */ + *dy++ = GFXBLOCK + 36; + *dy++ = (1<<30) | (2<<28) | (0x3<<26) | (0x2<<6); + *dy++ = ((uint)mb->x<<20) | ((uint)mb->y<<3); + *dy++ = (8<<16) | 16; + *dy++ = 0; + *dy++ = 0; + PACK_INTRA_DATA(dy,block_ptr,128); + dy += 32; + block_ptr += 128; + + /* Second Y block */ + *dy++ = GFXBLOCK + 36; + *dy++ = (1<<30) | (2<<28) | (0x3<<26) | (0x3<<6); + *dy++ = ((uint)mb->x<<20) | ((uint)mb->y<<3); + *dy++ = (8<<16) | 16; + *dy++ = 0; + *dy++ = 0; + PACK_INTRA_DATA(dy,block_ptr,128); + dy += 32; + block_ptr += 128; + /* End Y Blocks */ + + + /* U Block */ + *du++ = GFXBLOCK + 20; + *du++ = (2<<30) | (1<<28) | (1<<23); + *du++ = (((uint)mb->x)<<19) | (((uint)mb->y)<<3); + *du++ = (8<<16) | 8; + *du++ = 0; + *du++ = 0; + PACK_INTRA_DATA(du,block_ptr,64); + du += 16; + block_ptr += 64; + + /* V Block */ + *dv++ = GFXBLOCK + 20; + *dv++ = (3<<30) | (1<<28) | (1<<22); + *dv++ = (((uint)mb->x)<<19) | (((uint)mb->y)<<3); + *dv++ = (8<<16) | 8; + *dv++ = 0; + *dv++ = 0; + PACK_INTRA_DATA(dv,block_ptr,64); + dv += 16; + block_ptr += 64; + + *datay = dy; + *datau = du; + *datav = dv; +} + + +/*************************************************************************** +// Function: renderIntrainField +// Description: inline function that sets hardware parameters for an Intra +// encoded macroblock in Field pictures. +***************************************************************************/ +static __inline__ void renderIntrainField(uint **datay,uint **datau, + uint **datav, + XvMCMacroBlock *mb,short *block_ptr, + uint ps) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<4); + uint dw1 = drps_table[~ps & 0x1]; + + /* Y Blocks */ + *dy++ = GFXBLOCK + 68; + *dy++ = (1<<30) | (3<<28) | (0xf<<24) | dw1; + *dy++ = xy; + *dy++ = (16<<16) | 16; + *dy++ = 0; + *dy++ = 0; + PACK_INTRA_DATA(dy,block_ptr,256); + dy += 64; + block_ptr += 256; + /* End Y Blocks */ + + xy >>= 1; + + /* U Block */ + *du++ = GFXBLOCK + 20; + *du++ = (2<<30) | (1<<28) | (1<<23) | dw1; + *du++ = xy; + *du++ = (8<<16) | 8; + *du++ = 0; + *du++ = 0; + PACK_INTRA_DATA(du,block_ptr,64); + du += 16; + block_ptr += 64; + + /* V Block */ + *dv++ = GFXBLOCK + 20; + *dv++ = (3<<30) | (1<<28) | (1<<22) | dw1; + *dv++ = xy; + *dv++ = (8<<16) | 8; + *dv++ = 0; + *dv++ = 0; + PACK_INTRA_DATA(dv,block_ptr,64); + dv += 16; + block_ptr += 64; + + *datay = dy; + *datau = du; + *datav = dv; +} + + +/*************************************************************************** +// Function: renderFieldinField +// Description: inline function that sets hardware parameters for a Field +// encoded macroblock in a Field Picture. +***************************************************************************/ +static __inline__ void renderFieldinField(uint **datay,uint **datau, + uint **datav, + XvMCMacroBlock *mb,short *block_ptr, + uint ps, uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[2]; + short bmv[2]; + /* gfxblock dword 1 */ + uint dw1; + + uint parity = ~ps & XVMC_TOP_FIELD; + + uint ysize = y_frame_bytes[mb->coded_block_pattern]; + uint usize = u_frame_bytes[mb->coded_block_pattern]; + uint vsize = v_frame_bytes[mb->coded_block_pattern]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<4); + + /* i810 Specific flag used to identify the second field in a P frame */ + if(flags & 0x80000000) { + /* P Frame */ + if((mb->motion_vertical_field_select & XVMC_SELECT_FIRST_FORWARD) == + parity) { + /* Same parity, use reference field (map0) */ + dw1 = 1<<12 | ((0x2 + parity)<<6) | ((0x2 + parity)<<3) | + (((uint)mb->coded_block_pattern)<<22); + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + bmv[0] = 0; + bmv[1] = 0; + } + else { + /* + Opposite parity, set up as if it were backward + motion and use map1. + */ + dw1 = 2<<12 | ((0x2 + parity)<<6) | (0x3 - parity) | + (((uint)mb->coded_block_pattern)<<22); + bmv[0] = mb->PMV[0][0][1]; + bmv[1] = mb->PMV[0][0][0]; + fmv[0] = 0; + fmv[1] = 0; + } + } + else { + dw1 = type_table[mb->macroblock_type & 0xf] | + drps_table[~ps & 0x1] | + mvfs_table[mb->motion_vertical_field_select & 3] | + (((uint)mb->coded_block_pattern)<<22); + + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + + bmv[0] = mb->PMV[0][1][1]; + bmv[1] = mb->PMV[0][1][0]; + } + + /* Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (3<<28) | dw1; + *dy++ = xy; + *dy++ = (16<<16) | 16; + *dy++ = *(uint *)fmv; + *dy++ = *(uint *)bmv; + PACK_CORR_DATA(dy,block_ptr,ysize); + block_ptr = (short *)((uint)block_ptr + ysize); + /* End Y Blocks */ + + fmv[0] /= 2; + fmv[1] /= 2; + bmv[0] /= 2; + bmv[1] /= 2; + xy >>= 1; + + /* U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1; + *du++ = xy; + *du++ = (8<<16) | 8; + *du++ = *(uint *)fmv; + *du++ = *(uint *)bmv; + PACK_CORR_DATA(du,block_ptr,usize); + block_ptr = (short *)((uint)block_ptr + usize); + + /* V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1; + *dv++ = xy; + *dv++ = (8<<16) | 8; + *dv++ = *(uint *)fmv; + *dv++ = *(uint *)bmv; + PACK_CORR_DATA(dv,block_ptr,vsize); + block_ptr = (short *)((uint)block_ptr + vsize); + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: render16x8inField +// Description: inline function that sets hardware parameters for a 16x8 +// encoded macroblock in a field picture. +***************************************************************************/ +static __inline__ void render16x8inField(uint **datay,uint **datau, + uint **datav, + XvMCMacroBlock *mb,short *block_ptr, + uint ps, uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[4]; + short bmv[4]; + /* gfxblock dword 1 */ + uint dw1[2]; + + uint y1size = y_first_field_bytes[mb->coded_block_pattern]; + uint y2size = y_second_field_bytes[mb->coded_block_pattern]; + uint usize = u_field_bytes[mb->coded_block_pattern]; + uint vsize = v_field_bytes[mb->coded_block_pattern]; + + uint parity = ~ps & XVMC_TOP_FIELD; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<4); + + /* i810 Specific flag used to identify the second field in a P frame */ + if(flags & 0x80000000) { + /* P Frame */ + if((mb->motion_vertical_field_select & XVMC_SELECT_FIRST_FORWARD) == + parity) { + /* Same parity, use reference field (map0) */ + dw1[0] = 1<<12 | ((0x2 + parity)<<6) | ((0x2 + parity)<<3) | + (((uint)mb->coded_block_pattern)<<22); + + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + bmv[0] = 0; + bmv[1] = 0; + } + else { + /* + Opposite parity, set up as if it were backward + motion and use map1. + */ + dw1[0] = 2<<12 | ((0x2 + parity)<<6) | (0x3 - parity) | + (((uint)mb->coded_block_pattern)<<22); + + bmv[0] = mb->PMV[0][0][1]; + bmv[1] = mb->PMV[0][0][0]; + fmv[0] = 0; + fmv[1] = 0; + } + if((mb->motion_vertical_field_select & XVMC_SELECT_SECOND_FORWARD) == + (parity<<2)) { + /* Same parity, use reference field (map0) */ + dw1[1] = 1<<12 | ((0x2 + parity)<<6) | ((0x2 + parity)<<3) | + ((((uint)mb->coded_block_pattern<<22) & (0x3<<22)) | + (((uint)mb->coded_block_pattern<<24) & (0x3<<26))); + + fmv[2] = mb->PMV[1][0][1]; + fmv[3] = mb->PMV[1][0][0]; + bmv[2] = 0; + bmv[3] = 0; + } + else { + /* + Opposite parity, set up as if it were backward + motion and use map1. + */ + dw1[1] = 2<<12 | ((0x2 + parity)<<6) | (0x3 - parity) | + ((((uint)mb->coded_block_pattern<<22) & (0x3<<22)) | + (((uint)mb->coded_block_pattern<<24) & (0x3<<26))); + + bmv[2] = mb->PMV[1][0][1]; + bmv[3] = mb->PMV[1][0][0]; + fmv[2] = 0; + fmv[3] = 0; + } + } + else { + dw1[0] = type_table[mb->macroblock_type & 0xf] | + drps_table[~ps & 0x1] | + mvfs_table[mb->motion_vertical_field_select & 3] | + (((uint)mb->coded_block_pattern)<<22); + + dw1[1] = type_table[mb->macroblock_type & 0xf] | + drps_table[~ps & 0x1] | + mvfs_table[(mb->motion_vertical_field_select>>2) & 0x3] | + ((((uint)mb->coded_block_pattern<<22) & (0x3<<22)) | + (((uint)mb->coded_block_pattern<<24) & (0x3<<26))); + + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + fmv[2] = mb->PMV[1][0][1]; + fmv[3] = mb->PMV[1][0][0]; + + bmv[0] = mb->PMV[0][1][1]; + bmv[1] = mb->PMV[0][1][0]; + bmv[2] = mb->PMV[1][1][1]; + bmv[3] = mb->PMV[1][1][0]; + } + + /* First Y Block */ + *dy++ = GFXBLOCK + 4 + (y1size>>2); + *dy++ = (1<<30) | (2<<28) | dw1[0]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)fmv; + *dy++ = *(uint *)bmv; + PACK_CORR_DATA(dy,block_ptr,y1size); + block_ptr = (short *)((uint)block_ptr + y1size); + + /* Second Y Block */ + *dy++ = GFXBLOCK + 4 + (y2size>>2); + *dy++ = (1<<30) | (2<<28) | dw1[1]; + *dy++ = (xy + 8); + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)&fmv[2]; + *dy++ = *(uint *)&bmv[2]; + PACK_CORR_DATA(dy,block_ptr,y2size); + block_ptr = (short *)((uint)block_ptr + y2size); + /* End Y Blocks */ + + fmv[0] /= 2; + fmv[1] /= 2; + fmv[2] /= 2; + fmv[3] /= 2; + + bmv[0] /= 2; + bmv[1] /= 2; + bmv[2] /= 2; + bmv[3] /= 2; + + xy >>= 1; + + /* U Blocks */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[0]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)fmv; + *du++ = *(uint *)bmv; + PACK_CORR_DATA(du,block_ptr,usize); + block_ptr = (short *)((uint)block_ptr + usize); + + /* Second U block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[1]; + *du++ = (xy + 4); + *du++ = (4<<16) | 8; + *du++ = *(uint *)&fmv[2]; + *du++ = *(uint *)&bmv[2]; + PACK_CORR_DATA(du,block_ptr,usize); + block_ptr = (short *)((uint)block_ptr + usize); + /* End U Blocks */ + + /* V Blocks */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[0]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)fmv; + *dv++ = *(uint *)bmv; + PACK_CORR_DATA(dv,block_ptr,vsize); + block_ptr = (short *)((uint)block_ptr + vsize); + + /* Second V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[1]; + *dv++ = (xy + 4); + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)&fmv[2]; + *dv++ = *(uint *)&bmv[2]; + PACK_CORR_DATA(dv,block_ptr,vsize); + block_ptr = (short *)((uint)block_ptr + vsize); + /* End V Blocks */ + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderDualPrimeinField +// Description: inline function that sets hardware parameters for a Dual +// prime encoded macroblock in a field picture. +***************************************************************************/ +static __inline__ void renderDualPrimeinField(uint **datay,uint **datau, + uint **datav,XvMCMacroBlock *mb, + short *block_ptr,uint ps, + uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[2]; + short bmv[2]; + /* gfxblock dword 1 */ + uint dw1; + + + uint ysize = y_frame_bytes[mb->coded_block_pattern]; + uint usize = u_frame_bytes[mb->coded_block_pattern]; + uint vsize = v_frame_bytes[mb->coded_block_pattern]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<4); + + + if(ps & XVMC_TOP_FIELD) { + dw1 = (mb->coded_block_pattern<<22) | 3<<12 | 2<<6 | 2<<3 | 3; + } + else { + dw1 = (mb->coded_block_pattern<<22) | 3<<12 | 3<<6 | 3<<3 | 2; + } + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + bmv[0] = mb->PMV[0][1][1]; + bmv[1] = mb->PMV[0][1][0]; + + /* Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (3<<28) | dw1; + *dy++ = xy; + *dy++ = (16<<16) | 16; + *dy++ = *(uint *)fmv; + *dy++ = *(uint *)bmv; + PACK_CORR_DATA(dy,block_ptr,ysize); + block_ptr = (short *)((uint)block_ptr + ysize); + /* End Y Blocks */ + + fmv[0] /= 2; + fmv[1] /= 2; + bmv[0] /= 2; + bmv[1] /= 2; + xy >>= 1; + + /* U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1; + *du++ = xy; + *du++ = (8<<16) | 8; + *du++ = *(uint *)fmv; + *du++ = *(uint *)bmv; + PACK_CORR_DATA(du,block_ptr,usize); + block_ptr = (short *)((uint)block_ptr + usize); + + /* V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1; + *dv++ = xy; + *dv++ = (8<<16) | 8; + *dv++ = *(uint *)fmv; + *dv++ = *(uint *)bmv; + PACK_CORR_DATA(dv,block_ptr,vsize); + block_ptr = (short *)((uint)block_ptr + vsize); + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderFieldinFrame +// Description: inline function that sets hardware parameters for a Field +// encoded macroblock in a frame picture. +***************************************************************************/ +static __inline__ void renderFieldinFrame(uint **datay,uint **datau, + uint **datav, + XvMCMacroBlock *mb,short *block_ptr, + uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[4]; + short bmv[4]; + /* gfxblock dword 1 */ + uint dw1[2]; + + uint y1size = y_first_field_bytes[mb->coded_block_pattern]; + uint y2size = y_second_field_bytes[mb->coded_block_pattern]; + uint usize = u_field_bytes[mb->coded_block_pattern]; + uint vsize = v_field_bytes[mb->coded_block_pattern]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<3); + + dw1[0] = type_table[mb->macroblock_type & 0xf] | (0x2<<6) | + mvfs_table[mb->motion_vertical_field_select & 3] | + (((uint)mb->coded_block_pattern)<<22); + + dw1[1] = type_table[mb->macroblock_type & 0xf] | (0x3<<6) | + mvfs_table[mb->motion_vertical_field_select>>2] | + (((mb->coded_block_pattern & 0x3) | + ((mb->coded_block_pattern & 0xc)<<2))<<22); + + fmv[0] = mb->PMV[0][0][1]/2; + fmv[1] = mb->PMV[0][0][0]; + fmv[2] = mb->PMV[1][0][1]/2; + fmv[3] = mb->PMV[1][0][0]; + + bmv[0] = mb->PMV[0][1][1]/2; + bmv[1] = mb->PMV[0][1][0]; + bmv[2] = mb->PMV[1][1][1]/2; + bmv[3] = mb->PMV[1][1][0]; + + /* First Y Block */ + *dy++ = GFXBLOCK + 4 + (y1size>>2); + *dy++ = (1<<30) | (2<<28) | dw1[0]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)&fmv[0]; + *dy++ = *(uint *)&bmv[0]; + PACK_CORR_DATA(dy,block_ptr,y1size); + block_ptr = (short *)((uint)block_ptr + y1size); + + /* Second Y Block */ + *dy++ = GFXBLOCK + 4 + (y2size>>2); + *dy++ = (1<<30) | (2<<28) | dw1[1]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)&fmv[2]; + *dy++ = *(uint *)&bmv[2]; + PACK_CORR_DATA(dy,block_ptr,y2size); + block_ptr = (short *)((uint)block_ptr + y2size); + /* End Y Blocks */ + + fmv[0] /= 2; + fmv[1] /= 2; + fmv[2] /= 2; + fmv[3] /= 2; + + bmv[0] /= 2; + bmv[1] /= 2; + bmv[2] /= 2; + bmv[3] /= 2; + + xy >>= 1; + + /* U Blocks */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[0]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)&fmv[0]; + *du++ = *(uint *)&bmv[0]; + if(usize) { + PACK_CORR_DATA_SHORT(du,block_ptr); + } + + /* Second U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[1]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)&fmv[2]; + *du++ = *(uint *)&bmv[2]; + if(usize) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(du,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End U Blocks */ + + /* V Blocks */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[0]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)&fmv[0]; + *dv++ = *(uint *)&bmv[0]; + if(vsize) { + PACK_CORR_DATA_SHORT(dv,block_ptr); + } + + /* Second V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[1]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)&fmv[2]; + *dv++ = *(uint *)&bmv[2]; + if(vsize) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(dv,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End V Blocks */ + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderFieldinFrameDCT0 +// Description: inline function that sets hardware parameters for a Field +// encoded macroblock in a frame picture with DCT0. +***************************************************************************/ +static __inline__ void renderFieldinFrameDCT0(uint **datay,uint **datau, + uint **datav,XvMCMacroBlock *mb, + short *block_ptr,uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[4]; + short bmv[4]; + /* CBP */ + uint cbp = (uint)mb->coded_block_pattern; + /* gfxblock dword 1 */ + uint dw1[2]; + + short * top_left_b = NULL; + short * top_right_b = NULL; + short * bottom_left_b = NULL; + short * bottom_right_b = NULL; + + unsigned int ysize = y_dct0_field_bytes[cbp]; + unsigned int usize = u_field_bytes[cbp]; + unsigned int vsize = v_field_bytes[cbp]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<3); + + dw1[0] = type_table[mb->macroblock_type & 0xf] | (0x2<<6) | + mvfs_table[mb->motion_vertical_field_select & 3] | + ((cbp | ((cbp<<2) & 0x30))<<22); + + dw1[1] = type_table[mb->macroblock_type & 0xf] | (0x3<<6) | + mvfs_table[mb->motion_vertical_field_select>>2] | + ((cbp | ((cbp<<2) & 0x30))<<22); + + + fmv[0] = mb->PMV[0][0][1]/2; + fmv[1] = mb->PMV[0][0][0]; + fmv[2] = mb->PMV[1][0][1]/2; + fmv[3] = mb->PMV[1][0][0]; + + bmv[0] = mb->PMV[0][1][1]/2; + bmv[1] = mb->PMV[0][1][0]; + bmv[2] = mb->PMV[1][1][1]/2; + bmv[3] = mb->PMV[1][1][0]; + + /* + The i810 cannot use DCT0 directly with field motion, we have to + interlace the data for it. We use a zero block when the CBP has + one half of the to-be-interlaced data but not the other half. + */ + top_left_b = &empty_block[0]; + if(cbp & 0x20) { + top_left_b = block_ptr; + block_ptr += 64; + } + + top_right_b = &empty_block[0]; + if(cbp & 0x10) { + top_right_b = block_ptr; + block_ptr += 64; + } + + bottom_left_b = &empty_block[0]; + if(cbp & 0x8) { + bottom_left_b = block_ptr; + block_ptr += 64; + } + + bottom_right_b = &empty_block[0]; + if(cbp & 0x4) { + bottom_right_b = block_ptr; + block_ptr += 64; + } + + /* First Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (2<<28) | dw1[0]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)&fmv[0]; + *dy++ = *(uint *)&bmv[0]; + if(dw1[0] & (1<<27)) { + PACK_CORR_DATA_0to1(dy,top_left_b,bottom_left_b); + } + if(dw1[0] & (1<<26)) { + PACK_CORR_DATA_0to1(dy,top_right_b,bottom_right_b); + } + + /* Second Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (2<<28) | dw1[1]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)&fmv[2]; + *dy++ = *(uint *)&bmv[2]; + if(dw1[1] & (1<<27)) { + top_left_b = (short *)((uint)top_left_b + 16); + bottom_left_b = (short *)((uint)bottom_left_b + 16); + PACK_CORR_DATA_0to1(dy,top_left_b,bottom_left_b); + } + if(dw1[1] & (1<<26)) { + top_right_b = (short *)((uint)top_right_b + 16); + bottom_right_b = (short *)((uint)bottom_right_b + 16); + PACK_CORR_DATA_0to1(dy,top_right_b,bottom_right_b); + } + /* End Y Blocks */ + + fmv[0] /= 2; + fmv[1] /= 2; + fmv[2] /= 2; + fmv[3] /= 2; + + bmv[0] /= 2; + bmv[1] /= 2; + bmv[2] /= 2; + bmv[3] /= 2; + + xy >>= 1; + + /* U Blocks */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[0]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)&fmv[0]; + *du++ = *(uint *)&bmv[0]; + if(usize) { + PACK_CORR_DATA_SHORT(du,block_ptr); + } + + /* Second U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[1]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)&fmv[2]; + *du++ = *(uint *)&bmv[2]; + if(usize) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(du,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End U Blocks */ + + /* V Blocks */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[0]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)&fmv[0]; + *dv++ = *(uint *)&bmv[0]; + if(vsize) { + PACK_CORR_DATA_SHORT(dv,block_ptr); + } + + /* Second V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[1]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)&fmv[2]; + *dv++ = *(uint *)&bmv[2]; + if(vsize) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(dv,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End V Blocks */ + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderFrameinFrame +// Description: inline function that sets hardware parameters for a Frame +// encoded macroblock in a frame picture. +***************************************************************************/ +static __inline__ void renderFrameinFrame(uint **datay,uint **datau, + uint **datav, + XvMCMacroBlock *mb,short *block_ptr, + uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[2]; + short bmv[2]; + /* gfxblock dword 1 */ + uint dw1; + + unsigned int ysize = y_frame_bytes[mb->coded_block_pattern]; + unsigned int usize = u_frame_bytes[mb->coded_block_pattern]; + unsigned int vsize = v_frame_bytes[mb->coded_block_pattern]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<4); + + dw1 = type_table[mb->macroblock_type & 0xf] | + (((uint)mb->coded_block_pattern)<<22); + + + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + + bmv[0] = mb->PMV[0][1][1]; + bmv[1] = mb->PMV[0][1][0]; + + /* Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (3<<28) | dw1; + *dy++ = xy; + *dy++ = (16<<16) | 16; + *dy++ = *(uint *)fmv; + *dy++ = *(uint *)bmv; + PACK_CORR_DATA(dy,block_ptr,ysize); + block_ptr = (short *)((uint)block_ptr + ysize); + /* End Y Blocks */ + + fmv[0] /= 2; + fmv[1] /= 2; + + bmv[0] /= 2; + bmv[1] /= 2; + + xy >>= 1; + + /* U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1; + *du++ = xy; + *du++ = (8<<16) | 8; + *du++ = *(uint *)fmv; + *du++ = *(uint *)bmv; + PACK_CORR_DATA(du,block_ptr,usize); + block_ptr = (short *)((uint)block_ptr + usize); + /* End U Block */ + + /* V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1; + *dv++ = xy; + *dv++ = (8<<16) | 8; + *dv++ = *(uint *)fmv; + *dv++ = *(uint *)bmv; + PACK_CORR_DATA(dv,block_ptr,vsize); + block_ptr = (short *)((uint)block_ptr + vsize); + /* End V Block */ + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderFrameinFrameDCT1 +// Description: inline function that sets hardware parameters for a Frame +// encoded macroblock in a frame picture with DCT type 1. +***************************************************************************/ +static __inline__ void renderFrameinFrameDCT1(uint **datay,uint **datau, + uint **datav,XvMCMacroBlock *mb, + short *block_ptr,uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[4]; + short bmv[4]; + + short * top_left_b = NULL; + short * top_right_b = NULL; + short * bottom_left_b = NULL; + short * bottom_right_b = NULL; + + uint temp_bp = 0; + + uint ysize = y_dct1_frame_bytes[mb->coded_block_pattern]; + uint usize = u_frame_bytes[mb->coded_block_pattern]; + uint vsize = v_frame_bytes[mb->coded_block_pattern]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<4); + + uint dw1 = type_table[mb->macroblock_type & 0xf] | + (((uint)mb->coded_block_pattern)<<22); + + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + + bmv[0] = mb->PMV[0][1][1]; + bmv[1] = mb->PMV[0][1][0]; + + /* + It is easiest to find out what blocks are in need of reading first + rather than as we go. + */ + top_left_b = &empty_block[0]; + if(dw1 & (1<<27)) { + temp_bp |= (1<<25); + top_left_b = block_ptr; + block_ptr += 64; + } + + top_right_b = &empty_block[0]; + if(dw1 & (1<<26)) { + temp_bp |= (1<<24); + top_right_b = block_ptr; + block_ptr += 64; + } + + bottom_left_b = &empty_block[0]; + if(dw1 & (1<<25)) { + temp_bp |= (1<<27); + bottom_left_b = block_ptr; + block_ptr += 64; + } + + bottom_right_b = &empty_block[0]; + if(dw1 & (1<<24)) { + temp_bp |= (1<<26); + bottom_right_b = block_ptr; + block_ptr += 64; + } + dw1 |= temp_bp; + + /* Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (3<<28) | dw1; + *dy++ = xy; + *dy++ = (16<<16) | 16; + *dy++ = *(uint *)fmv; + *dy++ = *(uint *)bmv; + if(dw1 & (1<<27)) { + PACK_CORR_DATA_1to0(dy,top_left_b,bottom_left_b); + top_left_b = (short *)((uint)top_left_b + 64); + bottom_left_b = (short *)((uint)bottom_left_b + 64); + } + if(dw1 & (1<<26)) { + PACK_CORR_DATA_1to0(dy,top_right_b,bottom_right_b); + top_right_b = (short *)((uint)top_right_b + 64); + bottom_right_b = (short *)((uint)bottom_right_b + 64); + } + if(dw1 & (1<<27)) { + PACK_CORR_DATA_1to0(dy,top_left_b,bottom_left_b); + } + if(dw1 & (1<<26)) { + PACK_CORR_DATA_1to0(dy,top_right_b,bottom_right_b); + } + /* End Y Block */ + + fmv[0] /= 2; + fmv[1] /= 2; + + bmv[0] /= 2; + bmv[1] /= 2; + + xy >>= 1; + + /* U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1; + *du++ = xy; + *du++ = (8<<16) | 8; + *du++ = *(uint *)fmv; + *du++ = *(uint *)bmv; + PACK_CORR_DATA(du,block_ptr,usize); + block_ptr = (short *)((uint)block_ptr + usize); + + /* V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1; + *dv++ = xy; + *dv++ = (8<<16) | 8; + *dv++ = *(uint *)fmv; + *dv++ = *(uint *)bmv; + PACK_CORR_DATA(dv,block_ptr,vsize); + block_ptr = (short *)((uint)block_ptr + vsize); + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderDualPrimeinFrame +// Description: inline function that sets hardware parameters for a Dual +// Prime encoded macroblock in a frame picture with dct 1. +***************************************************************************/ +static __inline__ void renderDualPrimeinFrame(uint **datay,uint **datau, + uint **datav,XvMCMacroBlock *mb, + short *block_ptr,uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[4]; + short bmv[4]; + /* gfxblock dword 1 */ + uint dw1[2]; + + uint y1size = y_first_field_bytes[mb->coded_block_pattern]; + uint y2size = y_second_field_bytes[mb->coded_block_pattern]; + uint usize = u_field_bytes[mb->coded_block_pattern]; + uint vsize = v_field_bytes[mb->coded_block_pattern]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<3); + + /* + Past Surface (map 0) is used for same parity prediction, + Future surface (map 1) is used for opposite. + */ + dw1[0] = (((uint)mb->coded_block_pattern)<<22) | + 3<<12 | 2<<6 | 2<<3 | 3; + dw1[1] = (((mb->coded_block_pattern & 0x3) | + ((mb->coded_block_pattern & 0xc)<<2))<<22) | + 3<<12 | 3<<6 | 3<<3 | 2; + + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + bmv[0] = mb->PMV[1][0][1]; + bmv[1] = mb->PMV[1][0][0]; + + fmv[2] = mb->PMV[0][0][1]; + fmv[3] = mb->PMV[0][0][0]; + bmv[2] = mb->PMV[1][1][1]; + bmv[3] = mb->PMV[1][1][0]; + + /* First Y Block */ + *dy++ = GFXBLOCK + 4 + (y1size>>2); + *dy++ = (1<<30) | (2<<28) | dw1[0]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)fmv; + *dy++ = *(uint *)bmv;; + PACK_CORR_DATA(dy,block_ptr,y1size); + block_ptr = (short *)((uint)block_ptr + y1size); + + /* Second Y Block */ + *dy++ = GFXBLOCK + 4 + (y2size>>2); + *dy++ = (1<<30) | (2<<28) | dw1[1]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)&fmv[2]; + *dy++ = *(uint *)&bmv[2]; + PACK_CORR_DATA(dy,block_ptr,y2size); + block_ptr = (short *)((uint)block_ptr + y2size); + + fmv[0] /= 2; + fmv[1] /= 2; + bmv[0] /= 2; + bmv[1] /= 2; + + fmv[2] /= 2; + fmv[3] /= 2; + bmv[2] /= 2; + bmv[3] /= 2; + + xy >>= 1; + + /* U Blocks */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[0]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)fmv; + *du++ = *(uint *)bmv; + if(dw1[0] & (1<<23)) { + PACK_CORR_DATA_SHORT(du,block_ptr); + } + + /* Second U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[1]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)&fmv[2]; + *du++ = *(uint *)&bmv[2]; + if(dw1[1] & (1<<23)) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(du,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End U Blocks */ + + /* V Blocks */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[0]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)fmv; + *dv++ = *(uint *)bmv; + if(dw1[0] & (1<<22)) { + PACK_CORR_DATA_SHORT(dv,block_ptr); + } + + /* Second V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[1]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)&fmv[2]; + *dv++ = *(uint *)&bmv[2]; + if(dw1[1] & (1<<22)) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(dv,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End V Blocks */ + + *datay = dy; + *datau = du; + *datav = dv; +} + +/*************************************************************************** +// Function: renderDualPrimeinFrameDCT0 +// Description: inline function that sets hardware parameters for a Dual +// Prime encoded macroblock in a frame picture with dct 0. +***************************************************************************/ +static __inline__ void renderDualPrimeinFrameDCT0(uint **datay,uint **datau, + uint **datav, + XvMCMacroBlock *mb, + short *block_ptr, + uint flags) { + + register uint *dy = *datay; + register uint *du = *datau; + register uint *dv = *datav; + + /* Motion Vectors */ + short fmv[4]; + short bmv[4]; + /* gfxblock dword 1 */ + uint dw1[2]; + + short * top_left_b = NULL; + short * top_right_b = NULL; + short * bottom_left_b = NULL; + short * bottom_right_b = NULL; + + uint cbp = (uint)mb->coded_block_pattern; + + uint ysize = y_dct0_field_bytes[cbp]; + uint usize = u_field_bytes[cbp]; + uint vsize = v_field_bytes[cbp]; + + uint xy = ((uint)mb->x<<20) | ((uint)mb->y<<3); + + /* + Past Surface (map 0) is used for same parity prediction, + Future surface (map 1) is used for opposite. + */ + dw1[0] = ((cbp | ((cbp<<2) & 0x30))<<22) | + 3<<12 | 2<<6 | 2<<3 | 3; + dw1[1] = ((cbp | ((cbp<<2) & 0x30))<<22) | + 3<<12 | 3<<6 | 3<<3 | 2; + + fmv[0] = mb->PMV[0][0][1]; + fmv[1] = mb->PMV[0][0][0]; + bmv[0] = mb->PMV[1][0][1]; + bmv[1] = mb->PMV[1][0][0]; + + fmv[2] = mb->PMV[0][0][1]; + fmv[3] = mb->PMV[0][0][0]; + bmv[2] = mb->PMV[1][1][1]; + bmv[3] = mb->PMV[1][1][0]; + + /* + The i810 cannot use DCT0 directly with field motion, we have to + interlace the data for it. We use a zero block when the CBP has + one half of the to-be-interlaced data but not the other half. + */ + top_left_b = &empty_block[0]; + if(cbp & 0x20) { + top_left_b = block_ptr; + block_ptr += 64; + } + + top_right_b = &empty_block[0]; + if(cbp & 0x10) { + top_right_b = block_ptr; + block_ptr += 64; + } + + bottom_left_b = &empty_block[0]; + if(cbp & 0x8) { + bottom_left_b = block_ptr; + block_ptr += 64; + } + + bottom_right_b = &empty_block[0]; + if(cbp & 0x4) { + bottom_right_b = block_ptr; + block_ptr += 64; + } + + /* First Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (2<<28) | dw1[0]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)fmv; + *dy++ = *(uint *)bmv; + if(cbp & 0x20) { + PACK_CORR_DATA_0to1(dy,top_left_b,bottom_left_b); + } + if(cbp & 0x10) { + PACK_CORR_DATA_0to1(dy,top_right_b,bottom_right_b); + } + + /* Second Y Block */ + *dy++ = GFXBLOCK + 4 + (ysize>>2); + *dy++ = (1<<30) | (2<<28) | dw1[1]; + *dy++ = xy; + *dy++ = (8<<16) | 16; + *dy++ = *(uint *)&fmv[2]; + *dy++ = *(uint *)&bmv[2]; + if(cbp & 0x20) { + top_left_b = (short *)((uint)top_left_b + 16); + bottom_left_b = (short *)((uint)bottom_left_b + 16); + PACK_CORR_DATA_0to1(dy,top_left_b,bottom_left_b); + } + if(cbp & 0x10) { + top_right_b = (short *)((uint)top_right_b + 16); + bottom_right_b = (short *)((uint)bottom_right_b + 16); + PACK_CORR_DATA_0to1(dy,top_right_b,bottom_right_b); + } + /* End Y Blocks */ + + + fmv[0] /= 2; + fmv[1] /= 2; + bmv[0] /= 2; + bmv[1] /= 2; + + fmv[2] /= 2; + fmv[3] /= 2; + bmv[2] /= 2; + bmv[3] /= 2; + + xy >>= 1; + + /* U Blocks */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[0]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)fmv; + *du++ = *(uint *)bmv; + if(cbp & (1<<23)) { + PACK_CORR_DATA_SHORT(du,block_ptr); + } + + /* Second U Block */ + *du++ = GFXBLOCK + 4 + (usize>>2); + *du++ = (2<<30) | (1<<28) | dw1[1]; + *du++ = xy; + *du++ = (4<<16) | 8; + *du++ = *(uint *)&fmv[2]; + *du++ = *(uint *)&bmv[2]; + if(cbp & (1<<23)) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(du,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End U Blocks */ + + /* V Blocks */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[0]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)fmv; + *dv++ = *(uint *)bmv; + if(cbp & (1<<22)) { + PACK_CORR_DATA_SHORT(dv,block_ptr); + } + + /* Second V Block */ + *dv++ = GFXBLOCK + 4 + (vsize>>2); + *dv++ = (3<<30) | (1<<28) | dw1[1]; + *dv++ = xy; + *dv++ = (4<<16) | 8; + *dv++ = *(uint *)&fmv[2]; + *dv++ = *(uint *)&bmv[2]; + if(cbp & (1<<22)) { + block_ptr = (short *)((uint)block_ptr + 16); + PACK_CORR_DATA_SHORT(dv,block_ptr); + block_ptr = (short *)((uint)block_ptr + 112); + } + /* End V Blocks */ + + *datay = dy; + *datau = du; + *datav = dv; +} + + +/*************************************************************************** +// Function: XvMCRenderSurface +// Description: This function does the actual HWMC. Given a list of +// macroblock structures it dispatched the hardware commands to execute +// them. DMA buffer containing Y data are dispatched as they fill up +// U and V DMA buffers are queued until all Y's are done. This minimizes +// the context flipping and flushing required when switching between Y +// U and V surfaces. +***************************************************************************/ +#define UV_QUEUE 14 +Status XvMCRenderSurface(Display *display, XvMCContext *context, + unsigned int picture_structure, + XvMCSurface *target_surface, + XvMCSurface *past_surface, + XvMCSurface *future_surface, + unsigned int flags, + unsigned int num_macroblocks, + unsigned int first_macroblock, + XvMCMacroBlockArray *macroblock_array, + XvMCBlockArray *blocks) { + /* Dma Data Structures */ + drmBufPtr pDMAy = NULL,pDMAu[UV_QUEUE],pDMAv[UV_QUEUE]; + int u_index = 0,v_index = 0; + int dirty_context = 1; + + /* Block Pointer */ + short *block_ptr; + /* Current Macroblock Pointer */ + XvMCMacroBlock *mb; + + drm_i810_mc_t mc; + int i,j; + i810XvMCSurface *privTarget; + i810XvMCSurface *privFuture = NULL; + i810XvMCSurface *privPast = NULL; + i810XvMCContext *pI810XvMC; + + /* DMA Pointers set to NULL */ + uint *datay = NULL; + uint *datau = NULL; + uint *datav = NULL; + + + /* Check Parameters for validity */ + if((target_surface == NULL) || (context == NULL) || (display == NULL)) { + printf("Error, Invalid Target,Context, or DIsplay!\n"); + return BadValue; + } + + if(num_macroblocks == 0) {return Success;} + if((macroblock_array == NULL) || (blocks == NULL)) {return BadValue;} + if(context->privData == NULL) {return BadValue;} + pI810XvMC = (i810XvMCContext *)context->privData; + + + if(target_surface->privData == NULL) { + printf("Error, Invalid Target Surface!\n"); + return BadValue; + } + privTarget = (i810XvMCSurface *)target_surface->privData; + + if(macroblock_array->num_blocks < (num_macroblocks + first_macroblock)) { + printf("Error, Too many macroblocks requested for MB array size.\n"); + return BadValue; + } + + /* Test For YV12 Surface */ + if(context->surface_type_id != FOURCC_YV12) { + printf("Error, HWMC only possible on YV12 Surfaces\n"); + return BadValue; + } + + /* P Frame Test */ + if(past_surface == NULL) { + /* Just to avoid some ifs later. */ + privPast = privTarget; + } + else { + if(past_surface->privData == NULL) { + printf("Error, Invalid Past Surface!\n"); + return BadValue; + } + privPast = (i810XvMCSurface *)past_surface->privData; + } + + + /* B Frame Test */ + if(future_surface == NULL) { + privFuture = privTarget; + if(pI810XvMC->dual_prime) { + privFuture = privPast; + /* I810 Specific flag for marking when dual prime is in use. */ + flags |= 0x40000000; + } + + /* + References are different for the Second Field Picture. The + i810 needs to know if it is the second field picture in a + P picture. We use a Private flag to mark this. + */ + if(flags & XVMC_SECOND_FIELD) { + /* I810 Specific flag for marking second fields. */ + flags |= 0x80000000; + } + } + else { + if((future_surface->privData == NULL) || (past_surface == NULL)) { + printf("Error, Invalid Future Surface or No Past Surface!\n"); + return BadValue; + } + privFuture = (i810XvMCSurface *)future_surface->privData; + + /* + Undo Second Field flag since the second field in B frames is just like + the first. + */ + flags &= ~0x80000000; + } + + /* Lock For DMA */ + I810_LOCK(pI810XvMC,0); + + for(i=first_macroblock; i<(num_macroblocks + first_macroblock); i++) { + /* Set up values needed for each macroblock */ + mb = ¯oblock_array->macro_blocks[i]; + block_ptr = &(blocks->blocks[mb->index<<6]); + + /* Lockup can happen if the coordinates are too far out of range */ + if(mb->x > target_surface->width>>4) { + mb->x = 0; + } + if(mb->y > target_surface->height>>4) { + mb->y = 0; + } + + /* If buffers are almost full dispatch them */ + if(datay) { + pDMAy->used = (uint)datay - (uint)pDMAy->address; + if(pDMAy->used > 3520) { + if(dirty_context) { + dispatchYContext(privTarget,privPast,privFuture,pI810XvMC); + } + dirty_context = 0; + mc.idx = pDMAy->idx; + mc.used = pDMAy->used; + datay = NULL; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); + } /* datay near full */ + } /* if(datay) */ + if(datau) { + pDMAu[u_index]->used = (uint)datau - (uint)pDMAu[u_index]->address; + if(pDMAu[u_index]->used > 3904) { + u_index++; + datau = NULL; + if(u_index == UV_QUEUE) { + for(j=0; jidx; + mc.used = pDMAu[j]->used; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); + } + u_index = 0; + dirty_context = 1; + } /* if(u_index == UV_QUEUE) */ + } /* datau near full */ + } /* if(datau) */ + if(datav) { + pDMAv[v_index]->used = (uint)datav - (uint)pDMAv[v_index]->address; + if(pDMAv[v_index]->used > 3904) { + v_index++; + datav = NULL; + if(v_index == UV_QUEUE) { + for(j=0; jidx; + mc.used = pDMAv[j]->used; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); + } + v_index = 0; + dirty_context = 1; + } /* if(v_index == UV_QUEUE) */ + } /* datav near full */ + } /* if(datav) */ + + /* Allocate buffers if this is the first loop,or if we just dispatched */ + if(datay == NULL) { + pDMAy = i810_get_free_buffer(pI810XvMC); + datay = pDMAy->address; + }/* if(datay == NULL) */ + if(datau == NULL) { + pDMAu[u_index] = i810_get_free_buffer(pI810XvMC); + datau = pDMAu[u_index]->address; + if(u_index == 0) { + *datau++ = CMD_FLUSH; + *datau++ = BOOLEAN_ENA_2; + *datau++ = CMD_FLUSH; + *datau++ = DEST_BUFFER_INFO; + *datau++ = privTarget->dbi1u; + *datau++ = DEST_BUFFER_VAR; + *datau++ = privTarget->dbv1; + /* Past Surface */ + *datau++ = CMD_MAP_INFO; + *datau++ = privPast->mi1u; + *datau++ = privPast->mi2u; + *datau++ = privPast->mi3u; + /* Future Surface */ + *datau++ = CMD_MAP_INFO; + *datau++ = privFuture->mi1u | 0x1<<28; + *datau++ = privFuture->mi2u; + *datau++ = privFuture->mi3u; + } + } /* if(datau == NULL) */ + if(datav == NULL) { + pDMAv[v_index] = i810_get_free_buffer(pI810XvMC); + datav = pDMAv[v_index]->address; + if(v_index == 0) { + *datav++ = CMD_FLUSH; + *datav++ = BOOLEAN_ENA_2; + *datav++ = CMD_FLUSH; + *datav++ = DEST_BUFFER_INFO; + *datav++ = privTarget->dbi1v; + *datav++ = DEST_BUFFER_VAR; + *datav++ = privTarget->dbv1; + /* Past Surface */ + *datav++ = CMD_MAP_INFO; + *datav++ = privPast->mi1v; + *datav++ = privPast->mi2v; + *datav++ = privPast->mi3v; + /* Future Surface */ + *datav++ = CMD_MAP_INFO; + *datav++ = privFuture->mi1v | 0x1<<28; + *datav++ = privFuture->mi2v; + *datav++ = privFuture->mi3v; + } + }/* if(datav == NULL) */ + + /* Catch no pattern case */ + if(!(mb->macroblock_type & 0x8)) { + mb->coded_block_pattern = 0; + } + + + if(mb->motion_type == XVMC_PREDICTION_DUAL_PRIME) { + /* + By default the maps will not be set up for dual + prime. We have to change them. + */ + if(!pI810XvMC->dual_prime) { + pI810XvMC->dual_prime = 1; + privFuture = privPast; + /* Y */ + *datay++ = CMD_MAP_INFO; + *datay++ = privFuture->mi1y | 0x1<<28; + *datay++ = privFuture->mi2y; + *datay++ = privFuture->mi3y; + /* U */ + *datau++ = CMD_MAP_INFO; + *datau++ = privFuture->mi1u | 0x1<<28; + *datau++ = privFuture->mi2u; + *datau++ = privFuture->mi3u; + /* V */ + *datav++ = CMD_MAP_INFO; + *datav++ = privFuture->mi1v | 0x1<<28; + *datav++ = privFuture->mi2v; + *datav++ = privFuture->mi3v; + } + } + if((pI810XvMC->dual_prime) && + (mb->motion_type != XVMC_PREDICTION_DUAL_PRIME)) { + pI810XvMC->dual_prime = 0; + privFuture = privTarget; + /* Y */ + *datay++ = CMD_MAP_INFO; + *datay++ = privFuture->mi1y | 0x1<<28; + *datay++ = privFuture->mi2y; + *datay++ = privFuture->mi3y; + /* U */ + *datau++ = CMD_MAP_INFO; + *datau++ = privFuture->mi1u | 0x1<<28; + *datau++ = privFuture->mi2u; + *datau++ = privFuture->mi3u; + /* V */ + *datav++ = CMD_MAP_INFO; + *datav++ = privFuture->mi1v | 0x1<<28; + *datav++ = privFuture->mi2v; + *datav++ = privFuture->mi3v; + } + + + /* Frame Picture */ + if((picture_structure & XVMC_FRAME_PICTURE) == XVMC_FRAME_PICTURE) { + /* Intra Blocks */ + if(mb->macroblock_type & XVMC_MB_TYPE_INTRA) { + if(mb->dct_type) { + renderIntrainFrameDCT1(&datay,&datau,&datav,mb,block_ptr,flags); + continue; + } + renderIntrainFrame(&datay,&datau,&datav,mb,block_ptr); + continue; + } + switch((mb->motion_type & 0x3) | (mb->dct_type<<2)) { + case 0x2: /* Frame DCT0 */ + renderFrameinFrame(&datay,&datau,&datav,mb,block_ptr,flags); + continue; + case 0x5: /* Field DCT1 */ + renderFieldinFrame(&datay,&datau,&datav,mb,block_ptr,flags); + continue; + case 0x6: /* Frame DCT1 */ + renderFrameinFrameDCT1(&datay,&datau,&datav,mb,block_ptr,flags); + continue; + case 0x1: /* Field DCT0 */ + renderFieldinFrameDCT0(&datay,&datau,&datav,mb,block_ptr,flags); + continue; + case 0x3: /* Dual Prime DCT0 */ + renderDualPrimeinFrame(&datay,&datau,&datav,mb,block_ptr,flags); + continue; + case 0x7: /* Dual Prime DCT1 */ + renderDualPrimeinFrameDCT0(&datay,&datau,&datav,mb,block_ptr,flags); + continue; + default: /* No Motion Type */ + renderError(); + continue; + } /* Switch */ + } /* Frame Picture */ + + /* Field Pictures */ + if(mb->macroblock_type & XVMC_MB_TYPE_INTRA) { + renderIntrainField(&datay,&datau,&datav,mb,block_ptr,picture_structure); + continue; + } + switch(mb->motion_type & 0x3) { + case 0x1: /* Field Motion */ + renderFieldinField(&datay,&datau,&datav,mb,block_ptr,picture_structure, + flags); + continue; + case 0x2: /* 16x8 Motion */ + render16x8inField(&datay,&datau,&datav,mb,block_ptr,picture_structure, + flags); + continue; + case 0x3: /* Dual Prime */ + renderDualPrimeinField(&datay,&datau,&datav,mb,block_ptr, + picture_structure,flags); + continue; + default: /* No Motion Type */ + renderError(); + continue; + } + continue; + + } /* for each Macroblock */ + + /* Dispatch remaining DMA buffers */ + if(dirty_context) { + dispatchYContext(privTarget,privPast,privFuture,pI810XvMC); + } + mc.idx = pDMAy->idx; + mc.used = (uint)datay - (uint)pDMAy->address; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); + + pDMAu[u_index]->used = (uint)datau - (uint)pDMAu[u_index]->address; + for(j=0; j<=u_index; j++) { + mc.idx = pDMAu[j]->idx; + mc.used = pDMAu[j]->used; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); + } + pDMAv[v_index]->used = (uint)datav - (uint)pDMAv[v_index]->address; + for(j=0; j<=v_index; j++) { + mc.idx = pDMAv[j]->idx; + mc.used = pDMAv[j]->used; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); + } + + I810_UNLOCK(pI810XvMC); + + return Success; +} + +/*************************************************************************** +// Function: XvMCPutSurface +// Description: +// Arguments: +// display: Connection to X server +// surface: Surface to be displayed +// draw: X Drawable on which to display the surface +// srcx: X coordinate of the top left corner of the region to be +// displayed within the surface. +// srcy: Y coordinate of the top left corner of the region to be +// displayed within the surface. +// srcw: Width of the region to be displayed. +// srch: Height of the region to be displayed. +// destx: X cordinate of the top left corner of the destination region +// in the drawable coordinates. +// desty: Y cordinate of the top left corner of the destination region +// in the drawable coordinates. +// destw: Width of the destination region. +// desth: Height of the destination region. +// flags: One or more of the following. +// XVMC_TOP_FIELD - Display only the Top field of the surface. +// XVMC_BOTTOM_FIELD - Display only the Bottom Field of the surface. +// XVMC_FRAME_PICTURE - Display both fields or frame. +// +// Info: Portions of this function derived from i810_video.c (XFree86) +// +// This function is organized so that we wait as long as possible before +// touching the overlay registers. Since we don't know that the last +// flip has happened yet we want to give the overlay as long as +// possible to catch up before we have to check on its progress. This +// makes it unlikely that we have to wait on the last flip. +***************************************************************************/ +Status XvMCPutSurface(Display *display,XvMCSurface *surface, + Drawable draw, short srcx, short srcy, + unsigned short srcw, unsigned short srch, + short destx, short desty, + unsigned short destw, unsigned short desth, + int flags) { + i810XvMCContext *pI810XvMC; + i810XvMCSurface *pI810Surface; + i810OverlayRecPtr pORegs; + unsigned int ysrc_offset,uvsrc_offset; + Box extents; + uint window_width,window_height; + unsigned int xscaleInt = 0,xscaleFract = 0,yscaleInt = 0,yscaleFract = 0; + unsigned int xscaleFractUV = 0,xscaleIntUV = 0,yscaleFractUV = 0; + unsigned int yscaleIntUV = 0,yPitch = 0,uvPitch = 0; + unsigned int ovcmd = 0; + uint d; + double xscale,yscale; + int diff; + int clipped_srcx, clipped_srcy, clipped_destx, clipped_desty; + int clipped_srcw, clipped_srch, clipped_destw, clipped_desth; + uint x1,y1,root_width,root_height; + int x2 = 0, y2 = 0,unused; + uint nChilds; + int stat; + Window win,root,parent,*pChilds; + + + if((display == NULL) || (surface == NULL)) { + return BadValue; + } + + if(surface->privData == NULL) { + return (error_base + XvMCBadSurface); + } + pI810Surface = (i810XvMCSurface *)surface->privData; + pI810XvMC = (i810XvMCContext *)pI810Surface->privContext; + pORegs = (i810OverlayRecPtr)pI810XvMC->oregs; + + + switch(surface->surface_type_id) { + case FOURCC_YV12: + case FOURCC_I420: + yPitch = (srcw + 7) & ~7; + uvPitch = ((srcw>>1) + 7) & ~7; + if((flags & XVMC_FRAME_PICTURE) != XVMC_FRAME_PICTURE) { + srch = srch>>1; + } + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + /* FIXME: Non Planar not fully implemented. */ + return BadValue; + yPitch = ((srcw + 7) & ~7) << 1; + break; + }/* switch(surface->surface_type_id) */ + + /* + FIXME: This should be using the DRI's clip rect but that isn't + all hooked up yet. This has some latency but we get by. + */ + win = draw; + XQueryTree(display,win,&root,&parent,&pChilds,&nChilds); + if(nChilds) XFree(pChilds); + XGetGeometry(display,win, &root, &x2, &y2, &window_width, + &window_height, &d, &d); + x1 = x2; + y1 = y2; + win = parent; + do { + XQueryTree(display,win,&root,&parent,&pChilds,&nChilds); + if(nChilds) XFree(pChilds); + XGetGeometry(display,win, &root, &x2, &y2, &d, &d, &d, &d); + x1 += x2; + y1 += y2; + win = parent; + }while(win != root); + XGetGeometry(display,root, &root, &unused, &unused, + &root_width, &root_height, &d, &d); + + /* Left edge of Video window clipped to screen */ + extents.x1 = 0; + if(x1 > extents.x1) { + extents.x1 = x1; + } + /* Right edge of Video window clipped to screen */ + extents.x2 = root_width; + if(extents.x2 > (x1 + window_width)) { + extents.x2 = x1 + window_width; + } + /* Top edge of Video window clipped to screen */ + extents.y1 = 0; + if(y1 > extents.y1) { + extents.y1 = y1; + } + /* Bottom edge of Video window clipped to screen */ + extents.y2 = root_height; + if(extents.y2 > (y1 + window_height)) { + extents.y2 = y1 + window_height; + } + + /* + Clipping is more difficult than is seems. We need to keep the + scaling factors even if the destination window needs to be clipped. + We clip the destination window first then apply a scaled version + to the source window. + */ + + /* Put destination coords in screen coords */ + destx += x1; + desty += y1; + + /* Scale factors requested */ + xscale = (double)srcw / (double)destw; + yscale = (double)srch / (double)desth; + + /* + If destination window needs to be clipped we actually adjust both + the src and dest window so as to keep the scaling that was requested + */ + clipped_srcx = srcx; + clipped_srcy = srcy; + clipped_destx = destx; + clipped_desty = desty; + clipped_srcw = srcw; + clipped_srch = srch; + clipped_destw = destw; + clipped_desth = desth; + + /* Clip to the source surface boundaries */ + if(clipped_srcx < 0) { + clipped_destx += (0 - clipped_srcx) / xscale; + clipped_srcw -= clipped_srcx; + clipped_destw -= clipped_srcx / xscale; + clipped_srcx = 0; + } + if((clipped_srcw + clipped_srcx) > surface->width) { + clipped_srcw = surface->width - clipped_srcx; + clipped_destw -= (clipped_srcw - srcw) / xscale; + } + if(clipped_srcy < 0) { + clipped_desty += (0 - clipped_srcy) / yscale; + clipped_srch -= clipped_srcy; + clipped_desth -= clipped_srcy / yscale; + clipped_srcy = 0; + } + if((clipped_srch + clipped_srcy) > surface->height) { + clipped_srch = surface->height - clipped_srcy; + clipped_desth -= (clipped_srch - srch) / yscale; + } + + /* Clip to the extents */ + if(clipped_destx < extents.x1) { + diff = extents.x1 - clipped_destx; + clipped_srcx += diff * xscale; + clipped_srcw -= diff * xscale; + clipped_destw -= diff; + clipped_destx = extents.x1; + } + + diff = (clipped_destx + clipped_destw) - extents.x2; + if(diff > 0) { + clipped_destw -= diff; + clipped_srcw -= diff * xscale; + } + + if(clipped_desty < extents.y1) { + diff = extents.y1 - clipped_desty; + clipped_srcy += diff * yscale; + clipped_srch -= diff * yscale; + clipped_desth -= diff; + clipped_desty = 0; + } + + diff = (clipped_desty + clipped_desth) - extents.y2; + if(diff > 0) { + clipped_desth -= diff; + clipped_srch -= diff * yscale; + } + + /* If the whole window is clipped turn off the overlay */ + if((clipped_destx + clipped_destw < extents.x1) || + (clipped_desty + clipped_desth < extents.y1) || + (clipped_destx > extents.x2) || + (clipped_desty > extents.y2)) { + return XvMCHideSurface(display, surface); + } + + /* + Adjust the source offset width and height according to the clipped + destination window. + */ + ysrc_offset = ((clipped_srcx + 1) & ~1) + + ((clipped_srcy + 1) & ~1) * (1<pitch); + uvsrc_offset = (clipped_srcx>>1) + + (clipped_srcy>>1) * (1<<(pI810Surface->pitch - 1)); + + /* + Initially, YCbCr and Overlay Enable and + vertical chrominance up interpolation and horozontal chrominance + up interpolation + */ + ovcmd = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | + Y_ADJUST | OVERLAY_ENABLE; + + if ((clipped_destw != clipped_srcw) || + (clipped_desth != clipped_srch)) { + xscaleInt = (clipped_srcw / clipped_destw) & 0x3; + xscaleFract = (clipped_srcw << 12) / clipped_destw; + yscaleInt = (clipped_srch / clipped_desth) & 0x3; + yscaleFract = (clipped_srch << 12) / clipped_desth; + + if (clipped_destw > clipped_srcw) { + /* horizontal up-scaling */ + ovcmd &= ~HORIZONTAL_CHROMINANCE_FILTER; + ovcmd &= ~HORIZONTAL_LUMINANCE_FILTER; + ovcmd |= (HC_UP_INTERPOLATION | HL_UP_INTERPOLATION); + } + + if (clipped_desth > clipped_srch) { + /* vertical up-scaling */ + ovcmd &= ~VERTICAL_CHROMINANCE_FILTER; + ovcmd &= ~VERTICAL_LUMINANCE_FILTER; + ovcmd |= (VC_UP_INTERPOLATION | VL_UP_INTERPOLATION); + } + + if (clipped_destw < clipped_srcw) { + /* horizontal down-scaling */ + ovcmd &= ~HORIZONTAL_CHROMINANCE_FILTER; + ovcmd &= ~HORIZONTAL_LUMINANCE_FILTER; + ovcmd |= (HC_DOWN_INTERPOLATION | HL_DOWN_INTERPOLATION); + } + + if (clipped_desth < clipped_srch) { + /* vertical down-scaling */ + ovcmd &= ~VERTICAL_CHROMINANCE_FILTER; + ovcmd &= ~VERTICAL_LUMINANCE_FILTER; + ovcmd |= (VC_DOWN_INTERPOLATION | VL_DOWN_INTERPOLATION); + } + + /* now calculate the UV scaling factor */ + if (xscaleFract) { + xscaleFractUV = xscaleFract >> MINUV_SCALE; + ovcmd &= ~HC_DOWN_INTERPOLATION; + ovcmd |= HC_UP_INTERPOLATION; + } + + if (xscaleInt) { + xscaleIntUV = xscaleInt >> MINUV_SCALE; + if (xscaleIntUV) { + ovcmd &= ~HC_UP_INTERPOLATION; + } + } + + if (yscaleFract) { + yscaleFractUV = yscaleFract >> MINUV_SCALE; + ovcmd &= ~VC_DOWN_INTERPOLATION; + ovcmd |= VC_UP_INTERPOLATION; + } + + if (yscaleInt) { + yscaleIntUV = yscaleInt >> MINUV_SCALE; + if (yscaleIntUV) { + ovcmd &= ~VC_UP_INTERPOLATION; + ovcmd |= VC_DOWN_INTERPOLATION; + } + } + + }/* if((destw != srcw) || (desth != srch)) */ + + /* Lock the DRM */ + I810_LOCK(pI810XvMC,0); + + /* Block until rendering on this surface is finished */ + stat = XVMC_RENDERING; + while(stat & XVMC_RENDERING) { + XvMCGetSurfaceStatus(display,surface,&stat); + } + /* Block until the last flip is finished */ + if(pI810XvMC->last_flip) { + BLOCK_OVERLAY(pI810XvMC,pI810XvMC->current); + } + + pI810XvMC->current = !pI810XvMC->current; + pORegs->OV0CMD = ovcmd; + + if ((clipped_destw != clipped_srcw) || + (clipped_desth != clipped_srch)) { + pORegs->YRGBSCALE = (xscaleInt << 15) | + ((xscaleFract & 0xFFF) << 3) | (yscaleInt) | + ((yscaleFract & 0xFFF) << 20); + + pORegs->UVSCALE = yscaleIntUV | ((xscaleFractUV & 0xFFF) << 3) | + ((yscaleFractUV & 0xFFF) << 20); + } + else { + /* Normal 1:1 scaling */ + pORegs->YRGBSCALE = 0x80004000; + pORegs->UVSCALE = 0x80004000; + } + + pORegs->SHEIGHT = clipped_srch | (clipped_srch << 15); + pORegs->DWINPOS = (clipped_desty << 16) | clipped_destx; + pORegs->DWINSZ = ((clipped_desth<< 16) | (clipped_destw)); + + /* Attributes */ + pORegs->OV0CLRC0 = ((pI810XvMC->contrast & 0x1ff)<<8) | + (pI810XvMC->brightness & 0xff); + pORegs->OV0CLRC1 = (pI810XvMC->saturation & 0x3ff); + + /* Destination Colorkey Setup */ + pI810XvMC->oregs->DCLRKV = RGB16ToColorKey(pI810XvMC->colorkey); + + /* buffer locations, add the offset from the clipping */ + if(pI810XvMC->current) { + pORegs->OBUF_1Y = (uint)pI810Surface->offset + + (uint)pI810Surface->offsets[0] + ysrc_offset; + pORegs->OBUF_1V = (uint)pI810Surface->offset + + (uint)pI810Surface->offsets[2] + uvsrc_offset; + pORegs->OBUF_1U = (uint)pI810Surface->offset + + (uint)pI810Surface->offsets[1] + uvsrc_offset; + } + else { + pORegs->OBUF_0Y = (uint)pI810Surface->offset + + (uint)pI810Surface->offsets[0] + ysrc_offset; + pORegs->OBUF_0V = (uint)pI810Surface->offset + + (uint)pI810Surface->offsets[2] + uvsrc_offset; + pORegs->OBUF_0U = (uint)pI810Surface->offset + + (uint)pI810Surface->offsets[1] + uvsrc_offset; + } + + switch(surface->surface_type_id) { + case FOURCC_YV12: + case FOURCC_I420: + pORegs->SWID = (uvPitch << 16) | yPitch; + pORegs->SWIDQW = (uvPitch << 13) | (yPitch >> 3); + pORegs->OV0STRIDE = (1<pitch) | + ((1<pitch) << 15); + pORegs->OV0CMD &= ~SOURCE_FORMAT; + pORegs->OV0CMD |= YUV_420; + if((flags & XVMC_FRAME_PICTURE) != XVMC_FRAME_PICTURE) { + /* Top Field Only */ + if(flags & XVMC_TOP_FIELD) { + if(pI810XvMC->current == 1) { + pORegs->OV0CMD |= (VERTICAL_PHASE_BOTH | FLIP_TYPE_FIELD | + BUFFER1_FIELD0); + } + else { + pORegs->OV0CMD |= (VERTICAL_PHASE_BOTH | FLIP_TYPE_FIELD | + BUFFER0_FIELD0); + } + pORegs->YRGB_VPH = 1<<15 | 1<<31; + pORegs->UV_VPH = 3<<14 | 3<<30; + pORegs->INIT_PH = 0x06 | 0x18; + } + /* Bottom Field Only */ + else { + if(pI810XvMC->current == 1) { + pORegs->OV0CMD |= (VERTICAL_PHASE_BOTH | FLIP_TYPE_FIELD | + BUFFER1_FIELD1); + } + else { + pORegs->OV0CMD |= (VERTICAL_PHASE_BOTH | FLIP_TYPE_FIELD | + BUFFER0_FIELD1); + } + pORegs->YRGB_VPH = 0; + pORegs->UV_VPH = 7<<29 | 7<<13; + pORegs->INIT_PH = 0x06; + } + } + /* Frame Picture */ + else { + if(pI810XvMC->current == 1) { + pORegs->OV0CMD |= BUFFER1_FIELD0; + } + else { + pORegs->OV0CMD |= BUFFER0_FIELD0; + } + pORegs->YRGB_VPH = 0; + pORegs->UV_VPH = 0; + pORegs->INIT_PH = 0; + } + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + default: + pORegs->SWID = srcw; + pORegs->SWIDQW = srcw >> 3; + pORegs->OV0STRIDE = pI810Surface->pitch; + pORegs->OV0CMD &= ~SOURCE_FORMAT; + pORegs->OV0CMD |= YUV_422; + pORegs->OV0CMD &= ~OV_BYTE_ORDER; + if (surface->surface_type_id == FOURCC_UYVY) { + pORegs->OV0CMD |= Y_SWAP; + } + + pORegs->OV0CMD &= ~BUFFER_AND_FIELD; + if(pI810XvMC->current == 1) { + pORegs->OV0CMD |= BUFFER1_FIELD0; + } + else { + pORegs->OV0CMD |= BUFFER0_FIELD0; + } + + break; + } /* switch(surface->surface_type_id) */ + + + + OVERLAY_FLIP(pI810XvMC); + + /* + The Overlay only flips when it knows you changed + something. So the first time change stuff while it + is watching to be sure. + */ + if(!pI810XvMC->last_flip) { + pORegs->OV0CMD &= ~0x4; + if(pI810XvMC->current == 1) { + pORegs->OV0CMD |= BUFFER1_FIELD0; + } + else { + pORegs->OV0CMD |= BUFFER0_FIELD0; + } + } + pI810Surface->last_flip = ++pI810XvMC->last_flip; + I810_UNLOCK(pI810XvMC); + + return Success; +} + +/*************************************************************************** +// Function: XvMCSyncSurface +// Arguments: +// display - Connection to the X server +// surface - The surface to synchronize +// Info: +// Returns: Status +***************************************************************************/ +Status XvMCSyncSurface(Display *display,XvMCSurface *surface) { + Status ret; + int stat=0; + /* + FIXME: Perhaps a timer here to prevent lockup? + FIXME: Perhaps a usleep to not be busy waiting? + */ + do { + ret = XvMCGetSurfaceStatus(display,surface,&stat); + }while(!ret && (stat & XVMC_RENDERING)); + return ret; +} + +/*************************************************************************** +// Function: XvMCFlushSurface +// Description: +// This function commits pending rendering requests to ensure that they +// wll be completed in a finite amount of time. +// Arguments: +// display - Connection to X server +// surface - Surface to flush +// Info: +// This command is a noop for i810 becuase we always dispatch buffers in +// render. There is little gain to be had with 4k buffers. +// Returns: Status +***************************************************************************/ +Status XvMCFlushSurface(Display * display, XvMCSurface *surface) { + return Success; +} + +/*************************************************************************** +// Function: XvMCGetSurfaceStatus +// Description: +// Arguments: +// display: connection to X server +// surface: The surface to query +// stat: One of the Following +// XVMC_RENDERING - The last XvMCRenderSurface command has not +// completed. +// XVMC_DISPLAYING - The surface is currently being displayed or a +// display is pending. +***************************************************************************/ +Status XvMCGetSurfaceStatus(Display *display, XvMCSurface *surface, + int *stat) { + i810XvMCSurface *privSurface; + i810XvMCContext *pI810XvMC; + int temp; + + if((display == NULL) || (surface == NULL) || (stat == NULL)) { + return BadValue; + } + if(surface->privData == NULL) { + return BadValue; + } + *stat = 0; + privSurface = surface->privData; + + pI810XvMC = privSurface->privContext; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadSurface); + } + + I810_LOCK(pI810XvMC,0); + if(privSurface->last_flip) { + /* This can not happen */ + if(pI810XvMC->last_flip < privSurface->last_flip) { + printf("Error: Context last flip is less than surface last flip.\n"); + return BadValue; + } + /* + If the context has 2 or more flips after this surface it + cannot be displaying. Don't bother to check. + */ + if(!(pI810XvMC->last_flip > (privSurface->last_flip + 1))) { + /* + If this surface was the last flipped it is either displaying + or about to be so don't bother checking. + */ + if(pI810XvMC->last_flip == privSurface->last_flip) { + *stat |= XVMC_DISPLAYING; + } + else { + /* + In this case there has been one more flip since our surface's + but we need to check if it is finished or not. + */ + temp = GET_FSTATUS(pI810XvMC); + if(((temp & (1<<20))>>20) != pI810XvMC->current) { + *stat |= XVMC_DISPLAYING; + } + } + } + } + + if(privSurface->last_render && + (privSurface->last_render > GET_RSTATUS(pI810XvMC))) { + *stat |= XVMC_RENDERING; + } + I810_UNLOCK(pI810XvMC); + + return Success; +} + +/*************************************************************************** +// +// Surface manipulation functions +// +***************************************************************************/ + +/*************************************************************************** +// Function: XvMCHideSurface +// Description: Stops the display of a surface. +// Arguments: +// display - Connection to the X server. +// surface - surface to be hidden. +// +// Returns: Status +***************************************************************************/ +Status XvMCHideSurface(Display *display, XvMCSurface *surface) { + i810XvMCSurface *pI810Surface; + i810XvMCContext *pI810XvMC; + int ss, xx; + + /* Did we get a good display and surface passed into us? */ + if(display == NULL) { + return BadValue; + } + + if(surface == NULL) { + return (error_base + XvMCBadSurface); + } + + XvMCSyncSurface(display, surface); + + /* Get surface private data pointer */ + if(surface->privData == NULL) { + return (error_base + XvMCBadSurface); + } + pI810Surface = (i810XvMCSurface *)surface->privData; + + /* + Get the status of the surface, if it is not currently displayed + we don't need to worry about it. + */ + if((xx = XvMCGetSurfaceStatus(display, surface, &ss)) != Success) { + return xx; + } + if(! (ss & XVMC_DISPLAYING)) { + return Success; + } + + /* Get the associated context pointer */ + pI810XvMC = (i810XvMCContext *)pI810Surface->privContext; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadSurface); + } + + if(pI810XvMC->last_flip) { + I810_LOCK(pI810XvMC,DRM_LOCK_QUIESCENT); + + /* Make sure last flip is done */ + BLOCK_OVERLAY(pI810XvMC,pI810XvMC->current); + + /* Set the registers to turn the overlay off */ + pI810XvMC->oregs->OV0CMD = VC_UP_INTERPOLATION | HC_UP_INTERPOLATION | + Y_ADJUST; + pI810XvMC->current = !pI810XvMC->current; + if(pI810XvMC->current == 1) { + pI810XvMC->oregs->OV0CMD |= BUFFER1_FIELD0; + } + else { + pI810XvMC->oregs->OV0CMD |= BUFFER0_FIELD0; + } + OVERLAY_FLIP(pI810XvMC); + /* + Increment the context flip but not the surface. This way no + surface has the last flip #. + */ + pI810XvMC->last_flip++; + + + /* Now wait until the hardware reads the registers and makes the change. */ + BLOCK_OVERLAY(pI810XvMC,pI810XvMC->current) + + I810_UNLOCK(pI810XvMC); + } + + return Success; +} + + + + +/*************************************************************************** +// +// Functions that deal with subpictures +// +***************************************************************************/ + + + +/*************************************************************************** +// Function: XvMCCreateSubpicture +// Description: This creates a subpicture by filling out the XvMCSubpicture +// structure passed to it and returning Success. +// Arguments: +// display - Connection to the X server. +// context - The context to create the subpicture for. +// subpicture - Pre-allocated XvMCSubpicture structure to be filled in. +// width - of subpicture +// height - of subpicture +// xvimage_id - The id describing the XvImage format. +// +// Returns: Status +***************************************************************************/ +Status XvMCCreateSubpicture(Display *display, XvMCContext *context, + XvMCSubpicture *subpicture, + unsigned short width, unsigned short height, + int xvimage_id) { + i810XvMCContext *pI810XvMC; + i810XvMCSubpicture *pI810Subpicture; + int priv_count; + uint *priv_data; + Status ret; + + if((subpicture == NULL) || (context == NULL) || (display == NULL)){ + return BadValue; + } + + pI810XvMC = (i810XvMCContext *)context->privData; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadContext); + } + + + subpicture->context_id = context->context_id; + subpicture->xvimage_id = xvimage_id; + + /* These need to be checked to make sure they are not too big! */ + subpicture->width = width; + subpicture->height = height; + + subpicture->privData = + (i810XvMCSubpicture *)malloc(sizeof(i810XvMCSubpicture)); + + if(!subpicture->privData) { + return BadAlloc; + } + pI810Subpicture = (i810XvMCSubpicture *)subpicture->privData; + + + if((ret = _xvmc_create_subpicture(display, context, subpicture, + &priv_count, &priv_data))) { + printf("Unable to create XvMCSubpicture.\n"); + return ret; + } + + if(priv_count != 1) { + printf("_xvmc_create_subpicture() returned incorrect data size.\n"); + printf("Expected 1 got %d\n",priv_count); + free(priv_data); + return BadAlloc; + } + /* Data == Client Address, offset == Physical address offset */ + pI810Subpicture->data = pI810XvMC->surfaces.address; + pI810Subpicture->offset = pI810XvMC->surfaces.offset; + + /* Initialize private values */ + pI810Subpicture->privContext = pI810XvMC; + + pI810Subpicture->last_render = 0; + pI810Subpicture->last_flip = 0; + + /* Based on the xvimage_id we will need to set the other values */ + subpicture->num_palette_entries = 16; + subpicture->entry_bytes = 3; + strcpy(subpicture->component_order,"YUV"); + + /* + i810's MC Engine needs surfaces of 2^x (x= 9,10,11,12) pitch + and the Tiler need 512k aligned surfaces, basically we are + stuck with fixed memory with pitch 1024. + */ + pI810Subpicture->pitch = 10; + + /* + offsets[0] == offset into the map described by either + address (Client memeory address) or offset (physical offset from fb base) + */ + pI810Subpicture->offsets[0] = priv_data[0]; + if(((uint)pI810Subpicture->data + pI810Subpicture->offsets[0]) & 4095) { + printf("XvMCCreateSubpicture: Subpicture offset 0 is not 4096 aligned\n"); + } + + /* Free data returned from xvmc_create_surface */ + free(priv_data); + + /* Clear the surface to 0 */ + memset((void *)((unsigned int)pI810Subpicture->data + + (unsigned int)pI810Subpicture->offsets[0]),0, + ((1<pitch) * subpicture->height)); + + switch(subpicture->xvimage_id) { + case FOURCC_IA44: + case FOURCC_AI44: + /* Destination buffer info command */ + pI810Subpicture->dbi1 = ((((unsigned int)pI810Subpicture->offset + + pI810Subpicture->offsets[0]) & ~0xfc000fff) | + (pI810Subpicture->pitch - 9)); + + /* Destination buffer variables command */ + pI810Subpicture->dbv1 = (0x8<<20) | (0x8<<16); + + /* Map info command */ + pI810Subpicture->mi1 = (0x0<<24) | (3<<21) | (1<<9) | + (pI810Subpicture->pitch - 3); + + pI810Subpicture->mi2 = (((unsigned int)subpicture->height - 1)<<16) | + ((unsigned int)subpicture->width - 1); + + pI810Subpicture->mi3 = ((unsigned int)pI810Subpicture->offset + + pI810Subpicture->offsets[0]) & ~0xfc00000f; + break; + default: + free(subpicture->privData); + return BadMatch; + } + + pI810XvMC->ref++; + return Success; +} + + + +/*************************************************************************** +// Function: XvMCClearSubpicture +// Description: Clear the area of the given subpicture to "color". +// structure passed to it and returning Success. +// Arguments: +// display - Connection to the X server. +// subpicture - Subpicture to clear. +// x, y, width, height - rectangle in the subpicture to clear. +// color - The data to file the rectangle with. +// +// Returns: Status +***************************************************************************/ +Status XvMCClearSubpicture(Display *display, XvMCSubpicture *subpicture, + short x, short y, + unsigned short width, unsigned short height, + unsigned int color) { + + i810XvMCContext *pI810XvMC; + i810XvMCSubpicture *pI810Subpicture; + int i; + + if((subpicture == NULL) || (display == NULL)){ + return BadValue; + } + + if(!subpicture->privData) { + return (error_base + XvMCBadSubpicture); + } + pI810Subpicture = (i810XvMCSubpicture *)subpicture->privData; + + pI810XvMC = (i810XvMCContext *)pI810Subpicture->privContext; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadSubpicture); + } + + if((x < 0) || (x + width > subpicture->width)) { + return BadValue; + } + + if((y < 0) || (y + height > subpicture->height)) { + return BadValue; + } + + for(i=y; idata + + (uint)pI810Subpicture->offsets[0] + x + + (1<pitch) * i),(char)color,width); + } + + return Success; +} + +/*************************************************************************** +// Function: XvMCCompositeSubpicture +// Description: Composite the XvImae on the subpicture. This composit uses +// non-premultiplied alpha. Destination alpha is utilized +// except for with indexed subpictures. Indexed subpictures +// use a simple "replace". +// Arguments: +// display - Connection to the X server. +// subpicture - Subpicture to clear. +// image - the XvImage to be used as the source of the composite. +// srcx, srcy, width, height - The rectangle from the image to be used. +// dstx, dsty - location in the subpicture to composite the source. +// +// Returns: Status +***************************************************************************/ +Status XvMCCompositeSubpicture(Display *display, XvMCSubpicture *subpicture, + XvImage *image, + short srcx, short srcy, + unsigned short width, unsigned short height, + short dstx, short dsty) { + + i810XvMCContext *pI810XvMC; + i810XvMCSubpicture *pI810Subpicture; + int i; + + if((subpicture == NULL) || (display == NULL)){ + return BadValue; + } + + if(!subpicture->privData) { + return (error_base + XvMCBadSubpicture); + } + pI810Subpicture = (i810XvMCSubpicture *)subpicture->privData; + + pI810XvMC = (i810XvMCContext *)pI810Subpicture->privContext; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadSubpicture); + } + + if((srcx < 0) || (srcx + width > image->width)) { + return BadValue; + } + + if((dstx < 0) || (dstx + width > subpicture->width)) { + return BadValue; + } + + if((srcy < 0) || (srcy + height > image->height)) { + return BadValue; + } + + if((dsty < 0) || (dsty + height > subpicture->height)) { + return BadValue; + } + + for(i=0; idata + + (uint)pI810Subpicture->offsets[0] + dstx + + (1<pitch) * (i + dsty)), + (void *)((uint)image->data + + (uint)image->offsets[0] + srcx + + image->pitches[0] * (i + srcy)) + ,width); + } + + return Success; + +} + + +/*************************************************************************** +// Function: XvMCDestroySubpicture +// Description: Destroys the specified subpicture. +// Arguments: +// display - Connection to the X server. +// subpicture - Subpicture to be destroyed. +// +// Returns: Status +***************************************************************************/ +Status XvMCDestroySubpicture(Display *display, XvMCSubpicture *subpicture) { + + i810XvMCSubpicture *pI810Subpicture; + i810XvMCContext *pI810XvMC; + + if((display == NULL) || (subpicture == NULL)) { + return BadValue; + } + if(!subpicture->privData) { + return (error_base + XvMCBadSubpicture); + } + pI810Subpicture = (i810XvMCSubpicture *)subpicture->privData; + + pI810XvMC = (i810XvMCContext *)pI810Subpicture->privContext; + if(!pI810XvMC) { + return (error_base + XvMCBadSubpicture); + } + + + if(pI810Subpicture->last_render) { + XvMCSyncSubpicture(display,subpicture); + } + + _xvmc_destroy_subpicture(display,subpicture); + + i810_free_privContext(pI810XvMC); + + free(pI810Subpicture); + subpicture->privData = NULL; + return Success; +} + + +/*************************************************************************** +// Function: XvMCSetSubpicturePalette +// Description: Set the subpictures palette +// Arguments: +// display - Connection to the X server. +// subpicture - Subpiture to set palette for. +// palette - A pointer to an array holding the palette data. The array +// is num_palette_entries * entry_bytes in size. +// Returns: Status +***************************************************************************/ + +Status XvMCSetSubpicturePalette(Display *display, XvMCSubpicture *subpicture, + unsigned char *palette) { + i810XvMCSubpicture *privSubpicture; + int i,j; + + if((display == NULL) || (subpicture == NULL)) { + return BadValue; + } + if(subpicture->privData == NULL) { + return (error_base + XvMCBadSubpicture); + } + privSubpicture = (i810XvMCSubpicture *)subpicture->privData; + + j=0; + for(i=0; i<16; i++) { + privSubpicture->palette[0][i] = palette[j++]; + privSubpicture->palette[1][i] = palette[j++]; + privSubpicture->palette[2][i] = palette[j++]; + } + return Success; +} + +/*************************************************************************** +// Function: XvMCBlendSubpicture +// Description: +// The behavior of this function is different depending on whether +// or not the XVMC_BACKEND_SUBPICTURE flag is set in the XvMCSurfaceInfo. +// i810 only support frontend behavior. +// +// XVMC_BACKEND_SUBPICTURE not set ("frontend" behavior): +// +// XvMCBlendSubpicture is a no-op in this case. +// +// Arguments: +// display - Connection to the X server. +// subpicture - The subpicture to be blended into the video. +// target_surface - The surface to be displayed with the blended subpic. +// source_surface - Source surface prior to blending. +// subx, suby, subw, subh - The rectangle from the subpicture to use. +// surfx, surfy, surfw, surfh - The rectangle in the surface to blend +// blend the subpicture rectangle into. Scaling can ocure if +// XVMC_SUBPICTURE_INDEPENDENT_SCALING is set. +// +// Returns: Status +***************************************************************************/ +Status XvMCBlendSubpicture(Display *display, XvMCSurface *target_surface, + XvMCSubpicture *subpicture, + short subx, short suby, + unsigned short subw, unsigned short subh, + short surfx, short surfy, + unsigned short surfw, unsigned short surfh) { + + return BadMatch; +} + + + +/*************************************************************************** +// Function: XvMCBlendSubpicture2 +// Description: +// The behavior of this function is different depending on whether +// or not the XVMC_BACKEND_SUBPICTURE flag is set in the XvMCSurfaceInfo. +// i810 only supports frontend blending. +// +// XVMC_BACKEND_SUBPICTURE not set ("frontend" behavior): +// +// XvMCBlendSubpicture2 blends the source_surface and subpicture and +// puts it in the target_surface. This does not effect the status of +// the source surface but will cause the target_surface to query +// XVMC_RENDERING until the blend is completed. +// +// Arguments: +// display - Connection to the X server. +// subpicture - The subpicture to be blended into the video. +// target_surface - The surface to be displayed with the blended subpic. +// source_surface - Source surface prior to blending. +// subx, suby, subw, subh - The rectangle from the subpicture to use. +// surfx, surfy, surfw, surfh - The rectangle in the surface to blend +// blend the subpicture rectangle into. Scaling can ocure if +// XVMC_SUBPICTURE_INDEPENDENT_SCALING is set. +// +// Returns: Status +***************************************************************************/ +Status XvMCBlendSubpicture2(Display *display, + XvMCSurface *source_surface, + XvMCSurface *target_surface, + XvMCSubpicture *subpicture, + short subx, short suby, + unsigned short subw, unsigned short subh, + short surfx, short surfy, + unsigned short surfw, unsigned short surfh) { + drmBufPtr pDMA; + unsigned int *data; + i810XvMCContext *pI810XvMC; + i810XvMCSubpicture *privSubpicture; + i810XvMCSurface *privTarget; + i810XvMCSurface *privSource; + drm_i810_mc_t mc; + int i,j; + + if(display == NULL) { + return BadValue; + } + + if(subpicture == NULL) { + return (error_base + XvMCBadSubpicture); + } + + if((target_surface == NULL) || (source_surface == NULL)) { + return (error_base + XvMCBadSurface); + } + + if((subpicture->xvimage_id != FOURCC_AI44) && + (subpicture->xvimage_id != FOURCC_IA44)) { + return (error_base + XvMCBadSubpicture); + } + + if(!subpicture->privData) { + return (error_base + XvMCBadSubpicture); + } + privSubpicture = (i810XvMCSubpicture *)subpicture->privData; + + pI810XvMC = (i810XvMCContext *)privSubpicture->privContext; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadSubpicture); + } + + if(!target_surface->privData) { + return (error_base + XvMCBadSurface); + } + privTarget = (i810XvMCSurface *)target_surface->privData; + + if(!source_surface->privData) { + return (error_base + XvMCBadSurface); + } + privSource = (i810XvMCSurface *)source_surface->privData; + + + /* Check that size isn't bigger than subpicture */ + if((subx + subw) > subpicture->width) { + return BadValue; + } + if((suby + subh) > subpicture->height) { + return BadValue; + } + /* Check that dest isn't bigger than surface */ + if((surfx + surfw) > target_surface->width) { + return BadValue; + } + if((surfy + surfh) > target_surface->height) { + return BadValue; + } + /* Make sure surfaces match */ + if(target_surface->width != source_surface->width) { + return BadValue; + } + if(target_surface->height != source_surface->height) { + return BadValue; + } + + /* Lock For DMA */ + I810_LOCK(pI810XvMC,0); + + /* Allocate DMA buffer */ + pDMA = i810_get_free_buffer(pI810XvMC); + data = pDMA->address; + + /* Copy Y data first */ + /* SOURCE_COPY_BLT */ + *data++ = (2<<29) | (0x43<<22) | 0x4; + *data++ = (0xcc<<16) | (1<<26) | (1<pitch); + *data++ = (target_surface->height<<16) | target_surface->width; + *data++ = privTarget->offset + privTarget->offsets[0]; + *data++ = (1<pitch); + *data++ = privSource->offset + privSource->offsets[0]; + + /* Select Context 1 for loading */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<17) | (1<<8); + *data++ = CMD_FLUSH; + + /* Load Palette */ + *data++ = MAP_PALETTE_LOAD; + /* 16 levels of alpha for each Y */ + switch(subpicture->xvimage_id) { + case FOURCC_IA44: + for(i=0; i<16; i++) { + for(j=0; j<16; j++) { + *data++ = (j<<12) | (j<<8) | privSubpicture->palette[0][i]; + } + } + break; + case FOURCC_AI44: + for(i=0; i<16; i++) { + for(j=0; j<16; j++) { + *data++ = (i<<12) | (i<<8) | privSubpicture->palette[0][j]; + } + } + break; + } + /* TARGET */ + /* *data++ = CMD_FLUSH; */ + /* *data++ = BOOLEAN_ENA_2; */ + *data++ = CMD_FLUSH; + *data++ = DEST_BUFFER_INFO; + *data++ = privTarget->dbi1y; + *data++ = DEST_BUFFER_VAR; + *data++ = privTarget->dbv1; + + /* ALPHA */ + *data++ = CMD_MAP_INFO; + *data++ = privSubpicture->mi1; + *data++ = privSubpicture->mi2; + *data++ = privSubpicture->mi3; + + *data++ = VERTEX_FORMAT | (1<<8) | (3<<1); + *data++ = BOOLEAN_ENA_1; + *data++ = SRC_DEST_BLEND_MONO | (0x940); + /* Map Filter */ + *data++ = (3<<29) | (0x1c<<24) | (2<<19) | (0x224); + + /* Use context 1 */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<16) | 1; + *data++ = CMD_FLUSH; + + /* Drawing Rect Info */ + *data++ = DRAWING_RECT_INFO; + *data++ = 0x0; + *data++ = 0x0; + *data++ = 0x0; + *data++ = 0x0; + *data++ = 0x0; + + /* GFXPRIMITIVE RECTANGLE */ + *data++ = (3<<29) | (0x1f<<24) | (0x7<<18) | 11; + /* Bottom Right Vertex */ + *(float *)data++ = (float) (surfx + surfw); + *(float *)data++ = (float) (surfy + surfh); + *(float *)data++ = (float) (subx + subw); + *(float *)data++ = (float) (suby + subh); + /* Bottom Left Vertex */ + *(float *)data++ = (float) surfx; + *(float *)data++ = (float) (surfy + surfh); + *(float *)data++ = (float) subx; + *(float *)data++ = (float) (suby + subh); + /* Top Left Vertex */ + *(float *)data++ = (float) surfx; + *(float *)data++ = (float) surfy; + *(float *)data++ = (float) subx; + *(float *)data++ = (float) suby; + + /* Load and Use Context 0 */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<17) | (1<<16); + *data++ = CMD_FLUSH; + + /* U data */ + /* SOURCE_COPY_BLT */ + *data++ = (2<<29) | (0x43<<22) | 0x4; + *data++ = (0xcc<<16) | (1<<26) | (1<<(privTarget->pitch - 1)); + *data++ = (target_surface->height<<15) | (target_surface->width>>1); + *data++ = (uint)privTarget->offset + (uint)privTarget->offsets[1]; + *data++ = (1<<(privSource->pitch - 1)); + *data++ = (uint)privSource->offset + (uint)privSource->offsets[1]; + + /* Context 1 select */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<17) | (1<<8); + *data++ = CMD_FLUSH; + /* ALPHA PALETTE */ + *data++ = MAP_PALETTE_LOAD; + /* 16 levels of alpha for each Y */ + switch(subpicture->xvimage_id) { + case FOURCC_IA44: + for(i=0; i<16; i++) { + for(j=0; j<16; j++) { + *data++ = (j<<12) | (j<<8) | privSubpicture->palette[2][i]; + } + } + break; + case FOURCC_AI44: + for(i=0; i<16; i++) { + for(j=0; j<16; j++) { + *data++ = (i<<12) | (i<<8) | privSubpicture->palette[2][j]; + } + } + break; + } + /* TARGET */ + *data++ = CMD_FLUSH; + *data++ = BOOLEAN_ENA_2; + *data++ = CMD_FLUSH; + *data++ = DEST_BUFFER_INFO; + *data++ = privTarget->dbi1u; + *data++ = DEST_BUFFER_VAR; + *data++ = privTarget->dbv1; + + /* ALPHA */ + *data++ = CMD_MAP_INFO; + *data++ = privSubpicture->mi1; + *data++ = privSubpicture->mi2; + *data++ = privSubpicture->mi3; + + *data++ = VERTEX_FORMAT | (1<<8) | (3<<1); + *data++ = BOOLEAN_ENA_1; + *data++ = SRC_DEST_BLEND_MONO | (0x940); + /* Map Filter */ + *data++ = (3<<29) | (0x1c<<24) | (2<<19) | (1<<16) | (0x224); + + /* Use context 1 */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<16) | 1; + *data++ = CMD_FLUSH; + + /* Drawing Rect Info */ + *data++ = (3<<29) | (0x1d<<24) | (0x80<<16) | 3; + *data++ = 0; + *data++ = 0; + *data++ = 0; + *data++ = 0; + *data++ = 0; + + /* Rectangle */ + *data++ = (3<<29) | (0x1f<<24) | (0x7<<18) | 11; + /* Bottom Right */ + *(float *)data++ = (float) ((surfx + surfw)>>1); + *(float *)data++ = (float) ((surfy + surfh)>>1); + *(float *)data++ = (float) subx + subw; + *(float *)data++ = (float) suby + subh; + /* Bottom Left */ + *(float *)data++ = (float) (surfx>>1); + *(float *)data++ = (float) ((surfy + surfh)>>1); + *(float *)data++ = (float) subx; + *(float *)data++ = (float) suby + subh; + /* Top Left */ + *(float *)data++ = (float) (surfx>>1); + *(float *)data++ = (float) (surfy>>1); + *(float *)data++ = (float) subx; + *(float *)data++ = (float) suby; + + /* Load and Use Context 0 */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<17) | (1<<16); + *data++ = CMD_FLUSH; + + /* V data */ + /* SOURCE_COPY_BLT */ + *data++ = (2<<29) | (0x43<<22) | 0x4; + *data++ = (0xcc<<16) | (1<<26) | (1<<(privTarget->pitch - 1)); + *data++ = (target_surface->height<<15) | (target_surface->width>>1); + *data++ = (uint)privTarget->offset + (uint)privTarget->offsets[2]; + *data++ = (1<<(privSource->pitch - 1)); + *data++ = (uint)privSource->offset + (uint)privSource->offsets[2]; + + /* Context 1 select */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<17) | (1<<8); + *data++ = CMD_FLUSH; + + /* ALPHA PALETTE */ + *data++ = MAP_PALETTE_LOAD; + /* 16 levels of alpha for each Y */ + switch(subpicture->xvimage_id) { + case FOURCC_IA44: + for(i=0; i<16; i++) { + for(j=0; j<16; j++) { + *data++ = (j<<12) | (j<<8) | privSubpicture->palette[1][i]; + } + } + break; + case FOURCC_AI44: + for(i=0; i<16; i++) { + for(j=0; j<16; j++) { + *data++ = (i<<12) | (i<<8) | privSubpicture->palette[1][j]; + } + } + break; + } + /* TARGET */ + *data++ = CMD_FLUSH; + *data++ = BOOLEAN_ENA_2; + *data++ = CMD_FLUSH; + *data++ = DEST_BUFFER_INFO; + *data++ = privTarget->dbi1v; + *data++ = DEST_BUFFER_VAR; + *data++ = privTarget->dbv1; + + /* ALPHA */ + *data++ = CMD_MAP_INFO; + *data++ = privSubpicture->mi1; + *data++ = privSubpicture->mi2; + *data++ = privSubpicture->mi3; + + *data++ = VERTEX_FORMAT | (1<<8) | (3<<1); + *data++ = BOOLEAN_ENA_1; + *data++ = SRC_DEST_BLEND_MONO | (0x940); + /* Map Filter */ + *data++ = (3<<29) | (0x1c<<24) | (2<<19) | (1<<16) | (0x224); + + /* Use context 1 */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<16) | 1; + *data++ = CMD_FLUSH; + + /* Drawing Rect Info */ + *data++ = (3<<29) | (0x1d<<24) | (0x80<<16) | 3; + *data++ = 0; + *data++ = 0; + *data++ = 0; + *data++ = 0; + *data++ = 0; + + /* Rectangle */ + *data++ = (3<<29) | (0x1f<<24) | (0x7<<18) | 11; + /* Bottom Right */ + *(float *)data++ = (float) ((surfx + surfw)>>1); + *(float *)data++ = (float) ((surfy + surfh)>>1); + *(float *)data++ = (float) subx + subw; + *(float *)data++ = (float) suby + subh; + /* Bottom Left */ + *(float *)data++ = (float) (surfx>>1); + *(float *)data++ = (float) ((surfy + surfh)>>1); + *(float *)data++ = (float) subx; + *(float *)data++ = (float) suby + subh; + /* Top Left */ + *(float *)data++ = (float) (surfx>>1); + *(float *)data++ = (float) (surfy>>1); + *(float *)data++ = (float) subx; + *(float *)data++ = (float) suby; + + /* Load and Use Context 0 */ + *data++ = CMD_FLUSH; + *data++ = (5<<23) | (1<<17) | (1<<16); + *data++ = CMD_FLUSH; + + + /* Dispatch */ + pDMA->used = (uint)data - (uint)pDMA->address; + mc.idx = pDMA->idx; + mc.used = pDMA->used; + mc.last_render = ++pI810XvMC->last_render; + privTarget->last_render = pI810XvMC->last_render; + I810_MC(pI810XvMC,&mc); + + I810_UNLOCK(pI810XvMC); + return Success; +} + + + +/*************************************************************************** +// Function: XvMCSyncSubpicture +// Description: This function blocks until all composite/clear requests on +// the subpicture have been complete. +// Arguments: +// display - Connection to the X server. +// subpicture - The subpicture to synchronize +// +// Returns: Status +***************************************************************************/ +Status XvMCSyncSubpicture(Display *display, XvMCSubpicture *subpicture) { + Status ret; + int stat=0; + do { + ret = XvMCGetSubpictureStatus(display,subpicture,&stat); + }while(!ret && (stat & XVMC_RENDERING)); + return ret; +} + + + +/*************************************************************************** +// Function: XvMCFlushSubpicture +// Description: This function commits pending composite/clear requests to +// ensure that they will be completed in a finite amount of +// time. +// Arguments: +// display - Connection to the X server. +// subpicture - The subpicture whos compsiting should be flushed +// +// Returns: Status +// NOTES: i810 always dispatches commands so flush is a no-op +***************************************************************************/ +Status XvMCFlushSubpicture(Display *display, XvMCSubpicture *subpicture) { + if(display == NULL) { + return BadValue; + } + if(subpicture == NULL) { + return (error_base + XvMCBadSubpicture); + } + + return Success; +} + + + +/*************************************************************************** +// Function: XvMCGetSubpictureStatus +// Description: This function gets the current status of a subpicture +// +// Arguments: +// display - Connection to the X server. +// subpicture - The subpicture whos status is being queried +// stat - The status of the subpicture. It can be any of the following +// OR'd together: +// XVMC_RENDERING - Last composite or clear request not completed +// XVMC_DISPLAYING - Suppicture currently being displayed. +// +// Returns: Status +// Notes: i810 always blends into a third surface so the subpicture is +// never actually displaying, only a copy of it is displaying. We only +// have to worry about the rendering case. +***************************************************************************/ +Status XvMCGetSubpictureStatus(Display *display, XvMCSubpicture *subpicture, + int *stat) { + + i810XvMCSubpicture *privSubpicture; + i810XvMCContext *pI810XvMC; + + if((display == NULL) || (stat == NULL)) { + return BadValue; + } + if((subpicture == NULL) || (subpicture->privData == NULL)) { + return (error_base + XvMCBadSubpicture); + } + *stat = 0; + privSubpicture = (i810XvMCSubpicture *)subpicture->privData; + + pI810XvMC = (i810XvMCContext *)privSubpicture->privContext; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadSubpicture); + } + + I810_LOCK(pI810XvMC,0); + + if(privSubpicture->last_render && + (privSubpicture->last_render > GET_RSTATUS(pI810XvMC))) { + *stat |= XVMC_RENDERING; + } + I810_UNLOCK(pI810XvMC); + + return Success; +} + +#define NUM_XVMC_ATTRIBUTES 4 +static XvAttribute I810_XVMC_ATTRIBUTES[] = { + {XvGettable | XvSettable, 0, 0xffffff, "XV_COLORKEY"}, + {XvGettable | XvSettable, -127, +127, "XV_BRIGHTNESS"}, + {XvGettable | XvSettable, 0, 0x1ff, "XV_CONTRAST"}, + {XvGettable | XvSettable, 0, 0x3ff, "XV_SATURATION"} +}; + + +/*************************************************************************** +// Function: XvMCQueryAttributes +// Description: An array of XvAttributes of size "number" is returned by +// this function. If there are no attributes, NULL is returned and number +// is set to 0. The array may be freed with xfree(). +// +// Arguments: +// display - Connection to the X server. +// context - The context whos attributes we are querying. +// number - The number of returned atoms. +// +// Returns: +// An array of XvAttributes. +// Notes: +// For i810 we support these Attributes: +// XV_COLORKEY: The colorkey value, initialized from the Xv value at +// context creation time. +// XV_BRIGHTNESS +// XV_CONTRAST +// XV_SATURATION +***************************************************************************/ +XvAttribute *XvMCQueryAttributes(Display *display, XvMCContext *context, + int *number) { + i810XvMCContext *pI810XvMC; + XvAttribute *attributes; + + if(number == NULL) { + return NULL; + } + if(display == NULL) { + *number = 0; + return NULL; + } + if(context == NULL) { + *number = 0; + return NULL; + } + pI810XvMC = context->privData; + if(pI810XvMC == NULL) { + *number = 0; + return NULL; + } + + attributes = (XvAttribute *)malloc(NUM_XVMC_ATTRIBUTES * + sizeof(XvAttribute)); + if(attributes == NULL) { + *number = 0; + return NULL; + } + + memcpy(attributes,I810_XVMC_ATTRIBUTES,(NUM_XVMC_ATTRIBUTES * + sizeof(XvAttribute))); + + *number = NUM_XVMC_ATTRIBUTES; + return attributes; +} + +/*************************************************************************** +// Function: XvMCSetAttribute +// Description: This function sets a context-specific attribute. +// +// Arguments: +// display - Connection to the X server. +// context - The context whos attributes we are querying. +// attribute - The X atom of the attribute to be changed. +// value - The new value for the attribute. +// +// Returns: +// Status +// Notes: +// For i810 we support these Attributes: +// XV_COLORKEY: The colorkey value, initialized from the Xv value at +// context creation time. +// XV_BRIGHTNESS +// XV_CONTRAST +// XV_SATURATION +***************************************************************************/ +Status XvMCSetAttribute(Display *display, XvMCContext *context, + Atom attribute, int value) { + i810XvMCContext *pI810XvMC; + + if(display == NULL) { + return BadValue; + } + if(context == NULL) { + return (error_base + XvMCBadContext); + } + pI810XvMC = context->privData; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadContext); + } + + if(attribute == pI810XvMC->xv_colorkey) { + if((value < I810_XVMC_ATTRIBUTES[0].min_value) || + (value > I810_XVMC_ATTRIBUTES[0].max_value)) { + return BadValue; + } + pI810XvMC->colorkey = value; + return Success; + } + if(attribute == pI810XvMC->xv_brightness) { + if((value < I810_XVMC_ATTRIBUTES[1].min_value) || + (value > I810_XVMC_ATTRIBUTES[1].max_value)) { + return BadValue; + } + pI810XvMC->brightness = value; + return Success; + } + if(attribute == pI810XvMC->xv_saturation) { + if((value < I810_XVMC_ATTRIBUTES[2].min_value) || + (value > I810_XVMC_ATTRIBUTES[2].max_value)) { + return BadValue; + } + pI810XvMC->saturation = value; + return Success; + } + if(attribute == pI810XvMC->xv_contrast) { + if((value < I810_XVMC_ATTRIBUTES[3].min_value) || + (value > I810_XVMC_ATTRIBUTES[3].max_value)) { + return BadValue; + } + pI810XvMC->contrast = value; + return Success; + } + return BadValue; +} + +/*************************************************************************** +// Function: XvMCGetAttribute +// Description: This function queries a context-specific attribute and +// returns the value. +// +// Arguments: +// display - Connection to the X server. +// context - The context whos attributes we are querying. +// attribute - The X atom of the attribute to be queried +// value - The returned attribute value +// +// Returns: +// Status +// Notes: +// For i810 we support these Attributes: +// XV_COLORKEY: The colorkey value, initialized from the Xv value at +// context creation time. +// XV_BRIGHTNESS +// XV_CONTRAST +// XV_SATURATION +***************************************************************************/ +Status XvMCGetAttribute(Display *display, XvMCContext *context, + Atom attribute, int *value) { + i810XvMCContext *pI810XvMC; + + if(display == NULL) { + return BadValue; + } + if(context == NULL) { + return (error_base + XvMCBadContext); + } + pI810XvMC = context->privData; + if(pI810XvMC == NULL) { + return (error_base + XvMCBadContext); + } + if(value == NULL) { + return BadValue; + } + + if(attribute == pI810XvMC->xv_colorkey) { + *value = pI810XvMC->colorkey; + return Success; + } + if(attribute == pI810XvMC->xv_brightness) { + *value = pI810XvMC->brightness; + return Success; + } + if(attribute == pI810XvMC->xv_saturation) { + *value = pI810XvMC->saturation; + return Success; + } + if(attribute == pI810XvMC->xv_contrast) { + *value = pI810XvMC->contrast; + return Success; + } + return BadValue; +} + + + + Index: xc/lib/XvMC/hw/i810/I810XvMC.h diff -u /dev/null xc/lib/XvMC/hw/i810/I810XvMC.h:1.2 --- /dev/null Fri Jan 18 15:23:37 2002 +++ xc/lib/XvMC/hw/i810/I810XvMC.h Mon Dec 17 23:23:56 2001 @@ -0,0 +1,478 @@ +/*************************************************************************** + +Copyright 2001 Intel Corporation. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL INTEL, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/*************************************************************************** + * libI810XvMC.h: MC Driver i810 includes + * + * Authors: + * Matt Sottek + * + * + ***************************************************************************/ +/* $XFree86: xc/lib/XvMC/hw/i810/I810XvMC.h,v 1.2 2001/12/18 04:23:56 dawes Exp $ */ + + +#ifndef I810XVMC_H +#define I810XVMC_H + +/* #define XVMC_DEBUG(x) do {x; }while(0); */ +#define XVMC_DEBUG(x) + +#include +#include + + +/*************************************************************************** +// i810OverlayRec: Structure that is used to reference the overlay +// register memory. A i810OverlayRecPtr is set to the address of the +// allocated overlay registers. +***************************************************************************/ +typedef struct _i810OverlayRec { + unsigned int OBUF_0Y; + unsigned int OBUF_1Y; + unsigned int OBUF_0U; + unsigned int OBUF_0V; + unsigned int OBUF_1U; + unsigned int OBUF_1V; + unsigned int OV0STRIDE; + unsigned int YRGB_VPH; + unsigned int UV_VPH; + unsigned int HORZ_PH; + unsigned int INIT_PH; + unsigned int DWINPOS; + unsigned int DWINSZ; + unsigned int SWID; + unsigned int SWIDQW; + unsigned int SHEIGHT; + unsigned int YRGBSCALE; + unsigned int UVSCALE; + unsigned int OV0CLRC0; + unsigned int OV0CLRC1; + unsigned int DCLRKV; + unsigned int DCLRKM; + unsigned int SCLRKVH; + unsigned int SCLRKVL; + unsigned int SCLRKM; + unsigned int OV0CONF; + unsigned int OV0CMD; +} i810OverlayRec, *i810OverlayRecPtr; + + +/*************************************************************************** +// i810XvMCDrmMap: Holds the data about the DRM maps +***************************************************************************/ +typedef struct _i810XvMCDrmMap { + drmHandle offset; + drmAddress address; + unsigned int size; +} i810XvMCDrmMap, *i810XvMCDrmMapPtr; + +/*************************************************************************** +// i810XvMCContext: Private Context data referenced via the privData +// pointer in the XvMCContext structure. +***************************************************************************/ +typedef struct _i810XvMCContext { + int fd; /* File descriptor for /dev/dri */ + i810XvMCDrmMap overlay; + i810XvMCDrmMap surfaces; + drmBufMapPtr dmabufs; /* Data structure to hold available dma buffers */ + drmContext drmcontext; + unsigned int last_render; + unsigned int last_flip; + unsigned short ref; + unsigned short current; + int lock; /* Lightweight lock to avoid locking twice */ + char busIdString[10]; /* PCI:0:1:0 or PCI:0:2:0 */ + i810OverlayRecPtr oregs; + unsigned int dual_prime; /* Flag to identify when dual prime is in use. */ + unsigned int fb_base; + Atom xv_colorkey; + Atom xv_brightness; + Atom xv_contrast; + Atom xv_saturation; + int brightness; + int saturation; + int contrast; + int colorkey; +} i810XvMCContext; + +/*************************************************************************** +// i810XvMCSurface: Private data structure for each XvMCSurface. This +// structure is referenced by the privData pointer in the XvMCSurface +// structure. +***************************************************************************/ +typedef struct _i810XvMCSurface { + unsigned int pitch; + unsigned int dbi1y; /* Destination buffer info command word 1 for Y */ + unsigned int dbi1u; /* Destination buffer info command word 1 for U */ + unsigned int dbi1v; /* Destination buffer info command word 1 for V */ + unsigned int dbv1; /* Destination buffer variables command word 1 */ + unsigned int mi1y; /* Map Info command word 1 (Minus bit 28) for Y */ + unsigned int mi1u; /* Map Info command word 1 (Minus bit 28) for U */ + unsigned int mi1v; /* Map Info command word 1 (Minus bit 28) for V */ + unsigned int mi2y; /* Map info command word 2 for y */ + unsigned int mi2u; /* Map info command word 2 for y */ + unsigned int mi2v; /* Map info command word 2 for y */ + unsigned int mi3y; /* Map info command word 3 */ + unsigned int mi3u; /* Map info command word 3 */ + unsigned int mi3v; /* Map info command word 3 */ + unsigned int last_render; + unsigned int last_flip; + unsigned int second_field; /* Flags a surface that is only half done */ + drmAddress data; + drmHandle offset; + unsigned int offsets[3]; + i810XvMCContext *privContext; +} i810XvMCSurface; + +/*************************************************************************** +// i810XvMCSubpicture: Private data structure for each XvMCSubpicture. This +// structure is referenced by the privData pointer in the XvMCSubpicture +// structure. +***************************************************************************/ +typedef struct _i810XvMCSubpicture { + unsigned int pitch; + unsigned int dbi1; /* Destination buffer info command word 1 */ + unsigned int dbv1; /* Destination buffer variables command word */ + unsigned int mi1; /* Map Info command word 1 (Minus bit 28) */ + unsigned int mi2; /* Map info command word 2 */ + unsigned int mi3; /* Map info command word 3 */ + unsigned int last_render; + unsigned int last_flip; + drmAddress data; + drmHandle offset; + unsigned int offsets[1]; + unsigned char palette[3][16]; + i810XvMCContext *privContext; +} i810XvMCSubpicture; + +typedef struct _Box { + int x1,y1,x2,y2; +} Box, *BoxPtr; + +/*************************************************************************** +// drm_i810_overlay_t: Structure returned by overlay info ioctl. +// NOTE: If you change this structure you will have to change the equiv. +// structure in the kernel. +***************************************************************************/ +typedef struct _drm_i810_overlay_t { + unsigned int offset; + unsigned int physical; +} drm_i810_overlay_t; + +/*************************************************************************** +// drm_i810_dma_t: Structure used by dma allocation ioctl. +// NOTE: If you change this structure you will have to change the equiv. +// structure in the kernel. +***************************************************************************/ +typedef struct _drm_i810_dma { + void *virtual; + int request_idx; + int request_size; + int granted; +} drm_i810_dma_t; + +/*************************************************************************** +// drm_i810_mc_t: Structure used by mc dispatch ioctl. +// NOTE: If you change this structure you will have to change the equiv. +// structure in the kernel. +***************************************************************************/ +typedef struct _drm_i810_mc { + int idx; /* buffer index */ + int used; /* nr bytes in use */ + int num_blocks; /* number of GFXBlocks */ + int *length; /* List of lengths for GFXBlocks */ + unsigned int last_render; /* Last render request */ +} drm_i810_mc_t; + +/* Subpicture fourcc */ +#define FOURCC_IA44 0x34344149 + +/* Static Parameters */ +#define I810_XVMC_MAXWIDTH 720 +#define I810_XVMC_MAXHEIGHT 576 +#define I810_DEFAULT16_COLORKEY 31 +#define I810_DMA_BUF_NR 256 + +/* IOCTL Numbers, these are defined in the kernel drm sources. */ +#define I810_IOCTL_OV0INFO 0x49 +#define I810_IOCTL_FSTATUS 0x4a +#define I810_IOCTL_OV0FLIP 0x4b +#define I810_IOCTL_MC 0x4c +#define I810_IOCTL_RSTATUS 0x4d +#define I810_IOCTL_FLUSH 0x43 +#define I810_IOCTL_GETBUF 0x45 + +/* COMMANDS */ +#define CMD_FLUSH ((4<<23) | 0x1) +#define BOOLEAN_ENA_1 ((3<<29) | (3<<24) | (3<<2)) +#define BOOLEAN_ENA_2 ((3<<29) | (4<<24) | (3<<16) | (1<<3) | (1<<2)) +#define DEST_BUFFER_INFO (0x15<<23) +#define DEST_BUFFER_VAR ((0x3<<29) | (0x1d<<24) | (0x85<<16)) +#define DRAWING_RECT_INFO ((3<<29) | (0x1d<<24) | (0x80<<16) | 3) +#define GFXBLOCK ((0x3<<29) | (0x1e<<24)) +#define CMD_MAP_INFO ((0x3<<29) | (0x1d<<24) | 0x2) +#define MAP_PALETTE_LOAD ((3<<29) | (0x1d<<24) | (0x82<<16) | 0xff) +#define VERTEX_FORMAT ((3<<29) | (0x5<<24)) +#define SRC_DEST_BLEND_MONO ((3<<29) | (8<<24)) + +/* Bit Patterns */ + +/* + * OV0CMD - Overlay Command Register + */ +#define VERTICAL_CHROMINANCE_FILTER 0x70000000 +#define VC_SCALING_OFF 0x00000000 +#define VC_LINE_REPLICATION 0x10000000 +#define VC_UP_INTERPOLATION 0x20000000 +#define VC_PIXEL_DROPPING 0x50000000 +#define VC_DOWN_INTERPOLATION 0x60000000 +#define VERTICAL_LUMINANCE_FILTER 0x0E000000 +#define VL_SCALING_OFF 0x00000000 +#define VL_LINE_REPLICATION 0x02000000 +#define VL_UP_INTERPOLATION 0x04000000 +#define VL_PIXEL_DROPPING 0x0A000000 +#define VL_DOWN_INTERPOLATION 0x0C000000 +#define HORIZONTAL_CHROMINANCE_FILTER 0x01C00000 +#define HC_SCALING_OFF 0x00000000 +#define HC_LINE_REPLICATION 0x00400000 +#define HC_UP_INTERPOLATION 0x00800000 +#define HC_PIXEL_DROPPING 0x01400000 +#define HC_DOWN_INTERPOLATION 0x01800000 +#define HORIZONTAL_LUMINANCE_FILTER 0x00380000 +#define HL_SCALING_OFF 0x00000000 +#define HL_LINE_REPLICATION 0x00080000 +#define HL_UP_INTERPOLATION 0x00100000 +#define HL_PIXEL_DROPPING 0x00280000 +#define HL_DOWN_INTERPOLATION 0x00300000 + +#define Y_ADJUST 0x00010000 +#define OV_BYTE_ORDER 0x0000C000 +#define UV_SWAP 0x00004000 +#define Y_SWAP 0x00008000 +#define Y_AND_UV_SWAP 0x0000C000 +#define SOURCE_FORMAT 0x00003C00 +#define RGB_555 0x00000800 +#define RGB_565 0x00000C00 +#define YUV_422 0x00002000 +#define YUV_411 0x00002400 +#define YUV_420 0x00003000 +#define YUV_410 0x00003800 +#define VERTICAL_PHASE_BOTH 0x00000020 +#define FLIP_TYPE_FIELD 0x00000020 +#define FLIP_TYPE_FRAME 0x00000000 +#define BUFFER_AND_FIELD 0x00000006 +#define BUFFER0_FIELD0 0x00000000 +#define BUFFER0_FIELD1 0x00000002 +#define BUFFER1_FIELD0 0x00000004 +#define BUFFER1_FIELD1 0x00000006 +#define OVERLAY_ENABLE 0x00000001 + +/* + * DOV0STA - Display/Overlay 0 Status Register + */ +#define DOV0STA 0x30008 +#define OV0ADD 0x30000 +#define MINUV_SCALE 0x1 + +#define RGB16ToColorKey(c) \ + (((c & 0xF800) << 8) | ((c & 0x07E0) << 5) | ((c & 0x001F) << 3)) + +/* Locking Macros lightweight lock used to prevent relocking */ +#define I810_LOCK(c,f) \ + if(!c->lock) { \ + drmGetLock(c->fd, c->drmcontext, f); \ + } \ + c->lock++; + +#define I810_UNLOCK(c) \ + c->lock--; \ + if(!c->lock) { \ + drmUnlock(c->fd, c->drmcontext); \ + } + +/* + Block until the passed in value (n) is the active + buffer on the overlay. +*/ +#define BLOCK_OVERLAY(c,n) \ + do { \ + int temp,i=0; \ + while(i < 100000) { \ + temp = GET_FSTATUS(c); \ + if(((temp & (1<<20))>>20) == n) { \ + break; \ + } \ + usleep(10); \ + } \ + if(i == 100000) { \ + printf("Overlay Lockup.\n"); \ + return BadAlloc; \ + } \ + }while(0); + +/* IOCTLs */ +#define OVERLAY_INFO(c,i) ioctl(c->fd ,I810_IOCTL_OV0INFO, i) +#define OVERLAY_FLIP(c) ioctl(c->fd , I810_IOCTL_OV0FLIP) +#define GET_FSTATUS(c) ioctl(c->fd , I810_IOCTL_FSTATUS) +#define I810_MC(c,mc) ioctl(c->fd, I810_IOCTL_MC, mc) +#define GET_RSTATUS(c) ioctl(c->fd, I810_IOCTL_RSTATUS) +#define GET_BUFFER(c,dma) ioctl(c->fd, I810_IOCTL_GETBUF ,dma) +#define FLUSH(c) ioctl(c->fd, I810_IOCTL_FLUSH) + +/* + Definitions for temporary wire protocol hooks to be replaced + when a HW independent libXvMC is created. +*/ +extern Status _xvmc_create_context(Display *dpy, XvMCContext *context, + int *priv_count, uint **priv_data); + +extern Status _xvmc_destroy_context(Display *dpy, XvMCContext *context); + +extern Status _xvmc_create_surface(Display *dpy, XvMCContext *context, + XvMCSurface *surface, int *priv_count, + uint **priv_data); + +extern Status _xvmc_destroy_surface(Display *dpy, XvMCSurface *surface); + +extern Status _xvmc_create_subpicture(Display *dpy, XvMCContext *context, + XvMCSubpicture *subpicture, + int *priv_count, uint **priv_data); + +extern Status _xvmc_destroy_subpicture(Display *dpy, + XvMCSubpicture *subpicture); + +/* + Prototypes +*/ +drmBufPtr i810_get_free_buffer(i810XvMCContext *pI810XvMC); +void i810_free_privContext(i810XvMCContext *pI810XvMC); +void dp(unsigned int *address, unsigned int i); + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: xc/lib/XvMC/hw/i810/Imakefile diff -u /dev/null xc/lib/XvMC/hw/i810/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:37 2002 +++ xc/lib/XvMC/hw/i810/Imakefile Thu Sep 27 04:25:03 2001 @@ -0,0 +1,45 @@ +XCOMM $XFree86: xc/lib/XvMC/hw/i810/Imakefile,v 1.1 2001/09/27 08:25:03 alanh Exp $ +#define DoNormalLib NormalLibXvMC +#define DoSharedLib SharedLibXvMC +#define DoDebugLib DebugLibXvMC +#define DoProfileLib ProfileLibXvMC +#define LibName I810XvMC +#define SoRev SOXVMCREV +#define LibHeaders NO + +#include + +#ifdef SharedXvMCReqs +REQUIREDLIBS = SharedXvMCReqs +#endif + +#if Malloc0ReturnsNull +ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL +#endif + + DEFINES = $(ALLOC_DEFINES) -DTRUE=1 -DFALSE=0 + INCLUDES = -I$(XINCLUDESRC) -I$(INCLUDESRC) -I$(XLIBSRC) -I$(EXTINCSRC) \ + -I$(XF86COMSRC) -I$(XF86OSSRC) -I$(XF86OSSRC)/linux/drm \ + -I$(XF86OSSRC)/linux/drm/kernel + SRCS = I810XvMC.c + OBJS = I810XvMC.o xf86drm.o xf86drmHash.o xf86drmI810.o \ + xf86drmRandom.o xf86drmSL.o + LINTLIBS = $(LINTXLIB) + + +#include + + +#if defined(LinuxArchitecture) +OS_SUBDIR = linux + +LinkSourceFile(xf86drm.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) +LinkSourceFile(xf86drmHash.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) +LinkSourceFile(xf86drmRandom.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) +LinkSourceFile(xf86drmSL.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) +LinkSourceFile(xf86drmI810.c,$(XF86OSSRC)/$(OS_SUBDIR)/drm) + +#endif + +DependTarget() + Index: xc/lib/Xxf86dga/XF86DGA.c diff -u xc/lib/Xxf86dga/XF86DGA.c:3.16 xc/lib/Xxf86dga/XF86DGA.c:3.19 --- xc/lib/Xxf86dga/XF86DGA.c:3.16 Mon May 3 08:15:53 1999 +++ xc/lib/Xxf86dga/XF86DGA.c Fri Aug 17 22:41:30 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86dga/XF86DGA.c,v 3.16 1999/05/03 12:15:53 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86dga/XF86DGA.c,v 3.19 2001/08/18 02:41:30 dawes Exp $ */ /* Copyright (c) 1995 Jon Tombs @@ -371,10 +371,11 @@ #include #include #include -extern int errno; #if defined(SVR4) && !defined(sun) && !defined(SCO325) #define DEV_MEM "/dev/pmem" +#elif defined(SVR4) && defined(sun) +#define DEV_MEM "/dev/xsvc" #else #define DEV_MEM "/dev/mem" #endif @@ -648,7 +649,7 @@ { ScrPtr sp; int i; - static beenhere = 0; + static char beenhere = 0; if (beenhere) _exit(3); Index: xc/lib/Xxf86dga/XF86DGA2.c diff -u xc/lib/Xxf86dga/XF86DGA2.c:1.17 xc/lib/Xxf86dga/XF86DGA2.c:1.18 --- xc/lib/Xxf86dga/XF86DGA2.c:1.17 Fri Jan 12 19:04:18 2001 +++ xc/lib/Xxf86dga/XF86DGA2.c Fri Aug 17 09:27:51 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86dga/XF86DGA2.c,v 1.17 2001/01/13 00:04:18 mvojkovi Exp $ */ +/* $XFree86: xc/lib/Xxf86dga/XF86DGA2.c,v 1.18 2001/08/17 13:27:51 dawes Exp $ */ /* Copyright (c) 1995 Jon Tombs @@ -742,6 +742,8 @@ #if defined(SVR4) && !defined(sun) && !defined(SCO325) #define DEV_MEM "/dev/pmem" +#elif defined(SVR4) && defined(sun) +#define DEV_MEM "/dev/xsvc" #else #define DEV_MEM "/dev/mem" #endif Index: xc/lib/Xxf86misc/XF86Misc.c diff -u xc/lib/Xxf86misc/XF86Misc.c:3.7 xc/lib/Xxf86misc/XF86Misc.c:3.9 --- xc/lib/Xxf86misc/XF86Misc.c:3.7 Sat Jun 27 23:52:34 1998 +++ xc/lib/Xxf86misc/XF86Misc.c Sat Oct 27 23:32:42 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/Xxf86misc/XF86Misc.c,v 3.7 1998/06/28 03:52:34 dawes Exp $ */ +/* $XFree86: xc/lib/Xxf86misc/XF86Misc.c,v 3.9 2001/10/28 03:32:42 tsi Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -104,7 +104,6 @@ XExtDisplayInfo *info = find_display (dpy); xXF86MiscGetMouseSettingsReply rep; xXF86MiscGetMouseSettingsReq *req; - int i; XF86MiscCheckExtension (dpy, info, False); @@ -151,7 +150,6 @@ XExtDisplayInfo *info = find_display (dpy); xXF86MiscGetKbdSettingsReply rep; xXF86MiscGetKbdSettingsReq *req; - int i; XF86MiscCheckExtension (dpy, info, False); @@ -181,7 +179,6 @@ { XExtDisplayInfo *info = find_display (dpy); xXF86MiscSetMouseSettingsReq *req; - int i; XF86MiscCheckExtension (dpy, info, False); @@ -210,7 +207,6 @@ { XExtDisplayInfo *info = find_display (dpy); xXF86MiscSetKbdSettingsReq *req; - int i; XF86MiscCheckExtension (dpy, info, False); @@ -228,3 +224,28 @@ return True; } +int XF86MiscSetGrabKeysState(dpy, enable) + Display* dpy; + Bool enable; +{ + XExtDisplayInfo *info = find_display (dpy); + xXF86MiscSetGrabKeysStateReply rep; + xXF86MiscSetGrabKeysStateReq *req; + + XF86MiscCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(XF86MiscSetGrabKeysState, req); + req->reqType = info->codes->major_opcode; + req->xf86miscReqType = X_XF86MiscSetGrabKeysState; + req->enable = enable; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return 0; + } + + UnlockDisplay(dpy); + SyncHandle(); + return rep.status; +} Index: xc/lib/Xxf86vm/XF86VMode.c diff -u xc/lib/Xxf86vm/XF86VMode.c:3.31 xc/lib/Xxf86vm/XF86VMode.c:3.32 --- xc/lib/Xxf86vm/XF86VMode.c:3.31 Mon May 7 16:11:13 2001 +++ xc/lib/Xxf86vm/XF86VMode.c Wed Jul 25 11:04:54 2001 @@ -1,5 +1,5 @@ /* $XConsortium: XF86VMode.c /main/2 1995/11/14 18:17:58 kaleb $ */ -/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.31 2001/05/07 20:11:13 mvojkovi Exp $ */ +/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.32 2001/07/25 15:04:54 dawes Exp $ */ /* Copyright (c) 1995 Kaleb S. KEITHLEY @@ -426,7 +426,7 @@ /* * GetReq replacement for use with VidMode protocols earlier than 2.0 */ -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define GetOldReq(name, oldname, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##oldname##Req)) > dpy->bufmax)\ Index: xc/lib/dps/XDPS.c diff -u xc/lib/dps/XDPS.c:1.2 xc/lib/dps/XDPS.c:1.3 --- xc/lib/dps/XDPS.c:1.2 Thu May 18 19:46:12 2000 +++ xc/lib/dps/XDPS.c Sat Oct 27 23:32:42 2001 @@ -35,6 +35,7 @@ * * Author: Adobe Systems Incorporated */ +/* $XFree86: xc/lib/dps/XDPS.c,v 1.3 2001/10/28 03:32:42 tsi Exp $ */ #define NEED_EVENTS #define NEED_REPLIES @@ -851,8 +852,6 @@ int dpyix; register Display *dpy = ShuntMap[dpyix = DPY_NUMBER(xdpy)]; register xPSGiveInputReq *req; - int sendlen; - XDPSLIOProcs *call; Bool didFlush = False; if (dpy != xdpy) @@ -1724,7 +1723,6 @@ XEvent event; DPSCAPData my; XExtData *extData; - void *next; XExtCodes *codes = Codes[DPY_NUMBER(xdpy)]; if (codes == NULL) @@ -2194,7 +2192,6 @@ DPSCAPResumeContext(Display *xdpy, ContextXID cxid) { register DPSCAPPausedContextData *slot; - unsigned int ret; int dpyix = DPY_NUMBER(xdpy); /* Try to match cxid to list of paused contexts */ Index: xc/lib/dps/Xlibnet.h diff -u xc/lib/dps/Xlibnet.h:1.5 xc/lib/dps/Xlibnet.h:1.6 --- xc/lib/dps/Xlibnet.h:1.5 Thu May 18 19:46:12 2000 +++ xc/lib/dps/Xlibnet.h Sat Jun 30 18:41:44 2001 @@ -13,7 +13,7 @@ suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ -/* $XFree86: xc/lib/dps/Xlibnet.h,v 1.5 2000/05/18 23:46:12 dawes Exp $ */ +/* $XFree86: xc/lib/dps/Xlibnet.h,v 1.6 2001/06/30 22:41:44 tsi Exp $ */ /* * Xlibnet.h - Xlib networking include files for UNIX Systems. */ @@ -58,7 +58,9 @@ #endif #if defined(i386) && defined(SYSV) +#if !defined(SCO) && !defined(SCO325) #include +#endif #include #define BytesReadable(fd,ptr) ioctl((fd), I_NREAD, (ptr)) #else @@ -271,7 +273,7 @@ #ifndef USL_COMPAT #if !defined(USG) || defined(MOTOROLA) -#if !(defined(SYSV) && defined(i386)) +#if (defined(SCO) || defined(SCO325)) || (!(defined(SYSV) && defined(i386))) #define _XReadV readv #endif #define _XWriteV writev Index: xc/lib/dps/csconndi.c diff -u xc/lib/dps/csconndi.c:1.6 xc/lib/dps/csconndi.c:1.11 --- xc/lib/dps/csconndi.c:1.6 Mon Apr 16 16:33:08 2001 +++ xc/lib/dps/csconndi.c Mon Jan 7 14:55:04 2002 @@ -47,7 +47,7 @@ * * Author: Adobe Systems Incorporated and MIT X Consortium */ -/* $XFree86: xc/lib/dps/csconndi.c,v 1.6 2001/04/16 20:33:08 tsi Exp $ */ +/* $XFree86: xc/lib/dps/csconndi.c,v 1.11 2002/01/07 19:55:04 dawes Exp $ */ #if defined(sun) && !defined(SVR4) #define memmove(t,f,c) bcopy(f,t,c) @@ -63,6 +63,7 @@ #include #include #include "Xlibnet.h" /* New for R5, delete for R4 */ +#include #ifndef hpux /* HP doesn't include Xauth.h :-( */ #include @@ -160,7 +161,6 @@ char *pscrnum = NULL; /* start of screen of display */ Bool dnet = False; /* if true, then DECnet format */ int iagent; /* required display number */ - int iscreen = 0; /* optional screen number */ int (*connfunc)(CONN_PARAMS); /* method to create connection */ int fd = -1; /* file descriptor to return */ int len; /* length tmp variable */ @@ -333,19 +333,13 @@ ioctl (fd, FIOSNBIO, &arg); } #else -#if defined(sun) && defined(SVR4) -#if !defined(_POSIX_C_SOURCE) - (void) fcntl (fd, F_SETFL, O_NDELAY); -#else +#if defined(O_NONBLOCK) (void) fcntl (fd, F_SETFL, O_NONBLOCK); -#endif -#else /* sun && SVR4 */ -#ifdef FNDELAY +#elif defined(FNDELAY) (void) fcntl (fd, F_SETFL, FNDELAY); #else (void) fcntl (fd, F_SETFL, O_NDELAY); -#endif /* FNDELAY */ -#endif /* sun && SVR4 */ +#endif /* O_NONBLOCK/FNDELAY */ #endif /* FIOSNBIO */ (void) fcntl (fd, F_SETFD, 1); @@ -417,9 +411,7 @@ #include #endif /* NO_TCP_H */ #else /* apollo */ -#ifndef __CYGWIN__ #include -#endif /* __CYGWIN__ */ #endif /* apollo */ #endif #endif /* NEED_BSDISH */ @@ -721,10 +713,8 @@ return 0; } - -#undef NULL -#define NULL ((char *) 0) +#include /* * This is an OS dependent routine which: * 1) returns as soon as the connection can be written on.... Index: xc/lib/dps/csfindNX.c diff -u xc/lib/dps/csfindNX.c:1.5 xc/lib/dps/csfindNX.c:1.7 --- xc/lib/dps/csfindNX.c:1.5 Tue Sep 26 11:56:59 2000 +++ xc/lib/dps/csfindNX.c Sat Oct 27 23:32:42 2001 @@ -35,10 +35,11 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/csfindNX.c,v 1.5 2000/09/26 15:56:59 tsi Exp $ */ +/* $XFree86: xc/lib/dps/csfindNX.c,v 1.7 2001/10/28 03:32:42 tsi Exp $ */ #include /* for MAXHOSTNAMELEN */ #include +#include #include /* getuid() */ #include #include @@ -285,7 +286,6 @@ i++) { Atom *licenseMethods = NULL; unsigned long nMethods; - unsigned long remaining; unsigned long j; if (GetProperty(dpy, agentList[i].id, @@ -432,7 +432,7 @@ int *port) { XrmDatabase rDB = NULL; /* for merged database */ - XrmDatabase serverDB, applicationDB; + XrmDatabase serverDB; char filenamebuf[1024]; char *filename = &filenamebuf[0]; char *env, *str_type; Index: xc/lib/dps/cslibext.c diff -u xc/lib/dps/cslibext.c:1.2 xc/lib/dps/cslibext.c:1.3 --- xc/lib/dps/cslibext.c:1.2 Thu May 18 19:46:12 2000 +++ xc/lib/dps/cslibext.c Sat Oct 27 23:32:42 2001 @@ -35,6 +35,7 @@ * * Author: Adobe Systems Incorporated */ +/* $XFree86: xc/lib/dps/cslibext.c,v 1.3 2001/10/28 03:32:42 tsi Exp $ */ #include #include @@ -203,7 +204,9 @@ p = (xCAPConnReplyPrefix *)&reply.good; N_XRead(agent, (char *)p, (long)sizeof(xCAPConnReplyPrefix)); +#ifdef DPSLNKL skip_read: +#endif if (!p->success) { char mbuf[512]; @@ -386,7 +389,6 @@ XGCValues *values) { register xChangeGCReq *req; - register _XExtension *ext; unsigned long oldDirty = gc->dirty; /* ASSERT: called from within LockDisplay section */ Index: xc/lib/dps/cslibint.h diff -u xc/lib/dps/cslibint.h:1.2 xc/lib/dps/cslibint.h:1.4 --- xc/lib/dps/cslibint.h:1.2 Thu May 18 19:46:13 2000 +++ xc/lib/dps/cslibint.h Wed Jul 25 11:04:54 2001 @@ -47,6 +47,7 @@ * * Author: Adobe Systems Incorporated and MIT X Consortium */ +/* $XFree86: xc/lib/dps/cslibint.h,v 1.4 2001/07/25 15:04:54 dawes Exp $ */ /* * XlibInternal.h - Header definition and support file for the internal @@ -64,10 +65,16 @@ /* For SYSV, no gethostname, so fake it */ #include +#if defined(SCO) || defined(SCO325) +/* SCO systems define MAXHOSTNAMELEN here */ +#include +#endif + #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif + /* === MACROS === */ /* @@ -79,7 +86,7 @@ * */ -#if defined(__STDC__) && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define NXMacroGetReq(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ @@ -107,7 +114,7 @@ /* GetReqExtra is the same as GetReq, but allocates "n" additional bytes after the request. "n" must be a multiple of 4! */ -#if defined(__STDC__) && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define GetReqExtra(name, n, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\ @@ -136,7 +143,7 @@ * "rid" is the name of the resource. */ -#if __STDC__ && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define GetResReq(name, rid, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\ @@ -164,7 +171,7 @@ * GetEmptyReq is for those requests that have no arguments * at all. */ -#if __STDC__ && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define GetEmptyReq(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\ Index: xc/lib/dps/csopendi.c diff -u xc/lib/dps/csopendi.c:1.2 xc/lib/dps/csopendi.c:1.3 --- xc/lib/dps/csopendi.c:1.2 Thu May 18 19:46:13 2000 +++ xc/lib/dps/csopendi.c Sat Oct 27 23:32:43 2001 @@ -46,6 +46,7 @@ * * Author: Adobe Systems Incorporated and MIT X Consortium */ +/* $XFree86: xc/lib/dps/csopendi.c,v 1.3 2001/10/28 03:32:43 tsi Exp $ */ #include #include @@ -90,6 +91,9 @@ 0, 0, 0 }; +static void OutOfMemory (Display *); + +#ifdef XXX /* * First, a routine for setting authorization data */ @@ -98,9 +102,6 @@ static int xauth_datalen = 0; static char *xauth_data = NULL; /* NULL means get default data */ -static void OutOfMemory (Display *); - -#ifdef XXX void XSetAuthorization (char *name, int namelen, char *data, int datalen) { char *tmpname, *tmpdata; @@ -152,13 +153,11 @@ register Display *agent; char *agentHost = (char *)NULL; register int i; - int j, k; /* random iterator indexes */ char display_name[256]; /* pointer to display name */ char licMethBuf[256]; char *licMeth = licMethBuf; char *fullname = NULL; int idisplay; - int iscreen; char *server_addr = NULL; int server_addrlen = 0; int conn_family; Index: xc/lib/dps/csstartNX.c diff -u xc/lib/dps/csstartNX.c:1.3 xc/lib/dps/csstartNX.c:1.6 --- xc/lib/dps/csstartNX.c:1.3 Thu May 18 19:46:13 2000 +++ xc/lib/dps/csstartNX.c Sat Oct 27 23:32:43 2001 @@ -35,6 +35,7 @@ * * Author: Adobe Systems Incorporated */ +/* $XFree86: xc/lib/dps/csstartNX.c,v 1.6 2001/10/28 03:32:43 tsi Exp $ */ #include #include @@ -53,9 +54,7 @@ /* ---Defines--- */ -#ifndef NULL -#define NULL (void *) 0 -#endif +#include #define DOZETIME 1 /* time to wait for agent to start up (sec) */ @@ -80,7 +79,6 @@ { struct sockaddr_in insock; int request; - int retry; unsigned short port, startPort = 0; struct servent *serventInfo; int okay; Index: xc/lib/dps/dpsNXprops.h diff -u xc/lib/dps/dpsNXprops.h:1.1 xc/lib/dps/dpsNXprops.h:1.3 --- xc/lib/dps/dpsNXprops.h:1.1 Sat Feb 12 19:12:56 2000 +++ xc/lib/dps/dpsNXprops.h Sun Jul 29 01:01:13 2001 @@ -35,6 +35,7 @@ * * Author: Adobe Systems Incorporated */ +/* $XFree86: xc/lib/dps/dpsNXprops.h,v 1.3 2001/07/29 05:01:13 tsi Exp $ */ #ifndef DPSNXPROPS_H #define DPSNXPROPS_H @@ -75,9 +76,7 @@ #define LICENSE_METHOD_OPEN "_ADOBE_DPS_NX_LICENSE_OPEN_SERVICE" #define OPEN_LICENSE_VERSION 1 -#ifndef NULL -#define NULL (void *) 0 -#endif /* NULL */ +#include /* ---Types--- */ Index: xc/lib/dps/dpsXcmu.c diff -u xc/lib/dps/dpsXcmu.c:1.4 xc/lib/dps/dpsXcmu.c:1.5 --- xc/lib/dps/dpsXcmu.c:1.4 Tue Sep 26 11:56:59 2000 +++ xc/lib/dps/dpsXcmu.c Wed Jul 25 11:04:54 2001 @@ -54,7 +54,7 @@ * * Author: Adobe Systems Incorporated and Donna Converse, MIT X Consortium */ -/* $XFree86: xc/lib/dps/dpsXcmu.c,v 1.4 2000/09/26 15:56:59 tsi Exp $ */ +/* $XFree86: xc/lib/dps/dpsXcmu.c,v 1.5 2001/07/25 15:04:54 dawes Exp $ */ #include #include @@ -72,9 +72,7 @@ /* Defines for standard colormap routines */ #define PrivSort qsort -#ifndef NULL -#define NULL 0 -#endif /* NULL */ +#include static char redsName[] = "reds"; static char greensName[] = "greens"; Index: xc/lib/dps/dpsXpriv.c diff -u xc/lib/dps/dpsXpriv.c:1.4 xc/lib/dps/dpsXpriv.c:1.6 --- xc/lib/dps/dpsXpriv.c:1.4 Sun Apr 1 10:00:03 2001 +++ xc/lib/dps/dpsXpriv.c Fri Nov 16 11:47:52 2001 @@ -35,12 +35,13 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/dpsXpriv.c,v 1.4 2001/04/01 14:00:03 tsi Exp $ */ +/* $XFree86: xc/lib/dps/dpsXpriv.c,v 1.6 2001/11/16 16:47:52 dawes Exp $ */ #include #include #include #include +#include #ifdef GC #undef GC @@ -71,6 +72,10 @@ #ifdef ISC #include +#endif + +#ifdef __QNX__ +#include #endif #if defined(hpux) || defined(AIXV3) Index: xc/lib/dps/dpsprintf.c diff -u xc/lib/dps/dpsprintf.c:1.3 xc/lib/dps/dpsprintf.c:1.4 --- xc/lib/dps/dpsprintf.c:1.3 Tue Sep 26 11:57:00 2000 +++ xc/lib/dps/dpsprintf.c Wed Jul 25 11:04:54 2001 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/dpsprintf.c,v 1.3 2000/09/26 15:57:00 tsi Exp $ */ +/* $XFree86: xc/lib/dps/dpsprintf.c,v 1.4 2001/07/25 15:04:54 dawes Exp $ */ #include #include @@ -53,11 +53,7 @@ { va_list args; -#if defined(__STDC__) || defined(AIXV3) || defined(ultrix) va_start(args, fmt); -#else - va_start(args); -#endif #ifdef USE_DOPRINT DPSdoprint(ctxt, fmt, &args); Index: xc/lib/dps/publictypes.h diff -u xc/lib/dps/publictypes.h:1.2 xc/lib/dps/publictypes.h:1.3 --- xc/lib/dps/publictypes.h:1.2 Wed Jun 7 18:02:58 2000 +++ xc/lib/dps/publictypes.h Wed Jul 25 11:04:54 2001 @@ -35,7 +35,7 @@ * * Author: Adobe Systems Incorporated */ -/* $XFree86: xc/lib/dps/publictypes.h,v 1.2 2000/06/07 22:02:58 tsi Exp $ */ +/* $XFree86: xc/lib/dps/publictypes.h,v 1.3 2001/07/25 15:04:54 dawes Exp $ */ #ifndef PUBLICTYPES_H #define PUBLICTYPES_H @@ -64,9 +64,7 @@ /* Generic Pointers */ -#ifndef NULL -#define NULL 0 -#endif /* NULL */ +#include #define NIL NULL Index: xc/lib/font/Imakefile diff -u xc/lib/font/Imakefile:3.32 xc/lib/font/Imakefile:3.33 --- xc/lib/font/Imakefile:3.32 Wed Jan 17 14:43:16 2001 +++ xc/lib/font/Imakefile Mon Aug 27 13:40:58 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/Imakefile,v 3.32 2001/01/17 19:43:16 dawes Exp $ +XCOMM $XFree86: xc/lib/font/Imakefile,v 3.33 2001/08/27 17:40:58 dawes Exp $ #include @@ -15,6 +15,22 @@ #define DoDebugLib DebugLibFont #define DoProfileLib ProfileLibFont +#if !BuildFontLib +#define LibCreate NO +#else +#define LibCreate YES +#endif + +#if BuildLibraries +#define LibInstall YES +#else +#define LibInstall NO +#endif + +#if BuildLibraries +STUBDIRS = stubs +#endif + LIBNAME = Xfont SOREV = $(SOFONTREV) @@ -75,7 +91,7 @@ SUBDIRS = bitmap fontfile fc fontcache \ $(SPEEDODIRS) $(TYPE1DIRS) \ $(FREETYPEDIRS) $(XTTDIRS) $(BUILTINDIRS) \ - util stubs + util $(STUBDIRS) SHARED_OBJS = bitmap/?*.o fontfile/?*.o fc/?*.o fontcache/?*.o \ $(SPEEDOSHAREDOBJS) $(TYPE1SHAREDOBJS) \ $(FREETYPESHAREDOBJS) $(XTTSHAREDOBJS) \ @@ -123,25 +139,35 @@ #undef _LinkBuildLibrary #define _LinkBuildLibrary(lib) LinkBuildLibrary(lib) +#if LibCreate #if NormalLibFont NormalDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(STATIC_OBJS)) +#if LibInstall InstallLibrary($(LIBNAME),$(USRLIBDIR)) +#endif /* LibInstall */ #endif /* NormalLibFont */ #if SharedLibFont SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(SUBDIRS) $(DONES),$(SHARED_OBJS),.,.) +#if LibInstall InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR)) +#endif /* LibInstall */ #endif /* SharedLibFont */ #if DebugLibFont DebuggedDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(DEBUG_OBJS)) +#if LibInstall InstallLibrary($(LIBNAME)_d,$(USRLIBDIR)) +#endif /* LibInstall */ #endif /* DebugLibFont */ #if ProfileLibFont ProfiledDepLibraryTarget($(LIBNAME),$(SUBDIRS) $(DONES),$(PROFILE_OBJS)) +#if LibInstall InstallLibrary($(LIBNAME)_p,$(USRLIBDIR)) +#endif /* LibInstall */ #endif /* ProfileLibFont */ +#endif /* LibCreate */ #if BuildServer && DoLoadableServer NormalDepLibraryTarget(fontbase,$(BASEDIRS) $(BASEDONES),$(BASELIBOBJS)) Index: xc/lib/font/FreeType/Imakefile diff -u xc/lib/font/FreeType/Imakefile:1.16 xc/lib/font/FreeType/Imakefile:1.17 --- xc/lib/font/FreeType/Imakefile:1.16 Tue Sep 19 08:46:06 2000 +++ xc/lib/font/FreeType/Imakefile Mon Aug 27 13:40:58 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/font/FreeType/Imakefile,v 1.16 2000/09/19 12:46:06 eich Exp $ +XCOMM $XFree86: xc/lib/font/FreeType/Imakefile,v 1.17 2001/08/27 17:40:58 dawes Exp $ XCOMM Imakefile created for the Freetype TrueType renderer. XCOMM Mark Leisher @@ -35,6 +35,7 @@ SRCS = ftfuncs.c ftenc.c ftutil.c freetype.c ftxcmap.c OBJS = ftfuncs.o ftenc.o ftutil.o freetype.o ftxcmap.o +#if BuildFontLib #define DoNormalLib NormalLibFont #define DoSharedLib SharedLibFont #define DoDebugLib DebugLibFont @@ -47,6 +48,7 @@ LinkSourceFile(freetype.c,$(FTSOURCEDIR)/lib/arch/unix) LinkSourceFile(ftxcmap.c,$(FTSOURCEDIR)/lib/extend) +#endif #if BuildServer && DoLoadableServer MakeSubdirs($(SUBDIRS)) Index: xc/lib/font/FreeType/ft.h diff -u xc/lib/font/FreeType/ft.h:1.13 xc/lib/font/FreeType/ft.h:1.16 --- xc/lib/font/FreeType/ft.h:1.13 Tue Nov 14 11:54:42 2000 +++ xc/lib/font/FreeType/ft.h Mon Aug 13 17:46:46 2001 @@ -21,8 +21,13 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/FreeType/ft.h,v 1.13 2000/11/14 16:54:42 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ft.h,v 1.16 2001/08/13 21:46:46 dawes Exp $ */ +#ifndef _FT_H_ +#define _FT_H_ + +#include + #undef DEBUG_TRUETYPE #ifdef DEBUG_TRUETYPE @@ -64,8 +69,7 @@ int has_cmap; TT_CharMap cmap; int base; - struct font_encoding *encoding; - struct font_encoding_mapping *mapping; + struct _FontMap *mapping; /* allow inclusion without fontenc.h */ }; /* Prototypes */ @@ -88,3 +92,6 @@ int ttf_GetEnglishName(TT_Face, char *, int); int ttf_checkForTTCName(char*, char**, int*); +extern void ErrorF(const char*, ...); + +#endif /* _FT_H_ */ Index: xc/lib/font/FreeType/ft_conf.h diff -u xc/lib/font/FreeType/ft_conf.h:1.9 xc/lib/font/FreeType/ft_conf.h:1.10 --- xc/lib/font/FreeType/ft_conf.h:1.9 Tue Nov 28 14:09:28 2000 +++ xc/lib/font/FreeType/ft_conf.h Wed Jul 25 11:04:55 2001 @@ -1,6 +1,6 @@ /* ft_conf.h. Xserver-specific version. */ -/* $XFree86: xc/lib/font/FreeType/ft_conf.h,v 1.9 2000/11/28 19:09:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ft_conf.h,v 1.10 2001/07/25 15:04:55 dawes Exp $ */ /* we need the following because there are some typedefs in this file */ #ifndef FT_CONF_H @@ -24,9 +24,7 @@ #undef _XOPEN_SOURCE #endif /* Define if you have the header file. */ -#ifndef X_NOT_STDC_ENV #define HAVE_STDLIB_H 1 -#endif #else Index: xc/lib/font/FreeType/ftenc.c diff -u xc/lib/font/FreeType/ftenc.c:1.16 xc/lib/font/FreeType/ftenc.c:1.18 --- xc/lib/font/FreeType/ftenc.c:1.16 Thu Apr 6 11:27:23 2000 +++ xc/lib/font/FreeType/ftenc.c Sat Oct 27 23:32:43 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/lib/font/FreeType/ftenc.c,v 1.16 2000/04/06 15:27:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ftenc.c,v 1.18 2001/10/28 03:32:43 tsi Exp $ */ /* Copyright (c) 1998 by Juliusz Chroboczek @@ -42,26 +42,24 @@ ttf_pick_cmap(char *xlfd, int length, char *filename, TT_Face face, struct ttf_mapping *tm) { - struct font_encoding *encoding; - struct font_encoding_mapping *mapping; + FontEncPtr encoding; + FontMapPtr mapping; TT_CharMap cmap; - char *encoding_name=0; if(xlfd) - encoding_name=font_encoding_from_xlfd(xlfd, length); + encoding_name=FontEncFromXLFD(xlfd, length); if(!encoding_name) encoding_name="iso8859-1"; if(!strcasecmp(encoding_name, "truetype-raw")) { tm->has_cmap=0; tm->base=0; - tm->encoding=0; tm->mapping=0; return 0; } else { - if(encoding=font_encoding_find(encoding_name, filename)) { + if((encoding=FontEncFind(encoding_name, filename))) { for(mapping=encoding->mappings; mapping; mapping=mapping->next) { if(!find_cmap(mapping->type, mapping->pid, mapping->eid, face, &cmap)) { @@ -77,7 +75,6 @@ tm->base=0; } else tm->base=0; - tm->encoding=encoding; tm->mapping=mapping; return 0; } @@ -99,7 +96,6 @@ tm->has_cmap=1; tm->cmap=cmap; tm->base=0; - tm->encoding=0; tm->mapping=0; return 0; } @@ -109,7 +105,6 @@ tm->has_cmap=1; tm->cmap=cmap; tm->base=0; - tm->encoding=0; tm->mapping=0; return 0; } @@ -117,7 +112,6 @@ /* Tough. */ tm->has_cmap=0; tm->base=0; - tm->encoding=0; tm->mapping=0; return 0; } @@ -181,8 +175,8 @@ { unsigned index; - if(tm->encoding) { - index=font_encoding_recode(code, tm->encoding, tm->mapping); + if(tm->mapping) { + index=FontEncRecode(code, tm->mapping); } else { if(code<0x100 || !tm->has_cmap) index=code; Index: xc/lib/font/FreeType/ftfuncs.c diff -u xc/lib/font/FreeType/ftfuncs.c:1.18 xc/lib/font/FreeType/ftfuncs.c:1.21 --- xc/lib/font/FreeType/ftfuncs.c:1.18 Wed May 16 04:32:33 2001 +++ xc/lib/font/FreeType/ftfuncs.c Sat Oct 27 23:32:43 2001 @@ -21,7 +21,7 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.18 2001/05/16 08:32:33 alanh Exp $ */ +/* $XFree86: xc/lib/font/FreeType/ftfuncs.c,v 1.21 2001/10/28 03:32:43 tsi Exp $ */ #ifndef FONT_MODULE #include @@ -104,7 +104,7 @@ /* Report initialization errors as an allocation error because X does * not provide any other kind of error code related to intialization. */ - if (ftrc=TT_Init_FreeType(&ftypeEngine)) { + if ((ftrc=TT_Init_FreeType(&ftypeEngine))) { MUMBLE1("Error initializing ftypeEngine: %d\n", ftrc); return AllocError; } @@ -152,14 +152,14 @@ xfree(face); return BadFontPath; } - if(ftrc=TT_Get_Face_Properties(face->face, &face->properties)) { + if((ftrc=TT_Get_Face_Properties(face->face, &face->properties))) { MUMBLE1("Couldn't get properties: %d\n", ftrc); TT_Close_Face(face->face); xfree(face->filename); xfree(face); return BadFontPath; } - if(ftrc=TT_New_Glyph(face->face, &face->glyph)) { + if((ftrc=TT_New_Glyph(face->face, &face->glyph))) { MUMBLE1("Couldn't allocate glyph container: %d\n", ftrc); TT_Close_Face(face->face); xfree(face->filename); @@ -301,22 +301,22 @@ instance->glyphs=0; instance->available=0; - if(ftrc=TT_New_Instance(instance->face->face, &instance->instance)) { + if((ftrc=TT_New_Instance(instance->face->face, &instance->instance))) { MUMBLE("Couldn't create instance\n"); FreeTypeFreeFace(instance->face); xfree(instance); return FTtoXReturnCode(ftrc); } - if(ftrc=TT_Set_Instance_Resolutions(instance->instance, - trans->xres, trans->yres)) { + if((ftrc=TT_Set_Instance_Resolutions(instance->instance, + trans->xres, trans->yres))) { TT_Done_Instance(instance->instance); FreeTypeFreeFace(instance->face); xfree(instance); MUMBLE1("Couldn't set resolution: %d\n:", ftrc); return FTtoXReturnCode(ftrc); } - if(ftrc=TT_Set_Instance_CharSize(instance->instance, - (int)(trans->scale*(1<<6)+0.5))) { + if((ftrc=TT_Set_Instance_CharSize(instance->instance, + (int)(trans->scale*(1<<6)+0.5)))) { TT_Done_Instance(instance->instance); FreeTypeFreeFace(instance->face); xfree(instance); @@ -335,7 +335,7 @@ TT_Set_Instance_Transform_Flags(instance->instance, rotated, stretched); } - if(ftrc=TT_Get_Instance_Metrics(instance->instance, &instance->imetrics)) { + if((ftrc=TT_Get_Instance_Metrics(instance->instance, &instance->imetrics))) { TT_Done_Instance(instance->instance); FreeTypeFreeFace(instance->face); xfree(instance); @@ -483,8 +483,8 @@ } /* Tough: need to rasterise a new glyph. */ - if(ftrc=TT_Load_Glyph(instance->instance, instance->face->glyph, - idx, TTLOAD_DEFAULT)) { + if((ftrc=TT_Load_Glyph(instance->instance, instance->face->glyph, + idx, TTLOAD_DEFAULT))) { return FTtoXReturnCode(ftrc); } @@ -706,7 +706,7 @@ TTFFont *tf; if(pFont) { - if(tf=(TTFFont*)pFont->fontPrivate) { + if((tf=(TTFFont*)pFont->fontPrivate)) { FreeTypeFreeFont(tf); } if(freeProps && pFont->info.nprops>0) { @@ -741,7 +741,7 @@ int i, j, maxprops; char *sp, *ep, val[MAXFONTNAMELEN]; TT_Instance_Metrics imetrics; - int upm; /* units per em */ + int upm = 0; /* units per em */ TTFFace *face; TTFInstance *instance; TTFNormalisedTransformation *trans; @@ -1004,9 +1004,9 @@ /* Only pass the default glyph if there is no first index */ if(idx==0 && (code != 0 || - (font->mapping.encoding && - (font->mapping.encoding->first != 0 || - font->mapping.encoding->first_col != 0)))) { + (font->mapping.mapping && + (font->mapping.mapping->encoding->first != 0 || + font->mapping.mapping->encoding->first_col != 0)))) { *g=0; return Successful; } else { @@ -1042,9 +1042,9 @@ if(idx==0 && (code!=0 || - (font->mapping.encoding && - (font->mapping.encoding->first != 0 || - font->mapping.encoding->first_col != 0)))) { + (font->mapping.mapping && + (font->mapping.mapping->encoding->first != 0 || + font->mapping.mapping->encoding->first_col != 0)))) { *metrics=0; return Successful; } else { @@ -1056,8 +1056,9 @@ FreeTypeFontGetDefaultGlyph(CharInfoPtr *g, TTFFont *font) { /* Disable default glyph generation if there is a first index */ - if(font->mapping.encoding && - (font->mapping.encoding->first || font->mapping.encoding->first_col)) { + if(font->mapping.mapping && + (font->mapping.mapping->encoding->first || + font->mapping.mapping->encoding->first_col)) { *g=0; return Successful; } @@ -1307,7 +1308,7 @@ face=instance->face; properties=&face->properties; - if(ftrc=TT_Get_Instance_Metrics(instance->instance, &imetrics)) { + if((ftrc=TT_Get_Instance_Metrics(instance->instance, &imetrics))) { FreeTypeFreeFont(font); return FTtoXReturnCode(ftrc); } @@ -1361,14 +1362,15 @@ } } - if(!font->mapping.encoding || font->mapping.encoding->row_size == 0) { + if(!font->mapping.mapping || + font->mapping.mapping->encoding->row_size == 0) { /* linear indexing */ lastCode=MIN(lastCode, - font->mapping.encoding ? - font->mapping.encoding->size-1 : + font->mapping.mapping ? + font->mapping.mapping->encoding->size-1 : (font->mapping.has_cmap ? 0xFF : 0xFFFF)); - if(font->mapping.encoding && font->mapping.encoding->first) - firstCode=font->mapping.encoding->first; + if(font->mapping.mapping && font->mapping.mapping->encoding->first) + firstCode=font->mapping.mapping->encoding->first; info->firstRow=firstCode/0x100; info->lastRow=lastCode/0x100; info->firstCol= @@ -1376,10 +1378,11 @@ info->lastCol=info->lastRow ? 0xFF : (lastCode & 0xFF); } else { /* matrix indexing */ - info->firstRow=font->mapping.encoding->first; - info->lastRow=MIN(font->mapping.encoding->size-1, lastCode/0x100); - info->firstCol=font->mapping.encoding->first_col; - info->lastCol=MIN(font->mapping.encoding->row_size-1, + info->firstRow=font->mapping.mapping->encoding->first; + info->lastRow=MIN(font->mapping.mapping->encoding->size-1, + lastCode/0x100); + info->firstCol=font->mapping.mapping->encoding->first_col; + info->lastCol=MIN(font->mapping.mapping->encoding->row_size-1, lastCode<0x100?lastCode:0xFF); } @@ -1475,7 +1478,7 @@ FontEncoding charEncoding, unsigned long *metricCount, xCharInfo **metrics) { - unsigned code; + unsigned int code = 0; TTFFont *tf; xCharInfo **mp, *m; @@ -1516,7 +1519,7 @@ FontEncoding charEncoding, unsigned long *glyphCount, CharInfoPtr *glyphs) { - unsigned code; + unsigned int code = 0; TTFFont *tf; CharInfoPtr *gp; CharInfoPtr g; Index: xc/lib/font/FreeType/module/ftmodule.c diff -u xc/lib/font/FreeType/module/ftmodule.c:1.9 xc/lib/font/FreeType/module/ftmodule.c:1.10 --- xc/lib/font/FreeType/module/ftmodule.c:1.9 Tue Feb 13 16:15:15 2001 +++ xc/lib/font/FreeType/module/ftmodule.c Tue Sep 4 09:49:16 2001 @@ -23,7 +23,7 @@ * dealings in this Software without prior written authorization from the * XFree86 Project. */ -/* $XFree86: xc/lib/font/FreeType/module/ftmodule.c,v 1.9 2001/02/13 21:15:15 dawes Exp $ */ +/* $XFree86: xc/lib/font/FreeType/module/ftmodule.c,v 1.10 2001/09/04 13:49:16 dawes Exp $ */ #include "misc.h" @@ -44,7 +44,7 @@ MODINFOSTRING1, MODINFOSTRING2, XF86_VERSION_CURRENT, - 1, 1, 9, + 1, 1, 10, ABI_CLASS_FONT, /* Font module */ ABI_FONT_VERSION, MOD_CLASS_FONT, Index: xc/lib/font/Speedo/Imakefile diff -u xc/lib/font/Speedo/Imakefile:1.10 xc/lib/font/Speedo/Imakefile:1.11 --- xc/lib/font/Speedo/Imakefile:1.10 Fri Jan 19 03:13:29 2001 +++ xc/lib/font/Speedo/Imakefile Mon Aug 27 13:40:58 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/Speedo/Imakefile,v 1.10 2001/01/19 08:13:29 dawes Exp $ +XCOMM $XFree86: xc/lib/font/Speedo/Imakefile,v 1.11 2001/08/27 17:40:58 dawes Exp $ #if BuildServer && DoLoadableServer #define IHaveSubdirs @@ -26,6 +26,7 @@ spencode.o bics-unicode.o \ $(SPEEDOOBJS) +#if BuildFontLib #define DoNormalLib NormalLibFont #define DoSharedLib SharedLibFont #define DoDebugLib DebugLibFont @@ -35,6 +36,7 @@ SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) +#endif #if BuildServer && DoLoadableServer MakeSubdirs($(SUBDIRS)) Index: xc/lib/font/Speedo/bics-iso.h diff -u xc/lib/font/Speedo/bics-iso.h:1.6 xc/lib/font/Speedo/bics-iso.h:1.7 --- xc/lib/font/Speedo/bics-iso.h:1.6 Wed Jan 17 14:43:17 2001 +++ xc/lib/font/Speedo/bics-iso.h Fri Dec 14 14:56:41 2001 @@ -1,9 +1,13 @@ -/* $Xorg: bics-iso.h,v 1.3 2000/08/17 19:46:24 cpqbld Exp $ */ +/* $Xorg: bics-iso.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/bics-iso.h,v 1.6 2001/01/17 19:43:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/bics-iso.h,v 1.7 2001/12/14 19:56:41 dawes Exp $ */ int sp_bics_map[] = { 32, 0, Index: xc/lib/font/Speedo/do_char.c diff -u xc/lib/font/Speedo/do_char.c:1.3 xc/lib/font/Speedo/do_char.c:1.4 --- xc/lib/font/Speedo/do_char.c:1.3 Wed Jan 17 14:43:17 2001 +++ xc/lib/font/Speedo/do_char.c Mon Aug 27 15:49:50 2001 @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/do_char.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/do_char.c,v 1.4 2001/08/27 19:49:50 dawes Exp $ */ /***************************** D O - C H A R . C ***************************** * * @@ -146,16 +146,16 @@ */ { ufix8 FONTFAR *pointer; /* Pointer to character data */ -fix15 no_tracks; /* Number of kerning tracks in font */ -ufix8 format; /* Track kerning format byte */ -fix15 i; /* Track counter */ -fix15 min_pt_size; /* Minimum point size for track */ -fix15 max_pt_size; /* Maximum point size for track */ -fix15 min_adj; /* Adjustment for min point size */ -fix15 max_adj; /* Adjustment for max point size */ -fix31 delta_pt_size;/* Max point size - min point size */ -fix31 delta_adj; /* Min adjustment - max adjustment */ -fix15 adj = 0; /* Interpolated adjustment */ +fix15 no_tracks; /* Number of kerning tracks in font */ +ufix8 format; /* Track kerning format byte */ +fix15 i; /* Track counter */ +fix15 min_pt_size = 0; /* Minimum point size for track */ +fix15 max_pt_size = 0; /* Maximum point size for track */ +fix15 min_adj = 0; /* Adjustment for min point size */ +fix15 max_adj = 0; /* Adjustment for max point size */ +fix31 delta_pt_size; /* Max point size - min point size */ +fix31 delta_adj; /* Min adjustment - max adjustment */ +fix15 adj = 0; /* Interpolated adjustment */ if (track == 0) /* Track zero selected? */ { @@ -236,7 +236,7 @@ fix15 base; /* Index to first record in rem kern pairs */ fix15 i; /* Index to kern pair being tested */ fix31 adj = 0; /* Returned value of adjustment */ -fix15 adj_base; /* Adjustment base for relative adjustments */ +fix15 adj_base = 0; /* Adjustment base for relative adjustments */ if (!sp_globals.specs_valid) /* Font specs not defined? */ { Index: xc/lib/font/Speedo/do_trns.c diff -u xc/lib/font/Speedo/do_trns.c:1.3 xc/lib/font/Speedo/do_trns.c:1.4 --- xc/lib/font/Speedo/do_trns.c:1.3 Wed Jan 17 14:43:17 2001 +++ xc/lib/font/Speedo/do_trns.c Mon Aug 27 15:49:50 2001 @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/do_trns.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/do_trns.c,v 1.4 2001/08/27 19:49:50 dawes Exp $ */ /**************************** D O _ T R N S . C ****************************** * * @@ -75,7 +75,7 @@ */ { ufix8 format1; -ufix8 format; +ufix8 format = 0; fix15 i; point_t P; Index: xc/lib/font/Speedo/set_spcs.c diff -u xc/lib/font/Speedo/set_spcs.c:1.3 xc/lib/font/Speedo/set_spcs.c:1.4 --- xc/lib/font/Speedo/set_spcs.c:1.3 Wed Jan 17 14:43:17 2001 +++ xc/lib/font/Speedo/set_spcs.c Mon Aug 27 15:49:50 2001 @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/set_spcs.c,v 1.3 2001/01/17 19:43:17 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/set_spcs.c,v 1.4 2001/08/27 19:49:50 dawes Exp $ */ /*************************** S E T _ S P C S . C ***************************** @@ -402,7 +402,7 @@ fix15 i; /* Loop counter */ fix15 x, y; /* Successive corners of bounding box in ORUs */ fix31 pixval; /* Successive pixel values multiplied by orus per em */ -fix15 xx, yy; /* Bounding box corner that produces max pixel value */ +fix15 xx = 0, yy = 0;/* Bounding box corner that produces max pixel value */ /* Determine numerator and denominator of largest multiplier value */ mult = sp_globals.pspecs->xxmult >> 16; Index: xc/lib/font/Speedo/set_trns.c diff -u xc/lib/font/Speedo/set_trns.c:1.3 xc/lib/font/Speedo/set_trns.c:1.4 --- xc/lib/font/Speedo/set_trns.c:1.3 Wed Jan 17 14:43:18 2001 +++ xc/lib/font/Speedo/set_trns.c Mon Aug 27 15:49:50 2001 @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.3 2001/01/17 19:43:18 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/set_trns.c,v 1.4 2001/08/27 19:49:50 dawes Exp $ */ @@ -1167,15 +1167,15 @@ ufix8 format; ufix8 format_copy; ufix8 tmpufix8; -fix15 start_orus; +fix15 start_orus = 0; ufix8 edge_org; ufix8 edge; ufix16 adj_factor; fix15 adj_orus; -fix15 end_orus; +fix15 end_orus = 0; fix31 zone_orus; -fix15 start_pix; -fix15 end_pix; +fix15 start_pix = 0; +fix15 end_pix = 0; #if INCL_PLAID_OUT /* Plaid data monitoring included? */ Index: xc/lib/font/Speedo/speedo.h diff -u xc/lib/font/Speedo/speedo.h:3.5 xc/lib/font/Speedo/speedo.h:3.6 --- xc/lib/font/Speedo/speedo.h:3.5 Wed Jan 17 14:43:18 2001 +++ xc/lib/font/Speedo/speedo.h Wed Jul 25 11:04:55 2001 @@ -21,7 +21,7 @@ WITH THE SPEEDO SOFTWARE OR THE BITSTREAM CHARTER OUTLINE FONT. */ -/* $XFree86: xc/lib/font/Speedo/speedo.h,v 3.5 2001/01/17 19:43:18 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/speedo.h,v 3.6 2001/07/25 15:04:55 dawes Exp $ */ #ifndef _SPEEDO_H_ #define _SPEEDO_H_ @@ -172,7 +172,7 @@ #endif #ifndef NULL -#define NULL 0 +#include #endif #define FUNCTION Index: xc/lib/font/Speedo/spencode.c diff -u xc/lib/font/Speedo/spencode.c:1.6 xc/lib/font/Speedo/spencode.c:1.7 --- xc/lib/font/Speedo/spencode.c:1.6 Wed Jan 17 14:43:18 2001 +++ xc/lib/font/Speedo/spencode.c Fri Dec 14 14:56:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: spencode.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ +/* $Xorg: spencode.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -24,7 +24,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spencode.c,v 1.6 2001/01/17 19:43:18 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spencode.c,v 1.7 2001/12/14 19:56:41 dawes Exp $ */ #include "spint.h" Index: xc/lib/font/Speedo/sperr.c diff -u xc/lib/font/Speedo/sperr.c:1.4 xc/lib/font/Speedo/sperr.c:1.6 --- xc/lib/font/Speedo/sperr.c:1.4 Wed Jan 17 14:43:20 2001 +++ xc/lib/font/Speedo/sperr.c Fri Dec 14 14:56:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: sperr.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ +/* $Xorg: sperr.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -29,7 +29,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,13 +52,15 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.4 2001/01/17 19:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/sperr.c,v 1.6 2001/12/14 19:56:41 dawes Exp $ */ #include "spint.h" #ifndef FONT_MODULE #include #endif + +extern void ErrorF(const char* f, ...); void SpeedoErr(char *str, ...) Index: xc/lib/font/Speedo/spfile.c diff -u xc/lib/font/Speedo/spfile.c:1.12 xc/lib/font/Speedo/spfile.c:1.14 --- xc/lib/font/Speedo/spfile.c:1.12 Wed Jan 17 14:43:20 2001 +++ xc/lib/font/Speedo/spfile.c Fri Dec 14 14:56:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: spfile.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ +/* $Xorg: spfile.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -26,7 +26,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spfile.c,v 1.12 2001/01/17 19:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spfile.c,v 1.14 2001/12/14 19:56:41 dawes Exp $ */ #include "fntfilst.h" #include "fontenc.h" @@ -171,9 +175,9 @@ } struct speedo_encoding { - char *name; - int *enc; - int enc_size; + char *name; + int *enc; + int enc_size; }; /* Takes care of caching encodings already referenced */ @@ -181,104 +185,98 @@ find_encoding(const char *fontname, const char *filename, int **enc, int *enc_size) { - static struct speedo_encoding *known_encodings=0; - static int number_known_encodings=0; - static int known_encodings_size=0; - - char *encoding_name; - int iso8859_1; - struct font_encoding *encoding; - struct font_encoding_mapping *mapping; - int i, j, k, size; - struct speedo_encoding *temp; - int *new_enc; - char *new_name; - - iso8859_1=0; - - encoding_name=font_encoding_from_xlfd(fontname, strlen(fontname)); - if(!encoding_name) { - encoding_name="iso8859-1"; - iso8859_1=1; - } - /* We don't go through the font library if asked for Latin-1 */ - iso8859_1=iso8859_1||!strcmp(encoding_name, "iso8859-1"); - - for(i=0; i= known_encodings_size) { - if((temp= - (struct speedo_encoding*)xrealloc(known_encodings, - 2*sizeof(struct speedo_encoding)* - known_encodings_size))==0) - return AllocError; - known_encodings=temp; - known_encodings_size*=2; - } - - encoding=0; - mapping=0; - if(!iso8859_1) { - encoding=font_encoding_find(encoding_name, filename); - if(encoding) { - for(mapping=encoding->mappings; mapping; mapping=mapping->next) { - if(mapping->type==FONT_ENCODING_UNICODE) - break; - } + if(number_known_encodings >= known_encodings_size) { + if((temp= + (struct speedo_encoding*)xrealloc(known_encodings, + 2*sizeof(struct speedo_encoding)* + known_encodings_size))==0) + return AllocError; + known_encodings=temp; + known_encodings_size*=2; } - } + + mapping=0; + if(!iso8859_1) { + mapping = FontEncMapFind(encoding_name, + FONT_ENCODING_UNICODE, -1, -1, + filename); + } #define SPEEDO_RECODE(c) \ (mapping? \ - unicode_to_bics(font_encoding_recode(c, encoding, mapping)): \ + unicode_to_bics(FontEncRecode(c, mapping)): \ unicode_to_bics(c)) - if((new_name=(char*)xalloc(strlen(encoding_name)))==0) - return AllocError; - strcpy(new_name, encoding_name); - - /* For now, we limit ourselves to 256 glyphs */ - size=0; - for(i=0; i<(encoding?encoding->size:256) && i<256; i++) - if(SPEEDO_RECODE(i)>=0) - size++; - new_enc=(int*)xalloc(2*size*sizeof(int)); - if(!new_enc) { - xfree(new_name); - return AllocError; - } - for(i=j=0; i<(encoding?encoding->size:256) && i<256; i++) - if((k=SPEEDO_RECODE(i))>=0) { - new_enc[2*j]=i; - new_enc[2*j+1]=k; - j++; + if((new_name = (char*)xalloc(strlen(encoding_name)))==0) + return AllocError; + strcpy(new_name, encoding_name); + + /* For now, we limit ourselves to 256 glyphs */ + size=0; + for(i=0; i < (mapping?mapping->encoding->size:256) && i < 256; i++) + if(SPEEDO_RECODE(i)>=0) + size++; + new_enc = (int*)xalloc(2*size*sizeof(int)); + if(!new_enc) { + xfree(new_name); + return AllocError; } - known_encodings[number_known_encodings].name=new_name; - known_encodings[number_known_encodings].enc=new_enc; - known_encodings[number_known_encodings].enc_size=size; - number_known_encodings++; - - *enc=new_enc; - *enc_size=size; - return Successful; + for(i=j=0; i < (mapping?mapping->encoding->size:256) && i < 256; i++) + if((k = SPEEDO_RECODE(i))>=0) { + new_enc[2*j] = i; + new_enc[2*j+1] = k; + j++; + } + known_encodings[number_known_encodings].name = new_name; + known_encodings[number_known_encodings].enc = new_enc; + known_encodings[number_known_encodings].enc_size = size; + number_known_encodings++; + + *enc = new_enc; + *enc_size = size; + return Successful; #undef SPEEDO_RECODE } Index: xc/lib/font/Speedo/spfont.c diff -u xc/lib/font/Speedo/spfont.c:3.10 xc/lib/font/Speedo/spfont.c:3.12 --- xc/lib/font/Speedo/spfont.c:3.10 Wed Jan 17 14:43:20 2001 +++ xc/lib/font/Speedo/spfont.c Fri Dec 14 14:56:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: spfont.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ +/* $Xorg: spfont.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -21,13 +21,17 @@ * * Author: Dave Lemke, Network Computing Devices Inc */ -/* $XFree86: xc/lib/font/Speedo/spfont.c,v 3.10 2001/01/17 19:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spfont.c,v 3.12 2001/12/14 19:56:41 dawes Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -80,7 +84,7 @@ #endif -extern void SpeedoCloseFont(); +static void SpeedoCloseFont(FontPtr pfont); static int sp_get_glyphs( @@ -195,13 +199,13 @@ static CharInfoRec nonExistantChar; static int -sp_get_metrics(pFont, count, chars, charEncoding, glyphCount, glyphs) - FontPtr pFont; - unsigned long count; - register unsigned char *chars; - FontEncoding charEncoding; - unsigned long *glyphCount; /* RETURN */ - xCharInfo **glyphs; /* RETURN */ +sp_get_metrics( + FontPtr pFont, + unsigned long count, + register unsigned char *chars, + FontEncoding charEncoding, + unsigned long *glyphCount, /* RETURN */ + xCharInfo **glyphs) /* RETURN */ { int ret; SpeedoFontPtr spf; @@ -233,7 +237,6 @@ int ret; specs_t specs; int xx8, xy8, yx8, yy8; - double sxmult; /* find a master (create it if necessary) */ spmf = (SpeedoMasterFontPtr) entry->u.scalable.extra->private; @@ -431,7 +434,7 @@ xfree(spf); } -void +static void SpeedoCloseFont(FontPtr pfont) { SpeedoFontPtr spf; Index: xc/lib/font/Speedo/spfuncs.c diff -u xc/lib/font/Speedo/spfuncs.c:1.6 xc/lib/font/Speedo/spfuncs.c:1.8 --- xc/lib/font/Speedo/spfuncs.c:1.6 Wed Jan 17 14:43:20 2001 +++ xc/lib/font/Speedo/spfuncs.c Fri Dec 14 14:56:42 2001 @@ -1,4 +1,4 @@ -/* $Xorg: spfuncs.c,v 1.3 2000/08/17 19:46:27 cpqbld Exp $ */ +/* $Xorg: spfuncs.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -26,7 +26,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spfuncs.c,v 1.6 2001/01/17 19:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spfuncs.c,v 1.8 2001/12/14 19:56:42 dawes Exp $ */ #ifndef FONTMODULE #include @@ -146,8 +150,8 @@ } static FontRendererRec renderer = { - ".spd", 4, (int (*)()) 0, SpeedoOpenScalable, - (int (*)()) 0, SpeedoGetInfoScaleable, 0 + ".spd", 4, NULL, SpeedoOpenScalable, + NULL, SpeedoGetInfoScaleable, 0 , CAP_MATRIX | CAP_CHARSUBSETTING }; Index: xc/lib/font/Speedo/spglyph.c diff -u xc/lib/font/Speedo/spglyph.c:1.6 xc/lib/font/Speedo/spglyph.c:1.7 --- xc/lib/font/Speedo/spglyph.c:1.6 Wed Jan 17 14:43:20 2001 +++ xc/lib/font/Speedo/spglyph.c Fri Dec 14 14:56:42 2001 @@ -1,4 +1,4 @@ -/* $Xorg: spglyph.c,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ +/* $Xorg: spglyph.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -26,7 +26,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spglyph.c,v 1.6 2001/01/17 19:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spglyph.c,v 1.7 2001/12/14 19:56:42 dawes Exp $ */ #include /* for bit order #defines */ #include "spint.h" Index: xc/lib/font/Speedo/spinfo.c diff -u xc/lib/font/Speedo/spinfo.c:1.10 xc/lib/font/Speedo/spinfo.c:1.12 --- xc/lib/font/Speedo/spinfo.c:1.10 Wed Jan 17 14:43:20 2001 +++ xc/lib/font/Speedo/spinfo.c Fri Dec 14 14:56:42 2001 @@ -1,4 +1,4 @@ -/* $Xorg: spinfo.c,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ +/* $Xorg: spinfo.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -26,7 +26,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.10 2001/01/17 19:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spinfo.c,v 1.12 2001/12/14 19:56:42 dawes Exp $ */ #include "fntfilst.h" #include "fontutil.h" @@ -118,8 +122,6 @@ #define NPROPS (NNAMEPROPS + NEXTRAPROPS) -extern Atom MakeAtom(); - void sp_make_standard_props() { @@ -343,7 +345,7 @@ nprops; fontProp *fpt; char *is_str; - char *ptr1, + char *ptr1 = NULL, *ptr2; char *ptr3; char tmpname[1024]; Index: xc/lib/font/Speedo/spint.h diff -u xc/lib/font/Speedo/spint.h:1.9 xc/lib/font/Speedo/spint.h:1.10 --- xc/lib/font/Speedo/spint.h:1.9 Wed Jan 17 14:43:20 2001 +++ xc/lib/font/Speedo/spint.h Fri Dec 14 14:56:42 2001 @@ -1,4 +1,4 @@ -/* $Xorg: spint.h,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ +/* $Xorg: spint.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -24,7 +24,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/Speedo/spint.h,v 1.9 2001/01/17 19:43:20 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/spint.h,v 1.10 2001/12/14 19:56:42 dawes Exp $ */ #ifndef _SPINT_H_ #define _SPINT_H_ Index: xc/lib/font/Speedo/sptobdf.c diff -u xc/lib/font/Speedo/sptobdf.c:1.1.1.3 xc/lib/font/Speedo/sptobdf.c:1.2 --- xc/lib/font/Speedo/sptobdf.c:1.1.1.3 Tue Jan 16 17:25:58 2001 +++ xc/lib/font/Speedo/sptobdf.c Fri Dec 14 14:56:42 2001 @@ -1,4 +1,4 @@ -/* $Xorg: sptobdf.c,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ +/* $Xorg: sptobdf.c,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -29,7 +29,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/font/Speedo/useropt.h diff -u xc/lib/font/Speedo/useropt.h:1.1.1.3 xc/lib/font/Speedo/useropt.h:1.2 --- xc/lib/font/Speedo/useropt.h:1.1.1.3 Tue Jan 16 17:25:59 2001 +++ xc/lib/font/Speedo/useropt.h Fri Dec 14 14:56:43 2001 @@ -1,9 +1,13 @@ -/* $Xorg: useropt.h,v 1.3 2000/08/17 19:46:28 cpqbld Exp $ */ +/* $Xorg: useropt.h,v 1.4 2001/02/09 02:04:00 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/font/Speedo/module/speedomod.c diff -u xc/lib/font/Speedo/module/speedomod.c:1.7 xc/lib/font/Speedo/module/speedomod.c:1.8 --- xc/lib/font/Speedo/module/speedomod.c:1.7 Tue Jan 26 00:53:46 1999 +++ xc/lib/font/Speedo/module/speedomod.c Tue Sep 4 09:49:16 2001 @@ -23,7 +23,7 @@ * dealings in this Software without prior written authorization from the * XFree86 Project. */ -/* $XFree86: xc/lib/font/Speedo/module/speedomod.c,v 1.7 1999/01/26 05:53:46 dawes Exp $ */ +/* $XFree86: xc/lib/font/Speedo/module/speedomod.c,v 1.8 2001/09/04 13:49:16 dawes Exp $ */ #include "misc.h" @@ -44,7 +44,7 @@ MODINFOSTRING1, MODINFOSTRING2, XF86_VERSION_CURRENT, - 1, 0, 0, + 1, 0, 1, ABI_CLASS_FONT, /* A font module */ ABI_FONT_VERSION, MOD_CLASS_FONT, Index: xc/lib/font/Type1/Imakefile diff -u xc/lib/font/Type1/Imakefile:1.10 xc/lib/font/Type1/Imakefile:1.11 --- xc/lib/font/Type1/Imakefile:1.10 Wed Jan 17 14:43:21 2001 +++ xc/lib/font/Type1/Imakefile Mon Aug 27 13:40:58 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.10 2001/01/17 19:43:21 dawes Exp $ +XCOMM $XFree86: xc/lib/font/Type1/Imakefile,v 1.11 2001/08/27 17:40:58 dawes Exp $ #if BuildServer && DoLoadableServer #define IHaveSubdirs @@ -71,6 +71,7 @@ $(CIDOBJS) \ t1unicode.o +#if BuildFontLib #define DoNormalLib NormalLibFont #define DoSharedLib SharedLibFont #define DoDebugLib DebugLibFont @@ -80,6 +81,7 @@ SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) +#endif #if BuildServer && DoLoadableServer MakeSubdirs($(SUBDIRS)) Index: xc/lib/font/Type1/afm.c diff -u xc/lib/font/Type1/afm.c:1.2 xc/lib/font/Type1/afm.c:1.3 --- xc/lib/font/Type1/afm.c:1.2 Sat Aug 21 09:47:38 1999 +++ xc/lib/font/Type1/afm.c Mon Aug 27 15:49:52 2001 @@ -15,7 +15,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/afm.c,v 1.2 1999/08/21 13:47:38 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/afm.c,v 1.3 2001/08/27 19:49:52 dawes Exp $ */ #ifdef BUILDCID #ifndef FONTMODULE @@ -64,7 +64,7 @@ int CIDAFM(FILE *fd, FontInfo **pfi) { char *p = 0; - int i, j, k, found = 0; + int i, j, k = 0, found = 0; FontInfo *fi; if (fd == NULL || pfi == NULL) return(1); Index: xc/lib/font/Type1/cidchar.c diff -u xc/lib/font/Type1/cidchar.c:1.8 xc/lib/font/Type1/cidchar.c:1.9 --- xc/lib/font/Type1/cidchar.c:1.8 Sat Aug 21 09:47:39 1999 +++ xc/lib/font/Type1/cidchar.c Sat Oct 27 23:32:44 2001 @@ -15,7 +15,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/cidchar.c,v 1.8 1999/08/21 13:47:39 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/cidchar.c,v 1.9 2001/10/28 03:32:44 tsi Exp $ */ #ifdef BUILDCID #ifndef FONTMODULE @@ -74,7 +74,7 @@ unsigned int count = 0; #endif cidglyphs *cid; - unsigned char *p1; + unsigned char *p1 = NULL; #ifndef USE_MMAP unsigned char *p2; #endif @@ -83,7 +83,7 @@ int FDindex, FDBytes, GDBytes, SDBytes, SubrCount, CIDMapOffset, len; psobj *arrayP; psobj charstring; - long *subroffsets, cstringoffset, nextcstringoffset; + long *subroffsets = NULL, cstringoffset, nextcstringoffset; struct blues_struct *blues; cid = (cidglyphs *)pFont->fontPrivate; Index: xc/lib/font/Type1/curves.c diff -u xc/lib/font/Type1/curves.c:1.6 xc/lib/font/Type1/curves.c:1.7 --- xc/lib/font/Type1/curves.c:1.6 Wed Jan 17 14:43:22 2001 +++ xc/lib/font/Type1/curves.c Mon Aug 27 15:49:52 2001 @@ -29,7 +29,7 @@ /* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT */ /* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS */ /* SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/curves.c,v 1.6 2001/01/17 19:43:22 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/curves.c,v 1.7 2001/08/27 19:49:52 dawes Exp $ */ /* :h1.CURVES Module - Stepping Beziers @@ -172,6 +172,7 @@ StepBezierRecurse(I, xABCD, yABCD, xBCD, yBCD, xCD, yCD, xD, yD); } } + return NULL; /*NOTREACHED*/ } Index: xc/lib/font/Type1/fontfcn.c diff -u xc/lib/font/Type1/fontfcn.c:1.10 xc/lib/font/Type1/fontfcn.c:1.11 --- xc/lib/font/Type1/fontfcn.c:1.10 Thu Apr 5 13:42:27 2001 +++ xc/lib/font/Type1/fontfcn.c Fri Nov 23 14:21:31 2001 @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/fontfcn.c,v 1.10 2001/04/05 17:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/fontfcn.c,v 1.11 2001/11/23 19:21:31 dawes Exp $ */ #ifndef FONTMODULE #include @@ -552,6 +552,8 @@ switch (dictP[N].value.type) { case OBJ_ARRAY: valueP = dictP[N].value.data.arrayP; + /* Just double check valueP. H.J. */ + if (valueP == NULL) break; if (strcmp(infoName,"FontMatrix") == 0) { /* 6 elments, return them as floats */ for (i=0;i<6;i++) { Index: xc/lib/font/Type1/hints.c diff -u xc/lib/font/Type1/hints.c:1.5 xc/lib/font/Type1/hints.c:1.6 --- xc/lib/font/Type1/hints.c:1.5 Wed Jan 17 14:43:22 2001 +++ xc/lib/font/Type1/hints.c Mon Aug 27 15:49:52 2001 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/hints.c,v 1.5 2001/01/17 19:43:22 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/hints.c,v 1.6 2001/08/27 19:49:52 dawes Exp $ */ /* HINTS CWEB V0006 ******** */ /* @@ -495,7 +495,7 @@ register struct edgelist *edge; /* current edge in region */ register struct edgelist *next; /* next in subpath after 'edge' */ register struct edgelist *break1; /* first break after 'next' */ - register struct edgelist *break2; /* last break before 'edge' */ + register struct edgelist *break2 = NULL; /* last break before 'edge' */ register struct edgelist *prev; /* previous edge for fixing links */ int left = TRUE; Index: xc/lib/font/Type1/minimain.c diff -u xc/lib/font/Type1/minimain.c:1.1.1.3 xc/lib/font/Type1/minimain.c:1.2 --- xc/lib/font/Type1/minimain.c:1.1.1.3 Tue Jan 16 17:26:10 2001 +++ xc/lib/font/Type1/minimain.c Fri Dec 14 14:56:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: minimain.c,v 1.3 2000/08/17 19:46:30 cpqbld Exp $ */ +/* $Xorg: minimain.c,v 1.4 2001/02/09 02:04:01 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/font/Type1/objects.h diff -u xc/lib/font/Type1/objects.h:1.8 xc/lib/font/Type1/objects.h:1.12 --- xc/lib/font/Type1/objects.h:1.8 Wed Jan 17 14:43:22 2001 +++ xc/lib/font/Type1/objects.h Mon Aug 27 15:49:52 2001 @@ -43,11 +43,15 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/objects.h,v 1.8 2001/01/17 19:43:22 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/objects.h,v 1.12 2001/08/27 19:49:52 dawes Exp $ */ /*SHARED*/ /*END SHARED*/ #include +#include +#ifndef FONTMODULE +#include +#endif /*SHARED*/ #define Permanent(obj) t1_Permanent(obj) @@ -91,6 +95,15 @@ extern void addmemory ( long *addr, long size ); extern void delmemory ( void ); +#ifndef OS_H +extern void FatalError(const char *f, ...) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +__attribute((noreturn)) +#endif +; + +extern void ErrorF(const char *f, ...); +#endif #undef abort #define abort(line) FatalError(line) @@ -139,7 +152,7 @@ #endif #ifndef NULL -#define NULL 0 +#include /* The NULL pointer is system specific. (Most systems, however, use 0.) TYPE1IMAGER could have its own NULL, independent of the rest of the system, Index: xc/lib/font/Type1/paths.c diff -u xc/lib/font/Type1/paths.c:1.5 xc/lib/font/Type1/paths.c:1.6 --- xc/lib/font/Type1/paths.c:1.5 Wed Jan 17 14:43:22 2001 +++ xc/lib/font/Type1/paths.c Mon Aug 27 15:49:53 2001 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/paths.c,v 1.5 2001/01/17 19:43:22 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/paths.c,v 1.6 2001/08/27 19:49:53 dawes Exp $ */ /* PATHS CWEB V0021 ******** */ /* @@ -119,7 +119,7 @@ struct segment * CopyPath(struct segment *p0) /* path to duplicate */ { - register struct segment *p,*n,*last,*anchor; + register struct segment *p,*n = NULL,*last = NULL,*anchor; for (p = p0, anchor = NULL; p != NULL; p = p->link) { @@ -598,10 +598,10 @@ t1_ClosePath(struct segment *p0, /* path to close */ int lastonly) /* flag deciding to close all subpaths or... */ { - register struct segment *p,*last,*start; /* used in looping through path */ + register struct segment *p,*last = NULL,*start; /* used in looping through path */ register fractpel x,y; /* current position in path */ - register fractpel firstx,firsty; /* start position of sub path */ - register struct segment *lastnonhint; /* last non-hint segment in path */ + register fractpel firstx = 0,firsty = 0; /* start position of sub path */ + register struct segment *lastnonhint = NULL; /* last non-hint segment in path */ IfTrace1((MustTraceCalls),"ClosePath(%z)\n", p0); if (p0 != NULL && p0->type == TEXTTYPE) Index: xc/lib/font/Type1/regions.c diff -u xc/lib/font/Type1/regions.c:3.5 xc/lib/font/Type1/regions.c:3.7 --- xc/lib/font/Type1/regions.c:3.5 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/regions.c Mon Aug 27 15:49:53 2001 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/regions.c,v 3.5 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/regions.c,v 3.7 2001/08/27 19:49:53 dawes Exp $ */ /* REGIONS CWEB V0023 LOTS */ /* :h1 id=regions.REGIONS Module - Regions Operator Handler @@ -139,14 +139,14 @@ Infinity is the complement of a null area: Note - removed the refcount = 1 init, replaced with references = 2 3-26-91 PNM */ -static struct region infinity = { REGIONTYPE, +static struct region _infinity = { REGIONTYPE, ISCOMPLEMENT(ON)+ISINFINITE(ON)+ISPERMANENT(ON)+ISIMMORTAL(ON), 2, {0, 0}, {0, 0}, 0, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, NULL, NULL }; -struct region *TT_INFINITY = &infinity; +struct region *TT_INFINITY = &_infinity; /* :h4."EmptyRegion" - A Region Structure with Zero Area @@ -254,7 +254,7 @@ CopyRegion(struct region *area) /* region to duplicate */ { register struct region *r; /* output region built here */ - register struct edgelist *last; /* loop variable */ + register struct edgelist *last = NULL; /* loop variable */ register struct edgelist *p,*newp; /* loop variables */ r = (struct region *)Allocate(sizeof(struct region), area, 0); @@ -396,7 +396,7 @@ static void Unwind(struct edgelist *area) /* input area modified in place */ { - register struct edgelist *last,*next; /* struct before and after current one */ + register struct edgelist *last = NULL,*next; /* struct before and after current one */ register int y; /* ymin of current swath */ register int count,newcount; /* winding count registers */ @@ -962,7 +962,7 @@ pel y) /* Y value to split list at */ { register struct edgelist *new; /* anchor for newly built list */ - register struct edgelist *last; /* end of newly built list */ + register struct edgelist *last = NULL; /* end of newly built list */ register struct edgelist *r; /* temp pointer to new structure */ register struct edgelist *lastlist; /* temp pointer to last 'list' value */ @@ -1057,7 +1057,7 @@ { register struct edgelist *before; register struct edgelist *after; - register pel y; + register pel y = 0; before = before0; after = before->link; Index: xc/lib/font/Type1/regions.h diff -u xc/lib/font/Type1/regions.h:1.7 xc/lib/font/Type1/regions.h:1.8 --- xc/lib/font/Type1/regions.h:1.7 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/regions.h Fri Jun 15 04:09:20 2001 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/regions.h,v 1.7 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/regions.h,v 1.8 2001/06/15 08:09:20 alanh Exp $ */ /*SHARED*/ #define Interior(p,rule) t1_Interior(p,rule) @@ -43,10 +43,6 @@ struct region *t1_Intersect(); /* set intersection of regions */ struct region *t1_Complement(); /* complement of a region */ int t1_Overlap(); /* returns a Boolean; TRUE if regions overlap */ -#endif - -#ifdef __CYGWIN__ -#define __STRICT_ANSI__ #endif #define TT_INFINITY t1_Infinity Index: xc/lib/font/Type1/scanfont.c diff -u xc/lib/font/Type1/scanfont.c:1.14 xc/lib/font/Type1/scanfont.c:1.15 --- xc/lib/font/Type1/scanfont.c:1.14 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/scanfont.c Wed Jul 25 11:04:55 2001 @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.14 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/scanfont.c,v 1.15 2001/07/25 15:04:55 dawes Exp $ */ #ifndef FONTMODULE #include @@ -67,8 +67,6 @@ #ifdef BUILDCID #define CID_BUFSIZE 80 - -extern Bool CIDType1fontfcnA( int * ); extern psfont *FDArrayP; static spacerange *spacerangeP; Index: xc/lib/font/Type1/spaces.c diff -u xc/lib/font/Type1/spaces.c:3.8 xc/lib/font/Type1/spaces.c:3.9 --- xc/lib/font/Type1/spaces.c:3.8 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/spaces.c Mon Aug 27 15:49:53 2001 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/spaces.c,v 3.8 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/spaces.c,v 3.9 2001/08/27 19:49:53 dawes Exp $ */ /* SPACES CWEB V0021 ******** */ /* :h1 id=spaces.SPACES Module - Handles Coordinate Spaces @@ -321,7 +321,7 @@ ConsiderContext(struct xobject *obj, /* object to be transformed */ double M[2][2]) /* matrix (may be changed) */ { - register int context; /* index in contexts array */ + register int context = 0; /* index in contexts array */ if (obj == NULL) return; Index: xc/lib/font/Type1/t1funcs.c diff -u xc/lib/font/Type1/t1funcs.c:3.23 xc/lib/font/Type1/t1funcs.c:3.26 --- xc/lib/font/Type1/t1funcs.c:3.23 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/t1funcs.c Fri Dec 14 14:56:44 2001 @@ -1,4 +1,4 @@ -/* $Xorg: t1funcs.c,v 1.4 2000/08/17 19:46:33 cpqbld Exp $ */ +/* $Xorg: t1funcs.c,v 1.5 2001/02/09 02:04:01 xorgcvs Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -71,13 +71,17 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.23 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1funcs.c,v 3.26 2001/12/14 19:56:44 dawes Exp $ */ /* Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -119,10 +123,10 @@ #else #include "Xmd.h" #include "Xdefs.h" -#include "os.h" #include "xf86_ansic.h" #endif +#include "os.h" #include "fntfilst.h" #include "fontutil.h" #include "FSproto.h" @@ -508,8 +512,7 @@ int len, rc, count = 0; struct type1font *type1; char *p; - struct font_encoding *encoding; - struct font_encoding_mapping *mapping; + FontMapPtr mapping = NULL; int no_mapping; psobj *fontmatrix; long x0, total_width = 0, total_raw_width = 0; @@ -602,36 +605,30 @@ if (sxmult > EPS) sxmult = 1000.0 / sxmult; no_mapping=0; - p=font_encoding_from_xlfd(entry->name.name, entry->name.length); + p = FontEncFromXLFD(entry->name.name, entry->name.length); if(p==0) { /* XLFD does not specify an encoding */ - mapping=0; - no_mapping=2; /* ISO 8859-1 */ + mapping=0; + no_mapping=2; /* ISO 8859-1 */ } if(!strcmp(p, "adobe-fontspecific")) { - mapping=0; - no_mapping=1; /* font's native encoding vector */ + mapping=0; + no_mapping=1; /* font's native encoding vector */ } if(!no_mapping) { - encoding=font_encoding_find(p,fileName); - mapping=0; - - if(encoding) { - for(mapping=encoding->mappings; mapping; mapping=mapping->next) - if(mapping->type==FONT_ENCODING_POSTSCRIPT) - break; + mapping = FontEncMapFind(p, + FONT_ENCODING_POSTSCRIPT, -1, -1, + fileName); if(!mapping) - for(mapping=encoding->mappings; mapping; mapping=mapping->next) - if(mapping->type==FONT_ENCODING_UNICODE) - break; + mapping = FontEncMapFind(p, + FONT_ENCODING_UNICODE, -1, -1, + fileName); if(!mapping) - no_mapping=2; + no_mapping=2; else - no_mapping=0; - } else - no_mapping=2; + no_mapping=0; } pFont->info.firstCol = 255; @@ -643,55 +640,53 @@ int j; char *codename; - if(no_mapping==1) { - codename=FontP->fontInfoP[ENCODING]. - value.data.arrayP[i].data.valueP; - len=FontP->fontInfoP[ENCODING]. - value.data.arrayP[i].len; + if(no_mapping == 1) { + codename = FontP->fontInfoP[ENCODING]. + value.data.arrayP[i].data.valueP; + len = FontP->fontInfoP[ENCODING]. + value.data.arrayP[i].len; } else if(no_mapping) { - codename=unicodetoPSname(i); - len=codename?strlen(codename):0; + codename = unicodetoPSname(i); + len = codename ? strlen(codename) : 0; } else { - if(mapping->type==FONT_ENCODING_UNICODE) { - codename=unicodetoPSname(font_encoding_recode(i, - encoding, - mapping)); + if(mapping->type == FONT_ENCODING_UNICODE) { + codename = unicodetoPSname(FontEncRecode(i, mapping)); } else - codename=font_encoding_name(i, encoding, mapping); + codename = FontEncName(i, mapping); len=codename?strlen(codename):0; } /* Avoid multiply rasterising the undefined glyph */ if(len==7 && !strncmp(codename, ".notdef", 7)) { - len=0; - codename=0; + len=0; + codename=0; } /* But do rasterise it at least once */ if(len==0) { - if(i==0) { - codename=".notdef"; - len=7; - } else - continue; + if(i==0) { + codename=".notdef"; + len=7; + } else + continue; } /* See if this character is in the list of ranges specified in the XLFD name */ if(i!=0) { - for (j = 0; j < vals->nranges; j++) - if (i >= minchar(vals->ranges[j]) && - i <= maxchar(vals->ranges[j])) - break; - - /* If not, don't realize it. */ - if (vals->nranges && j == vals->nranges) - continue; + for (j = 0; j < vals->nranges; j++) + if (i >= minchar(vals->ranges[j]) && + i <= maxchar(vals->ranges[j])) + break; + + /* If not, don't realize it. */ + if (vals->nranges && j == vals->nranges) + continue; } rc = 0; area = (struct region *)fontfcnB(S, (unsigned char *)codename, - &len, &rc); + &len, &rc); if (rc < 0) { rc = Type1ReturnCodeToXReturnCode(rc); break; Index: xc/lib/font/Type1/t1imager.h diff -u xc/lib/font/Type1/t1imager.h:1.4 xc/lib/font/Type1/t1imager.h:1.5 --- xc/lib/font/Type1/t1imager.h:1.4 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/t1imager.h Wed Jul 25 11:04:55 2001 @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1imager.h,v 1.4 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1imager.h,v 1.5 2001/07/25 15:04:55 dawes Exp $ */ #include "objects.h" @@ -42,7 +42,7 @@ #ifndef NULL -#define NULL 0 +#include #endif #ifndef TRUE Index: xc/lib/font/Type1/t1info.c diff -u xc/lib/font/Type1/t1info.c:1.15 xc/lib/font/Type1/t1info.c:1.17 --- xc/lib/font/Type1/t1info.c:1.15 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/t1info.c Fri Dec 14 14:56:44 2001 @@ -1,4 +1,4 @@ -/* $Xorg: t1info.c,v 1.3 2000/08/17 19:46:33 cpqbld Exp $ */ +/* $Xorg: t1info.c,v 1.4 2001/02/09 02:04:01 xorgcvs Exp $ */ /* Copyright International Business Machines,Corp. 1991 * All Rights Reserved * @@ -59,7 +59,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -95,7 +99,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.15 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1info.c,v 1.17 2001/12/14 19:56:44 dawes Exp $ */ #include "fntfilst.h" #include "fontutil.h" @@ -602,7 +606,7 @@ nprops; fontProp *fpt; char *is_str; - char *ptr1, + char *ptr1 = NULL, *ptr2; char *ptr3; char *infostrP; @@ -740,7 +744,7 @@ nprops; fontProp *fpt; char *is_str; - char *ptr1, + char *ptr1 = NULL, *ptr2; char *ptr3; char *infostrP; Index: xc/lib/font/Type1/t1intf.h diff -u xc/lib/font/Type1/t1intf.h:1.6 xc/lib/font/Type1/t1intf.h:1.7 --- xc/lib/font/Type1/t1intf.h:1.6 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/t1intf.h Wed Jul 25 11:04:55 2001 @@ -44,7 +44,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1intf.h,v 1.6 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1intf.h,v 1.7 2001/07/25 15:04:55 dawes Exp $ */ #ifdef BUILDCID #include "AFM.h" @@ -98,10 +98,6 @@ extern void CIDCloseFont ( FontPtr pFont ); #endif extern void Type1CloseFont ( FontPtr pFont ); -#ifdef BUILDCID -extern void CIDRegisterFontFileFunctions ( void ); -extern void Type1RegisterFontFileFunctions ( void ); -#endif extern int Type1ReturnCodeToXReturnCode ( int rc ); #ifdef BUILDCID extern CharInfoPtr CIDRenderGlyph ( FontPtr pFont, psobj *charstringP, Index: xc/lib/font/Type1/t1io.c diff -u xc/lib/font/Type1/t1io.c:3.8 xc/lib/font/Type1/t1io.c:3.9 --- xc/lib/font/Type1/t1io.c:3.8 Wed Jan 17 14:43:23 2001 +++ xc/lib/font/Type1/t1io.c Mon Aug 27 15:49:54 2001 @@ -45,7 +45,7 @@ * The Original Software is CID font code that was developed by Silicon * Graphics, Inc. */ -/* $XFree86: xc/lib/font/Type1/t1io.c,v 3.8 2001/01/17 19:43:23 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1io.c,v 3.9 2001/08/27 19:49:54 dawes Exp $ */ /******************************************************************* * I/O package for Type 1 font reading ********************************************************************/ @@ -317,7 +317,7 @@ T1Decrypt(unsigned char *p, int len) { int n; - int H, L; + int H = 0, L; unsigned char *inp = p; unsigned char *tblP; Index: xc/lib/font/Type1/t1malloc.c diff -u xc/lib/font/Type1/t1malloc.c:1.9 xc/lib/font/Type1/t1malloc.c:1.10 --- xc/lib/font/Type1/t1malloc.c:1.9 Wed Jan 17 14:43:24 2001 +++ xc/lib/font/Type1/t1malloc.c Wed Jul 25 11:04:55 2001 @@ -26,7 +26,7 @@ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1malloc.c,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1malloc.c,v 1.10 2001/07/25 15:04:55 dawes Exp $ */ /* MALLOC CWEB V0004 LOTS */ /* :h1.MALLOC - Fast Memory Allocation @@ -59,7 +59,7 @@ compiler is unhappy about it, you can redefine it on the command line: */ #ifndef NULL -#define NULL 0 +#include #endif /* Of course, NULL is important because xiMalloc() is defined to return Index: xc/lib/font/Type1/t1stdio.h diff -u xc/lib/font/Type1/t1stdio.h:1.9 xc/lib/font/Type1/t1stdio.h:1.10 --- xc/lib/font/Type1/t1stdio.h:1.9 Wed Jan 17 14:43:24 2001 +++ xc/lib/font/Type1/t1stdio.h Wed Jul 25 11:04:55 2001 @@ -27,7 +27,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ -/* $XFree86: xc/lib/font/Type1/t1stdio.h,v 1.9 2001/01/17 19:43:24 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/t1stdio.h,v 1.10 2001/07/25 15:04:55 dawes Exp $ */ /* T1IO FILE structure and related stuff */ #ifdef XFree86LOADER #undef FILE @@ -53,8 +53,9 @@ #define FIOERROR (0x40) #ifndef NULL -#define NULL 0 /* null pointer */ +#include #endif + #define EOF (-1) /* end of file */ #define F_BUFSIZ (512) Index: xc/lib/font/Type1/module/type1mod.c diff -u xc/lib/font/Type1/module/type1mod.c:1.8 xc/lib/font/Type1/module/type1mod.c:1.9 --- xc/lib/font/Type1/module/type1mod.c:1.8 Sat May 15 08:10:08 1999 +++ xc/lib/font/Type1/module/type1mod.c Tue Sep 4 09:49:16 2001 @@ -23,7 +23,7 @@ * dealings in this Software without prior written authorization from the * XFree86 Project. */ -/* $XFree86: xc/lib/font/Type1/module/type1mod.c,v 1.8 1999/05/15 12:10:08 dawes Exp $ */ +/* $XFree86: xc/lib/font/Type1/module/type1mod.c,v 1.9 2001/09/04 13:49:16 dawes Exp $ */ #include "misc.h" @@ -44,7 +44,7 @@ MODINFOSTRING1, MODINFOSTRING2, XF86_VERSION_CURRENT, - 1, 0, 0, + 1, 0, 1, ABI_CLASS_FONT, /* Font module */ ABI_FONT_VERSION, MOD_CLASS_FONT, Index: xc/lib/font/X-TrueType/Imakefile diff -u xc/lib/font/X-TrueType/Imakefile:1.7 xc/lib/font/X-TrueType/Imakefile:1.8 --- xc/lib/font/X-TrueType/Imakefile:1.7 Tue Nov 28 14:09:30 2000 +++ xc/lib/font/X-TrueType/Imakefile Mon Aug 27 13:40:58 2001 @@ -1,5 +1,5 @@ XCOMM X-TrueType Server - TrueType rasterizer for X -XCOMM $XFree86: xc/lib/font/X-TrueType/Imakefile,v 1.7 2000/11/28 19:09:30 dawes Exp $ +XCOMM $XFree86: xc/lib/font/X-TrueType/Imakefile,v 1.8 2001/08/27 17:40:58 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" @@ -27,7 +27,7 @@ InstallMultipleFlags($(CCONVHEADERS),$(CCONVINSTDIR),$(INSTINCFLAGS)) #endif -#if XTTInLibXFont +#if BuildFontLib && XTTInLibXFont #define DoNormalLib NormalLibFont #define DoSharedLib SharedLibFont #define DoDebugLib DebugLibFont Index: xc/lib/font/bitmap/Imakefile diff -u xc/lib/font/bitmap/Imakefile:1.11 xc/lib/font/bitmap/Imakefile:1.13 --- xc/lib/font/bitmap/Imakefile:1.11 Tue Apr 3 13:51:59 2001 +++ xc/lib/font/bitmap/Imakefile Fri Jan 18 11:27:19 2002 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/bitmap/Imakefile,v 1.11 2001/04/03 17:51:59 paulo Exp $ +XCOMM $XFree86: xc/lib/font/bitmap/Imakefile,v 1.13 2002/01/18 16:27:19 keithp Exp $ #if BuildServer && DoLoadableServer #define IHaveSubdirs @@ -12,9 +12,9 @@ SUBDIRS = module #endif -#ifndef KDriveXServer BDFSRCS=bdfread.c bdfutils.c BDFOBJS=bdfread.o bdfutils.o +#ifndef KDriveXServer BDFDEFS=-DBDFFORMAT SNFSRCS=snfread.c @@ -45,6 +45,7 @@ bitmapfunc.o $(PCFOBJS) $(SNFOBJS) \ fontink.o +#if BuildFontLib #define DoNormalLib NormalLibFont #define DoSharedLib SharedLibFont #define DoDebugLib DebugLibFont @@ -57,6 +58,7 @@ SubdirLibraryRule($(OBJS)) NormalLintTarget($(SRCS)) +#endif #if BuildServer && DoLoadableServer MakeSubdirs($(SUBDIRS)) Index: xc/lib/font/bitmap/bdfint.h diff -u xc/lib/font/bitmap/bdfint.h:1.4 xc/lib/font/bitmap/bdfint.h:1.5 --- xc/lib/font/bitmap/bdfint.h:1.4 Wed Jan 17 14:43:26 2001 +++ xc/lib/font/bitmap/bdfint.h Fri Dec 14 14:56:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bdfint.h,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ +/* $Xorg: bdfint.h,v 1.4 2001/02/09 02:04:01 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfint.h,v 1.4 2001/01/17 19:43:26 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfint.h,v 1.5 2001/12/14 19:56:45 dawes Exp $ */ #ifndef BDFINT_H #define BDFINT_H Index: xc/lib/font/bitmap/bdfread.c diff -u xc/lib/font/bitmap/bdfread.c:1.9 xc/lib/font/bitmap/bdfread.c:1.11 --- xc/lib/font/bitmap/bdfread.c:1.9 Wed Jan 17 14:43:26 2001 +++ xc/lib/font/bitmap/bdfread.c Fri Dec 14 14:56:45 2001 @@ -1,4 +1,4 @@ -/* $Xorg: bdfread.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ +/* $Xorg: bdfread.c,v 1.5 2001/02/09 02:04:01 xorgcvs Exp $ */ /************************************************************************ Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -27,7 +27,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.9 2001/01/17 19:43:26 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfread.c,v 1.11 2001/12/14 19:56:45 dawes Exp $ */ #ifndef FONTMODULE #include @@ -90,8 +94,10 @@ widthBytes = BYTES_PER_ROW(widthBits, glyph); if (widthBytes * height > 0) { picture = (unsigned char *) xalloc(widthBytes * height); - if (!picture) + if (!picture) { + bdfError("Couldn't allocate picture (%d*%d)\n", widthBytes, height); goto BAILOUT; + } } else picture = NULL; pCI->bits = (char *) picture; @@ -791,8 +797,10 @@ goto BAILOUT; bitmapFont = (BitmapFontPtr) xalloc(sizeof(BitmapFontRec)); - if (!bitmapFont) + if (!bitmapFont) { + bdfError("Couldn't allocate bitmapFontRec (%d)\n", sizeof(BitmapFontRec)); goto BAILOUT; + } bzero((char *)bitmapFont, sizeof(BitmapFontRec)); pFont->fontPrivate = (pointer) bitmapFont; @@ -803,8 +811,10 @@ bitmapFont->pDefault = NULL; bitmapFont->bitmapExtra = (BitmapExtraPtr) xalloc(sizeof(BitmapExtraRec)); - if (!bitmapFont->bitmapExtra) + if (!bitmapFont->bitmapExtra) { + bdfError("Couldn't allocate bitmapExtra (%d)\n", sizeof(BitmapExtraRec)); goto BAILOUT; + } bzero((char *)bitmapFont->bitmapExtra, sizeof(BitmapExtraRec)); bitmapFont->bitmapExtra->glyphNames = 0; @@ -844,8 +854,12 @@ FontComputeInfoAccelerators(&pFont->info); if (bitmapFont->bitmapExtra) FontComputeInfoAccelerators(&bitmapFont->bitmapExtra->info); - if (pFont->info.constantMetrics) - bitmapAddInkMetrics(pFont); + if (pFont->info.constantMetrics) { + if (!bitmapAddInkMetrics(pFont)) { + bdfError("Failed to add bitmap ink metrics\n"); + goto BAILOUT; + } + } if (bitmapFont->bitmapExtra) bitmapFont->bitmapExtra->info.inkMetrics = pFont->info.inkMetrics; @@ -920,8 +934,10 @@ for (i = 0; i < bitmapFont->num_chars; i++) { new.bits = (char *) xalloc(new_size); - if (!new.bits) + if (!new.bits) { + bdfError("Couldn't allocate bits (%d)\n", new_size); return FALSE; + } FontCharReshape(pFont, &bitmapFont->metrics[i], &new); new.metrics.attributes = bitmapFont->metrics[i].metrics.attributes; xfree(bitmapFont->metrics[i].bits); Index: xc/lib/font/bitmap/bdfutils.c diff -u xc/lib/font/bitmap/bdfutils.c:1.7 xc/lib/font/bitmap/bdfutils.c:1.10 --- xc/lib/font/bitmap/bdfutils.c:1.7 Wed Jan 17 14:43:27 2001 +++ xc/lib/font/bitmap/bdfutils.c Fri Dec 14 14:56:45 2001 @@ -1,4 +1,4 @@ -/* $Xorg: bdfutils.c,v 1.3 2000/08/17 19:46:34 cpqbld Exp $ */ +/* $Xorg: bdfutils.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /************************************************************************ Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -26,7 +26,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bdfutils.c,v 1.7 2001/01/17 19:43:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bdfutils.c,v 1.10 2001/12/14 19:56:45 dawes Exp $ */ #ifndef FONTMODULE #include @@ -63,7 +67,6 @@ /***====================================================================***/ -/* VARARGS1 */ void bdfError(char* message, ...) { @@ -77,7 +80,6 @@ /***====================================================================***/ -/* VARARGS1 */ void bdfWarning(char *message, ...) { @@ -128,10 +130,15 @@ bdfForceMakeAtom(char *str, int *size) { register int len = strlen(str); + extern Atom MakeAtom(); /* Added this line to be consistent with X.org code */ + Atom the_atom; if (size != NULL) *size += len + 1; - return MakeAtom(str, len, TRUE); + the_atom = MakeAtom(str, len, TRUE); + if (the_atom == None) + bdfError("Atom allocation failed\n"); + return the_atom; } /***====================================================================***/ @@ -167,6 +174,10 @@ /* quoted string: strip outer quotes and undouble inner quotes */ s++; pp = p = (char *) xalloc((unsigned) strlen(s) + 1); + if (pp == NULL) { + bdfError("Couldn't allocate property value string (%d)\n", strlen(s) + 1); + return None; + } while (*s) { if (*s == '"') { if (*(s + 1) != '"') { Index: xc/lib/font/bitmap/bitmap.c diff -u xc/lib/font/bitmap/bitmap.c:1.6 xc/lib/font/bitmap/bitmap.c:1.7 --- xc/lib/font/bitmap/bitmap.c:1.6 Wed Jan 17 14:43:27 2001 +++ xc/lib/font/bitmap/bitmap.c Fri Dec 14 14:56:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bitmap.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ +/* $Xorg: bitmap.c,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitmap.c,v 1.6 2001/01/17 19:43:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmap.c,v 1.7 2001/12/14 19:56:45 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/bitmap/bitmapfunc.c diff -u xc/lib/font/bitmap/bitmapfunc.c:3.12 xc/lib/font/bitmap/bitmapfunc.c:3.14 --- xc/lib/font/bitmap/bitmapfunc.c:3.12 Tue Apr 3 20:34:28 2001 +++ xc/lib/font/bitmap/bitmapfunc.c Fri Dec 14 14:56:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bitmapfunc.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ +/* $Xorg: bitmapfunc.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ */ -/* $XFree86: xc/lib/font/bitmap/bitmapfunc.c,v 3.12 2001/04/04 00:34:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmapfunc.c,v 3.14 2001/12/14 19:56:46 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -157,6 +161,7 @@ if (!file) return BadFontName; if (!(pFont = CreateFontRec())) { + fprintf(stderr, "Error: Couldn't allocate pFont (%d)\n", sizeof(FontRec)); FontFileClose (file); return AllocError; } Index: xc/lib/font/bitmap/bitmaputil.c diff -u xc/lib/font/bitmap/bitmaputil.c:1.5 xc/lib/font/bitmap/bitmaputil.c:1.7 --- xc/lib/font/bitmap/bitmaputil.c:1.5 Wed Jan 17 14:43:27 2001 +++ xc/lib/font/bitmap/bitmaputil.c Fri Dec 14 14:56:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bitmaputil.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ +/* $Xorg: bitmaputil.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitmaputil.c,v 1.5 2001/01/17 19:43:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitmaputil.c,v 1.7 2001/12/14 19:56:46 dawes Exp $ */ #include "fntfilst.h" #include "bitmap.h" @@ -205,8 +209,10 @@ bitmapFont = (BitmapFontPtr) pFont->fontPrivate; bitmapFont->ink_metrics = (xCharInfo *) xalloc(bitmapFont->num_chars * sizeof(xCharInfo)); - if (!bitmapFont->ink_metrics) + if (!bitmapFont->ink_metrics) { + fprintf(stderr, "Error: Couldn't allocate ink_metrics (%d*%d)\n", bitmapFont->num_chars, sizeof(xCharInfo)); return FALSE; + } for (i = 0; i < bitmapFont->num_chars; i++) FontCharInkMetrics(pFont, &bitmapFont->metrics[i], &bitmapFont->ink_metrics[i]); pFont->info.inkMetrics = TRUE; Index: xc/lib/font/bitmap/bitscale.c diff -u xc/lib/font/bitmap/bitscale.c:3.19 xc/lib/font/bitmap/bitscale.c:3.22 --- xc/lib/font/bitmap/bitscale.c:3.19 Thu Apr 5 13:42:27 2001 +++ xc/lib/font/bitmap/bitscale.c Fri Dec 14 14:56:46 2001 @@ -1,10 +1,13 @@ -/* $Xorg: bitscale.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ - +/* $Xorg: bitscale.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.19 2001/04/05 17:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/bitscale.c,v 3.22 2001/12/14 19:56:46 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -735,12 +738,15 @@ sizeof(rawFontPropTable) / sizeof(fontProp); fp = (FontPropPtr) xalloc(sizeof(FontPropRec) * nProps); *pProps = fp; - if (!fp) + if (!fp) { + fprintf(stderr, "Error: Couldn't allocate font properties (%d*%d)\n", sizeof(FontPropRec), nProps); return 1; + } isStringProp = (char *) xalloc (nProps); *pIsStringProp = isStringProp; if (!isStringProp) { + fprintf(stderr, "Error: Couldn't allocate isStringProp (%d)\n", nProps); xfree (fp); return 1; } @@ -918,8 +924,10 @@ obitmapFont = (BitmapFontPtr) opf->fontPrivate; bitmapFont = 0; - if (!(pf = CreateFontRec())) + if (!(pf = CreateFontRec())) { + fprintf(stderr, "Error: Couldn't allocate FontRec (%d)\n", sizeof(FontRec)); goto bail; + } pf->refcnt = 0; pf->bit = opf->bit; pf->byte = opf->byte; @@ -983,8 +991,10 @@ } bitmapFont = (BitmapFontPtr) xalloc(sizeof(BitmapFontRec)); - if (!bitmapFont) + if (!bitmapFont) { + fprintf(stderr, "Error: Couldn't allocate bitmapFont (%d)\n", sizeof(BitmapFontRec)); goto bail; + } nchars = (lastRow - firstRow + 1) * (lastCol - firstCol + 1); pfi->firstRow = firstRow; pfi->lastRow = lastRow; @@ -1001,13 +1011,17 @@ bitmapFont->bitmapExtra = 0; bitmapFont->pDefault = 0; bitmapFont->metrics = (CharInfoPtr) xalloc(nchars * sizeof(CharInfoRec)); - if (!bitmapFont->metrics) + if (!bitmapFont->metrics) { + fprintf(stderr, "Error: Couldn't allocate metrics (%d*%d)\n", nchars, sizeof(CharInfoRec)); goto bail; + } bitmapFont->encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nchars), sizeof(CharInfoPtr*)); - if (!bitmapFont->encoding) + if (!bitmapFont->encoding) { + fprintf(stderr, "Error: Couldn't allocate encoding (%d*%d)\n", nchars, sizeof(CharInfoPtr)); goto bail; + } #undef MAXSHORT #define MAXSHORT 32767 @@ -1322,6 +1336,7 @@ (INT32 *)xalloc((newWidth + 2) * 2 * sizeof(int)); if (!diffusion_workspace) { + fprintf(stderr, "Warning: Couldn't allocate diffusion workspace (%d)\n", (newWidth + 2) * 2 * sizeof(int)); xfree(char_grayscale); char_grayscale = (unsigned char *)0; } @@ -1330,6 +1345,8 @@ (newWidth + 3) * sizeof(int)); thisrow = diffusion_workspace + 1; nextrow = diffusion_workspace + newWidth + 3; + } else { + fprintf(stderr, "Warning: Couldn't allocate character grayscale (%d)\n", (width + 1) * (height + 1)); } } } @@ -1628,8 +1645,10 @@ bitmapFont->bitmaps = (char *) xalloc(bytestoalloc); - if (!bitmapFont->bitmaps) + if (!bitmapFont->bitmaps) { + fprintf(stderr, "Error: Couldn't allocate bitmaps (%d)\n", bytestoalloc); goto bail; + } bzero(bitmapFont->bitmaps, bytestoalloc); glyphBytes = bitmapFont->bitmaps; @@ -1709,8 +1728,10 @@ bitmapFont->bitmaps = (char *) xalloc(bytestoalloc); - if (!bitmapFont->bitmaps) + if (!bitmapFont->bitmaps) { + fprintf(stderr, "Error: Couldn't allocate bitmaps (%d)\n", bytestoalloc); goto bail; + } bzero(bitmapFont->bitmaps, bytestoalloc); glyphBytes = bitmapFont->bitmaps; Index: xc/lib/font/bitmap/fontink.c diff -u xc/lib/font/bitmap/fontink.c:1.6 xc/lib/font/bitmap/fontink.c:1.7 --- xc/lib/font/bitmap/fontink.c:1.6 Wed Jan 17 14:43:27 2001 +++ xc/lib/font/bitmap/fontink.c Fri Dec 14 14:56:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontink.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ +/* $Xorg: fontink.c,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/fontink.c,v 1.6 2001/01/17 19:43:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/fontink.c,v 1.7 2001/12/14 19:56:46 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/bitmap/pcf.h diff -u xc/lib/font/bitmap/pcf.h:1.3 xc/lib/font/bitmap/pcf.h:1.4 --- xc/lib/font/bitmap/pcf.h:1.3 Wed Jan 17 14:43:27 2001 +++ xc/lib/font/bitmap/pcf.h Fri Dec 14 14:56:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pcf.h,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ +/* $Xorg: pcf.h,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcf.h,v 1.3 2001/01/17 19:43:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcf.h,v 1.4 2001/12/14 19:56:47 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/bitmap/pcfread.c diff -u xc/lib/font/bitmap/pcfread.c:1.16 xc/lib/font/bitmap/pcfread.c:1.18 --- xc/lib/font/bitmap/pcfread.c:1.16 Tue Apr 3 20:34:28 2001 +++ xc/lib/font/bitmap/pcfread.c Fri Dec 14 14:56:47 2001 @@ -1,10 +1,13 @@ -/* $Xorg: pcfread.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ - +/* $Xorg: pcfread.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.16 2001/04/04 00:34:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfread.c,v 1.18 2001/12/14 19:56:47 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -37,6 +40,34 @@ #define MAX(a,b) (((a)>(b)) ? a : b) #endif +#if NeedVarargsPrototypes +#include +#else +#include +#endif + +void +#if NeedVarargsPrototypes +pcfError(char* message, ...) + #else + pcfError (message, va_alist) + char* message; + va_dcl + #endif + { + va_list args; + + #if NeedVarargsPrototypes + va_start (args, message); + #else + va_start (args); + #endif + + fprintf(stderr, "PCF Error: "); + vfprintf(stderr, message, args); + va_end (args); + } + /* Read PCF font files */ static void pcfUnloadFont ( FontPtr pFont ); @@ -113,8 +144,10 @@ count = pcfGetLSB32(file); if (IS_EOF(file)) return (PCFTablePtr) NULL; tables = (PCFTablePtr) xalloc(count * sizeof(PCFTableRec)); - if (!tables) + if (!tables) { + pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec)); return (PCFTablePtr) NULL; + } for (i = 0; i < count; i++) { tables[i].type = pcfGetLSB32(file); tables[i].format = pcfGetLSB32(file); @@ -231,11 +264,15 @@ nprops = pcfGetINT32(file, format); if (IS_EOF(file)) goto Bail; props = (FontPropPtr) xalloc(nprops * sizeof(FontPropRec)); - if (!props) + if (!props) { + pcfError("pcfGetProperties(): Couldn't allocate props (%d*%d)\n", nprops, sizeof(FontPropRec)); goto Bail; + } isStringProp = (char *) xalloc(nprops * sizeof(char)); - if (!isStringProp) + if (!isStringProp) { + pcfError("pcfGetProperties(): Couldn't allocate isStringProp (%d*%d)\n", nprops, sizeof(char)); goto Bail; + } for (i = 0; i < nprops; i++) { props[i].name = pcfGetINT32(file, format); isStringProp[i] = pcfGetINT8(file, format); @@ -258,6 +295,7 @@ if (IS_EOF(file)) goto Bail; strings = (char *) xalloc(string_size); if (!strings) { + pcfError("pcfGetProperties(): Couldn't allocate strings (%d)\n", string_size); goto Bail; } FontFileRead(file, strings, string_size); @@ -395,6 +433,7 @@ if (IS_EOF(file)) goto Bail; metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); if (!metrics) { + pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); goto Bail; } for (i = 0; i < nmetrics; i++) @@ -419,9 +458,10 @@ goto Bail; offsets = (CARD32 *) xalloc(nbitmaps * sizeof(CARD32)); - if (!offsets) + if (!offsets) { + pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32)); goto Bail; - + } for (i = 0; i < nbitmaps; i++) { offsets[i] = pcfGetINT32(file, format); if (IS_EOF(file)) goto Bail; @@ -435,8 +475,10 @@ sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; /* guard against completely empty font */ bitmaps = xalloc(sizebitmaps ? sizebitmaps : 1); - if (!bitmaps) + if (!bitmaps) { + pcfError("pcfReadFont(): Couldn't allocate bitmaps (%d)\n", sizebitmaps ? sizebitmaps : 1); goto Bail; + } FontFileRead(file, bitmaps, sizebitmaps); if (IS_EOF(file)) goto Bail; position += sizebitmaps; @@ -465,6 +507,7 @@ sizepadbitmaps = bitmapSizes[PCF_SIZE_TO_INDEX(glyph)]; padbitmaps = (char *) xalloc(sizepadbitmaps); if (!padbitmaps) { + pcfError("pcfReadFont(): Couldn't allocate padbitmaps (%d)\n", sizepadbitmaps); goto Bail; } new = 0; @@ -503,8 +546,10 @@ if (nink_metrics != nmetrics) goto Bail; ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); - if (!ink_metrics) + if (!ink_metrics) { + pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); goto Bail; + } for (i = 0; i < nink_metrics; i++) if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { if (!pcfGetMetric(file, format, ink_metrics + i)) @@ -535,9 +580,11 @@ encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), sizeof(CharInfoPtr*)); - if (!encoding) + if (!encoding) { + pcfError("pcfReadFont(): Couldn't allocate encoding (%d*%d)\n", nencoding, sizeof(CharInfoPtr)); goto Bail; - + } + pFont->info.allExist = TRUE; for (i = 0; i < nencoding; i++) { encodingOffset = pcfGetINT16(file, format); @@ -563,8 +610,10 @@ goto Bail; bitmapFont = (BitmapFontPtr) xalloc(sizeof *bitmapFont); - if (!bitmapFont) + if (!bitmapFont) { + pcfError("pcfReadFont(): Couldn't allocate bitmapFont (%d)\n", sizeof *bitmapFont); goto Bail; + } bitmapFont->version_num = PCF_FILE_VERSION; bitmapFont->num_chars = nmetrics; @@ -767,6 +816,7 @@ if (IS_EOF(file)) goto Bail; metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); if (!metrics) { + pcfError("pmfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); goto Bail; } for (i = 0; i < nmetrics; i++) @@ -797,8 +847,10 @@ #endif /* guard against completely empty font */ bitmaps = (char *) xalloc(sizebitmaps); - if (!bitmaps) + if (!bitmaps) { + pcfError("pmfReadFont(): Couldn't allocate bitmaps (%d)\n", sizebitmaps); goto Bail; + } memset(bitmaps,0,sizebitmaps); for (i = 0; i < nmetrics; i++) @@ -821,8 +873,10 @@ goto Bail; if (IS_EOF(file)) goto Bail; ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); - if (!ink_metrics) + if (!ink_metrics) { + pcfError("pmfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); goto Bail; + } for (i = 0; i < nink_metrics; i++) if (PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) { if (!pcfGetMetric(file, format, ink_metrics + i)) @@ -853,9 +907,10 @@ encoding = (CharInfoPtr **) xcalloc(NUM_SEGMENTS(nencoding), sizeof(CharInfoPtr*)); - if (!encoding) + if (!encoding) { + pcfError("pmfReadFont(): Couldn't allocate encoding (%d*%d)\n", nencoding, sizeof(CharInfoPtr)); goto Bail; - + } pFont->info.allExist = TRUE; for (i = 0; i < nencoding; i++) { encodingOffset = pcfGetINT16(file, format); @@ -883,9 +938,11 @@ goto Bail; bitmapFont = (BitmapFontPtr) xalloc(sizeof *bitmapFont); - if (!bitmapFont) + if (!bitmapFont) { + pcfError("pmfReadFont(): Couldn't allocate bitmapFont (%d)\n", sizeof *bitmapFont); goto Bail; - + } + bitmapFont->version_num = PCF_FILE_VERSION; bitmapFont->num_chars = nmetrics; bitmapFont->num_tables = ntables; Index: xc/lib/font/bitmap/pcfwrite.c diff -u xc/lib/font/bitmap/pcfwrite.c:1.6 xc/lib/font/bitmap/pcfwrite.c:1.8 --- xc/lib/font/bitmap/pcfwrite.c:1.6 Thu Apr 5 13:42:27 2001 +++ xc/lib/font/bitmap/pcfwrite.c Fri Dec 14 14:56:47 2001 @@ -1,10 +1,13 @@ -/* $Xorg: pcfwrite.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ - +/* $Xorg: pcfwrite.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.6 2001/04/05 17:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/pcfwrite.c,v 1.8 2001/12/14 19:56:47 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -34,6 +37,12 @@ #include "bitmap.h" #include "pcf.h" +extern void pcfError( + #if NeedVarargsPrototypes + char* message, ... + #endif + ); + /* Write PCF font files */ static CARD32 current_position; @@ -231,8 +240,10 @@ ink_maxbounds = &pFont->info.ink_maxbounds; } offsetProps = (FontPropPtr) xalloc(pFont->info.nprops * sizeof(FontPropRec)); - if (!offsetProps) + if (!offsetProps) { + pcfError("pcfWriteFont(): Couldn't allocate offsetProps (%d*%d)", pFont->info.nprops, sizeof(FontPropRec)); return AllocError; + } prop_string_size = 0; for (i = 0; i < pFont->info.nprops; i++) { offsetProps[i].name = prop_string_size; Index: xc/lib/font/bitmap/snfread.c diff -u xc/lib/font/bitmap/snfread.c:1.8 xc/lib/font/bitmap/snfread.c:1.10 --- xc/lib/font/bitmap/snfread.c:1.8 Wed Jan 17 14:43:27 2001 +++ xc/lib/font/bitmap/snfread.c Fri Dec 14 14:56:47 2001 @@ -1,4 +1,4 @@ -/* $Xorg: snfread.c,v 1.3 2000/08/17 19:46:35 cpqbld Exp $ */ +/* $Xorg: snfread.c,v 1.5 2001/02/09 02:04:02 xorgcvs Exp $ */ /************************************************************************ Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -26,7 +26,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,7 +49,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.8 2001/01/17 19:43:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/snfread.c,v 1.10 2001/12/14 19:56:47 dawes Exp $ */ #ifndef FONTMODULE #include @@ -55,6 +59,34 @@ #include "bitmap.h" #include "snfstr.h" +#if NeedVarargsPrototypes +#include +#else +#include +#endif + +void +#if NeedVarargsPrototypes +snfError(char* message, ...) + #else + snfError (message, va_alist) + char* message; + va_dcl + #endif + { + va_list args; + + #if NeedVarargsPrototypes + va_start (args, message); + #else + va_start (args); + #endif + + fprintf(stderr, "SNF Error: "); + vfprintf(stderr, message, args); + va_end (args); + } + static void snfUnloadFont(FontPtr pFont); static int @@ -129,8 +161,10 @@ bytestoalloc = snfInfo->nProps * sizeof(snfFontPropRec) + BYTESOFSTRINGINFO(snfInfo); propspace = (char *) xalloc(bytestoalloc); - if (!propspace) + if (!propspace) { + snfError("snfReadProps(): Couldn't allocate propspace (%d)\n", bytestoalloc); return AllocError; + } if (FontFileRead(file, propspace, bytestoalloc) != bytestoalloc) { xfree(propspace); @@ -246,12 +280,14 @@ bytestoalloc += num_chars * sizeof(xCharInfo); /* ink_metrics */ fontspace = (char *) xalloc(bytestoalloc); - if (!fontspace) + if (!fontspace) { + snfError("snfReadFont(): Couldn't allocate fontspace (%d)\n", bytestoalloc); return AllocError; - + } bitmaps = (char *) xalloc (bitmapsSize); if (!bitmaps) { + snfError("snfReadFont(): Couldn't allocate bitmaps (%d)\n", bitmapsSize); xfree (fontspace); return AllocError; } @@ -345,6 +381,7 @@ } padbitmaps = (char *) xalloc(sizepadbitmaps); if (!padbitmaps) { + snfError("snfReadFont(): Couldn't allocate padbitmaps (%d)\n", sizepadbitmaps); xfree (bitmaps); xfree (fontspace); return AllocError; @@ -432,10 +469,13 @@ snfCopyInfo(&fi, pFontInfo); pFontInfo->props = (FontPropPtr) xalloc(fi.nProps * sizeof(FontPropRec)); - if (!pFontInfo->props) + if (!pFontInfo->props) { + snfError("snfReadFontInfo(): Couldn't allocate props (%d*%d)\n", fi.nProps, sizeof(FontPropRec)); return AllocError; + } pFontInfo->isStringProp = (char *) xalloc(fi.nProps * sizeof(char)); if (!pFontInfo->isStringProp) { + snfError("snfReadFontInfo(): Couldn't allocate isStringProp (%d*%d)\n", fi.nProps, sizeof(char)); xfree(pFontInfo->props); return AllocError; } Index: xc/lib/font/bitmap/snfstr.h diff -u xc/lib/font/bitmap/snfstr.h:1.3 xc/lib/font/bitmap/snfstr.h:1.5 --- xc/lib/font/bitmap/snfstr.h:1.3 Wed Jan 17 14:43:27 2001 +++ xc/lib/font/bitmap/snfstr.h Fri Dec 14 14:56:47 2001 @@ -1,4 +1,4 @@ -/* $Xorg: snfstr.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ +/* $Xorg: snfstr.h,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -26,7 +26,11 @@ Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -45,10 +49,12 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/bitmap/snfstr.h,v 1.3 2001/01/17 19:43:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/bitmap/snfstr.h,v 1.5 2001/12/14 19:56:47 dawes Exp $ */ #ifndef SNFSTR_H #define SNFSTR_H 1 + +#include "fntfilio.h" /*- * This file describes the Server Natural Font format. Index: xc/lib/font/builtins/Imakefile diff -u xc/lib/font/builtins/Imakefile:1.2 xc/lib/font/builtins/Imakefile:1.3 --- xc/lib/font/builtins/Imakefile:1.2 Fri Nov 19 09:59:08 1999 +++ xc/lib/font/builtins/Imakefile Sat Nov 3 18:03:00 2001 @@ -1,10 +1,10 @@ -XCOMM $XFree86: xc/lib/font/builtins/Imakefile,v 1.2 1999/11/19 14:59:08 hohndel Exp $ +XCOMM $XFree86: xc/lib/font/builtins/Imakefile,v 1.3 2001/11/03 23:03:00 dawes Exp $ XCOMM XCOMM XCOMM $XConsortium: Imakefile /main/14 1996/11/03 19:58:41 kaleb $ #include - INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include -I$(TOP)/lib/zlib + INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include HEADERS = SRCS = dir.c file.c fonts.c fpe.c render.c Index: xc/lib/font/fc/fserve.c diff -u xc/lib/font/fc/fserve.c:3.19 xc/lib/font/fc/fserve.c:3.21 --- xc/lib/font/fc/fserve.c:3.19 Thu Apr 5 13:42:27 2001 +++ xc/lib/font/fc/fserve.c Fri Dec 14 14:56:48 2001 @@ -1,9 +1,13 @@ -/* $Xorg: fserve.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ +/* $Xorg: fserve.c,v 1.4 2001/02/09 02:04:02 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fc/fserve.c,v 3.19 2001/04/05 17:42:27 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fserve.c,v 3.21 2001/12/14 19:56:48 dawes Exp $ */ /* * Copyright 1990 Network Computing Devices @@ -63,22 +67,14 @@ #include "fontutil.h" #include -#if defined(X_NOT_STDC_ENV) && !defined(__EMX__) -extern int errno; -#define Time_t long -extern Time_t time (); -#else #include #define Time_t time_t -#endif #ifdef NCD #include #endif -#ifndef NULL -#define NULL 0 -#endif +#include #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) Index: xc/lib/font/fc/fservestr.h diff -u xc/lib/font/fc/fservestr.h:3.3 xc/lib/font/fc/fservestr.h:3.4 --- xc/lib/font/fc/fservestr.h:3.3 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fc/fservestr.h Wed Jul 25 11:04:56 2001 @@ -23,7 +23,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fservestr.h,v 3.3 2001/01/17 19:43:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fservestr.h,v 3.4 2001/07/25 15:04:56 dawes Exp $ */ #ifndef _FSERVESTR_H_ #define _FSERVESTR_H_ @@ -141,7 +141,7 @@ } FSReconnectRec, *FSReconnectPtr; -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define fsCat(x,y) x##_##y #else #define fsCat(x,y) x/**/_/**/y Index: xc/lib/font/fc/fsio.c diff -u xc/lib/font/fc/fsio.c:3.13 xc/lib/font/fc/fsio.c:3.15 --- xc/lib/font/fc/fsio.c:3.13 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fc/fsio.c Wed Jul 25 11:04:56 2001 @@ -23,7 +23,7 @@ * * Author: Dave Lemke, Network Computing Devices, Inc */ -/* $XFree86: xc/lib/font/fc/fsio.c,v 3.13 2001/01/17 19:43:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fsio.c,v 3.15 2001/07/25 15:04:56 dawes Exp $ */ /* * font server i/o routines */ @@ -43,7 +43,7 @@ #include #include #include -#if !defined(WIN32) && !defined(AMOEBA) && !defined(_MINIX) +#if !defined(WIN32) #ifndef Lynx #include #else @@ -51,20 +51,12 @@ #endif #endif #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif #ifdef WIN32 #define EWOULDBLOCK WSAEWOULDBLOCK #undef EINTR #define EINTR WSAEINTR #endif -#ifdef MINIX -#include -#define select(n,r,w,x,t) nbio_select(n,r,w,x,t) -#endif - #ifdef __EMX__ #define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) #endif @@ -440,7 +432,6 @@ int _fs_wait_for_readable(FSFpePtr conn, int ms) { -#ifndef AMOEBA fd_set r_mask; fd_set e_mask; int result; @@ -469,9 +460,6 @@ return FSIO_READY; return FSIO_ERROR; } -#else - return FSIO_READY; -#endif } int Index: xc/lib/font/fc/fslibos.h diff -u xc/lib/font/fc/fslibos.h:3.5 xc/lib/font/fc/fslibos.h:3.6 --- xc/lib/font/fc/fslibos.h:3.5 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fc/fslibos.h Fri Dec 14 14:56:49 2001 @@ -1,4 +1,4 @@ -/* $Xorg: fslibos.h,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ +/* $Xorg: fslibos.h,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* * Copyright 1990 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -8,7 +8,11 @@ Copyright 1987, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -27,7 +31,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/fc/fslibos.h,v 3.5 2001/01/17 19:43:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/fc/fslibos.h,v 3.6 2001/12/14 19:56:49 dawes Exp $ */ /* * FSlib networking & os include file Index: xc/lib/font/fontcache/Imakefile diff -u xc/lib/font/fontcache/Imakefile:1.2 xc/lib/font/fontcache/Imakefile:1.3 --- xc/lib/font/fontcache/Imakefile:1.2 Wed Feb 23 15:29:38 2000 +++ xc/lib/font/fontcache/Imakefile Sat Aug 18 07:55:50 2001 @@ -1,4 +1,9 @@ XCOMM Id: Imakefile,v 1.2 1999/01/31 13:02:46 akiyama Exp $ + + + +XCOMM $XFree86: xc/lib/font/fontcache/Imakefile,v 1.3 2001/08/18 11:55:50 tsi Exp $ + #include #if BuildFontCache Index: xc/lib/font/fontcache/fontcache.c diff -u xc/lib/font/fontcache/fontcache.c:1.4 xc/lib/font/fontcache/fontcache.c:1.5 --- xc/lib/font/fontcache/fontcache.c:1.4 Thu Apr 5 13:42:28 2001 +++ xc/lib/font/fontcache/fontcache.c Sat Oct 27 23:32:45 2001 @@ -26,7 +26,7 @@ * * Id: fontcache.c,v 1.19 1999/01/31 13:06:00 akiyama Exp $ */ -/* $XFree86: xc/lib/font/fontcache/fontcache.c,v 1.4 2001/04/05 17:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontcache/fontcache.c,v 1.5 2001/10/28 03:32:45 tsi Exp $ */ #include #include @@ -234,7 +234,7 @@ { int linesize; FCCBPtr this; - int size, mask; + int size = 0, mask = 0; int i; static int sizes[] = { 16, 32, 64, 128, 0 }; Index: xc/lib/font/fontcache/fontcache.h diff -u xc/lib/font/fontcache/fontcache.h:1.4 xc/lib/font/fontcache/fontcache.h:1.5 --- xc/lib/font/fontcache/fontcache.h:1.4 Fri Apr 6 13:44:58 2001 +++ xc/lib/font/fontcache/fontcache.h Tue Jul 31 20:44:43 2001 @@ -26,7 +26,7 @@ * * Id: fontcache.h,v 1.12 1999/01/09 06:24:30 akiyama Exp $ */ -/* $XFree86: xc/lib/font/fontcache/fontcache.h,v 1.4 2001/04/06 17:44:58 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontcache/fontcache.h,v 1.5 2001/08/01 00:44:43 tsi Exp $ */ #ifndef _FONTCACHE_H_ #define _FONTCACHE_H_ @@ -34,6 +34,7 @@ #include "fontmisc.h" #include "fontstruct.h" #include "fcqueue.h" +#include /* constant declarations */ @@ -96,35 +97,12 @@ struct fcmem_head head[FC_MEM_HASH_SIZE]; }; -struct fc_cache_settings { - long himark; - long lowmark; - long balance; -}; - -struct fc_cache_stat { - long hits; - long misshits; - long purged; - long usage; -}; - -struct fc_cache_statistics { - long purge_runs; - long purge_stat; - long balance; - struct fc_cache_stat f; - struct fc_cache_stat v; -}; - typedef struct fcbitmap FontCacheBitmap, *FontCacheBitmapPtr; typedef struct cache_entry FontCacheEntry, *FontCacheEntryPtr; typedef struct fchash_head FontCacheHead, *FontCacheHeadPtr; typedef struct fcmem_head FontCacheBitmapHead, *FontCacheBitmapHeadPtr; typedef struct fchash FCCB, *FCCBPtr; typedef struct fcmemhash FCBCB, *FCBCBPtr; -typedef struct fc_cache_settings FontCacheSettings, *FontCacheSettingsPtr; -typedef struct fc_cache_statistics FontCacheStatistics, *FontCacheStatisticsPtr; /* Function prototypes */ @@ -138,9 +116,5 @@ FontCacheEntryPtr /* entry */); int FontCacheGetBitmap(FontCacheEntryPtr /* entry */, int /* size */); - -int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */); -void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */); -void FontCacheGetStatistics(FontCacheStatisticsPtr /* cstats */); #endif /* _FONTCACHE_H_ */ Index: xc/lib/font/fontfile/Imakefile diff -u xc/lib/font/fontfile/Imakefile:3.18 xc/lib/font/fontfile/Imakefile:3.20 --- xc/lib/font/fontfile/Imakefile:3.18 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fontfile/Imakefile Sat Nov 3 18:03:00 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/font/fontfile/Imakefile,v 3.18 2001/01/17 19:43:29 dawes Exp $ +XCOMM $XFree86: xc/lib/font/fontfile/Imakefile,v 3.20 2001/11/03 23:03:00 dawes Exp $ #include @@ -14,7 +14,7 @@ #endif INCLUDES = -I$(FONTINCSRC) -I../include -I$(SERVERSRC)/include \ - -I$(TOP)/lib/zlib -I$(XTOP)/include + -I$(XTOP)/include HEADERS = #ifdef FontFormatDefines FORMAT_DEFS = FontFormatDefines @@ -38,6 +38,11 @@ #endif #endif +#if FontencCompatibility + COMPAT_SRC = fontencc.c + COMPAT_OBJ = fontencc.o +#endif + #if GzipFontCompression GUNZIP_SRC = gunzip.c GUNZIP_OBJ = gunzip.o @@ -45,19 +50,21 @@ #endif ATTRIBDEFS = -DFONTDIRATTRIB +FONTENCDEFS = -DFONT_ENCODINGS_DIRECTORY=\"$(FONTDIR)/encodings/encodings.dir\" DEFINES = StrcasecmpDefines $(ATTRIBDEFS) \ $(SPEEDO_DEFINES) $(TYPE1_DEFINES) $(CID_DEFINES) \ - $(FREETYPE_DEFINES) $(XTRUETYPE_DEFINES) $(GZIP_DEFS) + $(FREETYPE_DEFINES) $(XTRUETYPE_DEFINES) $(FONTENCDEFS) \ + $(GZIP_DEFS) SRCS = dirfile.c fontdir.c fontfile.c fileio.c fontscale.c \ defaults.c bitsource.c register.c renderers.c bufio.c \ decompress.c filewr.c printerfont.c ffcheck.c \ - fontenc.c encparse.c $(GUNZIP_SRC) + fontenc.c encparse.c $(COMPAT_SRC) $(GUNZIP_SRC) OBJS = dirfile.o fontdir.o fontfile.o fileio.o fontscale.o \ defaults.o bitsource.o register.o renderers.o bufio.o \ decompress.o filewr.o printerfont.o ffcheck.o \ - fontenc.o encparse.o $(GUNZIP_OBJ) + fontenc.o encparse.o $(COMPAT_OBJ) $(GUNZIP_OBJ) #define DoNormalLib NormalLibFont #define DoSharedLib SharedLibFont Index: xc/lib/font/fontfile/bitsource.c diff -u xc/lib/font/fontfile/bitsource.c:1.3 xc/lib/font/fontfile/bitsource.c:1.4 --- xc/lib/font/fontfile/bitsource.c:1.3 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fontfile/bitsource.c Fri Dec 14 14:56:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bitsource.c,v 1.3 2000/08/17 19:46:36 cpqbld Exp $ */ +/* $Xorg: bitsource.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/bitsource.c,v 1.3 2001/01/17 19:43:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/bitsource.c,v 1.4 2001/12/14 19:56:49 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/bufio.c diff -u xc/lib/font/fontfile/bufio.c:3.7 xc/lib/font/fontfile/bufio.c:3.9 --- xc/lib/font/fontfile/bufio.c:3.7 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fontfile/bufio.c Fri Dec 14 14:56:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bufio.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: bufio.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/bufio.c,v 3.7 2001/01/17 19:43:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/bufio.c,v 3.9 2001/12/14 19:56:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -34,9 +38,6 @@ #include #include #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif BufFilePtr BufFileCreate (char *private, Index: xc/lib/font/fontfile/decompress.c diff -u xc/lib/font/fontfile/decompress.c:1.4 xc/lib/font/fontfile/decompress.c:1.5 --- xc/lib/font/fontfile/decompress.c:1.4 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fontfile/decompress.c Fri Dec 14 14:56:50 2001 @@ -1,4 +1,4 @@ -/* $Xorg: decompress.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: decompress.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* * Copyright 1985, 1986 The Regents of the University of California. * All rights reserved. @@ -24,7 +24,11 @@ Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/decompress.c,v 1.4 2001/01/17 19:43:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/decompress.c,v 1.5 2001/12/14 19:56:50 dawes Exp $ */ /* * decompress - cat a compressed file */ Index: xc/lib/font/fontfile/defaults.c diff -u xc/lib/font/fontfile/defaults.c:1.7 xc/lib/font/fontfile/defaults.c:1.8 --- xc/lib/font/fontfile/defaults.c:1.7 Wed Jan 17 14:43:29 2001 +++ xc/lib/font/fontfile/defaults.c Fri Dec 14 14:56:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: defaults.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: defaults.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/defaults.c,v 1.7 2001/01/17 19:43:29 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/defaults.c,v 1.8 2001/12/14 19:56:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/dirfile.c diff -u xc/lib/font/fontfile/dirfile.c:3.11 xc/lib/font/fontfile/dirfile.c:3.14 --- xc/lib/font/fontfile/dirfile.c:3.11 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/dirfile.c Fri Dec 14 14:56:50 2001 @@ -1,10 +1,14 @@ -/* $Xorg: dirfile.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: dirfile.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/dirfile.c,v 3.11 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/dirfile.c,v 3.14 2001/12/14 19:56:50 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -38,9 +42,6 @@ #include #include #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif static Bool AddFileNameAliases ( FontDirectoryPtr dir ); static int ReadFontAlias ( char *directory, Bool isFile, @@ -386,6 +387,8 @@ break; case Comment: continue; + default: + break; } *t++ = c; ++count; Index: xc/lib/font/fontfile/encparse.c diff -u xc/lib/font/fontfile/encparse.c:1.14 xc/lib/font/fontfile/encparse.c:1.18 --- xc/lib/font/fontfile/encparse.c:1.14 Tue Nov 14 11:54:45 2000 +++ xc/lib/font/fontfile/encparse.c Thu Nov 1 22:06:40 2001 @@ -1,5 +1,5 @@ /* -Copyright (c) 1998-2000 by Juliusz Chroboczek +Copyright (c) 1998-2001 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,19 +20,41 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/encparse.c,v 1.14 2000/11/14 16:54:45 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/encparse.c,v 1.18 2001/11/02 03:06:40 dawes Exp $ */ /* Parser for encoding files */ -/* This code is ASCII-dependent */ +/* This code assumes that we are using ASCII. We don't use the ctype + functions, as they depend on the current locale. On the other + hand, we do use strcasecmp, but only on strings that we've checked + to be pure ASCII. Bloody ``Code Set Independence''. */ #include -#include #include +#ifndef FONTENC_NO_LIBFONT + #include "fntfilio.h" #include "fntfilst.h" +#else + +#include +#define xalloc(n) malloc(n) +#define xrealloc(p, n) realloc(p, n) +#define xfree(p) free(p) + +#include "zlib.h" +typedef gzFile FontFilePtr; +#define FontFileGetc(f) gzgetc(f) +#define FontFileOpen(filename) gzopen(filename, "rb") +#define FontFileClose(f) gzclose(f) + +#define MAXFONTFILENAMELEN 1024 +#define MAXFONTNAMELEN 1024 + +#endif + #include "fontenc.h" #include "fontencI.h" @@ -71,111 +93,113 @@ static void skipEndOfLine(FontFilePtr f, int c) { - if(c==0) - c=FontFileGetc(f); + if(c == 0) + c = FontFileGetc(f); - for(;;) - if(c<=0 || c=='\n') - return; - else - c=FontFileGetc(f); + for(;;) + if(c <= 0 || c == '\n') + return; + else + c = FontFileGetc(f); } /* Get a number; we're at the first digit. */ -static long +static unsigned getnum(FontFilePtr f, int c, int *cp) { - long n=0; - int base=10; + unsigned n = 0; + int base = 10; - /* look for `0' or `0x' prefix */ - if(c=='0') { - c=FontFileGetc(f); - base=8; - if(c=='x' || c=='X') { - base=16; - c=FontFileGetc(f); - } - } - - /* accumulate digits */ - for(;;) { - if('0'<=c && c<='9') { - n*=base; n+=c-'0'; - } else if('a'<=c && c<='f') { - n*=base; n+=c-'a'+10; - } else if('A'<=c && c<='F') { - n*=base; n+=c-'A'+10; - } else - break; - c=FontFileGetc(f); - } + /* look for `0' or `0x' prefix */ + if(c == '0') { + c = FontFileGetc(f); + base = 8; + if(c == 'x' || c == 'X') { + base = 16; + c = FontFileGetc(f); + } + } - *cp=c; return n; + /* accumulate digits */ + for(;;) { + if ('0' <= c && c <= '9') { + n *= base; n += c - '0'; + } else if('a' <= c && c <= 'f') { + n *= base; n += c - 'a' + 10; + } else if('A' <=c && c <= 'F') { + n *= base; n += c - 'A' + 10; + } else + break; + c = FontFileGetc(f); + } + + *cp = c; return n; } /* Skip to beginning of new line; return 1 if only whitespace was found. */ static int endOfLine(FontFilePtr f, int c) { - if(c==0) - c=FontFileGetc(f); + if(c == 0) + c = FontFileGetc(f); - for(;;) { - if(c<=0 || c=='\n') - return 1; - else if(c=='#') { - skipEndOfLine(f,c); - return 1; - } - else if(!isspace(c)) { - skipEndOfLine(f,c); - return 0; + for(;;) { + if(c <= 0 || c == '\n') + return 1; + else if(c == '#') { + skipEndOfLine(f,c); + return 1; + } + else if(c == ' ' || c == '\t') { + skipEndOfLine(f,c); + return 0; + } + c = FontFileGetc(f); } - c=FontFileGetc(f); - } } /* Get a token; we're at first char */ static int gettoken(FontFilePtr f, int c, int *cp) { - char *p; + char *p; - if(c<=0) - c=FontFileGetc(f); + if(c <= 0) + c = FontFileGetc(f); - if(c<=0) { - return EOF_TOKEN; - } - - while(isspace(c) && c!='\n') - c=FontFileGetc(f); - - if(c=='\n') { - return EOL_TOKEN; - } else if(c=='#') { - skipEndOfLine(f,c); - return EOL_TOKEN; - } else if(isdigit(c)) { - number_value=getnum(f,c,cp); - return NUMBER_TOKEN; - } else if(isalpha(c) || c=='/' || c=='_' || c=='-' || c=='.') { - p=keyword_value; - *p++=c; - while(p-keyword_value= '0' && c <= '9') { + number_value = getnum(f,c,cp); + return NUMBER_TOKEN; + } else if((c >= 'A' && c <= 'Z') || + (c >= 'a' && c <= 'z') || + c == '/' || c == '_' || c == '-' || c == '.') { + p = keyword_value; + *p++ = c; + while(p-keyword_value < MAXKEYWORDLEN) { + c = FontFileGetc(f); + if(c <= ' ' || c > '~' || c == '#') + break; + *p++ = c; + } + *cp = c; + *p = '\0'; + return KEYWORD_TOKEN; + } else { + *cp = c; + return ERROR_TOKEN; + } } /* Parse a line. @@ -183,195 +207,204 @@ static int getnextline(FontFilePtr f) { - int c, token, i; - c=FontFileGetc(f); - if(c<=0) - return EOF_LINE; - -retry: - token=gettoken(f,c,&c); - - switch(token) { - case EOF_TOKEN: - return EOF_LINE; - case EOL_TOKEN: - /* empty line */ - c=FontFileGetc(f); - goto retry; - case NUMBER_TOKEN: - value1=number_value; + int c, token; + c = FontFileGetc(f); + if(c <= 0) + return EOF_LINE; + + again: token=gettoken(f,c,&c); + switch(token) { + case EOF_TOKEN: + return EOF_LINE; + case EOL_TOKEN: + /* empty line */ + c = FontFileGetc(f); + goto again; case NUMBER_TOKEN: - value2=number_value; - token=gettoken(f,c,&c); - switch(token) { - case NUMBER_TOKEN: - value3=number_value; - return CODE_RANGE_LINE; - case EOL_TOKEN: - return CODE_LINE; - default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - case KEYWORD_TOKEN: - if(!endOfLine(f,c)) - return ERROR_LINE; - else - return NAME_LINE; - default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - case KEYWORD_TOKEN: - if(!strcasecmp(keyword_value, "STARTENCODING")) { - token=gettoken(f,c,&c); - if(token==KEYWORD_TOKEN) { - if(endOfLine(f,c)) - return STARTENCODING_LINE; - else - return ERROR_LINE; - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "ALIAS")) { - token=gettoken(f,c,&c); - if(token==KEYWORD_TOKEN) { - if(endOfLine(f,c)) - return ALIAS_LINE; - else - return ERROR_LINE; - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "SIZE")) { - token=gettoken(f,c,&c); - if(token==NUMBER_TOKEN) { - value1=number_value; - token=gettoken(f,c,&c); - switch(token) { - case NUMBER_TOKEN: - value2=number_value; - return SIZE_LINE; - case EOL_TOKEN: - value2=0; - return SIZE_LINE; - default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "FIRSTINDEX")) { - token=gettoken(f,c,&c); - if(token==NUMBER_TOKEN) { - value1=number_value; - token=gettoken(f,c,&c); + value1 = number_value; + token = gettoken(f,c,&c); switch(token) { case NUMBER_TOKEN: - value2=number_value; - return FIRSTINDEX_LINE; - case EOL_TOKEN: - value2=0; - return FIRSTINDEX_LINE; + value2 = number_value; + token = gettoken(f,c,&c); + switch(token) { + case NUMBER_TOKEN: + value3 = number_value; + return CODE_RANGE_LINE; + case EOL_TOKEN: + return CODE_LINE; + default: + skipEndOfLine(f,c); + return ERROR_LINE; + } + case KEYWORD_TOKEN: + if(!endOfLine(f,c)) + return ERROR_LINE; + else + return NAME_LINE; default: - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else { - skipEndOfLine(f,c); - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "STARTMAPPING")) { - keyword_value[0]=0; - value1=0; value1=0; - /* read up to three tokens, the first being a keyword */ - for(i=0; i<3; i++) { - token=gettoken(f,c,&c); - if(token==EOL_TOKEN) { - if(i>0) - return STARTMAPPING_LINE; - else - return ERROR_LINE; - } else if(token==KEYWORD_TOKEN) { - if(i!=0) { skipEndOfLine(f,c); return ERROR_LINE; - } - } else if(token==NUMBER_TOKEN) { - if(i==1) value1=number_value; - else if(i==2) value2=number_value; - else { + } + case KEYWORD_TOKEN: + if(!strcasecmp(keyword_value, "STARTENCODING")) { + token = gettoken(f,c,&c); + if(token == KEYWORD_TOKEN) { + if(endOfLine(f,c)) + return STARTENCODING_LINE; + else + return ERROR_LINE; + } else { + skipEndOfLine(f,c); + return ERROR_LINE; + } + } else if(!strcasecmp(keyword_value, "ALIAS")) { + token = gettoken(f,c,&c); + if(token == KEYWORD_TOKEN) { + if(endOfLine(f,c)) + return ALIAS_LINE; + else + return ERROR_LINE; + } else { + skipEndOfLine(f,c); + return ERROR_LINE; + } + } else if(!strcasecmp(keyword_value, "SIZE")) { + token = gettoken(f,c,&c); + if(token == NUMBER_TOKEN) { + value1 = number_value; + token = gettoken(f,c,&c); + switch(token) { + case NUMBER_TOKEN: + value2 = number_value; + return SIZE_LINE; + case EOL_TOKEN: + value2=0; + return SIZE_LINE; + default: + skipEndOfLine(f,c); + return ERROR_LINE; + } + } else { + skipEndOfLine(f,c); + return ERROR_LINE; + } + } else if(!strcasecmp(keyword_value, "FIRSTINDEX")) { + token = gettoken(f,c,&c); + if(token == NUMBER_TOKEN) { + value1 = number_value; + token = gettoken(f,c,&c); + switch(token) { + case NUMBER_TOKEN: + value2 = number_value; + return FIRSTINDEX_LINE; + case EOL_TOKEN: + value2 = 0; + return FIRSTINDEX_LINE; + default: + skipEndOfLine(f,c); + return ERROR_LINE; + } + } else { + skipEndOfLine(f,c); + return ERROR_LINE; + } + } else if(!strcasecmp(keyword_value, "STARTMAPPING")) { + keyword_value[0] = 0; + value1 = 0; value1 = 0; + /* first a keyword */ + token = gettoken(f,c,&c); + if(token != KEYWORD_TOKEN) { + skipEndOfLine(f, c); + return ERROR_LINE; + } + + /* optional first integer */ + token = gettoken(f,c,&c); + if(token == NUMBER_TOKEN) { + value1 = number_value; + } else if(token == EOL_TOKEN) { + return STARTMAPPING_LINE; + } else { + skipEndOfLine(f, c); + return ERROR_LINE; + } + + /* optional second integer */ + token = gettoken(f,c,&c); + if(token == NUMBER_TOKEN) { + value2 = number_value; + } else if(token == EOL_TOKEN) { + return STARTMAPPING_LINE; + } else { + skipEndOfLine(f, c); + return ERROR_LINE; + } + + if(!endOfLine(f,c)) + return ERROR_LINE; + else { + return STARTMAPPING_LINE; + } + } else if(!strcasecmp(keyword_value, "UNDEFINE")) { + /* first integer */ + token = gettoken(f,c,&c); + if(token != NUMBER_TOKEN) { + skipEndOfLine(f,c); + return ERROR_LINE; + } + value1 = number_value; + /* optional second integer */ + token = gettoken(f,c,&c); + if(token == EOL_TOKEN) { + value2 = value1; + return CODE_UNDEFINE_LINE; + } else if(token == NUMBER_TOKEN) { + value2 = number_value; + if(endOfLine(f,c)) { + return CODE_UNDEFINE_LINE; + } else + return ERROR_LINE; + } else { + skipEndOfLine(f,c); + return ERROR_LINE; + } + } else if(!strcasecmp(keyword_value, "ENDENCODING")) { + if(endOfLine(f,c)) + return EOF_LINE; + else + return ERROR_LINE; + } else if(!strcasecmp(keyword_value, "ENDMAPPING")) { + if(endOfLine(f,c)) + return ENDMAPPING_LINE; + else + return ERROR_LINE; + } else { skipEndOfLine(f,c); return ERROR_LINE; - } - } else { - skipEndOfLine(f,c); - return ERROR_LINE; } - } - if(!endOfLine(f,c)) - return ERROR_LINE; - else { - return STARTMAPPING_LINE; - } - } else if(!strcasecmp(keyword_value, "UNDEFINE")) { - token=gettoken(f,c,&c); - if(token!=NUMBER_TOKEN) { - skipEndOfLine(f,c); - return ERROR_LINE; - } - value1=number_value; - token=gettoken(f,c,&c); - if(token==EOL_TOKEN) { - value2=value1; - return CODE_UNDEFINE_LINE; - } else if(token==NUMBER_TOKEN) { - value2=number_value; - if(endOfLine(f,c)) { - return CODE_UNDEFINE_LINE; - } else - return ERROR_LINE; - } - } else if(!strcasecmp(keyword_value, "ENDENCODING")) { - if(endOfLine(f,c)) - return EOF_LINE; - else - return ERROR_LINE; - } else if(!strcasecmp(keyword_value, "ENDMAPPING")) { - if(endOfLine(f,c)) - return ENDMAPPING_LINE; - else + default: return ERROR_LINE; - } else { - skipEndOfLine(f,c); - return ERROR_LINE; } - default: - return ERROR_LINE; - } } static void -install_mapping(struct font_encoding *encoding, - struct font_encoding_mapping *mapping) +install_mapping(FontEncPtr encoding, FontMapPtr mapping) { - struct font_encoding_mapping *m; + FontMapPtr m; - if(encoding->mappings==NULL) - encoding->mappings=mapping; - else { - m=encoding->mappings; - while(m->next!=NULL) - m=m->next; - m->next=mapping; - } - mapping->next=NULL; + if(encoding->mappings == NULL) + encoding->mappings = mapping; + else { + m = encoding->mappings; + while(m->next != NULL) + m = m->next; + m->next = mapping; + } + mapping->next = NULL; + mapping->encoding = encoding; } static int @@ -379,433 +412,498 @@ unsigned *first, unsigned *last, unsigned *encsize, unsigned short **enc) { - unsigned index, i; - unsigned short *newenc; + unsigned index, i; + unsigned short *newenc; - if(from>0xFFFF) - return 0; /* success */ + if(from>0xFFFF) + return 0; /* success */ - if(row_size==0) - index=from; - else { - if((value1&0xFF)>=row_size) - return 0; /* ignore out-of-range mappings */ - index=(from>>8)*row_size+(from&0xFF); - } - - /* Optimize away useless identity mappings. This is only expected - * to be useful with linear encodings. */ - if(index==to && (index<*first || index>*last)) + if(row_size==0) + index=from; + else { + if((value1 & 0xFF) >= row_size) + return 0; /* ignore out of range mappings */ + index = (from>>8) * row_size + (from&0xFF); + } + + /* Optimize away useless identity mappings. This is only expected + to be useful with linear encodings. */ + if(index == to && (index < *first || index > *last)) + return 0; + if(*encsize == 0) { + *encsize = (index < 256) ? 256 : 0x10000; + *enc = (unsigned short*)xalloc((*encsize) * sizeof(unsigned short)); + if(*enc == NULL) { + *encsize = 0; + return 1; + } + } else if(*encsize <= index) { + *encsize = 0x10000; + if((newenc = (unsigned short*)xrealloc(enc, *encsize))==NULL) + return 1; + *enc = newenc; + } + if(*first > *last) { + *first = *last = index; + } + if(index < *first) { + for(i = index; i < *first; i++) + (*enc)[i] = i; + *first = index; + } + if(index > *last) { + for(i = *last + 1; i <= index; i++) + (*enc)[i] = i; + *last = index; + } + (*enc)[index] = to; return 0; - if(*encsize==0) { - *encsize=index<256?256:0x10000; - if((*enc= - (unsigned short*)xalloc(*encsize*sizeof(unsigned short)))==NULL) { - encsize=0; - return 1; - } - } else if(*encsize<=index) { - *encsize=0x10000; - if((newenc=(unsigned short*)xrealloc(enc, *encsize))==NULL) - return 1; - *enc=newenc; - } - if(*first>*last) { - *first=*last=index; - } - if(index<*first) { - for(i=index; i<*first; i++) - (*enc)[i]=i; - *first=index; - } - if(index>*last) { - for(i=*last+1; i<=index; i++) - (*enc)[i]=i; - *last=index; - } - (*enc)[index]=to; - return 0; } /* Parser. If headerOnly is true, we're only interested in the - * encodings's header. */ -static struct font_encoding* + data contained in the encoding file's header. */ + +/* As font encodings are currently never freed, the allocations done + by this function are mostly its private business. Note, however, + that FontEncIdentify needs to free the header fields -- so if you + change this function, you may need to change FontEncIdentify. */ + +/* I want a garbage collector. */ + +static FontEncPtr parseEncodingFile(FontFilePtr f, int headerOnly) { - int line; + int line; - unsigned short *enc=NULL; - char **nam=NULL, **newnam; - unsigned i, first=0xFFFF, last=0, encsize=0, namsize=0; - struct font_encoding *encoding=NULL; - struct font_encoding_mapping *mapping=NULL; - struct font_encoding_simple_mapping *sm; - struct font_encoding_simple_naming *sn; - char *aliases[MAXALIASES]; - int numaliases=0; - -/* no_encoding: */ - line=getnextline(f); - switch(line) { - case EOF_LINE: - goto error; - case STARTENCODING_LINE: - if((encoding= - (struct font_encoding*)xalloc(sizeof(struct font_encoding))) - ==NULL) - goto error; - if((encoding->name=(char*)xalloc(strlen(keyword_value)+1))==NULL) - goto error; - strcpy(encoding->name, keyword_value); - encoding->size=256; - encoding->row_size=0; - encoding->mappings=NULL; - encoding->next=NULL; - encoding->first=encoding->first_col=0; - goto no_mapping; - default: - goto error; - } - -no_mapping: - line=getnextline(f); - switch(line) { - case EOF_LINE: goto done; - case ALIAS_LINE: - if(numaliasessize=value1; - encoding->row_size=value2; - goto no_mapping; - case FIRSTINDEX_LINE: - encoding->first=value1; - encoding->first_col=value2; - goto no_mapping; - case STARTMAPPING_LINE: - if(headerOnly) - goto done; - if(!strcasecmp(keyword_value, "unicode")) { - if((mapping= - (struct font_encoding_mapping*) - xalloc(sizeof(struct font_encoding_mapping))) - ==NULL) + case STARTENCODING_LINE: + encoding = (FontEncPtr)xalloc(sizeof(FontEncRec)); + if(encoding == NULL) + goto error; + encoding->name = (char*)xalloc(strlen(keyword_value)+1); + if(encoding->name == NULL) + goto error; + strcpy(encoding->name, keyword_value); + encoding->size = 256; + encoding->row_size = 0; + encoding->mappings = NULL; + encoding->next = NULL; + encoding->first = encoding->first_col=0; + goto no_mapping; + default: goto error; - mapping->type = FONT_ENCODING_UNICODE; - mapping->pid = 0; - mapping->eid = 0; - mapping->recode=0; - mapping->name=0; - mapping->client_data=0; - mapping->next=0; - } else if(!strcasecmp(keyword_value, "cmap")) { - if((mapping= - (struct font_encoding_mapping*) - xalloc(sizeof(struct font_encoding_mapping))) - ==NULL) + } + + no_mapping: + line = getnextline(f); + switch(line) { + case EOF_LINE: goto done; + case ALIAS_LINE: + if(numaliases < MAXALIASES) { + aliases[numaliases] = (char*)xalloc(strlen(keyword_value)+1); + if(aliases[numaliases] == NULL) + goto error; + strcpy(aliases[numaliases], keyword_value); + numaliases++; + } + goto no_mapping; + case SIZE_LINE: + encoding->size = value1; + encoding->row_size = value2; + goto no_mapping; + case FIRSTINDEX_LINE: + encoding->first = value1; + encoding->first_col = value2; + goto no_mapping; + case STARTMAPPING_LINE: + if(headerOnly) + goto done; + if(!strcasecmp(keyword_value, "unicode")) { + mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); + if(mapping == NULL) + goto error; + mapping->type = FONT_ENCODING_UNICODE; + mapping->pid = 0; + mapping->eid = 0; + mapping->recode = 0; + mapping->name = 0; + mapping->client_data = 0; + mapping->next = 0; + goto mapping; + } else if(!strcasecmp(keyword_value, "cmap")) { + mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); + if(mapping == NULL) + goto error; + mapping->type = FONT_ENCODING_TRUETYPE; + mapping->pid = value1; + mapping->eid = value2; + mapping->recode = 0; + mapping->name = 0; + mapping->client_data = 0; + mapping->next = 0; + goto mapping; + } else if(!strcasecmp(keyword_value, "postscript")) { + mapping = (FontMapPtr)xalloc(sizeof(FontMapRec)); + if(mapping == NULL) + goto error; + mapping->type = FONT_ENCODING_POSTSCRIPT; + mapping->pid = 0; + mapping->eid = 0; + mapping->recode = 0; + mapping->name = 0; + mapping->client_data = 0; + mapping->next = 0; + goto string_mapping; + } else { /* unknown mapping type -- ignore */ + goto skipmapping; + } + /* NOTREACHED */ goto error; - mapping->type = FONT_ENCODING_TRUETYPE; - mapping->pid = value1; - mapping->eid = value2; - mapping->recode=0; - mapping->name=0; - mapping->client_data=0; - mapping->next=0; - goto mapping; - } else if(!strcasecmp(keyword_value, "postscript")) { - if((mapping= - (struct font_encoding_mapping*) - xalloc(sizeof(struct font_encoding_mapping))) - ==NULL) + default: goto no_mapping; /* ignore unknown lines */ + } + + skipmapping: + line = getnextline(f); + switch(line) { + case ENDMAPPING_LINE: + goto no_mapping; + case EOF_LINE: goto error; - mapping->type = FONT_ENCODING_POSTSCRIPT; - mapping->pid = 0; - mapping->eid = 0; - mapping->recode=0; - mapping->name=0; - mapping->client_data=0; - mapping->next=0; - goto string_mapping; - } else { /* unknown mapping type -- ignore */ - goto skipmapping; - } - goto mapping; - default: goto no_mapping; /* ignore unknown lines */ - } - -skipmapping: - line=getnextline(f); - switch(line) { - case ENDMAPPING_LINE: - goto no_mapping; - case EOF_LINE: - goto error; - default: - goto skipmapping; - } + default: + goto skipmapping; + } + + mapping: + line = getnextline(f); + switch(line) { + case EOF_LINE: goto error; + case ENDMAPPING_LINE: + mapping->recode = FontEncSimpleRecode; + mapping->name = FontEncUndefinedName; + mapping->client_data = sm = + (FontEncSimpleMapPtr)xalloc(sizeof(FontEncSimpleMapRec)); + if(sm == NULL) + goto error; + sm->row_size = encoding->row_size; + if(first <= last) { + sm->first = first; + sm->len=last-first+1; + sm->map = + (unsigned short*)xalloc(sm->len * sizeof(unsigned short)); + if(sm->map == NULL) { + xfree(sm); + mapping->client_data = sm = NULL; + goto error; + } + } else { + sm->first = 0; + sm->len = 0; + sm->map = 0; + } + for(i=0; i < sm->len; i++) + sm -> map[i] = enc[first+i]; + install_mapping(encoding, mapping); + mapping = 0; + first = 0xFFFF; last=0; + goto no_mapping; + + case CODE_LINE: + if(setCode(value1, value2, encoding->row_size, + &first, &last, &encsize, &enc)) + goto error; + goto mapping; + + case CODE_RANGE_LINE: + if(value1 > 0x10000) + value1 = 0x10000; + if(value2 > 0x10000) + value2 = 0x10000; + if(value2 < value1) + goto mapping; + /* Do the last value first to avoid having to realloc() */ + if(setCode(value2, value3+(value2-value1), encoding->row_size, + &first, &last, &encsize, &enc)) + goto error; + for(i=value1; irow_size, + &first, &last, &encsize, &enc)) + goto error; + } + goto mapping; + case CODE_UNDEFINE_LINE: + if(value1 > 0x10000) + value1 = 0x10000; + if(value2 > 0x10000) + value2 = 0x10000; + if(value2 < value1) + goto mapping; + /* Do the last value first to avoid having to realloc() */ + if(setCode(value2, 0, encoding->row_size, + &first, &last, &encsize, &enc)) + goto error; + for(i = value1; i < value2; i++) { + if(setCode(i, 0, encoding->row_size, + &first, &last, &encsize, &enc)) + goto error; + } + goto mapping; -mapping: - line=getnextline(f); - switch(line) { - case EOF_LINE: goto error; - case ENDMAPPING_LINE: - mapping->recode=font_encoding_simple_recode; - mapping->name=font_encoding_undefined_name; - if((mapping->client_data=sm= - (struct font_encoding_simple_mapping*) - xalloc(sizeof(struct font_encoding_simple_mapping)))==NULL) - goto error; - sm->row_size=encoding->row_size; - if(first<=last) { - sm->first=first; - sm->len=last-first+1; - if((sm->map= - (unsigned short*)xalloc(sm->len*sizeof(unsigned short))) - ==NULL) { - xfree(sm); - mapping->client_data=sm=NULL; - goto error; - } - } else { - sm->first=0; - sm->len=0; - sm->map=0; - } - for(i=0; ilen; i++) - sm->map[i]=enc[first+i]; - install_mapping(encoding,mapping); - mapping=0; - first=0xFFFF; last=0; - goto no_mapping; - - case CODE_LINE: - if(setCode(value1, value2, encoding->row_size, - &first, &last, &encsize, &enc)) - goto error; - goto mapping; - - case CODE_RANGE_LINE: - if(value1>0x10000) - value1=0x10000; - if(value2>0x10000) - value2=0x10000; - if(value2row_size, - &first, &last, &encsize, &enc)) - goto error; - for(i=value1; irow_size, - &first, &last, &encsize, &enc)) - goto error; + default: goto mapping; /* ignore unknown lines */ } - goto mapping; - case CODE_UNDEFINE_LINE: - if(value1>0x10000) - value1=0x10000; - if(value2>0x10000) - value2=0x10000; - if(value2row_size, - &first, &last, &encsize, &enc)) - goto error; - for(i=value1; irow_size, - &first, &last, &encsize, &enc)) - goto error; + string_mapping: + line = getnextline(f); + switch(line) { + case EOF_LINE: goto error; + case ENDMAPPING_LINE: + mapping->recode = FontEncUndefinedRecode; + mapping->name = FontEncSimpleName; + mapping->client_data = sn = + (FontEncSimpleNamePtr)xalloc(sizeof(FontEncSimpleNameRec)); + if(sn == NULL) + goto error; + if(first > last) { + xfree(sn); + mapping->client_data = sn = NULL; + goto error; + } + sn->first = first; + sn->len = last - first + 1; + sn->map = (char**)xalloc(sn->len*sizeof(char*)); + if(sn->map == NULL) { + xfree(sn); + mapping->client_data = sn = NULL; + goto error; + } + for(i = 0; i < sn->len; i++) + sn->map[i] = nam[first+i]; + install_mapping(encoding,mapping); + mapping = 0; + first = 0xFFFF; last=0; + goto no_mapping; + case NAME_LINE: + if(value1 >= 0x10000) goto string_mapping; + if(namsize == 0) { + namsize = (value1) < 256 ? 256 : 0x10000; + nam = (char**)xalloc(namsize * sizeof(char*)); + if(nam == NULL) { + namsize=0; + goto error; + } + } else if(namsize <= value1) { + namsize = 0x10000; + if((newnam = (char**)xrealloc(nam, namsize)) == NULL) + goto error; + nam = newnam; + } + if(first > last) { + first = last = value1; + } + if(value1 < first) { + for(i = value1; i < first; i++) + nam[i] = NULL; + first = value1; + } + if(value1 > last) { + for(i=last+1; i <= value1; i++) + nam[i]=NULL; + last = value1; + } + nam[value1] = (char*)xalloc(strlen(keyword_value)+1); + if(nam[value1] == NULL) { + goto error; + } + strcpy(nam[value1], keyword_value); + goto string_mapping; + + default: goto string_mapping; /* ignore unknown lines */ } - goto mapping; - default: goto mapping; /* ignore unknown lines */ - } + done: + if(encsize) xfree(enc); encsize=0; enc = NULL; + if(namsize) xfree(nam); namsize=0; nam = NULL; /* don't free entries! */ -string_mapping: - line=getnextline(f); - switch(line) { - case EOF_LINE: goto error; - case ENDMAPPING_LINE: - mapping->recode=font_encoding_undefined_recode; - mapping->name=font_encoding_simple_name; - if((mapping->client_data=sn= - (struct font_encoding_simple_naming*) - xalloc(sizeof(struct font_encoding_simple_naming)))==NULL) - goto error; - if(first>last) { - xfree(sn); - mapping->client_data=sn=NULL; - goto error; - } - sn->first=first; - sn->len=last-first+1; - if((sn->map= - (char**)xalloc(sn->len*sizeof(char*))) - ==NULL) { - xfree(sn); - mapping->client_data=sn=NULL; - goto error; - } - for(i=0; ilen; i++) - sn->map[i]=nam[first+i]; - install_mapping(encoding,mapping); - mapping=0; - first=0xFFFF; last=0; - goto no_mapping; - case NAME_LINE: - if(value1>=0x10000) goto string_mapping; - if(namsize==0) { - namsize=value1<256?256:0x10000; - if((nam=(char**)xalloc(namsize*sizeof(char*)))==NULL) { - namsize=0; - goto error; - } - } else if(namsize<=value1) { - namsize=0x10000; - if((newnam=(char**)xrealloc(nam, namsize))==NULL) - goto error; - nam=newnam; - } - if(first>last) { - first=last=value1; + encoding->aliases=NULL; + if(numaliases) { + encoding->aliases = (char**)xalloc((numaliases+1)*sizeof(char*)); + if(encoding->aliases == NULL) + goto error; + for(i=0; ialiases[i] = aliases[i]; + encoding->aliases[numaliases]=NULL; } - if(value1last) { - for(i=last+1; i<=value1; i++) - nam[i]=NULL; - last=value1; - } - if((nam[value1]=(char*)xalloc(strlen(keyword_value)+1))==NULL) { - goto error; - } - strcpy(nam[value1], keyword_value); - goto string_mapping; - - default: goto string_mapping; /* ignore unknown lines */ - } - -done: - if(encsize) xfree(enc); encsize=0; - if(namsize) xfree(nam); namsize=0; /* don't free entries! */ - - encoding->aliases=NULL; - if(numaliases) { - if((encoding->aliases=(char**)xalloc((numaliases+1)*sizeof(char*))) - ==NULL) - goto error; - for(i=0; ialiases[i]=aliases[i]; - encoding->aliases[numaliases]=NULL; - } - return encoding; + return encoding; error: - if(encsize) xfree(enc); encsize=0; - if(namsize) { - for(i=first; i<=last; i++) - if(nam[i]) - xfree(nam[i]); - xfree(nam); - namsize=0; - } - if(mapping) { - if(mapping->client_data) xfree(mapping->client_data); - xfree(mapping); - } - if(encoding) { - if(encoding->name) xfree(encoding->name); - for(mapping=encoding->mappings; mapping; mapping=mapping->next) { - if(mapping->client_data) xfree(mapping->client_data); - xfree(mapping); + if(encsize) xfree(enc); encsize=0; + if(namsize) { + for(i = first; i <= last; i++) + if(nam[i]) + xfree(nam[i]); + xfree(nam); + namsize = 0; + } + if(mapping) { + if(mapping->client_data) xfree(mapping->client_data); + xfree(mapping); + } + if(encoding) { + if(encoding->name) xfree(encoding->name); + for(mapping = encoding->mappings; mapping; mapping = mapping->next) { + if(mapping->client_data) xfree(mapping->client_data); + xfree(mapping); } xfree(encoding); - } - for(i=0; i=MAXFONTFILENAMELEN) - return NULL; + if(buf && strlen(dir) + 14 < MAXFONTFILENAMELEN) { strcpy(buf, dir); - strcat(buf, file_name); - } else - strcpy(buf,file_name); - if((f=FontFileOpen(buf))==NULL) { + strcat(buf, "encodings.dir"); + } +} + +static FontEncPtr +FontEncReallyReallyLoad(const char *charset, + const char *dirname, const char *dir) +{ + FontFilePtr f; + FILE *file; + FontEncPtr encoding; + char file_name[MAXFONTFILENAMELEN], encoding_name[MAXFONTNAMELEN], + buf[MAXFONTFILENAMELEN]; + int count, n; + + /* As we don't really expect to open encodings that often, we don't + take the trouble of caching encodings directories. */ + + if((file = fopen(dirname, "r")) == NULL) { + return NULL; + } + + count = fscanf(file, "%d\n", &n); + if(count == EOF || count != 1) { + fclose(file); return NULL; - } - encoding=parseEncodingFile(f, 0); - FontFileClose(f); - break; } - } - fclose(file); + encoding = NULL; + for(;;) { + count = fscanf(file, "%s %[^\n]\n", encoding_name, file_name); + if(count == EOF) + break; + if(count != 2) + break; + + if(!strcasecmp(encoding_name, charset)) { + /* Found it */ + if(file_name[0] != '/') { + if(strlen(dir) + strlen(file_name) >= MAXFONTFILENAMELEN) + return NULL; + strcpy(buf, dir); + strcat(buf, file_name); + } else { + strcpy(buf , file_name); + } + + f = FontFileOpen(buf); + if(f == NULL) { + return NULL; + } + encoding = parseEncodingFile(f, 0); + FontFileClose(f); + break; + } + } - return encoding; + fclose(file); + + return encoding; +} + +/* Parser ntrypoint -- used by FontEncLoad */ +FontEncPtr +FontEncReallyLoad(const char *charset, const char *fontFileName) +{ + FontEncPtr encoding; + char dir[MAXFONTFILENAMELEN], dirname[MAXFONTFILENAMELEN]; + char *d; + + if(fontFileName) { + parseFontFileName(fontFileName, dirname, dir); + encoding = FontEncReallyReallyLoad(charset, dirname, dir); + if(encoding) + return(encoding); + } + + d = FontEncDirectory(); + if(d) { + parseFontFileName(d, NULL, dir); + encoding = FontEncReallyReallyLoad(charset, d, dir); + return encoding; + } + + return NULL; } /* Return a NULL-terminated array of encoding names. Note that this @@ -813,41 +911,44 @@ * parseEncodingFile. */ char ** -identifyEncodingFile(const char *fileName) +FontEncIdentify(const char *fileName) { - FontFilePtr f; - struct font_encoding *encoding; - char **names, **name, **alias; - int numaliases; - - if((f=FontFileOpen(fileName))==NULL) { - return NULL; - } - encoding=parseEncodingFile(f, 1); - FontFileClose(f); + FontFilePtr f; + FontEncPtr encoding; + char **names, **name, **alias; + int numaliases; + + if((f = FontFileOpen(fileName))==NULL) { + return NULL; + } + encoding = parseEncodingFile(f, 1); + FontFileClose(f); - if(!encoding) - return NULL; + if(!encoding) + return NULL; - numaliases=0; - if(encoding->aliases) - for(alias=encoding->aliases; *alias; alias++) - numaliases++; + numaliases = 0; + if(encoding->aliases) + for(alias = encoding->aliases; *alias; alias++) + numaliases++; + + names = (char**)xalloc((numaliases+2)*sizeof(char*)); + if(names == NULL) { + if(encoding->aliases) + xfree(encoding->aliases); + xfree(encoding); + return NULL; + } - if((names=(char**)xalloc((numaliases+2)*sizeof(char*)))==NULL) - return NULL; + name = names; + *(name++) = encoding->name; + if(numaliases > 0) + for(alias = encoding->aliases; *alias; alias++, name++) + *name = *alias; - name=names; - *(name++)=encoding->name; - if(numaliases>0) - for(alias=encoding->aliases; *alias; alias++, name++) - *name=*alias; - - *name=0; - xfree(encoding->aliases); - xfree(encoding); + *name = 0; + xfree(encoding->aliases); + xfree(encoding); - return names; + return names; } - - Index: xc/lib/font/fontfile/ffcheck.c diff -u xc/lib/font/fontfile/ffcheck.c:1.14 xc/lib/font/fontfile/ffcheck.c:1.15 --- xc/lib/font/fontfile/ffcheck.c:1.14 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/ffcheck.c Fri Dec 14 14:56:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ffcheck.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: ffcheck.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/ffcheck.c,v 1.14 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/ffcheck.c,v 1.15 2001/12/14 19:56:51 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/fileio.c diff -u xc/lib/font/fontfile/fileio.c:3.8 xc/lib/font/fontfile/fileio.c:3.9 --- xc/lib/font/fontfile/fileio.c:3.8 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/fileio.c Fri Dec 14 14:56:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fileio.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: fileio.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fileio.c,v 3.8 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fileio.c,v 3.9 2001/12/14 19:56:51 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/filewr.c diff -u xc/lib/font/fontfile/filewr.c:3.5 xc/lib/font/fontfile/filewr.c:3.6 --- xc/lib/font/fontfile/filewr.c:3.5 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/filewr.c Fri Dec 14 14:56:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: filewr.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: filewr.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/filewr.c,v 3.5 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/filewr.c,v 3.6 2001/12/14 19:56:51 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/fontdir.c diff -u xc/lib/font/fontfile/fontdir.c:3.17 xc/lib/font/fontfile/fontdir.c:3.18 --- xc/lib/font/fontfile/fontdir.c:3.17 Mon May 14 20:05:32 2001 +++ xc/lib/font/fontfile/fontdir.c Fri Dec 14 14:56:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontdir.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: fontdir.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.17 2001/05/15 00:05:32 keithp Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.18 2001/12/14 19:56:51 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/fontenc.c diff -u xc/lib/font/fontfile/fontenc.c:1.11 xc/lib/font/fontfile/fontenc.c:1.14 --- xc/lib/font/fontfile/fontenc.c:1.11 Wed Apr 18 12:13:18 2001 +++ xc/lib/font/fontfile/fontenc.c Thu Nov 1 22:06:40 2001 @@ -1,5 +1,5 @@ /* -Copyright (c) 1998-2000 by Juliusz Chroboczek +Copyright (c) 1998-2001 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,41 +20,54 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.11 2001/04/18 16:13:18 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.14 2001/11/02 03:06:40 dawes Exp $ */ /* Backend-independent encoding code */ #include + +#ifndef FONTENC_NO_LIBFONT + #include "fontmisc.h" /* defines xalloc and friends */ +#include "fntfilst.h" + +#else + +#include +#define xalloc(n) malloc(n) +#define xrealloc(p, n) realloc(p, n) +#define xfree(p) free(p) +#define FALSE 0 +#define TRUE 1 +#define MAXFONTNAMELEN 1024 +#define MAXFONTFILENAMELEN 1024 + +#endif /* FONTENC_NO_FONTFILE */ + #include "fontenc.h" #include "fontencI.h" /* Functions local to this file */ + +static FontEncPtr FontEncLoad(const char*, const char*); -static struct font_encoding *loadEncoding(const char*, const char*); +/* Early versions of this code only knew about hardwired encodings, + hence the following data. Now that the code knows how to load an + encoding from a file, most of these tables could go away. */ -/* Of course, one could add millions of tables here. In order for a table - * to be suitable for inclusion, it must satisfy the following condition: - * some fonts will be useless under Unix for some people without it. This - * means that an encoding function must go from some encoding used under - * Unix to either Unicode or an Apple encoding. Apple encodings should be - * avoided, as most fonts will have a Unicode table anyway. - * - * Now that the code knows how to load an encoding from a file, most - * of these hard-coded tables could go away. However, having them - * here simplifies administration in common cases. */ - -static struct font_encoding_mapping iso10646[]= -{ - {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, - {0,0,0,0,0,0,0} -}; - -/* Notice that the Apple encodings do not have all the characters in the - * corresponding ISO 8859, and the tables have some holes. There's not - * much more we can do with fonts without a Unicode cmap unless we are - * willing to combine cmaps (which we are not). */ +/* At any rate, no new hardcoded encodings will be added. */ +static FontMapRec iso10646[]= +{ + {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, + {0,0,0,0,0,0,0} +}; + +/* Notice that the Apple encodings do not have all the characters in + the corresponding ISO 8859, and therefore the table has some holes. + There's not much more we can do with fonts without a Unicode cmap + unless we are willing to combine cmaps (which we are not). */ + static unsigned short iso8859_1_apple_roman[]= { 0xCA, 0xC1, 0xA2, 0xA3, 0xDB, 0xB4, 0x00, 0xA4, @@ -74,20 +87,20 @@ static unsigned iso8859_1_to_apple_roman(unsigned isocode, void *client_data) { - if(isocode<=0x80) - return isocode; - else if(isocode>=0xA0) - return iso8859_1_apple_roman[isocode-0xA0]; - else - return 0; + if(isocode<=0x80) + return isocode; + else if(isocode>=0xA0) + return iso8859_1_apple_roman[isocode-0xA0]; + else + return 0; } -static struct font_encoding_mapping iso8859_1[]= +static FontMapRec iso8859_1[]= { - {FONT_ENCODING_TRUETYPE,2,2,0,0,0,0}, /* ISO 8859-1 */ - {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, /* ISO 8859-1 coincides with Unicode*/ - {FONT_ENCODING_TRUETYPE,1,0,iso8859_1_to_apple_roman,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_TRUETYPE,2,2,0,0,0,0}, /* ISO 8859-1 */ + {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, /* ISO 8859-1 coincides with Unicode*/ + {FONT_ENCODING_TRUETYPE,1,0,iso8859_1_to_apple_roman,0,0,0}, + {0,0,0,0,0,0,0} }; static unsigned short iso8859_2_tophalf[]= @@ -104,7 +117,7 @@ 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 }; -static struct font_encoding_simple_mapping iso8859_2_to_unicode_map= +static FontEncSimpleMapRec iso8859_2_to_unicode_map= {0x60, 0, 0xA0, iso8859_2_tophalf }; static unsigned short iso8859_2_apple_centeuro[]= @@ -124,21 +137,21 @@ static unsigned iso8859_2_to_apple_centeuro(unsigned isocode, void *client_data) { - if(isocode<=0x80) - return isocode; - else if(isocode>=0xA0) - return iso8859_2_apple_centeuro[isocode-0xA0]; - else - return 0; + if(isocode<=0x80) + return isocode; + else if(isocode>=0xA0) + return iso8859_2_apple_centeuro[isocode-0xA0]; + else + return 0; } -static struct font_encoding_mapping iso8859_2[]= +static FontMapRec iso8859_2[]= { - {FONT_ENCODING_UNICODE,0,0, - font_encoding_simple_recode,0,&iso8859_2_to_unicode_map,0}, - {FONT_ENCODING_TRUETYPE,1,29,iso8859_2_to_apple_centeuro,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0, + FontEncSimpleRecode,0,&iso8859_2_to_unicode_map,0}, + {FONT_ENCODING_TRUETYPE,1,29,iso8859_2_to_apple_centeuro,0,0,0}, + {0,0,0,0,0,0,0} }; static unsigned short iso8859_3_tophalf[]= @@ -155,14 +168,14 @@ 0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9}; -static struct font_encoding_simple_mapping iso8859_3_to_unicode_map= +static FontEncSimpleMapRec iso8859_3_to_unicode_map= { 0x60, 0, 0xA0, iso8859_3_tophalf }; -static struct font_encoding_mapping iso8859_3[]= +static FontMapRec iso8859_3[]= { - {FONT_ENCODING_UNICODE,0,0, - font_encoding_simple_recode,0,&iso8859_3_to_unicode_map,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0, + FontEncSimpleRecode,0,&iso8859_3_to_unicode_map,0}, + {0,0,0,0,0,0,0} }; @@ -181,14 +194,14 @@ 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9, }; -static struct font_encoding_simple_mapping iso8859_4_to_unicode_map= +static FontEncSimpleMapRec iso8859_4_to_unicode_map= { 0x60, 0, 0xA0, iso8859_4_tophalf }; -static struct font_encoding_mapping iso8859_4[]= +static FontMapRec iso8859_4[]= { - {FONT_ENCODING_UNICODE,0,0,font_encoding_simple_recode,0, - &iso8859_4_to_unicode_map,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, + &iso8859_4_to_unicode_map,0}, + {0,0,0,0,0,0,0} }; static unsigned short iso8859_5_tophalf[]= @@ -205,7 +218,7 @@ 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F}; -static struct font_encoding_simple_mapping iso8859_5_to_unicode_map= +static FontEncSimpleMapRec iso8859_5_to_unicode_map= { 0x60, 0, 0xA0, iso8859_5_tophalf }; static unsigned short @@ -226,19 +239,19 @@ static unsigned iso8859_5_to_apple_cyrillic(unsigned isocode, void *client_data) { - if(isocode<=0x80) - return isocode; - else if(isocode>=0xA0) - return iso8859_5_apple_cyrillic[isocode-0x80]; - else return 0; + if(isocode<=0x80) + return isocode; + else if(isocode>=0xA0) + return iso8859_5_apple_cyrillic[isocode-0x80]; + else return 0; } -static struct font_encoding_mapping iso8859_5[]= -{ - {FONT_ENCODING_UNICODE,0,0,font_encoding_simple_recode,0, - &iso8859_5_to_unicode_map,0}, - {FONT_ENCODING_TRUETYPE,1,7,iso8859_5_to_apple_cyrillic,0,0,0}, - {0,0,0,0,0,0,0} +static FontMapRec iso8859_5[]= +{ + {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, + &iso8859_5_to_unicode_map,0}, + {FONT_ENCODING_TRUETYPE,1,7,iso8859_5_to_apple_cyrillic,0,0,0}, + {0,0,0,0,0,0,0} }; /* ISO 8859-6 seems useless for serving fonts (not enough presentation @@ -247,88 +260,88 @@ static unsigned iso8859_6_to_unicode(unsigned isocode, void *client_data) { - if(isocode<=0xA0 || isocode==0xA4 || isocode==0xAD) - return isocode; - else if(isocode==0xAC || isocode==0xBB || - (isocode>=0xBF && isocode<=0xDA) || - (isocode>=0xE0 && isocode<=0xEF) || - (isocode>=0xF0 && isocode<=0xF2)) - return isocode-0xA0+0x0600; - else - return 0; + if(isocode<=0xA0 || isocode==0xA4 || isocode==0xAD) + return isocode; + else if(isocode==0xAC || isocode==0xBB || + (isocode>=0xBF && isocode<=0xDA) || + (isocode>=0xE0 && isocode<=0xEF) || + (isocode>=0xF0 && isocode<=0xF2)) + return isocode-0xA0+0x0600; + else + return 0; } -static struct font_encoding_mapping iso8859_6[]= +static FontMapRec iso8859_6[]= { - {FONT_ENCODING_UNICODE,0,0,iso8859_6_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,iso8859_6_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; static unsigned iso8859_7_to_unicode(unsigned isocode, void *client_data) { - if(isocode<=0xA0 || - (isocode>=0xA3 && isocode<=0xAD) || - (isocode>=0xB0 && isocode<=0xB3) || - isocode==0xB7 || isocode==0xBB || isocode==0xBD) - return isocode; - else if(isocode==0xA1) - return 0x02BD; - else if(isocode==0xA2) - return 0x02BC; - else if(isocode==0xAF) - return 0x2015; - else if(isocode>=0xB4) - return isocode-0xA0+0x0370; - else - return 0; + if(isocode<=0xA0 || + (isocode>=0xA3 && isocode<=0xAD) || + (isocode>=0xB0 && isocode<=0xB3) || + isocode==0xB7 || isocode==0xBB || isocode==0xBD) + return isocode; + else if(isocode==0xA1) + return 0x02BD; + else if(isocode==0xA2) + return 0x02BC; + else if(isocode==0xAF) + return 0x2015; + else if(isocode>=0xB4) + return isocode-0xA0+0x0370; + else + return 0; } -static struct font_encoding_mapping iso8859_7[]= +static FontMapRec iso8859_7[]= { - {FONT_ENCODING_UNICODE,0,0,iso8859_7_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,iso8859_7_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; static unsigned iso8859_8_to_unicode(unsigned isocode, void *client_data) { - if(isocode==0xA1) - return 0; - else if(isocode<0xBF) - return isocode; - else if(isocode==0xDF) - return 0x2017; - else if(isocode>=0xE0 && isocode<=0xFA) - return isocode+0x04F0; - else - return 0; + if(isocode==0xA1) + return 0; + else if(isocode<0xBF) + return isocode; + else if(isocode==0xDF) + return 0x2017; + else if(isocode>=0xE0 && isocode<=0xFA) + return isocode+0x04F0; + else + return 0; } -static struct font_encoding_mapping iso8859_8[]= +static FontMapRec iso8859_8[]= { - {FONT_ENCODING_UNICODE,0,0,iso8859_8_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,iso8859_8_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; static unsigned iso8859_9_to_unicode(unsigned isocode, void *client_data) { - switch(isocode) { - case 0xD0: return 0x011E; - case 0xDD: return 0x0130; - case 0xDE: return 0x015E; - case 0xF0: return 0x011F; - case 0xFD: return 0x0131; - case 0xFE: return 0x015F; - default: return isocode; - } + switch(isocode) { + case 0xD0: return 0x011E; + case 0xDD: return 0x0130; + case 0xDE: return 0x015E; + case 0xF0: return 0x011F; + case 0xFD: return 0x0131; + case 0xFE: return 0x015F; + default: return isocode; + } } -static struct font_encoding_mapping iso8859_9[]= +static FontMapRec iso8859_9[]= { - {FONT_ENCODING_UNICODE,0,0,iso8859_9_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,iso8859_9_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; static unsigned short iso8859_10_tophalf[]= @@ -345,36 +358,36 @@ 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169, 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138}; -static struct font_encoding_simple_mapping iso8859_10_to_unicode_map= +static FontEncSimpleMapRec iso8859_10_to_unicode_map= { 0x60, 0, 0xA0, iso8859_10_tophalf }; -static struct font_encoding_mapping iso8859_10[]= +static FontMapRec iso8859_10[]= { - {FONT_ENCODING_UNICODE,0,0,font_encoding_simple_recode,0, - &iso8859_10_to_unicode_map,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, + &iso8859_10_to_unicode_map,0}, + {0,0,0,0,0,0,0} }; static unsigned iso8859_15_to_unicode(unsigned isocode, void *client_data) { - switch(isocode) { - case 0xA4: return 0x20AC; - case 0xA6: return 0x0160; - case 0xA8: return 0x0161; - case 0xB4: return 0x017D; - case 0xB8: return 0x017E; - case 0xBC: return 0x0152; - case 0xBD: return 0x0153; - case 0xBE: return 0x0178; - default: return isocode; - } + switch(isocode) { + case 0xA4: return 0x20AC; + case 0xA6: return 0x0160; + case 0xA8: return 0x0161; + case 0xB4: return 0x017D; + case 0xB8: return 0x017E; + case 0xBC: return 0x0152; + case 0xBD: return 0x0153; + case 0xBE: return 0x0178; + default: return isocode; + } } -static struct font_encoding_mapping iso8859_15[]= +static FontMapRec iso8859_15[]= { - {FONT_ENCODING_UNICODE,0,0,iso8859_15_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,iso8859_15_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; static unsigned short koi8_r_tophalf[]= @@ -395,48 +408,48 @@ 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A}; -static struct font_encoding_simple_mapping koi8_r_to_unicode_map= +static FontEncSimpleMapRec koi8_r_to_unicode_map= { 0x80, 0, 0x80, koi8_r_tophalf }; -static struct font_encoding_mapping koi8_r[]= +static FontMapRec koi8_r[]= { - {FONT_ENCODING_UNICODE,0,0,font_encoding_simple_recode,0, - &koi8_r_to_unicode_map,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, + &koi8_r_to_unicode_map,0}, + {0,0,0,0,0,0,0} }; static unsigned koi8_ru_to_unicode(unsigned koicode, void *client_data) { - switch(koicode) { - case 0x93: return 0x201C; - case 0x96: return 0x201D; - case 0x97: return 0x2014; - case 0x98: return 0x2116; - case 0x99: return 0x2122; - case 0x9B: return 0x00BB; - case 0x9C: return 0x00AE; - case 0x9D: return 0x00AB; - case 0x9F: return 0x00A4; - case 0xA4: return 0x0454; - case 0xA6: return 0x0456; - case 0xA7: return 0x0457; - case 0xAD: return 0x0491; - case 0xAE: return 0x045E; - case 0xB4: return 0x0404; - case 0xB6: return 0x0406; - case 0xB7: return 0x0407; - case 0xBD: return 0x0490; - case 0xBE: return 0x040E; - default: return font_encoding_simple_recode(koicode, &koi8_r_to_unicode_map); + switch(koicode) { + case 0x93: return 0x201C; + case 0x96: return 0x201D; + case 0x97: return 0x2014; + case 0x98: return 0x2116; + case 0x99: return 0x2122; + case 0x9B: return 0x00BB; + case 0x9C: return 0x00AE; + case 0x9D: return 0x00AB; + case 0x9F: return 0x00A4; + case 0xA4: return 0x0454; + case 0xA6: return 0x0456; + case 0xA7: return 0x0457; + case 0xAD: return 0x0491; + case 0xAE: return 0x045E; + case 0xB4: return 0x0404; + case 0xB6: return 0x0406; + case 0xB7: return 0x0407; + case 0xBD: return 0x0490; + case 0xBE: return 0x040E; + default: return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); } } -static struct font_encoding_mapping koi8_ru[]= +static FontMapRec koi8_ru[]= { - {FONT_ENCODING_UNICODE,0,0,koi8_ru_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,koi8_ru_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; /* koi8-e, ISO-IR-111 or ECMA-Cyrillic */ @@ -450,18 +463,18 @@ static unsigned koi8_e_to_unicode(unsigned koicode, void *client_data) { - if(koicode<0xA0) - return koicode; - else if(koicode<0xC0) - return koi8_e_A0_BF[koicode-0xA0]; - else - return font_encoding_simple_recode(koicode, &koi8_r_to_unicode_map); + if(koicode<0xA0) + return koicode; + else if(koicode<0xC0) + return koi8_e_A0_BF[koicode-0xA0]; + else + return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); } -static struct font_encoding_mapping koi8_e[]= +static FontMapRec koi8_e[]= { - {FONT_ENCODING_UNICODE,0,0,koi8_e_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,koi8_e_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; /* Koi8 unified */ @@ -479,19 +492,18 @@ static unsigned koi8_uni_to_unicode(unsigned koicode, void *client_data) { - if(koicode<0x80) - return koicode; - else if(koicode<0xC0) - return koi8_uni_80_BF[koicode-0x80]; - else - return font_encoding_simple_recode(koicode, &koi8_r_to_unicode_map); + if(koicode<0x80) + return koicode; + else if(koicode<0xC0) + return koi8_uni_80_BF[koicode-0x80]; + else + return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); } -static struct font_encoding_mapping koi8_uni[]= +static FontMapRec koi8_uni[]= { - {FONT_ENCODING_UNICODE,0,0,koi8_uni_to_unicode, 0, - 0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,koi8_uni_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; /* Ukrainian variant of Koi8-R; see RFC 2319 */ @@ -499,263 +511,295 @@ static unsigned koi8_u_to_unicode(unsigned koicode, void *client_data) { - switch(koicode) { - case 0xA4: return 0x0454; - case 0xA6: return 0x0456; - case 0xA7: return 0x0457; - case 0xAD: return 0x0491; - case 0xB4: return 0x0404; - case 0xB6: return 0x0406; - case 0xB7: return 0x0407; - case 0xBD: return 0x0490; - default: return font_encoding_simple_recode(koicode, &koi8_r_to_unicode_map); - } + switch(koicode) { + case 0xA4: return 0x0454; + case 0xA6: return 0x0456; + case 0xA7: return 0x0457; + case 0xAD: return 0x0491; + case 0xB4: return 0x0404; + case 0xB6: return 0x0406; + case 0xB7: return 0x0407; + case 0xBD: return 0x0490; + default: return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); + } } -static struct font_encoding_mapping koi8_u[]= +static FontMapRec koi8_u[]= { - {FONT_ENCODING_UNICODE,0,0,koi8_u_to_unicode,0,0,0}, - {0,0,0,0,0,0,0} + {FONT_ENCODING_UNICODE,0,0,koi8_u_to_unicode,0,0,0}, + {0,0,0,0,0,0,0} }; -/* Microsoft Symbol is treated specially in ftenc.c, where we add - * usFirstCharIndex-0x20 to the glyph index before applying the - * cmap. */ +/* Microsoft Symbol, which is only meaningful for TrueType fonts, is + treated specially in ftenc.c, where we add usFirstCharIndex-0x20 to + the glyph index before applying the cmap. Lovely design. */ -static struct font_encoding_mapping microsoft_symbol[]= +static FontMapRec microsoft_symbol[]= {{FONT_ENCODING_TRUETYPE,3,0,0,0,0,0}, /* You never know */ {FONT_ENCODING_TRUETYPE,3,1,0,0,0,0}, {0,0,0,0,0,0,0}}; -static struct font_encoding_mapping apple_roman[]= +static FontMapRec apple_roman[]= {{FONT_ENCODING_TRUETYPE,1,0,0,0,0,0}, {0,0,0,0,0,0,0}}; /* The data for recodings */ -/* For compatibility with X11R6.4 */ +/* For compatibility with X11R6.4. Losers. */ static char *iso8859_15_aliases[2]={"fcd8859-15",0}; -static struct font_encoding initial_encodings[]= +static FontEncRec initial_encodings[]= { - {"iso10646-1",0,256*256,0,iso10646,0,0,0}, /* Unicode */ - {"iso8859-1",0,256,0,iso8859_1,0,0,0}, /* Latin 1 (West European) */ - {"iso8859-2",0,256,0,iso8859_2,0,0,0}, /* Latin 2 (East European) */ - {"iso8859-3",0,256,0,iso8859_3,0,0,0}, /* Latin 3 (South European) */ - {"iso8859-4",0,256,0,iso8859_4,0,0,0}, /* Latin 4 (North European) */ - {"iso8859-5",0,256,0,iso8859_5,0,0,0}, /* Cyrillic */ - {"iso8859-6",0,256,0,iso8859_6,0,0,0}, /* Arabic */ - {"iso8859-7",0,256,0,iso8859_7,0,0,0}, /* Greek */ - {"iso8859-8",0,256,0,iso8859_8,0,0,0}, /* Hebrew */ - {"iso8859-9",0,256,0,iso8859_9,0,0,0}, /* Latin 5 (Turkish) */ - {"iso8859-10",0,256,0,iso8859_10,0,0,0}, /* Latin 6 (Nordic) */ - {"iso8859-15",iso8859_15_aliases,256,0,iso8859_15,0,0,0}, /* Latin 9 */ - {"koi8-r",0,256,0,koi8_r,0,0,0}, /* Russian */ - {"koi8-ru",0,256,0,koi8_ru,0,0,0}, /* Ukrainian */ - {"koi8-uni",0,256,0,koi8_uni,0,0,0}, /* Russian/Ukrainian/Bielorussian */ - {"koi8-e",0,256,0,koi8_e,0,0,0}, /* ``European'' */ - {"koi8-u",0,256,0,koi8_u,0,0,0}, /* Ukrainian too */ - {"microsoft-symbol",0,256,0,microsoft_symbol,0,0,0}, - {"apple-roman",0,256,0,apple_roman,0,0,0}, - {0,0,0,0,0,0,0} + {"iso10646-1",0,256*256,0,iso10646,0,0,0}, /* Unicode */ + {"iso8859-1",0,256,0,iso8859_1,0,0,0}, /* Latin 1 (West European) */ + {"iso8859-2",0,256,0,iso8859_2,0,0,0}, /* Latin 2 (East European) */ + {"iso8859-3",0,256,0,iso8859_3,0,0,0}, /* Latin 3 (South European) */ + {"iso8859-4",0,256,0,iso8859_4,0,0,0}, /* Latin 4 (North European) */ + {"iso8859-5",0,256,0,iso8859_5,0,0,0}, /* Cyrillic */ + {"iso8859-6",0,256,0,iso8859_6,0,0,0}, /* Arabic */ + {"iso8859-7",0,256,0,iso8859_7,0,0,0}, /* Greek */ + {"iso8859-8",0,256,0,iso8859_8,0,0,0}, /* Hebrew */ + {"iso8859-9",0,256,0,iso8859_9,0,0,0}, /* Latin 5 (Turkish) */ + {"iso8859-10",0,256,0,iso8859_10,0,0,0}, /* Latin 6 (Nordic) */ + {"iso8859-15",iso8859_15_aliases,256,0,iso8859_15,0,0,0}, /* Latin 9 */ + {"koi8-r",0,256,0,koi8_r,0,0,0}, /* Russian */ + {"koi8-ru",0,256,0,koi8_ru,0,0,0}, /* Ukrainian */ + {"koi8-uni",0,256,0,koi8_uni,0,0,0}, /* Russian/Ukrainian/Bielorussian */ + {"koi8-e",0,256,0,koi8_e,0,0,0}, /* ``European'' */ + {"koi8-u",0,256,0,koi8_u,0,0,0}, /* Ukrainian too */ + {"microsoft-symbol",0,256,0,microsoft_symbol,0,0,0}, + {"apple-roman",0,256,0,apple_roman,0,0,0}, + {0,0,0,0,0,0,0} }; -static struct font_encoding *font_encodings=NULL; +static FontEncPtr font_encodings=NULL; static void define_initial_encoding_info(void) { - struct font_encoding *encoding; - struct font_encoding_mapping *mapping; + FontEncPtr encoding; + FontMapPtr mapping; - font_encodings=initial_encodings; - for(encoding=font_encodings; ; encoding++) { - encoding->next=encoding+1; - for(mapping=encoding->mappings; ; mapping++) { - mapping->next=mapping+1; - if(mapping->next->type==0) { - mapping->next=NULL; - break; - } - } - if(!encoding->next->name) { - encoding->next=NULL; - break; + font_encodings = initial_encodings; + for(encoding = font_encodings; ; encoding++) { + encoding->next = encoding + 1; + for(mapping = encoding->mappings; ; mapping++) { + mapping->next = mapping+1; + mapping->encoding = encoding; + if(mapping->next->type == 0) { + mapping->next = NULL; + break; + } + } + if(!encoding->next->name) { + encoding->next = NULL; + break; + } } - } } char* -font_encoding_from_xlfd(const char *name, int length) +FontEncFromXLFD(const char *name, int length) { - const char *p; - char *q; - static char charset[256]; - int len; - - if(name==0) - p=0; - else { - p=name+length-1; - while(p>name && *p!='-') - p--; - p--; - while(p>=name && *p!='-') - p--; - if(p<=name) - p=0; - } - - /* now p either is null or points at the '-' before the charset registry */ + const char *p; + char *q; + static char charset[MAXFONTNAMELEN]; + int len; - if(p==0) - return 0; - - len=length-(p-name)-1; - memcpy(charset,p+1,len); - charset[len]=0; + if(length > MAXFONTNAMELEN - 1) + return 0; - /* check for a subset specification */ - if((q=strchr(charset,(int)'['))) - *q=0; + if(name == NULL) + p = NULL; + else { + p = name + length - 1; + while(p > name && *p != '-') + p--; + p--; + while(p >= name && *p != '-') + p--; + if(p <= name) + p = 0; + } - return charset; + /* now p either is null or points at the '-' before the charset registry */ + + if(p == 0) + return 0; + + len = length - (p - name) - 1; + memcpy(charset, p+1, len); + charset[len] = 0; + + /* check for a subset specification */ + if((q = strchr(charset, (int)'['))) + *q = 0; + + return charset; } unsigned -font_encoding_recode(unsigned code, - struct font_encoding *encoding, - struct font_encoding_mapping *mapping) -{ - if(mapping->recode) { - if(encoding->row_size==0) { - /* linear encoding */ - if(code < encoding->first || code>=encoding->size) - return 0; - } else { - /* matrix encoding */ - int row=code/0x100, col=code&0xFF; - if(row < encoding->first || row >= encoding->size || - col < encoding->first_col || col >= encoding->row_size) - return 0; - } - return (*mapping->recode)(code, mapping->client_data); - } else - return code; +FontEncRecode(unsigned code, FontMapPtr mapping) +{ + FontEncPtr encoding = mapping->encoding; + if(encoding && mapping->recode) { + if(encoding->row_size == 0) { + /* linear encoding */ + if(code < encoding->first || code>=encoding->size) + return 0; + } else { + /* matrix encoding */ + int row = code/0x100, col = code&0xFF; + if(row < encoding->first || row >= encoding->size || + col < encoding->first_col || col >= encoding->row_size) + return 0; + } + return (*mapping->recode)(code, mapping->client_data); + } else + return code; } char* -font_encoding_name(unsigned code, - struct font_encoding *encoding, - struct font_encoding_mapping *mapping) -{ - if(mapping->name) { - if((encoding->row_size==0 && code>=encoding->size) || - (encoding->row_size!=0 && - (code/0x100>=encoding->size || ((code&0xFF)>=encoding->row_size)))) - return 0; - return (*mapping->name)(code, mapping->client_data); - } else - return 0; -} - -struct font_encoding * -font_encoding_find(const char *encoding_name, const char *filename) -{ - struct font_encoding *encoding; - char **alias; - - if(font_encodings==NULL) define_initial_encoding_info(); - - for(encoding=font_encodings; encoding; encoding=encoding->next) { - if(!strcasecmp(encoding->name, encoding_name)) - return encoding; - if(encoding->aliases) - for(alias=encoding->aliases; *alias; alias++) - if(!strcasecmp(*alias, encoding_name)) - return encoding; +FontEncName(unsigned code, FontMapPtr mapping) +{ + FontEncPtr encoding = mapping->encoding; + if(encoding && mapping->name) { + if((encoding->row_size == 0 && code >= encoding->size) || + (encoding->row_size != 0 && + (code/0x100 >= encoding->size || + (code&0xFF) >= encoding->row_size))) + return 0; + return (*mapping->name)(code, mapping->client_data); + } else + return 0; +} + +FontEncPtr +FontEncFind(const char *encoding_name, const char *filename) +{ + FontEncPtr encoding; + char **alias; + + if(font_encodings == NULL) define_initial_encoding_info(); + + for(encoding = font_encodings; encoding; encoding = encoding->next) { + if(!strcasecmp(encoding->name, encoding_name)) + return encoding; + if(encoding->aliases) + for(alias=encoding->aliases; *alias; alias++) + if(!strcasecmp(*alias, encoding_name)) + return encoding; } /* Unknown charset, try to load a definition file */ - return loadEncoding(encoding_name, filename); + return FontEncLoad(encoding_name, filename); } - -struct font_encoding* -loadEncoding(const char *encoding_name, const char *filename) +FontMapPtr +FontMapFind(FontEncPtr encoding, int type, int pid, int eid) { - struct font_encoding *encoding; - - if((encoding=loadEncodingFile(encoding_name, filename))==NULL) { - return 0; - } else { - char **alias; - int found = 0; + FontMapPtr mapping; + if(encoding == NULL) + return NULL; - /* Check whether the name is already known for this encoding */ - if(strcasecmp(encoding->name, encoding_name) == 0) { - found = 1; - } else { - if(encoding->aliases) - for(alias=encoding->aliases; *alias; alias++) - if(!strcasecmp(*alias, encoding_name)) { - found = 1; - break; - } + for(mapping = encoding->mappings; mapping; mapping = mapping->next) { + if(mapping->type != type) + continue; + if(pid > 0 && mapping->pid != pid) + continue; + if(eid > 0 && mapping->eid != eid) + continue; + return mapping; } + return NULL; +} - if(!found) { - /* Add a new alias. This works because the encoding has been - allocated dynamically */ - char **new_aliases; - char *new_name; - int numaliases = 0; +FontMapPtr +FontEncMapFind(const char *encoding_name, int type, int pid, int eid, + const char *filename) +{ + FontEncPtr encoding; + FontMapPtr mapping; - new_name = xalloc(strlen(encoding_name) + 1); - if(new_name == NULL) + encoding = FontEncFind(encoding_name, filename); + if(encoding == NULL) return NULL; - strcpy(new_name, encoding_name); - if(encoding->aliases) - for(alias = encoding->aliases; *alias; alias++) - numaliases++; - new_aliases = (char**)xalloc((numaliases+2)*sizeof(char*)); - if(new_aliases == NULL) { - xfree(new_name); - return NULL; - } - if(numaliases) - memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); - new_aliases[numaliases] = new_name; - new_aliases[numaliases+1] = NULL; - if(encoding->aliases) - xfree(encoding->aliases); - encoding->aliases = new_aliases; - } - - /* register the new encoding */ - encoding->next=font_encodings; - font_encodings=encoding; + mapping = FontMapFind(encoding, type, pid, eid); + return mapping; +} - return encoding; - } +static FontEncPtr +FontEncLoad(const char *encoding_name, const char *filename) +{ + FontEncPtr encoding; + + encoding = FontEncReallyLoad(encoding_name, filename); + if (encoding == NULL) { + return 0; + } else { + char **alias; + int found = 0; + + /* Check whether the name is already known for this encoding */ + if(strcasecmp(encoding->name, encoding_name) == 0) { + found = 1; + } else { + for(alias=encoding->aliases; *alias; alias++) + if(!strcasecmp(*alias, encoding_name)) { + found = 1; + break; + } + } + + if(!found) { + /* Add a new alias. This works because we know that this + particular encoding has been allocated dynamically */ + char **new_aliases; + char *new_name; + int numaliases = 0; + + new_name = xalloc(strlen(encoding_name) + 1); + if(new_name == NULL) + return NULL; + strcpy(new_name, encoding_name); + for(alias = encoding->aliases; *alias; alias++) + numaliases++; + new_aliases = (char**)xalloc((numaliases+2)*sizeof(char*)); + if(new_aliases == NULL) { + xfree(new_name); + return NULL; + } + memcpy(new_aliases, encoding->aliases, numaliases*sizeof(char*)); + new_aliases[numaliases] = new_name; + new_aliases[numaliases+1] = NULL; + xfree(encoding->aliases); + encoding->aliases = new_aliases; + } + + /* register the new encoding */ + encoding->next=font_encodings; + font_encodings=encoding; + + return encoding; + } } unsigned -font_encoding_simple_recode(unsigned code, void *client_data) +FontEncSimpleRecode(unsigned code, void *client_data) { - struct font_encoding_simple_mapping *map; - unsigned index; + FontEncSimpleMapPtr map; + unsigned index; - map=client_data; + map = client_data; - if(code>0xFFFF || (map->row_size && (code&0xFF)>=map->row_size)) - return 0; + if(code > 0xFFFF || (map->row_size && (code&0xFF) >= map->row_size)) + return 0; - if(map->row_size) - index=(code&0xFF)+(code>>8)*map->row_size; - else - index=code; + if(map->row_size) + index = (code&0xFF)+(code>>8)*map->row_size; + else + index = code; if(map->map && index>=map->first && indexfirst+map->len) return map->map[index-map->first]; @@ -764,27 +808,134 @@ } char * -font_encoding_simple_name(unsigned code, void *client_data) +FontEncSimpleName(unsigned code, void *client_data) { - struct font_encoding_simple_naming *map; + FontEncSimpleNamePtr map; - map=client_data; - if(map && code>=map->first && codefirst+map->len) - return map->map[code-map->first]; - else - return NULL; + map = client_data; + if(map && code >= map->first && codefirst+map->len) + return map->map[code-map->first]; + else + return NULL; } unsigned -font_encoding_undefined_recode(unsigned code, void *client_data) +FontEncUndefinedRecode(unsigned code, void *client_data) { - return code; + return code; } char * -font_encoding_undefined_name(unsigned code, void *client_data) +FontEncUndefinedName(unsigned code, void *client_data) +{ + return NULL; +} + +#define FONTENC_SEGMENT_SIZE 256 +#define FONTENC_SEGMENTS 256 +#define FONTENC_INVERSE_CODES (FONTENC_SEGMENT_SIZE * FONTENC_SEGMENTS) + +static unsigned int +reverse_reverse(unsigned i, void* data) +{ + int s, j; + unsigned **map = (unsigned**)data; + + if(i >= FONTENC_INVERSE_CODES) + return 0; + + if(map == NULL) + return 0; + + s = i / FONTENC_SEGMENT_SIZE; + j = i % FONTENC_SEGMENT_SIZE; + + if(map[s] == NULL) + return 0; + else + return map[s][j]; +} + +static int +tree_set(unsigned int **map, unsigned int i, unsigned int j) +{ + int s, c; + + if(i >= FONTENC_INVERSE_CODES) + return FALSE; + + s = i / FONTENC_SEGMENT_SIZE; + c = i % FONTENC_SEGMENT_SIZE; + + if(map[s] == NULL) { + map[s] = calloc(FONTENC_SEGMENT_SIZE, sizeof(int)); + if(map[s] == NULL) + return FALSE; + } + + map[s][c] = j; + return TRUE; +} + +FontMapReversePtr +FontMapReverse(FontMapPtr mapping) { - return NULL; + FontEncPtr encoding = mapping->encoding; + FontMapReversePtr reverse = NULL; + unsigned int **map = NULL; + int i, j, k; + + if(encoding == NULL) goto bail; + + map = calloc(FONTENC_SEGMENTS, sizeof(int*)); + if(map == NULL) goto bail; + + if(encoding->row_size == 0) { + for(i = encoding->first; i < encoding->size; i++) { + k = FontEncRecode(i, mapping); + if(k != 0) + if(!tree_set(map, k, i)) + goto bail; + } + } else { + for(i = encoding->first; i < encoding->size; i++) { + for(j = encoding->first_col; j < encoding->row_size; j++) { + k = FontEncRecode(i*256 + j, mapping); + if(k != 0) + if(!tree_set(map, k, i*256+j)) + goto bail; + } + } + } + + reverse = malloc(sizeof(FontMapReverseRec)); + if(!reverse) goto bail; + + reverse->reverse = reverse_reverse; + reverse->data = map; + return reverse; + + bail: + if(map) + xfree(map); + if(reverse) + xfree(reverse); + return NULL; } +void +FontMapReverseFree(FontMapReversePtr delendum) +{ + unsigned int **map = (unsigned int**)delendum; + int i; + + if(map == NULL) + return; + + for(i = 0; i < FONTENC_SEGMENTS; i++) + if(map[i] != NULL) + xfree(map[i]); + xfree(map); + return; +} Index: xc/lib/font/fontfile/fontencI.h diff -u xc/lib/font/fontfile/fontencI.h:1.3 xc/lib/font/fontfile/fontencI.h:1.4 --- xc/lib/font/fontfile/fontencI.h:1.3 Sun Apr 25 06:01:43 1999 +++ xc/lib/font/fontfile/fontencI.h Mon Aug 13 17:46:47 2001 @@ -1,5 +1,5 @@ /* -Copyright (c) 1998 by Juliusz Chroboczek +Copyright (c) 1998-2001 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,27 +20,27 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/fontencI.h,v 1.3 1999/04/25 10:01:43 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontencI.h,v 1.4 2001/08/13 21:46:47 dawes Exp $ */ /* Private types and functions for the encoding code. */ /* Used by the files `fontenc.h' and `encparse.h' */ -struct font_encoding_simple_mapping { - unsigned len; /* might be 0x10000 */ - unsigned short row_size; - unsigned short first; - unsigned short *map; -}; - -struct font_encoding_simple_naming { - unsigned len; - unsigned short first; - char **map; -}; - -unsigned font_encoding_simple_recode(unsigned, void*); -unsigned font_encoding_undefined_recode(unsigned, void*); -char *font_encoding_simple_name(unsigned, void*); -char *font_encoding_undefined_name(unsigned, void*); +typedef struct _FontEncSimpleMap { + unsigned len; /* might be 0x10000 */ + unsigned short row_size; + unsigned short first; + unsigned short *map; +} FontEncSimpleMapRec, *FontEncSimpleMapPtr; + +typedef struct _FontEncSimpleName { + unsigned len; + unsigned short first; + char **map; +} FontEncSimpleNameRec, *FontEncSimpleNamePtr; + +unsigned FontEncSimpleRecode(unsigned, void*); +unsigned FontEncUndefinedRecode(unsigned, void*); +char *FontEncSimpleName(unsigned, void*); +char *FontEncUndefinedName(unsigned, void*); -struct font_encoding* loadEncodingFile(const char*, const char*); +FontEncPtr FontEncReallyLoad(const char*, const char*); Index: xc/lib/font/fontfile/fontencc.c diff -u /dev/null xc/lib/font/fontfile/fontencc.c:1.2 --- /dev/null Fri Jan 18 15:23:47 2002 +++ xc/lib/font/fontfile/fontencc.c Thu Aug 16 10:33:46 2001 @@ -0,0 +1,74 @@ +/* +Copyright (c) 1998-2001 by Juliusz Chroboczek + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +/* $XFree86: xc/lib/font/fontfile/fontencc.c,v 1.2 2001/08/16 14:33:46 dawes Exp $ */ + +/* Binary compatibility code. */ + +/* This file includes code to make modules compiled for earlier + versions of the fontenc interfaces link with this one. It does + *not* provide source compatibility, as many of the data structures + now have different names. */ + +#include "fontenc.h" +#include "fontencc.h" + +extern void ErrorF(const char *f, ...); + +char * +font_encoding_from_xlfd(const char * name, int length) +{ + return FontEncFromXLFD(name, length); +} + +FontEncPtr +font_encoding_find(const char *encoding_name, const char *filename) +{ + return FontEncFind(encoding_name, filename); +} + +unsigned +font_encoding_recode(unsigned code, + FontEncPtr encoding, FontMapPtr mapping) +{ + if(encoding != mapping->encoding) { + ErrorF("Inconsistent mapping/encoding\n"); + return 0; + } + return FontEncRecode(code, mapping); +} + +char * +font_encoding_name(unsigned code, + FontEncPtr encoding, FontMapPtr mapping) +{ + if(encoding != mapping->encoding) { + ErrorF("Inconsistent mapping/encoding\n"); + return 0; + } + return FontEncName(code, mapping); +} + +char ** +identifyEncodingFile(const char *filename) +{ + return FontEncIdentify(filename); +} Index: xc/lib/font/fontfile/fontfile.c diff -u xc/lib/font/fontfile/fontfile.c:3.14 xc/lib/font/fontfile/fontfile.c:3.15 --- xc/lib/font/fontfile/fontfile.c:3.14 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/fontfile.c Fri Dec 14 14:56:51 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontfile.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: fontfile.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.14 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.15 2001/12/14 19:56:51 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/fontscale.c diff -u xc/lib/font/fontfile/fontscale.c:3.8 xc/lib/font/fontfile/fontscale.c:3.10 --- xc/lib/font/fontfile/fontscale.c:3.8 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/fontscale.c Fri Dec 14 14:56:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontscale.c,v 1.4 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: fontscale.c,v 1.5 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/fontscale.c,v 3.8 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontscale.c,v 3.10 2001/12/14 19:56:52 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -360,13 +364,13 @@ a->y == b->y && (a->width == b->width || a->width == 0 || b->width == 0 || b->width == -1) && (!(b->values_supplied & PIXELSIZE_MASK) || - (a->values_supplied & PIXELSIZE_MASK) == - (b->values_supplied & PIXELSIZE_MASK) && - EQUAL(a->pixel_matrix, b->pixel_matrix)) && + ((a->values_supplied & PIXELSIZE_MASK) == + (b->values_supplied & PIXELSIZE_MASK) && + EQUAL(a->pixel_matrix, b->pixel_matrix))) && (!(b->values_supplied & POINTSIZE_MASK) || - (a->values_supplied & POINTSIZE_MASK) == - (b->values_supplied & POINTSIZE_MASK) && - EQUAL(a->point_matrix, b->point_matrix)) && + ((a->values_supplied & POINTSIZE_MASK) == + (b->values_supplied & POINTSIZE_MASK) && + EQUAL(a->point_matrix, b->point_matrix))) && (a->nranges == 0 || a->nranges == b->nranges))) return FALSE; Index: xc/lib/font/fontfile/printerfont.c diff -u xc/lib/font/fontfile/printerfont.c:1.4 xc/lib/font/fontfile/printerfont.c:1.5 --- xc/lib/font/fontfile/printerfont.c:1.4 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/printerfont.c Fri Dec 14 14:56:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: printerfont.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: printerfont.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/printerfont.c,v 1.4 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/printerfont.c,v 1.5 2001/12/14 19:56:52 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/fontfile/register.c diff -u xc/lib/font/fontfile/register.c:1.14 xc/lib/font/fontfile/register.c:1.15 --- xc/lib/font/fontfile/register.c:1.14 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/register.c Fri Dec 14 14:56:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: register.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: register.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/register.c,v 1.14 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/register.c,v 1.15 2001/12/14 19:56:52 dawes Exp $ */ /* * This is in a separate source file so that small programs Index: xc/lib/font/fontfile/renderers.c diff -u xc/lib/font/fontfile/renderers.c:1.3 xc/lib/font/fontfile/renderers.c:1.4 --- xc/lib/font/fontfile/renderers.c:1.3 Wed Jan 17 14:43:30 2001 +++ xc/lib/font/fontfile/renderers.c Fri Dec 14 14:56:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: renderers.c,v 1.3 2000/08/17 19:46:37 cpqbld Exp $ */ +/* $Xorg: renderers.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/fontfile/renderers.c,v 1.3 2001/01/17 19:43:30 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/renderers.c,v 1.4 2001/12/14 19:56:52 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/include/bitmap.h diff -u xc/lib/font/include/bitmap.h:1.9 xc/lib/font/include/bitmap.h:1.10 --- xc/lib/font/include/bitmap.h:1.9 Wed Jan 17 14:43:31 2001 +++ xc/lib/font/include/bitmap.h Fri Dec 14 14:56:53 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bitmap.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: bitmap.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/include/bitmap.h,v 1.9 2001/01/17 19:43:31 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/bitmap.h,v 1.10 2001/12/14 19:56:53 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/include/bufio.h diff -u xc/lib/font/include/bufio.h:1.5 xc/lib/font/include/bufio.h:1.7 --- xc/lib/font/include/bufio.h:1.5 Wed Jan 17 14:43:31 2001 +++ xc/lib/font/include/bufio.h Fri Dec 14 14:56:53 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bufio.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: bufio.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/include/bufio.h,v 1.5 2001/01/17 19:43:31 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/bufio.h,v 1.7 2001/12/14 19:56:53 dawes Exp $ */ #ifndef ___BUFIO_H___ #define ___BUFIO_H___ 1 @@ -74,7 +78,7 @@ extern void BufFileFree ( BufFilePtr ); #define BufFileGet(f) ((f)->left-- ? *(f)->bufp++ : ((f)->eof = (*(f)->input) (f))) -#define BufFilePut(c,f) (--(f)->left ? *(f)->bufp++ = (c) : (*(f)->output) (c,f)) +#define BufFilePut(c,f) (--(f)->left ? *(f)->bufp++ = ((unsigned char)(c)) : (*(f)->output) ((unsigned char)(c),f)) #define BufFileSkip(f,c) ((f)->eof = (*(f)->skip) (f, c)) #ifndef TRUE Index: xc/lib/font/include/fntfil.h diff -u xc/lib/font/include/fntfil.h:1.7 xc/lib/font/include/fntfil.h:1.9 --- xc/lib/font/include/fntfil.h:1.7 Thu Apr 5 13:42:28 2001 +++ xc/lib/font/include/fntfil.h Fri Dec 14 14:56:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fntfil.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: fntfil.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfil.h,v 1.7 2001/04/05 17:42:28 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfil.h,v 1.9 2001/12/14 19:56:54 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -29,6 +33,9 @@ #ifndef _FONTFILE_H_ #define _FONTFILE_H_ + +#include "fontxlfd.h" + typedef struct _FontEntry *FontEntryPtr; typedef struct _FontTable *FontTablePtr; typedef struct _FontName *FontNamePtr; Index: xc/lib/font/include/fntfilio.h diff -u xc/lib/font/include/fntfilio.h:1.4 xc/lib/font/include/fntfilio.h:1.7 --- xc/lib/font/include/fntfilio.h:1.4 Wed Jan 17 14:43:32 2001 +++ xc/lib/font/include/fntfilio.h Fri Dec 14 14:56:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fntfilio.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: fntfilio.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,14 +25,17 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfilio.h,v 1.4 2001/01/17 19:43:32 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfilio.h,v 1.7 2001/12/14 19:56:54 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium */ -#include +#ifndef _FNTFILIO_H_ +#define _FNTFILIO_H_ +#include "bufio.h" + typedef BufFilePtr FontFilePtr; #define FontFileGetc(f) BufFileGet(f) @@ -45,3 +52,5 @@ extern FontFilePtr FontFileOpenWrite ( const char *name ); extern FontFilePtr FontFileOpenWriteFd ( int fd ); extern FontFilePtr FontFileOpenFd ( int fd ); + +#endif /* _FNTFILIO_H_ */ Index: xc/lib/font/include/fntfilst.h diff -u xc/lib/font/include/fntfilst.h:3.6 xc/lib/font/include/fntfilst.h:3.7 --- xc/lib/font/include/fntfilst.h:3.6 Wed Jan 17 14:43:32 2001 +++ xc/lib/font/include/fntfilst.h Fri Dec 14 14:56:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fntfilst.h,v 1.4 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: fntfilst.h,v 1.5 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.6 2001/01/17 19:43:32 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fntfilst.h,v 3.7 2001/12/14 19:56:54 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/include/fontenc.h diff -u xc/lib/font/include/fontenc.h:1.7 xc/lib/font/include/fontenc.h:1.8 --- xc/lib/font/include/fontenc.h:1.7 Tue Nov 14 11:54:45 2000 +++ xc/lib/font/include/fontenc.h Mon Aug 13 17:46:48 2001 @@ -1,5 +1,5 @@ /* -Copyright (c) 1998-2000 by Juliusz Chroboczek +Copyright (c) 1998-2001 by Juliusz Chroboczek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,83 +20,105 @@ THE SOFTWARE. */ -/* $XFree86: xc/lib/font/include/fontenc.h,v 1.7 2000/11/14 16:54:45 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fontenc.h,v 1.8 2001/08/13 21:46:48 dawes Exp $ */ /* Header for backend-independent encoding code */ /* An encoding is identified with a name. An encoding contains some - * global encoding data, such as its size, and a set of mappings. - * Mappings are identified with their type and two integers, known as - * pid and eid, the interpretation of which is type dependent. */ + global encoding data, such as its size, and a set of mappings. + Mappings are identified by their type and two integers, known as + pid and eid, the interpretation of which is type dependent. */ #ifndef _FONTENC_H #define _FONTENC_H -/* Encoding types. For future extensions, backends should be prepared - * to ignore unknown encoding types. */ -/* None of those should be 0 (used internally) */ +/* Encoding types. For future extensions, clients should be prepared + to ignore unknown encoding types. */ +/* 0 is treated specially. */ + #define FONT_ENCODING_UNICODE 1 #define FONT_ENCODING_TRUETYPE 2 #define FONT_ENCODING_POSTSCRIPT 3 /* This structure represents a mapping, either from numeric codes from - * numeric codes, or from numeric codes to strings. */ + numeric codes, or from numeric codes to strings. */ /* It is expected that only one of `recode' and `name' will actually - * be present. However, having both fields simplifies the interface - * somewhat. */ + be present. However, having both fields simplifies the interface + somewhat. */ -struct font_encoding_mapping { - int type; /* the type of the mapping */ - int pid, eid; /* the identification of the mapping */ - unsigned (*recode)(unsigned, void*); /* mapping function */ - char *(*name)(unsigned, void*); /* function returning glyph names */ - void *client_data; /* second parameter of the two above */ - struct font_encoding_mapping *next; /* link to next element in list */ -}; +typedef struct _FontMap { + int type; /* the type of the mapping */ + int pid, eid; /* the identification of the mapping */ + unsigned (*recode)(unsigned, void*); /* mapping function */ + char *(*name)(unsigned, void*); /* function returning glyph names */ + void *client_data; /* second parameter of the two above */ + struct _FontMap *next; /* link to next element in list */ + /* The following was added for version 0.3 of the font interface. */ + /* It should be kept at the end to preserve binary compatibility. */ + struct _FontEnc *encoding; +} FontMapRec, *FontMapPtr; /* This is the structure that holds all the info for one encoding. It - * consists of a charset name, its size, and a linked list of mappings - * like above. */ + consists of a charset name, its size, and a linked list of mappings + like above. */ -struct font_encoding { - char *name; /* the name of the encoding */ - char **aliases; /* its aliases, null terminated */ - int size; /* its size, either in bytes or rows */ - int row_size; /* the size of a row, or 0 if bytes */ - struct font_encoding_mapping *mappings; /* linked list of mappings */ - struct font_encoding *next; /* link to next element */ - /* the following two were added in version 0.2 of the font interface */ - /* they should be kept at the end to preserve binary compatibility */ - int first; /* first byte or row */ - int first_col; /* first column in each row */ -}; +typedef struct _FontEnc { + char *name; /* the name of the encoding */ + char **aliases; /* its aliases, null terminated */ + int size; /* its size, either in bytes or rows */ + int row_size; /* the size of a row, or 0 if bytes */ + FontMapPtr mappings; /* linked list of mappings */ + struct _FontEnc *next; /* link to next element */ + /* the following two were added in version 0.2 of the font interface */ + /* they should be kept at the end to preserve binary compatibility */ + int first; /* first byte or row */ + int first_col; /* first column in each row */ +} FontEncRec, *FontEncPtr; + +typedef struct _FontMapReverse { + unsigned int (*reverse)(unsigned, void*); + void *data; +} FontMapReverseRec, *FontMapReversePtr; /* Function prototypes */ /* extract an encoding name from an XLFD name. Returns a pointer to a - * *static* buffer, or NULL */ -char *font_encoding_from_xlfd(const char*, int); + *static* buffer, or NULL */ +char *FontEncFromXLFD(const char*, int); /* find the encoding data for a given encoding name; second parameter - * is the filename of the font for which the encoding is needed. - * Returns NULL on failure. */ -struct font_encoding *font_encoding_find(const char*, const char*); + is the filename of the font for which the encoding is needed. + Returns NULL on failure. */ +FontEncPtr FontEncFind(const char*, const char*); + +/* Find a given mapping for an encoding. This is only a convenience + function, as clients are allowed to scavenge the data structures + themselves (as the TrueType backend does). */ + +FontMapPtr FontMapFind(FontEncPtr, int, int, int); + +/* Do both in a single step */ +FontMapPtr FontEncMapFind(const char *, int, int, int, const char *); /* Recode a code. Always succeeds. */ -unsigned font_encoding_recode(unsigned, - struct font_encoding*, - struct font_encoding_mapping*); +unsigned FontEncRecode(unsigned, FontMapPtr); /* Return a name for a code. Returns a string or NULL. */ -char *font_encoding_name(unsigned, - struct font_encoding*, - struct font_encoding_mapping*); +char *FontEncName(unsigned, FontMapPtr); +/* Return a pointer to the name of the system encodings directory. */ +/* This string is static and should not be modified. */ +char* FontEncDirectory(void); + /* Identify an encoding file. If fileName doesn't exist, or is not an encoding file, return NULL, otherwise returns a NULL-terminated array of strings. */ -char **identifyEncodingFile(const char *fileName); +char **FontEncIdentify(const char *fileName); + +FontMapReversePtr FontMapReverse(FontMapPtr); + +void FontMapReverseFree(FontMapReversePtr); #endif Index: xc/lib/font/include/fontencc.h diff -u /dev/null xc/lib/font/include/fontencc.h:1.1 --- /dev/null Fri Jan 18 15:23:47 2002 +++ xc/lib/font/include/fontencc.h Thu Aug 16 10:33:47 2001 @@ -0,0 +1,36 @@ +/* +Copyright (c) 1998-2001 by Juliusz Chroboczek + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +/* $XFree86: xc/lib/font/include/fontencc.h,v 1.1 2001/08/16 14:33:47 dawes Exp $ */ + +/* Binary compatibility entry points. */ + +/* This file includes code to make modules compiled for earlier + versions of the fontenc interfaces link with this one. It does + *not* provide source compatibility, as many of the data structures + now have different names. */ + +extern char *font_encoding_from_xlfd(const char*, int); +extern unsigned font_encoding_recode(unsigned, FontEncPtr, FontMapPtr); +extern FontEncPtr font_encoding_find(const char*, const char*); +extern char *font_encoding_name(unsigned, FontEncPtr, FontMapPtr); +extern char **identifyEncodingFile(const char *fileName); + Index: xc/lib/font/include/fontmisc.h diff -u xc/lib/font/include/fontmisc.h:3.13 xc/lib/font/include/fontmisc.h:3.16 --- xc/lib/font/include/fontmisc.h:3.13 Wed Jan 17 14:43:32 2001 +++ xc/lib/font/include/fontmisc.h Fri Dec 14 14:56:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontmisc.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: fontmisc.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.13 2001/01/17 19:43:32 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fontmisc.h,v 3.16 2001/12/14 19:56:54 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -32,12 +36,7 @@ #ifndef FONTMODULE #include - -#ifndef X_NOT_STDC_ENV #include -#else -extern int rand(); -#endif #include #ifndef X_NOT_POSIX @@ -69,10 +68,12 @@ extern int ValidAtom ( Atom atom ); extern char *NameForAtom (Atom atom); +#ifndef OS_H extern pointer Xalloc(unsigned long); extern pointer Xrealloc(pointer, unsigned long); extern void Xfree(pointer); extern pointer Xcalloc(unsigned long); +#endif extern int f_strcasecmp(const char *s1, const char *s2); #ifndef xalloc Index: xc/lib/font/include/fontshow.h diff -u xc/lib/font/include/fontshow.h:1.1.1.3 xc/lib/font/include/fontshow.h:1.2 --- xc/lib/font/include/fontshow.h:1.1.1.3 Tue Jan 16 17:27:04 2001 +++ xc/lib/font/include/fontshow.h Fri Dec 14 14:56:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontshow.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: fontshow.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/font/include/fontxlfd.h diff -u xc/lib/font/include/fontxlfd.h:1.5 xc/lib/font/include/fontxlfd.h:1.6 --- xc/lib/font/include/fontxlfd.h:1.5 Wed Jan 17 14:43:32 2001 +++ xc/lib/font/include/fontxlfd.h Fri Dec 14 14:56:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontxlfd.h,v 1.3 2000/08/17 19:46:38 cpqbld Exp $ */ +/* $Xorg: fontxlfd.h,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.5 2001/01/17 19:43:32 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.6 2001/12/14 19:56:55 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/atom.c diff -u xc/lib/font/util/atom.c:1.4 xc/lib/font/util/atom.c:1.7 --- xc/lib/font/util/atom.c:1.4 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/atom.c Fri Dec 14 14:56:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: atom.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: atom.c,v 1.5 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/atom.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/atom.c,v 1.7 2001/12/14 19:56:55 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -77,8 +81,10 @@ else newHashSize = hashSize * 2; newHashTable = (AtomListPtr *) xalloc (newHashSize * sizeof (AtomListPtr)); - if (!newHashTable) + if (!newHashTable) { + fprintf(stderr, "ResizeHashTable(): Error: Couldn't allocate newHashTable (%d)\n", newHashSize * sizeof (AtomListPtr)); return FALSE; + } bzero ((char *) newHashTable, newHashSize * sizeof (AtomListPtr)); newHashMask = newHashSize - 1; newRehash = (newHashMask - 2); @@ -116,8 +122,10 @@ else reverseMapSize *= 2; reverseMap = (AtomListPtr *) xrealloc (reverseMap, reverseMapSize * sizeof (AtomListPtr)); - if (!reverseMap) + if (!reverseMap) { + fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate reverseMap (%d)\n", reverseMapSize * sizeof(AtomListPtr)); ret = FALSE; + } return ret; } @@ -135,7 +143,7 @@ { AtomListPtr a; int hash; - int h; + int h = 0; int r; hash = Hash (string, len); @@ -168,6 +176,10 @@ if (!makeit) return None; a = (AtomListPtr) xalloc (sizeof (AtomListRec) + len + 1); + if (a == NULL) { + fprintf(stderr, "MakeAtom(): Error: Couldn't allocate AtomListRec (%d)\n", sizeof (AtomListRec) + len + 1); + return None; + } a->name = (char *) (a + 1); a->len = len; strncpy (a->name, string, len); Index: xc/lib/font/util/fontaccel.c diff -u xc/lib/font/util/fontaccel.c:1.6 xc/lib/font/util/fontaccel.c:1.7 --- xc/lib/font/util/fontaccel.c:1.6 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/fontaccel.c Fri Dec 14 14:56:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontaccel.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: fontaccel.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontaccel.c,v 1.6 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontaccel.c,v 1.7 2001/12/14 19:56:56 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/fontnames.c diff -u xc/lib/font/util/fontnames.c:1.4 xc/lib/font/util/fontnames.c:1.5 --- xc/lib/font/util/fontnames.c:1.4 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/fontnames.c Fri Dec 14 14:56:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontnames.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: fontnames.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontnames.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontnames.c,v 1.5 2001/12/14 19:56:56 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/fontutil.c diff -u xc/lib/font/util/fontutil.c:3.5 xc/lib/font/util/fontutil.c:3.7 --- xc/lib/font/util/fontutil.c:3.5 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/fontutil.c Fri Dec 14 14:56:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontutil.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: fontutil.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontutil.c,v 3.5 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontutil.c,v 3.7 2001/12/14 19:56:56 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -230,8 +234,8 @@ { int first, last, middle; unsigned long keymin, keymax; - unsigned long ptrmin, ptrmax; - fsRange *ptr, *ptr1, *ptr2, *endptr; + unsigned long ptrmin = 0, ptrmax = 0; + fsRange *ptr = NULL, *ptr1, *ptr2, *endptr; /* There are two different ways to treat ranges: @@ -249,7 +253,7 @@ /* If newrange covers multiple rows; break up the rows */ if (!charset_subset && newrange->min_char_high != newrange->max_char_high) { - int i, err; + int i, err = 0; fsRange temprange; for (i = newrange->min_char_high; i <= newrange->max_char_high; Index: xc/lib/font/util/fontxlfd.c diff -u xc/lib/font/util/fontxlfd.c:3.10 xc/lib/font/util/fontxlfd.c:3.13 --- xc/lib/font/util/fontxlfd.c:3.10 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/fontxlfd.c Fri Dec 14 14:56:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fontxlfd.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: fontxlfd.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/fontxlfd.c,v 3.10 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/fontxlfd.c,v 3.13 2001/12/14 19:56:56 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -35,10 +39,8 @@ #include "fontutil.h" #include #include -#if !defined(X_NOT_STDC_ENV) || defined(SCO) #include -#endif -#if defined(X_NOT_STDC_ENV) || (defined(sony) && !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV)) +#if defined(sony) && !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) #define NO_LOCALE #endif #ifndef NO_LOCALE @@ -106,19 +108,9 @@ *p2 = 0; /* Now we have something that strtod() can interpret... do it. */ -#ifndef X_NOT_STDC_ENV *result = strtod(buffer, &p1); /* Return NULL if failure, pointer past number if success */ return (p1 == buffer) ? (char *)0 : (ptr + (p1 - buffer)); -#else - for (p1 = buffer; isspace(*p1); p1++) - ; - if (sscanf(p1, "%lf", result) != 1) - return (char *)0; - while (!isspace(*p1)) - p1++; - return ptr + (p1 - buffer); -#endif } static char * @@ -203,7 +195,8 @@ #if defined(i386) || defined(__i386__) || \ defined(ia64) || defined(__ia64__) || \ - defined(__alpha__) || defined(__alpha) + defined(__alpha__) || defined(__alpha) || \ + defined(__hppa__) #if !defined(__EMX__) #include Index: xc/lib/font/util/format.c diff -u xc/lib/font/util/format.c:1.4 xc/lib/font/util/format.c:1.5 --- xc/lib/font/util/format.c:1.4 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/format.c Fri Dec 14 14:56:57 2001 @@ -1,4 +1,4 @@ -/* $Xorg: format.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: format.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation @@ -27,7 +27,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/format.c,v 1.4 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/format.c,v 1.5 2001/12/14 19:56:57 dawes Exp $ */ #include "FSproto.h" #include "font.h" Index: xc/lib/font/util/miscutil.c diff -u xc/lib/font/util/miscutil.c:1.6 xc/lib/font/util/miscutil.c:1.8 --- xc/lib/font/util/miscutil.c:1.6 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/miscutil.c Fri Dec 14 14:56:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miscutil.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: miscutil.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,14 +27,10 @@ from The Open Group. */ -/* $XFree86: xc/lib/font/util/miscutil.c,v 1.6 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/miscutil.c,v 1.8 2001/12/14 19:56:57 dawes Exp $ */ #include -#ifndef X_NOT_STDC_ENV #include -#else -char *malloc(), *realloc(); -#endif #include "fontmisc.h" #define XK_LATIN1 Index: xc/lib/font/util/patcache.c diff -u xc/lib/font/util/patcache.c:3.4 xc/lib/font/util/patcache.c:3.5 --- xc/lib/font/util/patcache.c:3.4 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/patcache.c Fri Dec 14 14:56:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: patcache.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: patcache.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/patcache.c,v 3.4 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/patcache.c,v 3.5 2001/12/14 19:56:57 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/private.c diff -u xc/lib/font/util/private.c:1.7 xc/lib/font/util/private.c:1.8 --- xc/lib/font/util/private.c:1.7 Wed Jan 17 14:43:33 2001 +++ xc/lib/font/util/private.c Fri Dec 14 14:56:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: private.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: private.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/private.c,v 1.7 2001/01/17 19:43:33 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/private.c,v 1.8 2001/12/14 19:56:57 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/font/util/utilbitmap.c diff -u xc/lib/font/util/utilbitmap.c:1.4 xc/lib/font/util/utilbitmap.c:1.5 --- xc/lib/font/util/utilbitmap.c:1.4 Wed Jan 17 14:43:34 2001 +++ xc/lib/font/util/utilbitmap.c Fri Dec 14 14:56:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: utilbitmap.c,v 1.3 2000/08/17 19:46:39 cpqbld Exp $ */ +/* $Xorg: utilbitmap.c,v 1.4 2001/02/09 02:04:04 xorgcvs Exp $ */ /* Copyright 1990, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/font/util/utilbitmap.c,v 1.4 2001/01/17 19:43:34 dawes Exp $ */ +/* $XFree86: xc/lib/font/util/utilbitmap.c,v 1.5 2001/12/14 19:56:57 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium Index: xc/lib/fontenc/Imakefile diff -u /dev/null xc/lib/fontenc/Imakefile:1.5 --- /dev/null Fri Jan 18 15:23:48 2002 +++ xc/lib/fontenc/Imakefile Thu Nov 15 14:10:04 2001 @@ -0,0 +1,36 @@ +XCOMM $XFree86: xc/lib/fontenc/Imakefile,v 1.5 2001/11/15 19:10:04 dawes Exp $ + + INCLUDES = -I$(FONTINCSRC) -I$(FONTLIBSRC)/include -I$(FONTLIBSRC)/fontfile \ + -I$(XTOP)/include + +FONTENCDEFS = -DFONTENC_NO_LIBFONT \ + -DFONT_ENCODINGS_DIRECTORY=\"$(FONTDIR)/encodings/encodings.dir\" + + DEFINES = StrcasecmpDefines $(FONTENCDEFS) + + SRCS = fontenc.c encparse.c + OBJS = fontenc.o encparse.o + + HEADERS = fontenc.h + +#define DoNormalLib NormalLibFontEnc +#define DoSharedLib SharedLibFontEnc +#define DoDebugLib DebugLibFontEnc +#define DoProfileLib ProfileLibFontEnc +#define LibName fontenc +#define SoRev SOFONTENCREV +#define IncSubdir X11 +#define IncSubSubdir fonts + +#include + +#if GzipFontCompression + REQUIREDLIBS = GzipLibrary +#endif + +LinkSourceFile(fontenc.c,$(FONTLIBSRC)/fontfile) +LinkSourceFile(encparse.c,$(FONTLIBSRC)/fontfile) +LinkSourceFile(fontenc.h,$(FONTLIBSRC)/include) + +DependTarget() + Index: xc/lib/fontenc/fontenc-def.cpp diff -u /dev/null xc/lib/fontenc/fontenc-def.cpp:1.1 --- /dev/null Fri Jan 18 15:23:48 2002 +++ xc/lib/fontenc/fontenc-def.cpp Thu Nov 15 07:56:16 2001 @@ -0,0 +1,19 @@ +/* $XFree86: xc/lib/fontenc/fontenc-def.cpp,v 1.1 2001/11/15 12:56:16 alanh Exp $ */ +LIBRARY fontenc +VERSION LIBRARY_VERSION +EXPORTS + FontEncDirectory + FontEncIdentify + FontEncReallyLoad + FontEncFind + FontEncFromXLFD + FontEncMapFind + FontEncName + FontEncRecode + FontEncSimpleName + FontEncSimpleRecode + FontEncUndefinedName + FontEncUndefinedRecode + FontMapFind + FontMapReverse + FontMapReverseFree Index: xc/lib/freetype2/Imakefile diff -u xc/lib/freetype2/Imakefile:1.4 xc/lib/freetype2/Imakefile:1.6 --- xc/lib/freetype2/Imakefile:1.4 Tue May 15 23:57:27 2001 +++ xc/lib/freetype2/Imakefile Mon Jan 14 12:11:47 2002 @@ -1,7 +1,8 @@ -XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.4 2001/05/16 03:57:27 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/Imakefile,v 1.6 2002/01/14 17:11:47 keithp Exp $ #define IHaveSubdirs #define PassCDebugFlags +#define NoLibSubdirs #define DoNormalLib NormalLibFreetype2 #define DoSharedLib SharedLibFreetype2 @@ -27,6 +28,7 @@ -I$(FREETYPESRC)/cff\ -I$(FREETYPESRC)/psnames\ -I$(FREETYPESRC)/psaux\ + -I$(FREETYPESRC)/pshinter\ -I$(FREETYPESRC)/truetype\ -I$(FREETYPESRC)/type1\ -I$(FREETYPESRC)/cid\ @@ -74,6 +76,9 @@ SRCS_PSAUX = psaux.c OBJS_PSAUX = psaux.o +SRCS_PSHINTER = pshinter.c +OBJS_PSHINTER = pshinter.o + SRCS_TRUETYPE = truetype.c OBJS_TRUETYPE = truetype.o @@ -98,12 +103,12 @@ SRCS = $(SRCS_BASE) $(SRCS_AUTOHINT) $(SRCS_SFNT) $(SRCS_CFF) \ $(SRCS_PSNAMES) $(SRCS_PSAUX) $(SRCS_TRUETYPE) $(SRCS_TYPE1) \ $(SRCS_CID) $(SRCS_RASTER) $(SRCS_SMOOTH) $(SRCS_WINFONTS) \ - $(SRCS_PCF) + $(SRCS_PCF) $(SRCS_PSHINTER) OBJS = $(OBJS_BASE) $(OBJS_AUTOHINT) $(OBJS_SFNT) $(OBJS_CFF) \ $(OBJS_PSNAMES) $(OBJS_PSAUX) $(OBJS_TRUETYPE) $(OBJS_TYPE1) \ $(OBJS_CID) $(OBJS_RASTER) $(OBJS_SMOOTH) $(OBJS_WINFONTS) \ - $(OBJS_PCF) + $(OBJS_PCF) $(OBJS_PSHINTER) #include @@ -137,6 +142,7 @@ LinkSourceFile(cff.c,$(FREETYPESRC)/cff) LinkSourceFile(psnames.c,$(FREETYPESRC)/psnames) LinkSourceFile(psaux.c,$(FREETYPESRC)/psaux) +LinkSourceFile(pshinter.c,$(FREETYPESRC)/pshinter) LinkSourceFile(truetype.c,$(FREETYPESRC)/truetype) LinkSourceFile(type1.c,$(FREETYPESRC)/type1) LinkSourceFile(type1cid.c,$(FREETYPESRC)/cid) Index: xc/lib/freetype2/freetype/Imakefile diff -u xc/lib/freetype2/freetype/Imakefile:1.4 xc/lib/freetype2/freetype/Imakefile:1.7 --- xc/lib/freetype2/freetype/Imakefile:1.4 Tue May 15 23:57:27 2001 +++ xc/lib/freetype2/freetype/Imakefile Mon Jan 14 17:59:06 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.4 2001/05/16 03:57:27 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/Imakefile,v 1.7 2002/01/14 22:59:06 herrb Exp $ #define IHaveSubdirs #define PassCDebugFlags @@ -13,18 +13,22 @@ freetype.h \ ftbbox.h \ ftcache.h \ + ftchapters.h \ fterrors.h \ ftglyph.h \ ftimage.h \ ftlist.h \ ftmac.h \ ftmm.h \ + ftmoderr.h \ ftmodule.h \ ftoutln.h \ ftrender.h \ + ftsizes.h \ ftsnames.h \ ftsynth.h \ ftsystem.h \ + fttrigon.h \ fttypes.h \ t1tables.h \ ttnameid.h \ @@ -37,18 +41,22 @@ LinkSourceFile(freetype.h,$(FREETYPEINC)) LinkSourceFile(ftbbox.h,$(FREETYPEINC)) LinkSourceFile(ftcache.h,$(FREETYPEINC)) +LinkSourceFile(ftchapters.h,$(FREETYPEINC)) LinkSourceFile(fterrors.h,$(FREETYPEINC)) LinkSourceFile(ftglyph.h,$(FREETYPEINC)) LinkSourceFile(ftimage.h,$(FREETYPEINC)) LinkSourceFile(ftlist.h,$(FREETYPEINC)) LinkSourceFile(ftmac.h,$(FREETYPEINC)) LinkSourceFile(ftmm.h,$(FREETYPEINC)) +LinkSourceFile(ftmoderr.h,$(FREETYPEINC)) LinkSourceFile(ftmodule.h,$(FREETYPEINC)) LinkSourceFile(ftoutln.h,$(FREETYPEINC)) LinkSourceFile(ftrender.h,$(FREETYPEINC)) +LinkSourceFile(ftsizes.h,$(FREETYPEINC)) LinkSourceFile(ftsnames.h,$(FREETYPEINC)) LinkSourceFile(ftsynth.h,$(FREETYPEINC)) LinkSourceFile(ftsystem.h,$(FREETYPEINC)) +LinkSourceFile(fttrigon.h,$(FREETYPEINC)) LinkSourceFile(fttypes.h,$(FREETYPEINC)) LinkSourceFile(t1tables.h,$(FREETYPEINC)) LinkSourceFile(ttnameid.h,$(FREETYPEINC)) Index: xc/lib/freetype2/freetype/cache/Imakefile diff -u xc/lib/freetype2/freetype/cache/Imakefile:1.1 xc/lib/freetype2/freetype/cache/Imakefile:1.2 --- xc/lib/freetype2/freetype/cache/Imakefile:1.1 Wed Feb 7 19:55:41 2001 +++ xc/lib/freetype2/freetype/cache/Imakefile Mon Jan 14 17:59:07 2002 @@ -1,11 +1,10 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/cache/Imakefile,v 1.1 2001/02/08 00:55:41 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/cache/Imakefile,v 1.2 2002/01/14 22:59:07 herrb Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src FREETYPEINC = $(FREETYPETOP)/include/freetype HEADERS= \ - ftcchunk.h \ ftcglyph.h \ ftcimage.h \ ftcmanag.h \ @@ -15,7 +14,6 @@ BuildIncludes($(HEADERS),freetype2/freetype/cache,../../..) InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/cache,$(INSTINCFLAGS)) -LinkSourceFile(ftcchunk.h,$(FREETYPEINC)/cache) LinkSourceFile(ftcglyph.h,$(FREETYPEINC)/cache) LinkSourceFile(ftcimage.h,$(FREETYPEINC)/cache) LinkSourceFile(ftcmanag.h,$(FREETYPEINC)/cache) Index: xc/lib/freetype2/freetype/config/Imakefile diff -u xc/lib/freetype2/freetype/config/Imakefile:1.2 xc/lib/freetype2/freetype/config/Imakefile:1.8 --- xc/lib/freetype2/freetype/config/Imakefile:1.2 Tue May 15 23:57:28 2001 +++ xc/lib/freetype2/freetype/config/Imakefile Tue Jan 15 17:55:27 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.2 2001/05/16 03:57:28 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/config/Imakefile,v 1.8 2002/01/15 22:55:27 herrb Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src @@ -17,3 +17,22 @@ LinkSourceFile(ftheader.h,$(FREETYPEINC)/config) LinkSourceFile(ftmodule.h,$(FREETYPEINC)/config) LinkSourceFile(ftoption.h,$(FREETYPEINC)/config) + +XCOMM Build and install a configure-compatible freetype-config + +LinkSourceFile(freetype-config.in,$(FREETYPETOP)/builds/unix) + +FREETYPE_VERSION=Freetype2Version + +freetype-config: freetype-config.in + sed -e s%@prefix@%$(PROJECTROOT)% -e s%@exec_prefix@%$(PROJECTROOT)% \ + -e s%@libdir@%$(USRLIBDIR)% -e s%@includedir@%$(INCDIR)% \ + -e s%@ft_version@%$(FREETYPE_VERSION)% \ + < freetype-config.in > $@ + +includes:: freetype-config + +InstallNamedProg(freetype-config,freetype-config,$(BINDIR)) + +clean:: + RemoveFile(freetype-config) Index: xc/lib/freetype2/freetype/internal/Imakefile diff -u xc/lib/freetype2/freetype/internal/Imakefile:1.2 xc/lib/freetype2/freetype/internal/Imakefile:1.4 --- xc/lib/freetype2/freetype/internal/Imakefile:1.2 Tue May 15 23:57:28 2001 +++ xc/lib/freetype2/freetype/internal/Imakefile Mon Jan 14 17:59:07 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.2 2001/05/16 03:57:28 keithp Exp $ +XCOMM $XFree86: xc/lib/freetype2/freetype/internal/Imakefile,v 1.4 2002/01/14 22:59:07 herrb Exp $ FREETYPETOP = $(TOP)/extras/freetype2 FREETYPESRC = $(FREETYPETOP)/src @@ -6,7 +6,6 @@ HEADERS= \ autohint.h \ - cfferrs.h \ cfftypes.h \ fnttypes.h \ ftcalc.h \ @@ -19,18 +18,17 @@ internal.h \ pcftypes.h \ psaux.h \ + psglobal.h \ + pshints.h \ psnames.h \ sfnt.h \ - t1errors.h \ t1types.h \ - tterrors.h \ tttypes.h BuildIncludes($(HEADERS),freetype2/freetype/internal,../../..) InstallMultipleFlags($(HEADERS),$(INCDIR)/freetype2/freetype/internal,$(INSTINCFLAGS)) LinkSourceFile(autohint.h,$(FREETYPEINC)/internal) -LinkSourceFile(cfferrs.h,$(FREETYPEINC)/internal) LinkSourceFile(cfftypes.h,$(FREETYPEINC)/internal) LinkSourceFile(fnttypes.h,$(FREETYPEINC)/internal) LinkSourceFile(ftcalc.h,$(FREETYPEINC)/internal) @@ -43,9 +41,9 @@ LinkSourceFile(internal.h,$(FREETYPEINC)/internal) LinkSourceFile(pcftypes.h,$(FREETYPEINC)/internal) LinkSourceFile(psaux.h,$(FREETYPEINC)/internal) +LinkSourceFile(pshints.h,$(FREETYPEINC)/internal) +LinkSourceFile(psglobal.h,$(FREETYPEINC)/internal) LinkSourceFile(psnames.h,$(FREETYPEINC)/internal) LinkSourceFile(sfnt.h,$(FREETYPEINC)/internal) -LinkSourceFile(t1errors.h,$(FREETYPEINC)/internal) LinkSourceFile(t1types.h,$(FREETYPEINC)/internal) -LinkSourceFile(tterrors.h,$(FREETYPEINC)/internal) LinkSourceFile(tttypes.h,$(FREETYPEINC)/internal) Index: xc/lib/lbxutil/delta/lbxdelta.c diff -u xc/lib/lbxutil/delta/lbxdelta.c:1.6 xc/lib/lbxutil/delta/lbxdelta.c:1.8 --- xc/lib/lbxutil/delta/lbxdelta.c:1.6 Wed Jan 17 14:43:34 2001 +++ xc/lib/lbxutil/delta/lbxdelta.c Mon Aug 27 15:01:07 2001 @@ -22,7 +22,7 @@ * * Author: Dale Tonogai, Network Computing Devices */ -/* $XFree86: xc/lib/lbxutil/delta/lbxdelta.c,v 1.6 2001/01/17 19:43:34 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/delta/lbxdelta.c,v 1.8 2001/08/27 19:01:07 dawes Exp $ */ #include "X.h" #include "Xproto.h" @@ -31,9 +31,7 @@ #include "lbxstr.h" #include "lbxdeltastr.h" -#ifndef NULL -#define NULL 0 -#endif +#include #ifdef LBXREQSTATS #include "../lbx_zlib/reqstats.h" @@ -113,7 +111,7 @@ int maxdiff, int *pindex) { - int i, j, k, l = maxdiff + 1; + int i, j, k = 0, l = maxdiff + 1; int m; LBXDeltaElemPtr dm; Index: xc/lib/lbxutil/image/Imakefile diff -u xc/lib/lbxutil/image/Imakefile:1.3 xc/lib/lbxutil/image/Imakefile:1.4 --- xc/lib/lbxutil/image/Imakefile:1.3 Wed Jan 17 14:43:35 2001 +++ xc/lib/lbxutil/image/Imakefile Mon Jun 25 04:12:32 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/lbxutil/image/Imakefile,v 1.3 2001/01/17 19:43:35 dawes Exp $ +XCOMM $XFree86: xc/lib/lbxutil/image/Imakefile,v 1.4 2001/06/25 08:12:32 alanh Exp $ #define IncSubdir X11 #include @@ -21,18 +21,18 @@ MKG3STATES = ./mkg3states g3states.h : mkg3states.c - RemoveFiles($@ ProgramTargetName(mkg3states)) - -HostLinkRule(ProgramTargetName(mkg3states), $(CFLAGS),mkg3states.c,$(LDLIBS)) + RemoveFiles($@ HostProgramTargetName(mkg3states)) + -HostLinkRule(HostProgramTargetName(mkg3states), $(CFLAGS),mkg3states.c,$(LDLIBS)) RunProgram(MKG3STATES,> g3_states_h) $(MV) g3_states_h $@ - RemoveFiles(ProgramTargetName(mkg3states) g3_states_h) + RemoveFiles(HostProgramTargetName(mkg3states) g3_states_h) includes:: g3states.h depend:: g3states.h clean:: - RemoveFiles(g3_states_h g3states.h ProgramTargetName(mkg3states)) + RemoveFiles(g3_states_h g3states.h HostProgramTargetName(mkg3states)) DependTarget() Index: xc/lib/lbxutil/lbx_zlib/lbx_zlib.c diff -u xc/lib/lbxutil/lbx_zlib/lbx_zlib.c:1.7 xc/lib/lbxutil/lbx_zlib/lbx_zlib.c:1.10 --- xc/lib/lbxutil/lbx_zlib/lbx_zlib.c:1.7 Wed Jan 17 14:43:36 2001 +++ xc/lib/lbxutil/lbx_zlib/lbx_zlib.c Fri Dec 14 14:56:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: lbx_zlib.c,v 1.5 2000/08/17 19:46:41 cpqbld Exp $ */ +/* $Xorg: lbx_zlib.c,v 1.6 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1995, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.c,v 1.7 2001/01/17 19:43:36 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.c,v 1.10 2001/12/14 19:56:59 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ @@ -55,9 +59,6 @@ #include #include #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif #include #if !defined(WIN32) && !defined(Lynx) #include @@ -89,8 +90,6 @@ struct iovec iovbuf[2]; }; -void ZlibFree(struct ZlibInfo *comp); - static int init_compress(struct compress_private *priv,/* local pointer to private data */ int level) /* compression level */ @@ -394,7 +393,8 @@ for (i = 0; i < iovcnt; i++) { - this_time = ZlibWrite(fd, iov[i].iov_base, iov[i].iov_len); + this_time = ZlibWrite(fd, (unsigned char *)iov[i].iov_base, + iov[i].iov_len); if (this_time > 0) total += this_time; if (this_time != iov[i].iov_len) @@ -465,7 +465,7 @@ unsigned char *p = buffer; int lenleft = buflen; int len; - int retval; + int retval = -1; /* * First check if there is any data Zlib decompressed already but Index: xc/lib/lbxutil/lbx_zlib/lbx_zlib.h diff -u xc/lib/lbxutil/lbx_zlib/lbx_zlib.h:1.8 xc/lib/lbxutil/lbx_zlib/lbx_zlib.h:1.10 --- xc/lib/lbxutil/lbx_zlib/lbx_zlib.h:1.8 Wed Jan 17 14:43:36 2001 +++ xc/lib/lbxutil/lbx_zlib/lbx_zlib.h Fri Dec 14 14:57:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: lbx_zlib.h,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ +/* $Xorg: lbx_zlib.h,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1996 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.h,v 1.8 2001/01/17 19:43:36 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib.h,v 1.10 2001/12/14 19:57:00 dawes Exp $ */ #include "zlib.h" #include "Xfuncproto.h" @@ -112,13 +116,10 @@ /* lbx_zlib_io.c */ -extern int InitZlibBuffer ( ZlibBufferPtr b, int size ); -extern void FreeZlibBuffer ( ZlibBufferPtr b ); extern int GetInputPtr ( int fd, ZlibBufferPtr inbuf, int reqlen, unsigned char **ppkt ); extern int StuffInput ( ZlibBufferPtr inbuf, unsigned char *pkt, int reqlen ); extern void FreeInput ( ZlibBufferPtr inbuf, int len ); -extern char * ReserveOutBuf ( ZlibBufferPtr outbuf, int outlen ); extern void CommitOutBuf ( ZlibBufferPtr outbuf, int outlen ); extern int FlushOutBuf ( int fd, ZlibBufferPtr outbuf ); extern int FlushIovBuf ( int fd, struct iovec *iovbuf ); Index: xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c diff -u xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c:1.11 xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c:1.12 --- xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c:1.11 Wed Jan 17 14:43:36 2001 +++ xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c Wed Jul 25 11:04:57 2001 @@ -22,7 +22,7 @@ * * Author: Dale Tonogai, Network Computing Devices */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c,v 1.11 2001/01/17 19:43:36 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/lbx_zlib_io.c,v 1.12 2001/07/25 15:04:57 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ @@ -30,9 +30,6 @@ #include #include #include -#ifdef X_NOT_STDC_ENV -extern int errno; -#endif #if !defined(WIN32) && !defined(Lynx) #include #endif @@ -40,9 +37,7 @@ #include "lbx_zlib.h" #include "os.h" -#ifndef NULL -#define NULL 0 -#endif +#include /* Index: xc/lib/lbxutil/lbx_zlib/reqstats.c diff -u xc/lib/lbxutil/lbx_zlib/reqstats.c:1.4 xc/lib/lbxutil/lbx_zlib/reqstats.c:1.6 --- xc/lib/lbxutil/lbx_zlib/reqstats.c:1.4 Wed Jan 17 14:43:36 2001 +++ xc/lib/lbxutil/lbx_zlib/reqstats.c Fri Dec 14 14:57:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: reqstats.c,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ +/* $Xorg: reqstats.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1996 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,8 +27,10 @@ from The Open Group. */ -/* $XFree86: xc/lib/lbxutil/lbx_zlib/reqstats.c,v 1.4 2001/01/17 19:43:36 dawes Exp $ */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/reqstats.c,v 1.6 2001/12/14 19:57:01 dawes Exp $ */ +#include "reqstats.h" + #ifdef LBXREQSTATS #include @@ -32,7 +38,6 @@ #define _XLBX_SERVER_ #include "XLbx.h" #include "lbx_zlib.h" -#include "reqstats.h" #include #include @@ -491,6 +496,8 @@ #else -static char ANSICCanBeSoBloatingAtTimes = 1; +void +InitLbxReqStats() +{} #endif /* LBXREQSTATS */ Index: xc/lib/lbxutil/lbx_zlib/reqstats.h diff -u xc/lib/lbxutil/lbx_zlib/reqstats.h:1.1.1.3 xc/lib/lbxutil/lbx_zlib/reqstats.h:1.3 --- xc/lib/lbxutil/lbx_zlib/reqstats.h:1.1.1.3 Tue Jan 16 17:27:22 2001 +++ xc/lib/lbxutil/lbx_zlib/reqstats.h Fri Dec 14 14:57:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: reqstats.h,v 1.3 2000/08/17 19:46:41 cpqbld Exp $ */ +/* $Xorg: reqstats.h,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1996 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,6 +27,7 @@ from The Open Group. */ +/* $XFree86: xc/lib/lbxutil/lbx_zlib/reqstats.h,v 1.3 2001/12/14 19:57:01 dawes Exp $ */ #ifdef LBXREQSTATS struct ReqStats { @@ -34,3 +39,5 @@ unsigned long post_delta_bytes; }; #endif + +extern void InitLbxReqStats(void); Index: xc/lib/oldX/X10.h diff -u xc/lib/oldX/X10.h:1.1.1.3 xc/lib/oldX/X10.h:1.2 --- xc/lib/oldX/X10.h:1.1.1.3 Tue Jan 16 17:27:25 2001 +++ xc/lib/oldX/X10.h Fri Dec 14 14:57:01 2001 @@ -1,9 +1,13 @@ -/* $Xorg: X10.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/* $Xorg: X10.h,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* * Copyright 1985, 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/oldX/XCrAssoc.c diff -u xc/lib/oldX/XCrAssoc.c:1.1.1.3 xc/lib/oldX/XCrAssoc.c:1.2 --- xc/lib/oldX/XCrAssoc.c:1.1.1.3 Tue Jan 16 17:27:26 2001 +++ xc/lib/oldX/XCrAssoc.c Fri Dec 14 14:57:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XCrAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/* $Xorg: XCrAssoc.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group. -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/oldX/XDelAssoc.c diff -u xc/lib/oldX/XDelAssoc.c:1.3 xc/lib/oldX/XDelAssoc.c:1.4 --- xc/lib/oldX/XDelAssoc.c:1.3 Wed Jan 17 14:43:37 2001 +++ xc/lib/oldX/XDelAssoc.c Fri Dec 14 14:57:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XDelAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/* $Xorg: XDelAssoc.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group. -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XDelAssoc.c,v 1.3 2001/01/17 19:43:37 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XDelAssoc.c,v 1.4 2001/12/14 19:57:02 dawes Exp $ */ #include "Xlibint.h" #include "X10.h" Index: xc/lib/oldX/XDestAssoc.c diff -u xc/lib/oldX/XDestAssoc.c:1.3 xc/lib/oldX/XDestAssoc.c:1.4 --- xc/lib/oldX/XDestAssoc.c:1.3 Wed Jan 17 14:43:38 2001 +++ xc/lib/oldX/XDestAssoc.c Fri Dec 14 14:57:02 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XDestAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/* $Xorg: XDestAssoc.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group. -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XDestAssoc.c,v 1.3 2001/01/17 19:43:38 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XDestAssoc.c,v 1.4 2001/12/14 19:57:02 dawes Exp $ */ #include "Xlibint.h" #include "X10.h" Index: xc/lib/oldX/XDraw.c diff -u xc/lib/oldX/XDraw.c:1.3 xc/lib/oldX/XDraw.c:1.5 --- xc/lib/oldX/XDraw.c:1.3 Wed Jan 17 14:43:38 2001 +++ xc/lib/oldX/XDraw.c Fri Dec 14 14:57:02 2001 @@ -1,4 +1,4 @@ -/* $Xorg: XDraw.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/* $Xorg: XDraw.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* @@ -26,7 +26,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XDraw.c,v 1.3 2001/01/17 19:43:38 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XDraw.c,v 1.5 2001/12/14 19:57:02 dawes Exp $ */ #include "Xlibint.h" #include "Xlib.h" @@ -34,15 +34,17 @@ #define OK_RETURN 1 #define ERR_RETURN 0 -#ifndef NULL -#define NULL 0 -#endif +#include /* Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - All Rights Reserved +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, Index: xc/lib/oldX/XLookAssoc.c diff -u xc/lib/oldX/XLookAssoc.c:1.1.1.3 xc/lib/oldX/XLookAssoc.c:1.2 --- xc/lib/oldX/XLookAssoc.c:1.1.1.3 Tue Jan 16 17:27:28 2001 +++ xc/lib/oldX/XLookAssoc.c Fri Dec 14 14:57:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XLookAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/* $Xorg: XLookAssoc.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/lib/oldX/XMakeAssoc.c diff -u xc/lib/oldX/XMakeAssoc.c:1.3 xc/lib/oldX/XMakeAssoc.c:1.4 --- xc/lib/oldX/XMakeAssoc.c:1.3 Wed Jan 17 14:43:38 2001 +++ xc/lib/oldX/XMakeAssoc.c Fri Dec 14 14:57:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: XMakeAssoc.c,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/* $Xorg: XMakeAssoc.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /* Copyright 1985, 1998 The Open Group. -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/lib/oldX/XMakeAssoc.c,v 1.3 2001/01/17 19:43:38 dawes Exp $ */ +/* $XFree86: xc/lib/oldX/XMakeAssoc.c,v 1.4 2001/12/14 19:57:03 dawes Exp $ */ #include "Xlibint.h" #include "X10.h" Index: xc/lib/psres/PSres.c diff -u xc/lib/psres/PSres.c:1.1 xc/lib/psres/PSres.c:1.4 --- xc/lib/psres/PSres.c:1.1 Sat Feb 12 19:13:48 2000 +++ xc/lib/psres/PSres.c Sat Oct 27 23:32:46 2001 @@ -35,8 +35,10 @@ * * Author: Adobe Systems Incorporated */ +/* $XFree86: xc/lib/psres/PSres.c,v 1.4 2001/10/28 03:32:46 tsi Exp $ */ #include +#include #ifdef XENVIRONMENT #include @@ -72,12 +74,6 @@ #define SEEK_SET 0 #endif /* SEEK_SET */ -void free(); -void *malloc(); -void *realloc(); -void exit(); -char *getenv(); - /* MT is the right pointer type to pass to memcpy, MST the size type */ #define MT void * #define MST size_t @@ -605,7 +601,7 @@ return inputline; } -static FreeLineBuf() +static void FreeLineBuf() { if (inputline != NULL) FREE(inputline); inputline = NULL; Index: xc/lib/xkbfile/Imakefile diff -u xc/lib/xkbfile/Imakefile:3.3 xc/lib/xkbfile/Imakefile:3.4 --- xc/lib/xkbfile/Imakefile:3.3 Wed Jan 17 14:43:39 2001 +++ xc/lib/xkbfile/Imakefile Mon Aug 27 13:40:59 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.3 2001/01/17 19:43:39 dawes Exp $ +XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.4 2001/08/27 17:40:59 dawes Exp $ #define DoNormalLib YES #define DoSharedLib NO @@ -15,6 +15,10 @@ #define SoRev SOXKBFILEREV #define IncSubdir X11 #define IncSubSubdir extensions + +#if !BuildXKBfilelib +#define LibBuild NO +#endif SRCS = xkbtext.c xkbdraw.c xkbmisc.c xkbatom.c xkberrs.c \ cout.c xkbout.c xkmout.c \ Index: xc/lib/xkbfile/XKMformat.h diff -u xc/lib/xkbfile/XKMformat.h:1.1.1.2 xc/lib/xkbfile/XKMformat.h:1.2 --- xc/lib/xkbfile/XKMformat.h:1.1.1.2 Tue Jan 16 17:27:38 2001 +++ xc/lib/xkbfile/XKMformat.h Tue Jul 31 20:44:44 2001 @@ -24,12 +24,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/XKMformat.h,v 1.2 2001/08/01 00:44:44 tsi Exp $ */ + #ifndef _XKMFORMAT_H_ #define _XKMFORMAT_H_ 1 #include #include -#include "XKM.h" +#include typedef struct _xkmFileInfo { CARD8 type; Index: xc/lib/xkbfile/cout.c diff -u xc/lib/xkbfile/cout.c:3.5 xc/lib/xkbfile/cout.c:3.7 --- xc/lib/xkbfile/cout.c:3.5 Wed Jan 17 14:43:40 2001 +++ xc/lib/xkbfile/cout.c Sat Oct 27 23:32:46 2001 @@ -24,13 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/cout.c,v 3.5 2001/01/17 19:43:40 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/cout.c,v 3.7 2001/10/28 03:32:46 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #include #include @@ -365,8 +363,8 @@ if (i==0) fprintf(file," "); else if ((i&3)==0) fprintf(file,",\n "); else fprintf(file,", "); - fprintf(file,"{ %2d, 0x%x, %3d }",map->kt_index,map->group_info, - map->offset); + fprintf(file, "{ %2d, 0x%x, %3d }", + map->kt_index[0], map->group_info, map->offset); } fprintf(file,"\n};\n"); } @@ -497,17 +495,18 @@ if (xkb->indicators==NULL) return True; - fprintf(file,"static XkbIndicatorRec indicators= {\n"); - fprintf(file," 0x%x,\n {\n",xkb->indicators->phys_indicators); + fprintf(file, "static XkbIndicatorRec indicators= {\n"); + fprintf(file, " 0x%lx,\n {\n", + (long)xkb->indicators->phys_indicators); for (imap=xkb->indicators->maps,i=nNames=0;iflags, XkbIMWhichStateMaskText(imap->which_groups,XkbCFile), imap->groups, XkbIMWhichStateMaskText(imap->which_mods,XkbCFile), XkbModMaskText(imap->mods.mask,XkbCFile)); - fprintf(file," %s, %s, %s }", + fprintf(file," %s, %s }, %s }", XkbModMaskText(imap->mods.real_mods,XkbCFile), XkbVModMaskText(dpy,xkb,0,imap->mods.vmods,XkbCFile), XkbControlsMaskText(imap->ctrls,XkbCFile)); Index: xc/lib/xkbfile/maprules.c diff -u xc/lib/xkbfile/maprules.c:3.12 xc/lib/xkbfile/maprules.c:3.14 --- xc/lib/xkbfile/maprules.c:3.12 Wed Jan 17 14:43:41 2001 +++ xc/lib/xkbfile/maprules.c Sat Oct 27 23:32:47 2001 @@ -24,13 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.12 2001/01/17 19:43:41 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.14 2001/10/28 03:32:47 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING @@ -976,7 +974,7 @@ InputLine line; XkbRF_VarDescRec tmp; char *tok; -int len,headingtype,extra_ndx; +int len,headingtype,extra_ndx = 0; bzero((char *)&tmp, sizeof(XkbRF_VarDescRec)); headingtype = HEAD_NONE; Index: xc/lib/xkbfile/srvmisc.c diff -u xc/lib/xkbfile/srvmisc.c:3.1 xc/lib/xkbfile/srvmisc.c:3.4 --- xc/lib/xkbfile/srvmisc.c:3.1 Wed Jan 17 14:43:41 2001 +++ xc/lib/xkbfile/srvmisc.c Sat Oct 27 23:32:47 2001 @@ -24,12 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/srvmisc.c,v 3.4 2001/10/28 03:32:47 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #include #include @@ -100,7 +99,7 @@ #endif { unsigned which= need|want; -unsigned tmp; +unsigned tmp = 0; if ((result==NULL)||(dpy==NULL)) return which; Index: xc/lib/xkbfile/xkbatom.c diff -u xc/lib/xkbfile/xkbatom.c:3.6 xc/lib/xkbfile/xkbatom.c:3.8 --- xc/lib/xkbfile/xkbatom.c:3.6 Wed Jan 17 14:43:42 2001 +++ xc/lib/xkbfile/xkbatom.c Fri Dec 14 14:57:03 2001 @@ -1,9 +1,13 @@ -/* $Xorg: xkbatom.c,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/* $Xorg: xkbatom.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,13 +71,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbatom.c,v 3.6 2001/01/17 19:43:42 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbatom.c,v 3.8 2001/12/14 19:57:03 dawes Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #include #include Index: xc/lib/xkbfile/xkbconfig.c diff -u xc/lib/xkbfile/xkbconfig.c:3.5 xc/lib/xkbfile/xkbconfig.c:3.7 --- xc/lib/xkbfile/xkbconfig.c:3.5 Wed Jan 17 14:43:42 2001 +++ xc/lib/xkbfile/xkbconfig.c Fri Nov 30 07:11:51 2001 @@ -24,13 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.5 2001/01/17 19:43:42 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.7 2001/11/30 12:11:51 eich Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include @@ -880,7 +878,8 @@ } } *pival= val.ival * sign; - rtrn->defined|= XkbCF_AccessXTimeout; + if (field->field_id == _XkbCF_AccessXTimeout) + rtrn->defined|=XkbCF_AccessXTimeout; tok= XkbCFScan(file,&val,rtrn); if ((tok!=XkbCF_EOL)&&(tok!=XkbCF_Semi)&&(tok!=XkbCF_EOF)) { rtrn->error= XkbCF_ExpectedEOS; @@ -1076,7 +1075,7 @@ ctrls->mk_max_speed= rtrn->mk_max_speed; if (rtrn->mk_curve>0) ctrls->mk_curve= rtrn->mk_curve; - if (rtrn->defined&XkbCF_AccessXTimeout) + if (rtrn->defined&XkbCF_AccessXTimeout && rtrn->ax_timeout > 0) ctrls->ax_timeout= rtrn->ax_timeout; /* any value set to both off and on is reset to ignore */ Index: xc/lib/xkbfile/xkbdraw.c diff -u xc/lib/xkbfile/xkbdraw.c:1.1.1.2 xc/lib/xkbfile/xkbdraw.c:1.3 --- xc/lib/xkbfile/xkbdraw.c:1.1.1.2 Tue Jan 16 17:27:44 2001 +++ xc/lib/xkbfile/xkbdraw.c Sun Jul 29 01:01:13 2001 @@ -24,12 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/xkbdraw.c,v 1.3 2001/07/29 05:01:13 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #include Index: xc/lib/xkbfile/xkberrs.c diff -u xc/lib/xkbfile/xkberrs.c:3.2 xc/lib/xkbfile/xkberrs.c:3.4 --- xc/lib/xkbfile/xkberrs.c:3.2 Wed Jan 17 14:43:42 2001 +++ xc/lib/xkbfile/xkberrs.c Sun Jul 29 01:01:13 2001 @@ -24,12 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/xkberrs.c,v 3.4 2001/07/29 05:01:13 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #include #include Index: xc/lib/xkbfile/xkbmisc.c diff -u xc/lib/xkbfile/xkbmisc.c:1.1.1.7 xc/lib/xkbfile/xkbmisc.c:1.3 --- xc/lib/xkbfile/xkbmisc.c:1.1.1.7 Tue Jan 16 17:27:45 2001 +++ xc/lib/xkbfile/xkbmisc.c Sun Jul 29 01:01:13 2001 @@ -24,12 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.3 2001/07/29 05:01:13 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #define XK_CYRILLIC Index: xc/lib/xkbfile/xkbout.c diff -u xc/lib/xkbfile/xkbout.c:3.7 xc/lib/xkbfile/xkbout.c:3.9 --- xc/lib/xkbfile/xkbout.c:3.7 Wed Jan 17 14:43:42 2001 +++ xc/lib/xkbfile/xkbout.c Sat Oct 27 23:32:47 2001 @@ -24,13 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.7 2001/01/17 19:43:42 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.9 2001/10/28 03:32:47 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #ifndef XKB_IN_SERVER @@ -850,7 +848,7 @@ { register int i; XkbRowPtr row; -int dfltKeyColor; +int dfltKeyColor = 0; fprintf(file," section \"%s\" {\n", XkbAtomText(dpy,s->name,XkbXKBFile)); @@ -1159,7 +1157,7 @@ void * priv; #endif { -Bool ok; +Bool ok = False; Bool (*func)( #if NeedFunctionPrototypes FILE * /* file */, @@ -1169,7 +1167,7 @@ XkbFileAddOnFunc /* addOn */, void * /* priv */ #endif -); +) = NULL; switch (result->type) { case XkmSemanticsFile: @@ -1207,12 +1205,8 @@ _XkbLibError(_XkbErrFileCannotOpen,"XkbWriteXkbFile",0); ok= False; } - else { + else if (func) { ok= (*func)(out,result,True,showImplicit,addOn,priv); - } - if (!ok) { - return False; } - return True; + return ok; } - Index: xc/lib/xkbfile/xkbtext.c diff -u xc/lib/xkbfile/xkbtext.c:3.8 xc/lib/xkbfile/xkbtext.c:3.10 --- xc/lib/xkbfile/xkbtext.c:3.8 Wed Jan 17 14:43:43 2001 +++ xc/lib/xkbfile/xkbtext.c Sat Oct 27 23:32:47 2001 @@ -24,13 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.8 2001/01/17 19:43:43 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.10 2001/10/28 03:32:47 tsi Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include @@ -404,7 +402,7 @@ if (sym==NoSymbol) strcpy(rtrn=buf,"NoSymbol"); else if ((rtrn=XKeysymToString(sym))==NULL) - sprintf(rtrn=buf,"0x%x",sym); + sprintf(rtrn=buf, "0x%lx", (long)sym); else if (format==XkbCFile) { sprintf(buf,"XK_%s",rtrn); rtrn= buf; @@ -413,7 +411,7 @@ #else /* def XKB_IN_SERVER */ if (sym==NoSymbol) strcpy(rtrn=buf,"NoSymbol"); - else sprintf(rtrn=buf,"0x%x",sym); + else sprintf(rtrn=buf, "0x%lx", (long)sym); return rtrn; #endif /* XKB_IN_SERVER */ } @@ -590,7 +588,7 @@ if ((detail&XkbAllNewKeyboardEventsMask)==0) { - char * tmp; + char *tmp = ""; if (format==XkbCFile) tmp= "0"; else if (format==XkbMessage) tmp= "none"; buf= tbGetBuffer(strlen(tmp)+1); @@ -1501,7 +1499,7 @@ if (format==XkbCFile) { sprintf(buf, - "{ %20s, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x }", + "{ %20s, { 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x } }", XkbActionTypeText(action->type,XkbCFile), action->any.data[0],action->any.data[1],action->any.data[2], action->any.data[3],action->any.data[4],action->any.data[5], Index: xc/lib/xkbfile/xkmout.c diff -u xc/lib/xkbfile/xkmout.c:1.4 xc/lib/xkbfile/xkmout.c:1.5 --- xc/lib/xkbfile/xkmout.c:1.4 Wed Jan 17 14:43:43 2001 +++ xc/lib/xkbfile/xkmout.c Wed Jul 25 11:04:58 2001 @@ -24,13 +24,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkmout.c,v 1.4 2001/01/17 19:43:43 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkmout.c,v 1.5 2001/07/25 15:04:58 dawes Exp $ */ #include #include -#ifndef X_NOT_STDC_ENV #include -#endif #include #include #include Index: xc/lib/xkbfile/xkmread.c diff -u xc/lib/xkbfile/xkmread.c:1.4 xc/lib/xkbfile/xkmread.c:1.5 --- xc/lib/xkbfile/xkmread.c:1.4 Wed Jan 17 14:43:43 2001 +++ xc/lib/xkbfile/xkmread.c Wed Jul 25 11:04:58 2001 @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.4 2001/01/17 19:43:43 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.5 2001/07/25 15:04:58 dawes Exp $ */ #include @@ -33,9 +33,7 @@ #ifndef XKB_IN_SERVER -#ifndef X_NOT_STDC_ENV #include -#endif #include #include Index: xc/lib/xtrans/Xtrans.c diff -u xc/lib/xtrans/Xtrans.c:3.24 xc/lib/xtrans/Xtrans.c:3.26 --- xc/lib/xtrans/Xtrans.c:3.24 Wed Jan 17 14:43:45 2001 +++ xc/lib/xtrans/Xtrans.c Fri Dec 14 14:57:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtrans.c,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ +/* $Xorg: Xtrans.c,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtrans.c,v 3.24 2001/01/17 19:43:45 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtrans.c,v 3.26 2001/12/14 19:57:04 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -74,9 +78,6 @@ #define TRANS_LOCAL_NAMED_INDEX 11 #define TRANS_LOCAL_ISC_INDEX 12 #define TRANS_LOCAL_SCO_INDEX 13 -#define TRANS_AMOEBA_INDEX 14 -#define TRANS_MNX_INET_INDEX 15 -#define TRANS_MNX_TCP_INDEX 16 static @@ -115,13 +116,6 @@ { &TRANS(SCOFuncs), TRANS_LOCAL_SCO_INDEX }, #endif /* sun */ #endif /* LOCALCONN */ -#if defined(AMRPCCONN) || defined(AMTCPCONN) - { &TRANS(AmConnFuncs), TRANS_AMOEBA_INDEX }, -#endif /* AMRPCCONN || AMTCPCONN */ -#if defined(MNX_TCPCONN) - { &TRANS(MnxINETFuncs), TRANS_MNX_INET_INDEX }, - { &TRANS(MnxTCPFuncs), TRANS_MNX_TCP_INDEX }, -#endif /* MNX_TCPCONN */ }; #define NUMTRANS (sizeof(Xtransports)/sizeof(Xtransport_table)) @@ -667,10 +661,6 @@ * ret = ciptr->transptr->SetOption (ciptr, option, arg); */ -#ifdef MINIX - return ciptr->transptr->SetOption(ciptr, option, arg); -#else /* !MINIX */ - switch (option) { case TRANS_NONBLOCKING: @@ -733,7 +723,6 @@ } return ret; -#endif /* MINIX */ } #ifdef TRANS_SERVER Index: xc/lib/xtrans/Xtrans.h diff -u xc/lib/xtrans/Xtrans.h:3.15 xc/lib/xtrans/Xtrans.h:3.18 --- xc/lib/xtrans/Xtrans.h:3.15 Wed Jan 17 14:43:45 2001 +++ xc/lib/xtrans/Xtrans.h Fri Dec 14 14:57:04 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtrans.h,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ +/* $Xorg: Xtrans.h,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtrans.h,v 3.15 2001/01/17 19:43:45 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtrans.h,v 3.18 2001/12/14 19:57:04 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -59,7 +63,7 @@ */ #ifdef X11_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _X11Trans##func #else #define TRANS(func) _X11Trans/**/func @@ -70,7 +74,7 @@ #endif /* X11_t */ #ifdef XSERV_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _XSERVTrans##func #else #define TRANS(func) _XSERVTrans/**/func @@ -82,7 +86,7 @@ #endif /* X11_t */ #ifdef XIM_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _XimXTrans##func #else #define TRANS(func) _XimXTrans/**/func @@ -93,7 +97,7 @@ #endif /* XIM_t */ #ifdef FS_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _FSTrans##func #else #define TRANS(func) _FSTrans/**/func @@ -104,7 +108,7 @@ #endif /* FS_t */ #ifdef FONT_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _FontTrans##func #else #define TRANS(func) _FontTrans/**/func @@ -115,7 +119,7 @@ #endif /* FONT_t */ #ifdef ICE_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _IceTrans##func #else #define TRANS(func) _IceTrans/**/func @@ -126,7 +130,7 @@ #endif /* ICE_t */ #ifdef TEST_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _TESTTrans##func #else #define TRANS(func) _TESTTrans/**/func @@ -137,7 +141,7 @@ #endif /* TEST_t */ #ifdef LBXPROXY_t -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _LBXPROXYTrans##func #else #define TRANS(func) _LBXPROXYTrans/**/func @@ -149,7 +153,7 @@ #endif /* LBXPROXY_t */ #if !defined(TRANS) -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define TRANS(func) _XTrans##func #else #define TRANS(func) _XTrans/**/func @@ -183,7 +187,7 @@ #endif -#if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) || defined(MINIX) +#if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) /* * TRANS(Readv) and TRANS(Writev) use struct iovec, normally found Index: xc/lib/xtrans/Xtransam.c diff -u xc/lib/xtrans/Xtransam.c:3.3 xc/lib/xtrans/Xtransam.c:removed --- xc/lib/xtrans/Xtransam.c:3.3 Wed Jan 17 14:43:46 2001 +++ xc/lib/xtrans/Xtransam.c Fri Jan 18 15:23:50 2002 @@ -1,2002 +0,0 @@ -/* $Xorg: Xtransam.c,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ -/* - -Copyright 1994, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. - -*/ -/* $XFree86: xc/lib/xtrans/Xtransam.c,v 3.3 2001/01/17 19:43:46 dawes Exp $ */ - -/* Copyright 1994 Vrije Universiteit Amsterdam, Netherlands - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name Vrije Universiteit not be used - * in advertising or publicity pertaining to distribution of the software - * without specific, written prior permission. The Vrije Universiteit - * makes no representations about the suitability of this software for - * any purpose. It is provided "as is" without express or implied warranty. - * - * THE VRIJE UNIVERSITEIT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN - * NO EVENT SHALL THE VRIJE UNIVERSITEIT BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * This is the Amoeba implementation of the X Transport service layer - */ - -#define event am_event_t -#define interval am_interval_t -#define port am_port_t -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#undef event -#undef interval -#undef port - -extern char *strdup(); - -/* a new family for Amoeba RPC connections */ -#define AF_AMOEBA 33 -#define FamilyAmoeba 33 - -#define MAX_TCPIP_RETRY 4 -#define CIRCBUFSIZE 4096 /* was 1024 */ - -/* - * Amoeba channel description: - */ -typedef struct _XAmChanDesc { - int state; /* current state of connection */ - int type; /* type of connection */ - int status; /* status used by server */ - signum signal; /* signal to kill TCP/IP reader */ - semaphore *sema; /* select semaphore */ - struct vc *virtcirc; /* virtual circuit for Amoeba RPC */ - struct circbuf *circbuf; /* circular buffer for TCP/IP */ - capability chancap; /* TCP/IP channel capability */ - XtransConnInfo conninfo; /* back pointer to the connect info */ -} XAmChanDesc; - -/* Amoeba channel descriptor states */ -#define ACDS_FREE 0 /* unused */ -#define ACDS_USED 1 /* intermediate state */ -#define ACDS_CLOSED 2 /* just closed */ - -/* Amoeba channel types */ -#define ACDT_TCPIP 1 /* TCP/IP connection */ -#define ACDT_VIRTCIRC 2 /* Amoeba virtual circuit connection */ - - -#ifdef XSERV_t -#include "dix.h" /* clients[] needed by AmFindReadyClients */ -#define Error(list) ErrorF list -#define Fatal(list) FatalError list -#else -#define Error(list) printf list -#define Fatal(list) { printf list; exit(1); } -#endif - -#define dbprintf(list) /* printf list */ -#define doprintf(list) printf list /**/ - -/* - * First: utility functions. - */ - -#if defined(XSERV_t) || defined(FS_t) - -static semaphore main_sema; - -/* The X-server consists of one main thread, running the non re-entrant - * X code, and a number of auxilary threads that take care of reading - * the input streams, and input devices. The following set of routines - * wake up the main thread when it has something to do. - */ -void -InitMainThread() -{ - sema_init(&main_sema, 0); -} - -void -WakeUpMainThread() -{ - sema_up(&main_sema); -} - -int -SleepMainThread(timeout) -am_interval_t timeout; -{ - dbprintf(("Sleeping main thread timeout %d\n", timeout)); - return (sema_trydown(&main_sema, timeout) == 0) ? 0 : -1; -} - - -static int init_waiters; -static semaphore init_sema; - -void -AmInitWaitFor() -{ - init_waiters = 0; - sema_init(&init_sema, 0); -} - -/* - * Force caller thread to wait until main has finished the initialization. - */ -void -WaitForInitialization() -{ - init_waiters++; - dbprintf(("Waiting for initialization (%d)\n", init_waiters)); - sema_down(&init_sema); -} - -void -WakeupInitWaiters() -{ - /* wakeup threads in initial sleep */ - if (init_waiters > 0) { - dbprintf(("%d waiters wait for something ...\n", init_waiters)); - while (init_waiters-- > 0) { - sema_up(&init_sema); - } - } -} - -#endif /* XSERV_t || FS_t */ - - -#define THREAD_STACK_SIZE (8*1024) - -/* - * Amoeba connection information is stored in, so called, - * channel descriptors. Channel descriptors are identified - * by their index in the table below. - */ -static XAmChanDesc XAmChanDescriptors[OPEN_MAX]; -static void XAmCleanUpChanDesc(); /* forward */ - -/* - * Cleanup connection descriptors on a signal - */ -static void -XAmSignalCleanUpChanDesc(sig) - int sig; -{ - XAmCleanUpChanDesc(); - _exit(sig | 0x80); -} - -/* - * Cleanup connection descriptors - */ -static void -XAmCleanUpChanDesc() -{ - register int i; - - for (i = 0; i < OPEN_MAX; i++) { - switch (XAmChanDescriptors[i].type) { - case ACDT_TCPIP: - /* The Amoeba TCP/IP server is capability based, i.e. - * it uses capabilities to identify connections. Since a - * capability is only destroyed when it has aged too much - * or is explicitly deleted, the connection it identifies - * will tend to exist for some while even if the client is - * already gone. To force connections to close this loop - * destroys all open TCP/IP connection. This loop us auto- - * matically executed when exit() is called. - */ - std_destroy(&XAmChanDescriptors[i].chancap); - break; - case ACDT_VIRTCIRC: - /* Close the virtual circuit asynchronously, or otherwise - * we may hang for a minute under some (?) conditions. - */ - vc_close(XAmChanDescriptors[i].virtcirc, VC_BOTH | VC_ASYNC); - break; - } - XAmChanDescriptors[i].state = ACDS_FREE; - } -} - -/* - * Allocate a channel descriptor - */ -static XAmChanDesc * -XAmAllocChanDesc() -{ - register int i; - -#ifndef XSERV_t - - static int initialized = 0; - - /* - * Since the TCP/IP server is capability based its connections exists - * even if the owner process is long gone. To overcome this nuisance, - * a sweep is made over the connection descriptors when exit() is - * called or when an un-catched (by application program) signal is - * received. - */ - if (!initialized) { - initialized = 1; - atexit(XAmCleanUpChanDesc); - if (signal(SIGHUP, SIG_IGN) != SIG_IGN) - signal(SIGHUP, XAmSignalCleanUpChanDesc); - if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) - signal(SIGQUIT, XAmSignalCleanUpChanDesc); - if (signal(SIGINT, SIG_IGN) != SIG_IGN) - signal(SIGINT, XAmSignalCleanUpChanDesc); - if (signal(SIGTERM, SIG_IGN) != SIG_IGN) - signal(SIGTERM, XAmSignalCleanUpChanDesc); - } -#endif - - for (i = 0; i < OPEN_MAX; i++) { - if (XAmChanDescriptors[i].state == ACDS_FREE) { - XAmChanDescriptors[i].state = ACDS_USED; - XAmChanDescriptors[i].conninfo = NULL; - return &XAmChanDescriptors[i]; - } - } - return NULL; -} - -/* - * Convert ``file descriptor'' to channel descriptor - */ -static XAmChanDesc * -XAmFdToChanDesc(fd) - int fd; -{ - if (fd >= 0 && fd < OPEN_MAX) { - return &XAmChanDescriptors[fd]; - } else { - return NULL; - } -} - -/* - * Convert channel descriptor to ``file descriptor'' - */ -static int -XAmChanDescToFd(chandesc) - XAmChanDesc *chandesc; -{ - return chandesc - XAmChanDescriptors; -} - -/* - * Free channel descriptor - */ -static void -XAmFreeChanDesc(chandesc) - XAmChanDesc *chandesc; -{ - if (chandesc->sema) { - xfree(chandesc->sema); - chandesc->sema = NULL; - } - chandesc->state = ACDS_FREE; -} - -static void XAmReaderThread(); - -static int -MakeAmConnection(phostname, idisplay, familyp, saddrlenp, saddrp) - char *phostname; - int idisplay; - int *familyp; /* RETURN */ - int *saddrlenp; /* RETURN */ - char **saddrp; /* RETURN */ -{ - capability xservercap; - char xserverpath[256]; - XAmChanDesc *chandesc; - errstat err; - - /* Amoeba requires a server hostname */ - if (phostname == NULL || *phostname == '\0') { - fprintf(stderr, "MakeAmConnection: Display name expected\n"); - return -1; - } - - /* allocate channel descriptor */ - chandesc = XAmAllocChanDesc(); - if (chandesc == NULL) { - fprintf(stderr, "MakeAmConnection: Out of channel capabilities\n"); - return -1; - } - - /* - * There are two possible way to make a connection on Amoeba. Either - * through an Amoeba RPC or a TCP/IP connection. Depending on whether - * the X server resides on Amoeba, Amoeba RPC's are used. Otherwise - * it uses a TCP/IP connection. - */ - (void)sprintf(xserverpath, "%s/%s:%d", DEF_XSVRDIR, phostname, idisplay); - if ((err = name_lookup(xserverpath, &xservercap)) == STD_OK) { - am_port_t vccaps[2]; - bufsize size; - errstat err; - header hdr; - - /* Amoeba virtual circuit connection */ - chandesc->type = ACDT_VIRTCIRC; - - /* get the two connection ports from the X-server */ - hdr.h_command = AX_CONNECT; - hdr.h_port = xservercap.cap_port; - hdr.h_priv = xservercap.cap_priv; - size = trans(&hdr, NILBUF, 0, &hdr, (char *)vccaps, sizeof(vccaps)); - if (ERR_STATUS(size)) { - err = ERR_CONVERT(size); - } else { - err = ERR_CONVERT(hdr.h_status); - } - if (err != STD_OK || size != sizeof(vccaps)) { - fprintf(stderr, "Xlib: connect to Amoeba X-server failed (%s)\n", - err_why(err)); - XAmFreeChanDesc(chandesc); - return -1; - } - - /* setup an Amoeba virtual circuit */ - chandesc->virtcirc = - vc_create(&vccaps[1], &vccaps[0], MAXBUFSIZE, MAXBUFSIZE); - if (chandesc->virtcirc == (struct vc *)NULL) { - fprintf(stderr, "Xlib: Amoeba virtual circuit create failed\n"); - XAmFreeChanDesc(chandesc); - return -1; - } - - /* Special Amoeba family type. For Amoeba no additional access control - * mechanism exists; when you have the server capability, you have - * the access. Just use a fake address. - */ - *familyp = AF_AMOEBA; - *saddrp = strdup("Amoeba"); - *saddrlenp = strlen(*saddrp); - } else { - char tcpname[256]; - capability tcpcap; - ipaddr_t ipaddr; - char *tcpsvr; - nwio_tcpcl_t tcpcl; - nwio_tcpconf_t tcpconf; - XAmChanDesc **param; - int result; - - /* Amoeba TCP/IP connection */ - chandesc->type = ACDT_TCPIP; - - /* lookup up TCP/IP server */ - if ((tcpsvr = getenv("TCP_SERVER")) == NULL) { - tcpsvr = TCP_SVR_NAME; - } - if ((err = name_lookup(tcpsvr, &tcpcap)) != STD_OK) { - fprintf(stderr, "Xlib: Cannot lookup %s (%s)\n", - tcpsvr, err_why(err)); - std_destroy(&chandesc->chancap); - XAmFreeChanDesc(chandesc); - return -1; - } - - /* establish TCP/IP connection */ - if ((err = tcpip_open(&tcpcap, &chandesc->chancap)) != STD_OK) { - fprintf(stderr, "Xlib: Cannot open TCP/IP server on %s (%s)\n", - tcpsvr, tcpip_why(err)); - std_destroy(&chandesc->chancap); - XAmFreeChanDesc(chandesc); - return -1; - } - - /* lookup TCP/IP hostname */ - if (isdigit(phostname[0])) { - ipaddr = inet_addr(phostname); - } else { - struct hostent *hp = gethostbyname(phostname); - if (hp == NULL) { - fprintf(stderr, "Xlib: %s unknown host\n", phostname); - return -1; - } - memcpy(&ipaddr, hp->h_addr, hp->h_length); - } - - /* set remote address/port on the TCP/IP connection */ - tcpconf.nwtc_flags = NWTC_SET_RA|NWTC_SET_RP|NWTC_LP_SEL; - tcpconf.nwtc_remaddr = ipaddr; - tcpconf.nwtc_remport = htons(6000+idisplay); - if ((err = tcp_ioc_setconf(&chandesc->chancap, &tcpconf)) != STD_OK) { - fprintf(stderr, "Xlib: Cannot configure TCP/IP server (%s)\n", - tcpip_why(err)); - std_destroy(&chandesc->chancap); - XAmFreeChanDesc(chandesc); - return -1; - } - - /* make the actual TCP/IP connection */ - tcpcl.nwtcl_flags = 0; - if ((err = tcp_ioc_connect(&chandesc->chancap, &tcpcl)) != STD_OK) { - fprintf(stderr, "Xlib: Cannot make TCP/IP connection (%s)\n", - tcpip_why(err)); - std_destroy(&chandesc->chancap); - XAmFreeChanDesc(chandesc); - return -1; - } - - /* start TCP/IP reader thread */ - chandesc->signal = sig_uniq(); - chandesc->circbuf = cb_alloc(CIRCBUFSIZE); - param = (XAmChanDesc **) xalloc(sizeof(XAmChanDesc *)); /* error checking? */ - *param = chandesc; - result = thread_newthread(XAmReaderThread, THREAD_STACK_SIZE, - (char *)param, sizeof(XAmChanDesc *)); - if (result == 0) { - fprintf(stderr, "Xlib: Cannot start reader thread\n"); - std_destroy(&chandesc->chancap); - XAmFreeChanDesc(chandesc); - return -1; - } - threadswitch(); /* give reader a try */ - - /* - * Family type is set to Internet so that the .Xauthority - * files from Unix will work under Amoeba (for Unix displays). - */ - *familyp = AF_INET; - *saddrlenp = sizeof(ipaddr_t); - *saddrp = xalloc(sizeof(ipaddr_t)); - memcpy(*saddrp, (char *)&ipaddr, sizeof(ipaddr_t)); /* error checking? */ - } - - return XAmChanDescToFd(chandesc); -} - -/* - * The TCP/IP server silently assumes a maximum buffer size of 30000 bytes. - */ -#define TCPIP_BUFSIZE 16384 - -static void -XAMCloseChannel(chandesc) -XAmChanDesc *chandesc; -{ - if (chandesc->state == ACDS_USED && chandesc->type == ACDT_TCPIP) { - cb_close(chandesc->circbuf); - chandesc->state = ACDS_CLOSED; - } -} - - -/* - * Shutdown TCP/IP reader thread - */ -static void -XAmReaderSignalCatcher(sig, us, extra) - signum sig; - thread_ustate *us; - _VOIDSTAR extra; -{ - register XAmChanDesc *chandesc = (XAmChanDesc *)extra; - - XAMCloseChannel(chandesc); - thread_exit(); -} - -/* - * TCP/IP reader thread - */ -static void -XAmReaderThread(argptr, argsize) - void *argptr; - int argsize; -{ - register XAmChanDesc *chandesc; - - chandesc = *((XAmChanDesc **)argptr); - (void) sig_catch(chandesc->signal, XAmReaderSignalCatcher, - (_VOIDSTAR) chandesc); - - while (chandesc->state == ACDS_USED) { - char buffer[CIRCBUFSIZE]; - bufsize size; - - size = tcpip_read(&chandesc->chancap, buffer, sizeof(buffer)); - if (ERR_STATUS(size) || size == 0) { - if (size == 0) { - static char msg[] = "Xlib: TCP/IP channel closed\n"; - - write(2, msg, sizeof(msg)); - } else { - fprintf(stderr, "Xlib: TCP/IP read failed (%s)\n", - err_why(ERR_CONVERT(size))); - } - XAMCloseChannel(chandesc); - break; - } - - if (cb_puts(chandesc->circbuf, buffer, size) != 0) { - fprintf(stderr, "Xlib: short write to circular buffer\n"); - XAMCloseChannel(chandesc); - } - } - - thread_exit(); -} - -/* - * Wait until input is available or until the timer expires. - */ -int -TRANS(AmSelect)(ifd, timout) - int ifd; - int timout; -{ - XAmChanDesc *chandesc; - int n; - - errno = 0; - - chandesc = XAmFdToChanDesc(ifd); - if (chandesc == NULL || chandesc->state != ACDS_USED) { - errno = EBADF; - return -1; - } - - if (chandesc->sema == NULL) { - /* Allocate semaphore to sleep on when no data is - * available. The underlying circular buffer and - * virtual circuit packages manage this semaphore. - */ - chandesc->sema = (semaphore *) xalloc(sizeof(semaphore)); - if (chandesc->sema == NULL) { - errno = ENOMEM; - return -1; - } - - sema_init(chandesc->sema, 0); - switch (chandesc->type) { - case ACDT_TCPIP: - cb_setsema(chandesc->circbuf, chandesc->sema); - break; - case ACDT_VIRTCIRC: - vc_setsema(chandesc->virtcirc, chandesc->sema); - break; - } - } - - switch (chandesc->type) { - case ACDT_TCPIP: - if ((n = cb_full(chandesc->circbuf)) != 0) { - if (n < 0) errno = EPIPE; - return n; /* includes error as well */ - } - if (sema_trydown(chandesc->sema, timout) < 0) { - errno = EINTR; - return -1; - } else { - /* we down for all the bytes in AMRead, so undo the down */ - sema_up(chandesc->sema); - } - if ((n = cb_full(chandesc->circbuf)) < 0) { - errno = EPIPE; - return -1; - } - return n; - - case ACDT_VIRTCIRC: - if ((n = vc_avail(chandesc->virtcirc, VC_IN)) != 0) { - if (n < 0) errno = EPIPE; - return n; /* includes error as well */ - } - if (sema_trydown(chandesc->sema, timout) < 0) { - errno = EINTR; - return -1; - } else { - /* we down for all the bytes in AMRead, so undo the down */ - sema_up(chandesc->sema); - } - if ((n = vc_avail(chandesc->virtcirc, VC_IN)) < 0) { - errno = EPIPE; - return -1; - } - return n; - } - - errno = EINVAL; - return -1; -} - -/* - * This function gets the local address of the transport and stores it in the - * XtransConnInfo structure for the connection. - */ - -static int -TRANS(AMGetAddr)(ciptr) -XtransConnInfo ciptr; -{ - PRMSG(1,"AMGetAddr(%x)\n", ciptr, 0,0 ); - PRMSG(1,"AMGetAddr: TODO\n", 0, 0, 0); - - return -1; -} - - -/* - * This function gets the remote address of the socket and stores it in the - * XtransConnInfo structure for the connection. - */ - -static int -TRANS(AMGetPeerAddr)(ciptr) -XtransConnInfo ciptr; -{ - struct nwio_tcpconf tcpconf; - errstat err; - XAmChanDesc *chandesc; - - PRMSG(2,"AMGetPeerAddr(%x)\n", ciptr, 0,0 ); - - chandesc = XAmFdToChanDesc(ciptr->fd); - if (chandesc == NULL || chandesc->state != ACDS_USED) { - errno = EBADF; - return -1; - } - - switch (chandesc->type) { - case ACDT_TCPIP: - /* get the remote adress from the TCP/IP server */ - if ((err = tcp_ioc_getconf(&chandesc->chancap, &tcpconf)) != STD_OK) { - PRMSG (1, "AMGetPeerAddr: Cannot get remote address (%d)\n", - (int) err, 0, 0); - return -1; - } - -#if 0 /* debug */ - { - struct hostent *remote; - char *hostname; - - remote = gethostbyaddr((char *) &tcpconf.nwtc_remaddr, - sizeof(tcpconf.nwtc_remaddr), AF_INET); - if ((remote == NULL) || (remote->h_name == NULL)) { - hostname = inet_ntoa(tcpconf.nwtc_remaddr); - } else { - hostname = remote->h_name; - } - PRMSG (1, "AMGetPeerAddr: remote addr `%s'\n", - hostname, 0, 0); - } -#endif - - ciptr->peeraddrlen = sizeof(tcpconf.nwtc_remaddr); - ciptr->peeraddr = (char *) xalloc (ciptr->peeraddrlen); - if (ciptr->peeraddr == NULL) { - PRMSG (1, "AMGetPeerAddr: Can't allocate peeraddr\n", - 0, 0, 0); - return -1; - } - - memcpy (ciptr->peeraddr, &tcpconf.nwtc_remaddr, ciptr->peeraddrlen); - break; - - case ACDT_VIRTCIRC: - /* for Amoeba virtual circuits just copy the client address */ - if ((ciptr->peeraddr = (char *) xalloc (ciptr->addrlen)) == NULL) { - PRMSG (1, "AMGetPeerAddr: Can't allocate peeraddr\n", - 0, 0, 0); - return -1; - } - - ciptr->peeraddrlen = ciptr->addrlen; - memcpy (ciptr->peeraddr, ciptr->addr, ciptr->peeraddrlen); - break; - } - - return 0; -} - - -static XtransConnInfo -TRANS(AMOpen)(device) -char *device; -{ - PRMSG(1,"AMOpen(%s)\n", device, 0,0 ); - PRMSG(1,"AMOpen: TODO\n", 0, 0, 0); - - return NULL; -} - - -static int -TRANS(AMAddrToNetbuf)(tlifamily, host, port, netbufp) -int tlifamily; -char *host; -char *port; -struct netbuf *netbufp; -{ - PRMSG(1,"AMAddrToNetbuf(%d,%s,%s)\n", tlifamily, host, port ); - PRMSG(1,"AMAddrToNetbuf: TODO\n", 0, 0, 0); - - return -1; -} - -/* - * These functions are the interface supplied in the Xtransport structure - */ - -#ifdef TRANS_CLIENT - -static XtransConnInfo -TRANS(AMOpenCOTSClient)(thistrans, protocol, host, port) -Xtransport *thistrans; -char *protocol; -char *host; -char *port; -{ - XtransConnInfo ciptr; - XAmChanDesc *chandesc; - - PRMSG(2,"AMOpenCOTSClient(%s,%s,%s)\n", protocol, host, port ); - - ciptr = (XtransConnInfo) xcalloc (1, sizeof(struct _XtransConnInfo)); - if (ciptr == NULL) { - PRMSG (1, "AMOpenCotsClient: malloc failed\n", 0, 0, 0); - return NULL; - } - - ciptr->fd = MakeAmConnection (host, 0 /* TODO */, &ciptr->family, - &ciptr->addrlen, &ciptr->addr); - if (ciptr->fd < 0) { - PRMSG(1,"AMOpenCOTSClient: Unable to make connection to %s\n", - host, 0,0 ); - xfree(ciptr); - return NULL; - } - - /* set the back pointer */ - chandesc = XAmFdToChanDesc(ciptr->fd); - chandesc->conninfo = ciptr; - - TRANS(AMGetPeerAddr)(ciptr); - - PRMSG(2,"AMOpenCOTSClient: made connection to %s; fd = %d, family = %d\n", - host, ciptr->fd, ciptr->family); - - return ciptr; -} - -#endif /* TRANS_CLIENT */ - -#if defined(XSERV_t) || defined(FS_t) - -/* The following defines come from osdep.h; - * they should removed from there eventually. - */ - -/* - * Some fundamental constants - */ -#define CONNECTOR_STACK 4000 /* stack for connector task */ -#define DEVREADER_STACK 4000 /* stack for device reader */ -#define CREATOR_STACK 4000 /* stack for connection creator */ -#define MAXTASKS 100 /* Maximum # clients */ - -/* - * OsComm status bits - */ -#define CONN_KILLED 0x1 /* Connection being closed */ -#define REQ_PUSHBACK 0x2 /* Request pushed back */ -#define IGNORE 0x4 /* True if client ignored */ -#define CONN_INIT 0x8 /* True if still initializing */ -#define CONN_ALIVE 0x10 /* True if living */ - - -#define REPLY_BUFSIZE 30000 - -capability X; /* X capability */ -char *XServerHostName; /* X server host name */ -char *XTcpServerName; /* TCP/IP server name */ - -static XtransConnInfo NewConns[MAXTASKS]; /* new client connections */ -int nNewConns; /* # of new clients */ - -int maxClient; /* Highest allocated client fd + 1*/ -static int minClient = 1; /* Lowest allocated client fd */ - -static char * -OsCommStatus(status) - int status; -{ - static char buf[100]; - - buf[0] = '\0'; - if (status == 0) - sprintf(buf, "NONE"); - if (status & CONN_INIT) - sprintf(buf, "%s INIT", buf); - if (status & CONN_ALIVE) - sprintf(buf, "%s ALIVE", buf); - if (status & CONN_KILLED) - sprintf(buf, "%s KILLED", buf); - if (status & REQ_PUSHBACK) - sprintf(buf, "%s PUSHBACK", buf); - if (status & IGNORE) - sprintf(buf, "%s IGNORE", buf); - return buf; -} - -static char * -OsCommFamily(family) - int family; -{ - if (family == FamilyAmoeba) { - return "AMOEBA"; - } else { - return "TCP/IP"; - } -} - - -/* - * Return status information about the open connections - */ -static errstat -ConnectionStatus(hdr, buf, size) - header *hdr; - char *buf; - int size; -{ - char *begin, *end; - char *bprintf(); - int fd; - XAmChanDesc *chandesc; - - begin = buf; - end = buf + size; - - - /* all active clients */ - begin = bprintf(begin, end, "Active clients:\n"); - for (fd = minClient; fd < maxClient; fd++) { - static XAmChanDesc *chandesc; - - chandesc = XAmFdToChanDesc(fd); - if (chandesc != NULL && chandesc->conninfo != NULL) { - begin = bprintf(begin, end, "%d: Family %s, State %d, Status %s\n", - fd, OsCommFamily(chandesc->conninfo->family), - chandesc->state, OsCommStatus(chandesc->status)); - } - } - - if (begin == NULL) { - hdr->h_size = 0; - return STD_SYSERR; - } else { - hdr->h_size = begin - buf; - return STD_OK; - } -} - -/* - * Wakeup main thread if necessary - */ -static void -UnblockMain(fd) -int fd; -{ - XAmChanDesc *chandesc; - - chandesc = XAmFdToChanDesc(fd); - if (chandesc != NULL) { - if ((chandesc->status & IGNORE) == 0) { - WakeUpMainThread(); - } - } else { - Error(("UnblockMain: invalid fd %d\n", fd)); - } -} - -static void -TcpIpReaderSignalCatcher(sig, us, extra) - signum sig; - thread_ustate *us; - _VOIDSTAR extra; -{ - XAmChanDesc *chandesc = (XAmChanDesc *) extra; - - if (chandesc->conninfo != NULL) { - dbprintf(("TcpIpReaderSignalCatcher(%d), number %d\n", - sig, chandesc->conninfo->fd)); - if (chandesc->signal != sig) { - Error(("TCP/IP Reader: Connection %s got unexpected signal %d\n", - chandesc->conninfo->fd, sig)); - } - } - - chandesc->signal = -1; - thread_exit(); -} - -void -TcpIpReaderThread(argptr, argsize) - void *argptr; - int argsize; -{ - XAmChanDesc *chandesc; - - if (argsize != sizeof(XAmChanDesc *)) { - Fatal(("Internal error: TcpIpReaderThread incorrectly called\n")); - } - - chandesc = * ((XAmChanDesc **) argptr); - (void) sig_catch(chandesc->signal, TcpIpReaderSignalCatcher, - (_VOIDSTAR) chandesc); - - for (;;) { - char buffer[MAXBUFSIZE]; - bufsize size; - - size = tcpip_read(&chandesc->chancap, buffer, sizeof(buffer)); - - dbprintf(("TcpIpReaderThread() read %d bytes\n", size)); - if (ERR_STATUS(size)) { - Error(("TCP/IP read failed (%s)\n", tcpip_why(ERR_CONVERT(size)))); - chandesc->status |= CONN_KILLED; - chandesc->status &= ~CONN_ALIVE; - chandesc->signal = -1; - thread_exit(); - } - - if (size == 0 || cb_puts(chandesc->circbuf, buffer, size)) { - if (size != 0) { - Error(("TCP/IP short write to circular buffer for %d\n", - XAmChanDescToFd(chandesc))); - } else { - Error(("TCP/IP read failed for client %d\n", - XAmChanDescToFd(chandesc))); - } - - chandesc->status |= CONN_KILLED; - chandesc->status &= ~CONN_ALIVE; - chandesc->signal = -1; - thread_exit(); - } - UnblockMain(XAmChanDescToFd(chandesc)); - } -} - -static XAmChanDesc * -AllocClientChannel() -{ - XAmChanDesc *chandesc; - int fd; - - chandesc = XAmAllocChanDesc(); - if (chandesc == NULL) { - return NULL; - } - - fd = XAmChanDescToFd(chandesc); - if (fd >= maxClient) { - maxClient = fd + 1; - dbprintf(("new max Client: %d\n", fd)); - } - if (fd < minClient) { - minClient = fd; - } - - return chandesc; -} - -static errstat -AmRegisterRPCconn(client_ports, server_ports) -am_port_t client_ports[2]; -am_port_t server_ports[2]; -{ - XAmChanDesc *chandesc; - - if ((chandesc = AllocClientChannel()) == NULL) { - return STD_NOSPACE; - } - - chandesc->type = ACDT_VIRTCIRC; - chandesc->virtcirc = vc_create(&server_ports[0], &server_ports[1], - MAXBUFSIZE, MAXBUFSIZE); - if (chandesc->virtcirc == NULL) { - Error(("Connection refused: No memory for virtual circuit\n")); - XAmFreeChanDesc(chandesc); - return STD_NOSPACE; - } - - dbprintf(("Amoeba connection registered\n")); - - vc_warn(chandesc->virtcirc, VC_IN, UnblockMain, XAmChanDescToFd(chandesc)); - - chandesc->status = CONN_INIT; - - /* cause WaitFor to call EstablishNewConnections: */ - nNewConns++; - WakeUpMainThread(); - - return STD_OK; -} - -static XAmChanDesc * -XAmFetchConnectingClient() -{ - XAmChanDesc *chandesc; - int fd; - - for (fd = minClient; fd < maxClient; fd++) { - chandesc = XAmFdToChanDesc(fd); - - if (chandesc->status & CONN_INIT) { - Error(("Client %d is connecting\n", fd)); - chandesc->status &= ~CONN_INIT; - return chandesc; - } - } - - return NULL; -} - -static errstat -AmRegisterTCPconn(chancap) -capability *chancap; -{ - XAmChanDesc *chandesc, **param; - - if ((chandesc = AllocClientChannel()) == NULL) { - return STD_NOSPACE; - } - - chandesc->type = ACDT_TCPIP; - chandesc->chancap = *chancap; - - if ((chandesc->circbuf = cb_alloc(MAXBUFSIZE)) == NULL) { - Error(("TCPconn refused: No memory for circular buffer\n")); - XAmFreeChanDesc(chandesc); - return STD_NOSPACE; - } - - chandesc->signal = sig_uniq(); - param = (XAmChanDesc **) xalloc(sizeof(XAmChanDesc *)); /* error checking? */ - *param = chandesc; - if (thread_newthread(TcpIpReaderThread, MAXBUFSIZE + CONNECTOR_STACK, - (char *)param, sizeof(XAmChanDesc *)) == 0) - { - Error(("TCPconn refused: Cannot start reader thread\n")); - cb_close(chandesc->circbuf); - cb_free(chandesc->circbuf); - XAmFreeChanDesc(chandesc); - return STD_NOSPACE; - } - - dbprintf(("TCP connection registered\n")); - - chandesc->status = CONN_INIT; - - /* cause WaitFor to call EstablishNewConnections: */ - nNewConns++; - WakeUpMainThread(); - - return STD_OK; -} - - -/* - * Establishing a new connection is done in two phases. This thread does the - * first part. It filters out bad connect requests. A new rendevous port is - * sent to the client and the main loop is informed if there is a legal - * request. The sleep synchronizes with the main loop so that the paperwork - * is finished for the current connect request before the thread is ready to - * accept another connect. - */ -static void -AmConnectorThread() -{ - header req, rep; - am_port_t client_ports[2]; - am_port_t server_ports[2]; - short s; - char *repb; - extern CreateNewClient(); - - WaitForInitialization(); - dbprintf(("AmConnectorThread() running ...\n")); - if ((repb = (char *)xalloc(REPLY_BUFSIZE)) == NULL) { - Fatal(("Amoeba connector thread: malloc failed")); - } - for (;;) { - do { - req.h_port = X.cap_port; - s = getreq(&req, NILBUF, 0); - } while (ERR_CONVERT(s) == RPC_ABORTED); - if (ERR_STATUS(s)) - Fatal(("Amoeba connector thread: getreq failed")); - - /* TODO: check privilege fields here */ - - dbprintf(("AmConnectorThread() accepting a request\n")); - - switch (req.h_command) { - - case STD_INFO: - rep.h_status = STD_OK; - sprintf(repb, "X11R6 server on %s", XServerHostName); - rep.h_size = strlen(repb); - putrep(&rep, repb, rep.h_size); - break; - - case STD_STATUS: - rep.h_status = ConnectionStatus(&rep, repb, REPLY_BUFSIZE); - putrep(&rep, repb, rep.h_size); - break; - -#ifdef XSERV_t - case AX_SHUTDOWN: - rep.h_status = STD_OK; - putrep(&rep, NILBUF, 0); - GiveUp(SIGTERM); - break; - - case AX_REINIT: - rep.h_status = STD_OK; - putrep(&rep, NILBUF, 0); - AutoResetServer(SIGINT); - break; -#endif - - case AX_CONNECT: - uniqport(&client_ports[0]); - uniqport(&server_ports[1]); - priv2pub(&client_ports[0], &server_ports[0]); - priv2pub(&server_ports[1], &client_ports[1]); - - rep.h_status = AmRegisterRPCconn(client_ports, server_ports); - if (rep.h_status == STD_OK) { - putrep(&rep, (bufptr)client_ports, 2*sizeof(am_port_t)); - } else { - putrep(&rep, NILBUF, 0); - } - break; - - default: - rep.h_status = STD_COMBAD; - putrep(&rep, NILBUF, 0); - break; - } - } -} - -#ifdef XSERV_t - -/* - * To prevent the X-server from generating lots of error messages, - * in case the server is gone or when its full. - */ -#define LOOP_OPEN 1 -#define LOOP_SETCONF 2 -#define LOOP_LISTEN 4 - -extern char *display; /* The display number */ - -/* - * The TCP/IP connector thread listens to a well known port (6000 + - * display number) for connection request. When such a request arrives - * it allocates a communication structure and a reader thread. This - * thread prevents the main loop from blocking when there's no data. - */ -static void -AmTCPConnectorThread() -{ - capability svrcap, chancap; - nwio_tcpconf_t tcpconf; - nwio_tcpcl_t tcpconnopt; - char name[BUFSIZ]; - errstat err; - int result; - int looping = 0; - - strncpy(name, XTcpServerName, BUFSIZ); - if ((err = name_lookup(name, &svrcap)) != STD_OK) { - sprintf(name, "%s/%s", TCP_SVR_NAME, XTcpServerName); - if ((err = name_lookup(name, &svrcap)) != STD_OK) - Fatal(("Lookup %s failed: %s\n", XTcpServerName, err_why(err))); - } - - WaitForInitialization(); - dbprintf(("AmTCPConnectorThread() running ...\n")); - - for (;;) { - /* - * Listen to TCP/IP port X_TCP_PORT + display for connections. - * Some interesting actions have to be taken to keep this connection - * alive and kicking :-) - */ - if ((err = tcpip_open(&svrcap, &chancap)) != STD_OK) { - /* the server probably disappeared, just wait for it to return */ - if (looping & LOOP_OPEN) { - Error(("TCP/IP open failed: %s\n", tcpip_why(err))); - looping |= LOOP_OPEN; - } - sleep(60); - (void) name_lookup(name, &svrcap); - continue; - } - looping &= ~LOOP_OPEN; - - tcpconf.nwtc_locport = htons(X_TCP_PORT + atoi(display)); - tcpconf.nwtc_flags = NWTC_EXCL | NWTC_LP_SET | NWTC_UNSET_RA | - NWTC_UNSET_RP; - if ((err = tcp_ioc_setconf(&chancap, &tcpconf)) != STD_OK) { - /* couldn't configure, probably server space problem */ - if (looping & LOOP_SETCONF) { - Error(("TCP/IP setconf failed: %s\n", tcpip_why(err))); - looping |= LOOP_SETCONF; - } - std_destroy(&chancap); - sleep(60); - continue; - } - looping &= ~LOOP_SETCONF; - - tcpconnopt.nwtcl_flags = 0; - if ((err = tcp_ioc_listen(&chancap, &tcpconnopt)) != STD_OK) { - /* couldn't listen, definitely a server memory problem */ - if (looping & LOOP_LISTEN) { - Error(("TCP/IP listen failed: %s\n", tcpip_why(err))); - looping |= LOOP_LISTEN; - } - std_destroy(&chancap); - sleep(60); - continue; - } - looping &= ~LOOP_LISTEN; - - if ((err = tcpip_keepalive_cap(&chancap)) != STD_OK) { - Error(("TCP/IP keep alive failed: %s\n", tcpip_why(err))); - std_destroy(&chancap); - continue; - } - - err = AmRegisterTCPconn(&chancap); - if (err != STD_OK) { - Error(("AmRegisterTCPconn failed (%s)\n", err_why(err))); - std_destroy(&chancap); - } - } -} - -static void -AmStartXserverThreads(chandesc) -XAmChanDesc *chandesc; -{ - char host[100]; - errstat err; - capability pubX; - static int threadsStarted = 0; - - /* - * Each time the server is reset this routine is called to - * setup the new well known sockets. For Amoeba we'll just - * keep using the old threads that are already running. - */ - if (!threadsStarted) { - threadsStarted = 1; - - /* - * Create a new capability for this X server - */ - if (XServerHostName == NULL) - XServerHostName = getenv("XHOST"); - if (XServerHostName == NULL) { - Fatal(("XHOST not set, or server host name not given\n")); - } - sprintf(host, "%s/%s:%s", DEF_XSVRDIR, XServerHostName, display); - - uniqport(&X.cap_port); - priv2pub(&X.cap_port, &pubX.cap_port); - (void) name_delete(host); - if ((err = name_append(host, &pubX)) != 0) { - Error(("Cannot create capability %s: %s\n", host, err_why(err))); - exit(1); - } - - /* Allow WaitFor module to initialize */ - AmInitWaitFor(); - - /* Also, initialize main thread locking */ - InitMainThread(); - - /* Initialize and start IOP reader thread */ - InitializeIOPServerReader(); - - /* Start native Amoeba service threads */ - if (thread_newthread(AmConnectorThread, CONNECTOR_STACK, 0, 0) <= 0) { - Fatal(("Cannot start Amoeba connector thread\n")); - } - if (thread_newthread(AmConnectorThread, CONNECTOR_STACK, 0, 0) <= 0) { - Fatal(("Cannot start Amoeba connector thread\n")); - } - chandesc->type = ACDT_VIRTCIRC; - chandesc->status = CONN_ALIVE; - - /* - * Start TCP/IP service threads - */ - if (XTcpServerName) { - if (thread_newthread(AmTCPConnectorThread, - CONNECTOR_STACK, 0, 0) <= 0) - Fatal(("Cannot start TCP connector thread\n")); - if (thread_newthread(AmTCPConnectorThread, - CONNECTOR_STACK, 0, 0) <= 0) - Fatal(("Cannot start TCP connector thread\n")); - } - } -} - -int -AmFindReadyClients(pClientsReady, mask) -int *pClientsReady; -long *mask; -{ - /* Check for clients needing attention. They may have input, - * or they might be dying. Ignore the clients not present in - * the file descriptor bit vector `mask'. This is used for - * implementing server grabs. - * Returns the number of clients having data for us. - */ - extern int ConnectionTranslation[]; - XAmChanDesc *chandesc; - int fd; - int nready; - - /* Since we're scheduled non-preemptively by default, allow the - * listener threads to run first, if needed: - */ - threadswitch(); - - nready = 0; - for (fd = minClient; fd < maxClient; fd++) { - int which; - int n; - - if (fd > 0 && (fd % 32) == 0) { - /* switch to next fd mask */ - mask++; - } - - if ((*mask & (1L << fd)) == 0) { - dbprintf(("skip %d\n", fd)); - continue; - } - - chandesc = XAmFdToChanDesc(fd); - if (chandesc->state != ACDS_USED) { - dbprintf(("AmFindReady: fd %d not in use\n", fd)); - continue; - } - - which = ConnectionTranslation[fd]; - dbprintf(("checking client %d (fd %d) of %d\n", - fd, which, maxClient)); - - if (chandesc->status & CONN_KILLED) { - dbprintf(("conn killed; close client with fd %d\n", fd)); - CloseDownClient(clients[which]); - chandesc->status &= ~(CONN_KILLED | CONN_ALIVE); - continue; - } - - if ((chandesc->status & CONN_ALIVE) == 0) { - dbprintf(("conn with %d is not alive\n", fd)); - continue; - } - - /* see if there is data available */ - switch (chandesc->type) { - case ACDT_TCPIP: - n = cb_full(chandesc->circbuf); - break; - case ACDT_VIRTCIRC: - n = vc_avail(chandesc->virtcirc, VC_IN); - break; - default: - n = -1; - } - - if (n < 0) { - dbprintf(("avail %d; close client %d\n", n, which)); - CloseDownClient(clients[which]); - continue; - } else { - if (n > 0) { - *pClientsReady++ = which; - nready++; - dbprintf(("client %d has %d bytes available\n", which, n)); - } else { - dbprintf(("client %d has no data available\n", which, n)); - } - } - - /* Clients that already have (possibly inserted) data are found - * with help from io.c (the ClientsWithData bit array). - */ - } - - return nready; -} - -#endif /* XSERV_t */ - -#endif /* XSERV_t || FS_t */ - -static -TRANS(AmSetAddr)(ciptr, chandesc) - XtransConnInfo ciptr; - XAmChanDesc *chandesc; -{ - switch (chandesc->type) { - case ACDT_TCPIP: - /* should really ask the TCP/IP server */ - ciptr->family = AF_INET; - ciptr->addr = strdup("XXXXTODO"); - ciptr->addrlen = strlen("XXXXTODO"); - break; - case ACDT_VIRTCIRC: - /* For Amoeba connections the adress is not really used, - * so just fake something - */ - ciptr->family = AF_AMOEBA; - ciptr->addr = strdup("Amoeba"); - ciptr->addrlen = strlen(ciptr->addr); - break; - } -} - -#ifdef TRANS_SERVER - -static XtransConnInfo -TRANS(AMOpenCOTSServer)(thistrans, protocol, given_host, port) -Xtransport *thistrans; -char *protocol; -char *given_host; -char *port; -{ - XAmChanDesc *chandesc; - XtransConnInfo ciptr; - - PRMSG(2,"AMOpenCOTSServer(%s,%s,%s)\n", protocol, given_host, port); - - ciptr = (XtransConnInfo) xcalloc (1, sizeof(struct _XtransConnInfo)); - if (ciptr == NULL) { - PRMSG (1, "AMOpenCotsClient: malloc failed\n", 0, 0, 0); - return NULL; - } - - chandesc = XAmAllocChanDesc(); - if (chandesc == NULL) { - return NULL; - } - -#ifdef XSERV_t - AmStartXserverThreads(chandesc); -#endif - - chandesc->conninfo = ciptr; - ciptr->fd = XAmChanDescToFd(chandesc); - - TRANS(AmSetAddr)(ciptr, chandesc); - TRANS(AMGetPeerAddr)(ciptr); - - return ciptr; -} - -#endif /* TRANS_SERVER */ - - -#ifdef TRANS_CLIENT - -static XtransConnInfo -TRANS(AMOpenCLTSClient)(thistrans, protocol, host, port) -Xtransport *thistrans; -char *protocol; -char *host; -char *port; -{ - XtransConnInfo ciptr; - int i; - - PRMSG(1,"AMOpenCLTSClient(%d,%s,%s)\n", protocol, host, port ); - /* TODO */ - return NULL; -} - -#endif /* TRANS_CLIENT */ - - -#ifdef TRANS_SERVER - -static XtransConnInfo -TRANS(AMOpenCLTSServer)(thistrans, protocol, host, port) -Xtransport *thistrans; -char *protocol; -char *host; -char *port; -{ - XtransConnInfo ciptr; - int i; - - PRMSG(1,"AMOpenCLTSServer(%d,%s,%s)\n", protocol, host, port ); - /* TODO */ - return NULL; -} - -static int -TRANS(AMResetListener)(ciptr) -XtransConnInfo ciptr; -{ - PRMSG(2,"AMResetListener()\n", 0, 0, 0 ); - - /* nothing to do? */ - return 0; -} - -#endif /* TRANS_SERVER */ - -static -TRANS(AMSetOption)(ciptr, option, arg) -XtransConnInfo ciptr; -int option; -int arg; -{ - PRMSG(1,"AMSetOption(%d,%d,%d)\n", ciptr->fd, option, arg ); - /* TODO */ - return -1; -} - - -#ifdef TRANS_SERVER - -static -TRANS(AMCreateListener)(ciptr, req) -XtransConnInfo ciptr; -char *req; -{ - PRMSG(2,"AMCreateListener(%x->%d,%x)\n", ciptr, ciptr->fd, req ); - - /* Listener threads are already created at this point */ - return 0; -} - - -static XtransConnInfo -TRANS(AMAccept)(ciptr) -XtransConnInfo ciptr; -{ - XAmChanDesc *chandesc; - XtransConnInfo newciptr; - - PRMSG(2,"AMAccept(%x->%d)\n", ciptr, ciptr->fd, 0 ); - -#if defined(XSERV_t) || defined(FS_t) - chandesc = XAmFetchConnectingClient(); - if (chandesc == NULL) { - PRMSG (1, "AMAccept: no client waiting?\n", 0, 0, 0); - return NULL; - } - nNewConns--; - - newciptr = (XtransConnInfo) xcalloc (1, sizeof(struct _XtransConnInfo)); - if (newciptr == NULL) - { - PRMSG (1, "AMAccept: malloc failed\n", 0, 0, 0); - return NULL; - } - - newciptr->fd = XAmChanDescToFd(chandesc); - chandesc->conninfo = newciptr; - chandesc->status |= CONN_ALIVE; - - PRMSG(2,"AMAccept: OK: (%x->%d)\n", newciptr, newciptr->fd, 0 ); - - TRANS(AmSetAddr)(newciptr, chandesc); - TRANS(AMGetPeerAddr)(newciptr); - - return newciptr; -#else - return NULL; -#endif -} - -#endif /* TRANS_SERVER */ - - -#ifdef TRANS_CLIENT - -static -TRANS(AMConnect)(ciptr, host, port) -XtransConnInfo ciptr; -char *host; -char *port; -{ - /* If this function is called, we are already connected */ - PRMSG(2, "AMConnect(%d,%s)\n", ciptr->fd, host, 0); - return 0; -} - -#endif /* TRANS_CLIENT */ - - -int -TRANS(AmFdBytesReadable)(fd, count) -int fd; -BytesReadable_t *count; -{ - register XAmChanDesc *chandesc; - - PRMSG(2, "AmFdBytesReadable(%d,%x): ", fd, count, 0 ); - -#ifndef XSERV_t - /* give reader threads a chance: */ - threadswitch(); -#endif - - errno = 0; - chandesc = XAmFdToChanDesc(fd); - if (chandesc == NULL || chandesc->state != ACDS_USED) { - errno = EBADF; - *count = 0; - return -1; - } - - switch (chandesc->type) { - case ACDT_TCPIP: - *count = cb_full(chandesc->circbuf); - break; - case ACDT_VIRTCIRC: - *count = vc_avail(chandesc->virtcirc, VC_IN); - break; - } - - if (*count < 0) { - errno = (chandesc->state == ACDS_CLOSED) ? EINTR : EPIPE; - *count = 0; - return -1; - } - - PRMSG(2, "AMFdBytesReadable: %d\n", *count, 0, 0 ); - - return 0; -} - -static -TRANS(AMBytesReadable)(ciptr, count) -XtransConnInfo ciptr; -BytesReadable_t *count; -{ - return TRANS(AmFdBytesReadable)(ciptr->fd, count); -} - - -static -TRANS(AMRead)(ciptr, buf, count) -XtransConnInfo ciptr; -char *buf; -int count; -{ - int fdi; - register XAmChanDesc *chandesc; - register int rv; - BytesReadable_t avail; - - fdi = ciptr->fd; - PRMSG(2, "AMRead(%d,%x,%d)\n", ciptr->fd, buf, count ); - - errno = 0; - chandesc = XAmFdToChanDesc(fdi); - if (chandesc == NULL || chandesc->state != ACDS_USED) { - errno = EBADF; - return -1; - } - - /* do a non-blocking read (maybe only conditionally?) */ - if ((TRANS(AMBytesReadable)(ciptr, &avail)) == 0) { - if (avail <= 0) { - PRMSG(2, "AMRead: nothing available yet\n", 0, 0, 0); - errno = EAGAIN; - return 0; - } else if (count > avail) { - PRMSG(2, "AMRead(%d): only %d of %d available\n", - ciptr->fd, avail, count); - count = avail; /* just read amount available */ - } - } else { - PRMSG(1, "AMRead: ...BytesReadable failed\n", 0, 0, 0); - return -1; - } - - switch (chandesc->type) { - case ACDT_TCPIP: - rv = cb_gets(chandesc->circbuf, buf, count, count); - if (rv != count) { - if (rv == 0) { - fprintf(stderr, "Xlib: Cannot read circbuf\n"); - errno = EPIPE; - rv = -1; - } else { - fprintf(stderr, "Xlib: Cannot read circbuf (%d)\n", rv); - } - } - break; - - case ACDT_VIRTCIRC: - rv = vc_readall(chandesc->virtcirc, buf, count); - if (rv < 0) { - fprintf(stderr, "Xlib: Cannot read virtual circuit\n"); - errno = EPIPE; - rv = -1; - } - break; - } - - /* The circular buffer writer will only UP the semaphore when - * characters are available; we have to down it ourselfs. - */ - if (chandesc->sema && rv > 0) - sema_mdown(chandesc->sema, rv); - - PRMSG(2, "AMRead: %d bytes\n", rv, 0, 0); - - return rv; -} - - -static -TRANS(AMWrite)(ciptr, buf, count) -XtransConnInfo ciptr; -char *buf; -int count; -{ - register XAmChanDesc *chandesc; - register int written; - - PRMSG(2, "AMWrite(%d,%x,%d)\n", ciptr->fd, buf, count ); - - errno = 0; - written = 0; - - chandesc = XAmFdToChanDesc(ciptr->fd); - if (chandesc == NULL || chandesc->state != ACDS_USED) { - errno = EBADF; - return -1; - } - - switch (chandesc->type) { - case ACDT_TCPIP: - while (count > 0) { - bufsize bsize; - int wrcnt; - - wrcnt = count > TCPIP_BUFSIZE ? TCPIP_BUFSIZE : count; - bsize = tcpip_write(&chandesc->chancap, buf, wrcnt); - if (ERR_STATUS(bsize)) { - fprintf(stderr, "Xlib: TCP/IP write failed (%s)\n", - tcpip_why(ERR_CONVERT(bsize))); - errno = EPIPE; - return -1; - } - if (bsize != wrcnt) { - fprintf(stderr, - "Xlib: TCP/IP write failed (expected %d, wrote %d)\n", - (int)bsize, wrcnt); - errno = EPIPE; - return -1; - } - buf += bsize; - count -= (int) bsize; - written += (int) bsize; - } - break; - - case ACDT_VIRTCIRC: - if ((written = vc_write(chandesc->virtcirc, buf, count)) < 0) { - fprintf(stderr, "Xlib: virtual circuit write failed\n"); - errno = EPIPE; - return -1; - } - break; - } - - return written; -} - - -static -TRANS(AMReadv)(ciptr, iov, n) -XtransConnInfo ciptr; -struct iovec *iov; -int n; -{ - int i; - int count = 0, thiscount; - - PRMSG(2, "AMReadv(%d,%x,%d)\n", ciptr->fd, ciptr, n ); - - for (i = 0; i < n; i++, iov++) { - if (iov->iov_len) { - thiscount = TRANS(AMRead)(ciptr, iov->iov_base, iov->iov_len); - if (thiscount < 0) return thiscount; - count += thiscount; - if (thiscount < iov->iov_len) break; - } - } - - return count; -} - - -static -TRANS(AMWritev)(ciptr, iov, n) -XtransConnInfo ciptr; -struct iovec *iov; -int n; -{ - int i; - int count = 0, thiscount; - - PRMSG(2, "AMWritev(%d,%x,%d)\n", ciptr->fd, iov, n ); - - for (i = 0; i < n; i++, iov++) { - if (iov->iov_len) { - thiscount = TRANS(AMWrite)(ciptr, iov->iov_base, iov->iov_len); - if (thiscount < 0) - return thiscount; - count += thiscount; - if (thiscount < iov->iov_len) break; - } - } - - return count; -} - - -static -TRANS(AMDisconnect)(ciptr) -XtransConnInfo ciptr; -{ - register XAmChanDesc *chandesc; - - PRMSG(2, "AMDisconnect(%x->%d)\n", ciptr, ciptr->fd, 0 ); - - chandesc = XAmFdToChanDesc(ciptr->fd); - if (chandesc != NULL) { - switch (chandesc->type) { - case ACDT_TCPIP: - if (chandesc->signal != -1) { - sig_raise(chandesc->signal); - chandesc->signal = -1; - } - std_destroy(&chandesc->chancap); - break; - - case ACDT_VIRTCIRC: - vc_close(chandesc->virtcirc, VC_BOTH | VC_ASYNC); - break; - } -#ifdef XSERV_t - if (ciptr->fd == maxClient - 1) { - maxClient--; - /* we could look if maxClient can be reduced even more */ - } -#endif - XAmFreeChanDesc(chandesc); - } - - return 0; -} - - -static -TRANS(AMClose)(ciptr) -XtransConnInfo ciptr; -{ - PRMSG(2, "AMClose(%x->%d)\n", ciptr, ciptr->fd, 0 ); - - return TRANS(AMDisconnect)(ciptr); -} - - -Xtransport TRANS(AmConnFuncs) = { - /* Combined AMOEBA RPC/TCP Interface; maybe we should split this */ - "amcon", - 0, -#ifdef TRANS_CLIENT - TRANS(AMOpenCOTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(AMOpenCOTSServer), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(AMOpenCLTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(AMOpenCLTSServer), -#endif /* TRANS_SERVER */ - TRANS(AMSetOption), -#ifdef TRANS_SERVER - TRANS(AMCreateListener), - TRANS(AMResetListener), - TRANS(AMAccept), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(AMConnect), -#endif /* TRANS_CLIENT */ - TRANS(AMBytesReadable), - TRANS(AMRead), - TRANS(AMWrite), - TRANS(AMReadv), - TRANS(AMWritev), - TRANS(AMDisconnect), - TRANS(AMClose), -}; Index: xc/lib/xtrans/Xtransdnet.c diff -u xc/lib/xtrans/Xtransdnet.c:3.5 xc/lib/xtrans/Xtransdnet.c:3.6 --- xc/lib/xtrans/Xtransdnet.c:3.5 Wed Jan 17 14:43:46 2001 +++ xc/lib/xtrans/Xtransdnet.c Fri Dec 14 14:57:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtransdnet.c,v 1.3 2000/08/17 19:46:45 cpqbld Exp $ */ +/* $Xorg: Xtransdnet.c,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransdnet.c,v 3.5 2001/01/17 19:43:46 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransdnet.c,v 3.6 2001/12/14 19:57:05 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtransint.h diff -u xc/lib/xtrans/Xtransint.h:3.28 xc/lib/xtrans/Xtransint.h:3.31 --- xc/lib/xtrans/Xtransint.h:3.28 Wed Jan 17 14:43:46 2001 +++ xc/lib/xtrans/Xtransint.h Fri Dec 14 14:57:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtransint.h,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ +/* $Xorg: Xtransint.h,v 1.4 2001/02/09 02:04:06 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransint.h,v 3.28 2001/01/17 19:43:46 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransint.h,v 3.31 2001/12/14 19:57:05 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -85,12 +89,8 @@ #endif /* XTRANSDEBUG */ #include -#ifdef X_NOT_STDC_ENV -extern int errno; /* Internal system error number. */ -#endif #ifndef WIN32 -#ifndef MINIX #ifndef Lynx #include #else @@ -98,7 +98,6 @@ #endif #include #include -#endif #ifdef __EMX__ #include #endif @@ -183,9 +182,7 @@ #endif /* WIN32 */ -#ifndef NULL -#define NULL 0 -#endif +#include #ifdef X11_t #define X_TCP_PORT 6000 Index: xc/lib/xtrans/Xtranslcl.c diff -u xc/lib/xtrans/Xtranslcl.c:3.34 xc/lib/xtrans/Xtranslcl.c:3.37 --- xc/lib/xtrans/Xtranslcl.c:3.34 Wed Jan 17 14:43:47 2001 +++ xc/lib/xtrans/Xtranslcl.c Fri Dec 14 14:57:05 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtranslcl.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ +/* $Xorg: Xtranslcl.c,v 1.6 2001/02/09 02:04:06 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranslcl.c,v 3.34 2001/01/17 19:43:47 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranslcl.c,v 3.37 2001/12/14 19:57:05 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -275,12 +279,14 @@ TRANS(PTSOpenClient)(XtransConnInfo ciptr, char *port) { +#ifdef PTSNODENAME int fd,server,exitval,alarm_time,ret; char server_path[64]; char *slave, namelen; char buf[20]; /* MAX_PATH_LEN?? */ PFV savef; pid_t saved_pid; +#endif PRMSG(2,"PTSOpenClient(%s)\n", port, 0,0 ); @@ -415,9 +421,11 @@ TRANS(PTSOpenServer)(XtransConnInfo ciptr, char *port) { +#ifdef PTSNODENAME int fd, server; char server_path[64], *slave; int mode; +#endif PRMSG(2,"PTSOpenServer(%s)\n", port, 0,0 ); @@ -446,8 +454,8 @@ return(-1); } - if( (fd=open(server_path, O_RDWR)) >= 0 ) { #if 0 + if( (fd=open(server_path, O_RDWR)) >= 0 ) { /* * This doesn't prevent the server from starting up, and doesn't * prevent clients from trying to connect to the in-use PTS (which @@ -457,11 +465,10 @@ PRMSG(1, "PTSOpenServer: Remove %s if this is incorrect.\n", server_path, 0,0 ); close(fd); return(-1); + } #else - /* Just remove the old path (which is what happens with UNIXCONN) */ - ; + /* Just remove the old path (which is what happens with UNIXCONN) */ #endif - } unlink(server_path); @@ -618,10 +625,12 @@ TRANS(NAMEDOpenClient)(XtransConnInfo ciptr, char *port) { +#ifdef NAMEDNODENAME int fd; char server_path[64]; struct stat filestat; extern int isastream(); +#endif PRMSG(2,"NAMEDOpenClient(%s)\n", port, 0,0 ); @@ -636,7 +645,7 @@ (void) sprintf(server_path, "%s%s", NAMEDNODENAME, port); } } else { - (void) sprintf(server_path, "%s%d", NAMEDNODENAME, getpid()); + (void) sprintf(server_path, "%s%ld", NAMEDNODENAME, (long)getpid()); } if (stat(server_path, &filestat) < 0 ) { @@ -687,10 +696,12 @@ TRANS(NAMEDOpenServer)(XtransConnInfo ciptr, char *port) { +#ifdef NAMEDNODENAME int fd, pipefd[2]; char server_path[64]; struct stat sbuf; int mode; +#endif PRMSG(2,"NAMEDOpenServer(%s)\n", port, 0,0 ); @@ -705,7 +716,7 @@ (void) sprintf(server_path, "%s%s", NAMEDNODENAME, port); } } else { - (void) sprintf(server_path, "%s%d", NAMEDNODENAME, getpid()); + (void) sprintf(server_path, "%s%ld", NAMEDNODENAME, (long)getpid()); } #ifdef HAS_STICKY_DIR_BIT @@ -761,9 +772,7 @@ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0) { - PRMSG(1,"NAMEDOpenServer: failed to fill in addr info\n", - 0,0,0); - close(fd); + PRMSG(1,"NAMEDOpenServer: failed to fill in addr info\n", 0,0,0); return -1; } @@ -889,6 +898,7 @@ TRANS(ISCOpenClient)(XtransConnInfo ciptr, char *port) { +#ifdef ISCDEVNODENAME int fd,fds,server; char server_path[64]; char server_dev_path[64]; @@ -896,6 +906,7 @@ long temp; mode_t spmode; struct stat filestat; +#endif PRMSG(2,"ISCOpenClient(%s)\n", port, 0,0 ); @@ -1002,9 +1013,11 @@ TRANS(ISCOpenServer)(XtransConnInfo ciptr, char *port) { +#ifdef ISCDEVNODENAME int fd = -1,fds = -1; char server_path[64],server_unix_path[64]; unsigned int mode = 0; +#endif PRMSG(2,"ISCOpenServer(%s)\n", port, 0,0 ); @@ -1163,7 +1176,6 @@ - /* SCO */ #ifdef TRANS_CLIENT @@ -1172,6 +1184,7 @@ TRANS(SCOOpenClient)(XtransConnInfo ciptr, char *port) { +#ifdef SCORNODENAME int fd, server, fl, ret; char server_path[64]; struct strbuf ctlbuf; @@ -1179,6 +1192,7 @@ void (*savef)(); long temp; extern int getmsg(), putmsg(); +#endif PRMSG(2,"SCOOpenClient(%s)\n", port, 0,0 ); @@ -1255,10 +1269,12 @@ TRANS(SCOOpenServer)(XtransConnInfo ciptr, char *port) { +#ifdef SCORNODENAME char serverR_path[64]; char serverS_path[64]; int fdr = -1; int fds = -1; +#endif PRMSG(2,"SCOOpenServer(%s)\n", port, 0,0 ); @@ -1375,12 +1391,15 @@ #ifdef TRANS_REOPEN +#ifndef sun static int TRANS(PTSReopenServer)(XtransConnInfo ciptr, int fd, char *port) { +#ifdef PTSNODENAME char server_path[64]; +#endif PRMSG(2,"PTSReopenServer(%d,%s)\n", fd, port, 0 ); @@ -1395,7 +1414,7 @@ (void) sprintf(server_path, "%s%s", PTSNODENAME, port); } } else { - (void) sprintf(server_path, "%s%d", PTSNODENAME, getpid()); + (void) sprintf(server_path, "%s%ld", PTSNODENAME, (long)getpid()); } if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0) @@ -1410,11 +1429,15 @@ #endif /* !PTSNODENAME */ } +#endif /* !sun */ + static int TRANS(NAMEDReopenServer)(XtransConnInfo ciptr, int fd, char *port) { +#ifdef NAMEDNODENAME char server_path[64]; +#endif PRMSG(2,"NAMEDReopenServer(%s)\n", port, 0,0 ); @@ -1429,7 +1452,7 @@ (void) sprintf(server_path, "%s%s", NAMEDNODENAME, port); } } else { - (void) sprintf(server_path, "%s%d", NAMEDNODENAME, getpid()); + (void) sprintf(server_path, "%s%ld", NAMEDNODENAME, (long)getpid()); } if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0) @@ -1444,11 +1467,15 @@ #endif /* !NAMEDNODENAME */ } +#ifndef sun + static int TRANS(ISCReopenServer)(XtransConnInfo ciptr, int fd, char *port) { - char server_path[64],server_unix_path[64]; +#ifdef ISCDEVNODENAME + char server_path[64], server_unix_path[64]; +#endif PRMSG(2,"ISCReopenServer(%s)\n", port, 0,0 ); @@ -1461,8 +1488,7 @@ if (TRANS(FillAddrInfo) (ciptr, server_path, server_path) == 0) { - PRMSG(1,"ISCReopenServer: failed to fill in addr info\n", - 0,0,0); + PRMSG(1, "ISCReopenServer: failed to fill in addr info\n", 0,0,0); return 0; } @@ -1476,8 +1502,9 @@ TRANS(SCOReopenServer)(XtransConnInfo ciptr, int fd, char *port) { - char serverR_path[64]; - char serverS_path[64]; +#ifdef SCORNODENAME + char serverR_path[64], serverS_path[64]; +#endif PRMSG(2,"SCOReopenServer(%s)\n", port, 0,0 ); @@ -1487,11 +1514,10 @@ #else (void) sprintf(serverR_path, SCORNODENAME, port); (void) sprintf(serverS_path, SCOSNODENAME, port); - + if (TRANS(FillAddrInfo) (ciptr, serverS_path, serverR_path) == 0) { - PRMSG(1,"SCOReopenServer: failed to fill in addr info\n", - 0,0,0); + PRMSG(1, "SCOReopenServer: failed to fill in addr info\n", 0,0,0); return 0; } @@ -1500,6 +1526,8 @@ #endif /* SCORNODENAME */ } +#endif /* !sun */ + #endif /* TRANS_REOPEN */ @@ -1796,13 +1824,16 @@ xfree(freeXLOCAL); } +#define TYPEBUFSIZE 32 + +#ifdef TRANS_CLIENT + static LOCALtrans2dev * TRANS(LocalGetNextTransport)(void) { int i,j; char *typetocheck; -#define TYPEBUFSIZE 32 char typebuf[TYPEBUFSIZE]; PRMSG(3,"LocalGetNextTransport()\n", 0,0,0 ); @@ -1838,8 +1869,6 @@ #endif } -#ifdef TRANS_CLIENT - #ifdef NEED_UTSNAME #include #endif @@ -1882,7 +1911,6 @@ TRANS(LocalOpenClient)(int type, char *protocol, char *host, char *port) { - int fd = -1; LOCALtrans2dev *transptr; XtransConnInfo ciptr; int index; @@ -1979,7 +2007,7 @@ TRANS(LocalOpenServer)(int type, char *protocol, char *host, char *port) { - int i,fd = -1; + int i; XtransConnInfo ciptr; PRMSG(2,"LocalOpenServer(%d,%s,%s)\n", type, protocol, port); @@ -2044,7 +2072,7 @@ { XtransConnInfo ciptr; - int stat; + int stat = 0; PRMSG(2,"LocalReopenServer(%d,%d,%d)\n", type, index, fd); @@ -2232,7 +2260,7 @@ -static +static int TRANS(LocalSetOption)(XtransConnInfo ciptr, int option, int arg) { @@ -2244,7 +2272,7 @@ #ifdef TRANS_SERVER -static +static int TRANS(LocalCreateListener)(XtransConnInfo ciptr, char *port) { @@ -2293,7 +2321,7 @@ #ifdef TRANS_CLIENT -static +static int TRANS(LocalConnect)(XtransConnInfo ciptr, char *host, char *port) { Index: xc/lib/xtrans/Xtransmnx.c diff -u xc/lib/xtrans/Xtransmnx.c:3.3 xc/lib/xtrans/Xtransmnx.c:removed --- xc/lib/xtrans/Xtransmnx.c:3.3 Fri May 10 02:55:50 1996 +++ xc/lib/xtrans/Xtransmnx.c Fri Jan 18 15:23:51 2002 @@ -1,1639 +0,0 @@ -/* $XFree86: xc/lib/xtrans/Xtransmnx.c,v 3.3 1996/05/10 06:55:50 dawes Exp $ */ - -/* -Xtransmnx.c - -Created: 11 April 1994 by Philip Homburg -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct private -{ - int nonblocking; - - int read_inprogress; - char *read_buffer; - size_t read_bufsize; - size_t read_size; - size_t read_offset; - - int write_inprogress; - char *write_buffer; - size_t write_bufsize; - size_t write_size; - size_t write_offset; - int write_errno; - - int listen_completed; - u16_t listen_port; - XtransConnInfo listen_list; -}; -#define RD_BUFSIZE 1024 -#define WR_BUFSIZE 1024 - -static XtransConnInfo listen_list= NULL; - -static XtransConnInfo alloc_ConnInfo(Xtransport *thistrans); -static void free_ConnInfo(XtransConnInfo ciptr); -static struct private *alloc_private(size_t rd_size, size_t wr_size); -static void free_private(struct private *priv); -static void read_cb(nbio_ref_t ref, int res, int err); -static void write_cb(nbio_ref_t ref, int res, int err); -static void listen_cb(nbio_ref_t ref, int res, int err); -static int restart_listen(XtransConnInfo ciptr); - -#ifdef TRANS_CLIENT -static XtransConnInfo -TRANS(MnxTcpOpenCOTSClient) (thistrans, protocol, host, port) - -Xtransport *thistrans; -char *protocol; -char *host; -char *port; - -{ - XtransConnInfo ciptr; - char *tcp_device; - int s_errno; - int fd; - nbio_ref_t ref; - - - PRMSG(2, "MnxTcpOpenCOTSClient(%s,%s,%s)\n", - protocol, host, port); - - if ((ciptr= alloc_ConnInfo(thistrans)) == NULL) - { - PRMSG(1, - "MnxTcpOpenCOTSClient: alloc_ConnInfo failed\n", - 0, 0, 0); - return NULL; - } - if ((ciptr->priv= (char *)alloc_private(RD_BUFSIZE, WR_BUFSIZE)) == - NULL) - { - PRMSG(1, - "MnxTcpOpenCOTSClient: alloc_private() failed\n", - 0, 0, 0); - s_errno= errno; - free_ConnInfo(ciptr); - errno= s_errno; - return NULL; - } - - if ((tcp_device= getenv("TCP_DEVICE")) == NULL) - tcp_device= TCP_DEVICE; - PRMSG(4, "MnxTcpOpenCOTSClient: tcp_device= '%s'\n", - tcp_device, 0, 0); - - if ((fd= open(tcp_device, O_RDWR)) == -1) - { - PRMSG(1, - "MnxTcpOpenCOTSClient: open '%s' failed: %s\n", - tcp_device, strerror(errno), 0); - s_errno= errno; - free_ConnInfo(ciptr); - errno= s_errno; - return NULL; - } - ciptr->fd= fd; - ref.ref_ptr= ciptr; - nbio_register(fd); - nbio_setcallback(fd, ASIO_READ, read_cb, ref); - nbio_setcallback(fd, ASIO_WRITE, write_cb, ref); - return ciptr; -} -#endif /* TRANS_CLIENT */ - -#ifdef TRANS_SERVER -static XtransConnInfo -TRANS(MnxTcpOpenCOTSServer) (thistrans, protocol, host, port) - -Xtransport *thistrans; -char *protocol; -char *host; -char *port; - -{ - XtransConnInfo ciptr; - char *tcp_device; - int s_errno; - int fd; - nbio_ref_t ref; - - - PRMSG(2, "MnxTcpOpenCOTSServer(%s,%s,%s)\n", - protocol, host, port); - - if ((ciptr= alloc_ConnInfo(thistrans)) == NULL) - { - PRMSG(1, - "MnxTcpOpenCOTSServer: alloc_ConnInfo failed\n", - 0, 0, 0); - return NULL; - } - if ((ciptr->priv= (char *)alloc_private(RD_BUFSIZE, WR_BUFSIZE)) == - NULL) - { - PRMSG(1, - "MnxTcpOpenCOTSServer: alloc_private() failed\n", - 0, 0, 0); - s_errno= errno; - free_ConnInfo(ciptr); - errno= s_errno; - return NULL; - } - - if ((tcp_device= getenv("TCP_DEVICE")) == NULL) - tcp_device= TCP_DEVICE; - PRMSG(4, "MnxTcpOpenCOTSServer: tcp_device= '%s'\n", - tcp_device, 0, 0); - - if ((fd= open(tcp_device, O_RDWR)) == -1) - { - PRMSG(1, - "MnxTcpOpenCOTSServer: open '%s' failed: %s\n", - tcp_device, strerror(errno), 0); - s_errno= errno; - free_ConnInfo(ciptr); - errno= s_errno; - return NULL; - } - PRMSG(5, "MnxTcpOpenCOTSServer: fd= '%d'\n", fd, 0, 0); - ciptr->fd= fd; - ref.ref_ptr= ciptr; - nbio_register(fd); - nbio_setcallback(fd, ASIO_IOCTL, listen_cb, ref); - return ciptr; -} -#endif /* TRANS_SERVER */ - -#ifdef TRANS_CLIENT -static XtransConnInfo -TRANS(MnxTcpOpenCLTSClient) (thistrans, protocol, host, port) - -Xtransport *thistrans; -char *protocol; -char *host; -char *port; - -{ - abort(); -} -#endif /* TRANS_CLIENT */ - -#ifdef TRANS_SERVER -static XtransConnInfo -TRANS(MnxTcpOpenCLTSServer) (thistrans, protocol, host, port) - -Xtransport *thistrans; -char *protocol; -char *host; -char *port; - -{ - abort(); -} -#endif /* TRANS_SERVER */ - -#ifdef TRANS_REOPEN - -static XtransConnInfo -TRANS(MnxTcpReopenCOTSServer) (thistrans, fd, port) - -Xtransport *thistrans; -int fd; -char *port; - -{ - XtransConnInfo ciptr; - int i; - - PRMSG (2, - "MnxTcpReopenCOTSServer(%d, %s)\n", fd, port, 0); - - abort(); -} - -static XtransConnInfo -TRANS(MnxTcpReopenCLTSServer) (thistrans, fd, port) - -Xtransport *thistrans; -int fd; -char *port; - -{ - XtransConnInfo ciptr; - int i; - - - PRMSG (2, - "MnxTcpReopenCLTSServer(%d, %s)\n", fd, port, 0); - - abort(); -} - -#endif /* TRANS_REOPEN */ - - - -static int -TRANS(MnxTcpSetOption) (ciptr, option, arg) - -XtransConnInfo ciptr; -int option; -int arg; - -{ - int flags; - struct private *priv; - - PRMSG(2, "MnxTcpSetOption(%d,%d,%d)\n", - ciptr->fd, option, arg); - - priv= (struct private *)ciptr->priv; - switch(option) - { - case TRANS_NONBLOCKING: - flags= fcntl(ciptr->fd, F_GETFD); - if (flags == -1) - { - PRMSG(1, - "MnxTcpSetOption: fcntl F_GETFD failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - if (arg == 0) - flags &= ~FD_ASYNCHIO; - else if (arg == 1) - flags |= FD_ASYNCHIO; - else - { - PRMSG(1, - "MnxTcpSetOption: bad arg for TRANS_NONBLOCKING: %d\n", - arg, 0, 0); - return -1; - } - if (fcntl(ciptr->fd, F_SETFD, flags) == -1) - { - PRMSG(1, - "MnxTcpSetOption: fcntl F_SETFD failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - priv->nonblocking= arg; - return 0; - case TRANS_CLOSEONEXEC: - flags= fcntl(ciptr->fd, F_GETFD); - if (flags == -1) - { - PRMSG(1, - "MnxTcpSetOption: fcntl F_GETFD failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - if (arg == 0) - flags &= ~FD_CLOEXEC; - else if (arg == 1) - flags |= FD_CLOEXEC; - else - { - PRMSG(1, - "MnxTcpSetOption: bad arg for TRANS_CLOSEONEXEC: %d\n", - arg, 0, 0); - return -1; - } - if (fcntl(ciptr->fd, F_SETFD, flags) == -1) - { - PRMSG(1, - "MnxTcpSetOption: fcntl F_SETFD failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - return 0; - default: - PRMSG(1, "MnxTcpSetOption: unknown option '%d'\n", - option, 0, 0); - errno= EINVAL; - return -1; - } -} - - -#ifdef TRANS_SERVER -static int -TRANS(MnxTcpCreateListener) (ciptr, port) - -XtransConnInfo ciptr; -char *port; - -{ - struct servent *servp; - tcpport_t num_port; - char *check; - nwio_tcpconf_t tcpconf; - nwio_tcpcl_t tcpcl; - int r, s_errno, flags; - struct private *priv; - struct sockaddr_in *addr; - - PRMSG(2, "MnxTcpCreateListener(%d,%s)\n", ciptr->fd, port, 0); - - priv= (struct private *)ciptr->priv; - - if (port == NULL) - num_port= 0; - else - { - num_port= strtol(port, &check, 10); - num_port= htons(num_port); - if (check[0] == '\0') - port= NULL; - } - -#ifdef X11_t - /* - * X has a well known port, that is transport dependent. It is easier - * to handle it here, than try and come up with a transport independent - * representation that can be passed in and resolved the usual way. - * - * The port that is passed here is really a string containing the - * idisplay from ConnectDisplay(). - */ - if (port == NULL) - num_port= htons(ntohs(num_port) + X_TCP_PORT); -#endif - if (port != NULL) - { - if ((servp = getservbyname (port, "tcp")) == NULL) - { - PRMSG(1, - "MnxTcpCreateListener: can't get service for %s\n", - port, 0, 0); - errno= EINVAL; - return TRANS_CREATE_LISTENER_FAILED; - } - num_port= servp->s_port; - } - - tcpconf.nwtc_flags= NWTC_SHARED | NWTC_UNSET_RA | NWTC_UNSET_RP; - if (num_port != 0) - { - tcpconf.nwtc_locport= num_port; - tcpconf.nwtc_flags |= NWTC_LP_SET; - } - else - tcpconf.nwtc_flags |= NWTC_LP_SEL; - - if (ioctl(ciptr->fd, NWIOSTCPCONF, &tcpconf) == -1) - { - PRMSG(1, - "MnxTcpCreateListener: NWIOSTCPCONF failed: %s\n", - strerror(errno),0, 0); - return TRANS_CREATE_LISTENER_FAILED; - } - - if (ioctl(ciptr->fd, NWIOGTCPCONF, &tcpconf) == -1) - { - PRMSG(1, - "MnxTcpListen: NWIOGTCPCONF failed: %s\n", - strerror(errno),0, 0); - return TRANS_CREATE_LISTENER_FAILED; - } - - priv->listen_port= tcpconf.nwtc_locport; - - if ((addr= (struct sockaddr_in *)xalloc(sizeof(struct sockaddr_in))) - == NULL) - { - PRMSG(1, "MnxTcpAccept: malloc failed\n", 0, 0, 0); - return TRANS_CREATE_LISTENER_FAILED; - } - addr->sin_family= AF_INET; - addr->sin_addr.s_addr= tcpconf.nwtc_locaddr; - addr->sin_port= tcpconf.nwtc_locport; - if (ciptr->addr) - xfree(ciptr->addr); - ciptr->addr= (char *)addr; - ciptr->addrlen= sizeof(struct sockaddr_in); - - flags= fcntl(ciptr->fd, F_GETFD); - if (flags == -1) - { - PRMSG(1, - "MnxTcpCreateListener: fcntl F_GETFD failed: %s\n", - strerror(errno), 0, 0); - return TRANS_CREATE_LISTENER_FAILED; - } - if (fcntl(ciptr->fd, F_SETFD, flags | FD_ASYNCHIO) == -1) - { - PRMSG(1, - "MnxTcpCreateListener: fcntl F_SETFD failed: %s\n", - strerror(errno), 0, 0); - return TRANS_CREATE_LISTENER_FAILED; - } - - tcpcl.nwtcl_flags= 0; - r= ioctl(ciptr->fd, NWIOTCPLISTEN, &tcpcl); - s_errno= errno; - - if (fcntl(ciptr->fd, F_SETFD, flags) == -1) - { - PRMSG(1, - "MnxTcpCreateListener: fcntl F_SETFD failed: %s\n", - strerror(errno), 0, 0); - return TRANS_CREATE_LISTENER_FAILED; - } - - if (r == -1 && s_errno == EINPROGRESS) - { - nbio_inprogress(ciptr->fd, ASIO_IOCTL, 1 /* read */, - 1 /* write */, 0 /* exception */); - return 0; - } - if (r == 0) - { - priv->listen_completed= 1; - return 0; - } - - errno= s_errno; - PRMSG(1, "MnxTcpCreateListener: NWIOTCPLISTEN failed: %s\n", - strerror(errno), 0, 0); - return TRANS_CREATE_LISTENER_FAILED; -} -#endif /* TRANS_SERVER */ - - -#ifdef TRANS_SERVER -static int -TRANS(MnxTcpResetListener) (ciptr) - -XtransConnInfo ciptr; -{ - PRMSG(2, "MnxTcpResetListener(%d)\n", ciptr->fd, 0, 0); - return TRANS_RESET_NOOP; -} -#endif /* TRANS_SERVER */ - -#ifdef TRANS_SERVER -static XtransConnInfo -TRANS(MnxTcpAccept) (ciptr_listen, status) - -XtransConnInfo ciptr_listen; -int *status; - -{ - XtransConnInfo ciptr; - int s_errno; - int fd; - nbio_ref_t ref; - struct private *priv; - nwio_tcpconf_t tcpconf; - struct sockaddr_in *addr; - - PRMSG(2, "MnxTcpAccept(%d,%p)\n", ciptr_listen->fd, status, 0); - - priv= (struct private *)ciptr_listen->priv; - *status= TRANS_ACCEPT_MISC_ERROR; - - if (!priv->listen_completed) - { - PRMSG(1, "MnxTcpAccept: listen is not completed\n", - 0, 0, 0); - *status= TRANS_ACCEPT_FAILED; - return NULL; - } - priv->listen_completed= 0; - - if ((ciptr= alloc_ConnInfo(ciptr_listen->transptr)) == NULL) - { - PRMSG(1, - "MnxTcpAccept: alloc_ConnInfo failed\n", - 0, 0, 0); - *status= TRANS_ACCEPT_BAD_MALLOC; - return NULL; - } - if ((ciptr->priv= (char *)alloc_private(RD_BUFSIZE, WR_BUFSIZE)) == - NULL) - { - PRMSG(1, - "MnxTcpAccept: alloc_private() failed\n", - 0, 0, 0); - s_errno= errno; - free_ConnInfo(ciptr); - errno= s_errno; - *status= TRANS_ACCEPT_BAD_MALLOC; - return NULL; - } - - fd= dup(ciptr_listen->fd); - if (fd == -1) - { - s_errno= errno; - PRMSG(1, "MnxTcpAccept: dup failed: %s\n", - strerror(errno), 0, 0); - free_ConnInfo(ciptr); - *status= TRANS_ACCEPT_FAILED; - return NULL; - } - if (restart_listen(ciptr_listen) == -1) - { - priv->listen_list= listen_list; - listen_list= ciptr_listen; - PRMSG(1, "MnxTcpAccept: unable to restart listen\n", - 0, 0, 0); - } - ciptr->fd= fd; - ref.ref_ptr= ciptr; - nbio_register(fd); - nbio_setcallback(fd, ASIO_WRITE, write_cb, ref); - nbio_setcallback(fd, ASIO_READ, read_cb, ref); - - if (ioctl(ciptr->fd, NWIOGTCPCONF, &tcpconf) == -1) - { - PRMSG(1, "MnxTcpAccept: NWIOGTCPCONF failed: %s\n", - strerror(errno),0, 0); - close(fd); - free_ConnInfo(ciptr); - *status= TRANS_ACCEPT_MISC_ERROR; - return NULL; - } - if ((addr= (struct sockaddr_in *)xalloc(sizeof(struct sockaddr_in))) - == NULL) - { - PRMSG(1, "MnxTcpAccept: malloc failed\n", 0, 0, 0); - close(fd); - free_ConnInfo(ciptr); - *status= TRANS_ACCEPT_BAD_MALLOC; - return NULL; - } - addr->sin_family= AF_INET; - addr->sin_addr.s_addr= tcpconf.nwtc_locaddr; - addr->sin_port= tcpconf.nwtc_locport; - if (ciptr->addr) - xfree(ciptr->addr); - ciptr->addr= (char *)addr; - ciptr->addrlen= sizeof(struct sockaddr_in); - if (*(u8_t *)&tcpconf.nwtc_remaddr == 127) - { - /* Make ConvertAddress return FamilyLocal */ - addr->sin_addr.s_addr= tcpconf.nwtc_remaddr; - } - - if ((addr= (struct sockaddr_in *)xalloc(sizeof(struct sockaddr_in))) - == NULL) - { - PRMSG(1, "MnxTcpConnect: malloc failed\n", 0, 0, 0); - close(fd); - free_ConnInfo(ciptr); - *status= TRANS_ACCEPT_BAD_MALLOC; - return NULL; - } - addr->sin_family= AF_INET; - addr->sin_addr.s_addr= tcpconf.nwtc_remaddr; - addr->sin_port= tcpconf.nwtc_remport; - ciptr->peeraddr= (char *)addr; - ciptr->peeraddrlen= sizeof(struct sockaddr_in); - *status= 0; - return ciptr; -} -#endif /* TRANS_SERVER */ - -TRANS(MnxTcpConnect) (ciptr, host, port) - -XtransConnInfo ciptr; -char *host; -char *port; - -{ - struct hostent *hostp; - struct servent *servp; - char hostnamebuf[256]; /* tmp space */ - tcpport_t num_port; - ipaddr_t num_addr; - char *check; - nwio_tcpconf_t tcpconf; - nwio_tcpcl_t tcpcl; - struct sockaddr_in *addr; - - PRMSG(2, "MnxTcpConnect(%d,%s,%s)\n", ciptr->fd, host, port); - - if (!host) - { - hostnamebuf[0] = '\0'; - (void) TRANS(GetHostname) (hostnamebuf, sizeof hostnamebuf); - host = hostnamebuf; - } - - - num_port= strtol(port, &check, 10); - num_port= htons(num_port); - if (check[0] == '\0') - port= NULL; -#ifdef X11_t - /* - * X has a well known port, that is transport dependent. It is easier - * to handle it here, than try and come up with a transport independent - * representation that can be passed in and resolved the usual way. - * - * The port that is passed here is really a string containing the - * idisplay from ConnectDisplay(). - */ - if (port == NULL) - num_port= htons(ntohs(num_port) + X_TCP_PORT); -#endif - - num_addr= inet_addr(host); - if (num_addr != -1) - host= NULL; - - if (host != NULL) - { - if ((hostp = gethostbyname(host)) == NULL) - { - PRMSG(1, - "MnxTcpConnect: can't get address for %s\n", - host, 0, 0); - errno= EINVAL; - return TRANS_CONNECT_FAILED; - } - if (hostp->h_addrtype != AF_INET) /* is IP host? */ - { - PRMSG(1, "MnxTcpConnect: %s in not an INET host\n", - host, 0, 0); - errno= EINVAL; - return TRANS_CONNECT_FAILED; - } - num_addr= *(ipaddr_t *)hostp->h_addr; - } - - if (port != NULL) - { - if ((servp = getservbyname (port, "tcp")) == NULL) - { - PRMSG(1, - "MnxTcpConnect: can't get service for %s\n", - port, 0, 0); - errno= EINVAL; - return TRANS_CONNECT_FAILED; - } - num_port= servp->s_port; - } - - tcpconf.nwtc_flags= NWTC_EXCL | NWTC_LP_SEL | NWTC_SET_RA | - NWTC_SET_RP; - tcpconf.nwtc_remaddr= num_addr; - tcpconf.nwtc_remport= num_port; - if (ioctl(ciptr->fd, NWIOSTCPCONF, &tcpconf) == -1) - { - PRMSG(1, "MnxTcpConnect: NWIOSTCPCONF failed: %s\n", - strerror(errno),0, 0); - return TRANS_CONNECT_FAILED; - } - - tcpcl.nwtcl_flags= 0; - if (ioctl(ciptr->fd, NWIOTCPCONN, &tcpcl) == -1) - { - PRMSG(1, "MnxTcpConnect: connect failed: %s\n", - strerror(errno),0, 0); - if (errno == ECONNREFUSED || errno == EINTR) - return TRANS_TRY_CONNECT_AGAIN; - else - return TRANS_CONNECT_FAILED; - } - - if (ioctl(ciptr->fd, NWIOGTCPCONF, &tcpconf) == -1) - { - PRMSG(1, "MnxTcpConnect: NWIOGTCPCONF failed: %s\n", - strerror(errno),0, 0); - return TRANS_CONNECT_FAILED; - } - if ((addr= (struct sockaddr_in *)xalloc(sizeof(struct sockaddr_in))) - == NULL) - { - PRMSG(1, "MnxTcpConnect: malloc failed\n", 0, 0, 0); - return TRANS_CONNECT_FAILED; - } - addr->sin_family= AF_INET; - addr->sin_addr.s_addr= tcpconf.nwtc_locaddr; - addr->sin_port= tcpconf.nwtc_locport; - ciptr->addr= (char *)addr; - ciptr->addrlen= sizeof(struct sockaddr_in); - if (*(u8_t *)&tcpconf.nwtc_remaddr == 127) - { - /* Make ConvertAddress return FamilyLocal */ - addr->sin_addr.s_addr= tcpconf.nwtc_remaddr; - } - - if ((addr= (struct sockaddr_in *)xalloc(sizeof(struct sockaddr_in))) - == NULL) - { - PRMSG(1, "MnxTcpConnect: malloc failed\n", 0, 0, 0); - return TRANS_CONNECT_FAILED; - } - addr->sin_family= AF_INET; - addr->sin_addr.s_addr= tcpconf.nwtc_remaddr; - addr->sin_port= tcpconf.nwtc_remport; - ciptr->peeraddr= (char *)addr; - ciptr->peeraddrlen= sizeof(struct sockaddr_in); - - return 0; -} - -static int -TRANS(MnxTcpBytesReadable) (ciptr, pend) - -XtransConnInfo ciptr; -BytesReadable_t *pend; - -{ - struct private *priv; - int r; - - PRMSG(2, "MnxTcpBytesReadable(%x,%d,%x)\n", - ciptr, ciptr->fd, pend); - - *pend= 0; - - priv= (struct private *)ciptr->priv; - if (priv->read_inprogress) - { - PRMSG(5, "MnxTcpBytesReadable: read inprogress, %d\n", - *pend, 0, 0); - return *pend; - } - if (priv->read_offset < priv->read_size) - { - *pend= priv->read_size-priv->read_offset; - PRMSG(5, "MnxTcpBytesReadable: %d\n", - *pend, 0, 0); - return *pend; - } - priv->read_offset= 0; - r= read(ciptr->fd, priv->read_buffer, priv->read_bufsize); - if (r >= 0) - { - if (r == 0) - r= 1; /* Signal EOF condition */ - - priv->read_size= r; - PRMSG(5, "MnxTcpBytesReadable: %d\n", - *pend, 0, 0); - *pend= r; - } - else if (r == -1 && errno == EINPROGRESS) - { - priv->read_inprogress= 1; - nbio_inprogress(ciptr->fd, ASIO_READ, 1 /* read */, - 0 /* write */, 0 /* exception */); - } - else - { - PRMSG(1, "MnxTcpBytesReadable: read failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - PRMSG(5, "MnxTcpBytesReadable: %d\n", *pend, 0, 0); - return *pend; -} - - -static int -TRANS(MnxTcpRead) (ciptr, buf, size) - -XtransConnInfo ciptr; -char *buf; -int size; - -{ - int len, r, ret, s_errno; - int offset; - struct private *priv; - asio_fd_set_t fd_set; - fwait_t fw; - - PRMSG(2, "MnxTcpRead(%d,%x,%d)\n", ciptr->fd, buf, size); - - priv= (struct private *)ciptr->priv; - offset= 0; - - if (priv->read_inprogress) - { - PRMSG(5, "MnxTcpRead: EAGAIN\n", 0, 0, 0); - errno= EAGAIN; - return -1; - } - - /* Copy any data left in the buffer */ - if (priv->read_offset < priv->read_size) - { - len= priv->read_size-priv->read_offset; - if (len > size-offset) - len= size-offset; - PRMSG(5, "MnxTcpRead: copying %d bytes\n", len, 0, 0); - - memcpy(buf+offset, priv->read_buffer + priv->read_offset, - len); - offset += len; - priv->read_offset += len; - if (priv->read_offset < priv->read_size) - return offset; - } - - /* Try to read directly into the user's buffer. */ - ret= 0; - s_errno= 0; - while(offset < size) - { - r= read(ciptr->fd, buf+offset, size-offset); - if (r == -1 && errno == EINPROGRESS) - { - r= fcancel(ciptr->fd, ASIO_READ); - if (r == -1) - abort(); - ASIO_FD_ZERO(&fd_set); - ASIO_FD_SET(ciptr->fd, ASIO_READ, &fd_set); - fw.fw_flags= FWF_NONBLOCK; - fw.fw_bits= fd_set.afds_bits; - fw.fw_maxfd= ASIO_FD_SETSIZE; - r= fwait(&fw); - if (r == -1 || fw.fw_fd != ciptr->fd || - fw.fw_operation != ASIO_READ) - { - abort(); - } - r= fw.fw_result; - errno= fw.fw_errno; - } - - if (r > 0) - { - PRMSG(5, "MnxTcpRead: read %d bytes\n", r, - 0, 0); - offset += r; - continue; - } - else if (r == 0) - { - PRMSG(5, "MnxTcpRead: read EOF\n", 0, 0, 0); - break; - } - else - { - if (errno == EINTR) - { - PRMSG(5, "MnxTcpRead: EINTR\n", - 0, 0, 0); - errno= EAGAIN; - } - else - { - PRMSG(1, "MnxTcpRead: read error %s\n", - strerror(errno), 0, 0); - } - s_errno= errno; - ret= -1; - break; - } - } - if (offset != 0) - ret= offset; - - if (priv->read_offset != priv->read_size) - abort(); - priv->read_offset= 0; - priv->read_size= 0; - if (priv->nonblocking) - { - r= read(ciptr->fd, priv->read_buffer, priv->read_bufsize); - if (r >= 0) - { - PRMSG(5, "MnxTcpRead: buffered %d bytes\n", - r, 0, 0); - priv->read_size= r; - } - else if (r == -1 && errno == EINPROGRESS) - { - priv->read_inprogress= 1; - nbio_inprogress(ciptr->fd, ASIO_READ, 1 /* read */, - 0 /* write */, 0 /* exception */); - } - else - { - PRMSG(1, "MnxTcpRead: read failed: %s\n", - strerror(errno), 0, 0); - } - } - errno= s_errno; - return ret; -} - - -static int -TRANS(MnxTcpWrite) (ciptr, buf, size) - -XtransConnInfo ciptr; -char *buf; -int size; - -{ - int len, r, ret, s_errno; - int offset; - struct private *priv; - asio_fd_set_t fd_set; - fwait_t fw; - - PRMSG(2, "MnxTcpWrite(%d,%x,%d)\n", ciptr->fd, buf, size); - - priv= (struct private *)ciptr->priv; - offset= 0; - - if (priv->write_errno) - { - PRMSG(5, "MnxTcpWrite: write_errno %d\n", - priv->write_errno, 0, 0); - errno= priv->write_errno; - return -1; - } - - if (priv->write_inprogress) - { - PRMSG(5, "MnxTcpWrite: EAGAIN\n", 0, 0, 0); - errno= EAGAIN; - return -1; - } - - /* Try to write directly out of the user's buffer. */ - ret= 0; - s_errno= 0; - while(offset < size) - { - r= write(ciptr->fd, buf+offset, size-offset); - if (r == -1 && errno == EINPROGRESS) - { - r= fcancel(ciptr->fd, ASIO_WRITE); - if (r == -1) - abort(); - ASIO_FD_ZERO(&fd_set); - ASIO_FD_SET(ciptr->fd, ASIO_WRITE, &fd_set); - fw.fw_flags= FWF_NONBLOCK; - fw.fw_bits= fd_set.afds_bits; - fw.fw_maxfd= ASIO_FD_SETSIZE; - r= fwait(&fw); - if (r == -1 || fw.fw_fd != ciptr->fd || - fw.fw_operation != ASIO_WRITE) - { - abort(); - } - r= fw.fw_result; - errno= fw.fw_errno; - } - if (r > 0) - { - PRMSG(5, "MnxTcpWrite: wrote %d bytes\n", r, - 0, 0); - offset += r; - continue; - } - else if (r == 0) - abort(); - else - { - if (errno == EINTR) - { - PRMSG(5, "MnxTcpWrite: EINTR\n", - 0, 0, 0); - errno= EAGAIN; - } - else - { - PRMSG(1, - "MnxTcpWrite: write error: %s\n", - strerror(errno), 0, 0); - } - s_errno= errno; - ret= -1; - break; - } - } - - /* Copy any data to the buffer */ - if (offset < size) - { - len= priv->write_bufsize; - if (len > size-offset) - len= size-offset; - PRMSG(5, "MnxTcpWrite: copying %d bytes\n", len, 0, 0); - - memcpy(priv->write_buffer, buf+offset, len); - offset += len; - priv->write_offset= 0; - priv->write_size= len; - } - if (offset != 0) - ret= offset; - - while (priv->write_offset < priv->write_size) - { - r= write(ciptr->fd, priv->write_buffer+priv->write_offset, - priv->write_size-priv->write_offset); - if (r > 0) - { - PRMSG(5, "MnxTcpWrite: wrote %d bytes\n", - r, 0, 0); - priv->write_offset += r; - continue; - } - else if (r == -1 && errno == EINPROGRESS) - { - priv->write_inprogress= 1; - nbio_inprogress(ciptr->fd, ASIO_WRITE, 0 /* read */, - 1 /* write */, 0 /* exception */); - } - else - { - PRMSG(1, "MnxTcpWrite: write failed: %s\n", - strerror(errno), 0, 0); - priv->write_errno= errno; - } - break; - } - - errno= s_errno; - return ret; -} - - -static int -TRANS(MnxTcpReadv) (ciptr, buf, size) - -XtransConnInfo ciptr; -struct iovec *buf; -int size; - -{ - int i, offset, total, len, r; - - PRMSG(2, "MnxTcpReadv(%d,%x,%d)\n", ciptr->fd, buf, size); - - /* Simply call read a number of times. */ - total= 0; - offset= 0; - i= 0; - while(i= buf[i].iov_len) - { - offset= 0; - i++; - continue; - } - len= buf[i].iov_len-offset; - r= TRANS(MnxTcpRead)(ciptr, buf[i].iov_base+offset, len); - if (r == -1) - { - if (errno == EAGAIN) - { - PRMSG(5, - "MnxTcpReadv: read returned: %s\n", - strerror(errno), 0, 0); - } - else - { - PRMSG(1, - "MnxTcpReadv: read failed: %s\n", - strerror(errno), 0, 0); - } - if (total != 0) - return total; - else - return -1; - } - if (r == 0) - break; - if (r > len) - abort(); - total += r; - offset += r; - } - return total; -} - -static int -TRANS(MnxTcpWritev) (ciptr, buf, size) - -XtransConnInfo ciptr; -struct iovec *buf; -int size; - -{ - int i, offset, total, len, r; - - PRMSG(2, "MnxTcpWritev(%d,%x,%d)\n", ciptr->fd, buf, size); - - /* Simply call write a number of times. */ - total= 0; - offset= 0; - i= 0; - while(i= buf[i].iov_len) - { - offset= 0; - i++; - continue; - } - len= buf[i].iov_len-offset; - r= TRANS(MnxTcpWrite)(ciptr, buf[i].iov_base+offset, len); - if (r == -1) - { - if (errno == EAGAIN) - { - PRMSG(5, "MnxTcpWritev: AGAIN\n", - 0, 0, 0); - } - else - { - PRMSG(1, - "MnxTcpWritev: write failed: %s\n", - strerror(errno), 0, 0); - } - if (total != 0) - return total; - else - return -1; - } - if (r == 0 || r > len) - abort(); - total += r; - offset += r; - } - return total; -} - - -static int -TRANS(MnxTcpDisconnect) (ciptr) - -XtransConnInfo ciptr; - -{ - PRMSG(2, "MnxTcpDisconnect(%x,%d)\n", ciptr, ciptr->fd, 0); - - return ioctl(ciptr->fd, NWIOTCPSHUTDOWN, NULL); -} - -static int -TRANS(MnxTcpClose) (ciptr) - -XtransConnInfo ciptr; - -{ - XtransConnInfo list, t_ciptr; - struct private *priv; - - PRMSG(2, "MnxTcpClose(%x,%d)\n", ciptr, ciptr->fd, 0); - - - if (listen_list) - { - list= listen_list; - listen_list= NULL; - while(list) - { - t_ciptr= list; - priv= (struct private *)t_ciptr->priv; - list= priv->listen_list; - if (t_ciptr == ciptr) - continue; - if (restart_listen(t_ciptr) == -1) - { - priv->listen_list= listen_list; - listen_list= t_ciptr; - } - } - } - - free_private((struct private *)ciptr->priv); - nbio_unregister(ciptr->fd); - return close (ciptr->fd); -} - - -static XtransConnInfo -alloc_ConnInfo(thistrans) -Xtransport *thistrans; -{ - XtransConnInfo ciptr; - - PRMSG(2, " alloc_ConnInfo(%p)\n", thistrans, 0, 0); - - if ((ciptr= (XtransConnInfo) xalloc(sizeof(struct _XtransConnInfo))) - == NULL) - { - PRMSG(1, " alloc_ConnInfo: malloc failed\n", 0, 0, 0); - return NULL; - } - ciptr->transptr= thistrans; - ciptr->priv= NULL; - ciptr->flags= 0; - ciptr->fd= -1; - ciptr->port= NULL; - ciptr->family= AF_INET; - ciptr->addr= NULL; - ciptr->addrlen= 0; - ciptr->peeraddr= NULL; - ciptr->peeraddrlen= 0; - return ciptr; -} - -static void -free_ConnInfo(ciptr) -XtransConnInfo ciptr; -{ - if (ciptr == NULL) - return; - free_private((struct private *)ciptr->priv); - xfree(ciptr); -} - -static struct private * -alloc_private(rd_size, wr_size) -size_t rd_size; -size_t wr_size; -{ - struct private *priv; - int s_errno; - char *buf; - - PRMSG(2, ":alloc_private(%d, %d)\n", rd_size, wr_size, 0); - - if ((priv= (struct private *)xalloc(sizeof(struct private))) == NULL) - { - PRMSG(1, ":alloc_private: malloc failed\n", 0, 0, 0); - return NULL; - } - priv->nonblocking= 0; - priv->read_inprogress= 0; - priv->read_buffer= NULL; - priv->read_bufsize= rd_size; - priv->read_size= 0; - priv->read_offset= 0; - - if (rd_size != 0) - { - if ((buf= xalloc(rd_size)) == NULL) - { - PRMSG(1, ":alloc_private: malloc failed\n", 0, 0, 0); - s_errno= errno; - free_private(priv); - errno= s_errno; - return NULL; - } - priv->read_buffer= buf; - } - - priv->write_inprogress= 0; - priv->write_buffer= NULL; - priv->write_bufsize= rd_size; - priv->write_size= 0; - priv->write_offset= 0; - priv->write_errno= 0; - - if (wr_size != 0) - { - if ((buf= xalloc(wr_size)) == NULL) - { - PRMSG(1, ":alloc_private: malloc failed\n", 0, 0, 0); - s_errno= errno; - free_private(priv); - errno= s_errno; - return NULL; - } - priv->write_buffer= buf; - } - - priv->listen_completed= 0; - priv->listen_port= 0; - priv->listen_list= NULL; - - return priv; -} - -static void -free_private(priv) -struct private *priv; -{ - if (priv == NULL) - return; - xfree(priv->read_buffer); - xfree(priv->write_buffer); - xfree(priv); -} - -static void -read_cb(ref, res, err) -nbio_ref_t ref; -int res; -int err; -{ - XtransConnInfo ciptr; - struct private *priv; - - PRMSG(2, ":read_cb(%x,%d,%d)\n", ref.ref_ptr, res, err); - - ciptr= ref.ref_ptr; - priv= (struct private *)ciptr->priv; - if (res > 0) - priv->read_size= res; - priv->read_inprogress= 0; -} - -static void -write_cb(ref, res, err) -nbio_ref_t ref; -int res; -int err; -{ - XtransConnInfo ciptr; - struct private *priv; - int r; - - PRMSG(2, ":write_cb(%x,%d,%d)\n", ref.ref_ptr, res, err); - - ciptr= ref.ref_ptr; - priv= (struct private *)ciptr->priv; - if (res > 0) - priv->write_offset += res; - else if (res == 0) - abort(); - else - { - priv->write_errno= err; - return; - } - priv->write_inprogress= 0; - - while (priv->write_offset < priv->write_size) - { - r= write(ciptr->fd, priv->write_buffer+priv->write_offset, - priv->write_size-priv->write_offset); - if (r > 0) - { - PRMSG(5, "MnxTcpWrite: wrote %d bytes\n", - r, 0, 0); - priv->write_offset += r; - continue; - } - else if (r == -1 && errno == EINPROGRESS) - { - priv->write_inprogress= 1; - nbio_inprogress(ciptr->fd, ASIO_WRITE, 0 /* read */, - 1 /* write */, 0 /* exception */); - } - else - { - PRMSG(1, "MnxTcpWrite: write failed: %s\n", - strerror(errno), 0, 0); - priv->write_errno= errno; - } - break; - } -} - -static void -listen_cb(ref, res, err) -nbio_ref_t ref; -int res; -int err; -{ - XtransConnInfo ciptr; - struct private *priv; - struct sockaddr_in *addr; - nwio_tcpconf_t tcpconf; - - PRMSG(2, ":listen_cb(%x,%d,%d)\n", ref.ref_ptr, res, err); - - ciptr= ref.ref_ptr; - priv= (struct private *)ciptr->priv; - if (res == 0) - { - if (ioctl(ciptr->fd, NWIOGTCPCONF, &tcpconf) == -1) - { - PRMSG(1, - ":listen_cb: NWIOGTCPCONF failed: %s\n", - strerror(errno),0, 0); - return; - } - if ((addr= (struct sockaddr_in *)xalloc(sizeof(struct sockaddr_in))) - == NULL) - { - PRMSG(1, ":listen_cb: malloc failed\n", 0, 0, 0); - return; - } - addr->sin_family= AF_INET; - addr->sin_addr.s_addr= tcpconf.nwtc_locaddr; - addr->sin_port= tcpconf.nwtc_locport; - if (ciptr->addr) - xfree(ciptr->addr); - ciptr->addr= (char *)addr; - ciptr->addrlen= sizeof(struct sockaddr_in); - priv->listen_completed= 1; - return; - } - PRMSG(2, ":listen_cb: listen failed: %s\n", strerror(err), 0, 0); - if (restart_listen(ciptr) == -1) - { - priv->listen_list= listen_list; - listen_list= ciptr; - } -} - -static int -restart_listen(ciptr) -XtransConnInfo ciptr; -{ - char *tcp_device; - nwio_tcpconf_t tcpconf; - nwio_tcpcl_t tcpcl; - int fd, r, s_errno, flags; - struct private *priv; - nbio_ref_t ref; - - PRMSG(2, ":restart_listen(%d)\n", ciptr->fd, 0, 0); - - nbio_unregister(ciptr->fd); - - if ((tcp_device= getenv("TCP_DEVICE")) == NULL) - tcp_device= TCP_DEVICE; - - if ((fd= open(tcp_device, O_RDWR)) == -1) - { - PRMSG(1, ":restart_listen: open '%s' failed: %s\n", - tcp_device, strerror(errno), 0); - return -1; - } - PRMSG(5, ":restart_listen: fd= '%d'\n", fd, 0, 0); - if (fd != ciptr->fd) - { - if (dup2(fd, ciptr->fd) == -1) - abort(); /* no way to recover */ - close(fd); - } - fd= ciptr->fd; - ref.ref_ptr= ciptr; - nbio_register(fd); - nbio_setcallback(fd, ASIO_IOCTL, listen_cb, ref); - - priv= (struct private *)ciptr->priv; - - tcpconf.nwtc_flags= NWTC_SHARED | NWTC_UNSET_RA | NWTC_UNSET_RP; - tcpconf.nwtc_locport= priv->listen_port; - tcpconf.nwtc_flags |= NWTC_LP_SET; - - if (ioctl(ciptr->fd, NWIOSTCPCONF, &tcpconf) == -1) - { - PRMSG(1, - ":restart_listen: NWIOSTCPCONF failed: %s\n", - strerror(errno),0, 0); - return -1; - } - - flags= fcntl(ciptr->fd, F_GETFD); - if (flags == -1) - { - PRMSG(1, - ":restart_listen: fcntl F_GETFD failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - if (fcntl(ciptr->fd, F_SETFD, flags | FD_ASYNCHIO) == -1) - { - PRMSG(1, - ":restart_listen: fcntl F_SETFD failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - - tcpcl.nwtcl_flags= 0; - r= ioctl(ciptr->fd, NWIOTCPLISTEN, &tcpcl); - s_errno= errno; - - if (fcntl(ciptr->fd, F_SETFD, flags) == -1) - { - PRMSG(1, - ":restart_listen: fcntl F_SETFD failed: %s\n", - strerror(errno), 0, 0); - return -1; - } - - if (r == -1 && s_errno == EINPROGRESS) - { - nbio_inprogress(ciptr->fd, ASIO_IOCTL, 1 /* read */, - 1 /* write */, 0 /* exception */); - return 0; - } - if (r == 0) - { - priv->listen_completed= 1; - return 0; - } - errno= s_errno; - PRMSG(1, ":restart_listen: NWIOTCPLISTEN failed: %s\n", - strerror(errno), 0, 0); - return -1; -} - - -Xtransport TRANS(MnxINETFuncs) = -{ - /* Minix TCP Interface */ - "inet", - 0, -#ifdef TRANS_CLIENT - TRANS(MnxTcpOpenCOTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(MnxTcpOpenCOTSServer), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(MnxTcpOpenCLTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(MnxTcpOpenCLTSServer), -#endif /* TRANS_SERVER */ -#ifdef TRANS_REOPEN - TRANS(MnxTcpReopenCOTSServer), - TRANS(MnxTcpReopenCLTSServer), -#endif - TRANS(MnxTcpSetOption), -#ifdef TRANS_SERVER - TRANS(MnxTcpCreateListener), - TRANS(MnxTcpResetListener), - TRANS(MnxTcpAccept), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(MnxTcpConnect), -#endif /* TRANS_CLIENT */ - TRANS(MnxTcpBytesReadable), - TRANS(MnxTcpRead), - TRANS(MnxTcpWrite), - TRANS(MnxTcpReadv), - TRANS(MnxTcpWritev), - TRANS(MnxTcpDisconnect), - TRANS(MnxTcpClose), - TRANS(MnxTcpClose), -}; - -Xtransport TRANS(MnxTCPFuncs) = -{ - /* Minix TCP Interface */ - "tcp", - TRANS_ALIAS, -#ifdef TRANS_CLIENT - TRANS(MnxTcpOpenCOTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(MnxTcpOpenCOTSServer), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(MnxTcpOpenCLTSClient), -#endif /* TRANS_CLIENT */ -#ifdef TRANS_SERVER - TRANS(MnxTcpOpenCLTSServer), -#endif /* TRANS_SERVER */ -#ifdef TRANS_REOPEN - TRANS(MnxTcpReopenCOTSServer), - TRANS(MnxTcpReopenCLTSServer), -#endif - TRANS(MnxTcpSetOption), -#ifdef TRANS_SERVER - TRANS(MnxTcpCreateListener), - TRANS(MnxTcpResetListener), - TRANS(MnxTcpAccept), -#endif /* TRANS_SERVER */ -#ifdef TRANS_CLIENT - TRANS(MnxTcpConnect), -#endif /* TRANS_CLIENT */ - TRANS(MnxTcpBytesReadable), - TRANS(MnxTcpRead), - TRANS(MnxTcpWrite), - TRANS(MnxTcpReadv), - TRANS(MnxTcpWritev), - TRANS(MnxTcpDisconnect), - TRANS(MnxTcpClose), - TRANS(MnxTcpClose), -}; Index: xc/lib/xtrans/Xtranssock.c diff -u xc/lib/xtrans/Xtranssock.c:3.49 xc/lib/xtrans/Xtranssock.c:3.53 --- xc/lib/xtrans/Xtranssock.c:3.49 Fri Jan 19 01:41:02 2001 +++ xc/lib/xtrans/Xtranssock.c Fri Dec 14 14:57:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtranssock.c,v 1.8 2000/08/17 19:46:46 cpqbld Exp $ */ +/* $Xorg: Xtranssock.c,v 1.11 2001/02/09 02:04:06 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranssock.c,v 3.49 2001/01/19 06:41:02 keithp Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranssock.c,v 3.53 2001/12/14 19:57:06 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -56,10 +60,6 @@ #if defined(TCPCONN) || defined(UNIXCONN) #include -#else -#ifdef ESIX -#include -#endif #endif #if defined(TCPCONN) || defined(UNIXCONN) @@ -98,7 +98,7 @@ #include #endif -#if (defined(i386) && defined(SYSV)) && !defined(ESIX) && !defined(sco) +#if (defined(i386) && defined(SYSV)) && !defined(sco) #include #endif @@ -811,7 +811,7 @@ int namelen = sizeof(sockname); int status; long tmpport; -#ifdef XTHREADS +#ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgetservbynameparams sparams; #endif struct servent *servp; @@ -945,7 +945,7 @@ return TRANS_CREATE_LISTENER_FAILED; } } else { - sprintf (sockname.sun_path, "%s%d", UNIX_PATH, getpid()); + sprintf (sockname.sun_path, "%s%ld", UNIX_PATH, (long)getpid()); } #if defined(BSD44SOCKETS) && !defined(Lynx) @@ -1239,7 +1239,7 @@ #else int namelen = sizeof sockname; #endif -#ifdef XTHREADS +#ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; _Xgetservbynameparams sparams; #endif @@ -1482,7 +1482,7 @@ */ char specified_local_addr_list[10][4]; int scount, equiv, i, j; -#ifdef XTHREADS +#ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif struct hostent *hostp; Index: xc/lib/xtrans/Xtranstli.c diff -u xc/lib/xtrans/Xtranstli.c:3.9 xc/lib/xtrans/Xtranstli.c:3.10 --- xc/lib/xtrans/Xtranstli.c:3.9 Wed Jan 17 14:43:48 2001 +++ xc/lib/xtrans/Xtranstli.c Fri Dec 14 14:57:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtranstli.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ +/* $Xorg: Xtranstli.c,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtranstli.c,v 3.9 2001/01/17 19:43:48 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtranstli.c,v 3.10 2001/12/14 19:57:07 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * Index: xc/lib/xtrans/Xtransutil.c diff -u xc/lib/xtrans/Xtransutil.c:3.17 xc/lib/xtrans/Xtransutil.c:3.21 --- xc/lib/xtrans/Xtransutil.c:3.17 Wed Jan 17 14:43:49 2001 +++ xc/lib/xtrans/Xtransutil.c Fri Dec 14 14:57:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: Xtransutil.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ +/* $Xorg: Xtransutil.c,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/Xtransutil.c,v 3.17 2001/01/17 19:43:49 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/Xtransutil.c,v 3.21 2001/12/14 19:57:07 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -96,7 +100,7 @@ switch( *familyp ) { -#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) +#if defined(TCPCONN) || defined(STREAMSCONN) case AF_INET: { /* @@ -132,7 +136,7 @@ } break; } -#endif /* defined(TCPCONN) || defined(STREAMSCONN) || MNX_TCPCONN */ +#endif /* defined(TCPCONN) || defined(STREAMSCONN) */ #if defined(DNETCONN) case AF_DECnet: @@ -157,20 +161,6 @@ } #endif /* defined(UNIXCONN) || defined(LOCALCONN) */ -#if defined(AMRPCCONN) - case AF_AMOEBA: - { - *familyp=FamilyAmoeba; - break; - } -#endif -#if defined(AMTCPCONN) && !(defined(TCPCONN) || defined(STREAMSCONN)) - case AF_INET: - { - *familyp=FamilyInternet; - break; - } -#endif default: PRMSG(1,"ConvertAddress: Unknown family type %d\n", @@ -251,7 +241,7 @@ } #endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) */ -#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) +#if defined(TCPCONN) || defined(STREAMSCONN) case AF_INET: { struct sockaddr_in *saddr = (struct sockaddr_in *) addr; @@ -263,7 +253,7 @@ sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf); break; } -#endif /* defined(TCPCONN) || defined(STREAMSCONN) || MNX_TCPCONN */ +#endif /* defined(TCPCONN) || defined(STREAMSCONN) */ #if defined(DNETCONN) case AF_DECnet: @@ -331,14 +321,14 @@ } #endif /* defined(UNIXCONN) || defined(STREAMSCONN) || defined(LOCALCONN) */ -#if defined(TCPCONN) || defined(STREAMSCONN) || defined(MNX_TCPCONN) +#if defined(TCPCONN) || defined(STREAMSCONN) case AF_INET: { struct sockaddr_in *saddr = (struct sockaddr_in *) peer_addr; -#ifdef XTHREADS +#ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif - struct hostent * hostp = NULL; + struct hostent * volatile hostp = NULL; #ifdef SIGALRM /* @@ -367,7 +357,7 @@ break; } -#endif /* defined(TCPCONN) || defined(STREAMSCONN) || MNX_TCPCONN */ +#endif /* defined(TCPCONN) || defined(STREAMSCONN) */ #if defined(DNETCONN) case AF_DECnet: @@ -385,25 +375,6 @@ break; } #endif /* defined(DNETCONN) */ - -#if defined(AMRPCCONN) - case AF_AMOEBA: - { - addr = "Amoeba"; /* not really used */ - break; - } -#endif -#if defined(AMTCPCONN) && !(defined(TCPCONN) || defined(STREAMSCONN)) - case AF_INET: - { - if (gethostname (addrbuf, sizeof (addrbuf)) == 0) { - addr = addrbuf; - } else { - addr = ""; - } - break; - } -#endif default: return (NULL); Index: xc/lib/xtrans/transport.c diff -u xc/lib/xtrans/transport.c:3.5 xc/lib/xtrans/transport.c:3.8 --- xc/lib/xtrans/transport.c:3.5 Wed Jan 17 14:43:49 2001 +++ xc/lib/xtrans/transport.c Fri Dec 14 14:57:07 2001 @@ -1,9 +1,13 @@ -/* $Xorg: transport.c,v 1.3 2000/08/17 19:46:46 cpqbld Exp $ */ +/* $Xorg: transport.c,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ */ /* Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/lib/xtrans/transport.c,v 3.5 2001/01/17 19:43:49 dawes Exp $ */ +/* $XFree86: xc/lib/xtrans/transport.c,v 3.8 2001/12/14 19:57:07 dawes Exp $ */ /* Copyright 1993, 1994 NCR Corporation - Dayton, Ohio, USA * @@ -50,9 +54,7 @@ #ifdef XSERV_t #include "os.h" #else -#ifndef X_NOT_STDC_ENV #include -#endif #define xalloc(_size) malloc(_size) #define xcalloc(_num,_size) calloc(_num,_size) #define xrealloc(_ptr,_size) realloc(_ptr,_size) @@ -75,12 +77,6 @@ #endif #ifdef STREAMSCONN #include "Xtranstli.c" -#endif -#if defined(AMRPCCONN) || defined(AMTCPCONN) -#include "Xtransam.c" -#endif -#if defined(MNX_TCPCONN) -#include "Xtransmnx.c" #endif #include "Xtrans.c" #include "Xtransutil.c" Index: xc/lib/zlib/z-def.cpp diff -u xc/lib/zlib/z-def.cpp:1.1 xc/lib/zlib/z-def.cpp:removed --- xc/lib/zlib/z-def.cpp:1.1 Wed Aug 9 19:40:16 2000 +++ xc/lib/zlib/z-def.cpp Fri Jan 18 15:23:51 2002 @@ -1,47 +0,0 @@ -#ifdef __CYGWIN__ -LIBRARY ZLIB -EXPORTS - adler32 @ 1 ; - compress @ 2 ; - compress2 @ 3 ; - crc32 @ 4 ; - deflate @ 5 ; - deflateCopy @ 6 ; - deflateEnd @ 7 ; - deflateInit2_ @ 8 ; - deflateInit_ @ 9 ; - deflateParams @ 10 ; - deflateReset @ 11 ; - deflateSetDictionary @ 12 ; - get_crc_table @ 13 ; - gzclose @ 14 ; - gzdopen @ 15 ; - gzeof @ 16 ; - gzerror @ 17 ; - gzflush @ 18 ; - gzgetc @ 19 ; -; gzgets @ 20 ; - gzopen @ 21 ; - gzprintf @ 22 ; - gzputc @ 23 ; -; gzputs @ 24 ; - gzread @ 25 ; - gzrewind @ 26 ; - gzseek @ 27 ; - gzsetparams @ 28 ; - gztell @ 29 ; - gzwrite @ 30 ; - inflate @ 31 ; - inflateEnd @ 32 ; - inflateInit2_ @ 33 ; - inflateInit_ @ 34 ; - inflateReset @ 35 ; - inflateSetDictionary @ 36 ; - inflateSync @ 37 ; - inflateSyncPoint @ 38 ; - uncompress @ 39 ; - zError @ 40 ; - zlibVersion @ 41 ; -#endif - -/* $XFree86: xc/lib/zlib/z-def.cpp,v 1.1 2000/08/09 23:40:16 dawes Exp $ */ Index: xc/lib/zlib/zconf.h diff -u xc/lib/zlib/zconf.h:1.7 xc/lib/zlib/zconf.h:1.8 --- xc/lib/zlib/zconf.h:1.7 Wed Jan 17 14:43:55 2001 +++ xc/lib/zlib/zconf.h Mon Sep 3 16:19:00 2001 @@ -5,7 +5,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $XFree86: xc/lib/zlib/zconf.h,v 1.7 2001/01/17 19:43:55 dawes Exp $ */ +/* $XFree86: xc/lib/zlib/zconf.h,v 1.8 2001/09/03 20:19:00 alanh Exp $ */ #ifndef _ZCONF_H #define _ZCONF_H @@ -49,7 +49,7 @@ # define voidp z_voidp #endif -#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__CYGWIN__) +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) # define WIN32 #endif #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386) || defined(__EMX__) Index: xc/nls/Imakefile diff -u xc/nls/Imakefile:1.6 xc/nls/Imakefile:1.9 --- xc/nls/Imakefile:1.6 Wed Jan 17 14:37:04 2001 +++ xc/nls/Imakefile Thu Nov 15 19:52:30 2001 @@ -1,57 +1,96 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:48 cpqbld Exp $ +XCOMM $Xorg: Imakefile,v 1.4 2000/12/12 13:00:42 coskrey Exp $ -XCOMM $XFree86: xc/nls/Imakefile,v 1.6 2001/01/17 19:37:04 dawes Exp $ +XCOMM $XFree86: xc/nls/Imakefile,v 1.9 2001/11/16 00:52:30 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags +#if BuildLoadableXlibI18n + SUBDIRS = XLC_LOCALE Compose XI18N_OBJS +#else SUBDIRS = XLC_LOCALE Compose +#endif #if defined(FreeBSDArchitecture) RU_SU_DEFINES = -DINCLUDE_ru_SU #endif - DEFINES = -DR63_COMPAT $(RU_SU_DEFINES) + DEFINES = $(RU_SU_DEFINES) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) +all:: + +#ifndef R63Compat +#define R63Compat YES +#endif + #ifndef Win32Architecture #ifndef OS2Architecture +#if R63Compat # define LTarget(name) @@\ -all:: name.lt @@\ +CppFileTarget(name.l1,name,$(DEFINES),NullParameter) @@\ @@\ -CppFileTarget(name.lt,name,$(DEFINES),NullParameter) @@\ +name.l2: name.l1 @@\ + rm -f name.l2 @@\ + sed -e '/^[^#][^ ]*:/s/://' -e '/^[^#].*[ ].*:/d' \ @@\ + < name.l1 > name.l2 @@\ + @@\ +name.lt: name.l1 name.l2 @@\ + rm -f name.lt @@\ + cat name.l2 name.l1 > name.lt @@\ @@\ -all:: name.lt @@\ +AllTarget(name.lt) @@\ MakeDir($(BUILDLIBDIR)/locale) @@\ RemoveFile($(BUILDLIBDIR)/locale/name) @@\ cd $(BUILDLIBDIR)/locale && $(LN) $(BUILDLIBTOP)/../$(CURRENT_DIR)/name.lt name @@\ -InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) + @@\ +InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) @@\ + @@\ +clean:: @@\ + RemoveFiles(name.l1 name.l2 name.lt) #else # define LTarget(name) @@\ -all:: name.lt @@\ +CppFileTarget(name.lt,name,$(DEFINES),NullParameter) @@\ @@\ +AllTarget(name.lt) @@\ + MakeDir($(BUILDLIBDIR)/locale) @@\ + RemoveFile($(BUILDLIBDIR)/locale/name) @@\ + cd $(BUILDLIBDIR)/locale && $(LN) $(BUILDLIBTOP)/../$(CURRENT_DIR)/name.lt name @@\ + @@\ +InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) @@\ + @@\ +clean:: @@\ + RemoveFile(name.lt) +#endif +#else +# define LTarget(name) @@\ CppFileTarget(name.lt,name,$(DEFINES),NullParameter) @@\ @@\ -all:: name.lt @@\ +AllTarget(name.lt) @@\ MakeDir($(BUILDLIBDIR)/locale) @@\ LinkFileSpecial($(BUILDLIBDIR)/locale,name,$(BUILDLIBTOP)/../../$(CURRENT_DIR)/name.lt) @@\ + @@\ +InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) @@\ @@\ -InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) +clean:: @@\ + RemoveFile(name.lt) #endif #else # define LTarget(name) @@\ -all:: name.lt @@\ - @@\ CppFileTarget(name.lt,name,$(DEFINES),NullParameter) @@\ @@\ -all:: name.lt @@\ +AllTargetName(name.lt) @@\ MakeDir($(BUILDLIBDIR:/=\)\locale) @@\ RemoveFile(Concat($(BUILDLIBDIR:/=\)\locale\,name)) @@\ cd $(BUILDLIBDIR:/=\)\locale && $(LN) Concat($(BUILDLIBTOP:/=\)\..\$(CURRENT_DIR:/=\)\,name.lt) name @@\ -InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) + @@\ +InstallNamedNonExec(name.lt,name,$(XLOCALEDIR)) @@\ + @@\ +clean:: @@\ + RemoveFile(name.lt) #endif LTarget(locale.alias) Index: xc/nls/compose.dir diff -u xc/nls/compose.dir:1.16 xc/nls/compose.dir:1.20 --- xc/nls/compose.dir:1.16 Fri Apr 6 14:16:27 2001 +++ xc/nls/compose.dir Wed Nov 21 17:29:11 2001 @@ -4,416 +4,344 @@ XCOMM The first word is the compose table file name and XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/compose.dir,v 1.16 2001/04/06 18:16:27 dawes Exp $ +XCOMM $XFree86: xc/nls/compose.dir,v 1.20 2001/11/21 22:29:11 dawes Exp $ XCOMM -#ifdef R63_COMPAT -XCOMM These entries are in the old format (no ':') -iso8859-1/Compose C -iso8859-1/Compose af_ZA.ISO8859-1 -iso8859-6/Compose ar_AA.ISO8859-6 -iso8859-6/Compose ar_BH.ISO8859-6 -iso8859-6/Compose ar_DZ.ISO8859-6 -iso8859-6/Compose ar_EG.ISO8859-6 -iso8859-6/Compose ar_IQ.ISO8859-6 -iso8859-6/Compose ar_JO.ISO8859-6 -iso8859-6/Compose ar_KW.ISO8859-6 -iso8859-6/Compose ar_LB.ISO8859-6 -iso8859-6/Compose ar_LY.ISO8859-6 -iso8859-6/Compose ar_MA.ISO8859-6 -iso8859-6/Compose ar_OM.ISO8859-6 -iso8859-6/Compose ar_QA.ISO8859-6 -iso8859-6/Compose ar_SA.ISO8859-6 -iso8859-6/Compose ar_TN.ISO8859-6 -iso8859-6/Compose ar_YE.ISO8859-6 -iso8859-9e/Compose az_AZ.ISO8859-9E -koi8-c/Compose a3_AZ.KOI8-C -microsoft-cp1251/Compose be_BY.CP1251 -iso8859-5/Compose bg_BG.ISO8859-5 -microsoft-cp1251/Compose bg_BG.CP1251 -iso8859-1/Compose br_FR.ISO8859-1 -iso8859-14/Compose br_FR.ISO8859-14 -iso8859-15/Compose br_FR.ISO8859-15 -iso8859-1/Compose ca_ES.ISO8859-1 -iso8859-15/Compose ca_ES.ISO8859-15 -iso8859-2/Compose cs_CZ.ISO8859-2 -iso8859-1/Compose cy_GB.ISO8859-1 -iso8859-14/Compose cy_GB.ISO8859-14 -iso8859-15/Compose cy_GB.ISO8859-15 -iso8859-1/Compose da_DK.ISO8859-1 -iso8859-15/Compose da_DK.ISO8859-15 -iso8859-1/Compose de_AT.ISO8859-1 -iso8859-15/Compose de_AT.ISO8859-15 -iso8859-1/Compose de_CH.ISO8859-1 -iso8859-15/Compose de_CH.ISO8859-15 -iso8859-1/Compose de_DE.ISO8859-1 -iso8859-15/Compose de_DE.ISO8859-15 -iso8859-1/Compose de_LI.ISO8859-1 -iso8859-15/Compose de_LI.ISO8859-15 -iso8859-1/Compose de_LU.ISO8859-1 -iso8859-15/Compose de_LU.ISO8859-15 -iso8859-7/Compose el_GR.ISO8859-7 -iso8859-1/Compose en_AU.ISO8859-1 -iso8859-1/Compose en_BZ.ISO8859-1 -iso8859-1/Compose en_CA.ISO8859-1 -iso8859-1/Compose en_GB.ISO8859-1 -iso8859-15/Compose en_GB.ISO8859-15 -iso8859-1/Compose en_IE.ISO8859-1 -iso8859-15/Compose en_IE.ISO8859-15 -iso8859-1/Compose en_JM.ISO8859-1 -iso8859-1/Compose en_NZ.ISO8859-1 -iso8859-1/Compose en_TT.ISO8859-1 -iso8859-1/Compose en_UK.ISO8859-1 -iso8859-1/Compose en_US.ISO8859-1 -iso8859-1/Compose en_ZA.ISO8859-1 -iso8859-3/Compose eo_XX.ISO8859-3 -iso8859-1/Compose es_AR.ISO8859-1 -iso8859-1/Compose es_BO.ISO8859-1 -iso8859-1/Compose es_CL.ISO8859-1 -iso8859-1/Compose es_CO.ISO8859-1 -iso8859-1/Compose es_CR.ISO8859-1 -iso8859-1/Compose es_DO.ISO8859-1 -iso8859-1/Compose es_EC.ISO8859-1 -iso8859-1/Compose es_ES.ISO8859-1 -iso8859-15/Compose es_ES.ISO8859-15 -iso8859-1/Compose es_GT.ISO8859-1 -iso8859-1/Compose es_HN.ISO8859-1 -iso8859-1/Compose es_MX.ISO8859-1 -iso8859-1/Compose es_NI.ISO8859-1 -iso8859-1/Compose es_PA.ISO8859-1 -iso8859-1/Compose es_PE.ISO8859-1 -iso8859-1/Compose es_PR.ISO8859-1 -iso8859-1/Compose es_PY.ISO8859-1 -iso8859-1/Compose es_SV.ISO8859-1 -iso8859-1/Compose es_UY.ISO8859-1 -iso8859-1/Compose es_VE.ISO8859-1 -iso8859-1/Compose et_EE.ISO8859-1 -iso8859-4/Compose et_EE.ISO8859-4 -iso8859-13/Compose et_EE.ISO8859-13 -iso8859-15/Compose et_EE.ISO8859-15 -iso8859-1/Compose eu_ES.ISO8859-1 -iso8859-15/Compose eu_ES.ISO8859-15 -isiri-3342/Compose fa_IR.ISIRI-3342 -iso8859-1/Compose fi_FI.ISO8859-1 -iso8859-15/Compose fi_FI.ISO8859-15 -iso8859-1/Compose fo_FO.ISO8859-1 -iso8859-15/Compose fo_FO.ISO8859-15 -iso8859-1/Compose fr_BE.ISO8859-1 -iso8859-15/Compose fr_BE.ISO8859-15 -iso8859-1/Compose fr_CA.ISO8859-1 -iso8859-15/Compose fr_CA.ISO8859-15 -iso8859-1/Compose fr_CH.ISO8859-1 -iso8859-15/Compose fr_CH.ISO8859-15 -iso8859-1/Compose fr_FR.ISO8859-1 -iso8859-15/Compose fr_FR.ISO8859-15 -iso8859-1/Compose fr_LU.ISO8859-1 -iso8859-15/Compose fr_LU.ISO8859-15 -iso8859-1/Compose ga_IE.ISO8859-1 -iso8859-14/Compose ga_IE.ISO8859-14 -iso8859-15/Compose ga_IE.ISO8859-15 -iso8859-1/Compose gd_GB.ISO8859-1 -iso8859-14/Compose gd_GB.ISO8859-14 -iso8859-15/Compose gd_GB.ISO8859-15 -iso8859-1/Compose gl_ES.ISO8859-1 -iso8859-15/Compose gl_ES.ISO8859-15 -iso8859-1/Compose gv_GB.ISO8859-1 -iso8859-14/Compose gv_GB.ISO8859-14 -iso8859-15/Compose gv_GB.ISO8859-15 -iso8859-8/Compose he_IL.ISO8859-8 -microsoft-cp1255/Compose he_IL.CP1255 -iscii-dev/Compose hi_IN.ISCII-DEV -iso8859-2/Compose hr_HR.ISO8859-2 -iso8859-2/Compose hu_HU.ISO8859-2 -armscii-8/Compose hy_AM.ARMSCII-8 -iso8859-1/Compose id_ID.ISO8859-1 -iso8859-15/Compose id_ID.ISO8859-15 -iso8859-1/Compose is_IS.ISO8859-1 -iso8859-15/Compose is_IS.ISO8859-15 -iso8859-1/Compose it_CH.ISO8859-1 -iso8859-15/Compose it_CH.ISO8859-15 -iso8859-1/Compose it_IT.ISO8859-1 -iso8859-15/Compose it_IT.ISO8859-15 -ja/Compose ja_JP.eucJP -ja.SJIS/Compose ja_JP.SJIS -ja.JIS/Compose ja_JP.JIS7 -georgian-academy/Compose ka_GE.GEORGIAN-ACADEMY -georgian-ps/Compose ka_GE.GEORGIAN-PS -iso8859-1/Compose kl_GL.ISO8859-1 -iso8859-15/Compose kl_GL.ISO8859-15 -ko/Compose ko_KR.eucKR -iso8859-1/Compose kw_GB.ISO8859-1 -iso8859-14/Compose kw_GB.ISO8859-14 -iso8859-15/Compose kw_GB.ISO8859-15 -ibm-cp1133/Compose lo_LA.IBM-CP1133 -mulelao-1/Compose lo_LA.MULELAO-1 -iso8859-1/Compose lt_LN.ISO8859-1 -iso8859-4/Compose lt_LT.ISO8859-4 -iso8859-13/Compose lt_LT.ISO8859-13 -iso8859-4/Compose lv_LV.ISO8859-4 -iso8859-13/Compose lv_LV.ISO8859-13 -iso8859-13/Compose mi_NZ.ISO8859-13 -iso8859-5/Compose mk_MK.ISO8859-5 -microsoft-cp1251/Compose mk_MK.CP1251 -iso8859-1/Compose ms_MY.ISO8859-1 -iso8859-1/Compose nl_BE.ISO8859-1 -iso8859-15/Compose nl_BE.ISO8859-15 -iso8859-1/Compose nl_NL.ISO8859-1 -iso8859-15/Compose nl_NL.ISO8859-15 -iso8859-1/Compose no_NO.ISO8859-1 -iso8859-15/Compose no_NO.ISO8859-15 -iso8859-1/Compose nb_NO.ISO8859-1 -iso8859-15/Compose nb_NO.ISO8859-15 -iso8859-1/Compose ny_NO.ISO8859-1 -iso8859-15/Compose ny_NO.ISO8859-15 -iso8859-1/Compose oc_FR.ISO8859-1 -iso8859-15/Compose oc_FR.ISO8859-15 -iso8859-1/Compose pd_DE.ISO8859-1 -iso8859-1/Compose pd_US.ISO8859-1 -iso8859-1/Compose ph_PH.ISO8859-1 -iso8859-2/Compose pl_PL.ISO8859-2 -iso8859-1/Compose pp_AN.ISO8859-1 -iso8859-1/Compose pt_BR.ISO8859-1 -iso8859-15/Compose pt_BR.ISO8859-15 -iso8859-1/Compose pt_PT.ISO8859-1 -iso8859-15/Compose pt_PT.ISO8859-15 -iso8859-2/Compose ro_RO.ISO8859-2 -koi8-r/Compose ru_RU.KOI8-R -iso8859-5/Compose ru_RU.ISO8859-5 -microsoft-cp1251/Compose ru_RU.CP1251 -koi8-u/Compose ru_UA.KOI8-U -iso8859-2/Compose sh_YU.ISO8859-2 -iso8859-2/Compose sk_SK.ISO8859-2 -iso8859-2/Compose sl_CS.ISO8859-2 -iso8859-2/Compose sl_SI.ISO8859-2 -iso8859-5/Compose sp_YU.ISO8859-5 -iso8859-2/Compose sq_AL.ISO8859-2 -iso8859-2/Compose sr_SP.ISO8859-2 -iso8859-2/Compose sr_YU.ISO8859-2 -iso8859-5/Compose sr_YU.ISO8859-5 -iso8859-1/Compose sv_FI.ISO8859-1 -iso8859-15/Compose sv_FI.ISO8859-15 -iso8859-1/Compose sv_SE.ISO8859-1 -iso8859-15/Compose sv_SE.ISO8859-15 -tscii-0/Compose ta_IN.TSCII-0 -koi8-c/Compose tg_TJ.KOI8-C -iso8859-1/Compose tl_PH.ISO8859-1 -iso8859-9/Compose tr_TR.ISO8859-9 -tatar-cyr/Compose tt_RU.TATAR-CYR -koi8-c/Compose tt_RU.KOI8-C -koi8-u/Compose uk_UA.KOI8-U -microsoft-cp1256/Compose ur_PK.CP1256 -vi_VN.viscii/Compose vi_VN.VISCII -vi_VN.tcvn/Compose vi_VN.TCVN -iso8859-1/Compose wa_BE.ISO8859-1 -microsoft-cp1255/Compose yi_US.CP1255 -zh/Compose zh_CN.eucCN -zh/Compose zh_CN.GB2312 -zh_CN.gbk/Compose zh_CN.GBK -zh_TW.big5/Compose zh_TW.big5 -zh_TW.big5/Compose zh_TW.Big5 -zh_TW/Compose zh_TW.eucTW -#endif /* R63_COMPAT */ - -iso8859-1/Compose: C -iso8859-1/Compose: af_ZA.ISO8859-1 -iso8859-6/Compose: ar_AA.ISO8859-6 -iso8859-6/Compose: ar_BH.ISO8859-6 -iso8859-6/Compose: ar_DZ.ISO8859-6 -iso8859-6/Compose: ar_EG.ISO8859-6 -iso8859-6/Compose: ar_IQ.ISO8859-6 -iso8859-6/Compose: ar_JO.ISO8859-6 -iso8859-6/Compose: ar_KW.ISO8859-6 -iso8859-6/Compose: ar_LB.ISO8859-6 -iso8859-6/Compose: ar_LY.ISO8859-6 -iso8859-6/Compose: ar_MA.ISO8859-6 -iso8859-6/Compose: ar_OM.ISO8859-6 -iso8859-6/Compose: ar_QA.ISO8859-6 -iso8859-6/Compose: ar_SA.ISO8859-6 -iso8859-6/Compose: ar_TN.ISO8859-6 -iso8859-6/Compose: ar_YE.ISO8859-6 -iso8859-9e/Compose: az_AZ.ISO8859-9E -koi8-c/Compose: a3_AZ.KOI8-C +iso8859-1/Compose: C +iso8859-1/Compose: af_ZA.ISO8859-1 +iso8859-6/Compose: ar_AA.ISO8859-6 +iso8859-6/Compose: ar_BH.ISO8859-6 +iso8859-6/Compose: ar_DZ.ISO8859-6 +iso8859-6/Compose: ar_EG.ISO8859-6 +iso8859-6/Compose: ar_IQ.ISO8859-6 +iso8859-6/Compose: ar_JO.ISO8859-6 +iso8859-6/Compose: ar_KW.ISO8859-6 +iso8859-6/Compose: ar_LB.ISO8859-6 +iso8859-6/Compose: ar_LY.ISO8859-6 +iso8859-6/Compose: ar_MA.ISO8859-6 +iso8859-6/Compose: ar_OM.ISO8859-6 +iso8859-6/Compose: ar_QA.ISO8859-6 +iso8859-6/Compose: ar_SA.ISO8859-6 +iso8859-6/Compose: ar_TN.ISO8859-6 +iso8859-6/Compose: ar_YE.ISO8859-6 +iso8859-9e/Compose: az_AZ.ISO8859-9E +koi8-c/Compose: a3_AZ.KOI8-C microsoft-cp1251/Compose: be_BY.CP1251 -iso8859-5/Compose: bg_BG.ISO8859-5 +iso8859-5/Compose: bg_BG.ISO8859-5 microsoft-cp1251/Compose: bg_BG.CP1251 -iso8859-1/Compose: br_FR.ISO8859-1 -iso8859-14/Compose: br_FR.ISO8859-14 -iso8859-15/Compose: br_FR.ISO8859-15 -iso8859-1/Compose: ca_ES.ISO8859-1 -iso8859-15/Compose: ca_ES.ISO8859-15 -iso8859-2/Compose: cs_CZ.ISO8859-2 -iso8859-1/Compose: cy_GB.ISO8859-1 -iso8859-14/Compose: cy_GB.ISO8859-14 -iso8859-15/Compose: cy_GB.ISO8859-15 -iso8859-1/Compose: da_DK.ISO8859-1 -iso8859-15/Compose: da_DK.ISO8859-15 -iso8859-1/Compose: de_AT.ISO8859-1 -iso8859-15/Compose: de_AT.ISO8859-15 -iso8859-1/Compose: de_CH.ISO8859-1 -iso8859-15/Compose: de_CH.ISO8859-15 -iso8859-1/Compose: de_DE.ISO8859-1 -iso8859-15/Compose: de_DE.ISO8859-15 -iso8859-1/Compose: de_LI.ISO8859-1 -iso8859-15/Compose: de_LI.ISO8859-15 -iso8859-1/Compose: de_LU.ISO8859-1 -iso8859-15/Compose: de_LU.ISO8859-15 -iso8859-7/Compose: el_GR.ISO8859-7 -iso8859-1/Compose: en_AU.ISO8859-1 -iso8859-1/Compose: en_BZ.ISO8859-1 -iso8859-1/Compose: en_CA.ISO8859-1 -iso8859-1/Compose: en_GB.ISO8859-1 -iso8859-15/Compose: en_GB.ISO8859-15 -iso8859-1/Compose: en_IE.ISO8859-1 -iso8859-15/Compose: en_IE.ISO8859-15 -iso8859-1/Compose: en_JM.ISO8859-1 -iso8859-1/Compose: en_NZ.ISO8859-1 -iso8859-1/Compose: en_TT.ISO8859-1 -iso8859-1/Compose: en_UK.ISO8859-1 -iso8859-1/Compose: en_US.ISO8859-1 -iso8859-1/Compose: en_ZA.ISO8859-1 -iso8859-3/Compose: eo_XX.ISO8859-3 -iso8859-1/Compose: es_AR.ISO8859-1 -iso8859-1/Compose: es_BO.ISO8859-1 -iso8859-1/Compose: es_CL.ISO8859-1 -iso8859-1/Compose: es_CO.ISO8859-1 -iso8859-1/Compose: es_CR.ISO8859-1 -iso8859-1/Compose: es_DO.ISO8859-1 -iso8859-1/Compose: es_EC.ISO8859-1 -iso8859-1/Compose: es_ES.ISO8859-1 -iso8859-15/Compose: es_ES.ISO8859-15 -iso8859-1/Compose: es_GT.ISO8859-1 -iso8859-1/Compose: es_HN.ISO8859-1 -iso8859-1/Compose: es_MX.ISO8859-1 -iso8859-1/Compose: es_NI.ISO8859-1 -iso8859-1/Compose: es_PA.ISO8859-1 -iso8859-1/Compose: es_PE.ISO8859-1 -iso8859-1/Compose: es_PR.ISO8859-1 -iso8859-1/Compose: es_PY.ISO8859-1 -iso8859-1/Compose: es_SV.ISO8859-1 -iso8859-1/Compose: es_UY.ISO8859-1 -iso8859-1/Compose: es_VE.ISO8859-1 -iso8859-1/Compose: et_EE.ISO8859-1 -iso8859-4/Compose: et_EE.ISO8859-4 -iso8859-13/Compose: et_EE.ISO8859-13 -iso8859-15/Compose: et_EE.ISO8859-15 -iso8859-1/Compose: eu_ES.ISO8859-1 -iso8859-15/Compose: eu_ES.ISO8859-15 -isiri-3342/Compose: fa_IR.ISIRI-3342 -iso8859-1/Compose: fi_FI.ISO8859-1 -iso8859-15/Compose: fi_FI.ISO8859-15 -iso8859-1/Compose: fo_FO.ISO8859-1 -iso8859-15/Compose: fo_FO.ISO8859-15 -iso8859-1/Compose: fr_BE.ISO8859-1 -iso8859-15/Compose: fr_BE.ISO8859-15 -iso8859-1/Compose: fr_CA.ISO8859-1 -iso8859-15/Compose: fr_CA.ISO8859-15 -iso8859-1/Compose: fr_CH.ISO8859-1 -iso8859-15/Compose: fr_CH.ISO8859-15 -iso8859-1/Compose: fr_FR.ISO8859-1 -iso8859-15/Compose: fr_FR.ISO8859-15 -iso8859-1/Compose: fr_LU.ISO8859-1 -iso8859-15/Compose: fr_LU.ISO8859-15 -iso8859-1/Compose: ga_IE.ISO8859-1 -iso8859-14/Compose: ga_IE.ISO8859-14 -iso8859-15/Compose: ga_IE.ISO8859-15 -iso8859-1/Compose: gd_GB.ISO8859-1 -iso8859-14/Compose: gd_GB.ISO8859-14 -iso8859-15/Compose: gd_GB.ISO8859-15 -iso8859-1/Compose: gl_ES.ISO8859-1 -iso8859-15/Compose: gl_ES.ISO8859-15 -iso8859-1/Compose: gv_GB.ISO8859-1 -iso8859-14/Compose: gv_GB.ISO8859-14 -iso8859-15/Compose: gv_GB.ISO8859-15 -iso8859-8/Compose: he_IL.ISO8859-8 +iso8859-1/Compose: br_FR.ISO8859-1 +iso8859-14/Compose: br_FR.ISO8859-14 +iso8859-15/Compose: br_FR.ISO8859-15 +iso8859-1/Compose: ca_ES.ISO8859-1 +iso8859-15/Compose: ca_ES.ISO8859-15 +iso8859-2/Compose: cs_CZ.ISO8859-2 +iso8859-1/Compose: cy_GB.ISO8859-1 +iso8859-14/Compose: cy_GB.ISO8859-14 +iso8859-15/Compose: cy_GB.ISO8859-15 +iso8859-1/Compose: da_DK.ISO8859-1 +iso8859-15/Compose: da_DK.ISO8859-15 +iso8859-1/Compose: de_AT.ISO8859-1 +iso8859-15/Compose: de_AT.ISO8859-15 +iso8859-1/Compose: de_CH.ISO8859-1 +iso8859-15/Compose: de_CH.ISO8859-15 +iso8859-1/Compose: de_DE.ISO8859-1 +iso8859-15/Compose: de_DE.ISO8859-15 +iso8859-1/Compose: de_LI.ISO8859-1 +iso8859-15/Compose: de_LI.ISO8859-15 +iso8859-1/Compose: de_LU.ISO8859-1 +iso8859-15/Compose: de_LU.ISO8859-15 +iso8859-7/Compose: el_GR.ISO8859-7 +iso8859-1/Compose: en_AU.ISO8859-1 +iso8859-1/Compose: en_BZ.ISO8859-1 +iso8859-1/Compose: en_CA.ISO8859-1 +iso8859-1/Compose: en_GB.ISO8859-1 +iso8859-15/Compose: en_GB.ISO8859-15 +iso8859-1/Compose: en_IE.ISO8859-1 +iso8859-15/Compose: en_IE.ISO8859-15 +iso8859-1/Compose: en_JM.ISO8859-1 +iso8859-1/Compose: en_NZ.ISO8859-1 +iso8859-1/Compose: en_TT.ISO8859-1 +iso8859-1/Compose: en_UK.ISO8859-1 +iso8859-1/Compose: en_US.ISO8859-1 +iso8859-1/Compose: en_ZA.ISO8859-1 +iso8859-3/Compose: eo_XX.ISO8859-3 +iso8859-1/Compose: es_AR.ISO8859-1 +iso8859-1/Compose: es_BO.ISO8859-1 +iso8859-1/Compose: es_CL.ISO8859-1 +iso8859-1/Compose: es_CO.ISO8859-1 +iso8859-1/Compose: es_CR.ISO8859-1 +iso8859-1/Compose: es_DO.ISO8859-1 +iso8859-1/Compose: es_EC.ISO8859-1 +iso8859-1/Compose: es_ES.ISO8859-1 +iso8859-15/Compose: es_ES.ISO8859-15 +iso8859-1/Compose: es_GT.ISO8859-1 +iso8859-1/Compose: es_HN.ISO8859-1 +iso8859-1/Compose: es_MX.ISO8859-1 +iso8859-1/Compose: es_NI.ISO8859-1 +iso8859-1/Compose: es_PA.ISO8859-1 +iso8859-1/Compose: es_PE.ISO8859-1 +iso8859-1/Compose: es_PR.ISO8859-1 +iso8859-1/Compose: es_PY.ISO8859-1 +iso8859-1/Compose: es_SV.ISO8859-1 +iso8859-1/Compose: es_UY.ISO8859-1 +iso8859-1/Compose: es_VE.ISO8859-1 +iso8859-1/Compose: et_EE.ISO8859-1 +iso8859-4/Compose: et_EE.ISO8859-4 +iso8859-13/Compose: et_EE.ISO8859-13 +iso8859-15/Compose: et_EE.ISO8859-15 +iso8859-1/Compose: eu_ES.ISO8859-1 +iso8859-15/Compose: eu_ES.ISO8859-15 +isiri-3342/Compose: fa_IR.ISIRI-3342 +iso8859-1/Compose: fi_FI.ISO8859-1 +iso8859-15/Compose: fi_FI.ISO8859-15 +iso8859-1/Compose: fo_FO.ISO8859-1 +iso8859-15/Compose: fo_FO.ISO8859-15 +iso8859-1/Compose: fr_BE.ISO8859-1 +iso8859-15/Compose: fr_BE.ISO8859-15 +iso8859-1/Compose: fr_CA.ISO8859-1 +iso8859-15/Compose: fr_CA.ISO8859-15 +iso8859-1/Compose: fr_CH.ISO8859-1 +iso8859-15/Compose: fr_CH.ISO8859-15 +iso8859-1/Compose: fr_FR.ISO8859-1 +iso8859-15/Compose: fr_FR.ISO8859-15 +iso8859-1/Compose: fr_LU.ISO8859-1 +iso8859-15/Compose: fr_LU.ISO8859-15 +iso8859-1/Compose: ga_IE.ISO8859-1 +iso8859-14/Compose: ga_IE.ISO8859-14 +iso8859-15/Compose: ga_IE.ISO8859-15 +iso8859-1/Compose: gd_GB.ISO8859-1 +iso8859-14/Compose: gd_GB.ISO8859-14 +iso8859-15/Compose: gd_GB.ISO8859-15 +iso8859-1/Compose: gl_ES.ISO8859-1 +iso8859-15/Compose: gl_ES.ISO8859-15 +iso8859-1/Compose: gv_GB.ISO8859-1 +iso8859-14/Compose: gv_GB.ISO8859-14 +iso8859-15/Compose: gv_GB.ISO8859-15 +iso8859-8/Compose: he_IL.ISO8859-8 microsoft-cp1255/Compose: he_IL.CP1255 -iscii-dev/Compose: hi_IN.ISCII-DEV -iso8859-2/Compose: hr_HR.ISO8859-2 -iso8859-2/Compose: hu_HU.ISO8859-2 -armscii-8/Compose: hy_AM.ARMSCII-8 -iso8859-1/Compose: id_ID.ISO8859-1 -iso8859-15/Compose: id_ID.ISO8859-15 -iso8859-1/Compose: is_IS.ISO8859-1 -iso8859-15/Compose: is_IS.ISO8859-15 -iso8859-1/Compose: it_CH.ISO8859-1 -iso8859-15/Compose: it_CH.ISO8859-15 -iso8859-1/Compose: it_IT.ISO8859-1 -iso8859-15/Compose: it_IT.ISO8859-15 -ja/Compose: ja_JP.eucJP -ja.SJIS/Compose: ja_JP.SJIS -ja.JIS/Compose: ja_JP.JIS7 -georgian-academy/Compose: ka_GE.GEORGIAN-ACADEMY -georgian-ps/Compose: ka_GE.GEORGIAN-PS -iso8859-1/Compose: kl_GL.ISO8859-1 -iso8859-15/Compose: kl_GL.ISO8859-15 -iso8859-1/Compose: kw_GB.ISO8859-1 -iso8859-14/Compose: kw_GB.ISO8859-14 -iso8859-15/Compose: kw_GB.ISO8859-15 -ko/Compose: ko_KR.eucKR -ibm-cp1133/Compose: lo_LA.IBM-CP1133 -mulelao-1/Compose: lo_LA.MULELAO-1 -iso8859-1/Compose: lt_LN.ISO8859-1 -iso8859-4/Compose: lt_LT.ISO8859-4 -iso8859-13/Compose: lt_LT.ISO8859-13 -iso8859-4/Compose: lv_LV.ISO8859-4 -iso8859-13/Compose: lv_LV.ISO8859-13 -iso8859-13/Compose: mi_NZ.ISO8859-13 -iso8859-5/Compose: mk_MK.ISO8859-5 -mk_MK.UTF-8/Compose: mk_MK.UTF-8 +iscii-dev/Compose: hi_IN.ISCII-DEV +iso8859-2/Compose: hr_HR.ISO8859-2 +iso8859-2/Compose: hu_HU.ISO8859-2 +armscii-8/Compose: hy_AM.ARMSCII-8 +iso8859-1/Compose: id_ID.ISO8859-1 +iso8859-15/Compose: id_ID.ISO8859-15 +iso8859-1/Compose: is_IS.ISO8859-1 +iso8859-15/Compose: is_IS.ISO8859-15 +iso8859-1/Compose: it_CH.ISO8859-1 +iso8859-15/Compose: it_CH.ISO8859-15 +iso8859-1/Compose: it_IT.ISO8859-1 +iso8859-15/Compose: it_IT.ISO8859-15 +ja/Compose: ja_JP.eucJP +ja.SJIS/Compose: ja_JP.SJIS +ja.JIS/Compose: ja_JP.JIS7 +georgian-academy/Compose: ka_GE.GEORGIAN-ACADEMY +georgian-ps/Compose: ka_GE.GEORGIAN-PS +iso8859-1/Compose: kl_GL.ISO8859-1 +iso8859-15/Compose: kl_GL.ISO8859-15 +iso8859-1/Compose: kw_GB.ISO8859-1 +iso8859-14/Compose: kw_GB.ISO8859-14 +iso8859-15/Compose: kw_GB.ISO8859-15 +ko/Compose: ko_KR.eucKR +ibm-cp1133/Compose: lo_LA.IBM-CP1133 +mulelao-1/Compose: lo_LA.MULELAO-1 +iso8859-1/Compose: lt_LN.ISO8859-1 +iso8859-4/Compose: lt_LT.ISO8859-4 +iso8859-13/Compose: lt_LT.ISO8859-13 +iso8859-4/Compose: lv_LV.ISO8859-4 +iso8859-13/Compose: lv_LV.ISO8859-13 +iso8859-13/Compose: mi_NZ.ISO8859-13 +iso8859-5/Compose: mk_MK.ISO8859-5 +XCOMM mk_MK.UTF-8/Compose: mk_MK.UTF-8 microsoft-cp1251/Compose: mk_MK.CP1251 -iso8859-1/Compose: ms_MY.ISO8859-1 -iso8859-1/Compose: nl_BE.ISO8859-1 -iso8859-15/Compose: nl_BE.ISO8859-15 -iso8859-1/Compose: nl_NL.ISO8859-1 -iso8859-15/Compose: nl_NL.ISO8859-15 -iso8859-1/Compose: no_NO.ISO8859-1 -iso8859-15/Compose: no_NO.ISO8859-15 -iso8859-1/Compose: nb_NO.ISO8859-1 -iso8859-15/Compose: nb_NO.ISO8859-15 -iso8859-1/Compose: ny_NO.ISO8859-1 -iso8859-15/Compose: ny_NO.ISO8859-15 -iso8859-1/Compose: oc_FR.ISO8859-1 -iso8859-15/Compose: oc_FR.ISO8859-15 -iso8859-1/Compose: pd_DE.ISO8859-1 -iso8859-1/Compose: pd_US.ISO8859-1 -iso8859-1/Compose: ph_PH.ISO8859-1 -iso8859-2/Compose: pl_PL.ISO8859-2 -iso8859-1/Compose: pp_AN.ISO8859-1 -iso8859-1/Compose: pt_BR.ISO8859-1 -iso8859-15/Compose: pt_BR.ISO8859-15 -iso8859-1/Compose: pt_PT.ISO8859-1 -iso8859-15/Compose: pt_PT.ISO8859-15 -iso8859-2/Compose: ro_RO.ISO8859-2 -koi8-r/Compose: ru_RU.KOI8-R -iso8859-5/Compose: ru_RU.ISO8859-5 +iso8859-1/Compose: ms_MY.ISO8859-1 +iso8859-3/Compose: mt_MT.ISO8859-3 +iso8859-1/Compose: nl_BE.ISO8859-1 +iso8859-15/Compose: nl_BE.ISO8859-15 +iso8859-1/Compose: nl_NL.ISO8859-1 +iso8859-15/Compose: nl_NL.ISO8859-15 +iso8859-1/Compose: no_NO.ISO8859-1 +iso8859-15/Compose: no_NO.ISO8859-15 +iso8859-1/Compose: nb_NO.ISO8859-1 +iso8859-15/Compose: nb_NO.ISO8859-15 +iso8859-1/Compose: nn_NO.ISO8859-1 +iso8859-15/Compose: nn_NO.ISO8859-15 +iso8859-1/Compose: ny_NO.ISO8859-1 +iso8859-15/Compose: ny_NO.ISO8859-15 +iso8859-1/Compose: oc_FR.ISO8859-1 +iso8859-15/Compose: oc_FR.ISO8859-15 +iso8859-1/Compose: pd_DE.ISO8859-1 +iso8859-1/Compose: pd_US.ISO8859-1 +iso8859-1/Compose: ph_PH.ISO8859-1 +iso8859-2/Compose: pl_PL.ISO8859-2 +iso8859-1/Compose: pp_AN.ISO8859-1 +iso8859-1/Compose: pt_BR.ISO8859-1 +iso8859-15/Compose: pt_BR.ISO8859-15 +iso8859-1/Compose: pt_PT.ISO8859-1 +iso8859-15/Compose: pt_PT.ISO8859-15 +iso8859-2/Compose: ro_RO.ISO8859-2 +koi8-r/Compose: ru_RU.KOI8-R +iso8859-5/Compose: ru_RU.ISO8859-5 microsoft-cp1251/Compose: ru_RU.CP1251 -koi8-u/Compose: ru_UA.KOI8-U -iso8859-2/Compose: sh_YU.ISO8859-2 -iso8859-2/Compose: sk_SK.ISO8859-2 -iso8859-2/Compose: sl_CS.ISO8859-2 -iso8859-2/Compose: sl_SI.ISO8859-2 -iso8859-5/Compose: sp_YU.ISO8859-5 -iso8859-2/Compose: sq_AL.ISO8859-2 -iso8859-2/Compose: sr_SP.ISO8859-2 -iso8859-2/Compose: sr_YU.ISO8859-2 -iso8859-5/Compose: sr_YU.ISO8859-5 -iso8859-1/Compose: sv_FI.ISO8859-1 -iso8859-15/Compose: sv_FI.ISO8859-15 -iso8859-1/Compose: sv_SE.ISO8859-1 -iso8859-15/Compose: sv_SE.ISO8859-15 -tscii-0/Compose: ta_IN.TSCII-0 -koi8-c/Compose: tg_TJ.KOI8-C -iso8859-1/Compose: tl_PH.ISO8859-1 -iso8859-9/Compose: tr_TR.ISO8859-9 -tatar-cyr/Compose: tt_RU.TATAR-CYR -koi8-c/Compose: tt_RU.KOI8-C -koi8-u/Compose: uk_UA.KOI8-U +koi8-u/Compose: ru_UA.KOI8-U +iso8859-2/Compose: sh_YU.ISO8859-2 +iso8859-2/Compose: sk_SK.ISO8859-2 +iso8859-2/Compose: sl_CS.ISO8859-2 +iso8859-2/Compose: sl_SI.ISO8859-2 +iso8859-5/Compose: sp_YU.ISO8859-5 +iso8859-2/Compose: sq_AL.ISO8859-2 +iso8859-2/Compose: sr_SP.ISO8859-2 +iso8859-2/Compose: sr_YU.ISO8859-2 +iso8859-5/Compose: sr_YU.ISO8859-5 +iso8859-1/Compose: sv_FI.ISO8859-1 +iso8859-15/Compose: sv_FI.ISO8859-15 +iso8859-1/Compose: sv_SE.ISO8859-1 +iso8859-15/Compose: sv_SE.ISO8859-15 +tscii-0/Compose: ta_IN.TSCII-0 +koi8-c/Compose: tg_TJ.KOI8-C +iso8859-1/Compose: tl_PH.ISO8859-1 +iso8859-9/Compose: tr_TR.ISO8859-9 +tatar-cyr/Compose: tt_RU.TATAR-CYR +koi8-c/Compose: tt_RU.KOI8-C +koi8-u/Compose: uk_UA.KOI8-U microsoft-cp1256/Compose: ur_PK.CP1256 -vi_VN.viscii/Compose: vi_VN.VISCII -vi_VN.tcvn/Compose: vi_VN.TCVN -iso8859-1/Compose: wa_BE.ISO8859-1 +vi_VN.viscii/Compose: vi_VN.VISCII +vi_VN.tcvn/Compose: vi_VN.TCVN +iso8859-1/Compose: wa_BE.ISO8859-1 microsoft-cp1255/Compose: yi_US.CP1256 -zh/Compose: zh_CN.eucCN -zh/Compose: zh_CN.GB2312 -zh_CN.gbk/Compose: zh_CN.GBK -zh_TW.big5/Compose: zh_TW.big5 -zh_TW.big5/Compose: zh_TW.Big5 -zh_TW/Compose: zh_TW.eucTW +zh_CN/Compose: zh_CN.eucCN +zh_CN/Compose: zh_CN.GB2312 +zh_CN.gbk/Compose: zh_CN.GBK +zh_TW.big5/Compose: zh_TW.big5 +zh_TW.big5/Compose: zh_TW.Big5 +zh_TW/Compose: zh_TW.eucTW +XCOMM +XCOMM +en_US.UTF-8/Compose: af_ZA.UTF-8 +en_US.UTF-8/Compose: ar_AA.UTF-8 +en_US.UTF-8/Compose: ar_BH.UTF-8 +en_US.UTF-8/Compose: ar_DZ.UTF-8 +en_US.UTF-8/Compose: ar_EG.UTF-8 +en_US.UTF-8/Compose: ar_IQ.UTF-8 +en_US.UTF-8/Compose: ar_JO.UTF-8 +en_US.UTF-8/Compose: ar_KW.UTF-8 +en_US.UTF-8/Compose: ar_LB.UTF-8 +en_US.UTF-8/Compose: ar_LY.UTF-8 +en_US.UTF-8/Compose: ar_MA.UTF-8 +en_US.UTF-8/Compose: ar_OM.UTF-8 +en_US.UTF-8/Compose: ar_QA.UTF-8 +en_US.UTF-8/Compose: ar_SA.UTF-8 +en_US.UTF-8/Compose: ar_TN.UTF-8 +en_US.UTF-8/Compose: ar_YE.UTF-8 +en_US.UTF-8/Compose: az_AZ.UTF-8 +en_US.UTF-8/Compose: a3_AZ.UTF-8 +en_US.UTF-8/Compose: be_BY.UTF-8 +en_US.UTF-8/Compose: bg_BG.UTF-8 +en_US.UTF-8/Compose: br_FR.UTF-8 +en_US.UTF-8/Compose: ca_ES.UTF-8 +en_US.UTF-8/Compose: cs_CZ.UTF-8 +en_US.UTF-8/Compose: cy_GB.UTF-8 +en_US.UTF-8/Compose: cz_CZ.UTF-8 +en_US.UTF-8/Compose: da_DK.UTF-8 +en_US.UTF-8/Compose: de_AT.UTF-8 +en_US.UTF-8/Compose: de_BE.UTF-8 +en_US.UTF-8/Compose: de_CH.UTF-8 +en_US.UTF-8/Compose: de_DE.UTF-8 +en_US.UTF-8/Compose: de_LI.UTF-8 +en_US.UTF-8/Compose: de_LU.UTF-8 +en_US.UTF-8/Compose: el_GR.UTF-8 +en_US.UTF-8/Compose: en_AU.UTF-8 +en_US.UTF-8/Compose: en_BZ.UTF-8 +en_US.UTF-8/Compose: en_CA.UTF-8 +en_US.UTF-8/Compose: en_GB.UTF-8 +en_US.UTF-8/Compose: en_IE.UTF-8 +en_US.UTF-8/Compose: en_JM.UTF-8 +en_US.UTF-8/Compose: en_NZ.UTF-8 +en_US.UTF-8/Compose: en_TT.UTF-8 +en_US.UTF-8/Compose: en_UK.UTF-8 +en_US.UTF-8/Compose: en_US.UTF-8 +en_US.UTF-8/Compose: en_ZA.UTF-8 +en_US.UTF-8/Compose: eo_XX.UTF-8 +en_US.UTF-8/Compose: es_AR.UTF-8 +en_US.UTF-8/Compose: es_BO.UTF-8 +en_US.UTF-8/Compose: es_CL.UTF-8 +en_US.UTF-8/Compose: es_CO.UTF-8 +en_US.UTF-8/Compose: es_CR.UTF-8 +en_US.UTF-8/Compose: es_DO.UTF-8 +en_US.UTF-8/Compose: es_EC.UTF-8 +en_US.UTF-8/Compose: es_ES.UTF-8 +en_US.UTF-8/Compose: es_GT.UTF-8 +en_US.UTF-8/Compose: es_HN.UTF-8 +en_US.UTF-8/Compose: es_MX.UTF-8 +en_US.UTF-8/Compose: es_NI.UTF-8 +en_US.UTF-8/Compose: es_PA.UTF-8 +en_US.UTF-8/Compose: es_PE.UTF-8 +en_US.UTF-8/Compose: es_PR.UTF-8 +en_US.UTF-8/Compose: es_PY.UTF-8 +en_US.UTF-8/Compose: es_SV.UTF-8 +en_US.UTF-8/Compose: es_UY.UTF-8 +en_US.UTF-8/Compose: es_VE.UTF-8 +en_US.UTF-8/Compose: et_EE.UTF-8 +en_US.UTF-8/Compose: eu_ES.UTF-8 +en_US.UTF-8/Compose: fa_IR.UTF-8 +en_US.UTF-8/Compose: fi_FI.UTF-8 +en_US.UTF-8/Compose: fo_FO.UTF-8 +en_US.UTF-8/Compose: fr_BE.UTF-8 +en_US.UTF-8/Compose: fr_CA.UTF-8 +en_US.UTF-8/Compose: fr_CH.UTF-8 +en_US.UTF-8/Compose: fr_FR.UTF-8 +en_US.UTF-8/Compose: fr_LU.UTF-8 +en_US.UTF-8/Compose: ga_IE.UTF-8 +en_US.UTF-8/Compose: gd_GB.UTF-8 +en_US.UTF-8/Compose: gl_ES.UTF-8 +en_US.UTF-8/Compose: gv_GB.UTF-8 +en_US.UTF-8/Compose: he_IL.UTF-8 +en_US.UTF-8/Compose: hi_IN.UTF-8 +en_US.UTF-8/Compose: hr_HR.UTF-8 +en_US.UTF-8/Compose: hu_HU.UTF-8 +en_US.UTF-8/Compose: hy_AM.UTF-8 +en_US.UTF-8/Compose: id_ID.UTF-8 +en_US.UTF-8/Compose: is_IS.UTF-8 +en_US.UTF-8/Compose: it_CH.UTF-8 +en_US.UTF-8/Compose: it_IT.UTF-8 +en_US.UTF-8/Compose: iu_CA.UTF-8 +en_US.UTF-8/Compose: ka_GE.UTF-8 +en_US.UTF-8/Compose: kl_GL.UTF-8 +en_US.UTF-8/Compose: kw_GB.UTF-8 +en_US.UTF-8/Compose: lo_LA.UTF-8 +en_US.UTF-8/Compose: lt_LT.UTF-8 +en_US.UTF-8/Compose: lv_LV.UTF-8 +en_US.UTF-8/Compose: mi_NZ.UTF-8 +en_US.UTF-8/Compose: mk_MK.UTF-8 +en_US.UTF-8/Compose: ms_MY.UTF-8 +en_US.UTF-8/Compose: nl_BE.UTF-8 +en_US.UTF-8/Compose: nl_NL.UTF-8 +en_US.UTF-8/Compose: no_NO.UTF-8 +en_US.UTF-8/Compose: nb_NO.UTF-8 +en_US.UTF-8/Compose: ny_NO.UTF-8 +en_US.UTF-8/Compose: oc_FR.UTF-8 +en_US.UTF-8/Compose: pd_DE.UTF-8 +en_US.UTF-8/Compose: pd_US.UTF-8 +en_US.UTF-8/Compose: ph_PH.UTF-8 +en_US.UTF-8/Compose: pl_PL.UTF-8 +en_US.UTF-8/Compose: pp_AN.UTF-8 +en_US.UTF-8/Compose: pt_BR.UTF-8 +en_US.UTF-8/Compose: pt_PT.UTF-8 +en_US.UTF-8/Compose: ro_RO.UTF-8 +en_US.UTF-8/Compose: ru_RU.UTF-8 +en_US.UTF-8/Compose: ru_UA.UTF-8 +en_US.UTF-8/Compose: sk_SK.UTF-8 +en_US.UTF-8/Compose: sl_SI.UTF-8 +en_US.UTF-8/Compose: sq_AL.UTF-8 +en_US.UTF-8/Compose: sr_YU.UTF-8 +en_US.UTF-8/Compose: sv_FI.UTF-8 +en_US.UTF-8/Compose: sv_SE.UTF-8 +en_US.UTF-8/Compose: ta_IN.UTF-8 +en_US.UTF-8/Compose: tg_TJ.UTF-8 +en_US.UTF-8/Compose: th_TH.UTF-8 +en_US.UTF-8/Compose: tl_PH.UTF-8 +en_US.UTF-8/Compose: tr_TR.UTF-8 +en_US.UTF-8/Compose: tt_RU.UTF-8 +en_US.UTF-8/Compose: uk_UA.UTF-8 +en_US.UTF-8/Compose: ur_PK.UTF-8 +en_US.UTF-8/Compose: vi_VN.UTF-8 +en_US.UTF-8/Compose: wa_BE.UTF-8 +en_US.UTF-8/Compose: yi_US.UTF-8 Index: xc/nls/locale.alias diff -u xc/nls/locale.alias:1.38.2.1 xc/nls/locale.alias:1.50 --- xc/nls/locale.alias:1.38.2.1 Wed May 23 14:32:14 2001 +++ xc/nls/locale.alias Wed Dec 19 16:29:40 2001 @@ -5,595 +5,8 @@ XCOMM The first word is the alias name (simplified locale name) XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/locale.alias,v 1.38.2.1 2001/05/23 18:32:14 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.alias,v 1.50 2001/12/19 21:29:40 dawes Exp $ XCOMM -#ifdef R63_COMPAT -XCOMM These entries are in the old format (no ':') -POSIX C -POSIX-UTF2 C -C_C.C C -C.en C -C.iso88591 en_US.ISO8859-1 -Cextend en_US.ISO8859-1 -Cextend.en en_US.ISO8859-1 -English_United-States.437 C -af af_ZA.ISO8859-1 -af_ZA af_ZA.ISO8859-1 -af_ZA.iso88591 af_ZA.ISO8859-1 -ar ar_AA.ISO8859-6 -ar_AA ar_AA.ISO8859-6 -ar_AA.iso88596 ar_AA.ISO8859-6 -ar_SA ar_SA.ISO8859-6 -ar_SA.iso88596 ar_SA.ISO8859-6 -ar_EG ar_EG.ISO8859-6 -ar_EG.iso88596 ar_EG.ISO8859-6 -bg bg_BG.ISO8859-5 -bg_BG bg_BG.ISO8859-5 -bg_BG.iso88595 bg_BG.ISO8859-5 -br br_FR.ISO8859-1 -br_FR br_FR.ISO8859-1 -br_FR.iso88591 br_FR.ISO8859-1 -br_FR.iso885914 br_FR.ISO8859-14 -br_FR.iso885915 br_FR.ISO8859-15 -br_FR@euro br_FR.ISO8859-15 -ca ca_ES.ISO8859-1 -ca_ES ca_ES.ISO8859-1 -ca_ES.iso88591 ca_ES.ISO8859-1 -ca_ES.iso885915 ca_ES.ISO8859-15 -ca_ES@euro ca_ES.ISO8859-15 -cs cs_CZ.ISO8859-2 -cs_CS cs_CZ.ISO8859-2 -cs_CS.ISO8859-2 cs_CZ.ISO8859-2 -cs_CZ cs_CZ.ISO8859-2 -cs_CZ.iso88592 cs_CZ.ISO8859-2 -cs_CZ.ISO_8859-2 cs_CZ.ISO8859-2 -XCOMM cz is old name for cs, should be deleted in the future: -cz cs_CZ.ISO8859-2 -cz_CZ cs_CZ.ISO8859-2 -cy cy_GB.ISO8859-1 -cy_GB cy_GB.ISO8859-1 -cy_GB.iso88591 cy_GB.ISO8859-1 -cy_GB.iso885914 cy_GB.ISO8859-14 -cy_GB.iso885915 cy_GB.ISO8859-15 -da da_DK.ISO8859-1 -da_DK da_DK.ISO8859-1 -da_DK.88591 da_DK.ISO8859-1 -da_DK.88591.en da_DK.ISO8859-1 -da_DK.iso88591 da_DK.ISO8859-1 -da_DK.ISO_8859-1 da_DK.ISO8859-1 -da_DK.iso885915 da_DK.ISO8859-15 -de de_DE.ISO8859-1 -de_AT de_AT.ISO8859-1 -de_AT.iso88591 de_AT.ISO8859-1 -de_AT.ISO_8859-1 de_AT.ISO8859-1 -de_AT.iso885915 de_AT.ISO8859-15 -de_AT@euro de_AT.ISO8859-15 -de_BE de_BE.ISO8859-1 -de_BE.iso88591 de_BE.ISO8859-1 -de_BE.ISO_8859-1 de_BE.ISO8859-1 -de_BE.iso885915 de_BE.ISO8859-15 -de_BE@euro de_BE.ISO8859-15 -de_CH de_CH.ISO8859-1 -de_CH.iso88591 de_CH.ISO8859-1 -de_CH.ISO_8859-1 de_CH.ISO8859-1 -de_CH.iso885915 de_CH.ISO8859-15 -de_DE de_DE.ISO8859-1 -de_DE.88591 de_DE.ISO8859-1 -de_DE.88591.en de_DE.ISO8859-1 -de_DE.iso88591 de_DE.ISO8859-1 -de_DE.ISO_8859-1 de_DE.ISO8859-1 -de_DE.iso885915 de_DE.ISO8859-15 -de_DE@euro de_DE.ISO8859-15 -de_LU de_LU.ISO8859-1 -de_LU.iso88591 de_LU.ISO8859-1 -de_LU.ISO_8859-1 de_LU.ISO8859-1 -de_LU.iso885915 de_LU.ISO8859-15 -de_LU@euro de_LU.ISO8859-15 -GER_DE.8859 de_DE.ISO8859-1 -GER_DE.8859.in de_DE.ISO8859-1 -ee ee_EE.ISO8859-4 -ee_EE ee_EE.ISO8859-4 -ee_EE.iso88594 ee_EE.ISO8859-4 -el el_GR.ISO8859-7 -el_GR el_GR.ISO8859-7 -el_GR.iso88597 el_GR.ISO8859-7 -el_GR@euro el_GR.ISO8859-15 -en en_US.ISO8859-1 -en_AU en_AU.ISO8859-1 -en_AU.iso88591 en_AU.ISO8859-1 -en_AU.ISO_8859-1 en_AU.ISO8859-1 -en_CA en_CA.ISO8859-1 -en_CA.iso88591 en_CA.ISO8859-1 -en_CA.ISO_8859-1 en_CA.ISO8859-1 -en_GB en_GB.ISO8859-1 -en_GB.88591 en_GB.ISO8859-1 -en_GB.88591.en en_GB.ISO8859-1 -en_GB.iso88591 en_GB.ISO8859-1 -en_GB.ISO_8859-1 en_GB.ISO8859-1 -en_UK en_GB.ISO8859-1 -ENG_GB.8859 en_GB.ISO8859-1 -ENG_GB.8859.in en_GB.ISO8859-1 -en_IE en_IE.ISO8859-1 -en_IE.iso88591 en_IE.ISO8859-1 -en_IE@euro en_IE.ISO8859-15 -en_NZ en_NZ.ISO8859-1 -en_NZ.iso88591 en_NZ.ISO8859-1 -en_US en_US.ISO8859-1 -en_US.88591 en_US.ISO8859-1 -en_US.88591.en en_US.ISO8859-1 -en_US.iso88591 en_US.ISO8859-1 -en_US.ISO_8859-1 en_US.ISO8859-1 -#if defined(SVR4) && defined(sun) -en_US.UTF-8 en_US.utf -en_US.utf8 en_US.utf -#endif -eo eo_XX.ISO8859-3 -eo_XX eo_XX.ISO8859-3 -eo_XX.ISO8859-3 eo_XX.ISO8859-3 -es es_ES.ISO8859-1 -es_AR es_AR.ISO8859-1 -es_AR.iso88591 es_AR.ISO8859-1 -es_BO es_BO.ISO8859-1 -es_BO.iso88591 es_BO.ISO8859-1 -es_CL es_CL.ISO8859-1 -es_CL.iso88591 es_CL.ISO8859-1 -es_CO es_CO.ISO8859-1 -es_CO.iso88591 es_CO.ISO8859-1 -es_CR es_CR.ISO8859-1 -es_CR.iso88591 es_CR.ISO8859-1 -es_EC es_EC.ISO8859-1 -es_EC.iso88591 es_EC.ISO8859-1 -es_ES es_ES.ISO8859-1 -es_ES.88591 es_ES.ISO8859-1 -es_ES.88591.en es_ES.ISO8859-1 -es_ES.iso88591 es_ES.ISO8859-1 -es_ES.ISO_8859-1 es_ES.ISO8859-1 -es_ES.iso885915 es_ES.ISO8859-15 -es_ES@euro es_ES.ISO8859-15 -es_GT es_GT.ISO8859-1 -es_GT.iso88591 es_GT.ISO8859-1 -es_MX es_MX.ISO8859-1 -es_MX.iso88591 es_MX.ISO8859-1 -es_NI es_NI.ISO8859-1 -es_NI.iso88591 es_NI.ISO8859-1 -es_PA es_PA.ISO8859-1 -es_PA.iso88591 es_PA.ISO8859-1 -es_PA.iso885915 es_PA.ISO8859-15 -es_PE es_PE.ISO8859-1 -es_PE.iso88591 es_PE.ISO8859-1 -es_PE.iso885915 es_PE.ISO8859-15 -es_PY es_PY.ISO8859-1 -es_PY.iso88591 es_PY.ISO8859-1 -es_PY.iso885915 es_PY.ISO8859-15 -es_SV es_SV.ISO8859-1 -es_SV.iso88591 es_SV.ISO8859-1 -es_SV.iso885915 es_SV.ISO8859-15 -es_UY es_UY.ISO8859-1 -es_UY.iso88591 es_UY.ISO8859-1 -es_UY.iso885915 es_UY.ISO8859-15 -es_VE es_VE.ISO8859-1 -es_VE.iso88591 es_VE.ISO8859-1 -es_VE.iso885915 es_VE.ISO8859-15 -#if defined(SVR4) && defined(sun) -XCOMM Sun Solaris 2.6 has erroneously specified Estonian as a Latin-1 -XCOMM language; however this is clearly incorrect according to ISO8859. -#endif -et et_EE.ISO8859-15 -et_EE et_EE.ISO8859-15 -et_EE.iso88591 et_EE.ISO8859-1 -et_EE.iso88594 et_EE.ISO8859-4 -et_EE.iso885913 et_EE.ISO8859-13 -et_EE.iso885915 et_EE.ISO8859-15 -eu eu_ES.ISO8859-1 -eu_ES eu_ES.ISO8859-1 -eu_ES.iso88591 eu_ES.ISO8859-1 -eu_ES.iso885915 eu_ES.ISO8859-15 -eu_ES@euro eu_ES.ISO8859-15 -fi fi_FI.ISO8859-1 -fi_FI fi_FI.ISO8859-1 -fi_FI.88591 fi_FI.ISO8859-1 -fi_FI.88591.en fi_FI.ISO8859-1 -fi_FI.iso88591 fi_FI.ISO8859-1 -fi_FI.ISO_8859-1 fi_FI.ISO8859-1 -fi_FI.iso885915 fi_FI.ISO8859-15 -fi_FI@euro fi_FI.ISO8859-15 -fo fo_FO.ISO8859-1 -fo_FO fo_FO.ISO8859-1 -fo_FO.iso88591 fo_FO.ISO8859-1 -fo_FO.iso885915 fo_FO.ISO8859-15 -fr fr_FR.ISO8859-1 -fr_BE fr_BE.ISO8859-1 -fr_BE.88591 fr_BE.ISO8859-1 -fr_BE.88591.en fr_BE.ISO8859-1 -fr_BE.ISO_8859-1 fr_BE.ISO8859-1 -fr_BE.iso885915 fr_BE.ISO8859-15 -fr_BE@euro fr_BE.ISO8859-15 -fr_CA fr_CA.ISO8859-1 -fr_CA.88591 fr_CA.ISO8859-1 -fr_CA.88591.en fr_CA.ISO8859-1 -fr_CA.iso88591 fr_CA.ISO8859-1 -fr_CA.ISO_8859-1 fr_CA.ISO8859-1 -fr_CA.iso885915 fr_CA.ISO8859-15 -fr_CH fr_CH.ISO8859-1 -fr_CH.88591 fr_CH.ISO8859-1 -fr_CH.88591.en fr_CH.ISO8859-1 -fr_CH.ISO_8859-1 fr_CH.ISO8859-1 -fr_CH.iso885915 fr_CH.ISO8859-15 -fr_FR fr_FR.ISO8859-1 -fr_FR.88591 fr_FR.ISO8859-1 -fr_FR.88591.en fr_FR.ISO8859-1 -fr_FR.iso88591 fr_FR.ISO8859-1 -fr_FR.ISO_8859-1 fr_FR.ISO8859-1 -fr_FR.iso885915 fr_FR.ISO8859-15 -fr_FR@euro fr_FR.ISO8859-15 -fr_LU fr_LU.ISO8859-1 -fr_LU.88591 fr_LU.ISO8859-1 -fr_LU.88591.en fr_LU.ISO8859-1 -fr_LU.iso88591 fr_LU.ISO8859-1 -fr_LU.ISO_8859-1 fr_LU.ISO8859-1 -fr_LU.iso885915 fr_LU.ISO8859-15 -fr_LU@euro fr_LU.ISO8859-15 -FRE_FR.8859 fr_FR.ISO8859-1 -FRE_FR.8859.in fr_FR.ISO8859-1 -ga ga_IE.ISO8859-1 -ga_IE ga_IE.ISO8859-1 -ga_IE.iso88591 ga_IE.ISO8859-1 -ga_IE.iso885914 ga_IE.ISO8859-14 -ga_IE.iso885915 ga_IE.ISO8859-15 -ga_IE@euro ga_IE.ISO8859-15 -gd gd_GB.ISO8859-1 -gd_GB gd_GB.ISO8859-1 -gd_GB.iso88591 gd_GB.ISO8859-1 -gd_GB.iso885914 gd_GB.ISO8859-14 -gd_GB.iso885915 gd_GB.ISO8859-15 -gl gl_ES.ISO8859-1 -gl_ES gl_ES.ISO8859-1 -gl_ES.iso88591 gl_ES.ISO8859-1 -gl_ES.iso885915 gl_ES.ISO8859-15 -gl_ES@euro gl_ES.ISO8859-15 -gv gv_GB.ISO8859-1 -gv_GB gv_GB.ISO8859-1 -gv_GB.iso88591 gv_GB.ISO8859-1 -gv_GB.iso885914 gv_GB.ISO8859-14 -gv_GB.iso885915 gv_GB.ISO8859-15 -he he_IL.ISO8859-8 -he_IL he_IL.ISO8859-8 -he_IL.iso88598 he_IL.ISO8859-8 -hr hr_HR.ISO8859-2 -hr_HR hr_HR.ISO8859-2 -hr_HR.iso88592 hr_HR.ISO8859-2 -hr_HR.ISO_8859-2 hr_HR.ISO8859-2 -hu hu_HU.ISO8859-2 -hu_HU hu_HU.ISO8859-2 -hu_HU.iso88592 hu_HU.ISO8859-2 -hy hy_AM.ARMSCII-8 -hy_AM hy_AM.ARMSCII-8 -hy_AM.armscii8 hy_AM.ARMSCII-8 -id id_ID.ISO8859-1 -id_ID id_ID.ISO8859-1 -id_ID.iso88591 id_ID.ISO8859-1 -XCOMM in was the old iso code for indonesian (now id) -XCOMM those lines should be deleted in a near future -in id_ID.ISO8859-1 -in_ID id_ID.ISO8859-1 -is is_IS.ISO8859-1 -is_IS is_IS.ISO8859-1 -is_IS.iso88591 is_IS.ISO8859-1 -is_IS.ISO_8859-1 is_IS.ISO8859-1 -is_IS.iso885915 is_IS.ISO8859-15 -it it_IT.ISO8859-1 -it_CH it_CH.ISO8859-1 -it_CH.iso88591 it_CH.ISO8859-1 -it_CH.ISO_8859-1 it_CH.ISO8859-1 -it_CH.iso885915 it_CH.ISO8859-15 -it_IT it_IT.ISO8859-1 -it_IT.88591 it_IT.ISO8859-1 -it_IT.88591.en it_IT.ISO8859-1 -it_IT.iso88591 it_IT.ISO8859-1 -it_IT.ISO_8859-1 it_IT.ISO8859-1 -it_IT.iso885915 it_IT.ISO8859-15 -it_IT@euro it_IT.ISO8859-15 -iu iu_CA.NUNACOM-8 -iu_CA iu_CA.NUNACOM-8 -iu_CA.nunacom8 iu_CA.NUNACOM-8 -XCOMM iw was the old iso code for hebrew (now he) -XCOMM those lines should be deleted in a near future -iw he_IL.ISO8859-8 -iw_IL he_IL.ISO8859-8 -iw_IL.iso88598 he_IL.ISO8859-8 -#ifndef __uxp__ -ja_JP ja_JP.eucJP -#else /* __uxp__ */ -ja_JP ja_JP.U90 -ja_JP.U90 ja_JP.U90 -ja_JP.S90 ja_JP.S90 -#endif /* __uxp__ */ -ja ja_JP.eucJP -ja.JIS ja_JP.JIS7 -ja.SJIS ja_JP.SJIS -ja_JP ja_JP.eucJP -ja_JP.ujis ja_JP.eucJP -ja_JP.eucjp ja_JP.eucJP -Jp_JP ja_JP.eucJP -ja_JP.AJEC ja_JP.eucJP -ja_JP.EUC ja_JP.eucJP -ja_JP.EUC_JP ja_JP.eucJP -ja_JP.ISO-2022-JP ja_JP.JIS7 -ja_JP.JIS ja_JP.JIS7 -ja_JP.jis7 ja_JP.JIS7 -ja_JP.mscode ja_JP.SJIS -ja_JP.SJIS ja_JP.SJIS -ka ka_GE.GEORGIAN-ACADEMY -ka_GE ka_GE.GEORGIAN-ACADEMY -ka_GE.georgianacademy ka_GE.GEORGIAN-ACADEMY -ka_GE.georgianrs ka_GE.GEORGIAN-ACADEMY -ka_GE.georgianps ka_GE.GEORGIAN-PS -kl kl_GL.ISO8859-1 -kl_GL kl_GL.ISO8859-1 -kl_GL.iso88591 kl_GL.ISO8859-1 -kl_GL.iso885915 kl_GL.ISO8859-15 -ko ko_KR.eucKR -ko_KR ko_KR.eucKR -ko_KR.EUC ko_KR.eucKR -ko_KR.euc ko_KR.eucKR -ko_KR.euckr ko_KR.eucKR -ko_KR.utf8 ko_KR.UTF-8 -kw kw_GB.ISO8859-1 -kw_GB kw_GB.ISO8859-1 -kw_GB.iso88591 kw_GB.ISO8859-1 -kw_GB.iso885914 kw_GB.ISO8859-14 -kw_GB.iso885915 kw_GB.ISO8859-15 -lo lo_LA.MULELAO-1 -lo_LA lo_LA.MULELAO-1 -lo_LA.cp1133 lo_LA.IBM-CP1133 -lo_LA.ibmcp1133 lo_LA.IBM-CP1133 -lo_LA.mulelao1 lo_LA.MULELAO-1 -#if defined(__FreeBSD__) -XCOMM most locales in FreeBSD 2.1.[56] do not work, allow use of FreeBSD's -XCOMM generic latin-1 locale name. N.B. "lt" is a bad code to use for a -XCOMM generic Latin-1 locale anyway because it is the country code for -XCOMM Lithuania, which by default uses Latin-7 (ISO-8859-13). -lt_LN.ISO_8859-1 lt_LN.ISO8859-1 -#endif -lt lt_LT.ISO8859-13 -lt_LT lt_LT.ISO8859-13 -lt_LT.iso88594 lt_LT.ISO8859-4 -lt_LT.ISO_8859-4 lt_LT.ISO8859-4 -lt_LT.iso885913 lt_LT.ISO8859-13 -lt_LT.ISO_8859-13 lt_LT.ISO8859-13 -lv lv_LV.ISO8859-13 -lv_LV lv_LV.ISO8859-13 -lv_LV.iso88594 lv_LV.ISO8859-4 -lv_LV.iso885913 lv_LV.ISO8859-13 -mk mk_MK.ISO8859-5 -mk_MK mk_MK.ISO8859-5 -mk_MK.iso88595 mk_MK.ISO8859-5 -nl nl_NL.ISO8859-1 -nl_BE nl_BE.ISO8859-1 -nl_BE.88591 nl_BE.ISO8859-1 -nl_BE.88591.en nl_BE.ISO8859-1 -nl_BE.iso88591 nl_BE.ISO8859-1 -nl_BE.ISO_8859-1 nl_BE.ISO8859-1 -nl_BE.iso885915 nl_BE.ISO8859-15 -nl_BE@euro nl_BE.ISO8859-15 -nl_NL nl_NL.ISO8859-1 -nl_NL.88591 nl_NL.ISO8859-1 -nl_NL.88591.en nl_NL.ISO8859-1 -nl_NL.iso88591 nl_NL.ISO8859-1 -nl_NL.ISO_8859-1 nl_NL.ISO8859-1 -nl_NL.iso885915 nl_NL.ISO8859-15 -nl_NL@euro nl_NL.ISO8859-15 -no no_NO.ISO8859-1 -nb nb_NO.ISO8859-1 -ny ny_NO.ISO8859-1 -no_NO no_NO.ISO8859-1 -nb_NO nb_NO.ISO8859-1 -ny_NO ny_NO.ISO8859-1 -no_NO.88591 no_NO.ISO8859-1 -nb_NO.88591 nb_NO.ISO8859-1 -ny_NO.88591 ny_NO.ISO8859-1 -no_NO.88591.en no_NO.ISO8859-1 -no_NO.iso88591 no_NO.ISO8859-1 -no_NO.ISO-8859-1 no_NO.ISO8859-1 -nb_NO.ISO-8859-1 nb_NO.ISO8859-1 -ny_NO.ISO_8859-1 ny_NO.ISO8859-1 -no_NO.iso885915 no_NO.ISO8859-15 -nb_NO.iso885915 nb_NO.ISO8859-15 -ny_NO.iso885915 ny_NO.ISO8859-15 -no@nynorsk nn_NO.ISO8859-1 -nynorsk nn_NO.ISO8859-1 -oc oc_FR.ISO8859-1 -oc_FR oc_FR.ISO8859-1 -oc_FR.iso88591 oc_FR.ISO8859-1 -oc_FR.iso885915 oc_FR.ISO8859-15 -oc_FR@euro oc_FR.ISO8859-15 -pl pl_PL.ISO8859-2 -pl_PL pl_PL.ISO8859-2 -pl_PL.iso88592 pl_PL.ISO8859-2 -pt pt_PT.ISO8859-1 -pt_BR pt_BR.ISO8859-1 -pt_BR.iso88591 pt_BR.ISO8859-1 -pt_BR.iso885915 pt_BR.ISO8859-1 -pt_PT pt_PT.ISO8859-1 -pt_PT.88591 pt_PT.ISO8859-1 -pt_PT.88591.en pt_PT.ISO8859-1 -pt_PT.iso88591 pt_PT.ISO8859-1 -pt_PT.ISO_8859-1 pt_PT.ISO8859-1 -pt_PT.iso885915 pt_PT.ISO8859-1 -pt_PT@euro pt_PT.ISO8859-1 -ro ro_RO.ISO8859-2 -ro_RO ro_RO.ISO8859-2 -ro_RO.iso88592 ro_RO.ISO8859-2 -ru ru_RU.KOI8-R -ru_RU ru_RU.KOI8-R -ru_RU.iso88595 ru_RU.ISO8859-5 -ru_RU.koi8r ru_RU.KOI8-R -#if defined(INCLUDE_ru_SU) -XCOMM ru_SU is redundant now -ru_SU ru_RU.KOI8-R -ru_SU.ISO8859-5 ru_RU.ISO8859-5 -ru_SU.KOI8-R ru_RU.KOI8-R -#endif -ru_UA ru_UA.KOI8-U -ru_UA.koi8u ru_UA.KOI8-U -sh sh_YU.ISO8859-2 -sh_HR.iso88592 sh_HR.ISO8859-2 -sh_YU sh_YU.ISO8859-2 -sh_SP sh_YU.ISO8859-2 -sk sk_SK.ISO8859-2 -sk_SK sk_SK.ISO8859-2 -sk_SK.iso88592 sk_SK.ISO8859-2 -sl sl_SI.ISO8859-2 -sl_SI sl_SI.ISO8859-2 -sl_SI.iso88592 sl_SI.ISO8859-2 -sp sp_YU.ISO8859-5 -sp_YU sp_YU.ISO8859-5 -sq sq_AL.ISO8859-2 -sq_AL sq_AL.ISO8859-2 -sq_AL.iso88592 sq_AL.ISO8859-2 -sr_SP sr_SP.ISO8859-2 -sr sr_YU.ISO8859-5 -sr_YU sr_YU.ISO8859-5 -sr_YU.iso88592 sr_YU.ISO8859-2 -sr_YU.iso88595 sr_YU.ISO8859-5 -sv sv_SE.ISO8859-1 -sv_FI sv_FI.ISO8859-1 -sv_FI.iso88591 sv_FI.ISO8859-1 -sv_FI.iso885915 sv_FI.ISO8859-15 -sv_FI@euro sv_FI.ISO8859-15 -sv_SE sv_SE.ISO8859-1 -sv_SE.88591 sv_SE.ISO8859-1 -sv_SE.88591.en sv_SE.ISO8859-1 -sv_SE.iso88591 sv_SE.ISO8859-1 -sv_SE.ISO_8859-1 sv_SE.ISO8859-1 -sv_SE.iso885915 sv_SE.ISO8859-15 -sv_SE@euro sv_SE.ISO8859-15 -th th_TH.TIS620 -th_TH th_TH.TIS620 -th_TH.tis620 th_TH.TIS620 -th_TH.TACTIS th_TH.TIS620 -tr tr_TR.ISO8859-9 -tr_TR tr_TR.ISO8859-9 -tr_TR.iso88599 tr_TR.ISO8859-9 -uk uk_UA.KOI8-U -uk_UA uk_UA.KOI8-U -uk_UA.iso88595 uk_UA.ISO8859-5 -uk_UA.koi8u uk_UA.KOI8-U -vi vi_VN.TCVN -vi_VN vi_VN.TCVN -vi_VN.tcvn vi_VN.TCVN -vi_VN.tcvn5712 vi_VN.TCVN -vi_VN.viscii vi_VN.VISCII -vi_VN.viscii111 vi_VN.VISCII -wa wa_BE.ISO8859-1 -wa_BE wa_BE.ISO8859-1 -wa_BE.iso88591 wa_BE.ISO8859-1 -wa_BE.iso885915 wa_BE.ISO8859-15 -wa_BE@euro wa_BE.ISO8859-15 -zh zh_CN.eucCN -zh_CN zh_CN.eucCN -zh_CN.big5 zh_TW.big5 -zh_CN.Big5 zh_TW.big5 -zh_CN.EUC zh_CN.eucCN -zh_CN.euc zh_CN.eucCN -zh_CN.gb2312 zh_CN.eucCN -zh_CN.gbk zh_CN.GBK -zh_TW zh_TW.big5 -zh_TW.EUC zh_TW.eucTW -zh_TW.euc zh_TW.eucTW - -XCOMM The following locale names are used in SCO 3.0 -english_uk.8859 en_GB.ISO8859-1 -english_us.8859 en_US.ISO8859-1 -english_us.ascii en_US.ISO8859-1 -french_france.8859 fr_FR.ISO8859-1 -german_germany.8859 de_DE.ISO8859-1 -portuguese_brazil.8859 pt_BR.ISO8859-1 -spanish_spain.8859 es_ES.ISO8859-1 -XCOMM The following locale names are used in HPUX 9.x -american.iso88591 en_US.ISO8859-1 -arabic.iso88596 ar_AA.ISO8859-6 -bokmal nb_NO.ISO8859-1 -bokmål nb_NO.ISO8859-1 -bulgarian bg_BG.ISO8859-5 -c-french.iso88591 fr_CA.ISO8859-1 -catalan ca_ES.ISO8859-1 -chinese-s zh_CN.eucCN -chinese-t zh_TW.eucTW -croatian hr_HR.ISO8859-2 -czech cs_CZ.ISO8859-2 -danish da_DK.ISO8859-1 -dansk da_DK.ISO8859-1 -danish.iso88591 da_DK.ISO8859-1 -deutsch de_DE.ISO8859-1 -dutch nl_NL.ISO8859-1 -dutch.iso88591 nl_BE.ISO8859-1 -eesti et_EE.ISO8859-1 -english.iso88591 en_EN.ISO8859-1 -estonian et_EE.ISO8859-1 -finnish fi_FI.ISO8859-1 -finnish.iso88591 fi_FI.ISO8859-1 -français fr_FR.ISO8859-1 -french fr_FR.ISO8859-1 -french.iso88591 fr_CH.ISO8859-1 -galego gl_ES.ISO8859-1 -galician gl_ES.ISO8859-1 -german de_DE.ISO8859-1 -german.iso88591 de_CH.ISO8859-1 -greek el_GR.ISO8859-7 -greek.iso88597 el_GR.ISO8859-7 -hebrew iw_IL.ISO8859-8 -hebrew.iso88598 iw_IL.ISO8859-8 -hrvatski hr_HR.ISO8859-2 -hungarian hu_HU.ISO8859-2 -icelandic.iso88591 is_IS.ISO8859-1 -icelandic is_IS.ISO8859-1 -italian it_IT.ISO8859-1 -italian.iso88591 it_IT.ISO8859-1 -#if ! (defined(SVR4) && defined(sun)) -japanese ja_JP.SJIS -#else -japanese ja_JP.eucJP -#endif -japanese.euc ja_JP.eucJP -japanese.sjis ja_JP.SJIS -korean ko_KR.eucKR -korean.euc ko_KR.eucKR -lithuanian lt_LT.ISO8859-13 -norwegian no_NO.ISO8859-1 -norwegian.iso88591 no_NO.ISO8859-1 -polish pl_PL.ISO8859-2 -portuguese pt_PT.ISO8859-1 -portuguese.iso88591 pt_PT.ISO8859-1 -romanian ro_RO.ISO8859-2 -rumanian ro_RO.ISO8859-2 -russian ru_RU.ISO8859-5 -serbocroatian sh_YU.ISO8859-2 -slovak sk_SK.ISO8859-2 -slovenian sl_SI.ISO8859-2 -slovene sl_SI.ISO8859-2 -spanish es_ES.ISO8859-1 -spanish.iso88591 es_ES.ISO8859-1 -swedish sv_SE.ISO8859-1 -swedish.iso88591 sv_SE.ISO8859-1 -turkish tr_TR.ISO8859-9 -turkish.iso88599 tr_TR.ISO8859-9 -thai th_TH.tis620 -univ.utf8 en_US.UTF-8 -XCOMM Digital Unix utf -universal.utf8@ucs4 en_US.UTF-8 -XCOMM Solaris and SunOS have iso_8859_1 LC_CTYPES to augment LANG=C -iso_8859_1 en_US.ISO8859-1 -XCOMM Other miscellaneous locale names -ISO8859-1 en_US.ISO8859-1 -ISO-8859-1 en_US.ISO8859-1 -#ifndef __uxp__ -japan ja_JP.eucJP -#else -japan ja_JP.U90 -#endif -Japanese-EUC ja_JP.eucJP -#endif /* R63_COMPAT */ POSIX: C POSIX-UTF2: C @@ -625,6 +38,7 @@ be_BY.microsoftcp1251: be_BY.CP1251 be_BY.microsoft-cp1251: be_BY.CP1251 be_BY.MICROSOFT-CP1251: be_BY.CP1251 +bg_BG.iso88595: bg_BY.ISO8859-5 bg: bg_BG.CP1251 bg_BG: bg_BG.CP1251 bg_BG.cp1251: bg_BG.CP1251 @@ -632,6 +46,7 @@ bg_BG.microsoft-cp1251: bg_BG.CP1251 bg_BG.MICROSOFT-CP1251: bg_BG.CP1251 bg_BG.iso88595: bg_BG.ISO8859-5 +bg_BG.koi8r: bg_BG.KOI8-R br: br_FR.ISO8859-1 br_FR: br_FR.ISO8859-1 br_FR.iso88591: br_FR.ISO8859-1 @@ -664,9 +79,9 @@ da_DK.88591: da_DK.ISO8859-1 da_DK.88591.en: da_DK.ISO8859-1 da_DK.iso88591: da_DK.ISO8859-1 -da_DK.iso885915: da_DK.ISO8859-15 da_DK.ISO-8859-1: da_DK.ISO8859-1 da_DK.ISO_8859-1: da_DK.ISO8859-1 +da_DK.iso885915: da_DK.ISO8859-15 de: de_DE.ISO8859-1 de_AT: de_AT.ISO8859-1 de_AT.iso88591: de_AT.ISO8859-1 @@ -706,16 +121,20 @@ el_GR.ISO-8859-7: el_GR.ISO8859-7 el_GR@euro: el_GR.ISO8859-15 en: en_US.ISO8859-1 +en.ISO-8859-1: en_US.ISO8859-1 en_AU: en_AU.ISO8859-1 en_AU.iso88591: en_AU.ISO8859-1 +en_AU.ISO-8859-1: en_AU.ISO8859-1 en_AU.ISO_8859-1: en_AU.ISO8859-1 en_CA: en_CA.ISO8859-1 en_CA.iso88591: en_CA.ISO8859-1 +en_CA.ISO-8859-1: en_CA.ISO8859-1 en_CA.ISO_8859-1: en_CA.ISO8859-1 en_GB: en_GB.ISO8859-1 en_GB.88591: en_GB.ISO8859-1 en_GB.88591.en: en_GB.ISO8859-1 en_GB.iso88591: en_GB.ISO8859-1 +en_GB.ISO-8859-1: en_GB.ISO8859-1 en_GB.ISO_8859-1: en_GB.ISO8859-1 en_UK: en_GB.ISO8859-1 ENG_GB.8859: en_GB.ISO8859-1 @@ -729,11 +148,14 @@ en_US.88591: en_US.ISO8859-1 en_US.88591.en: en_US.ISO8859-1 en_US.iso88591: en_US.ISO8859-1 +en_US.ISO-8859-1: en_US.ISO8859-1 en_US.ISO_8859-1: en_US.ISO8859-1 #if defined(SVR4) && defined(sun) en_US.utf8: en_US.UTF-8 #endif eo: eo_XX.ISO8859-3 +eo_EO: eo_EO.ISO8859-3 +eo_EO.ISO8859-3: eo_EO.ISO8859-3 eo_XX: eo_XX.ISO8859-3 eo_XX.ISO8859-3: eo_XX.ISO8859-3 es: es_ES.ISO8859-1 @@ -755,6 +177,7 @@ es_ES.iso88591: es_ES.ISO8859-1 es_ES.ISO-8859-1: es_ES.ISO8859-1 es_ES.ISO_8859-1: es_ES.ISO8859-1 +es_ES.iso885915: es_ES.ISO8859-15 es_ES@euro: es_ES.ISO8859-15 es_GT: es_GT.ISO8859-1 es_GT.iso88591: es_GT.ISO8859-1 @@ -867,6 +290,11 @@ gl_ES.ISO-8859-1: gl_ES.ISO8859-1 gl_ES.iso885915: gl_ES.ISO8859-15 gl_ES@euro: gl_ES.ISO8859-15 +gv: gv_GB.ISO8859-1 +gv_GB: gv_GB.ISO8859-1 +gv_GB.iso88591: gv_GB.ISO8859-1 +gv_GB.iso885914: gv_GB.ISO8859-14 +gv_GB.iso885915: gv_GB.ISO8859-15 he: he_IL.ISO8859-8 he_IL: he_IL.ISO8859-8 he_IL.iso88598: he_IL.ISO8859-8 @@ -941,6 +369,7 @@ ja_JP.AJEC: ja_JP.eucJP ja_JP.EUC: ja_JP.eucJP ja_JP.EUC-JP: ja_JP.eucJP +ja_JP.EUC_JP: ja_JP.eucJP ja_JP.ISO-2022-JP: ja_JP.JIS7 ja_JP.JIS: ja_JP.JIS7 ja_JP.jis7: ja_JP.JIS7 @@ -961,6 +390,11 @@ ko_KR.euc: ko_KR.eucKR ko_KR.euckr: ko_KR.eucKR ko_KR.utf8: ko_KR.UTF-8 +kw: kw_GB.ISO8859-1 +kw_GB: kw_GB.ISO8859-1 +kw_GB.iso88591: kw_GB.ISO8859-1 +kw_GB.iso885914: kw_GB.ISO8859-14 +kw_GB.iso885915: kw_GB.ISO8859-15 lo: lo_LA.MULELAO-1 lo_LA: lo_LA.MULELAO-1 lo_LA.cp1133: lo_LA.IBM-CP1133 @@ -995,9 +429,12 @@ mk_MK.microsoft-cp1251: mk_MK.CP1251 mk_MK.MICROSOFT-CP1251: mk_MK.CP1251 mk_MK.utf8: mk_MK.UTF-8 -ms: ms_NY.ISO8859-1 -ms_NY: ms_NY.ISO8859-1 -ms_NY.iso88591: ms_NY.ISO8859-1 +ms: ms_MY.ISO8859-1 +ms_MY: ms_MY.ISO8859-1 +ms_MY.iso88591: ms_MY.ISO8859-1 +mt: mt_MT.ISO8859-3 +mt_MT: mt_MT.ISO8859-3 +mt_MT.ISO8859-3: mt_MT.ISO8859-3 nl: nl_NL.ISO8859-1 nl_BE: nl_BE.ISO8859-1 nl_BE.88591: nl_BE.ISO8859-1 @@ -1016,20 +453,25 @@ nl_NL@euro: nl_NL.ISO8859-15 no: no_NO.ISO8859-1 nb: nb_NO.ISO8859-1 +nn: nn_NO.ISO8859-1 ny: ny_NO.ISO8859-1 no_NO: no_NO.ISO8859-1 nb_NO: nb_NO.ISO8859-1 +nn_NO: nn_NO.ISO8859-1 ny_NO: ny_NO.ISO8859-1 no_NO.88591: no_NO.ISO8859-1 nb_NO.88591: nb_NO.ISO8859-1 +nn_NO.88591: nn_NO.ISO8859-1 ny_NO.88591: ny_NO.ISO8859-1 no_NO.88591.en: no_NO.ISO8859-1 no_NO.iso88591: no_NO.ISO8859-1 no_NO.ISO-8859-1: no_NO.ISO8859-1 nb_NO.ISO-8859-1: nb_NO.ISO8859-1 +nn_NO.ISO_8859-1: nn_NO.ISO8859-1 ny_NO.ISO_8859-1: ny_NO.ISO8859-1 no_NO.iso885915: no_NO.ISO8859-15 nb_NO.iso885915: nb_NO.ISO8859-15 +nn_NO.iso885915: nn_NO.ISO8859-15 ny_NO.iso885915: ny_NO.ISO8859-15 no@nynorsk: ny_NO.ISO8859-1 nynorsk: nn_NO.ISO8859-1 @@ -1058,7 +500,7 @@ pt: pt_PT.ISO8859-1 pt_BR: pt_BR.ISO8859-1 pt_BR.iso88591: pt_BR.ISO8859-1 -pt_BR.iso885915: pt_BR.ISO8859-1 +pt_BR.iso885915: pt_BR.ISO8859-15 pt_PT: pt_PT.ISO8859-1 pt_PT.88591: pt_PT.ISO8859-1 pt_PT.88591.en: pt_PT.ISO8859-1 @@ -1092,6 +534,8 @@ ru_UA.microsoftcp1251: ru_UA.CP1251 ru_UA.microsoft-cp1251: ru_UA.CP1251 ru_UA.MICROSOFT-CP1251: ru_UA.CP1251 +se_NO: se_NO.UTF-8 +se_NO.utf8: se_NO.UTF-8 sh: sh_YU.ISO8859-2 sh_HR.iso88592: sh_HR.ISO8859-2 sh_YU: sh_YU.ISO8859-2 @@ -1110,10 +554,20 @@ sq_AL: sq_AL.ISO8859-2 sq_AL.iso88592: sq_AL.ISO8859-2 sr_SP: sr_SP.ISO8859-2 -sr: sr_YU.ISO8859-2 -sr_YU: sr_YU.ISO8859-2 +sr: sr_YU.ISO8859-5 +sr_YU: sr_YU.ISO8859-5 sr_YU.iso88592: sr_YU.ISO8859-2 sr_YU.iso88595: sr_YU.ISO8859-5 +sr@cyrillic: sr_YU.ISO8859-5 +sr_YU@cyrillic: sr_YU.ISO8859-5 +sr_YU.iso88595@cyrillic: sr_YU.ISO8859-5 +sr_YU.ISO8859-5@cyrillic: sr_YU.ISO8859-5 +sr_YU.cp1251@cyrillic: sr_YU.CP1251 +sr_YU.CP1251@cyrillic: sr_YU.CP1251 +sr_YU.microsoftcp1251@cyrillic: sr_YU.CP1251 +sr_YU.microsoft-cp1251@cyrillic: sr_YU.CP1251 +sr_YU.MICROSOFT-CP1251@cyrillic: sr_YU.CP1251 +sr_YU.UTF-8@cyrillic: sr_YU.UTF-8 sv: sv_SE.ISO8859-1 sv_FI: sv_FI.ISO8859-1 sv_FI.iso88591: sv_FI.ISO8859-1 @@ -1137,6 +591,7 @@ th: th_TH.TIS620 th_TH: th_TH.TIS620 th_TH.tis620: th_TH.TIS620 +th_TH.TIS-620: th_TH.TIS620 th_TH.TACTIS: th_TH.TIS620 tl: tl_PH.ISO8859-1 tl_PH: tl_PH.ISO8859-1 @@ -1182,16 +637,19 @@ yi_US.MICROSOFT-CP1255: yi_US.CP1255 zh: zh_CN.eucCN zh_CN: zh_CN.eucCN -zh_CN.big5: zh_TW.big5 zh_CN.Big5: zh_TW.big5 zh_CN.EUC: zh_CN.eucCN +zh_CN.GB2312: zh_CN.eucCN +zh_CN.GBK: zh_CN.gbk +zh_CN.big5: zh_TW.big5 zh_CN.euc: zh_CN.eucCN zh_CN.gb2312: zh_CN.eucCN -zh_CN.gbk: zh_CN.GBK +zh_HK: zh_HK.big5 +zh_HK.Big5: zh_HK.big5 +zh_HK.Big5HKSCS: zh_HK.big5hkscs zh_TW: zh_TW.big5 +zh_TW.Big5: zh_TW.big5 zh_TW.EUC: zh_TW.eucTW -zh_TW.euc: zh_TW.eucTW -zh_TW.big5: zh_TW.big5 XCOMM The following locale names are used in SCO 3.0 english_uk.8859: en_GB.ISO8859-1 @@ -1206,7 +664,7 @@ arabic.iso88596: ar_AA.ISO8859-6 bokmal: nb_NO.ISO8859-1 bokmål: nb_NO.ISO8859-1 -bulgarian: bg_BG.ISO8859-5 +bulgarian: bg_BG.CP1251 c-french.iso88591: fr_CA.ISO8859-1 catalan: ca_ES.ISO8859-1 chinese-s: zh_CN.eucCN @@ -1241,11 +699,7 @@ icelandic: is_IS.ISO8859-1 italian: it_IT.ISO8859-1 italian.iso88591: it_IT.ISO8859-1 -#if ! (defined(SVR4) && defined(sun)) -japanese: ja_JP.SJIS -#else japanese: ja_JP.eucJP -#endif japanese.euc: ja_JP.eucJP japanese.sjis: ja_JP.SJIS korean: ko_KR.eucKR @@ -1265,6 +719,7 @@ slovenian: sl_SI.ISO8859-2 spanish: es_ES.ISO8859-1 spanish.iso88591: es_ES.ISO8859-1 +swedish: sv_SE.ISO8859-1 swedish.iso88591: sv_SE.ISO8859-1 turkish: tr_TR.ISO8859-9 turkish.iso88599: tr_TR.ISO8859-9 Index: xc/nls/locale.dir diff -u xc/nls/locale.dir:1.25.2.1 xc/nls/locale.dir:1.33 --- xc/nls/locale.dir:1.25.2.1 Wed May 23 14:32:14 2001 +++ xc/nls/locale.dir Wed Jan 9 11:14:16 2002 @@ -4,695 +4,360 @@ XCOMM The first word is the locale database file name and XCOMM the second word is full locale name. XCOMM -XCOMM $XFree86: xc/nls/locale.dir,v 1.25.2.1 2001/05/23 18:32:14 dawes Exp $ +XCOMM $XFree86: xc/nls/locale.dir,v 1.33 2002/01/09 16:14:16 dawes Exp $ XCOMM -#ifdef R63_COMPAT -XCOMM These entries are in the old format (no ':') -C/XLC_LOCALE C -iso8859-1/XLC_LOCALE af_ZA.ISO8859-1 -iso8859-6/XLC_LOCALE ar_BH.ISO8859-6 -iso8859-6/XLC_LOCALE ar_DZ.ISO8859-6 -iso8859-6/XLC_LOCALE ar_EG.ISO8859-6 -iso8859-6/XLC_LOCALE ar_IQ.ISO8859-6 -iso8859-6/XLC_LOCALE ar_JO.ISO8859-6 -iso8859-6/XLC_LOCALE ar_KW.ISO8859-6 -iso8859-6/XLC_LOCALE ar_LB.ISO8859-6 -iso8859-6/XLC_LOCALE ar_LY.ISO8859-6 -iso8859-6/XLC_LOCALE ar_MA.ISO8859-6 -iso8859-6/XLC_LOCALE ar_OM.ISO8859-6 -iso8859-6/XLC_LOCALE ar_QA.ISO8859-6 -iso8859-6/XLC_LOCALE ar_SA.ISO8859-6 -iso8859-6/XLC_LOCALE ar_TN.ISO8859-6 -iso8859-6/XLC_LOCALE ar_YE.ISO8859-6 -iso8859-9e/XLC_LOCALE az_AZ.ISO8859-9E -koi8-c/XLC_LOCALE a3_AZ.KOI8-C -microsoft-cp1251/XLC_LOCALE be_BY.CP1251 -iso8859-5/XLC_LOCALE bg_BG.ISO8859-5 -microsoft-cp1251/XLC_LOCALE bg_BG.CP1251 -iso8859-1/XLC_LOCALE br_FR.ISO8859-1 -iso8859-14/XLC_LOCALE br_FR.ISO8859-14 -iso8859-15/XLC_LOCALE br_FR.ISO8859-15 -iso8859-1/XLC_LOCALE ca_ES.ISO8859-1 -iso8859-15/XLC_LOCALE ca_ES.ISO8859-15 -iso8859-2/XLC_LOCALE cs_CZ.ISO8859-2 -iso8859-1/XLC_LOCALE cy_GB.ISO8859-1 -iso8859-14/XLC_LOCALE cy_GB.ISO8859-14 -iso8859-15/XLC_LOCALE cy_GB.ISO8859-15 -iso8859-2/XLC_LOCALE cz_CZ.ISO8859-2 -iso8859-1/XLC_LOCALE da_DK.ISO8859-1 -iso8859-15/XLC_LOCALE da_DK.ISO8859-15 -iso8859-1/XLC_LOCALE de_AT.ISO8859-1 -iso8859-15/XLC_LOCALE de_AT.ISO8859-15 -iso8859-1/XLC_LOCALE de_CH.ISO8859-1 -iso8859-15/XLC_LOCALE de_CH.ISO8859-15 -iso8859-1/XLC_LOCALE de_DE.ISO8859-1 -iso8859-15/XLC_LOCALE de_DE.ISO8859-15 -iso8859-1/XLC_LOCALE de_LI.ISO8859-1 -iso8859-1/XLC_LOCALE de_LU.ISO8859-1 -iso8859-15/XLC_LOCALE de_LU.ISO8859-15 -iso8859-7/XLC_LOCALE el_GR.ISO8859-7 -iso8859-15/XLC_LOCALE el_GR.ISO8859-15 -iso8859-1/XLC_LOCALE en_AU.ISO8859-1 -iso8859-1/XLC_LOCALE en_BZ.ISO8859-1 -iso8859-1/XLC_LOCALE en_CA.ISO8859-1 -iso8859-1/XLC_LOCALE en_GB.ISO8859-1 -iso8859-15/XLC_LOCALE en_GB.ISO8859-15 -iso8859-1/XLC_LOCALE en_IE.ISO8859-1 -iso8859-15/XLC_LOCALE en_IE.ISO8859-15 -iso8859-1/XLC_LOCALE en_JM.ISO8859-1 -iso8859-1/XLC_LOCALE en_NZ.ISO8859-1 -iso8859-1/XLC_LOCALE en_TT.ISO8859-1 -iso8859-1/XLC_LOCALE en_UK.ISO8859-1 -iso8859-1/XLC_LOCALE en_US.ISO8859-1 -iso8859-1/XLC_LOCALE en_ZA.ISO8859-1 -iso8859-3/XLC_LOCALE eo_XX.ISO8859-3 -iso8859-1/XLC_LOCALE es_AR.ISO8859-1 -iso8859-1/XLC_LOCALE es_BO.ISO8859-1 -iso8859-1/XLC_LOCALE es_CL.ISO8859-1 -iso8859-1/XLC_LOCALE es_CO.ISO8859-1 -iso8859-1/XLC_LOCALE es_CR.ISO8859-1 -iso8859-1/XLC_LOCALE es_DO.ISO8859-1 -iso8859-1/XLC_LOCALE es_EC.ISO8859-1 -iso8859-1/XLC_LOCALE es_ES.ISO8859-1 -iso8859-15/XLC_LOCALE es_ES.ISO8859-15 -iso8859-1/XLC_LOCALE es_GT.ISO8859-1 -iso8859-1/XLC_LOCALE es_HN.ISO8859-1 -iso8859-1/XLC_LOCALE es_MX.ISO8859-1 -iso8859-1/XLC_LOCALE es_NI.ISO8859-1 -iso8859-1/XLC_LOCALE es_PA.ISO8859-1 -iso8859-1/XLC_LOCALE es_PE.ISO8859-1 -iso8859-1/XLC_LOCALE es_PR.ISO8859-1 -iso8859-1/XLC_LOCALE es_PY.ISO8859-1 -iso8859-1/XLC_LOCALE es_SV.ISO8859-1 -iso8859-1/XLC_LOCALE es_UY.ISO8859-1 -iso8859-1/XLC_LOCALE es_VE.ISO8859-1 -iso8859-1/XLC_LOCALE et_EE.ISO8859-1 -iso8859-4/XLC_LOCALE et_EE.ISO8859-4 -iso8859-13/XLC_LOCALE et_EE.ISO8859-13 -iso8859-15/XLC_LOCALE et_EE.ISO8859-15 -isiri-3342/XLC_LOCALE fa_IR.ISIRI-3342 -iso8859-1/XLC_LOCALE eu_ES.ISO8859-1 -iso8859-15/XLC_LOCALE eu_ES.ISO8859-15 -iso8859-1/XLC_LOCALE fi_FI.ISO8859-1 -iso8859-15/XLC_LOCALE fi_FI.ISO8859-15 -iso8859-1/XLC_LOCALE fo_FO.ISO8859-1 -iso8859-15/XLC_LOCALE fo_FO.ISO8859-15 -iso8859-1/XLC_LOCALE fr_BE.ISO8859-1 -iso8859-15/XLC_LOCALE fr_BE.ISO8859-15 -iso8859-1/XLC_LOCALE fr_CA.ISO8859-1 -iso8859-15/XLC_LOCALE fr_CA.ISO8859-15 -iso8859-1/XLC_LOCALE fr_CH.ISO8859-1 -iso8859-15/XLC_LOCALE fr_CH.ISO8859-15 -iso8859-1/XLC_LOCALE fr_FR.ISO8859-1 -iso8859-15/XLC_LOCALE fr_FR.ISO8859-15 -iso8859-1/XLC_LOCALE fr_LU.ISO8859-1 -iso8859-15/XLC_LOCALE fr_LU.ISO8859-15 -iso8859-1/XLC_LOCALE ga_IE.ISO8859-1 -iso8859-14/XLC_LOCALE ga_IE.ISO8859-14 -iso8859-15/XLC_LOCALE ga_IE.ISO8859-15 -iso8859-1/XLC_LOCALE gd_GB.ISO8859-1 -iso8859-14/XLC_LOCALE gd_GB.ISO8859-14 -iso8859-15/XLC_LOCALE gd_GB.ISO8859-15 -iso8859-1/XLC_LOCALE gl_ES.ISO8859-1 -iso8859-15/XLC_LOCALE gl_ES.ISO8859-15 -iso8859-1/XLC_LOCALE gv_GB.ISO8859-1 -iso8859-14/XLC_LOCALE gv_GB.ISO8859-14 -iso8859-15/XLC_LOCALE gv_GB.ISO8859-15 -iso8859-8/XLC_LOCALE he_IL.ISO8859-8 -microsoft-cp1255/XLC_LOCALE he_IL.CP1255 -iscii-dev/XLC_LOCALE hi_IN.ISCII-DEV -iso8859-2/XLC_LOCALE hr_HR.ISO8859-2 -iso8859-2/XLC_LOCALE hu_HU.ISO8859-2 -armscii-8/XLC_LOCALE hy_AM.ARMSCII-8 -iso8859-1/XLC_LOCALE id_ID.ISO8859-1 -iso8859-1/XLC_LOCALE is_IS.ISO8859-1 -iso8859-15/XLC_LOCALE is_IS.ISO8859-15 -iso8859-1/XLC_LOCALE it_CH.ISO8859-1 -iso8859-1/XLC_LOCALE it_IT.ISO8859-1 -iso8859-15/XLC_LOCALE it_IT.ISO8859-15 -ja/XLC_LOCALE ja_JP.eucJP -ja.SJIS/XLC_LOCALE ja_JP.SJIS -ja.JIS/XLC_LOCALE ja_JP.JIS7 -georgian-academy/XLC_LOCALE ka_GE.GEORGIAN-ACADEMY -georgian-ps/XLC_LOCALE ka_GE.GEORGIAN-PS -iso8859-1/XLC_LOCALE kl_GL.ISO8859-1 -ko/XLC_LOCALE ko_KR.eucKR -iso8859-1/XLC_LOCALE kw_GB.ISO8859-1 -iso8859-14/XLC_LOCALE kw_GB.ISO8859-14 -iso8859-15/XLC_LOCALE kw_GB.ISO8859-15 -ibm-cp1133/XLC_LOCALE lo_LA.IBM-CP1133 -mulelao-1/XLC_LOCALE lo_LA.MULELAO-1 -iso8859-1/XLC_LOCALE lt_LN.ISO8859-1 -iso8859-4/XLC_LOCALE lt_LT.ISO8859-4 -iso8859-13/XLC_LOCALE lt_LT.ISO8859-13 -iso8859-4/XLC_LOCALE lv_LV.ISO8859-4 -iso8859-13/XLC_LOCALE lv_LV.ISO8859-13 -iso8859-13/XLC_LOCALE mi_NZ.ISO8859-13 -iso8859-5/XLC_LOCALE mk_MK.ISO8859-5 -microsoft-cp1251/XLC_LOCALE mk_MK.CP1251 -iso8859-1/XLC_LOCALE ms_MY.ISO8859-1 -iso8859-1/XLC_LOCALE nl_BE.ISO8859-1 -iso8859-15/XLC_LOCALE nl_BE.ISO8859-15 -iso8859-1/XLC_LOCALE nl_NL.ISO8859-1 -iso8859-15/XLC_LOCALE nl_NL.ISO8859-15 -iso8859-1/XLC_LOCALE no_NO.ISO8859-1 -iso8859-1/XLC_LOCALE no_NO.ISO8859-15 -iso8859-1/XLC_LOCALE nb_NO.ISO8859-1 -iso8859-1/XLC_LOCALE nb_NO.ISO8859-15 -iso8859-1/XLC_LOCALE ny_NO.ISO8859-1 -iso8859-1/XLC_LOCALE ny_NO.ISO8859-15 -iso8859-1/XLC_LOCALE oc_FR.ISO8859-1 -iso8859-15/XLC_LOCALE oc_FR.ISO8859-15 -iso8859-1/XLC_LOCALE pd_US.ISO8859-1 -iso8859-1/XLC_LOCALE pd_DE.ISO8859-1 -iso8859-1/XLC_LOCALE ph_PH.ISO8859-1 -iso8859-2/XLC_LOCALE pl_PL.ISO8859-2 -iso8859-1/XLC_LOCALE pp_AN.ISO8859-1 -iso8859-1/XLC_LOCALE pt_BR.ISO8859-1 -iso8859-1/XLC_LOCALE pt_PT.ISO8859-1 -iso8859-1/XLC_LOCALE pt_PT.ISO8859-15 -iso8859-2/XLC_LOCALE ro_RO.ISO8859-2 -iso8859-5/XLC_LOCALE ru_RU.ISO8859-5 -microsoft-cp1251/XLC_LOCALE ru_RU.CP1251 -koi8-r/XLC_LOCALE ru_RU.KOI8-R -koi8-u/XLC_LOCALE ru_UA.KOI8-U -iso8859-2/XLC_LOCALE sh_YU.ISO8859-2 -iso8859-2/XLC_LOCALE sk_SK.ISO8859-2 -iso8859-2/XLC_LOCALE sl_SI.ISO8859-2 -iso8859-5/XLC_LOCALE sp_YU.ISO8859-5 -iso8859-2/XLC_LOCALE sq_AL.ISO8859-2 -iso8859-2/XLC_LOCALE sr_SP.ISO8859-2 -iso8859-2/XLC_LOCALE sr_YU.ISO8859-2 -iso8859-5/XLC_LOCALE sr_YU.ISO8859-5 -iso8859-1/XLC_LOCALE sv_FI.ISO8859-1 -iso8859-15/XLC_LOCALE sv_FI.ISO8859-15 -iso8859-1/XLC_LOCALE sv_SE.ISO8859-1 -iso8859-15/XLC_LOCALE sv_SE.ISO8859-15 -tscii-0/XLC_LOCALE ta_IN.TSCII-0 -koi8-c/XLC_LOCALE tg_TJ.KOI8-C -th_TH/XLC_LOCALE th_TH.TIS620 -iso8859-1/XLC_LOCALE tl_PH.ISO8859-1 -iso8859-9/XLC_LOCALE tr_TR.ISO8859-9 -tatar-cyr/XLC_LOCALE tt_RU.TATAR-CYR -koi8-c/XLC_LOCALE tt_RU.KOI8-C -iso8859-5/XLC_LOCALE uk_UA.ISO8859-5 -microsoft-cp1251/XLC_LOCALE uk_UA.CP1251 -koi8-u/XLC_LOCALE uk_UA.KOI8-U -microsoft-cp1256/XLC_LOCALE ur_PK.CP1256 -vi_VN.tcvn/XLC_LOCALE vi_VN.TCVN -vi_VN.viscii/XLC_LOCALE vi_VN.VISCII -iso8859-1/XLC_LOCALE wa_BE.ISO8859-1 -iso8859-15/XLC_LOCALE wa_BE.ISO8859-15 -microsoft-cp1255/XLC_LOCALE yi_US.CP1255 -zh/XLC_LOCALE zh_CN.eucCN -zh/XLC_LOCALE zh_CN.GB2312 -zh_CN.gbk/XLC_LOCALE zh_CN.GBK -zh_HK.big5hkscs/XLC_LOCALE zh_HK.big5hkscs -zh_TW.big5/XLC_LOCALE zh_TW.big5 -zh_TW.big5/XLC_LOCALE zh_TW.Big5 -zh_TW/XLC_LOCALE zh_TW.eucTW -XCOMM Note: The UTF-8 locales don't work correctly yet. Work in progress. -en_US.UTF-8/XLC_LOCALE af_ZA.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_AA.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_BH.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_DZ.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_EG.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_IQ.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_JO.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_KW.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_LB.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_LY.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_MA.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_OM.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_QA.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_SA.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_TN.UTF-8 -en_US.UTF-8/XLC_LOCALE ar_YE.UTF-8 -en_US.UTF-8/XLC_LOCALE az_AZ.UTF-8 -en_US.UTF-8/XLC_LOCALE a3_AZ.UTF-8 -en_US.UTF-8/XLC_LOCALE be_BY.UTF-8 -en_US.UTF-8/XLC_LOCALE bg_BG.UTF-8 -en_US.UTF-8/XLC_LOCALE br_FR.UTF-8 -en_US.UTF-8/XLC_LOCALE ca_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE cs_CZ.UTF-8 -en_US.UTF-8/XLC_LOCALE cy_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE cz_CZ.UTF-8 -en_US.UTF-8/XLC_LOCALE da_DK.UTF-8 -en_US.UTF-8/XLC_LOCALE de_AT.UTF-8 -en_US.UTF-8/XLC_LOCALE de_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE de_CH.UTF-8 -en_US.UTF-8/XLC_LOCALE de_DE.UTF-8 -en_US.UTF-8/XLC_LOCALE de_LI.UTF-8 -en_US.UTF-8/XLC_LOCALE de_LU.UTF-8 -en_US.UTF-8/XLC_LOCALE el_GR.UTF-8 -en_US.UTF-8/XLC_LOCALE en_AU.UTF-8 -en_US.UTF-8/XLC_LOCALE en_BZ.UTF-8 -en_US.UTF-8/XLC_LOCALE en_CA.UTF-8 -en_US.UTF-8/XLC_LOCALE en_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE en_IE.UTF-8 -en_US.UTF-8/XLC_LOCALE en_JM.UTF-8 -en_US.UTF-8/XLC_LOCALE en_NZ.UTF-8 -en_US.UTF-8/XLC_LOCALE en_TT.UTF-8 -en_US.UTF-8/XLC_LOCALE en_UK.UTF-8 -en_US.UTF-8/XLC_LOCALE en_US.UTF-8 -en_US.UTF-8/XLC_LOCALE en_ZA.UTF-8 -en_US.UTF-8/XLC_LOCALE eo_XX.UTF-8 -en_US.UTF-8/XLC_LOCALE es_AR.UTF-8 -en_US.UTF-8/XLC_LOCALE es_BO.UTF-8 -en_US.UTF-8/XLC_LOCALE es_CL.UTF-8 -en_US.UTF-8/XLC_LOCALE es_CO.UTF-8 -en_US.UTF-8/XLC_LOCALE es_CR.UTF-8 -en_US.UTF-8/XLC_LOCALE es_DO.UTF-8 -en_US.UTF-8/XLC_LOCALE es_EC.UTF-8 -en_US.UTF-8/XLC_LOCALE es_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE es_GT.UTF-8 -en_US.UTF-8/XLC_LOCALE es_HN.UTF-8 -en_US.UTF-8/XLC_LOCALE es_MX.UTF-8 -en_US.UTF-8/XLC_LOCALE es_NI.UTF-8 -en_US.UTF-8/XLC_LOCALE es_PA.UTF-8 -en_US.UTF-8/XLC_LOCALE es_PE.UTF-8 -en_US.UTF-8/XLC_LOCALE es_PR.UTF-8 -en_US.UTF-8/XLC_LOCALE es_PY.UTF-8 -en_US.UTF-8/XLC_LOCALE es_SV.UTF-8 -en_US.UTF-8/XLC_LOCALE es_UY.UTF-8 -en_US.UTF-8/XLC_LOCALE es_VE.UTF-8 -en_US.UTF-8/XLC_LOCALE et_EE.UTF-8 -en_US.UTF-8/XLC_LOCALE eu_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE fa_IR.UTF-8 -en_US.UTF-8/XLC_LOCALE fi_FI.UTF-8 -en_US.UTF-8/XLC_LOCALE fo_FO.UTF-8 -en_US.UTF-8/XLC_LOCALE fr_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE fr_CA.UTF-8 -en_US.UTF-8/XLC_LOCALE fr_CH.UTF-8 -en_US.UTF-8/XLC_LOCALE fr_FR.UTF-8 -en_US.UTF-8/XLC_LOCALE fr_LU.UTF-8 -en_US.UTF-8/XLC_LOCALE ga_IE.UTF-8 -en_US.UTF-8/XLC_LOCALE gd_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE gl_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE gv_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE he_IL.UTF-8 -en_US.UTF-8/XLC_LOCALE hi_IN.UTF-8 -en_US.UTF-8/XLC_LOCALE hr_HR.UTF-8 -en_US.UTF-8/XLC_LOCALE hu_HU.UTF-8 -en_US.UTF-8/XLC_LOCALE hy_AM.UTF-8 -en_US.UTF-8/XLC_LOCALE id_ID.UTF-8 -en_US.UTF-8/XLC_LOCALE is_IS.UTF-8 -en_US.UTF-8/XLC_LOCALE it_CH.UTF-8 -en_US.UTF-8/XLC_LOCALE it_IT.UTF-8 -en_US.UTF-8/XLC_LOCALE iu_CA.UTF-8 -en_US.UTF-8/XLC_LOCALE ja_JP.UTF-8 -en_US.UTF-8/XLC_LOCALE ka_GE.UTF-8 -en_US.UTF-8/XLC_LOCALE kl_GL.UTF-8 -en_US.UTF-8/XLC_LOCALE ko_KR.UTF-8 -en_US.UTF-8/XLC_LOCALE kw_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE lo_LA.UTF-8 -en_US.UTF-8/XLC_LOCALE lt_LT.UTF-8 -en_US.UTF-8/XLC_LOCALE lv_LV.UTF-8 -en_US.UTF-8/XLC_LOCALE mi_NZ.UTF-8 -en_US.UTF-8/XLC_LOCALE mk_MK.UTF-8 -en_US.UTF-8/XLC_LOCALE ms_MY.UTF-8 -en_US.UTF-8/XLC_LOCALE nl_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE nl_NL.UTF-8 -en_US.UTF-8/XLC_LOCALE no_NO.UTF-8 -en_US.UTF-8/XLC_LOCALE nb_NO.UTF-8 -en_US.UTF-8/XLC_LOCALE ny_NO.UTF-8 -en_US.UTF-8/XLC_LOCALE oc_FR.UTF-8 -en_US.UTF-8/XLC_LOCALE pd_DE.UTF-8 -en_US.UTF-8/XLC_LOCALE pd_US.UTF-8 -en_US.UTF-8/XLC_LOCALE ph_PH.UTF-8 -en_US.UTF-8/XLC_LOCALE pl_PL.UTF-8 -en_US.UTF-8/XLC_LOCALE pp_AN.UTF-8 -en_US.UTF-8/XLC_LOCALE pt_BR.UTF-8 -en_US.UTF-8/XLC_LOCALE pt_PT.UTF-8 -en_US.UTF-8/XLC_LOCALE ro_RO.UTF-8 -en_US.UTF-8/XLC_LOCALE ru_RU.UTF-8 -en_US.UTF-8/XLC_LOCALE ru_UA.UTF-8 -en_US.UTF-8/XLC_LOCALE sk_SK.UTF-8 -en_US.UTF-8/XLC_LOCALE sl_SI.UTF-8 -en_US.UTF-8/XLC_LOCALE sq_AL.UTF-8 -en_US.UTF-8/XLC_LOCALE sr_YU.UTF-8 -en_US.UTF-8/XLC_LOCALE sv_FI.UTF-8 -en_US.UTF-8/XLC_LOCALE sv_SE.UTF-8 -en_US.UTF-8/XLC_LOCALE ta_IN.UTF-8 -en_US.UTF-8/XLC_LOCALE tg_TJ.UTF-8 -en_US.UTF-8/XLC_LOCALE th_TH.UTF-8 -en_US.UTF-8/XLC_LOCALE tl_PH.UTF-8 -en_US.UTF-8/XLC_LOCALE tr_TR.UTF-8 -en_US.UTF-8/XLC_LOCALE tt_RU.UTF-8 -en_US.UTF-8/XLC_LOCALE uk_UA.UTF-8 -en_US.UTF-8/XLC_LOCALE ur_PK.UTF-8 -en_US.UTF-8/XLC_LOCALE vi_VN.UTF-8 -en_US.UTF-8/XLC_LOCALE wa_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE yi_US.UTF-8 -en_US.UTF-8/XLC_LOCALE zh_CN.UTF-8 -en_US.UTF-8/XLC_LOCALE zh_TW.UTF-8 -#ifdef __uxp__ -ja.U90/XLC_LOCALE ja_JP.U90 -ja.S90/XLC_LOCALE ja_JP.S90 -#endif -#endif /* R63_COMPAT */ -C/XLC_LOCALE: C -iso8859-1/XLC_LOCALE: af_ZA.ISO8859-1 -iso8859-6/XLC_LOCALE: ar_AA.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_BH.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_DZ.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_EG.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_IQ.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_JO.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_KW.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_LB.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_LY.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_MA.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_OM.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_QA.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_SA.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_TN.ISO8859-6 -iso8859-6/XLC_LOCALE: ar_YE.ISO8859-6 -iso8859-9e/XLC_LOCALE: az_AZ.ISO8859-9E -koi8-c/XLC_LOCALE: a3_AZ.KOI8-C -microsoft-cp1251/XLC_LOCALE: be_BY.CP1251 -iso8859-5/XLC_LOCALE: bg_BG.ISO8859-5 -microsoft-cp1251/XLC_LOCALE: bg_BG.CP1251 -iso8859-1/XLC_LOCALE: br_FR.ISO8859-1 -iso8859-14/XLC_LOCALE: br_FR.ISO8859-14 -iso8859-15/XLC_LOCALE: br_FR.ISO8859-15 -iso8859-1/XLC_LOCALE: ca_ES.ISO8859-1 -iso8859-15/XLC_LOCALE: ca_ES.ISO8859-15 -iso8859-2/XLC_LOCALE: cs_CZ.ISO8859-2 -iso8859-1/XLC_LOCALE: cy_GB.ISO8859-1 -iso8859-14/XLC_LOCALE: cy_GB.ISO8859-14 -iso8859-15/XLC_LOCALE: cy_GB.ISO8859-15 -iso8859-2/XLC_LOCALE: cz_CZ.ISO8859-2 -iso8859-1/XLC_LOCALE: da_DK.ISO8859-1 -iso8859-15/XLC_LOCALE: da_DK.ISO8859-15 -iso8859-1/XLC_LOCALE: de_AT.ISO8859-1 -iso8859-15/XLC_LOCALE: de_AT.ISO8859-15 -iso8859-1/XLC_LOCALE: de_BE.ISO8859-1 -iso8859-15/XLC_LOCALE: de_BE.ISO8859-15 -iso8859-1/XLC_LOCALE: de_CH.ISO8859-1 -iso8859-15/XLC_LOCALE: de_CH.ISO8859-15 -iso8859-1/XLC_LOCALE: de_DE.ISO8859-1 -iso8859-15/XLC_LOCALE: de_DE.ISO8859-15 -iso8859-1/XLC_LOCALE: de_LI.ISO8859-1 -iso8859-1/XLC_LOCALE: de_LU.ISO8859-1 -iso8859-15/XLC_LOCALE: de_LU.ISO8859-15 -iso8859-7/XLC_LOCALE: el_GR.ISO8859-7 -iso8859-15/XLC_LOCALE: el_GR.ISO8859-15 -iso8859-1/XLC_LOCALE: en_AU.ISO8859-1 -iso8859-1/XLC_LOCALE: en_BZ.ISO8859-1 -iso8859-1/XLC_LOCALE: en_CA.ISO8859-1 -iso8859-1/XLC_LOCALE: en_GB.ISO8859-1 -iso8859-15/XLC_LOCALE: en_GB.ISO8859-15 -iso8859-1/XLC_LOCALE: en_IE.ISO8859-1 -iso8859-15/XLC_LOCALE: en_IE.ISO8859-15 -iso8859-1/XLC_LOCALE: en_JM.ISO8859-1 -iso8859-1/XLC_LOCALE: en_NZ.ISO8859-1 -iso8859-1/XLC_LOCALE: en_TT.ISO8859-1 -iso8859-1/XLC_LOCALE: en_UK.ISO8859-1 -iso8859-1/XLC_LOCALE: en_US.ISO8859-1 -iso8859-1/XLC_LOCALE: en_ZA.ISO8859-1 -iso8859-3/XLC_LOCALE: eo_XX.ISO8859-3 -iso8859-1/XLC_LOCALE: es_AR.ISO8859-1 -iso8859-1/XLC_LOCALE: es_BO.ISO8859-1 -iso8859-1/XLC_LOCALE: es_CL.ISO8859-1 -iso8859-1/XLC_LOCALE: es_CO.ISO8859-1 -iso8859-1/XLC_LOCALE: es_CR.ISO8859-1 -iso8859-1/XLC_LOCALE: es_DO.ISO8859-1 -iso8859-1/XLC_LOCALE: es_EC.ISO8859-1 -iso8859-1/XLC_LOCALE: es_ES.ISO8859-1 -iso8859-15/XLC_LOCALE: es_ES.ISO8859-15 -iso8859-1/XLC_LOCALE: es_GT.ISO8859-1 -iso8859-1/XLC_LOCALE: es_HN.ISO8859-1 -iso8859-1/XLC_LOCALE: es_MX.ISO8859-1 -iso8859-1/XLC_LOCALE: es_NI.ISO8859-1 -iso8859-1/XLC_LOCALE: es_PA.ISO8859-1 -iso8859-1/XLC_LOCALE: es_PE.ISO8859-1 -iso8859-1/XLC_LOCALE: es_PR.ISO8859-1 -iso8859-1/XLC_LOCALE: es_PY.ISO8859-1 -iso8859-1/XLC_LOCALE: es_SV.ISO8859-1 -iso8859-1/XLC_LOCALE: es_UY.ISO8859-1 -iso8859-1/XLC_LOCALE: es_VE.ISO8859-1 -iso8859-1/XLC_LOCALE: et_EE.ISO8859-1 -iso8859-4/XLC_LOCALE: et_EE.ISO8859-4 -iso8859-13/XLC_LOCALE: et_EE.ISO8859-13 -iso8859-15/XLC_LOCALE: et_EE.ISO8859-15 -iso8859-1/XLC_LOCALE: eu_ES.ISO8859-1 -iso8859-15/XLC_LOCALE: eu_ES.ISO8859-15 -isiri-3342/XLC_LOCALE: fa_IR.ISIRI-3342 -iso8859-1/XLC_LOCALE: fi_FI.ISO8859-1 -iso8859-15/XLC_LOCALE: fi_FI.ISO8859-15 -iso8859-1/XLC_LOCALE: fo_FO.ISO8859-1 -iso8859-15/XLC_LOCALE: fo_FO.ISO8859-15 -iso8859-1/XLC_LOCALE: fr_BE.ISO8859-1 -iso8859-15/XLC_LOCALE: fr_BE.ISO8859-15 -iso8859-1/XLC_LOCALE: fr_CA.ISO8859-1 -iso8859-15/XLC_LOCALE: fr_CA.ISO8859-15 -iso8859-1/XLC_LOCALE: fr_CH.ISO8859-1 -iso8859-15/XLC_LOCALE: fr_CH.ISO8859-15 -iso8859-1/XLC_LOCALE: fr_FR.ISO8859-1 -iso8859-15/XLC_LOCALE: fr_FR.ISO8859-15 -iso8859-1/XLC_LOCALE: fr_LU.ISO8859-1 -iso8859-15/XLC_LOCALE: fr_LU.ISO8859-15 -iso8859-1/XLC_LOCALE: ga_IE.ISO8859-1 -iso8859-14/XLC_LOCALE: ga_IE.ISO8859-14 -iso8859-15/XLC_LOCALE: ga_IE.ISO8859-15 -iso8859-1/XLC_LOCALE: gd_GB.ISO8859-1 -iso8859-14/XLC_LOCALE: gd_GB.ISO8859-14 -iso8859-15/XLC_LOCALE: gd_GB.ISO8859-15 -iso8859-1/XLC_LOCALE: gl_ES.ISO8859-1 -iso8859-15/XLC_LOCALE: gl_ES.ISO8859-15 -iso8859-1/XLC_LOCALE: gv_GB.ISO8859-1 -iso8859-14/XLC_LOCALE: gv_GB.ISO8859-14 -iso8859-15/XLC_LOCALE: gv_GB.ISO8859-15 -iso8859-8/XLC_LOCALE: he_IL.ISO8859-8 -microsoft-cp1255/XLC_LOCALE: he_IL.CP1255 -iscii-dev/XLC_LOCALE: hi_IN.ISCII-DEV -iso8859-2/XLC_LOCALE: hr_HR.ISO8859-2 -iso8859-2/XLC_LOCALE: hu_HU.ISO8859-2 -armscii-8/XLC_LOCALE: hy_AM.ARMSCII-8 -iso8859-1/XLC_LOCALE: id_ID.ISO8859-1 -iso8859-1/XLC_LOCALE: is_IS.ISO8859-1 -iso8859-15/XLC_LOCALE: is_IS.ISO8859-15 -iso8859-1/XLC_LOCALE: it_CH.ISO8859-1 -iso8859-1/XLC_LOCALE: it_IT.ISO8859-1 -iso8859-15/XLC_LOCALE: it_IT.ISO8859-15 -ja/XLC_LOCALE: ja_JP.eucJP -ja.SJIS/XLC_LOCALE: ja_JP.SJIS -ja.JIS/XLC_LOCALE: ja_JP.JIS7 -georgian-academy/XLC_LOCALE: ka_GE.GEORGIAN-ACADEMY -georgian-ps/XLC_LOCALE: ka_GE.GEORGIAN-PS -iso8859-1/XLC_LOCALE: kl_GL.ISO8859-1 -ko/XLC_LOCALE: ko_KR.eucKR -iso8859-1/XLC_LOCALE: kw_GB.ISO8859-1 -iso8859-14/XLC_LOCALE: kw_GB.ISO8859-14 -iso8859-15/XLC_LOCALE: kw_GB.ISO8859-15 -ibm-cp1133/XLC_LOCALE: lo_LA.IBM-CP1133 -mulelao-1/XLC_LOCALE: lo_LA.MULELAO-1 -iso8859-4/XLC_LOCALE: lt_LT.ISO8859-4 -iso8859-13/XLC_LOCALE: lt_LT.ISO8859-13 -iso8859-4/XLC_LOCALE: lv_LV.ISO8859-4 -iso8859-13/XLC_LOCALE: lv_LV.ISO8859-13 -iso8859-13/XLC_LOCALE: mi_NZ.ISO8859-13 -iso8859-5/XLC_LOCALE: mk_MK.ISO8859-5 -miscrosoft-cp1251/XLC_LOCALE: mk_MK.CP1251 -iso8859-1/XLC_LOCALE: ms_MY.ISO8859-1 -iso8859-1/XLC_LOCALE: nl_BE.ISO8859-1 -iso8859-15/XLC_LOCALE: nl_BE.ISO8859-15 -iso8859-1/XLC_LOCALE: nl_NL.ISO8859-1 -iso8859-15/XLC_LOCALE: nl_NL.ISO8859-15 -iso8859-1/XLC_LOCALE: no_NO.ISO8859-1 -iso8859-1/XLC_LOCALE: no_NO.ISO8859-15 -iso8859-1/XLC_LOCALE: nb_NO.ISO8859-1 -iso8859-1/XLC_LOCALE: nb_NO.ISO8859-15 -iso8859-1/XLC_LOCALE: ny_NO.ISO8859-1 -iso8859-1/XLC_LOCALE: ny_NO.ISO8859-15 -iso8859-1/XLC_LOCALE: oc_FR.ISO8859-1 -iso8859-15/XLC_LOCALE: oc_FR.ISO8859-15 -iso8859-1/XLC_LOCALE: pd_US.ISO8859-1 -iso8859-1/XLC_LOCALE: pd_DE.ISO8859-1 -iso8859-1/XLC_LOCALE: ph_PH.ISO8859-1 -iso8859-2/XLC_LOCALE: pl_PL.ISO8859-2 -iso8859-1/XLC_LOCALE: pp_AN.ISO8859-1 -iso8859-1/XLC_LOCALE: pt_BR.ISO8859-1 -iso8859-1/XLC_LOCALE: pt_PT.ISO8859-1 -iso8859-15/XLC_LOCALE: pt_PT.ISO8859-15 -iso8859-2/XLC_LOCALE: ro_RO.ISO8859-2 -iso8859-5/XLC_LOCALE: ru_RU.ISO8859-5 -microsoft-cp1251/XLC_LOCALE: ru_RU.CP1251 -koi8-r/XLC_LOCALE: ru_RU.KOI8-R -koi8-u/XLC_LOCALE: ru_UA.KOI8-U -iso8859-2/XLC_LOCALE: sh_YU.ISO8859-2 -iso8859-2/XLC_LOCALE: sk_SK.ISO8859-2 -iso8859-2/XLC_LOCALE: sl_SI.ISO8859-2 -iso8859-5/XLC_LOCALE: sp_YU.ISO8859-5 -iso8859-2/XLC_LOCALE: sq_AL.ISO8859-2 -iso8859-2/XLC_LOCALE: sr_SP.ISO8859-2 -iso8859-2/XLC_LOCALE: sr_YU.ISO8859-2 -iso8859-5/XLC_LOCALE: sr_YU.ISO8859-5 -iso8859-1/XLC_LOCALE: sv_FI.ISO8859-1 -iso8859-15/XLC_LOCALE: sv_FI.ISO8859-15 -iso8859-1/XLC_LOCALE: sv_SE.ISO8859-1 -iso8859-15/XLC_LOCALE: sv_SE.ISO8859-15 -tscii-0/XLC_LOCALE: ta_IN.TSCII-0 -koi8-c/XLC_LOCALE: tg_TJ.KOI8-C -th_TH/XLC_LOCALE: th_TH.TIS620 -iso8859-1/XLC_LOCALE: tl_PH.ISO8859-1 -iso8859-9/XLC_LOCALE: tr_TR.ISO8859-9 -tatar-cyr/XLC_LOCALE: tt_RU.TATAR-CYR -koi8-c/XLC_LOCALE: tt_RU.KOI8-C -iso8859-5/XLC_LOCALE: uk_UA.ISO8859-5 -microsoft-cp1251/XLC_LOCALE: uk_UA.CP1251 -koi8-u/XLC_LOCALE: uk_UA.KOI8-U -microsoft-cp1256/XLC_LOCALE: ur_PK.CP1256 -vi_VN.tcvn/XLC_LOCALE: vi_VN.TCVN -vi_VN.viscii/XLC_LOCALE: vi_VN.VISCII -iso8859-1/XLC_LOCALE: wa_BE.ISO8859-1 -iso8859-15/XLC_LOCALE: wa_BE.ISO8859-15 -microsoft-cp1255/XLC_LOCALE: yi_US.CP1255 -zh/XLC_LOCALE: zh_CN.eucCN -zh/XLC_LOCALE: zh_CN.GB2312 -zh_CN.gbk/XLC_LOCALE: zh_CN.GBK -zh_HK.big5hkscs/XLC_LOCALE: zh_HK.big5hkscs -zh_TW.big5/XLC_LOCALE: zh_TW.big5 -zh_TW.big5/XLC_LOCALE: zh_TW.Big5 -zh_TW/XLC_LOCALE: zh_TW.eucTW +C/XLC_LOCALE: C +iso8859-1/XLC_LOCALE: af_ZA.ISO8859-1 +iso8859-6/XLC_LOCALE: ar_AA.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_BH.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_DZ.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_EG.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_IQ.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_JO.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_KW.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_LB.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_LY.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_MA.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_OM.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_QA.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_SA.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_TN.ISO8859-6 +iso8859-6/XLC_LOCALE: ar_YE.ISO8859-6 +iso8859-9e/XLC_LOCALE: az_AZ.ISO8859-9E +koi8-c/XLC_LOCALE: az_AZ.KOI8-C +iso8859-5/XLC_LOCALE: be_BY.ISO8859-5 +microsoft-cp1251/XLC_LOCALE: be_BY.CP1251 +iso8859-5/XLC_LOCALE: bg_BG.ISO8859-5 +microsoft-cp1251/XLC_LOCALE: bg_BG.CP1251 +koi8-r/XLC_LOCALE: bg_BG.KOI8-R +iso8859-1/XLC_LOCALE: br_FR.ISO8859-1 +iso8859-14/XLC_LOCALE: br_FR.ISO8859-14 +iso8859-15/XLC_LOCALE: br_FR.ISO8859-15 +iso8859-1/XLC_LOCALE: ca_ES.ISO8859-1 +iso8859-15/XLC_LOCALE: ca_ES.ISO8859-15 +iso8859-2/XLC_LOCALE: cs_CZ.ISO8859-2 +iso8859-1/XLC_LOCALE: cy_GB.ISO8859-1 +iso8859-14/XLC_LOCALE: cy_GB.ISO8859-14 +iso8859-15/XLC_LOCALE: cy_GB.ISO8859-15 +iso8859-2/XLC_LOCALE: cz_CZ.ISO8859-2 +iso8859-1/XLC_LOCALE: da_DK.ISO8859-1 +iso8859-15/XLC_LOCALE: da_DK.ISO8859-15 +iso8859-1/XLC_LOCALE: de_AT.ISO8859-1 +iso8859-15/XLC_LOCALE: de_AT.ISO8859-15 +iso8859-1/XLC_LOCALE: de_BE.ISO8859-1 +iso8859-15/XLC_LOCALE: de_BE.ISO8859-15 +iso8859-1/XLC_LOCALE: de_CH.ISO8859-1 +iso8859-15/XLC_LOCALE: de_CH.ISO8859-15 +iso8859-1/XLC_LOCALE: de_DE.ISO8859-1 +iso8859-15/XLC_LOCALE: de_DE.ISO8859-15 +iso8859-1/XLC_LOCALE: de_LI.ISO8859-1 +iso8859-1/XLC_LOCALE: de_LU.ISO8859-1 +iso8859-15/XLC_LOCALE: de_LU.ISO8859-15 +iso8859-7/XLC_LOCALE: el_GR.ISO8859-7 +iso8859-15/XLC_LOCALE: el_GR.ISO8859-15 +iso8859-1/XLC_LOCALE: en_AU.ISO8859-1 +iso8859-1/XLC_LOCALE: en_BZ.ISO8859-1 +iso8859-1/XLC_LOCALE: en_CA.ISO8859-1 +iso8859-1/XLC_LOCALE: en_GB.ISO8859-1 +iso8859-15/XLC_LOCALE: en_GB.ISO8859-15 +iso8859-1/XLC_LOCALE: en_IE.ISO8859-1 +iso8859-15/XLC_LOCALE: en_IE.ISO8859-15 +iso8859-1/XLC_LOCALE: en_JM.ISO8859-1 +iso8859-1/XLC_LOCALE: en_NZ.ISO8859-1 +iso8859-1/XLC_LOCALE: en_TT.ISO8859-1 +iso8859-1/XLC_LOCALE: en_UK.ISO8859-1 +iso8859-1/XLC_LOCALE: en_US.ISO8859-1 +iso8859-1/XLC_LOCALE: en_ZA.ISO8859-1 +iso8859-3/XLC_LOCALE: eo_EO.ISO8859-3 +iso8859-3/XLC_LOCALE: eo_XX.ISO8859-3 +iso8859-1/XLC_LOCALE: es_AR.ISO8859-1 +iso8859-1/XLC_LOCALE: es_BO.ISO8859-1 +iso8859-1/XLC_LOCALE: es_CL.ISO8859-1 +iso8859-1/XLC_LOCALE: es_CO.ISO8859-1 +iso8859-1/XLC_LOCALE: es_CR.ISO8859-1 +iso8859-1/XLC_LOCALE: es_DO.ISO8859-1 +iso8859-1/XLC_LOCALE: es_EC.ISO8859-1 +iso8859-1/XLC_LOCALE: es_ES.ISO8859-1 +iso8859-15/XLC_LOCALE: es_ES.ISO8859-15 +iso8859-1/XLC_LOCALE: es_GT.ISO8859-1 +iso8859-1/XLC_LOCALE: es_HN.ISO8859-1 +iso8859-1/XLC_LOCALE: es_MX.ISO8859-1 +iso8859-1/XLC_LOCALE: es_NI.ISO8859-1 +iso8859-1/XLC_LOCALE: es_PA.ISO8859-1 +iso8859-1/XLC_LOCALE: es_PE.ISO8859-1 +iso8859-1/XLC_LOCALE: es_PR.ISO8859-1 +iso8859-1/XLC_LOCALE: es_PY.ISO8859-1 +iso8859-1/XLC_LOCALE: es_SV.ISO8859-1 +iso8859-1/XLC_LOCALE: es_UY.ISO8859-1 +iso8859-1/XLC_LOCALE: es_VE.ISO8859-1 +iso8859-1/XLC_LOCALE: et_EE.ISO8859-1 +iso8859-4/XLC_LOCALE: et_EE.ISO8859-4 +iso8859-13/XLC_LOCALE: et_EE.ISO8859-13 +iso8859-15/XLC_LOCALE: et_EE.ISO8859-15 +iso8859-1/XLC_LOCALE: eu_ES.ISO8859-1 +iso8859-15/XLC_LOCALE: eu_ES.ISO8859-15 +isiri-3342/XLC_LOCALE: fa_IR.ISIRI-3342 +iso8859-1/XLC_LOCALE: fi_FI.ISO8859-1 +iso8859-15/XLC_LOCALE: fi_FI.ISO8859-15 +iso8859-1/XLC_LOCALE: fo_FO.ISO8859-1 +iso8859-15/XLC_LOCALE: fo_FO.ISO8859-15 +iso8859-1/XLC_LOCALE: fr_BE.ISO8859-1 +iso8859-15/XLC_LOCALE: fr_BE.ISO8859-15 +iso8859-1/XLC_LOCALE: fr_CA.ISO8859-1 +iso8859-15/XLC_LOCALE: fr_CA.ISO8859-15 +iso8859-1/XLC_LOCALE: fr_CH.ISO8859-1 +iso8859-15/XLC_LOCALE: fr_CH.ISO8859-15 +iso8859-1/XLC_LOCALE: fr_FR.ISO8859-1 +iso8859-15/XLC_LOCALE: fr_FR.ISO8859-15 +iso8859-1/XLC_LOCALE: fr_LU.ISO8859-1 +iso8859-15/XLC_LOCALE: fr_LU.ISO8859-15 +iso8859-1/XLC_LOCALE: ga_IE.ISO8859-1 +iso8859-14/XLC_LOCALE: ga_IE.ISO8859-14 +iso8859-15/XLC_LOCALE: ga_IE.ISO8859-15 +iso8859-1/XLC_LOCALE: gd_GB.ISO8859-1 +iso8859-14/XLC_LOCALE: gd_GB.ISO8859-14 +iso8859-15/XLC_LOCALE: gd_GB.ISO8859-15 +iso8859-1/XLC_LOCALE: gl_ES.ISO8859-1 +iso8859-15/XLC_LOCALE: gl_ES.ISO8859-15 +iso8859-1/XLC_LOCALE: gv_GB.ISO8859-1 +iso8859-14/XLC_LOCALE: gv_GB.ISO8859-14 +iso8859-15/XLC_LOCALE: gv_GB.ISO8859-15 +iso8859-8/XLC_LOCALE: he_IL.ISO8859-8 +microsoft-cp1255/XLC_LOCALE: he_IL.CP1255 +iscii-dev/XLC_LOCALE: hi_IN.ISCII-DEV +iso8859-2/XLC_LOCALE: hr_HR.ISO8859-2 +iso8859-2/XLC_LOCALE: hu_HU.ISO8859-2 +armscii-8/XLC_LOCALE: hy_AM.ARMSCII-8 +iso8859-1/XLC_LOCALE: id_ID.ISO8859-1 +iso8859-1/XLC_LOCALE: is_IS.ISO8859-1 +iso8859-15/XLC_LOCALE: is_IS.ISO8859-15 +iso8859-1/XLC_LOCALE: it_CH.ISO8859-1 +iso8859-1/XLC_LOCALE: it_IT.ISO8859-1 +iso8859-15/XLC_LOCALE: it_IT.ISO8859-15 +ja/XLC_LOCALE: ja_JP.eucJP +ja.SJIS/XLC_LOCALE: ja_JP.SJIS +ja.JIS/XLC_LOCALE: ja_JP.JIS7 +georgian-academy/XLC_LOCALE: ka_GE.GEORGIAN-ACADEMY +georgian-ps/XLC_LOCALE: ka_GE.GEORGIAN-PS +iso8859-1/XLC_LOCALE: kl_GL.ISO8859-1 +ko/XLC_LOCALE: ko_KR.eucKR +iso8859-1/XLC_LOCALE: kw_GB.ISO8859-1 +iso8859-14/XLC_LOCALE: kw_GB.ISO8859-14 +iso8859-15/XLC_LOCALE: kw_GB.ISO8859-15 +ibm-cp1133/XLC_LOCALE: lo_LA.IBM-CP1133 +mulelao-1/XLC_LOCALE: lo_LA.MULELAO-1 +iso8859-4/XLC_LOCALE: lt_LT.ISO8859-4 +iso8859-13/XLC_LOCALE: lt_LT.ISO8859-13 +iso8859-4/XLC_LOCALE: lv_LV.ISO8859-4 +iso8859-13/XLC_LOCALE: lv_LV.ISO8859-13 +iso8859-13/XLC_LOCALE: mi_NZ.ISO8859-13 +iso8859-5/XLC_LOCALE: mk_MK.ISO8859-5 +microsoft-cp1251/XLC_LOCALE: mk_MK.CP1251 +iso8859-1/XLC_LOCALE: ms_MY.ISO8859-1 +iso8859-3/XLC_LOCALE: mt_MT.ISO8859-3 +iso8859-1/XLC_LOCALE: nl_BE.ISO8859-1 +iso8859-15/XLC_LOCALE: nl_BE.ISO8859-15 +iso8859-1/XLC_LOCALE: nl_NL.ISO8859-1 +iso8859-15/XLC_LOCALE: nl_NL.ISO8859-15 +iso8859-1/XLC_LOCALE: no_NO.ISO8859-1 +iso8859-1/XLC_LOCALE: no_NO.ISO8859-15 +iso8859-1/XLC_LOCALE: nb_NO.ISO8859-1 +iso8859-1/XLC_LOCALE: nb_NO.ISO8859-15 +iso8859-1/XLC_LOCALE: nn_NO.ISO8859-1 +iso8859-1/XLC_LOCALE: nn_NO.ISO8859-15 +iso8859-1/XLC_LOCALE: ny_NO.ISO8859-1 +iso8859-1/XLC_LOCALE: ny_NO.ISO8859-15 +iso8859-1/XLC_LOCALE: oc_FR.ISO8859-1 +iso8859-15/XLC_LOCALE: oc_FR.ISO8859-15 +iso8859-1/XLC_LOCALE: pd_US.ISO8859-1 +iso8859-1/XLC_LOCALE: pd_DE.ISO8859-1 +iso8859-1/XLC_LOCALE: ph_PH.ISO8859-1 +iso8859-2/XLC_LOCALE: pl_PL.ISO8859-2 +iso8859-1/XLC_LOCALE: pp_AN.ISO8859-1 +iso8859-1/XLC_LOCALE: pt_BR.ISO8859-1 +iso8859-1/XLC_LOCALE: pt_PT.ISO8859-1 +iso8859-15/XLC_LOCALE: pt_PT.ISO8859-15 +iso8859-2/XLC_LOCALE: ro_RO.ISO8859-2 +iso8859-5/XLC_LOCALE: ru_RU.ISO8859-5 +microsoft-cp1251/XLC_LOCALE: ru_RU.CP1251 +koi8-r/XLC_LOCALE: ru_RU.KOI8-R +koi8-u/XLC_LOCALE: ru_UA.KOI8-U +iso8859-2/XLC_LOCALE: sh_YU.ISO8859-2 +iso8859-2/XLC_LOCALE: sk_SK.ISO8859-2 +iso8859-2/XLC_LOCALE: sl_SI.ISO8859-2 +iso8859-5/XLC_LOCALE: sp_YU.ISO8859-5 +iso8859-2/XLC_LOCALE: sq_AL.ISO8859-2 +iso8859-2/XLC_LOCALE: sr_SP.ISO8859-2 +iso8859-2/XLC_LOCALE: sr_YU.ISO8859-2 +iso8859-5/XLC_LOCALE: sr_YU.ISO8859-5 +microsoft-cp1251/XLC_LOCALE: sr_YU.CP1251 +iso8859-1/XLC_LOCALE: sv_FI.ISO8859-1 +iso8859-15/XLC_LOCALE: sv_FI.ISO8859-15 +iso8859-1/XLC_LOCALE: sv_SE.ISO8859-1 +iso8859-15/XLC_LOCALE: sv_SE.ISO8859-15 +tscii-0/XLC_LOCALE: ta_IN.TSCII-0 +koi8-c/XLC_LOCALE: tg_TJ.KOI8-C +th_TH/XLC_LOCALE: th_TH.TIS620 +iso8859-1/XLC_LOCALE: tl_PH.ISO8859-1 +iso8859-9/XLC_LOCALE: tr_TR.ISO8859-9 +tatar-cyr/XLC_LOCALE: tt_RU.TATAR-CYR +koi8-c/XLC_LOCALE: tt_RU.KOI8-C +iso8859-5/XLC_LOCALE: uk_UA.ISO8859-5 +microsoft-cp1251/XLC_LOCALE: uk_UA.CP1251 +koi8-u/XLC_LOCALE: uk_UA.KOI8-U +microsoft-cp1256/XLC_LOCALE: ur_PK.CP1256 +vi_VN.tcvn/XLC_LOCALE: vi_VN.TCVN +vi_VN.viscii/XLC_LOCALE: vi_VN.VISCII +iso8859-1/XLC_LOCALE: wa_BE.ISO8859-1 +iso8859-15/XLC_LOCALE: wa_BE.ISO8859-15 +microsoft-cp1255/XLC_LOCALE: yi_US.CP1255 +zh_CN/XLC_LOCALE: zh_CN.eucCN +zh_CN.gbk/XLC_LOCALE: zh_CN.gbk +zh_HK.big5/XLC_LOCALE: zh_HK.big5 +zh_HK.big5hkscs/XLC_LOCALE: zh_HK.big5hkscs +zh_TW.big5/XLC_LOCALE: zh_TW.big5 +zh_TW/XLC_LOCALE: zh_TW.eucTW XCOMM Note: The UTF-8 locales don't work correctly yet. Work in progress. -en_US.UTF-8/XLC_LOCALE: af_ZA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_AA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_BH.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_DZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_EG.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_IQ.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_JO.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_KW.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_LB.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_LY.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_MA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_OM.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_QA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_SA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_TN.UTF-8 -en_US.UTF-8/XLC_LOCALE: ar_YE.UTF-8 -en_US.UTF-8/XLC_LOCALE: az_AZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: a3_AZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: be_BY.UTF-8 -en_US.UTF-8/XLC_LOCALE: bg_BG.UTF-8 -en_US.UTF-8/XLC_LOCALE: br_FR.UTF-8 -en_US.UTF-8/XLC_LOCALE: ca_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE: cs_CZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: cy_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE: cz_CZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: da_DK.UTF-8 -en_US.UTF-8/XLC_LOCALE: de_AT.UTF-8 -en_US.UTF-8/XLC_LOCALE: de_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE: de_CH.UTF-8 -en_US.UTF-8/XLC_LOCALE: de_DE.UTF-8 -en_US.UTF-8/XLC_LOCALE: de_LI.UTF-8 -en_US.UTF-8/XLC_LOCALE: de_LU.UTF-8 -en_US.UTF-8/XLC_LOCALE: el_GR.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_AU.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_BZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_CA.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_IE.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_JM.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_NZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_TT.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_UK.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_US.UTF-8 -en_US.UTF-8/XLC_LOCALE: en_ZA.UTF-8 -en_US.UTF-8/XLC_LOCALE: eo_XX.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_AR.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_BO.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_CL.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_CO.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_CR.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_DO.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_EC.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_GT.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_HN.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_MX.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_NI.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_PA.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_PE.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_PR.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_PY.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_SV.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_UY.UTF-8 -en_US.UTF-8/XLC_LOCALE: es_VE.UTF-8 -en_US.UTF-8/XLC_LOCALE: et_EE.UTF-8 -en_US.UTF-8/XLC_LOCALE: eu_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE: fa_IR.UTF-8 -en_US.UTF-8/XLC_LOCALE: fi_FI.UTF-8 -en_US.UTF-8/XLC_LOCALE: fo_FO.UTF-8 -en_US.UTF-8/XLC_LOCALE: fr_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE: fr_CA.UTF-8 -en_US.UTF-8/XLC_LOCALE: fr_CH.UTF-8 -en_US.UTF-8/XLC_LOCALE: fr_FR.UTF-8 -en_US.UTF-8/XLC_LOCALE: fr_LU.UTF-8 -en_US.UTF-8/XLC_LOCALE: ga_IE.UTF-8 -en_US.UTF-8/XLC_LOCALE: gd_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE: gl_ES.UTF-8 -en_US.UTF-8/XLC_LOCALE: gv_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE: he_IL.UTF-8 -en_US.UTF-8/XLC_LOCALE: hi_IN.UTF-8 -en_US.UTF-8/XLC_LOCALE: hr_HR.UTF-8 -en_US.UTF-8/XLC_LOCALE: hu_HU.UTF-8 -en_US.UTF-8/XLC_LOCALE: hy_AM.UTF-8 -en_US.UTF-8/XLC_LOCALE: id_ID.UTF-8 -en_US.UTF-8/XLC_LOCALE: is_IS.UTF-8 -en_US.UTF-8/XLC_LOCALE: it_CH.UTF-8 -en_US.UTF-8/XLC_LOCALE: it_IT.UTF-8 -en_US.UTF-8/XLC_LOCALE: iu_CA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ja_JP.UTF-8 -en_US.UTF-8/XLC_LOCALE: ka_GE.UTF-8 -en_US.UTF-8/XLC_LOCALE: kl_GL.UTF-8 -en_US.UTF-8/XLC_LOCALE: ko_KR.UTF-8 -en_US.UTF-8/XLC_LOCALE: kw_GB.UTF-8 -en_US.UTF-8/XLC_LOCALE: lo_LA.UTF-8 -en_US.UTF-8/XLC_LOCALE: lt_LT.UTF-8 -en_US.UTF-8/XLC_LOCALE: lv_LV.UTF-8 -en_US.UTF-8/XLC_LOCALE: mi_NZ.UTF-8 -en_US.UTF-8/XLC_LOCALE: mk_MK.UTF-8 -en_US.UTF-8/XLC_LOCALE: ms_MY.UTF-8 -en_US.UTF-8/XLC_LOCALE: nl_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE: nl_NL.UTF-8 -en_US.UTF-8/XLC_LOCALE: no_NO.UTF-8 -en_US.UTF-8/XLC_LOCALE: nb_NO.UTF-8 -en_US.UTF-8/XLC_LOCALE: ny_NO.UTF-8 -en_US.UTF-8/XLC_LOCALE: oc_FR.UTF-8 -en_US.UTF-8/XLC_LOCALE: pd_DE.UTF-8 -en_US.UTF-8/XLC_LOCALE: pd_US.UTF-8 -en_US.UTF-8/XLC_LOCALE: ph_PH.UTF-8 -en_US.UTF-8/XLC_LOCALE: pl_PL.UTF-8 -en_US.UTF-8/XLC_LOCALE: pp_AN.UTF-8 -en_US.UTF-8/XLC_LOCALE: pt_BR.UTF-8 -en_US.UTF-8/XLC_LOCALE: pt_PT.UTF-8 -en_US.UTF-8/XLC_LOCALE: ro_RO.UTF-8 -en_US.UTF-8/XLC_LOCALE: ru_RU.UTF-8 -en_US.UTF-8/XLC_LOCALE: ru_UA.UTF-8 -en_US.UTF-8/XLC_LOCALE: sk_SK.UTF-8 -en_US.UTF-8/XLC_LOCALE: sl_SI.UTF-8 -en_US.UTF-8/XLC_LOCALE: sq_AL.UTF-8 -en_US.UTF-8/XLC_LOCALE: sr_YU.UTF-8 -en_US.UTF-8/XLC_LOCALE: sv_FI.UTF-8 -en_US.UTF-8/XLC_LOCALE: sv_SE.UTF-8 -en_US.UTF-8/XLC_LOCALE: ta_IN.UTF-8 -en_US.UTF-8/XLC_LOCALE: tg_TJ.UTF-8 -en_US.UTF-8/XLC_LOCALE: th_TH.UTF-8 -en_US.UTF-8/XLC_LOCALE: tl_PH.UTF-8 -en_US.UTF-8/XLC_LOCALE: tr_TR.UTF-8 -en_US.UTF-8/XLC_LOCALE: tt_RU.UTF-8 -en_US.UTF-8/XLC_LOCALE: uk_UA.UTF-8 -en_US.UTF-8/XLC_LOCALE: ur_PK.UTF-8 -en_US.UTF-8/XLC_LOCALE: vi_VN.UTF-8 -en_US.UTF-8/XLC_LOCALE: wa_BE.UTF-8 -en_US.UTF-8/XLC_LOCALE: yi_US.UTF-8 -en_US.UTF-8/XLC_LOCALE: zh_CN.UTF-8 -en_US.UTF-8/XLC_LOCALE: zh_TW.UTF-8 +en_US.UTF-8/XLC_LOCALE: af_ZA.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_AA.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_BH.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_DZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_EG.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_IQ.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_JO.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_KW.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_LB.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_LY.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_MA.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_OM.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_QA.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_SA.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_TN.UTF-8 +en_US.UTF-8/XLC_LOCALE: ar_YE.UTF-8 +en_US.UTF-8/XLC_LOCALE: az_AZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: a3_AZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: be_BY.UTF-8 +en_US.UTF-8/XLC_LOCALE: bg_BG.UTF-8 +en_US.UTF-8/XLC_LOCALE: bn_BD.UTF-8 +en_US.UTF-8/XLC_LOCALE: br_FR.UTF-8 +en_US.UTF-8/XLC_LOCALE: ca_ES.UTF-8 +en_US.UTF-8/XLC_LOCALE: cs_CZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: cy_GB.UTF-8 +en_US.UTF-8/XLC_LOCALE: cz_CZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: da_DK.UTF-8 +en_US.UTF-8/XLC_LOCALE: de_AT.UTF-8 +en_US.UTF-8/XLC_LOCALE: de_BE.UTF-8 +en_US.UTF-8/XLC_LOCALE: de_CH.UTF-8 +en_US.UTF-8/XLC_LOCALE: de_DE.UTF-8 +en_US.UTF-8/XLC_LOCALE: de_LI.UTF-8 +en_US.UTF-8/XLC_LOCALE: de_LU.UTF-8 +en_US.UTF-8/XLC_LOCALE: el_GR.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_AU.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_BZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_CA.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_GB.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_IE.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_JM.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_NZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_TT.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_UK.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_US.UTF-8 +en_US.UTF-8/XLC_LOCALE: en_ZA.UTF-8 +en_US.UTF-8/XLC_LOCALE: eo_EO.UTF-8 +en_US.UTF-8/XLC_LOCALE: eo_XX.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_AR.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_BO.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_CL.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_CO.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_CR.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_DO.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_EC.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_ES.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_GT.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_HN.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_MX.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_NI.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_PA.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_PE.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_PR.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_PY.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_SV.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_UY.UTF-8 +en_US.UTF-8/XLC_LOCALE: es_VE.UTF-8 +en_US.UTF-8/XLC_LOCALE: et_EE.UTF-8 +en_US.UTF-8/XLC_LOCALE: eu_ES.UTF-8 +en_US.UTF-8/XLC_LOCALE: fa_IR.UTF-8 +en_US.UTF-8/XLC_LOCALE: fi_FI.UTF-8 +en_US.UTF-8/XLC_LOCALE: fo_FO.UTF-8 +en_US.UTF-8/XLC_LOCALE: fr_BE.UTF-8 +en_US.UTF-8/XLC_LOCALE: fr_CA.UTF-8 +en_US.UTF-8/XLC_LOCALE: fr_CH.UTF-8 +en_US.UTF-8/XLC_LOCALE: fr_FR.UTF-8 +en_US.UTF-8/XLC_LOCALE: fr_LU.UTF-8 +en_US.UTF-8/XLC_LOCALE: ga_IE.UTF-8 +en_US.UTF-8/XLC_LOCALE: gd_GB.UTF-8 +en_US.UTF-8/XLC_LOCALE: gl_ES.UTF-8 +en_US.UTF-8/XLC_LOCALE: gv_GB.UTF-8 +en_US.UTF-8/XLC_LOCALE: he_IL.UTF-8 +en_US.UTF-8/XLC_LOCALE: hi_IN.UTF-8 +en_US.UTF-8/XLC_LOCALE: hr_HR.UTF-8 +en_US.UTF-8/XLC_LOCALE: hu_HU.UTF-8 +en_US.UTF-8/XLC_LOCALE: hy_AM.UTF-8 +en_US.UTF-8/XLC_LOCALE: id_ID.UTF-8 +en_US.UTF-8/XLC_LOCALE: is_IS.UTF-8 +en_US.UTF-8/XLC_LOCALE: it_CH.UTF-8 +en_US.UTF-8/XLC_LOCALE: it_IT.UTF-8 +en_US.UTF-8/XLC_LOCALE: iu_CA.UTF-8 +en_US.UTF-8/XLC_LOCALE: ja_JP.UTF-8 +en_US.UTF-8/XLC_LOCALE: ka_GE.UTF-8 +en_US.UTF-8/XLC_LOCALE: kl_GL.UTF-8 +en_US.UTF-8/XLC_LOCALE: ko_KR.UTF-8 +en_US.UTF-8/XLC_LOCALE: kw_GB.UTF-8 +en_US.UTF-8/XLC_LOCALE: lo_LA.UTF-8 +en_US.UTF-8/XLC_LOCALE: lt_LT.UTF-8 +en_US.UTF-8/XLC_LOCALE: lv_LV.UTF-8 +en_US.UTF-8/XLC_LOCALE: mi_NZ.UTF-8 +en_US.UTF-8/XLC_LOCALE: mk_MK.UTF-8 +en_US.UTF-8/XLC_LOCALE: ms_MY.UTF-8 +en_US.UTF-8/XLC_LOCALE: nl_BE.UTF-8 +en_US.UTF-8/XLC_LOCALE: nl_NL.UTF-8 +en_US.UTF-8/XLC_LOCALE: no_NO.UTF-8 +en_US.UTF-8/XLC_LOCALE: nb_NO.UTF-8 +en_US.UTF-8/XLC_LOCALE: nn_NO.UTF-8 +en_US.UTF-8/XLC_LOCALE: ny_NO.UTF-8 +en_US.UTF-8/XLC_LOCALE: oc_FR.UTF-8 +en_US.UTF-8/XLC_LOCALE: pd_DE.UTF-8 +en_US.UTF-8/XLC_LOCALE: pd_US.UTF-8 +en_US.UTF-8/XLC_LOCALE: ph_PH.UTF-8 +en_US.UTF-8/XLC_LOCALE: pl_PL.UTF-8 +en_US.UTF-8/XLC_LOCALE: pp_AN.UTF-8 +en_US.UTF-8/XLC_LOCALE: pt_BR.UTF-8 +en_US.UTF-8/XLC_LOCALE: pt_PT.UTF-8 +en_US.UTF-8/XLC_LOCALE: ro_RO.UTF-8 +en_US.UTF-8/XLC_LOCALE: ru_RU.UTF-8 +en_US.UTF-8/XLC_LOCALE: ru_UA.UTF-8 +en_US.UTF-8/XLC_LOCALE: se_NO.UTF-8 +en_US.UTF-8/XLC_LOCALE: sk_SK.UTF-8 +en_US.UTF-8/XLC_LOCALE: sl_SI.UTF-8 +en_US.UTF-8/XLC_LOCALE: sq_AL.UTF-8 +en_US.UTF-8/XLC_LOCALE: sr_YU.UTF-8 +en_US.UTF-8/XLC_LOCALE: sv_FI.UTF-8 +en_US.UTF-8/XLC_LOCALE: sv_SE.UTF-8 +en_US.UTF-8/XLC_LOCALE: ta_IN.UTF-8 +en_US.UTF-8/XLC_LOCALE: tg_TJ.UTF-8 +en_US.UTF-8/XLC_LOCALE: th_TH.UTF-8 +en_US.UTF-8/XLC_LOCALE: tl_PH.UTF-8 +en_US.UTF-8/XLC_LOCALE: tr_TR.UTF-8 +en_US.UTF-8/XLC_LOCALE: tt_RU.UTF-8 +en_US.UTF-8/XLC_LOCALE: uk_UA.UTF-8 +en_US.UTF-8/XLC_LOCALE: ur_PK.UTF-8 +en_US.UTF-8/XLC_LOCALE: vi_VN.UTF-8 +en_US.UTF-8/XLC_LOCALE: wa_BE.UTF-8 +en_US.UTF-8/XLC_LOCALE: yi_US.UTF-8 +en_US.UTF-8/XLC_LOCALE: zh_CN.UTF-8 +en_US.UTF-8/XLC_LOCALE: zh_TW.UTF-8 #ifdef __uxp__ -ja.U90/XLC_LOCALE: ja_JP.U90 -ja.S90/XLC_LOCALE: ja_JP.S90 +ja.U90/XLC_LOCALE: ja_JP.U90 +ja.S90/XLC_LOCALE: ja_JP.S90 #endif Index: xc/nls/Compose/Imakefile diff -u xc/nls/Compose/Imakefile:1.17 xc/nls/Compose/Imakefile:1.19 --- xc/nls/Compose/Imakefile:1.17 Thu Apr 26 17:09:40 2001 +++ xc/nls/Compose/Imakefile Fri Nov 2 18:29:28 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/nls/Compose/Imakefile,v 1.17 2001/04/26 21:09:40 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/Imakefile,v 1.19 2001/11/02 23:29:28 dawes Exp $ #ifndef Win32Architecture #ifndef OS2Architecture @@ -39,6 +39,7 @@ #endif ComposeTarget(armscii-8) +ComposeTarget(en_US.UTF-8) ComposeTarget(georgian-academy) ComposeTarget(georgian-ps) ComposeTarget(ibm-cp1133) @@ -63,11 +64,10 @@ ComposeTarget(koi8-r) ComposeTarget(koi8-u) ComposeTarget(koi8-c) -ComposeTarget(mk_MK.UTF-8) ComposeTarget(mulelao-1) ComposeTarget(vi_VN.tcvn) ComposeTarget(vi_VN.viscii) -ComposeTarget(zh) +ComposeTarget(zh_CN) ComposeTarget(zh_CN.gbk) ComposeTarget(zh_TW) ComposeTarget(zh_TW.big5) Index: xc/nls/Compose/en_US.UTF-8 diff -u /dev/null xc/nls/Compose/en_US.UTF-8:1.1 --- /dev/null Fri Jan 18 15:23:51 2002 +++ xc/nls/Compose/en_US.UTF-8 Fri Nov 2 18:29:28 2001 @@ -0,0 +1,1076 @@ +XCOMM +XCOMM $XFree86: xc/nls/Compose/en_US.UTF-8,v 1.1 2001/11/02 23:29:28 dawes Exp $ +XCOMM +XCOMM latin alphabet +XCOMM +XCOMM abovedot + : "ḃ" U1e03 + : "Ḃ" U1e02 + : "Ä‹" cabovedot + : "ÄŠ" Cabovedot + : "ḋ" U1e0b + : "Ḋ" U1e0a + : "Ä—" eabovedot + : "Ä–" Ebovedot + : "ḟ" U1e1f + : "Ḟ" U1e1e + : "Ä¡" U0121 + : "Ä " U0120 + : "Ä°" Iabovedot + : "ı" idotless + : "á¹" U1e41 + : "á¹€" U1e40 +

: "á¹—" U1e57 +

: "á¹–" U1e56 + : "ṡ" U1e61 + : "á¹ " U1e60 + : "ṫ" U1e6b + : "Ṫ" U1e6a + : "ż" zabovedot + : "Å»" Zabovedot +XCOMM those are for facility + : "Ã¥" aring + : "Ã…" Aring + : "ů" uring + : "Å®" Uring +XCOMM abovering + : "Ã¥" aring + : "Ã…" Aring + : "ů" uring + : "Å®" Uring +XCOMM for facility + : "Ä—" eabovedot + : "Ä–" Eabovedot + : "ż" zabovedot + : "Å»" Zabovedot +XCOMM acute + : "á" aacute + : "Ã" Aacute + : "ắ" U1eaf + : "Ắ" U1eaf + : "ấ" U1ea5 + : "Ấ" U1ea4 + : "ć" cacute + : "Ć" Cacute + : "ế" U1ebf + : "Ế" U1ebe + : "é" eacute + : "É" Eacute + : "í" iacute + : "Ã" Iacute + : "ĺ" lacute + : "Ĺ" Lacute + : "Å„" nacute + : "Ń" Nacute + : "ố" U1ed1 + : "á»" U1ed0 + : "á»›" U1edb + : "Ớ" U1eda + : "ó" oacute + : "Ó" Oacute + : "Å‘" odoubleacute + : "Å" Odoubleacute + : "Å•" racute + : "Å”" Racute + : "Å›" sacute + : "Åš" Sacute + : "ứ" U1ee9 + : "Ứ" U1ee8 + : "ú" uacute + : "Ú" Uacute + : "ű" udoubleacute + : "Å°" Udoubleacute + : "ẃ" U1e83 + : "Ẃ" U1e82 + : "ý" yacute + : "Ã" Yacute + : "ź" zacute + : "Ź" Zacute +XCOMM for facility + : "ḃ" U1e03 + : "Ḃ" U1e02 + : "ḋ" U1e0b + : "Ḋ" U1e0a + : "ḟ" U1e1f + : "Ḟ" U1e1e + : "ṫ" U1e6b + : "Ṫ" U1e6a +XCOMM belowdot + : "ạ" U1ea1 + : "Ạ" U1ea0 + : "ặ" U1eb7 + : "Ặ" U1eb6 + : "ậ" U1ead + : "Ậ" U1eac + : "ệ" U1ec7 + : "Ệ" U1ec6 + : "ẹ" U1eb9 + : "Ẹ" U1eb8 + : "ị" U1ecb + : "Ị" U1eca + : "á»™" U1ed9 + : "Ộ" U1ed8 + : "ợ" U1ee3 + : "Ợ" U1ee2 + : "á»" U1ecd + : "Ọ" U1ecc + : "á»±" U1ef1 + : "á»°" U1ef0 + : "ụ" U1ee5 + : "Ụ" U1ee4 + : "ỵ" U1ef5 + : "á»´" U1ef4 +XCOMM those are in fact coma below + : "È™" U0219 + : "Ș" U0218 + : "È›" U021b + : "Èš" U021a +XCOMM breve + : "ă" abreve + : "Ä‚" Abreve + : "ÄŸ" gbreve + : "Äž" Gbreve + : "Å­" ubreve + : "Ŭ" Ubreve + : "ắ" U1eaf + : "Ắ" U1eae + : "ặ" U1eb7 + : "Ặ" U1eb6 + : "ằ" U1eb1 + : "Ằ" U1eb0 + : "ẳ" U1eb3 + : "Ẳ" U1eb2 + : "ẵ" U1eb5 + : "Ẵ" U1eb4 +XCOMM caron + : "Ä" ccaron + : "ÄŒ" Ccaron + : "Ä" dcaron + : "ÄŽ" Dcaron + : "Ä›" ecaron + : "Äš" Ecaron + : "ǧ" U01e7 + : "Ǧ" U01e6 + : "ľ" lcaron + : "Ľ" Lcaron + : "ň" ncaron + : "Ň" Ncaron + : "Å™" rcaron + : "Ř" Rcaron + : "Å¡" scaron + : "Å " Scaron + : "Å¥" tcaron + : "Ť" Tcaron + : "Ç”" U01d4 + : "Ç“" U01d3 + : "ž" zcaron + : "Ž" Zcaron +XCOMM cedilla + : "ç" ccedilla + : "Ç" Ccedilla + : "Ä£" gcedilla + : "Ä¢" Gcedilla + : "Ä·" kcedilla + : "Ķ" Kcedilla + : "ļ" lcedilla + : "Ä»" Lcedilla + : "ņ" ncedilla + : "Å…" Ncedilla + : "Å—" rcedilla + : "Å–" Rcedilla + : "ÅŸ" scedilla + : "Åž" Scedilla + : "Å£" tcedilla + : "Å¢" Tcedilla +XCOMM circumflex +XCOMM <0> : "°" degree + <0> : "â°" U2070 + <1> : "¹" onesuperior + <2> : "²" twosuperior + <3> : "³" threesuperior + : "â" acircumflex + : "Â" Acircumflex + : "ĉ" ccircumflex + : "Ĉ" Ccircumflex + : "ê" ecircumflex + : "Ê" Ecircumflex + : "Ä" gcircumflex + : "Äœ" Gcircumflex + : "Ä¥" hcircumflex + : "Ĥ" Hcircumflex + : "î" icircumflex + : "ÃŽ" Icircumflex + : "ĵ" jcircumflex + : "Ä´" Jcircumflex + : "‾" macron + : "ô" ocircumflex + : "Ô" Ocircumflex + : "·" periodcentered + : "Å" scircumflex + : "Åœ" Scircumflex + : "û" ucircumflex + : "Û" Ucircumflex + : "ŵ" U0175 + : "Å´" U0174 + : "Å·" U0177 + : "Ŷ" U0176 + : "ẑ" U1e91 + : "áº" U1e90 + : "ấ" U1ea5 + : "Ấ" U1ea4 + : "ậ" U1ead + : "Ậ" U1eac + : "ầ" U1ea7 + : "Ầ" U1ea6 + : "ẩ" U1ea9 + : "Ẩ" U1ea8 + : "ẫ" U1eab + : "Ẫ" U1eaa + : "ế" U1ebf + : "Ế" U1ebe + : "ệ" U1ec7 + : "Ệ" U1ec6 + : "á»" U1ec1 + : "Ề" U1ec0 + : "ể" U1ec3 + : "Ể" U1ec2 + : "á»…" U1ec5 + : "Ễ" U1ec4 + : "ố" U1ed1 + : "á»" U1ed0 + : "á»™" U1ed9 + : "Ộ" U1ed8 + : "ồ" U1ed3 + : "á»’" U1ed2 + : "ổ" U1ed5 + : "á»”" U1ed4 + : "á»—" U1ed7 + : "á»–" U1ed6 +XCOMM diaeresis + : "ä" adiaeresis + : "Ä" Adiaeresis + : "ë" ediaeresis + : "Ë" Ediaeresis + : "ï" idiaeresis + : "Ã" Idiaeresis + : "ö" odiaeresis + : "Ö" Odiaeresis + : "ü" udiaeresis + : "Ãœ" Udiaeresis + : "ẅ" U1e85 + : "Ẅ" U1e84 + : "ÿ" ydiaeresis + : "Ÿ" Ydiaeresis +XCOMM doubleacute + : "Å‘" odoubleacute + : "Å" Odoubleacute + : "ű" udoubleacute + : "Å°" Udoubleacute +XCOMM grave + : "à" agrave + : "À" Agrave + : "ằ" U1eb1 + : "Ằ" U1eb0 + : "ầ" U1ea7 + : "Ầ" U1ea6 + : "á»" U1ec1 + : "Ề" U1ec0 + : "è" egrave + : "È" Egrave + : "ì" igrave + : "ÃŒ" Igrave + : "ồ" U1ed3 + : "á»’" U1ed2 + : "á»" U1edd + : "Ờ" U1edc + : "ò" ograve + : "Ã’" Ograve + : "ừ" U1eeb + : "Ừ" U1eea + : "ù" ugrave + : "Ù" Ugrave + : "áº" U1e81 + : "Ẁ" U1e80 + : "ỳ" U1ef3 + : "Ỳ" U1ef2 +XCOMM hook (?-shaped accent) + : "ả" U1ea3 + : "Ả" U1ea2 + : "ẳ" U1eb3 + : "Ẳ" U1eb2 + : "ẩ" U1ea9 + : "Ẩ" U1ea8 + : "ể" U1ec3 + : "Ể" U1ec2 + : "ẻ" U1ebb + : "Ẻ" U1eba + : "ỉ" U1ec9 + : "Ỉ" U1ec8 + : "ổ" U1ed5 + : "á»”" U1ed4 + : "ở" U1edf + : "Ở" U1ede + : "á»" U1ecf + : "Ỏ" U1ece + : "á»­" U1eed + : "Ử" U1eec + : "ủ" U1ee7 + : "Ủ" U1ee6 + : "á»·" U1ef7 + : "Ỷ" U1ef6 +XCOMM horn + : "á»›" U01a1 + : "Ớ" U01a0 + : "ứ" U01b0 + : "Ứ" U01af + : "á»›" U1edb + : "Ớ" U1eda + : "ứ" U1ee9 + : "Ứ" U1ee8 + : "ợ" U1ee3 + : "Ợ" U1ee2 + : "á»±" U1ef1 + : "á»°" U1ef0 + : "á»" U1edd + : "Ờ" U1edc + : "ừ" U1eeb + : "Ừ" U1eea + : "ở" U1edf + : "Ở" U1ede + : "á»­" U1eed + : "Ử" U1eec + : "ỡ" U1ee1 + : "á» " U1ee0 + : "ữ" U1eef + : "á»®" U1eee +XCOMM macron + : "Ä" amacron + : "Ä€" Amacron + : "Ä“" emacron + : "Ä’" Emacron + : "Ä«" imacron + : "Ī" Imacron + : "Å" omacron + : "ÅŒ" Omacron + : "Å«" umacron + : "Ū" Umacron +XCOMM ogonek + : "Ä…" aogonek + : "Ä„" Aogonek + : "Ä™" eogonek + : "Ę" Eogonek + : "į" iogonek + : "Ä®" Iogonek + : "ų" uogonek + : "Ų" Uogonek +XCOMM tilde + : "ã" atilde + : "Ã" Atilde + : "ẵ" U1eb5 + : "Ẵ" U1eb4 + : "ẫ" U1eab + : "Ẫ" U1eaa + : "á»…" U1ec5 + : "Ễ" U1ec4 + : "ẽ" U1ebd + : "Ẽ" U1ebc + : "Ä©" itilde + : "Ĩ" Itilde + : "ñ" ntilde + : "Ñ" Ntilde + : "á»—" ocircumflextilde + : "á»–" Ocircumflextilde + : "ỡ" U1ee1 + : "á» " U1ee0 + : "õ" otilde + : "Õ" Otilde + : "ữ" U1eef + : "á»®" U1eee + : "Å©" utilde + : "Ũ" Utilde + : "ỹ" U1ef9 + : "Ỹ" U1ef8 + +XCOMM +XCOMM greek +XCOMM + : "Î" Greek_iotaaccentdieresis + : "ΰ" Greek_upsilonaccentdieresis + : "ά" Greek_alphaaccent + : "Ά" Greek_ALPHAaccent + : "έ" Greek_epsilonaccent + : "Έ" Greek_EPSILONaccent + : "ή" Greek_etaaccent + : "Ή" Greek_ETAaccent + : "ί" Greek_iotaaccent + : "Ί" Greek_IOTAaccent + : "ÏŽ" Greek_omegaaccent + : "Î" Greek_OMEGAaccent + : "ÏŒ" Greek_omicronaccent + : "ÎŒ" Greek_OMICRONaccent + : "Ï‚" Greek_finalsmallsigma + : "Ï" Greek_upsilonaccent + : "ÎŽ" Greek_UPSILONaccent + : "Î" Greek_iotaaccentdieresis + : "ΰ" Greek_upsilonaccentdieresis + : "ÏŠ" Greek_iotadieresis + : "Ϊ" Greek_IOTAdieresis + : "Ï‚" Greek_finalsmallsigma + : "Ï‹" Greek_upsilondieresis + : "Ϋ" Greek_UPSILONdieresis + +XCOMM +XCOMM cyrillic +XCOMM + : "Ѐ" U0450 + : "Ð" U0400 + : "Ñ" U045d + : "Ñ" U040d + + : "Ò¹" U04b9 + : "Ò¸" U04b8 + : "Ò·" U04b7 + : "Ò¶" U04b6 +XCOMM : "Ñ’" Serbian_dje +XCOMM : "Ђ" Serbian_DJE +XCOMM : "Ñ™" Cyrillic_lje +XCOMM : "Љ" Cyrillic_LJE + : "Ò£" U04a3 + : "Ò¢" U04a2 +XCOMM : "Ñš" Cyrillic_nje +XCOMM : "Њ" Cyrillic_NJE + : "Ñ“" Macedonia_gje + : "Ѓ" Macedonia_GJE +XCOMM : "Ò‘" Ukrainian_ghe_with_upturn +XCOMM : "Ò" Ukrainian_GHE_WITH_UPTURN + : "Ò“" U0493 + : "Ò’" U0492 +XCOMM : "Ò»" U04bb +XCOMM : "Òº" U04ba + : "Ò³" U04b3 + : "Ò²" U04b2 +XCOMM : "Ó™" U04d9 +XCOMM : "Ó˜" U04d8 + : "Ó£" U04e3 + : "Ó¢" U04e2 +XCOMM : "Ò" U049d +XCOMM : "Òœ" U049c + : "Ò›" U049b + : "Òš" U049a +XCOMM : "Ó©" U04e9 +XCOMM : "Ó¨" U04e8 + : "щ" Cyrillic_shcha + : "Щ" Cyrillic_SHCHA +XCOMM : "Ñ" Cyrillic_ya +XCOMM : "Я" Cyrillic_YA + : "Ñ‘" Cyrillic_io + : "Ð" Cyrillic_IO +XCOMM : "ÑŽ" Cyrillic_yu +XCOMM : "Ю" Cyrillic_YU +XCOMM : "Ò¯" U04af +XCOMM : "Ò®" U04ae +XCOMM : "Ò¯" U04af +XCOMM : "Ò®" U04ae +XCOMM : "Ò±" U04b1 +XCOMM : "Ò°" U04b0 + : "Ó¯" U04ef + : "Ó®" U04ee +XCOMM : "Ò±" Cyrillic_u_straight_bar +XCOMM : "Ò°" Cyrillic_U_straight_bat + : "Ò—" U0497 + : "Ò–" U0496 + +XCOMM dead keys producing accents and the like + : "Ë™" abovedot + : "" abovedot + : "°" degree + : "°" ring + : "'" apostrophe + : "´" acute + : "ˇ" caron + : "ˇ" caron + : "¸" cedilla + : "¸" cedilla + : "^" asciicircum + : "\"" quotedbl + : "¨" diaeresis + : "Ë" doubleacute + : "Ë" doubleacute + : "`" grave + : "`" grave + : "‾" macron + : "‾" macron + : "Ë›" ogonek + : "Ë›" ogonek + : "~" asciitilde + : "~" asciitilde + +XCOMM inuit-cree syllabics + : "á„" U1404 + : "á†" U1406 + : "á‹" U140b + : "á²" U1432 + : "á´" U1434 + : "á¹" U1439 + : "á‘" U144f + : "á‘‘" U1451 + : "á‘–" U1456 + : "á‘®" U146e + : "á‘°" U1470 + : "ᑳ" U1473 + : "á’Œ" U148c + : "á’Ž" U148e + : "á’‘" U1491 + : "á’¦" U14a6 + : "á’¨" U14a8 + : "á’«" U14ab + : "ᓃ" U14c3 + : "á“…" U14c5 + : "ᓈ" U14c8 + : "á“–" U14d6 + : "ᓘ" U14d8 + : "á“›" U14db + : "á“°" U14f0 + : "ᓲ" U14f2 + : "ᓵ" U14f5 + : "ᔩ" U1529 + : "ᔫ" U152b + : "á”®" U152e + : "ᕇ" U1547 + : "ᕉ" U1549 + : "á•Œ" U154c + : "á•–" U1556 + : "ᕘ" U1558 + : "á•š" U155a + : "ᕶ" U1576 + : "ᕸ" U1578 + : "ᕺ" U157a + : "á–€" U1580 + : "á–‚" U1582 + : "á–„" U1584 + : "á–" U1590 + : "á–’" U1592 + : "á–”" U1594 + : "á–¡" U15a1 + : "á–£" U15a3 + : "á–¥" U15a5 + : "ᙲ" U1672 + : "á™´" U1674 + : "ᙶ" U1676 + +XCOMM +XCOMM latin alphabet & misc +XCOMM + <0> : "§" section + <0> : "§" section + <0> : "¤" currency + <0> : "¤" currency + <1> <2> : "½" onehalf + <1> <4> : "¼" onequarter + <1> : "¹" onesuperior + <1> : "¹" onesuperior + <2> : "²" twosuperior + <2> : "²" twosuperior + <3> <4> : "¾" threequarters + <3> : "³" threesuperior + <3> : "³" threesuperior + <0> : "Ã¥" aring + <0> : "Ã…" Aring + : "Ã¥" aring + : "Ã…" Aring + : "@" at + : "@" at + : "á" aacute + : "Ã" Aacute + : "â" acircumflex + : "Â" Acircumflex + : "ã" atilde + : "Ã" Atilde + : "Ã¥" aring + : "Ã…" Aring + : "ä" adiaeresis + : "Ä" Adiaeresis + : "æ" ae + : "Æ" AE + : "à" agrave + : "À" Agrave + : "â" acircumflex + : "Â" Acircumflex + : "Ä" amacron + : "Ä€" Amacron + : "Ã¥" aring + : "Ã…" Aring + : "â€" U201d + : "’" U2019 + : "‘" U2018 + : "ä" adiaeresis + : "Ä" Adiaeresis + <0> : "°" degree + <1> : "¹" onesuperior + <2> : "²" twosuperior + <3> : "³" threesuperior + : "¦" brokenbar + : "‾" macron + : "·" periodcentered + : "|" bar + : "‾" macron + : "Ä…" aogonek + : "Ä„" Aogonek +< : "¦" brokenbar + : "¢" cent + : "¢" cent + : "ḃ" U1e03 + : "Ḃ" U1e02 + : "¦" brokenbar + : "¦" brokenbar + : "ć" cacute + : "Ć" Cacute + : "ĉ" ccircumflex + : "Ĉ" Ccircumflex + : "¢" cent + : "¢" cent + : "ç" ccedilla + : "Ç" Ccedilla + : "€" EuroSign + : "ĉ" ccircumflex + : "Ĉ" Ccircumflex + : "Ä" ccaron + : "ÄŒ" Ccaron + : "©" copyright + : "©" copyright + : "©" copyright + : "©" copyright + : "÷" division + : "„" U201e + : "‚" U201a + : "¬" notsign + : "„" U201e + : "Ä‹" cabovedot + : "ÄŠ" Cabovedot + : "¢" cent + : "¢" cent + : "ð" eth + : "Ã" ETH + : "Ä" dcaron + : "ÄŽ" Dcaron + : "Ä‘" dstroke + : "Ä" Dstroke + : "ḋ" U1e0b + : "Ḋ" U1e0a + : "é" eacute + : "É" Eacute + : "ê" ecircumflex + : "Ê" Ecircumflex + : "É™" U0259 + : "Æ" U018f + : "€" EuroSign + : "€" EuroSign + : "è" egrave + : "È" Egrave + : "ê" ecircumflex + : "Ê" Ecircumflex + : "Ä›" ecaron + : "Äš" Ecaron + : "Ä“" emacron + : "Ä’" Emacron + : "Ä—" eabovedot + : "Ä–" Eabovedot + : "€" EuroSign + : "€" EuroSign + : "£" sterling + : "£" sterling + : "Â¥" yen + : "Â¥" yen + : "ë" ediaeresis + : "Ë" Ediaeresis + : "Ä™" eogonek + : "Ę" Eogonek + : "¦" brokenbar + : "¡" exclamdown +

: "¶" paragraph +

: "¶" paragraph + : "§" section + : "§" section + : "ḟ" U1e1f + : "Ḟ" U1e1e + : "Ä" gcircumflex + : "Äœ" Gcircumflex + : "Ä£" gcedilla + : "Ä¢" Gcedilla + : "Ä" gcircumflex + : "Äœ" Gcircumflex + : "ǧ" U01e7 + : "Ǧ" U01e6 + : "ÄŸ" gbreve + : "Äž" Gbreve + : "Ä¡" U0121 + : "Ä " U0120 + : "“" U201c + : "‚" U201a + : "»" guillemotright + : "„" U201e + : "Ä¥" hcircumflex + : "Ĥ" Hcircumflex + : "Ä¥" hcircumflex + : "Ĥ" Hcircumflex + : "ħ" hstroke + : "Ħ" Hstroke + : "ħ" hstroke + : "Ħ" Hstroke + : "í" iacute + : "Ã" Iacute + : "î" icircumflex + : "ÃŽ" Icircumflex + : "Ä©" itilde + : "Ĩ" Itilde + : "ì" igrave + : "ÃŒ" Igrave + : "î" icircumflex + : "ÃŽ" Icircumflex + : "Ä«" imacron + : "Ī" Imacron + : "Ä°" Iabovedot + : "ı" idotless + : "ï" idiaeresis + : "Ã" Idiaeresis + : "į" iogonek + : "Ä®" Iogonek + : "ĵ" jcircumflex + : "Ä´" Jcircumflex + : "ĵ" jcircumflex + : "Ä´" Jcircumflex + : "Ä·" kcedilla + : "Ķ" Kcedilla + : "ĸ" kra + : "ĺ" lacute + : "Ĺ" Lacute + : "ļ" lcedilla + : "Ä»" Lcedilla + : "£" sterling + : "£" sterling + : "‛" U201b + : "«" guillemotleft + : "‟" U201f + : "\\" backslash + : "ľ" lcaron + : "Ľ" Lcaron + : "£" sterling + : "£" sterling + : "Å‚" lstroke + : "Å" Lstroke + : "|" bar + : "|" bar + : "÷" division + : "¬" notsign + : "£" sterling + : "£" sterling + : "­" hyphen + : "{" braceleft + : "}" braceright + : "∓" U2213 + : "Â¥" yen + : "Â¥" yen + : "á¹" U1e41 + : "á¹€" U1e40 + : "µ" mu + : "µ" mu + : "Å„" nacute + : "Ń" Nacute + : "ñ" ntilde + : "Ñ" Ntilde + : "ņ" ncedilla + : "Å…" Ncedilla + : "Å‹" eng + : "ÅŠ" ENG + : "ň" ncaron + : "Ň" Ncaron + : "ó" oacute + : "Ó" Oacute + : "ô" ocircumflex + : "Ô" Ocircumflex + : "õ" otilde + : "Õ" Otilde + : "©" copyright + : "©" copyright + : "©" copyright + : "©" copyright + : "Å“" oe + : "Å’" OE + : "ò" ograve + : "Ã’" Ograve + : "ô" ocircumflex + : "Ô" Ocircumflex + : "Ç’" ocaron + : "Ç‘" Ocaron + : "Å" omacron + : "ÅŒ" Omacron + : "Å‘" odoubleacute + : "Å" Odoubleacute + : "ö" odiaeresis + : "Ö" Odiaeresis + : "®" registered + : "ø" oslash + : "Ø" Ooblique + : "§" section + : "§" section + : "á»" U1ecd + : "Ọ" U1ecc + : "¤" currency + : "¤" currency + : "¤" currency + : "¤" currency + : "©" copyright + : "©" copyright + : "{" braceleft + : "[" bracketleft + : "®" registered + : "}" braceright + : "]" bracketright + : "›" U203a + : "‹" U2039 + : "·" periodcentered +

: "¶" paragraph +

: "¶" paragraph + : "±" plusminus + : "#" numbersign +

: "á¹—" U1e57 +

: "á¹–" U1e56 + : "¿" questiondown + : "ã€" U301d + : "â€" U201d + : "“" U201c +XCOMM : "" diaeresis + : "〞" U301e + : "Å•" racute + : "Å”" Racute + : "Å—" rcedilla + : "Å–" Rcedilla + : "Å™" rcaron + : "Ř" Rcaron + : "®" registered + <0> : "§" section + <0> : "§" section + : "Å›" sacute + : "Åš" Sacute + : "Å" scircumflex + : "Åœ" Scircumflex +XCOMM comma is used for cedilla, underscore for comma below + : "ÅŸ" scedilla + : "Åž" Scedilla + : "È™" U0219 + : "Ș" U0218 + : "§" section + : "§" section + : "Å¡" scaron + : "Å " Scaron + : "Å" scircumflex + : "Åœ" Scircumflex + : "|" bar + : "¢" cent + : "¢" cent + : "\\" backslash + : "Å‚" lstroke + : "Å" Lstroke + : "ø" oslash + : "Ø" Ooblique + : "〟" U301f + : "\\" backslash + : "§" section + : "§" section + : " " nobreakspace + : "ṡ" U1e61 + : "á¹ " U1e60 + : "ß" ssharp +XCOMM comma is used for cedilla, underscore for comma below + : "Å£" tcedilla + : "Å¢" Tcedilla + : "È›" U021b + : "Èš" U021a + : "þ" thorn + : "Þ" THORN + : "Å¥" tcaron + : "Ť" Tcaron + : "â„¢" trademark + : "â„¢" trademark + : "ŧ" U0167 + : "Ŧ" U0166 + : "ṫ" U1e6b + : "Ṫ" U1e6a + : "ŧ" U0167 + : "Ŧ" U0166 + : "ú" uacute + : "Ú" Uacute + : "û" ucircumflex + : "Û" Ucircumflex + : "Å©" utilde + : "Ũ" Utilde + : "ů" uring + : "Å®" Uring + <0> : "ů" uring + <0> : "Å®" Uring + : "ù" ugrave + : "Ù" Ugrave + : "û" ucircumflex + : "Û" Ucircumflex + : "Ç”" U01d4 + : "Ç“" U01d3 + : "Å«" umacron + : "Ū" Umacron + : "ª" ordfeminine + : "ª" ordfeminine + : "º" masculine + : "º" masculine + : "Å­" ubreve + : "Ŭ" Ubreve + : "ü" udiaeresis + : "Ãœ" Udiaeresis + : "ű" udoubleacute + : "Å°" Udoubleacute + : "ų" uogonek + : "Ų" Uogonek + : "ŵ" U0175 + : "Å´" U0174 + : "ẅ" U01e85 + : "Ẅ" U01e84 + : "áº" U1e81 + : "Ẁ" U1e80 + : "ŵ" U0175 + : "Å´" U0174 + : "ẅ" U01e85 + : "Ẅ" U01e84 + <0> : "¤" currency + <0> : "¤" currency + : "¤" currency + : "¤" currency + : "¤" currency + : "¤" currency + : "×" multiply + : "ý" yacute + : "Ã" Yacute + : "Å·" U0177 + : "Ŷ" U0176 + : "ÿ" ydiaeresis + : "Ÿ" Ydiaeresis + : "Â¥" yen + : "Â¥" yen + : "ỳ" ygrave + : "Ỳ" Ygrave + : "Å·" U0177 + : "Ŷ" U0176 + : "Â¥" yen + : "Â¥" yen + : "ÿ" ydiaeresis + : "Ÿ" Ydiaeresis + : "ẑ" U1e91 + : "áº" U1e90 + : "ź" zacute + : "Ź" Zacute + : "ẑ" U1e91 + : "áº" U1e90 + : "ž" zcaron + : "Ž" Zcaron + : "ż" zabovedot + : "Å»" Zabovedot + +XCOMM +XCOMM greek +XCOMM + : "ά" Greek_alphaaccent + : "Ά" Greek_ALPHAaccent + : "έ" Greek_epsilonaccent + : "Έ" Greek_EPSILONaccent + : "ή" Greek_etaaccent + : "Ή" Greek_ETAaccent + : "ί" Greek_iotaaccent + : "Ί" Greek_IOTAaccent + : "Î" Greek_iotaaccentdieresis + : "ÏŠ" Greek_iotadieresis + : "Ϊ" Greek_IOTAdieresis + : "ÏŽ" Greek_omegaaccent + : "Î" Greek_OMEGAaccent + : "ÏŒ" Greek_omicronaccent + : "ÎŒ" Greek_OMICRONaccent + : "Ï" Greek_upsilonaccent + : "ÎŽ" Greek_UPSILONaccent + : "ΰ" Greek_upsilonaccentdieresis + : "Ï‹" Greek_upsilondieresis + : "Ϋ" Greek_UPSILONdieresis + +XCOMM +XCOMM cyrillic +XCOMM + : "Ò¹" U04b9 + : "Ò¸" U04b8 + : "Ò·" U04b7 + : "Ò¶" U04b6 + : "Ò¹" 04b9 + : "Ò¸" U04b8 + : "Ñ’" Serbian_dje + : "Ђ" Serbian_DJE + : "Ñ™" Cyrillic_lje + : "Љ" Cyrillic_LJE + : "Ò£" U04a3 + : "Ò¢" U04a2 + : "Ñš" Cyrillic_nje + : "Њ" Cyrillic_NJE + : "Ñ“" Macedonia_gje + : "Ѓ" Macedonia_GJE + : "Ñ“" Macedonia_gje + : "Ѓ" Macedonia_GJE + : "Ò‘" Ukrainian_ghe_with_upturn + : "Ò" Ukrainian_GHE_WITH_UPTURN + : "Ò“" U0493 + : "Ò’" U0492 + : "Ò»" U04bb + : "Òº" U04ba + : "Ò³" U04b3 + : "Ò²" U04b2 + : "Ñ‘" Cyrillic_io + : "Ð" Cyrillic_IO + : "Ó™" U04d9 + : "Ó˜" U04d8 + : "Ð" U0450 + : "Ѐ" U0400 + : "Ñ" U045d + : "Ñ" U040d + : "Ó£" U04e3 + : "Ó¢" U04e2 + : "Ñ" Cyrillic_ya + : "Я" Cyrillic_YA + : "Ñ‘" Cyrillic_io + : "Ð" Cyrillic_IO + : "ÑŽ" Cyrillic_yu + : "Ю" Cyrillic_YU + : "Ò" U049d + : "Òœ" U049c + : "Ò›" U049b + : "Òš" U049a + : "Ò" U049d + : "Òœ" U049c + : "Ó©" U04e9 + : "Ó¨" U04e8 + : "щ" Cyrillic_shcha + : "Щ" Cyrillic_SHCHA + : "Ñ" Cyrillic_ya + : "Я" Cyrillic_YA + : "Ñ‘" Cyrillic_io + : "Ð" Cyrillic_IO + : "ÑŽ" Cyrillic_yu + : "Ю" Cyrillic_YU + : "ц" Cyrillic_tse + : "Ц" Cyrillic_TSE + : "Ò¯" U04af + : "Ò®" U04ae + : "Ò¯" U04af + : "Ò®" U04ae + : "Ò±" U04b1 + : "Ò°" U04b0 + : "Ó¯" U04ef + : "Ó®" U04ee + : "Ò±" U04b1 + : "Ò°" U04b0 + : "Ò—" U0497 + : "Ò–" U0496 + : "Ò±" U04b1 + : "Ò°" U04b0 + Index: xc/nls/Compose/iso8859-1 diff -u xc/nls/Compose/iso8859-1:1.7 xc/nls/Compose/iso8859-1:1.8 --- xc/nls/Compose/iso8859-1:1.7 Thu Apr 26 17:09:40 2001 +++ xc/nls/Compose/iso8859-1 Mon Dec 24 12:15:09 2001 @@ -3,7 +3,7 @@ XCOMM ISO 8859-1 (Latin1) Compose Sequence XCOMM XCOMM -XCOMM $XFree86: xc/nls/Compose/iso8859-1,v 1.7 2001/04/26 21:09:40 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/iso8859-1,v 1.8 2001/12/24 17:15:09 dawes Exp $ XCOMM XCOMM Sequence Definition XCOMM @@ -221,8 +221,8 @@ : "\345" aring : "\345" aring : "\346" ae - : "\307" Ccedilla - : "\347" ccedilla + : "\307" Ccedilla + : "\347" ccedilla : "\307" Ccedilla : "\307" Ccedilla : "\347" ccedilla @@ -382,7 +382,7 @@ XCOMM XCOMM dead key accent keysyms XCOMM Special Character - : "|" bar + : "|" bar : "`" grave : "'" apostrophe : "\250" diaeresis @@ -462,15 +462,15 @@ : "\375" yacute : "\377" ydiaeresis XCOMM Useful for portuguese language - : "\307" Ccedilla - : "\347" ccedilla - : "'" apostrophe - : "`" grave + : "\307" Ccedilla + : "\347" ccedilla + : "'" apostrophe + : "`" grave XCOMM These are for us_intl, that does not has diaeresis, etc - : "\"" quotedbl - : "\"" quotedbl - : "~" asciitilde - : "^" asciicircum + : "\"" quotedbl + : "\"" quotedbl + : "~" asciitilde + : "^" asciicircum XCOMM #ifdef USE_CTRL_SHIFT_T_SEQS XCOMM Ctrl Means Index: xc/nls/Compose/iso8859-15 diff -u xc/nls/Compose/iso8859-15:1.4 xc/nls/Compose/iso8859-15:1.6 --- xc/nls/Compose/iso8859-15:1.4 Thu Apr 26 17:09:40 2001 +++ xc/nls/Compose/iso8859-15 Mon Dec 24 12:15:09 2001 @@ -2,7 +2,7 @@ XCOMM XCOMM ISO 8859-15 (Latin1) Compose Sequence XCOMM -XCOMM $XFree86: xc/nls/Compose/iso8859-15,v 1.4 2001/04/26 21:09:40 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/iso8859-15,v 1.6 2001/12/24 17:15:09 dawes Exp $ XCOMM XCOMM Sequence Definition XCOMM @@ -19,8 +19,8 @@ : "]" bracketright : "^" asciicircum : "^" asciicircum - : "^" asciicirum - : "^" asciicirum + : "^" asciicircum + : "^" asciicircum : "`" grave : "`" grave : "{" braceleft @@ -377,7 +377,7 @@ XCOMM XCOMM dead key accent keysyms XCOMM Special Character - : "|" bar + : "|" bar : "`" grave : "'" apostrophe : "\250" diaeresis @@ -464,4 +464,5 @@ : "\347" ccedilla : "'" apostrophe : "`" grave + : "'" apostrophe XCOMM End of Sequence Definition Index: xc/nls/Compose/iso8859-2 diff -u xc/nls/Compose/iso8859-2:1.6 xc/nls/Compose/iso8859-2:1.7 --- xc/nls/Compose/iso8859-2:1.6 Fri May 18 19:35:29 2001 +++ xc/nls/Compose/iso8859-2 Mon Aug 13 13:46:02 2001 @@ -2,7 +2,7 @@ XCOMM XCOMM ISO 8859-2 (Latin2) Compose Sequence XCOMM -XCOMM $XFree86: xc/nls/Compose/iso8859-2,v 1.6 2001/05/18 23:35:29 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/iso8859-2,v 1.7 2001/08/13 17:46:02 dawes Exp $ XCOMM XCOMM Sequence Definition XCOMM @@ -334,10 +334,10 @@ : "\362" ncaron : "\362" ncaron : "\362" ncaron - : "\363" nacute - : "\363" nacute - : "\363" nacute - : "\363" nacute + : "\363" oacute + : "\363" oacute + : "\363" oacute + : "\363" oacute : "\364" ocircumflex : "\364" ocircumflex : "\364" ocircumflex @@ -389,7 +389,7 @@ : "\355" iacute : "\345" lacute : "\361" nacute - : "\363" nacute + : "\363" oacute : "\340" racute : "\266" sacute : "\372" uacute Index: xc/nls/Compose/iso8859-7 diff -u xc/nls/Compose/iso8859-7:1.4 xc/nls/Compose/iso8859-7:1.5 --- xc/nls/Compose/iso8859-7:1.4 Thu Apr 26 17:09:40 2001 +++ xc/nls/Compose/iso8859-7 Mon Dec 24 12:15:10 2001 @@ -3,7 +3,7 @@ XCOMM ISO 8859-7 (Greek) Compose Sequence XCOMM XCOMM -XCOMM $XFree86: xc/nls/Compose/iso8859-7,v 1.4 2001/04/26 21:09:40 dawes Exp $ +XCOMM $XFree86: xc/nls/Compose/iso8859-7,v 1.5 2001/12/24 17:15:10 dawes Exp $ XCOMM XCOMM Sequence Definition XCOMM @@ -107,15 +107,16 @@ : "\254" notsign : "\254" notsign : "\255" hyphen - : "\257" macron - : "\257" macron - : "\257" macron - : "\257" macron - : "\257" macron XCOMM should be Greek tonos but not defined in X11 : "\264" acute XCOMM should be Greek dialytika but not defined in X11 : "\250" diaeresis +XCOMM special characters that don't exist in Latin-1 + : "\241" leftsinglequotemark + : "\241" leftsinglequotemark + : "\242" rightsinglequotemark + : "\242" rightsinglequotemark + : "\257" Greek_horizbar XCOMM Accented Alphabet : "\266" Greek_ALPHAaccent @@ -158,11 +159,18 @@ : "\373" Greek_upsilondieresis : "\373" Greek_upsilondieresis + : "\300" Greek_iotaaccentdieresis + : "\300" Greek_iotaaccentdieresis + : "\340" Greek_upsilonaccentdieresis + : "\340" Greek_upsilonaccentdieresis + : "\265" Greek_accentdieresis + : "\265" Greek_accentdieresis + XCOMM XCOMM XCOMM dead key accent keysyms XCOMM Special Character - : "|" bar + : "|" bar : "`" grave : "'" apostrophe : "\250" diaeresis @@ -174,14 +182,11 @@ : "\260" degree : "\260" degree <0> : "\260" degree - <1> : "\271" onesuperior <2> : "\262" twosuperior <3> : "\263" threesuperior : "\267" periodcentered : "\246" brokenbar : "\254" notsign - : "\257" macron - : "\257" macron : "\264" acute : "\250" diaeresis Index: xc/nls/Compose/mk_MK.UTF-8 diff -u xc/nls/Compose/mk_MK.UTF-8:1.2 xc/nls/Compose/mk_MK.UTF-8:removed --- xc/nls/Compose/mk_MK.UTF-8:1.2 Thu Apr 26 17:09:40 2001 +++ xc/nls/Compose/mk_MK.UTF-8 Fri Jan 18 15:23:52 2002 @@ -1,10 +0,0 @@ -XCOMM $XFree86: xc/nls/Compose/mk_MK.UTF-8,v 1.2 2001/04/26 21:09:40 dawes Exp $ - : 'Ñ' 0x01000450 # Cyrillic_ie_grave - : 'Ѐ' 0x01000400 # Cyrillic_IE_grave - : 'Ñ' 0x0100045D # Cyrillic_i_grave - : 'Ð' 0x0100040D # Cyrillic_I_grave - : 'Ñ' 0x01000450 # Cyrillic_ie_grave - : 'Ѐ' 0x01000400 # Cyrillic_IE_grave - : 'Ñ' 0x0100045D # Cyrillic_i_grave - : 'Ð' 0x0100040D # Cyrillic_I_grave - Index: xc/nls/Compose/zh diff -u xc/nls/Compose/zh:1.2 xc/nls/Compose/zh:removed --- xc/nls/Compose/zh:1.2 Thu Apr 26 17:09:40 2001 +++ xc/nls/Compose/zh Fri Jan 18 15:23:52 2002 @@ -1,15 +0,0 @@ -XCOMM -XCOMM zh Compose Sequence -XCOMM -XCOMM Sequence Definition -XCOMM -XCOMM $XFree86: xc/nls/Compose/zh,v 1.2 2001/04/26 21:09:40 dawes Exp $ -XCOMM -XCOMM This file currently has no entries. It appears that a compose file (even -XCOMM just an empty one) is required for the appropriate keysyms to work for -XCOMM this encoding. -XCOMM -XCOMM Means -XCOMM Special Character - -XCOMM End of Sequence Definition Index: xc/nls/Compose/zh_CN diff -u /dev/null xc/nls/Compose/zh_CN:1.1 --- /dev/null Fri Jan 18 15:23:52 2002 +++ xc/nls/Compose/zh_CN Thu Nov 1 18:35:28 2001 @@ -0,0 +1,15 @@ +XCOMM +XCOMM zh Compose Sequence +XCOMM +XCOMM Sequence Definition +XCOMM +XCOMM $XFree86: xc/nls/Compose/zh_CN,v 1.1 2001/11/01 23:35:28 dawes Exp $ +XCOMM +XCOMM This file currently has no entries. It appears that a compose file (even +XCOMM just an empty one) is required for the appropriate keysyms to work for +XCOMM this encoding. +XCOMM +XCOMM Means +XCOMM Special Character + +XCOMM End of Sequence Definition Index: xc/nls/XI18N_OBJS/C diff -u /dev/null xc/nls/XI18N_OBJS/C:1.1 --- /dev/null Fri Jan 18 15:23:52 2002 +++ xc/nls/XI18N_OBJS/C Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for C locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/Imakefile diff -u /dev/null xc/nls/XI18N_OBJS/Imakefile:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/Imakefile Thu Nov 15 19:52:31 2001 @@ -0,0 +1,66 @@ +XCOMM $Xorg: Imakefile,v 1.1 2000/12/12 13:00:42 coskrey Exp $ + +#ifndef Win32Architecture +# define XI18NTarget(name) @@\ +all:: name @@\ + MakeDir($(BUILDLIBDIR)/locale/name) @@\ + RemoveFile($(BUILDLIBDIR)/locale/name/XI18N_OBJS) @@\ + cd $(BUILDLIBDIR)/locale/name && $(LN) $(BUILDLIBTOP)/../../$(CURRENT_DIR)/name XI18N_OBJS @@\ +InstallNamedNonExec(name,XI18N_OBJS,$(XLOCALEDIR)/name) +#else +# define XI18NTarget(name) @@\ +all:: name @@\ + MakeDir(Concat($(BUILDLIBDIR:/=\)\locale\,name)) @@\ + RemoveFile(Concat($(BUILDLIBDIR:/=\)\locale\,name\XI18N_OBJS)) @@\ + cd Concat($(BUILDLIBDIR:/=\)\locale\,name) && $(LN) Concat($(BUILDLIBTOP:/=\)\..\..\$(CURRENT_DIR:/=\)\,name) XI18N_OBJS @@\ +InstallNamedNonExec(name,XI18N_OBJS,$(XLOCALEDIR)/name) +#endif + +XI18NTarget(C) +XI18NTarget(armscii-8) +XI18NTarget(georgian-academy) +XI18NTarget(georgian-ps) +XI18NTarget(ibm-cp1133) +XI18NTarget(iscii-dev) +XI18NTarget(isiri-3342) +XI18NTarget(iso8859-1) +XI18NTarget(iso8859-2) +XI18NTarget(iso8859-3) +XI18NTarget(iso8859-4) +XI18NTarget(iso8859-5) +XI18NTarget(iso8859-6) +XI18NTarget(iso8859-7) +XI18NTarget(iso8859-8) +XI18NTarget(iso8859-9) +XI18NTarget(iso8859-10) +XI18NTarget(iso8859-13) +XI18NTarget(iso8859-14) +XI18NTarget(iso8859-15) +XI18NTarget(iso8859-9e) +XI18NTarget(ja) +XI18NTarget(ja.JIS) +XI18NTarget(ja.SJIS) +XI18NTarget(ko) +XI18NTarget(koi8-r) +XI18NTarget(koi8-u) +XI18NTarget(koi8-c) +XI18NTarget(microsoft-cp1251) +XI18NTarget(microsoft-cp1255) +XI18NTarget(microsoft-cp1256) +XI18NTarget(mulelao-1) +XI18NTarget(nokhchi-1) +XI18NTarget(tatar-cyr) +XI18NTarget(tscii-0) +XI18NTarget(vi_VN.tcvn) +XI18NTarget(vi_VN.viscii) +XI18NTarget(zh) +XI18NTarget(zh_CN.gbk) +XI18NTarget(zh_HK.big5hkscs) +XI18NTarget(zh_TW) +XI18NTarget(zh_TW.big5) +XI18NTarget(th_TH) +XI18NTarget(en_US.UTF-8) +#ifdef UXPArchitecture +XI18NTarget(ja.U90) +XI18NTarget(ja.S90) +#endif /* UXPArchitecture */ Index: xc/nls/XI18N_OBJS/armscii-8 diff -u /dev/null xc/nls/XI18N_OBJS/armscii-8:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/armscii-8 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for armscii-8 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/en_US.UTF-8 diff -u /dev/null xc/nls/XI18N_OBJS/en_US.UTF-8:1.2 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/en_US.UTF-8 Wed Dec 19 13:55:11 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for en_US.UTF-8 locale +# +XLC common/xlcUTF8Load _XlcUtf8Loader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/georgian-academy diff -u /dev/null xc/nls/XI18N_OBJS/georgian-academy:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/georgian-academy Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for georgian-academy locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/georgian-ps diff -u /dev/null xc/nls/XI18N_OBJS/georgian-ps:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/georgian-ps Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for georgian-ps locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ibm-cp1133 diff -u /dev/null xc/nls/XI18N_OBJS/ibm-cp1133:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/ibm-cp1133 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ibm-cp1133 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iscii-dev diff -u /dev/null xc/nls/XI18N_OBJS/iscii-dev:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iscii-dev Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iscii-dev locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/isiri-3342 diff -u /dev/null xc/nls/XI18N_OBJS/isiri-3342:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/isiri-3342 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for isiri-3342 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-1 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-1:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-1 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-1 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-10 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-10:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-10 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-10 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-13 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-13:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-13 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-13 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-14 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-14:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-14 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-14 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-15 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-15:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-15 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-15 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-2 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-2:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-2 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-2 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-3 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-3:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-3 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-3 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-4 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-4:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-4 Thu Nov 15 19:52:31 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-4 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-5 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-5:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-5 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-5 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-6 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-6:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-6 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-6 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-7 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-7:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-7 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-7 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-8 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-8:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-8 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-8 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-9 diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-9:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-9 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-9 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/iso8859-9e diff -u /dev/null xc/nls/XI18N_OBJS/iso8859-9e:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/iso8859-9e Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for iso8859-9e locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ja diff -u /dev/null xc/nls/XI18N_OBJS/ja:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/ja Thu Nov 15 19:52:32 2001 @@ -0,0 +1,8 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ja locale +# +XLC common/xlocale _XlcEucLoader # XLC_open +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ja.JIS diff -u /dev/null xc/nls/XI18N_OBJS/ja.JIS:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/ja.JIS Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ja.JIS locale +# +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ja.S90 diff -u /dev/null xc/nls/XI18N_OBJS/ja.S90:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/ja.S90 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ja.S90 locale +# +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ja.SJIS diff -u /dev/null xc/nls/XI18N_OBJS/ja.SJIS:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/ja.SJIS Thu Nov 15 19:52:32 2001 @@ -0,0 +1,8 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ja.SJIS locale +# +XLC common/xlocale _XlcSjisLoader # XLC_open +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ja.U90 diff -u /dev/null xc/nls/XI18N_OBJS/ja.U90:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/ja.U90 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ja.U90 locale +# +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/ko diff -u /dev/null xc/nls/XI18N_OBJS/ko:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/ko Thu Nov 15 19:52:32 2001 @@ -0,0 +1,8 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ko locale +# +XLC common/xlocale _XlcEucLoader # XLC_open +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/koi8-c diff -u /dev/null xc/nls/XI18N_OBJS/koi8-c:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/koi8-c Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for koi8-c locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/koi8-r diff -u /dev/null xc/nls/XI18N_OBJS/koi8-r:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/koi8-r Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for koi8-r locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/koi8-u diff -u /dev/null xc/nls/XI18N_OBJS/koi8-u:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/koi8-u Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for koi8-u locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/microsoft-cp1251 diff -u /dev/null xc/nls/XI18N_OBJS/microsoft-cp1251:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/microsoft-cp1251 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for microsoft-cp1251 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/microsoft-cp1255 diff -u /dev/null xc/nls/XI18N_OBJS/microsoft-cp1255:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/microsoft-cp1255 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for microsoft-cp1255 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/microsoft-cp1256 diff -u /dev/null xc/nls/XI18N_OBJS/microsoft-cp1256:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/microsoft-cp1256 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for microsoft-cp1256 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/mulelao-1 diff -u /dev/null xc/nls/XI18N_OBJS/mulelao-1:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/mulelao-1 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for mulelao-1 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/nokhchi-1 diff -u /dev/null xc/nls/XI18N_OBJS/nokhchi-1:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/nokhchi-1 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for nokhchi-1 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/tatar-cyr diff -u /dev/null xc/nls/XI18N_OBJS/tatar-cyr:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/tatar-cyr Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for tatar-cyr locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/th_TH diff -u /dev/null xc/nls/XI18N_OBJS/th_TH:1.1 --- /dev/null Fri Jan 18 15:23:53 2002 +++ xc/nls/XI18N_OBJS/th_TH Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for th_TH locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/tscii-0 diff -u /dev/null xc/nls/XI18N_OBJS/tscii-0:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/tscii-0 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for tscii-0 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/vi_VN.tcvn diff -u /dev/null xc/nls/XI18N_OBJS/vi_VN.tcvn:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/vi_VN.tcvn Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for vi_VN.tcvn locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/vi_VN.viscii diff -u /dev/null xc/nls/XI18N_OBJS/vi_VN.viscii:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/vi_VN.viscii Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for vi_VN.viscii locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh diff -u /dev/null xc/nls/XI18N_OBJS/zh:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/zh Thu Nov 15 19:52:32 2001 @@ -0,0 +1,8 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh locale +# +XLC common/xlocale _XlcEucLoader # XLC_open +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh_CN.gbk diff -u /dev/null xc/nls/XI18N_OBJS/zh_CN.gbk:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/zh_CN.gbk Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh_CN.gbk locale +# +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh_HK.big5hkscs diff -u /dev/null xc/nls/XI18N_OBJS/zh_HK.big5hkscs:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/zh_HK.big5hkscs Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh_HK.big5hkscs locale +# +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh_TW diff -u /dev/null xc/nls/XI18N_OBJS/zh_TW:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/zh_TW Thu Nov 15 19:52:32 2001 @@ -0,0 +1,8 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh_TW locale +# +XLC common/xlocale _XlcEucLoader # XLC_open +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XI18N_OBJS/zh_TW.big5 diff -u /dev/null xc/nls/XI18N_OBJS/zh_TW.big5:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XI18N_OBJS/zh_TW.big5 Thu Nov 15 19:52:32 2001 @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for zh_TW.big5 locale +# +XLC common/xlibi18n _XlcGenericLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open Index: xc/nls/XLC_LOCALE/Imakefile diff -u xc/nls/XLC_LOCALE/Imakefile:1.19 xc/nls/XLC_LOCALE/Imakefile:1.20 --- xc/nls/XLC_LOCALE/Imakefile:1.19 Tue Mar 6 13:54:45 2001 +++ xc/nls/XLC_LOCALE/Imakefile Thu Nov 1 18:35:28 2001 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/nls/XLC_LOCALE/Imakefile,v 1.19 2001/03/06 18:54:45 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/Imakefile,v 1.20 2001/11/01 23:35:28 dawes Exp $ WCHAR32 = HasWChar32 @@ -84,8 +84,9 @@ LTarget(tscii-0) LTarget(vi_VN.tcvn) LTarget(vi_VN.viscii) -LTarget(zh) +LTarget(zh_CN) LTarget(zh_CN.gbk) +LTarget(zh_HK.big5) LTarget(zh_HK.big5hkscs) LTarget(zh_TW) LTarget(zh_TW.big5) Index: xc/nls/XLC_LOCALE/zh diff -u xc/nls/XLC_LOCALE/zh:1.2 xc/nls/XLC_LOCALE/zh:removed --- xc/nls/XLC_LOCALE/zh:1.2 Mon Apr 23 17:41:43 2001 +++ xc/nls/XLC_LOCALE/zh Fri Jan 18 15:23:54 2002 @@ -1,64 +0,0 @@ -XCOMM $Xorg: zh,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ -XCOMM XLocale Database Sample for zh. -XCOMM -XCOMM $XFree86: xc/nls/XLC_LOCALE/zh,v 1.2 2001/04/23 21:41:43 dawes Exp $ - -XCOMM -XCOMM XLC_FONTSET category -XCOMM -XLC_FONTSET -XCOMM fs0 class (7 bit ASCII) -fs0 { - charset { - name ISO8859-1:GL - } - font { - primary ISO8859-1:GL - vertical_rotate all - } -} -XCOMM fs1 class -fs1 { - charset { - name GB2312.1980-0:GL - } - font { - primary GB2312.1980-0:GL - substitute GB2312.1980-0:GLGR - } -} -END XLC_FONTSET - -XCOMM -XCOMM XLC_XLOCALE category -XCOMM -XLC_XLOCALE - -encoding_name zh.euc -mb_cur_max 2 -state_depend_encoding False -wc_encoding_mask \x30000000 -wc_shift_bits 7 - -#ifndef X_LOCALE -use_stdc_env True -force_convert_to_mb True -#endif - -XCOMM cs0 class -cs0 { - side GL:Default - length 1 - wc_encoding \x00000000 - ct_encoding ISO8859-1:GL -} - -XCOMM cs1 class -cs1 { - side GR:Default - length 2 - wc_encoding \x30000000 - ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR -} - -END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh_CN diff -u /dev/null xc/nls/XLC_LOCALE/zh_CN:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XLC_LOCALE/zh_CN Thu Nov 1 18:35:28 2001 @@ -0,0 +1,64 @@ +XCOMM $Xorg: zh,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ +XCOMM XLocale Database Sample for zh (eucCN). +XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_CN,v 1.1 2001/11/01 23:35:28 dawes Exp $ + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs1 class +fs1 { + charset { + name GB2312.1980-0:GL + } + font { + primary GB2312.1980-0:GL + substitute GB2312.1980-0:GLGR + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name zh.euc +mb_cur_max 2 +state_depend_encoding False +wc_encoding_mask \x30000000 +wc_shift_bits 7 + +#ifndef X_LOCALE +use_stdc_env True +force_convert_to_mb True +#endif + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + wc_encoding \x00000000 + ct_encoding ISO8859-1:GL +} + +XCOMM cs1 class +cs1 { + side GR:Default + length 2 + wc_encoding \x30000000 + ct_encoding GB2312.1980-0:GL; GB2312.1980-0:GR +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh_HK.big5 diff -u /dev/null xc/nls/XLC_LOCALE/zh_HK.big5:1.1 --- /dev/null Fri Jan 18 15:23:54 2002 +++ xc/nls/XLC_LOCALE/zh_HK.big5 Thu Nov 1 18:35:28 2001 @@ -0,0 +1,70 @@ +XCOMM +XCOMM (c) 1996, X11R6 L10N for Taiwan and Big5 Encoding Project +XCOMM +XCOMM modified for X11R6.3 by Hung-Chi Chu 1998/01/10 +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_HK.big5,v 1.1 2001/11/01 23:35:28 dawes Exp $ +XCOMM +XLC_FONTSET +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all + } +} +XCOMM fs1 class +fs1 { + charset { + name BIG5-0:GLGR + } + font { + primary BIG5-0:GLGR + substitute BIG5-0:GLGR + } +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name zh_HK.Big5 +mb_cur_max 2 +state_depend_encoding False + +wc_encoding_mask \x00008000 +wc_shift_bits 8 + +use_stdc_env True +force_convert_to_mb True + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + wc_encoding \x00000000 + ct_encoding ISO8859-1:GL +} + +XCOMM cs1 class +cs1 { + side none + length 2 + byte1 \xa1,\xf9 + byte2 \x40,\x7e;\xa1,\xfe + + wc_encoding \x00008000 + ct_encoding BIG5-0:GLGR:\x1b\x25\x2f\x32\x80\x89\x42\x49\x47\x35\x2d\x30\x02 + + mb_conversion [\xa140,\xf9fe]->\x2140 + ct_conversion [\x2140,\x79fe]->\xa140 +} + +END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh_HK.big5hkscs diff -u xc/nls/XLC_LOCALE/zh_HK.big5hkscs:1.1 xc/nls/XLC_LOCALE/zh_HK.big5hkscs:1.2 --- xc/nls/XLC_LOCALE/zh_HK.big5hkscs:1.1 Tue Mar 6 13:54:46 2001 +++ xc/nls/XLC_LOCALE/zh_HK.big5hkscs Thu Nov 1 18:35:28 2001 @@ -4,31 +4,41 @@ XCOMM modified for X11R6.3 by Hung-Chi Chu 1998/01/10 XCOMM modified for Big5HKSCS by Roger So XCOMM -XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_HK.big5hkscs,v 1.1 2001/03/06 18:54:46 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_HK.big5hkscs,v 1.2 2001/11/01 23:35:28 dawes Exp $ XCOMM XCOMM XLC_FONTSET category XCOMM XLC_FONTSET -XCOMM fs0 class (7 bit ASCII) -fs0 { - charset { - name ISO8859-1:GL +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary ISO8859-1:GL + vertical_rotate all } - font { - primary ISO8859-1:GL - vertical_rotate all - } } -XCOMM fs1 class -fs1 { - charset { - name BIG5HKSCS-0:GLGR - } - font { - primary BIG5HKSCS-0:GLGR - substitute BIG5HKSCS-0:GLGR - } +XCOMM fs1 class (standard Big5) +fs1 { + charset { + name BIG5-0:GLGR;BIG5-1:GLGR;BIG5-2:GLGR + } + font { + primary BIG5-0:GLGR + substitute BIG5-0:GLGR + } } +XCOMM fs2 class (HKSCS extensions) +fs2 { + charset { + name BIG5HKSCS-0:GLGR;BIG5HKSCS-1:GLGR;BIG5HKSCS-2:GLGR + } + font { + primary BIG5HKSCS-0:GLGR + substitute BIG5HKSCS-0:GLGR + } +} END XLC_FONTSET XCOMM @@ -36,7 +46,7 @@ XCOMM XLC_XLOCALE -encoding_name zh_HK.big5hkscs +encoding_name zh_HK.Big5HKSCS mb_cur_max 2 state_depend_encoding False @@ -46,7 +56,6 @@ use_stdc_env True force_convert_to_mb True -XCOMM cs0 class cs0 { side GL:Default length 1 @@ -54,18 +63,89 @@ ct_encoding ISO8859-1:GL } -XCOMM cs1 class +XCOMM standard Big5, A140-C5FE + C940-F8FE cs1 { side none length 2 - byte1 \x85,\xfe + byte1 \xa1,\xc5;\xc9,\xf8 byte2 \x40,\x7e;\xa1,\xfe wc_encoding \x00008000 + ct_encoding BIG5-0:GLGR:\x1b\x25\x2f\x32\x80\x89\x42\x49\x47\x35\x2d\x30\x02 + + mb_conversion [\x8140,\xfefe]->\x0140 + ct_conversion [\x0140,\x7efe]->\x8140 +} + +XCOMM standard Big5, C640-C67E +cs2 { + side none + length 2 + byte1 \xc6 + byte2 \x40,\x7e + + wc_encoding \x00008000 + ct_encoding BIG5-1:GLGR:\x1b\x25\x2f\x32\x80\x89\x42\x49\x47\x35\x2d\x31\x02 + + mb_conversion [\x8140,\xfefe]->\x0140 + ct_conversion [\x0140,\x7efe]->\x8140 +} + +XCOMM standard Big5, F940-F9D5 +cs3 { + side none + length 2 + byte1 \xf9 + byte2 \x40,\xd5 + + wc_encoding \x00008000 + ct_encoding BIG5-2:GLGR:\x1b\x25\x2f\x32\x80\x89\x42\x49\x47\x35\x2d\x32\x02 + + mb_conversion [\x8140,\xfefe]->\x0140 + ct_conversion [\x0140,\x7efe]->\x8140 +} + + +XCOMM HKSCS extensions, 8540-A0FE + C740-C8FE + FA40-FEFE +cs4 { + side none + length 2 + byte1 \x85,\xa0;\xc7,\xc8;\xfa,\xfe + byte2 \x40,\x7e;\xa1,\xfe + + wc_encoding \x00008000 ct_encoding BIG5HKSCS-0:GLGR:\x1b\x25\x2f\x32\x80\x8c\x42\x49\x47\x35\x48\x4b\x53\x43\x53\x2d\x30\x02 + + mb_conversion [\x8140,\xfefe]->\0x0140 + ct_conversion [\x0140,\x7efe]->\0x8140 +} + +XCOMM HKSCS extensions, C6A1-C6FE +cs5 { + side none + length 2 + byte1 \xc6 + byte2 \xa1,\xfe + + wc_encoding \x00008000 + ct_encoding BIG5HKSCS-1:GLGR:\x1b\x25\x2f\x32\x80\x8c\x42\x49\x47\x35\x48\x4b\x53\x43\x53\x2d\x31\x02 + + mb_conversion [\x8140,\xfefe]->\0x0140 + ct_conversion [\x0140,\x7efe]->\0x8140 +} + +XCOMM HKSCS extensions, F9D6-F9FE +cs6 { + side none + length 2 + byte1 \xf9 + byte2 \xd6,\xfe + + wc_encoding \x00008000 + ct_encoding BIG5HKSCS-2:GLGR:\x1b\x25\x2f\x32\x80\x8c\x42\x49\x47\x35\x48\x4b\x53\x43\x53\x2d\x32\x02 - mb_conversion [\x8540,\xfefe]->\x0540 - ct_conversion [\x0540,\x7efe]->\x8540 + mb_conversion [\x8140,\xfefe]->\0x0140 + ct_conversion [\x0140,\x7efe]->\0x8140 } END XLC_XLOCALE Index: xc/nls/XLC_LOCALE/zh_TW.big5 diff -u xc/nls/XLC_LOCALE/zh_TW.big5:1.2 xc/nls/XLC_LOCALE/zh_TW.big5:1.3 --- xc/nls/XLC_LOCALE/zh_TW.big5:1.2 Fri Oct 27 14:30:57 2000 +++ xc/nls/XLC_LOCALE/zh_TW.big5 Thu Aug 9 15:14:09 2001 @@ -3,7 +3,7 @@ XCOMM XCOMM modified for X11R6.3 by Hung-Chi Chu 1998/01/10 XCOMM -XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_TW.big5,v 1.2 2000/10/27 18:30:57 dawes Exp $ +XCOMM $XFree86: xc/nls/XLC_LOCALE/zh_TW.big5,v 1.3 2001/08/09 19:14:09 dawes Exp $ XCOMM XCOMM XLC_FONTSET category XCOMM @@ -39,7 +39,7 @@ mb_cur_max 2 state_depend_encoding False -wc_encoding_mask \x00008000 +wc_encoding_mask \x00038000 wc_shift_bits 8 #ifndef X_LOCALE @@ -63,10 +63,32 @@ byte2 \x40,\x7e;\xa1,\xfe wc_encoding \x00008000 - ct_encoding BIG5-0:GLGR:\x1b\x25\x2f\x32\x80\x89\x42\x49\x47\x35\x2d\x30\x02 + ct_encoding BIG5-0:GLGR:\x1b\x25\x2f\x32 mb_conversion [\xa140,\xf9fe]->\x2140 ct_conversion [\x2140,\x79fe]->\xa140 +} + +XCOMM cs2 class +cs2 { + side none + length 2 + byte1 \xa1,\xc7 + byte2 \x40,\x7e;\xa1,\xfe + wc_encoding \x00010000 + ct_encoding BIG5-E0:GL;BIG5-E0:GR + mb_conversion [\xa140,\xa17e]->\x2121, [\xa1a1,\xa1bf]->\x2160, [\xa1c0,\xa1fe]->\x2221, [\xa240,\xa25e]->\x2260, [\xa25f,\xa27e]->\x2321, [\xa2a1,\xa2de]->\x2341, [\xa2df,\xa2fe]->\x2421, [\xa340,\xa37d]->\x2441, [\xa37e,\xa37e]->\x2521, [\xa3a1,\xa3fd]->\x2522, [\xa3fe,\xa3fe]->\x2621, [\xa440,\xa47e]->\x2622, [\xa4a1,\xa4be]->\x2661, [\xa4bf,\xa4fe]->\x2721, [\xa540,\xa55d]->\x2761, [\xa55e,\xa57e]->\x2821, [\xa5a1,\xa5dd]->\x2842, [\xa5de,\xa5fe]->\x2921, [\xa640,\xa67c]->\x2942, [\xa67d,\xa67e]->\x2a21, [\xa6a1,\xa6fc]->\x2a23, [\xa6fd,\xa6fe]->\x2b21, [\xa740,\xa77e]->\x2b23, [\xa7a1,\xa7bd]->\x2b62, [\xa7be,\xa7fe]->\x2c21, [\xa840,\xa85c]->\x2c62, [\xa85d,\xa87e]->\x2d21, [\xa8a1,\xa8dc]->\x2d43, [\xa8dd,\xa8fe]->\x2e21, [\xa940,\xa97b]->\x2e43, [\xa97c,\xa97e]->\x2f21, [\xa9a1,\xa9fb]->\x2f24, [\xa9fc,\xa9fe]->\x3021, [\xaa40,\xaa7e]->\x3024, [\xaaa1,\xaabc]->\x3063, [\xaabd,\xaafe]->\x3121, [\xab40,\xab5b]->\x3163, [\xab5c,\xab7e]->\x3221, [\xaba1,\xabdb]->\x3244, [\xabdc,\xabfe]->\x3321, [\xac40,\xac7a]->\x3344, [\xac7b,\xac7e]->\x3421, [\xaca1,\xacfa]->\x3425, [\xacfb,\xacfe]->\x3521, [\xad40,\xad7e]->\x3525, [\xada1,\xadbb]->\x3564, [\xadbc,\xadfe]->\x3621, [\xae40,\xae5a]->\x3664, [\xae5b,\xae7e]->\x3721, [\xaea1,\xaeda]->\x3745, [\xaedb,\xaefe]->\x3821, [\xaf40,\xaf79]->\x3845, [\xaf7a,\xaf7e]->\x3921, [\xafa1,\xaff9]->\x3926, [\xaffa,\xaffe]->\x3a21, [\xb040,\xb07e]->\x3a26, [\xb0a1,\xb0ba]->\x3a65, [\xb0bb,\xb0fe]->\x3b21, [\xb140,\xb159]->\x3b65, [\xb15a,\xb17e]->\x3c21, [\xb1a1,\xb1d9]->\x3c46, [\xb1da,\xb1fe]->\x3d21, [\xb240,\xb278]->\x3d46, [\xb279,\xb27e]->\x3e21, [\xb2a1,\xb2f8]->\x3e27, [\xb2f9,\xb2fe]->\x3f21, [\xb340,\xb37e]->\x3f27, [\xb3a1,\xb3b9]->\x3f66, [\xb3ba,\xb3fe]->\x4021, [\xb440,\xb458]->\x4066, [\xb459,\xb47e]->\x4121, [\xb4a1,\xb4d8]->\x4147, [\xb4d9,\xb4fe]->\x4221, [\xb540,\xb577]->\x4247, [\xb578,\xb57e]->\x4321, [\xb5a1,\xb5f7]->\x4328, [\xb5f8,\xb5fe]->\x4421, [\xb640,\xb67e]->\x4428, [\xb6a1,\xb6b8]->\x4467, [\xb6b9,\xb6fe]->\x4521, [\xb740,\xb757]->\x4567, [\xb758,\xb77e]->\x4621, [\xb7a1,\xb7d7]->\x4648, [\xb7d8,\xb7fe]->\x4721, [\xb840,\xb876]->\x4748, [\xb877,\xb87e]->\x4821, [\xb8a1,\xb8f6]->\x4829, [\xb8f7,\xb8fe]->\x4921, [\xb940,\xb97e]->\x4929, [\xb9a1,\xb9b7]->\x4968, [\xb9b8,\xb9fe]->\x4a21, [\xba40,\xba56]->\x4a68, [\xba57,\xba7e]->\x4b21, [\xbaa1,\xbad6]->\x4b49, [\xbad7,\xbafe]->\x4c21, [\xbb40,\xbb75]->\x4c49, [\xbb76,\xbb7e]->\x4d21, [\xbba1,\xbbf5]->\x4d2a, [\xbbf6,\xbbfe]->\x4e21, [\xbc40,\xbc7e]->\x4e2a, [\xbca1,\xbcb6]->\x4e69, [\xbcb7,\xbcfe]->\x4f21, [\xbd40,\xbd55]->\x4f69, [\xbd56,\xbd7e]->\x5021, [\xbda1,\xbdd5]->\x504a, [\xbdd6,\xbdfe]->\x5121, [\xbe40,\xbe74]->\x514a, [\xbe75,\xbe7e]->\x5221, [\xbea1,\xbef4]->\x522b, [\xbef5,\xbefe]->\x5321, [\xbf40,\xbf7e]->\x532b, [\xbfa1,\xbfb5]->\x536a, [\xbfb6,\xbffe]->\x5421, [\xc040,\xc054]->\x546a, [\xc055,\xc07e]->\x5521, [\xc0a1,\xc0d4]->\x554b, [\xc0d5,\xc0fe]->\x5621, [\xc140,\xc173]->\x564b, [\xc174,\xc17e]->\x5721, [\xc1a1,\xc1f3]->\x572c, [\xc1f4,\xc1fe]->\x5821, [\xc240,\xc27e]->\x582c, [\xc2a1,\xc2b4]->\x586b, [\xc2b5,\xc2fe]->\x5921, [\xc340,\xc353]->\x596b, [\xc354,\xc37e]->\x5a21, [\xc3a1,\xc3d3]->\x5a4c, [\xc3d4,\xc3fe]->\x5b21, [\xc440,\xc472]->\x5b4c, [\xc473,\xc47e]->\x5c21, [\xc4a1,\xc4f2]->\x5c2d, [\xc4f3,\xc4fe]->\x5d21, [\xc540,\xc57e]->\x5d2d, [\xc5a1,\xc5b3]->\x5d6c, [\xc5b4,\xc5fe]->\x5e21, [\xc640,\xc652]->\x5e6c, [\xc653,\xc67e]->\x5f21, [\xc6a1,\xc6d2]->\x5f4d, [\xc6d3,\xc6fe]->\x6021, [\xc740,\xc771]->\x604d, [\xc772,\xc77e]->\x6121, [\xc7a1,\xc7f1]->\x612e, [\xc7f2,\xc7fe]->\x6221 +} + +XCOMM cs3 class +cs3 { + side none + length 2 + byte1 \xc9,\xf9 + byte2 \x40,\x7e;\xa1,\xfe + wc_encoding \x00020000 + ct_encoding BIG5-E1:GL;BIG5-E1:GR + mb_conversion [\xc940,\xc97e]->\x2121, [\xc9a1,\xc9bf]->\x2160, [\xc9c0,\xc9fe]->\x2221, [\xca40,\xca5e]->\x2260, [\xca5f,\xca7e]->\x2321, [\xcaa1,\xcade]->\x2341, [\xcadf,\xcafe]->\x2421, [\xcb40,\xcb7d]->\x2441, [\xcb7e,\xcb7e]->\x2521, [\xcba1,\xcbfd]->\x2522, [\xcbfe,\xcbfe]->\x2621, [\xcc40,\xcc7e]->\x2622, [\xcca1,\xccbe]->\x2661, [\xccbf,\xccfe]->\x2721, [\xcd40,\xcd5d]->\x2761, [\xcd5e,\xcd7e]->\x2821, [\xcda1,\xcddd]->\x2842, [\xcdde,\xcdfe]->\x2921, [\xce40,\xce7c]->\x2942, [\xce7d,\xce7e]->\x2a21, [\xcea1,\xcefc]->\x2a23, [\xcefd,\xcefe]->\x2b21, [\xcf40,\xcf7e]->\x2b23, [\xcfa1,\xcfbd]->\x2b62, [\xcfbe,\xcffe]->\x2c21, [\xd040,\xd05c]->\x2c62, [\xd05d,\xd07e]->\x2d21, [\xd0a1,\xd0dc]->\x2d43, [\xd0dd,\xd0fe]->\x2e21, [\xd140,\xd17b]->\x2e43, [\xd17c,\xd17e]->\x2f21, [\xd1a1,\xd1fb]->\x2f24, [\xd1fc,\xd1fe]->\x3021, [\xd240,\xd27e]->\x3024, [\xd2a1,\xd2bc]->\x3063, [\xd2bd,\xd2fe]->\x3121, [\xd340,\xd35b]->\x3163, [\xd35c,\xd37e]->\x3221, [\xd3a1,\xd3db]->\x3244, [\xd3dc,\xd3fe]->\x3321, [\xd440,\xd47a]->\x3344, [\xd47b,\xd47e]->\x3421, [\xd4a1,\xd4fa]->\x3425, [\xd4fb,\xd4fe]->\x3521, [\xd540,\xd57e]->\x3525, [\xd5a1,\xd5bb]->\x3564, [\xd5bc,\xd5fe]->\x3621, [\xd640,\xd65a]->\x3664, [\xd65b,\xd67e]->\x3721, [\xd6a1,\xd6da]->\x3745, [\xd6db,\xd6fe]->\x3821, [\xd740,\xd779]->\x3845, [\xd77a,\xd77e]->\x3921, [\xd7a1,\xd7f9]->\x3926, [\xd7fa,\xd7fe]->\x3a21, [\xd840,\xd87e]->\x3a26, [\xd8a1,\xd8ba]->\x3a65, [\xd8bb,\xd8fe]->\x3b21, [\xd940,\xd959]->\x3b65, [\xd95a,\xd97e]->\x3c21, [\xd9a1,\xd9d9]->\x3c46, [\xd9da,\xd9fe]->\x3d21, [\xda40,\xda78]->\x3d46, [\xda79,\xda7e]->\x3e21, [\xdaa1,\xdaf8]->\x3e27, [\xdaf9,\xdafe]->\x3f21, [\xdb40,\xdb7e]->\x3f27, [\xdba1,\xdbb9]->\x3f66, [\xdbba,\xdbfe]->\x4021, [\xdc40,\xdc58]->\x4066, [\xdc59,\xdc7e]->\x4121, [\xdca1,\xdcd8]->\x4147, [\xdcd9,\xdcfe]->\x4221, [\xdd40,\xdd77]->\x4247, [\xdd78,\xdd7e]->\x4321, [\xdda1,\xddf7]->\x4328, [\xddf8,\xddfe]->\x4421, [\xde40,\xde7e]->\x4428, [\xdea1,\xdeb8]->\x4467, [\xdeb9,\xdefe]->\x4521, [\xdf40,\xdf57]->\x4567, [\xdf58,\xdf7e]->\x4621, [\xdfa1,\xdfd7]->\x4648, [\xdfd8,\xdffe]->\x4721, [\xe040,\xe076]->\x4748, [\xe077,\xe07e]->\x4821, [\xe0a1,\xe0f6]->\x4829, [\xe0f7,\xe0fe]->\x4921, [\xe140,\xe17e]->\x4929, [\xe1a1,\xe1b7]->\x4968, [\xe1b8,\xe1fe]->\x4a21, [\xe240,\xe256]->\x4a68, [\xe257,\xe27e]->\x4b21, [\xe2a1,\xe2d6]->\x4b49, [\xe2d7,\xe2fe]->\x4c21, [\xe340,\xe375]->\x4c49, [\xe376,\xe37e]->\x4d21, [\xe3a1,\xe3f5]->\x4d2a, [\xe3f6,\xe3fe]->\x4e21, [\xe440,\xe47e]->\x4e2a, [\xe4a1,\xe4b6]->\x4e69, [\xe4b7,\xe4fe]->\x4f21, [\xe540,\xe555]->\x4f69, [\xe556,\xe57e]->\x5021, [\xe5a1,\xe5d5]->\x504a, [\xe5d6,\xe5fe]->\x5121, [\xe640,\xe674]->\x514a, [\xe675,\xe67e]->\x5221, [\xe6a1,\xe6f4]->\x522b, [\xe6f5,\xe6fe]->\x5321, [\xe740,\xe77e]->\x532b, [\xe7a1,\xe7b5]->\x536a, [\xe7b6,\xe7fe]->\x5421, [\xe840,\xe854]->\x546a, [\xe855,\xe87e]->\x5521, [\xe8a1,\xe8d4]->\x554b, [\xe8d5,\xe8fe]->\x5621, [\xe940,\xe973]->\x564b, [\xe974,\xe97e]->\x5721, [\xe9a1,\xe9f3]->\x572c, [\xe9f4,\xe9fe]->\x5821, [\xea40,\xea7e]->\x582c, [\xeaa1,\xeab4]->\x586b, [\xeab5,\xeafe]->\x5921, [\xeb40,\xeb53]->\x596b, [\xeb54,\xeb7e]->\x5a21, [\xeba1,\xebd3]->\x5a4c, [\xebd4,\xebfe]->\x5b21, [\xec40,\xec72]->\x5b4c, [\xec73,\xec7e]->\x5c21, [\xeca1,\xecf2]->\x5c2d, [\xecf3,\xecfe]->\x5d21, [\xed40,\xed7e]->\x5d2d, [\xeda1,\xedb3]->\x5d6c, [\xedb4,\xedfe]->\x5e21, [\xee40,\xee52]->\x5e6c, [\xee53,\xee7e]->\x5f21, [\xeea1,\xeed2]->\x5f4d, [\xeed3,\xeefe]->\x6021, [\xef40,\xef71]->\x604d, [\xef72,\xef7e]->\x6121, [\xefa1,\xeff1]->\x612e, [\xeff2,\xeffe]->\x6221, [\xf040,\xf07e]->\x622e, [\xf0a1,\xf0b2]->\x626d, [\xf0b3,\xf0fe]->\x6321, [\xf140,\xf151]->\x636d, [\xf152,\xf17e]->\x6421, [\xf1a1,\xf1d1]->\x644e, [\xf1d2,\xf1fe]->\x6521, [\xf240,\xf270]->\x654e, [\xf271,\xf27e]->\x6621, [\xf2a1,\xf2f0]->\x662f, [\xf2f1,\xf2fe]->\x6721, [\xf340,\xf37e]->\x672f, [\xf3a1,\xf3b1]->\x676e, [\xf3b2,\xf3fe]->\x6821, [\xf440,\xf450]->\x686e, [\xf451,\xf47e]->\x6921, [\xf4a1,\xf4d0]->\x694f, [\xf4d1,\xf4fe]->\x6a21, [\xf540,\xf56f]->\x6a4f, [\xf570,\xf57e]->\x6b21, [\xf5a1,\xf5ef]->\x6b30, [\xf5f0,\xf5fe]->\x6c21, [\xf640,\xf67e]->\x6c30, [\xf6a1,\xf6b0]->\x6c6f, [\xf6b1,\xf6fe]->\x6d21, [\xf740,\xf74f]->\x6d6f, [\xf750,\xf77e]->\x6e21, [\xf7a1,\xf7cf]->\x6e50, [\xf7d0,\xf7fe]->\x6f21, [\xf840,\xf86e]->\x6f50, [\xf86f,\xf87e]->\x7021, [\xf8a1,\xf8ee]->\x7031, [\xf8ef,\xf8fe]->\x7121, [\xf940,\xf97e]->\x7131, [\xf9a1,\xf9af]->\x7170, [\xf9b0,\xf9fe]->\x7221 } END XLC_XLOCALE Index: xc/programs/Imakefile diff -u xc/programs/Imakefile:3.45 xc/programs/Imakefile:3.49 --- xc/programs/Imakefile:3.45 Tue May 1 13:23:26 2001 +++ xc/programs/Imakefile Fri Nov 2 18:29:28 2001 @@ -2,7 +2,7 @@ -XCOMM $XFree86: xc/programs/Imakefile,v 3.45 2001/05/01 17:23:26 alanh Exp $ +XCOMM $XFree86: xc/programs/Imakefile,v 3.49 2001/11/02 23:29:28 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" @@ -72,6 +72,10 @@ XINPUTCLIENTDIRS = xsetmode xsetpointer #endif +#if BuildXTrapLibrary +XTRAPCLIENTDIRS = xtrap +#endif + /* makepsres should be considered as part of the DPS libraries */ #if BuildDPSLibraries MAKEPSRESDIR = makepsres @@ -95,13 +99,17 @@ XLOADDIR = xload #endif +#if BuildRandRLibrary + XRANDRDIR = xrandr +#endif + #if BuildServersOnly || !BuildClients SUBDIRS = $(XSSRCDIR) #else SUBDIRS = \ appres bdftopcf bitmap \ $(SCREENSAVESRCDIR) editres fslsfonts fstobdf iceauth \ - ico listres \ + ico listres luit \ $(MAKEPSRESDIR) $(DPSCLIENTDIRS) \ $(MKCFMSRCDIR) \ mkfontdir oclock $(PROXYMGRSRCDIR) $(RGBSRCDIR) $(RSTARTSRCDIR) \ @@ -116,10 +124,10 @@ xlsclients xlsfonts xmag xman xmessage xmh xmodmap xprop xrdb \ xrefresh $(XRXSRCDIR) xset \ xsetroot $(XSMSRCDIR) xstdcmap $(XINPUTCLIENTDIRS) \ - $(XTERMSRCDIR) $(XVIDTUNESRCDIR) xwd xwininfo xwud \ + $(XTERMSRCDIR) $(XTRAPCLIENTDIRS) $(XVIDTUNESRCDIR) xwd xwininfo xwud \ $(XPMCLIENTDIRS) $(XVINFOSRCDIR) \ $(XSSRCDIR) $(XASSRCDIR) $(LBXPROXYSRCDIR) $(SCRIPTSDIR) \ - $(GLXCLIENTDIRS) $(XFTCACHEDIR) + $(GLXCLIENTDIRS) $(XFTCACHEDIR) $(XRANDRDIR) #endif MakeSubdirs($(SUBDIRS)) Index: xc/programs/Xserver/Imakefile diff -u xc/programs/Xserver/Imakefile:3.229 xc/programs/Xserver/Imakefile:3.254 --- xc/programs/Xserver/Imakefile:3.229 Fri May 18 13:48:30 2001 +++ xc/programs/Xserver/Imakefile Mon Jan 7 15:38:21 2002 @@ -1,8 +1,8 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:47:01 cpqbld Exp $ +XCOMM $Xorg: Imakefile,v 1.4 2001/03/14 18:42:02 pookie Exp $ /* * Server Master Makefile */ -XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.229 2001/05/18 17:48:30 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/Imakefile,v 3.254 2002/01/07 20:38:21 dawes Exp $ #ifndef InstallXserverSetUID #define InstallXserverSetUID NO @@ -104,15 +104,13 @@ XIDIR = Xi #endif #if BuildXIE - XIEEXT = XIE/dixie/ModuleLibraryTargetName(dixie) \ - XIE/mixie/ModuleLibraryTargetName(mixie) + XIEEXT = XIE/dixie/ModuleLibraryTargetName(dixie) \ + XIE/mixie/ModuleLibraryTargetName(mixie) + XIEDIR = XIE #endif -#if BuildXIE || BuildXIElib - XIEDIR = XIE -#endif #if BuildXKB - XKBEXT = xkb/LibraryTargetName(xkb) - XKBDIR = xkb + XKBEXT = xkb/LibraryTargetName(xkb) + XKBDIR = xkb #endif #if BuildLBX LBXEXT = lbx/LibraryTargetName(lbx) \ @@ -126,30 +124,34 @@ DBEDIR = dbe #endif #if BuildRECORD - RECORDEXT = record/LibraryTargetName(record) + RECORDEXT = record/LibraryTargetName(record) #endif #if BuildRECORD || BuildRECORDlib - RECORDDIR = record + RECORDDIR = record +#endif +#if BuildXTrap + XTRAPEXT = XTrap/LibraryTargetName(xtrap) + XTRAPDIR = XTrap #endif #ifdef SiteExtensionLibs - SITEEXTS = SiteExtensionLibs + SITEEXTS = SiteExtensionLibs #endif #ifdef SiteExtensionDirs - SITEEXTDIRS = SiteExtensionDirs + SITEEXTDIRS = SiteExtensionDirs #endif #if DoLoadableServer && HasDlopen - LIBDL = DlLibrary + LIBDL = DlLibrary #endif - LIBREGEX = RegexLibrary + LIBREGEX = RegexLibrary #if DoLoadableServer - LIBCWRAPPER = os/libcwrapper.o + LIBCWRAPPER = os/libcwrapper.o #endif #if BuildXprint #ifndef XpRasterDDX -#define XpRasterDDX NO +#define XpRasterDDX YES #endif #ifndef XpColorPclDDX #define XpColorPclDDX YES @@ -191,26 +193,30 @@ RENDERDIR = render RENDERLIB = $(RENDERDIR)/librender.a #endif +#if BuildRandR + RANDRDIR = randr + RANDRLIB = $(RANDRDIR)/librandr.a +#endif #if DoLoadableServer - EXTENSIONS = $(OTHEREXTS) $(RENDERLIB) + EXTENSIONS = $(OTHEREXTS) $(RENDERLIB) $(RANDRLIB) LOADABLEEXTS = $(PEXLIBS) $(XIEEXT) $(MISCEXT) $(DBEEXT) $(RECORDEXT) \ - $(GLXEXT) + $(GLXEXT) $(XTRAPEXT) MISCEXT = Xext/LibraryTargetName(ext) OTHEREXTS = Xext/LibraryTargetName(exts) $(XKBEXT) $(XINPUTEXT) \ $(LBXEXT) $(SITEEXTS) #else - EXTENSIONS = $(OTHEREXTS) $(PEXLIBS) $(GLXEXT) $(RENDERLIB) + EXTENSIONS = $(OTHEREXTS) $(PEXLIBS) $(GLXEXT) $(RENDERLIB) $(RANDRLIB) OTHEREXTS = Xext/LibraryTargetName(ext) $(XKBEXT) $(XINPUTEXT) \ - $(XIEEXT) $(LBXEXT) $(DBEEXT) $(RECORDEXT) $(SITEEXTS) + $(XIEEXT) $(LBXEXT) $(DBEEXT) $(RECORDEXT) \ + $(SITEEXTS) $(XTRAPEXT) #endif EXTDIRS = Xext $(XKBDIR) $(XIDIR) $(XIEDIR) $(PEXDIR) $(GLXDIR) \ - $(LBXDIRS) $(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS) $(RENDERDIR) - XAULIB = $(XAUTHSRC)/LibraryTargetName(Xau) - XDMCPLIB = $(XDMCPLIBSRC)/LibraryTargetName(Xdmcp) + $(LBXDIRS) $(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS) \ + $(RENDERDIR) $(RANDRDIR) $(XTRAPDIR) #if BuildLBX || GzipFontCompression ZLIB = GzipLibrary #endif - OS = os/LibraryTargetName(os) $(XAULIB) $(XDMCPLIB) + OS = os/LibraryTargetName(os) $(DEPXAUTHLIB) $(DEPXDMCPLIB) BSDEMUL = $(DEPXBSDLIB) #if DoLoadableServer MFB = mfb/ModuleLibraryTargetName(mfb) @@ -229,6 +235,7 @@ CFB32 = cfb/ModuleLibraryTargetName(cfb) \ cfb32/ModuleLibraryTargetName(cfb32) SHADOW = miext/shadow/ModuleLibraryTargetName(shadow) + LAYER = miext/layer/ModuleLibraryTargetName(layer) #else MFB = mfb/LibraryTargetName(mfb) FB = fb/LibraryTargetName(fb) @@ -246,6 +253,7 @@ CFB32 = cfb/LibraryTargetName(cfb) \ cfb32/LibraryTargetName(cfb32) SHADOW = miext/shadow/LibraryTargetName(shadow) + LAYER = miext/layer/LibraryTargetName(layer) #endif #if BuildLowMem LMFCFB = lmfcfb/LibraryTargetName(cfb) @@ -265,7 +273,7 @@ #if !HasLibUsb USB = $(XF86OSSRC)/bsd/libusb/LibraryTargetName(usb) #else - USB = -lusb + USB = UsbHidLib #endif #endif #ifdef ServerExtraSysLibs @@ -305,13 +313,6 @@ * If a server does not need all of the above components, simply * omit the relevant lines from the build block. * - * Additional ddx directories can be split across three variables: - * DDXDIR1, DDXDIR2, and DDXDIR3. Most servers only use DDXDIR1, - * but if two servers can be built on a platform then DDXDIR1 is - * typically set to the ddx directories that are shared by both - * servers, DDXDIR2 is the directories unique to one of the servers, - * and DDXDIR3 is the directories unique to the other server. - * * If these guidelines are followed, a make at the top of the server * tree should result in each subdirectory being built only once, * even if multiple servers that share subdirectories are being built. @@ -327,11 +328,11 @@ XCOMM MFBDIR = mfb CFB8DIR = cfb -DDXDIR1 = hw/dec/ws +DECWSDDXDIR = hw/dec/ws #if BuildLowMem -DECDIRS = $(STDDIRS) $(LMFCFBDIR) $(DDXDIR1) $(DEPDIRS) +DECDIRS = $(STDDIRS) $(LMFCFBDIR) $(DECWSDDXDIR) $(DEPDIRS) #else -DECDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS) +DECDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DECWSDDXDIR) $(DEPDIRS) #endif DECOBJS = hw/dec/ws/init.o hw/dec/ws/sdepthinit.o #if BuildLowMem @@ -357,10 +358,10 @@ CFB16DIR = cfb16 CFB24DIR = cfb24 CFB32DIR = cfb32 -DDXDIR1 = hw/dec/ws +DECWSDDXDIR = hw/dec/ws DECDIRS1 = $(STDDIRS) $(MFBDIR) \ $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ - $(DDXDIR1) $(DEPDIRS) + $(DECWSDDXDIR) $(DEPDIRS) DECOBJS1 = hw/dec/ws/init.o hw/dec/ws/mdepthinit.o DECLIBS1 = hw/dec/ws/LibraryTargetName(dec) CFBLibs ServerTarget(Xdec_md,$(DECDIRS1),$(DECOBJS1), \ @@ -377,22 +378,24 @@ XCOMM MFBDIR = mfb CFB8DIR = cfb -DDXDIR1 = hw/sun -#ifndef AmoebaArchitecture -SUNOBJS = hw/sun/sunInit.o +SUNDDXDIR = hw/sun +#if DoLoadableServer +SUNOBJS = hw/sun/sunInit.o hw/sun/sunInitExt.o hw/sun/stubs.o +#elif XF86Server +SUNOBJS = hw/sun/sunInit.o hw/sun/stubs.o #else -SUNOBJS = hw/sun/sunInitColor.o +SUNOBJS = hw/sun/sunInit.o #endif #if BuildLowMem -SUNDIRS = $(STDDIRS) $(LMFCFBDIR) $(DDXDIR1) $(DEPDIRS) +SUNDIRS = $(STDDIRS) $(LMFCFBDIR) $(SUNDDXDIR) $(DEPDIRS) SUNLIBS = hw/sun/LibraryTargetName(sun) LMFCFBLibs #else -SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS) +SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(SUNDDXDIR) $(DEPDIRS) SUNLIBS = hw/sun/LibraryTargetName(sun) CFB8Libs #endif SUNSYSLIBS = $(FONTLIBS) $(WIDECHARSYSLIB) $(SYSLIBS) SetUIDServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \ - $(SUNLIBS),$(SUNSYSLIBS)) + $(SUNLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(SUNSYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xsun #endif @@ -408,14 +411,20 @@ CFB16DIR = cfb16 CFB24DIR = cfb24 CFB32DIR = cfb32 -DDXDIR1 = hw/sun +SUNDDXDIR = hw/sun SUN24DIRS = $(STDDIRS) $(MFBDIR) \ $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ - $(DDXDIR1) $(DEPDIRS) + $(SUNDDXDIR) $(DEPDIRS) +#if DoLoadableServer +SUN24OBJS = hw/sun/sunInitMulti.o hw/sun/sunInitExt.o hw/sun/stubs.o +#elif XF86Server +SUN24OBJS = hw/sun/sunInitMulti.o hw/sun/stubs.o +#else SUN24OBJS = hw/sun/sunInitMulti.o +#endif SUN24LIBS = hw/sun/LibraryTargetName(sun) CFBLibs SetUIDServerTarget(Xsun24,$(SUN24DIRS),$(SUN24OBJS), \ - $(SUN24LIBS),$(FONTLIBS) $(SYSLIBS)) + $(SUN24LIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall Xsun24 #endif @@ -427,61 +436,30 @@ XCOMM Sun monochrome server XCOMM MFBDIR = mfb -DDXDIR1 = hw/sun -SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS) +SUNDDXDIR = hw/sun +SUNMDIRS = $(STDDIRS) $(MFBDIR) $(SUNDDXDIR) $(DEPDIRS) +#if XF86Server +SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o hw/sun/stubs.o +#else SUNMOBJS = hw/sun/sunInitMono.o hw/sun/sunInExMono.o +#endif SUNMLIBS = hw/sun/LibraryTargetName(sun) MFBBareLibs $(EXTENSIONS) SetUIDServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \ - $(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) + $(SUNMLIBS) $(LOADABLEEXTS) $(LIBCWRAPPER),$(FONTLIBS) $(SYSLIBS)) #ifndef ServerToInstall #define ServerToInstall XsunMono #endif #endif /* XsunMonoServer */ -#if XsunAmoebaServer -XCOMM -XCOMM Sun server for Amoeba -XCOMM -MFBDIR = mfb -CFB8DIR = cfb -DDXDIR1 = hw/sunAmoeba -SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS) -SUNOBJS = hw/sunAmoeba/sunInitColor.o -SUNLIBS = hw/sunAmoeba/LibraryTargetName(sun) CFB8Libs -ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \ - $(SUNLIBS),$(FONTLIBS) $(SYSLIBS)) -#ifndef ServerToInstall -#define ServerToInstall Xsun -#endif -#endif /* XsunAmoebaServer */ - - -#if XsunAmoebaMonoServer -XCOMM -XCOMM Sun monochrome server for Amoeba -XCOMM -MFBDIR = mfb -DDXDIR1 = hw/sunAmoeba -SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS) -SUNMOBJS = hw/sunAmoeba/sunInitMono.o hw/sunAmoeba/sunInExMono.o -SUNMLIBS = hw/sunAmoeba/LibraryTargetName(sun) MFBBareLibs $(OTHEREXTS) -ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \ - $(SUNMLIBS),$(FONTLIBS) $(SYSLIBS)) -#ifndef ServerToInstall -#define ServerToInstall XsunMono -#endif -#endif /* XsunAmoebaMonoServer */ - - #if XsunLynxServer XCOMM XCOMM Sun server for LynxOS microSPARC 2.4.0 XCOMM MFBDIR = mfb CFB8DIR = cfb -DDXDIR1 = hw/sunLynx -SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(DDXDIR1) $(DEPDIRS) +LYNXDDXDIR = hw/sunLynx +SUNDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(LYNXDDXDIR) $(DEPDIRS) SUNOBJS = hw/sunLynx/sunLyInit.o SUNLIBS = hw/sunLynx/libsun.a CFB8Libs ServerTarget(Xsun,$(SUNDIRS),$(SUNOBJS), \ @@ -497,8 +475,8 @@ XCOMM Sun monochrome server for LynxOS microSPARC 2.4.0 XCOMM MFBDIR = mfb -DDXDIR1 = hw/sunLynx -SUNMDIRS = $(STDDIRS) $(MFBDIR) $(DDXDIR1) $(DEPDIRS) +LYNXDDXDIR = hw/sunLynx +SUNMDIRS = $(STDDIRS) $(MFBDIR) $(LYNXDDXDIR) $(DEPDIRS) SUNMOBJS = hw/sunLynx/sunInitMono.o hw/sunLynx/sunInExMono.o SUNMLIBS = hw/sunLynx/libsun.a MFBBareLibs $(OTHEREXTS) ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS), \ @@ -516,13 +494,13 @@ MFBDIR = mfb CFB8DIR = cfb CFB32DIR = cfb32 -DDXDIR1 = hw/hp +HPDDXDIR = hw/hp HPOBJS = hw/hp/hp.o #if BuildLowMem -HPSUBDIRS = $(STDDIRS) $(LMFCFBDIR) $(DDXDIR1) $(DEPDIRS) +HPSUBDIRS = $(STDDIRS) $(LMFCFBDIR) $(HPDDXDIR) $(DEPDIRS) HPLIBS = LMFCFBLibs #else -HPSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB32DIR) $(DDXDIR1) $(DEPDIRS) +HPSUBDIRS = $(STDDIRS) $(MFBDIR) $(CFB8DIR) $(CFB32DIR) $(HPDDXDIR) $(DEPDIRS) HPLIBS = CFB32Libs #endif HPSYSLIBS = $(FONTLIBS) $(CBRT) $(SYSLIBS) @@ -571,18 +549,18 @@ CFB24DIR = cfb24 CFB32DIR = cfb32 SHADOWDIR = miext/shadow +LAYERDIR = miext/layer #if XF86AFB AFBDIR = afb #endif -DDXDIR1 = hw/xfree86 +XFREE86DDXDIR = hw/xfree86 XF86SERVERSUBDIRS = $(STDDIRS) $(MFBDIR) $(FBDIR) $(AFBDIR) \ $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ - $(SHADOWDIR) $(DDXDIR1) $(DEPDIRS) + $(SHADOWDIR) $(LAYERDIR) $(XFREE86DDXDIR) $(DEPDIRS) XF86INIT = $(XF86COMSRC)/xf86Init.o $(XF86COMSRC)/xf86IniExt.o XF86COMLIB = $(XF86COMSRC)/LibraryTargetName(xf86) XF86PARSLIB= $(XF86PARSERSRC)/LibraryTargetName(xf86config) XF86OSLIB = $(XF86OSSRC)/LibraryTargetName(xf86_os) -XF86HWLIB = $(XF86HWSRC)/LibraryTargetName(common_hw) #if XF86XAA XF86XAALIB = $(XF86SRC)/xaa/LibraryTargetName(xaa) #endif @@ -709,13 +687,14 @@ PSEUDO8DIR = $(KDRIVE)/pseudo8 #endif SHADOWDIR = miext/shadow + LAYERDIR = miext/layer KD = $(KDRIVE)/LibraryTargetName(kdrive) KDFBDEV = $(KDRIVE)/fbdev/LibraryTargetName(fbdev) #define StdKdDirs $(KDRIVE) $(KDOSDIR) $(PSEUDO8DIR) fb $(DEPDIRS) #define StdKdSysLibs $(FONTLIBS) $(SYSLIBS) -#define KdLibs $(KD) $(KDOS) $(PSEUDO8) MiExtLibs $(RENDERLIB) +#define KdLibs $(KD) $(KDOS) $(PSEUDO8) MiExtLibs $(RENDERLIB) $(RANDRLIB) #if XfbdevServer XCOMM @@ -727,11 +706,9 @@ KDDIRS = StdKdDirs - SHADOWDIR = miext/shadow - - FBDEVDIRS = $(STDDIRS) $(KDDIRS) $(FBDEVDIR) $(SHADOWDIR) + FBDEVDIRS = $(STDDIRS) $(KDDIRS) $(FBDEVDIR) $(SHADOWDIR) $(LAYERDIR) - FBDEVLIBS = PreFbLibs $(FBDEV) KdLibs FbPostFbLibs + FBDEVLIBS = PreFbLibs $(FBDEV) $(LAYER) KdLibs FbPostFbLibs FBDEVSYSLIBS = StdKdSysLibs #if HasParallelMake @@ -806,16 +783,15 @@ FBDEV = $(FBDEVDIR)/LibraryTargetName(fbdev) VESADIR = $(KDRIVE)/vesa VESA = $(VESADIR)/LibraryTargetName(vesa) - SHADOWDIR = miext/shadow TRIDENTDIR = $(KDRIVE)/trident TRIDENT = $(TRIDENTDIR)/LibraryTargetName(trident) KDDIRS = StdKdDirs TRIDENTDIRS = $(STDDIRS) $(KDDIRS) \ - $(FBDEVDIR) $(VESADIR) $(SHADOWDIR) $(TRIDENTDIR) + $(FBDEVDIR) $(VESADIR) $(SHADOWDIR) $(LAYERDIR) $(TRIDENTDIR) - TRIDENTLIBS = PreFbLibs $(TRIDENT) $(FBDEV) $(VESA) KdLibs FbPostFbLibs + TRIDENTLIBS = PreFbLibs $(TRIDENT) $(FBDEV) $(VESA) $(LAYER) KdLibs FbPostFbLibs TRIDENTSYSLIBS = StdKdSysLibs #if HasParallelMake @@ -829,6 +805,64 @@ $(TRIDENTLIBS),$(TRIDENTSYSLIBS)) #endif /* XTridentServer */ +#if XchipsServer +XCOMM +XCOMM server with Keith's C&T driver +XCOMM + + VESADIR = $(KDRIVE)/vesa + VESA = $(VESADIR)/LibraryTargetName(vesa) + CHIPSDIR = $(KDRIVE)/chips + CHIPS = $(CHIPSDIR)/LibraryTargetName(chips) + + KDDIRS = StdKdDirs + + CHIPSDIRS = $(STDDIRS) $(KDDIRS) \ + $(FBDEVDIR) $(VESADIR) $(SHADOWDIR) $(LAYERDIR) $(CHIPSDIR) + + CHIPSLIBS = PreFbLibs $(CHIPS) $(VESA) $(LAYER) KdLibs FbPostFbLibs +CHIPSSYSLIBS = StdKdSysLibs + +#if HasParallelMake +MakeMutex($(CHIPSDIRS) $(CHIPSLIBS) $(CHIPSSYSLIBS)) +#endif +#if ForceServerRemake +$(CHIPSOBJS) $(CHIPSLIBS) $(CHIPSSYSLIBS):: $(CHIPSDIRS) + @if [ -f $@ ]; then touch $@; fi +#endif +ServerTarget(Xchips,$(CHIPSDIRS),$(CHIPSOBJS), \ + $(CHIPSLIBS),$(CHIPSSYSLIBS)) +#endif /* XchipsServer */ + +#if Xmach64Server +XCOMM +XCOMM server with Keith's Mach64 driver (for Mobility 1 machines) +XCOMM + + VESADIR = $(KDRIVE)/vesa + VESA = $(VESADIR)/LibraryTargetName(vesa) + MACH64DIR = $(KDRIVE)/mach64 + MACH64 = $(MACH64DIR)/LibraryTargetName(mach64) + + KDDIRS = StdKdDirs + + MACH64DIRS = $(STDDIRS) $(KDDIRS) \ + $(VESADIR) $(SHADOWDIR) $(LAYERDIR) $(MACH64DIR) + + MACH64LIBS = PreFbLibs $(MACH64) $(VESA) $(LAYER) KdLibs FbPostFbLibs +MACH64SYSLIBS = StdKdSysLibs + +#if HasParallelMake +MakeMutex($(MACH64DIRS) $(MACH64LIBS) $(MACH64SYSLIBS)) +#endif +#if ForceServerRemake +$(MACH64OBJS) $(MACH64LIBS) $(MACH64SYSLIBS):: $(MACH64DIRS) + @if [ -f $@ ]; then touch $@; fi +#endif +ServerTarget(Xmach64,$(MACH64DIRS),$(MACH64OBJS), \ + $(MACH64LIBS),$(MACH64SYSLIBS)) +#endif /* Xmach64Server */ + #if Xi810Server XCOMM XCOMM server with Intel i810 driver @@ -838,7 +872,6 @@ FBDEV = $(FBDEVDIR)/LibraryTargetName(fbdev) VESADIR = $(KDRIVE)/vesa VESA = $(VESADIR)/LibraryTargetName(vesa) - SHADOWDIR = miext/shadow I810DIR = $(KDRIVE)/i810 I810 = $(I810DIR)/LibraryTargetName(i810) @@ -913,6 +946,40 @@ $(TRIOLIBS),$(TRIOSYSLIBS)) #endif /* XTrioServer */ +#if XipaqServer +XCOMM +XCOMM server with Alan's HP VGA Out PCMCIA driver & fbdev +XCOMM + + FBDEVDIR = $(KDRIVE)/fbdev + FBDEV = $(FBDEVDIR)/LibraryTargetName(fbdev) + + PCMCIADIR = $(KDRIVE)/pcmcia + PCMCIA = $(PCMCIADIR)/LibraryTargetName(pcmcia) + + SHADOWDIR = miext/shadow + + IPAQDIR = $(KDRIVE)/ipaq + IPAQ = $(IPAQDIR)/LibraryTargetName(ipaq) + + KDDIRS = StdKdDirs + + IPAQDIRS = $(STDDIRS) $(KDDIRS) $(FBDEVDIR) $(LAYERDIR) $(SHADOWDIR) $(PCMCIADIR) $(IPAQDIR) + + IPAQLIBS = PreFbLibs $(IPAQ) $(FBDEV) $(LAYER) $(SHADOW) $(PCMCIA) KdLibs FbPostFbLibs + IPAQSYSLIBS = StdKdSysLibs + +#if HasParallelMake +MakeMutex($(IPAQDIRS) $(IPAQOBJS) $(IPAQLIBS) $(IPAQSYSLIBS)) +#endif +#if ForceServerRemake +$(IPAQOBJS) $(IPAQLIBS) $(IPAQSYSLIBS):: $(IPAQDIRS) + @if [ -f $@ ]; then touch $@; fi +#endif +ServerTarget(Xipaq,$(IPAQDIRS),$(IPAQOBJS), \ + $(IPAQLIBS),$(IPAQSYSLIBS)) +#endif /* XIPAQServer */ + #if XTS300Server XCOMM XCOMM server with Keith's S3 Trio and SiS530 driver for the TS300/TS400 @@ -980,11 +1047,9 @@ KDDIRS = StdKdDirs - SHADOWDIR = miext/shadow + VESADIRS = $(STDDIRS) $(KDDIRS) $(VESADIR) $(SHADOWDIR) $(LAYERDIR) - VESADIRS = $(STDDIRS) $(KDDIRS) $(VESADIR) $(SHADOWDIR) - - VESALIBS = PreFbLibs $(VESA) KdLibs FbPostFbLibs + VESALIBS = PreFbLibs $(VESA) $(LAYER) KdLibs FbPostFbLibs VESASYSLIBS = StdKdSysLibs #if HasParallelMake @@ -999,7 +1064,8 @@ #endif /* XvesaServer */ KDRIVEDIRS=$(KDDIRS) $(FBDEVDIR) $(SAVAGEDIR) $(TRIDENTDIR) $(I810DIR) \ - $(SIS530DIR) $(TRIODIR) $(TS300DIR) $(ITSYDIR) $(IGSDIR) $(VESADIR) + $(SIS530DIR) $(TRIODIR) $(TS300DIR) $(ITSYDIR) $(IGSDIR) \ + $(VESADIR) $(PCMCIADIR) $(IPAQDIR) $(MACH64DIR) $(CHIPSDIR) #endif /* KDriveXServer */ #if XprtServer @@ -1125,32 +1191,31 @@ XCOMM FBDIR = fb SHADOWDIR = miext/shadow -XWINDIR = hw/xwin -XWIN = $(XWINDIR)/LibraryTargetName(Xwin) -XWINGDI32 = -lgdi32 -XWINDDRAW = -lddraw -DDXDIR1 = $(XWINDIR) -XWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(XWINDIR) $(DEPDIRS) - -XWINOBJSA = $(XWINDIR)/stubs.o +LAYERDIR = miext/layer +XWINDDXDIR = hw/xwin +XWINLIB = $(XWINDDXDIR)/LibraryTargetName(Xwin) +XWINDIRS = $(STDDIRS) $(FBDIR) $(SHADOWDIR) $(LAYERDIR) $(XWINDDXDIR) \ + $(DEPDIRS) +XWINOBJS = $(XWINDDXDIR)/stubs.o +XWINLIBS = PreFbLibs $(XWINLIB) FbPostFbLibs $(LAYER) $(SHADOW) +XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) -lgdi32 -lddraw -#if BuildDPMS -XWINOBJSB = $(XWINDIR)/dpmsstubs.o -#endif - -XWINOBJS = $(XWINOBJSA) $(XWINOBJSB) - -XWINLIBS = PreFbLibs $(XWIN) FbPostFbLibs $(SHADOW) - -XWINSYSLIBS = $(FONTLIBS) $(LDPRELIBS) $(XLIB) $(SYSLIBS) \ - $(XWINGDI32) $(XWINDDRAW) +/* + * These flags cause XWin.exe to be a Windows executable, which + * prevents XWin.exe from opening a Command Prompt window when it is + * started. However, the flags also prevent XWin.exe from outputting + * its status and error message to a Command Prompt; thus, one most + * implement a method to redirect status and error messages to a file + * before enabling these flags. + */ +EXTRA_LDOPTIONS = -mwindows -e _mainCRTStartup #if HasParallelMake -MakeMutex($(XWINDIRS) $(XWINOBJS) $(XWIN) $(XWINLIBS) $(XWINSYSLIBS)) +MakeMutex($(XWINDIRS) $(XWINOBJS) $(XWINLIB) $(XWINLIBS) $(XWINSYSLIBS)) #endif #if ForceServerRemake -$(XWINOBJS) $(XWIN) $(XWINLIBS) $(XWINSYSLIBS):: $(XWINDIRS) +$(XWINOBJS) $(XWINLIB) $(XWINLIBS) $(XWINSYSLIBS):: $(XWINDIRS) @if [ -f $@ ]; then touch $@; fi #endif @@ -1164,16 +1229,24 @@ #endif /* XWinServer */ +#ifdef DarwinArchitecture +/* + * To allow building even when building the client-side libraries is turned + * off, libraries in ProjectRoot are listed as dependencies for some targets. + * This causes problems unless we tell make where to find these dependencies. + */ +VPATH = $(BUILDLIBDIR):$(USRLIBDIR) +#endif + #if XDarwinServer XCOMM XCOMM X Darwin server for Mac OS X / Darwin XCOMM -FBDIR = fb -DDXDIR1 = hw/darwin -DDXDIR2 = hw/darwin/bundle -DARWINDIRS = $(STDDIRS) $(FBDIR) $(DDXDIR1) $(DEPDIRS) -DARWINOBJS = $(DDXDIR1)/xfIOKitStartup.o -DARWINLIBS = PreFbLibs $(DDXDIR1)/LibraryTargetName(darwin) FbPostFbLibs +FBDIR = fb +DARWINDDXDIR = hw/darwin +DARWINDIRS = $(STDDIRS) $(FBDIR) $(DARWINDDXDIR) $(DEPDIRS) +DARWINOBJS = $(DARWINDDXDIR)/xfIOKitStartup.o +DARWINLIBS = PreFbLibs $(DARWINDDXDIR)/LibraryTargetName(darwin) FbPostFbLibs DARWINSYSLIBS = $(FONTLIBS) $(SYSLIBS) -framework IOKit /* @@ -1191,7 +1264,7 @@ */ QUARTZSYSLIBS = -framework ApplicationServices -framework Cocoa \ -framework CoreAudio -framework Carbon -ObjC -QUARTZOBJS = $(DDXDIR2)/quartzStartup.o +QUARTZOBJS = $(DARWINDDXDIR)/bundle/quartzStartup.o #if NothingOutsideProjectRoot XDARWINAPPDIR = $(BINDIR)/XDarwin.app/Contents/MacOS #else @@ -1202,7 +1275,7 @@ * Quartz X server (installed in its application bundle) */ SetUIDServerTarget(XDarwinApp,$(DARWINDIRS),$(QUARTZOBJS), \ - $(DARWINLIBS) $(DDXDIR2)/LibraryTargetName(XQuartz), \ + $(DARWINLIBS) $(DARWINDDXDIR)/bundle/LibraryTargetName(XQuartz), \ $(DARWINSYSLIBS) $(QUARTZSYSLIBS)) install:: @@ -1221,15 +1294,16 @@ CFBDIRS = $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) -MIEXTDIRS = $(SHADOWDIR) +MIEXTDIRS = $(SHADOWDIR) $(LAYERDIR) IPLANDIRS = $(IPLAN2P2DIR) $(IPLAN2P4DIR) $(IPLAN2P8DIR) -DDXDIRS = $(DDXDIR1) $(DDXDIR2) $(DDXDIR3) $(XVFBDDXDIR) $(XNESTDDXDIR) +DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) $(LYNXDDXDIR) \ + $(HPDDXDIR) $(XFREE86DDXDIR) $(XWINDDXDIR) $(DARWINDDXDIR) \ + $(XVFBDDXDIR) $(XNESTDDXDIR) SUBDIRS = $(STDDIRS) $(MFBDIR) $(CFBDIRS) $(IPLANDIRS) $(ILBMDIR) $(AFBDIR) \ $(LMFCFBDIR) $(DDXDIRS) $(FBDIR) $(KDRIVEDIRS) $(MIEXTDIRS) #if defined(ServerToInstall) && \ - !defined(OS2Architecture) && \ - !defined(QNX4Architecture) + !defined(OS2Architecture) install:: -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) ServerToInstall X) #endif Index: xc/programs/Xserver/Xserver.man diff -u xc/programs/Xserver/Xserver.man:3.16 xc/programs/Xserver/Xserver.man:3.18 --- xc/programs/Xserver/Xserver.man:3.16 Wed Mar 28 09:35:14 2001 +++ xc/programs/Xserver/Xserver.man Wed Dec 26 14:14:06 2001 @@ -1,7 +1,11 @@ -.\" $Xorg: Xserver.man,v 1.3 2000/08/17 19:47:01 cpqbld Exp $ +.\" $Xorg: Xserver.man,v 1.4 2001/02/09 02:04:07 xorgcvs Exp $ .\" Copyright 1984 - 1991, 1993, 1994, 1998 The Open Group .\" -.\" All Rights Reserved. +.\" Permission to use, copy, modify, distribute, and sell this software and its +.\" documentation for any purpose is hereby granted without fee, provided that +.\" the above copyright notice appear in all copies and that both that +.\" copyright notice and this permission notice appear in supporting +.\" documentation. .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. @@ -18,7 +22,7 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from The Open Group. -.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.16 2001/03/28 14:35:14 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.18 2001/12/26 19:14:06 dawes Exp $ .TH XSERVER 1 __xorgversion__ .SH NAME Xserver \- X Window System display server @@ -269,6 +273,10 @@ .B \-port \fIport-num\fP Use an alternate port number for XDMCP packets. Must be specified before any \-query, \-broadcast or \-indirect options. +.TP 8 +.B \-from \fIlocal-address\fP +Specify the local address to send the XDMCP query from. This +is currently only implemented for direct (\-query) XDMCP queries. .TP 8 .B \-once Causes the server to terminate (rather than reset) when the XDMCP session ends. Index: xc/programs/Xserver/GL/glxmodule.c diff -u xc/programs/Xserver/GL/glxmodule.c:1.10 xc/programs/Xserver/GL/glxmodule.c:1.11 --- xc/programs/Xserver/GL/glxmodule.c:1.10 Tue Apr 10 12:07:54 2001 +++ xc/programs/Xserver/GL/glxmodule.c Fri Jun 15 17:22:38 2001 @@ -25,7 +25,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.10 2001/04/10 16:07:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glxmodule.c,v 1.11 2001/06/15 21:22:38 dawes Exp $ */ /* * Authors: @@ -54,6 +54,1154 @@ initdeps }; +static const char *glcoreSymbols[] = { + "__glCallLists_size", + "__glColorTableParameterfv_size", + "__glColorTableParameteriv_size", + "__glConvolutionParameterfv_size", + "__glConvolutionParameteriv_size", + "__glDDXExtensionInfo", + "__glDDXScreenInfo", + "__glEvalComputeK", + "__glFloorLog2", + "__glFogfv_size", + "__glFogiv_size", + "__glGetBooleanv_size", + "__glGetColorTableParameterfv_size", + "__glGetColorTableParameteriv_size", + "__glGetConvolutionParameterfv_size", + "__glGetConvolutionParameteriv_size", + "__glGetDoublev_size", + "__glGetFloatv_size", + "__glGetHistogramParameterfv_size", + "__glGetHistogramParameteriv_size", + "__glGetIntegerv_size", + "__glGetLightfv_size", + "__glGetLightiv_size", + "__glGetMapdv_size", + "__glGetMapfv_size", + "__glGetMapiv_size", + "__glGetMaterialfv_size", + "__glGetMaterialiv_size", + "__glGetMinmaxParameterfv_size", + "__glGetMinmaxParameteriv_size", + "__glGetPixelMapfv_size", + "__glGetPixelMapuiv_size", + "__glGetPixelMapusv_size", + "__glGetTexEnvfv_size", + "__glGetTexEnviv_size", + "__glGetTexGendv_size", + "__glGetTexGenfv_size", + "__glGetTexGeniv_size", + "__glGetTexImage_size", + "__glGetTexLevelParameterfv_size", + "__glGetTexLevelParameteriv_size", + "__glGetTexParameterfv_size", + "__glGetTexParameteriv_size", + "__glLightModelfv_size", + "__glLightModeliv_size", + "__glLightfv_size", + "__glLightiv_size", + "__glMaterialfv_size", + "__glMaterialiv_size", + "__glReadPixels_size", + "__glTexEnvfv_size", + "__glTexEnviv_size", + "__glTexGendv_size", + "__glTexGenfv_size", + "__glTexGeniv_size", + "__glTexParameterfv_size", + "__glTexParameteriv_size", + "__glXActiveScreens", + "__glXAssociateContext", + "__glXBadContext", + "__glXBadContextState", + "__glXBadContextTag", + "__glXBadCurrentWindow", + "__glXBadDrawable", + "__glXBadLargeRequest", + "__glXBadPixmap", + "__glXBadRenderRequest", + "__glXBitmapReqSize", + "__glXCacheDrawableSize", + "__glXCallListsReqSize", + "__glXClearErrorOccured", + "__glXClientInfo", + "__glXClientRes", + "__glXClients", + "__glXColorSubTableReqSize", + "__glXColorTableParameterfvReqSize", + "__glXColorTableParameterivReqSize", + "__glXColorTableReqSize", + "__glXContextRes", + "__glXConvolutionFilter1DReqSize", + "__glXConvolutionFilter2DReqSize", + "__glXConvolutionParameterfvReqSize", + "__glXConvolutionParameterivReqSize", + "__glXCopyContext", + "__glXCoreType", + "__glXCreateContext", + "__glXCreateGLXPixmap", + "__glXDeassociateContext", + "__glXDestroyContext", + "__glXDestroyGLXPixmap", + "__glXDispSwap_Accum", + "__glXDispSwap_ActiveTextureARB", + "__glXDispSwap_AlphaFunc", + "__glXDispSwap_AreTexturesResident", + "__glXDispSwap_AreTexturesResidentEXT", + "__glXDispSwap_Begin", + "__glXDispSwap_BindTexture", + "__glXDispSwap_Bitmap", + "__glXDispSwap_BlendColor", + "__glXDispSwap_BlendEquation", + "__glXDispSwap_BlendFunc", + "__glXDispSwap_CallList", + "__glXDispSwap_CallLists", + "__glXDispSwap_Clear", + "__glXDispSwap_ClearAccum", + "__glXDispSwap_ClearColor", + "__glXDispSwap_ClearDepth", + "__glXDispSwap_ClearIndex", + "__glXDispSwap_ClearStencil", + "__glXDispSwap_ClipPlane", + "__glXDispSwap_Color3bv", + "__glXDispSwap_Color3dv", + "__glXDispSwap_Color3fv", + "__glXDispSwap_Color3iv", + "__glXDispSwap_Color3sv", + "__glXDispSwap_Color3ubv", + "__glXDispSwap_Color3uiv", + "__glXDispSwap_Color3usv", + "__glXDispSwap_Color4bv", + "__glXDispSwap_Color4dv", + "__glXDispSwap_Color4fv", + "__glXDispSwap_Color4iv", + "__glXDispSwap_Color4sv", + "__glXDispSwap_Color4ubv", + "__glXDispSwap_Color4uiv", + "__glXDispSwap_Color4usv", + "__glXDispSwap_ColorMask", + "__glXDispSwap_ColorMaterial", + "__glXDispSwap_ColorSubTable", + "__glXDispSwap_ColorTable", + "__glXDispSwap_ColorTableParameterfv", + "__glXDispSwap_ColorTableParameteriv", + "__glXDispSwap_ConvolutionFilter1D", + "__glXDispSwap_ConvolutionFilter2D", + "__glXDispSwap_ConvolutionParameterf", + "__glXDispSwap_ConvolutionParameterfv", + "__glXDispSwap_ConvolutionParameteri", + "__glXDispSwap_ConvolutionParameteriv", + "__glXDispSwap_CopyColorSubTable", + "__glXDispSwap_CopyColorTable", + "__glXDispSwap_CopyConvolutionFilter1D", + "__glXDispSwap_CopyConvolutionFilter2D", + "__glXDispSwap_CopyPixels", + "__glXDispSwap_CopyTexImage1D", + "__glXDispSwap_CopyTexImage2D", + "__glXDispSwap_CopyTexSubImage1D", + "__glXDispSwap_CopyTexSubImage2D", + "__glXDispSwap_CopyTexSubImage3D", + "__glXDispSwap_CullFace", + "__glXDispSwap_DeleteLists", + "__glXDispSwap_DeleteTextures", + "__glXDispSwap_DeleteTexturesEXT", + "__glXDispSwap_DepthFunc", + "__glXDispSwap_DepthMask", + "__glXDispSwap_DepthRange", + "__glXDispSwap_Disable", + "__glXDispSwap_DrawArrays", + "__glXDispSwap_DrawArraysEXT", + "__glXDispSwap_DrawBuffer", + "__glXDispSwap_DrawPixels", + "__glXDispSwap_EdgeFlagv", + "__glXDispSwap_Enable", + "__glXDispSwap_End", + "__glXDispSwap_EndList", + "__glXDispSwap_EvalCoord1dv", + "__glXDispSwap_EvalCoord1fv", + "__glXDispSwap_EvalCoord2dv", + "__glXDispSwap_EvalCoord2fv", + "__glXDispSwap_EvalMesh1", + "__glXDispSwap_EvalMesh2", + "__glXDispSwap_EvalPoint1", + "__glXDispSwap_EvalPoint2", + "__glXDispSwap_FeedbackBuffer", + "__glXDispSwap_Finish", + "__glXDispSwap_Flush", + "__glXDispSwap_Fogf", + "__glXDispSwap_Fogfv", + "__glXDispSwap_Fogi", + "__glXDispSwap_Fogiv", + "__glXDispSwap_FrontFace", + "__glXDispSwap_Frustum", + "__glXDispSwap_GenLists", + "__glXDispSwap_GenTextures", + "__glXDispSwap_GenTexturesEXT", + "__glXDispSwap_GetBooleanv", + "__glXDispSwap_GetClipPlane", + "__glXDispSwap_GetColorTable", + "__glXDispSwap_GetColorTableParameterfv", + "__glXDispSwap_GetColorTableParameteriv", + "__glXDispSwap_GetConvolutionFilter", + "__glXDispSwap_GetConvolutionParameterfv", + "__glXDispSwap_GetConvolutionParameteriv", + "__glXDispSwap_GetDoublev", + "__glXDispSwap_GetError", + "__glXDispSwap_GetFloatv", + "__glXDispSwap_GetHistogram", + "__glXDispSwap_GetHistogramParameterfv", + "__glXDispSwap_GetHistogramParameteriv", + "__glXDispSwap_GetIntegerv", + "__glXDispSwap_GetLightfv", + "__glXDispSwap_GetLightiv", + "__glXDispSwap_GetMapdv", + "__glXDispSwap_GetMapfv", + "__glXDispSwap_GetMapiv", + "__glXDispSwap_GetMaterialfv", + "__glXDispSwap_GetMaterialiv", + "__glXDispSwap_GetMinmax", + "__glXDispSwap_GetMinmaxParameterfv", + "__glXDispSwap_GetMinmaxParameteriv", + "__glXDispSwap_GetPixelMapfv", + "__glXDispSwap_GetPixelMapuiv", + "__glXDispSwap_GetPixelMapusv", + "__glXDispSwap_GetPolygonStipple", + "__glXDispSwap_GetSeparableFilter", + "__glXDispSwap_GetString", + "__glXDispSwap_GetTexEnvfv", + "__glXDispSwap_GetTexEnviv", + "__glXDispSwap_GetTexGendv", + "__glXDispSwap_GetTexGenfv", + "__glXDispSwap_GetTexGeniv", + "__glXDispSwap_GetTexImage", + "__glXDispSwap_GetTexLevelParameterfv", + "__glXDispSwap_GetTexLevelParameteriv", + "__glXDispSwap_GetTexParameterfv", + "__glXDispSwap_GetTexParameteriv", + "__glXDispSwap_Hint", + "__glXDispSwap_Histogram", + "__glXDispSwap_IndexMask", + "__glXDispSwap_Indexdv", + "__glXDispSwap_Indexfv", + "__glXDispSwap_Indexiv", + "__glXDispSwap_Indexsv", + "__glXDispSwap_Indexubv", + "__glXDispSwap_InitNames", + "__glXDispSwap_IsEnabled", + "__glXDispSwap_IsList", + "__glXDispSwap_IsTexture", + "__glXDispSwap_IsTextureEXT", + "__glXDispSwap_LightModelf", + "__glXDispSwap_LightModelfv", + "__glXDispSwap_LightModeli", + "__glXDispSwap_LightModeliv", + "__glXDispSwap_Lightf", + "__glXDispSwap_Lightfv", + "__glXDispSwap_Lighti", + "__glXDispSwap_Lightiv", + "__glXDispSwap_LineStipple", + "__glXDispSwap_LineWidth", + "__glXDispSwap_ListBase", + "__glXDispSwap_LoadIdentity", + "__glXDispSwap_LoadMatrixd", + "__glXDispSwap_LoadMatrixf", + "__glXDispSwap_LoadName", + "__glXDispSwap_LogicOp", + "__glXDispSwap_Map1d", + "__glXDispSwap_Map1f", + "__glXDispSwap_Map2d", + "__glXDispSwap_Map2f", + "__glXDispSwap_MapGrid1d", + "__glXDispSwap_MapGrid1f", + "__glXDispSwap_MapGrid2d", + "__glXDispSwap_MapGrid2f", + "__glXDispSwap_Materialf", + "__glXDispSwap_Materialfv", + "__glXDispSwap_Materiali", + "__glXDispSwap_Materialiv", + "__glXDispSwap_MatrixMode", + "__glXDispSwap_Minmax", + "__glXDispSwap_MultMatrixd", + "__glXDispSwap_MultMatrixf", + "__glXDispSwap_MultiTexCoord1dvARB", + "__glXDispSwap_MultiTexCoord1fvARB", + "__glXDispSwap_MultiTexCoord1ivARB", + "__glXDispSwap_MultiTexCoord1svARB", + "__glXDispSwap_MultiTexCoord2dvARB", + "__glXDispSwap_MultiTexCoord2fvARB", + "__glXDispSwap_MultiTexCoord2ivARB", + "__glXDispSwap_MultiTexCoord2svARB", + "__glXDispSwap_MultiTexCoord3dvARB", + "__glXDispSwap_MultiTexCoord3fvARB", + "__glXDispSwap_MultiTexCoord3ivARB", + "__glXDispSwap_MultiTexCoord3svARB", + "__glXDispSwap_MultiTexCoord4dvARB", + "__glXDispSwap_MultiTexCoord4fvARB", + "__glXDispSwap_MultiTexCoord4ivARB", + "__glXDispSwap_MultiTexCoord4svARB", + "__glXDispSwap_NewList", + "__glXDispSwap_Normal3bv", + "__glXDispSwap_Normal3dv", + "__glXDispSwap_Normal3fv", + "__glXDispSwap_Normal3iv", + "__glXDispSwap_Normal3sv", + "__glXDispSwap_Ortho", + "__glXDispSwap_PassThrough", + "__glXDispSwap_PixelMapfv", + "__glXDispSwap_PixelMapuiv", + "__glXDispSwap_PixelMapusv", + "__glXDispSwap_PixelStoref", + "__glXDispSwap_PixelStorei", + "__glXDispSwap_PixelTransferf", + "__glXDispSwap_PixelTransferi", + "__glXDispSwap_PixelZoom", + "__glXDispSwap_PointSize", + "__glXDispSwap_PolygonMode", + "__glXDispSwap_PolygonOffset", + "__glXDispSwap_PolygonStipple", + "__glXDispSwap_PopAttrib", + "__glXDispSwap_PopMatrix", + "__glXDispSwap_PopName", + "__glXDispSwap_PrioritizeTextures", + "__glXDispSwap_PushAttrib", + "__glXDispSwap_PushMatrix", + "__glXDispSwap_PushName", + "__glXDispSwap_RasterPos2dv", + "__glXDispSwap_RasterPos2fv", + "__glXDispSwap_RasterPos2iv", + "__glXDispSwap_RasterPos2sv", + "__glXDispSwap_RasterPos3dv", + "__glXDispSwap_RasterPos3fv", + "__glXDispSwap_RasterPos3iv", + "__glXDispSwap_RasterPos3sv", + "__glXDispSwap_RasterPos4dv", + "__glXDispSwap_RasterPos4fv", + "__glXDispSwap_RasterPos4iv", + "__glXDispSwap_RasterPos4sv", + "__glXDispSwap_ReadBuffer", + "__glXDispSwap_ReadPixels", + "__glXDispSwap_Rectdv", + "__glXDispSwap_Rectfv", + "__glXDispSwap_Rectiv", + "__glXDispSwap_Rectsv", + "__glXDispSwap_RenderMode", + "__glXDispSwap_ResetHistogram", + "__glXDispSwap_ResetMinmax", + "__glXDispSwap_Rotated", + "__glXDispSwap_Rotatef", + "__glXDispSwap_Scaled", + "__glXDispSwap_Scalef", + "__glXDispSwap_Scissor", + "__glXDispSwap_SelectBuffer", + "__glXDispSwap_SeparableFilter2D", + "__glXDispSwap_ShadeModel", + "__glXDispSwap_StencilFunc", + "__glXDispSwap_StencilMask", + "__glXDispSwap_StencilOp", + "__glXDispSwap_TexCoord1dv", + "__glXDispSwap_TexCoord1fv", + "__glXDispSwap_TexCoord1iv", + "__glXDispSwap_TexCoord1sv", + "__glXDispSwap_TexCoord2dv", + "__glXDispSwap_TexCoord2fv", + "__glXDispSwap_TexCoord2iv", + "__glXDispSwap_TexCoord2sv", + "__glXDispSwap_TexCoord3dv", + "__glXDispSwap_TexCoord3fv", + "__glXDispSwap_TexCoord3iv", + "__glXDispSwap_TexCoord3sv", + "__glXDispSwap_TexCoord4dv", + "__glXDispSwap_TexCoord4fv", + "__glXDispSwap_TexCoord4iv", + "__glXDispSwap_TexCoord4sv", + "__glXDispSwap_TexEnvf", + "__glXDispSwap_TexEnvfv", + "__glXDispSwap_TexEnvi", + "__glXDispSwap_TexEnviv", + "__glXDispSwap_TexGend", + "__glXDispSwap_TexGendv", + "__glXDispSwap_TexGenf", + "__glXDispSwap_TexGenfv", + "__glXDispSwap_TexGeni", + "__glXDispSwap_TexGeniv", + "__glXDispSwap_TexImage1D", + "__glXDispSwap_TexImage2D", + "__glXDispSwap_TexImage3D", + "__glXDispSwap_TexParameterf", + "__glXDispSwap_TexParameterfv", + "__glXDispSwap_TexParameteri", + "__glXDispSwap_TexParameteriv", + "__glXDispSwap_TexSubImage1D", + "__glXDispSwap_TexSubImage2D", + "__glXDispSwap_TexSubImage3D", + "__glXDispSwap_Translated", + "__glXDispSwap_Translatef", + "__glXDispSwap_Vertex2dv", + "__glXDispSwap_Vertex2fv", + "__glXDispSwap_Vertex2iv", + "__glXDispSwap_Vertex2sv", + "__glXDispSwap_Vertex3dv", + "__glXDispSwap_Vertex3fv", + "__glXDispSwap_Vertex3iv", + "__glXDispSwap_Vertex3sv", + "__glXDispSwap_Vertex4dv", + "__glXDispSwap_Vertex4fv", + "__glXDispSwap_Vertex4iv", + "__glXDispSwap_Vertex4sv", + "__glXDispSwap_Viewport", + "__glXDisp_Accum", + "__glXDisp_ActiveTextureARB", + "__glXDisp_AlphaFunc", + "__glXDisp_AreTexturesResident", + "__glXDisp_AreTexturesResidentEXT", + "__glXDisp_Begin", + "__glXDisp_BindTexture", + "__glXDisp_Bitmap", + "__glXDisp_BlendColor", + "__glXDisp_BlendEquation", + "__glXDisp_BlendFunc", + "__glXDisp_CallList", + "__glXDisp_CallLists", + "__glXDisp_Clear", + "__glXDisp_ClearAccum", + "__glXDisp_ClearColor", + "__glXDisp_ClearDepth", + "__glXDisp_ClearIndex", + "__glXDisp_ClearStencil", + "__glXDisp_ClipPlane", + "__glXDisp_Color3bv", + "__glXDisp_Color3dv", + "__glXDisp_Color3fv", + "__glXDisp_Color3iv", + "__glXDisp_Color3sv", + "__glXDisp_Color3ubv", + "__glXDisp_Color3uiv", + "__glXDisp_Color3usv", + "__glXDisp_Color4bv", + "__glXDisp_Color4dv", + "__glXDisp_Color4fv", + "__glXDisp_Color4iv", + "__glXDisp_Color4sv", + "__glXDisp_Color4ubv", + "__glXDisp_Color4uiv", + "__glXDisp_Color4usv", + "__glXDisp_ColorMask", + "__glXDisp_ColorMaterial", + "__glXDisp_ColorSubTable", + "__glXDisp_ColorTable", + "__glXDisp_ColorTableParameterfv", + "__glXDisp_ColorTableParameteriv", + "__glXDisp_ConvolutionFilter1D", + "__glXDisp_ConvolutionFilter2D", + "__glXDisp_ConvolutionParameterf", + "__glXDisp_ConvolutionParameterfv", + "__glXDisp_ConvolutionParameteri", + "__glXDisp_ConvolutionParameteriv", + "__glXDisp_CopyColorSubTable", + "__glXDisp_CopyColorTable", + "__glXDisp_CopyConvolutionFilter1D", + "__glXDisp_CopyConvolutionFilter2D", + "__glXDisp_CopyPixels", + "__glXDisp_CopyTexImage1D", + "__glXDisp_CopyTexImage2D", + "__glXDisp_CopyTexSubImage1D", + "__glXDisp_CopyTexSubImage2D", + "__glXDisp_CopyTexSubImage3D", + "__glXDisp_CullFace", + "__glXDisp_DeleteLists", + "__glXDisp_DeleteTextures", + "__glXDisp_DeleteTexturesEXT", + "__glXDisp_DepthFunc", + "__glXDisp_DepthMask", + "__glXDisp_DepthRange", + "__glXDisp_Disable", + "__glXDisp_DrawArrays", + "__glXDisp_DrawArraysEXT", + "__glXDisp_DrawBuffer", + "__glXDisp_DrawPixels", + "__glXDisp_EdgeFlagv", + "__glXDisp_Enable", + "__glXDisp_End", + "__glXDisp_EndList", + "__glXDisp_EvalCoord1dv", + "__glXDisp_EvalCoord1fv", + "__glXDisp_EvalCoord2dv", + "__glXDisp_EvalCoord2fv", + "__glXDisp_EvalMesh1", + "__glXDisp_EvalMesh2", + "__glXDisp_EvalPoint1", + "__glXDisp_EvalPoint2", + "__glXDisp_FeedbackBuffer", + "__glXDisp_Finish", + "__glXDisp_Flush", + "__glXDisp_Fogf", + "__glXDisp_Fogfv", + "__glXDisp_Fogi", + "__glXDisp_Fogiv", + "__glXDisp_FrontFace", + "__glXDisp_Frustum", + "__glXDisp_GenLists", + "__glXDisp_GenTextures", + "__glXDisp_GenTexturesEXT", + "__glXDisp_GetBooleanv", + "__glXDisp_GetClipPlane", + "__glXDisp_GetColorTable", + "__glXDisp_GetColorTableParameterfv", + "__glXDisp_GetColorTableParameteriv", + "__glXDisp_GetConvolutionFilter", + "__glXDisp_GetConvolutionParameterfv", + "__glXDisp_GetConvolutionParameteriv", + "__glXDisp_GetDoublev", + "__glXDisp_GetError", + "__glXDisp_GetFloatv", + "__glXDisp_GetHistogram", + "__glXDisp_GetHistogramParameterfv", + "__glXDisp_GetHistogramParameteriv", + "__glXDisp_GetIntegerv", + "__glXDisp_GetLightfv", + "__glXDisp_GetLightiv", + "__glXDisp_GetMapdv", + "__glXDisp_GetMapfv", + "__glXDisp_GetMapiv", + "__glXDisp_GetMaterialfv", + "__glXDisp_GetMaterialiv", + "__glXDisp_GetMinmax", + "__glXDisp_GetMinmaxParameterfv", + "__glXDisp_GetMinmaxParameteriv", + "__glXDisp_GetPixelMapfv", + "__glXDisp_GetPixelMapuiv", + "__glXDisp_GetPixelMapusv", + "__glXDisp_GetPolygonStipple", + "__glXDisp_GetSeparableFilter", + "__glXDisp_GetString", + "__glXDisp_GetTexEnvfv", + "__glXDisp_GetTexEnviv", + "__glXDisp_GetTexGendv", + "__glXDisp_GetTexGenfv", + "__glXDisp_GetTexGeniv", + "__glXDisp_GetTexImage", + "__glXDisp_GetTexLevelParameterfv", + "__glXDisp_GetTexLevelParameteriv", + "__glXDisp_GetTexParameterfv", + "__glXDisp_GetTexParameteriv", + "__glXDisp_Hint", + "__glXDisp_Histogram", + "__glXDisp_IndexMask", + "__glXDisp_Indexdv", + "__glXDisp_Indexfv", + "__glXDisp_Indexiv", + "__glXDisp_Indexsv", + "__glXDisp_Indexubv", + "__glXDisp_InitNames", + "__glXDisp_IsEnabled", + "__glXDisp_IsList", + "__glXDisp_IsTexture", + "__glXDisp_IsTextureEXT", + "__glXDisp_LightModelf", + "__glXDisp_LightModelfv", + "__glXDisp_LightModeli", + "__glXDisp_LightModeliv", + "__glXDisp_Lightf", + "__glXDisp_Lightfv", + "__glXDisp_Lighti", + "__glXDisp_Lightiv", + "__glXDisp_LineStipple", + "__glXDisp_LineWidth", + "__glXDisp_ListBase", + "__glXDisp_LoadIdentity", + "__glXDisp_LoadMatrixd", + "__glXDisp_LoadMatrixf", + "__glXDisp_LoadName", + "__glXDisp_LogicOp", + "__glXDisp_Map1d", + "__glXDisp_Map1f", + "__glXDisp_Map2d", + "__glXDisp_Map2f", + "__glXDisp_MapGrid1d", + "__glXDisp_MapGrid1f", + "__glXDisp_MapGrid2d", + "__glXDisp_MapGrid2f", + "__glXDisp_Materialf", + "__glXDisp_Materialfv", + "__glXDisp_Materiali", + "__glXDisp_Materialiv", + "__glXDisp_MatrixMode", + "__glXDisp_Minmax", + "__glXDisp_MultMatrixd", + "__glXDisp_MultMatrixf", + "__glXDisp_MultiTexCoord1dvARB", + "__glXDisp_MultiTexCoord1fvARB", + "__glXDisp_MultiTexCoord1ivARB", + "__glXDisp_MultiTexCoord1svARB", + "__glXDisp_MultiTexCoord2dvARB", + "__glXDisp_MultiTexCoord2fvARB", + "__glXDisp_MultiTexCoord2ivARB", + "__glXDisp_MultiTexCoord2svARB", + "__glXDisp_MultiTexCoord3dvARB", + "__glXDisp_MultiTexCoord3fvARB", + "__glXDisp_MultiTexCoord3ivARB", + "__glXDisp_MultiTexCoord3svARB", + "__glXDisp_MultiTexCoord4dvARB", + "__glXDisp_MultiTexCoord4fvARB", + "__glXDisp_MultiTexCoord4ivARB", + "__glXDisp_MultiTexCoord4svARB", + "__glXDisp_NewList", + "__glXDisp_Normal3bv", + "__glXDisp_Normal3dv", + "__glXDisp_Normal3fv", + "__glXDisp_Normal3iv", + "__glXDisp_Normal3sv", + "__glXDisp_Ortho", + "__glXDisp_PassThrough", + "__glXDisp_PixelMapfv", + "__glXDisp_PixelMapuiv", + "__glXDisp_PixelMapusv", + "__glXDisp_PixelStoref", + "__glXDisp_PixelStorei", + "__glXDisp_PixelTransferf", + "__glXDisp_PixelTransferi", + "__glXDisp_PixelZoom", + "__glXDisp_PointSize", + "__glXDisp_PolygonMode", + "__glXDisp_PolygonOffset", + "__glXDisp_PolygonStipple", + "__glXDisp_PopAttrib", + "__glXDisp_PopMatrix", + "__glXDisp_PopName", + "__glXDisp_PrioritizeTextures", + "__glXDisp_PushAttrib", + "__glXDisp_PushMatrix", + "__glXDisp_PushName", + "__glXDisp_RasterPos2dv", + "__glXDisp_RasterPos2fv", + "__glXDisp_RasterPos2iv", + "__glXDisp_RasterPos2sv", + "__glXDisp_RasterPos3dv", + "__glXDisp_RasterPos3fv", + "__glXDisp_RasterPos3iv", + "__glXDisp_RasterPos3sv", + "__glXDisp_RasterPos4dv", + "__glXDisp_RasterPos4fv", + "__glXDisp_RasterPos4iv", + "__glXDisp_RasterPos4sv", + "__glXDisp_ReadBuffer", + "__glXDisp_ReadPixels", + "__glXDisp_Rectdv", + "__glXDisp_Rectfv", + "__glXDisp_Rectiv", + "__glXDisp_Rectsv", + "__glXDisp_RenderMode", + "__glXDisp_ResetHistogram", + "__glXDisp_ResetMinmax", + "__glXDisp_Rotated", + "__glXDisp_Rotatef", + "__glXDisp_Scaled", + "__glXDisp_Scalef", + "__glXDisp_Scissor", + "__glXDisp_SelectBuffer", + "__glXDisp_SeparableFilter2D", + "__glXDisp_ShadeModel", + "__glXDisp_StencilFunc", + "__glXDisp_StencilMask", + "__glXDisp_StencilOp", + "__glXDisp_TexCoord1dv", + "__glXDisp_TexCoord1fv", + "__glXDisp_TexCoord1iv", + "__glXDisp_TexCoord1sv", + "__glXDisp_TexCoord2dv", + "__glXDisp_TexCoord2fv", + "__glXDisp_TexCoord2iv", + "__glXDisp_TexCoord2sv", + "__glXDisp_TexCoord3dv", + "__glXDisp_TexCoord3fv", + "__glXDisp_TexCoord3iv", + "__glXDisp_TexCoord3sv", + "__glXDisp_TexCoord4dv", + "__glXDisp_TexCoord4fv", + "__glXDisp_TexCoord4iv", + "__glXDisp_TexCoord4sv", + "__glXDisp_TexEnvf", + "__glXDisp_TexEnvfv", + "__glXDisp_TexEnvi", + "__glXDisp_TexEnviv", + "__glXDisp_TexGend", + "__glXDisp_TexGendv", + "__glXDisp_TexGenf", + "__glXDisp_TexGenfv", + "__glXDisp_TexGeni", + "__glXDisp_TexGeniv", + "__glXDisp_TexImage1D", + "__glXDisp_TexImage2D", + "__glXDisp_TexImage3D", + "__glXDisp_TexParameterf", + "__glXDisp_TexParameterfv", + "__glXDisp_TexParameteri", + "__glXDisp_TexParameteriv", + "__glXDisp_TexSubImage1D", + "__glXDisp_TexSubImage2D", + "__glXDisp_TexSubImage3D", + "__glXDisp_Translated", + "__glXDisp_Translatef", + "__glXDisp_Vertex2dv", + "__glXDisp_Vertex2fv", + "__glXDisp_Vertex2iv", + "__glXDisp_Vertex2sv", + "__glXDisp_Vertex3dv", + "__glXDisp_Vertex3fv", + "__glXDisp_Vertex3iv", + "__glXDisp_Vertex3sv", + "__glXDisp_Vertex4dv", + "__glXDisp_Vertex4fv", + "__glXDisp_Vertex4iv", + "__glXDisp_Vertex4sv", + "__glXDisp_Viewport", + "__glXDrawArraysSize", + "__glXDrawPixelsReqSize", + "__glXDrawableRes", + "__glXErrorOccured", + "__glXFBInitDrawable", + "__glXFBMemSwapBuffers", + "__glXFindDrawablePrivate", + "__glXFogfvReqSize", + "__glXFogivReqSize", + "__glXForceCurrent", + "__glXFormatGLModes", + "__glXFree", + "__glXFreeBuffers", + "__glXFreeContext", + "__glXGetDrawablePrivate", + "__glXGetVisualConfigs", + "__glXImageSize", + "__glXImpAtoi", + "__glXImpCalloc", + "__glXImpFatal", + "__glXImpFclose", + "__glXImpFopen", + "__glXImpFprintf", + "__glXImpFree", + "__glXImpGetDrawablePrivate", + "__glXImpGetenv", + "__glXImpMalloc", + "__glXImpRealloc", + "__glXImpSprintf", + "__glXImpWarning", + "__glXInitFB", + "__glXInitMem", + "__glXInitPix", + "__glXIsDirect", + "__glXLastContext", + "__glXLightModelfvReqSize", + "__glXLightModelivReqSize", + "__glXLightfvReqSize", + "__glXLightivReqSize", + "__glXLookupContextByTag", + "__glXMakeCurrent", + "__glXMalloc", + "__glXMap1dReqSize", + "__glXMap1fReqSize", + "__glXMap2dReqSize", + "__glXMap2fReqSize", + "__glXMaterialfvReqSize", + "__glXMaterialivReqSize", + "__glXNoSuchRenderOpcode", + "__glXNoSuchSingleOpcode", + "__glXNop", + "__glXPixInitDrawable", + "__glXPixelMapfvReqSize", + "__glXPixelMapuivReqSize", + "__glXPixelMapusvReqSize", + "__glXPixmapRes", + "__glXPrioritizeTexturesReqSize", + "__glXQueryContextInfoEXT", + "__glXQueryExtensionsString", + "__glXQueryServerString", + "__glXQueryVersion", + "__glXRealloc", + "__glXRender", + "__glXRenderLarge", + "__glXRenderSizeTable", + "__glXRenderSizeTable_EXT", + "__glXRenderTable", + "__glXRenderTable_EXT", + "__glXReply", + "__glXResetLargeCommandStatus", + "__glXResizeBuffers", + "__glXResizeDrawableBuffers", + "__glXScreenInit", + "__glXScreenReset", + "__glXSeparableFilter2DReqSize", + "__glXSingleTable", + "__glXSwapBuffers", + "__glXSwapClientInfo", + "__glXSwapCopyContext", + "__glXSwapCreateContext", + "__glXSwapCreateGLXPixmap", + "__glXSwapDestroyContext", + "__glXSwapDestroyGLXPixmap", + "__glXSwapGetVisualConfigs", + "__glXSwapIsDirect", + "__glXSwapIsDirectReply", + "__glXSwapMakeCurrent", + "__glXSwapMakeCurrentReply", + "__glXSwapQueryContextInfoEXTReply", + "__glXSwapQueryExtensionsString", + "__glXSwapQueryServerString", + "__glXSwapQueryVersion", + "__glXSwapQueryVersionReply", + "__glXSwapRender", + "__glXSwapRenderLarge", + "__glXSwapRenderTable", + "__glXSwapRenderTable_EXT", + "__glXSwapSingleTable", + "__glXSwapSwapBuffers", + "__glXSwapUseXFont", + "__glXSwapVendorPrivTable_EXT", + "__glXSwapVendorPrivate", + "__glXSwapVendorPrivateWithReply", + "__glXSwapWaitGL", + "__glXSwapWaitX", + "__glXTexEnvfvReqSize", + "__glXTexEnvivReqSize", + "__glXTexGendvReqSize", + "__glXTexGenfvReqSize", + "__glXTexGenivReqSize", + "__glXTexImage1DReqSize", + "__glXTexImage2DReqSize", + "__glXTexImage3DReqSize", + "__glXTexParameterfvReqSize", + "__glXTexParameterivReqSize", + "__glXTexSubImage1DReqSize", + "__glXTexSubImage2DReqSize", + "__glXTexSubImage3DReqSize", + "__glXTypeSize", + "__glXUnrefDrawablePrivate", + "__glXUnsupportedPrivateRequest", + "__glXUseXFont", + "__glXVendorPrivTable_EXT", + "__glXVendorPrivate", + "__glXVendorPrivateWithReply", + "__glXWaitGL", + "__glXWaitX", + "__glXcombine_strings", + "glAccum", + "glActiveTextureARB", + "glAlphaFunc", + "glAreTexturesResident", + "glAreTexturesResidentEXT", + "glBegin", + "glBindTexture", + "glBitmap", + "glBlendColor", + "glBlendEquation", + "glBlendFunc", + "glCallList", + "glCallLists", + "glClear", + "glClearAccum", + "glClearColor", + "glClearDepth", + "glClearIndex", + "glClearStencil", + "glClipPlane", + "glColor3bv", + "glColor3dv", + "glColor3fv", + "glColor3iv", + "glColor3sv", + "glColor3ubv", + "glColor3uiv", + "glColor3usv", + "glColor4bv", + "glColor4dv", + "glColor4fv", + "glColor4iv", + "glColor4sv", + "glColor4ubv", + "glColor4uiv", + "glColor4usv", + "glColorMask", + "glColorMaterial", + "glColorPointer", + "glColorSubTable", + "glColorTable", + "glColorTableParameterfv", + "glColorTableParameteriv", + "glConvolutionFilter1D", + "glConvolutionFilter2D", + "glConvolutionParameterf", + "glConvolutionParameterfv", + "glConvolutionParameteri", + "glConvolutionParameteriv", + "glCopyColorSubTable", + "glCopyColorTable", + "glCopyConvolutionFilter1D", + "glCopyConvolutionFilter2D", + "glCopyPixels", + "glCopyTexImage1D", + "glCopyTexImage2D", + "glCopyTexSubImage1D", + "glCopyTexSubImage2D", + "glCopyTexSubImage3D", + "glCullFace", + "glDeleteLists", + "glDeleteTextures", + "glDeleteTexturesEXT", + "glDepthFunc", + "glDepthMask", + "glDepthRange", + "glDisable", + "glDisableClientState", + "glDrawArrays", + "glDrawBuffer", + "glDrawPixels", + "glEdgeFlagPointer", + "glEdgeFlagv", + "glEnable", + "glEnableClientState", + "glEnd", + "glEndList", + "glEvalCoord1dv", + "glEvalCoord1fv", + "glEvalCoord2dv", + "glEvalCoord2fv", + "glEvalMesh1", + "glEvalMesh2", + "glEvalPoint1", + "glEvalPoint2", + "glFeedbackBuffer", + "glFinish", + "glFlush", + "glFogf", + "glFogfv", + "glFogi", + "glFogiv", + "glFrontFace", + "glFrustum", + "glGenLists", + "glGenTextures", + "glGenTexturesEXT", + "glGetBooleanv", + "glGetClipPlane", + "glGetColorTable", + "glGetColorTableParameterfv", + "glGetColorTableParameteriv", + "glGetConvolutionFilter", + "glGetConvolutionParameterfv", + "glGetConvolutionParameteriv", + "glGetDoublev", + "glGetError", + "glGetFloatv", + "glGetHistogram", + "glGetHistogramParameterfv", + "glGetHistogramParameteriv", + "glGetIntegerv", + "glGetLightfv", + "glGetLightiv", + "glGetMapdv", + "glGetMapfv", + "glGetMapiv", + "glGetMaterialfv", + "glGetMaterialiv", + "glGetMinmax", + "glGetMinmaxParameterfv", + "glGetMinmaxParameteriv", + "glGetPixelMapfv", + "glGetPixelMapuiv", + "glGetPixelMapusv", + "glGetPolygonStipple", + "glGetSeparableFilter", + "glGetString", + "glGetTexEnvfv", + "glGetTexEnviv", + "glGetTexGendv", + "glGetTexGenfv", + "glGetTexGeniv", + "glGetTexImage", + "glGetTexLevelParameterfv", + "glGetTexLevelParameteriv", + "glGetTexParameterfv", + "glGetTexParameteriv", + "glHint", + "glHistogram", + "glIndexMask", + "glIndexPointer", + "glIndexdv", + "glIndexfv", + "glIndexiv", + "glIndexsv", + "glIndexubv", + "glInitNames", + "glIsEnabled", + "glIsList", + "glIsTexture", + "glIsTextureEXT", + "glLightModelf", + "glLightModelfv", + "glLightModeli", + "glLightModeliv", + "glLightf", + "glLightfv", + "glLighti", + "glLightiv", + "glLineStipple", + "glLineWidth", + "glListBase", + "glLoadIdentity", + "glLoadMatrixd", + "glLoadMatrixf", + "glLoadName", + "glLogicOp", + "glMap1d", + "glMap1f", + "glMap2d", + "glMap2f", + "glMapGrid1d", + "glMapGrid1f", + "glMapGrid2d", + "glMapGrid2f", + "glMaterialf", + "glMaterialfv", + "glMateriali", + "glMaterialiv", + "glMatrixMode", + "glMinmax", + "glMultMatrixd", + "glMultMatrixf", + "glMultiTexCoord1dvARB", + "glMultiTexCoord1fvARB", + "glMultiTexCoord1ivARB", + "glMultiTexCoord1svARB", + "glMultiTexCoord2dvARB", + "glMultiTexCoord2fvARB", + "glMultiTexCoord2ivARB", + "glMultiTexCoord2svARB", + "glMultiTexCoord3dvARB", + "glMultiTexCoord3fvARB", + "glMultiTexCoord3ivARB", + "glMultiTexCoord3svARB", + "glMultiTexCoord4dvARB", + "glMultiTexCoord4fvARB", + "glMultiTexCoord4ivARB", + "glMultiTexCoord4svARB", + "glNewList", + "glNormal3bv", + "glNormal3dv", + "glNormal3fv", + "glNormal3iv", + "glNormal3sv", + "glNormalPointer", + "glOrtho", + "glPassThrough", + "glPixelMapfv", + "glPixelMapuiv", + "glPixelMapusv", + "glPixelStoref", + "glPixelStorei", + "glPixelTransferf", + "glPixelTransferi", + "glPixelZoom", + "glPointSize", + "glPolygonMode", + "glPolygonOffset", + "glPolygonStipple", + "glPopAttrib", + "glPopMatrix", + "glPopName", + "glPrioritizeTextures", + "glPushAttrib", + "glPushMatrix", + "glPushName", + "glRasterPos2dv", + "glRasterPos2fv", + "glRasterPos2iv", + "glRasterPos2sv", + "glRasterPos3dv", + "glRasterPos3fv", + "glRasterPos3iv", + "glRasterPos3sv", + "glRasterPos4dv", + "glRasterPos4fv", + "glRasterPos4iv", + "glRasterPos4sv", + "glReadBuffer", + "glReadPixels", + "glRectdv", + "glRectfv", + "glRectiv", + "glRectsv", + "glRenderMode", + "glResetHistogram", + "glResetMinmax", + "glRotated", + "glRotatef", + "glScaled", + "glScalef", + "glScissor", + "glSelectBuffer", + "glSeparableFilter2D", + "glShadeModel", + "glStencilFunc", + "glStencilMask", + "glStencilOp", + "glTexCoord1dv", + "glTexCoord1fv", + "glTexCoord1iv", + "glTexCoord1sv", + "glTexCoord2dv", + "glTexCoord2fv", + "glTexCoord2iv", + "glTexCoord2sv", + "glTexCoord3dv", + "glTexCoord3fv", + "glTexCoord3iv", + "glTexCoord3sv", + "glTexCoord4dv", + "glTexCoord4fv", + "glTexCoord4iv", + "glTexCoord4sv", + "glTexCoordPointer", + "glTexEnvf", + "glTexEnvfv", + "glTexEnvi", + "glTexEnviv", + "glTexGend", + "glTexGendv", + "glTexGenf", + "glTexGenfv", + "glTexGeni", + "glTexGeniv", + "glTexImage1D", + "glTexImage2D", + "glTexImage3D", + "glTexParameterf", + "glTexParameterfv", + "glTexParameteri", + "glTexParameteriv", + "glTexSubImage1D", + "glTexSubImage2D", + "glTexSubImage3D", + "glTranslated", + "glTranslatef", + "glVertex2dv", + "glVertex2fv", + "glVertex2iv", + "glVertex2sv", + "glVertex3dv", + "glVertex3fv", + "glVertex3iv", + "glVertex3sv", + "glVertex4dv", + "glVertex4fv", + "glVertex4iv", + "glVertex4sv", + "glVertexPointer", + "glViewport", + "glxSwapQueryExtensionsStringReply", + "glxSwapQueryServerStringReply", + NULL +}; static XF86ModuleVersionInfo VersRec = { @@ -88,18 +1236,18 @@ GLcore = LoadSubModule(module, GLcoreName, NULL, NULL, NULL, NULL, errmaj, errmin); if (!GLcore) { - ErrorF("Cannot load the GL core library: %s\n", GLcoreName); + if (errmaj) *errmaj = LDR_NOSUBENT; } else { + LoaderReqSymLists(glcoreSymbols, NULL); LoadExtension(&GLXExt, FALSE); - /* Wrap the init visuals routine in micmap.c */ GlxWrapInitVisuals(&miInitVisualsProc); /* Make sure this gets wrapped each time InitVisualWrap is called */ miHookInitVisuals(NULL, GlxWrapInitVisuals); } + } else { + if (errmaj) *errmaj = LDR_ONCEONLY; } - - if (errmaj) *errmaj = LDR_ONCEONLY; /* Need a non-NULL return value to indicate success */ return GLcore; } Index: xc/programs/Xserver/GL/dri/dri.c diff -u xc/programs/Xserver/GL/dri/dri.c:1.31 xc/programs/Xserver/GL/dri/dri.c:1.34 --- xc/programs/Xserver/GL/dri/dri.c:1.31 Tue Apr 10 12:07:54 2001 +++ xc/programs/Xserver/GL/dri/dri.c Mon Dec 10 14:07:19 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.31 2001/04/10 16:07:54 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.34 2001/12/10 19:07:19 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -66,7 +66,7 @@ #include "mi.h" #include "mipointer.h" -#if defined(XFree86LOADER) || defined(PANORAMIX) +#if defined(XFree86LOADER) && !defined(PANORAMIX) extern Bool noPanoramiXExtension; #endif @@ -91,6 +91,7 @@ This will make it easy to turn off some messages later, based on verbosity level. */ + /* * Since we're already referencing things from the XFree86 common layer in * this file, we'd might as well just call xf86VDrvMsgVerb, and have @@ -111,11 +112,12 @@ Bool DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) { - DRIScreenPrivPtr pDRIPriv; + DRIScreenPrivPtr pDRIPriv; drmContextPtr reserved; int reserved_count; - int i, fd, drmWasAvailable; + int i, fd, drmWasAvailable; Bool xineramaInCore = FALSE; + int err = 0; if (DRIGeneration != serverGeneration) { if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) @@ -147,7 +149,7 @@ drmWasAvailable = drmAvailable(); /* Note that drmOpen will try to load the kernel module, if needed. */ - fd = drmOpen(pDRIInfo->drmDriverName, NULL /*pDRIInfo->busIdString*/); + fd = drmOpen(pDRIInfo->drmDriverName, NULL ); if (fd < 0) { /* failed to open DRM */ pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; @@ -159,7 +161,7 @@ if (!drmWasAvailable) { /* drmOpen loaded the kernel module, print a message to say so */ DRIDrvMsg(pScreen->myNum, X_INFO, - "[drm] loaded kernel module \"%s\"\n", + "[drm] loaded kernel module for \"%s\" driver\n", pDRIInfo->drmDriverName); } @@ -179,13 +181,13 @@ pDRIPriv->createDummyCtx = pDRIInfo->createDummyCtx; pDRIPriv->createDummyCtxPriv = pDRIInfo->createDummyCtxPriv; - if (drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString) < 0) { + if ((err = drmSetBusid(pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString)) < 0) { pDRIPriv->directRenderingSupport = FALSE; pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; drmClose(pDRIPriv->drmFD); DRIDrvMsg(pScreen->myNum, X_INFO, - "[drm] drmSetBusid failed (%d, %s)\n", - pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString); + "[drm] drmSetBusid failed (%d, %s), %s\n", + pDRIPriv->drmFD, pDRIPriv->pDriverInfo->busIdString, strerror(-err)); return FALSE; } @@ -474,6 +476,7 @@ } drmClose(pDRIPriv->drmFD); + xfree(pDRIPriv); pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; } Index: xc/programs/Xserver/GL/dri/drimodule.c diff -u xc/programs/Xserver/GL/dri/drimodule.c:1.4 xc/programs/Xserver/GL/dri/drimodule.c:1.6 --- xc/programs/Xserver/GL/dri/drimodule.c:1.4 Tue Apr 10 12:07:55 2001 +++ xc/programs/Xserver/GL/dri/drimodule.c Mon Dec 10 14:07:19 2001 @@ -24,7 +24,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.4 2001/04/10 16:07:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/drimodule.c,v 1.6 2001/12/10 19:07:19 dawes Exp $ */ /* * Authors: @@ -64,8 +64,29 @@ NULL }; -static const char *glxSymbols[] = { - "__glXActiveScreens", +static const char *drmSymbols[] = { + "drmAddContextTag", + "drmAddMap", + "drmAuthMagic", + "drmAvailable", + "drmClose", + "drmCreateContext", + "drmCreateDrawable", + "drmDelContextTag", + "drmDestroyContext", + "drmDestroyDrawable", + "drmFreeReservedContextList", + "drmGetContextTag", + "drmGetLock", + "drmGetReservedContextList", + "drmInstallSIGIOHandler", + "drmMap", + "drmOpen", + "drmRemoveSIGIOHandler", + "drmSetBusid", + "drmSetContextFlags", + "drmUnlock", + "drmUnmap", NULL }; @@ -80,18 +101,20 @@ if (!setupDone) { setupDone = TRUE; - LoaderRefSymLists(glxSymbols, NULL); - drm = LoadSubModule(module, "drm", NULL, NULL, NULL, NULL, errmaj, errmin); - if (!drm) - ErrorF("Cannot load the drm library\n"); - else + if (!drm) { + if (errmaj) *errmaj = LDR_NOSUBENT; + } + else { + LoaderReqSymLists(drmSymbols, NULL); + LoaderRefSymbols("noPanoramiXExtension", NULL); LoadExtension(&XF86DRIExt, FALSE); + } + } else { + if (errmaj) *errmaj = LDR_ONCEONLY; } - - if (errmaj) *errmaj = LDR_ONCEONLY; /* Need a non-NULL return value to indicate success */ return drm; } Index: xc/programs/Xserver/GL/dri/sarea.h diff -u xc/programs/Xserver/GL/dri/sarea.h:1.9 xc/programs/Xserver/GL/dri/sarea.h:1.10 --- xc/programs/Xserver/GL/dri/sarea.h:1.9 Wed Mar 21 11:21:40 2001 +++ xc/programs/Xserver/GL/dri/sarea.h Thu Oct 4 14:28:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.9 2001/03/21 16:21:40 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.10 2001/10/04 18:28:20 alanh Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -46,7 +46,8 @@ #elif defined(__ia64__) #define SAREA_MAX 0x10000 /* 64kB */ #else -#define SAREA_MAX 0x1000 +/* Intel 830M driver needs at least 8k SAREA */ +#define SAREA_MAX 0x2000 #endif #define SAREA_MAX_DRAWABLES 256 Index: xc/programs/Xserver/GL/glx/g_renderswap.c diff -u xc/programs/Xserver/GL/glx/g_renderswap.c:1.4 xc/programs/Xserver/GL/glx/g_renderswap.c:1.5 --- xc/programs/Xserver/GL/glx/g_renderswap.c:1.4 Wed Mar 21 11:29:35 2001 +++ xc/programs/Xserver/GL/glx/g_renderswap.c Mon Jan 14 17:47:08 2002 @@ -1,5 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_renderswap.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -73,9 +72,6 @@ void __glXDispSwap_Color3bv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glColor3bv( (GLbyte *)(pc + 0) ); @@ -84,8 +80,8 @@ void __glXDispSwap_Color3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 24); @@ -102,6 +98,7 @@ void __glXDispSwap_Color3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -113,6 +110,7 @@ void __glXDispSwap_Color3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -124,6 +122,7 @@ void __glXDispSwap_Color3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -134,9 +133,6 @@ void __glXDispSwap_Color3ubv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glColor3ubv( (GLubyte *)(pc + 0) ); @@ -145,6 +141,7 @@ void __glXDispSwap_Color3uiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -156,6 +153,7 @@ void __glXDispSwap_Color3usv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -166,9 +164,6 @@ void __glXDispSwap_Color4bv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glColor4bv( (GLbyte *)(pc + 0) ); @@ -177,6 +172,7 @@ void __glXDispSwap_Color4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -195,6 +191,7 @@ void __glXDispSwap_Color4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -206,6 +203,7 @@ void __glXDispSwap_Color4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -217,6 +215,7 @@ void __glXDispSwap_Color4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -227,9 +226,6 @@ void __glXDispSwap_Color4ubv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glColor4ubv( (GLubyte *)(pc + 0) ); @@ -238,6 +234,7 @@ void __glXDispSwap_Color4uiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -249,6 +246,7 @@ void __glXDispSwap_Color4usv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -259,9 +257,6 @@ void __glXDispSwap_EdgeFlagv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glEdgeFlagv( (GLboolean *)(pc + 0) ); @@ -269,9 +264,6 @@ void __glXDispSwap_End(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glEnd( ); } @@ -279,7 +271,7 @@ void __glXDispSwap_Indexdv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -297,6 +289,7 @@ void __glXDispSwap_Indexfv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); @@ -308,6 +301,7 @@ void __glXDispSwap_Indexiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 1); @@ -319,6 +313,7 @@ void __glXDispSwap_Indexsv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 1); @@ -329,9 +324,6 @@ void __glXDispSwap_Normal3bv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glNormal3bv( (GLbyte *)(pc + 0) ); @@ -340,8 +332,8 @@ void __glXDispSwap_Normal3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 24); @@ -358,6 +350,7 @@ void __glXDispSwap_Normal3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -369,6 +362,7 @@ void __glXDispSwap_Normal3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -380,6 +374,7 @@ void __glXDispSwap_Normal3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -391,7 +386,7 @@ void __glXDispSwap_RasterPos2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -409,6 +404,7 @@ void __glXDispSwap_RasterPos2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -420,6 +416,7 @@ void __glXDispSwap_RasterPos2iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); @@ -431,6 +428,7 @@ void __glXDispSwap_RasterPos2sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); @@ -442,8 +440,8 @@ void __glXDispSwap_RasterPos3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 24); @@ -460,6 +458,7 @@ void __glXDispSwap_RasterPos3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -471,6 +470,7 @@ void __glXDispSwap_RasterPos3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -482,6 +482,7 @@ void __glXDispSwap_RasterPos3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -493,7 +494,7 @@ void __glXDispSwap_RasterPos4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -511,6 +512,7 @@ void __glXDispSwap_RasterPos4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -522,6 +524,7 @@ void __glXDispSwap_RasterPos4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -533,6 +536,7 @@ void __glXDispSwap_RasterPos4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -544,8 +548,8 @@ void __glXDispSwap_Rectdv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 32); @@ -564,6 +568,7 @@ void __glXDispSwap_Rectfv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); __GLX_SWAP_FLOAT_ARRAY(pc + 8, 2); @@ -577,6 +582,7 @@ void __glXDispSwap_Rectiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); __GLX_SWAP_INT_ARRAY(pc + 8, 2); @@ -590,6 +596,7 @@ void __glXDispSwap_Rectsv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); __GLX_SWAP_SHORT_ARRAY(pc + 4, 2); @@ -603,7 +610,7 @@ void __glXDispSwap_TexCoord1dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -621,6 +628,7 @@ void __glXDispSwap_TexCoord1fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); @@ -632,6 +640,7 @@ void __glXDispSwap_TexCoord1iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 1); @@ -643,6 +652,7 @@ void __glXDispSwap_TexCoord1sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 1); @@ -654,7 +664,7 @@ void __glXDispSwap_TexCoord2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -672,6 +682,7 @@ void __glXDispSwap_TexCoord2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -683,6 +694,7 @@ void __glXDispSwap_TexCoord2iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); @@ -694,6 +706,7 @@ void __glXDispSwap_TexCoord2sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); @@ -705,8 +718,8 @@ void __glXDispSwap_TexCoord3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 24); @@ -723,6 +736,7 @@ void __glXDispSwap_TexCoord3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -734,6 +748,7 @@ void __glXDispSwap_TexCoord3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -745,6 +760,7 @@ void __glXDispSwap_TexCoord3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -756,7 +772,7 @@ void __glXDispSwap_TexCoord4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -774,6 +790,7 @@ void __glXDispSwap_TexCoord4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -785,6 +802,7 @@ void __glXDispSwap_TexCoord4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -796,6 +814,7 @@ void __glXDispSwap_TexCoord4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -807,8 +826,8 @@ void __glXDispSwap_Vertex2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 16); @@ -825,6 +844,7 @@ void __glXDispSwap_Vertex2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -836,6 +856,7 @@ void __glXDispSwap_Vertex2iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); @@ -847,6 +868,7 @@ void __glXDispSwap_Vertex2sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); @@ -858,7 +880,7 @@ void __glXDispSwap_Vertex3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -876,6 +898,7 @@ void __glXDispSwap_Vertex3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -887,6 +910,7 @@ void __glXDispSwap_Vertex3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -898,6 +922,7 @@ void __glXDispSwap_Vertex3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -909,8 +934,8 @@ void __glXDispSwap_Vertex4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 32); @@ -927,6 +952,7 @@ void __glXDispSwap_Vertex4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -938,6 +964,7 @@ void __glXDispSwap_Vertex4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -949,6 +976,7 @@ void __glXDispSwap_Vertex4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -960,7 +988,7 @@ void __glXDispSwap_ClipPlane(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -1019,6 +1047,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -1050,6 +1079,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -1107,6 +1137,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1142,6 +1173,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1175,6 +1207,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -1206,6 +1239,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -1263,6 +1297,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1298,6 +1333,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1385,6 +1421,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1420,6 +1457,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1455,6 +1493,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1490,6 +1529,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1533,6 +1573,7 @@ GLint cmdlen; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1576,6 +1617,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1611,6 +1653,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1628,9 +1671,6 @@ void __glXDispSwap_InitNames(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glInitNames( ); } @@ -1659,9 +1699,6 @@ void __glXDispSwap_PopName(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glPopName( ); } @@ -1786,9 +1823,6 @@ void __glXDispSwap_ColorMask(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glColorMask( *(GLboolean *)(pc + 0), *(GLboolean *)(pc + 1), @@ -1799,9 +1833,6 @@ void __glXDispSwap_DepthMask(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glDepthMask( *(GLboolean *)(pc + 0) ); @@ -1855,9 +1886,6 @@ void __glXDispSwap_PopAttrib(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glPopAttrib( ); } @@ -1962,7 +1990,7 @@ void __glXDispSwap_EvalCoord1dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -1980,6 +2008,7 @@ void __glXDispSwap_EvalCoord1fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); @@ -1991,8 +2020,8 @@ void __glXDispSwap_EvalCoord2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 16); @@ -2009,6 +2038,7 @@ void __glXDispSwap_EvalCoord2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -2196,6 +2226,7 @@ { GLint mapsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); mapsize = *(GLint *)(pc + 4); @@ -2213,6 +2244,7 @@ { GLint mapsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); mapsize = *(GLint *)(pc + 4); @@ -2230,6 +2262,7 @@ { GLint mapsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); mapsize = *(GLint *)(pc + 4); @@ -2323,9 +2356,6 @@ void __glXDispSwap_LoadIdentity(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glLoadIdentity( ); } @@ -2333,6 +2363,7 @@ void __glXDispSwap_LoadMatrixf(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16); @@ -2344,7 +2375,7 @@ void __glXDispSwap_LoadMatrixd(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -2373,6 +2404,7 @@ void __glXDispSwap_MultMatrixf(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16); @@ -2384,8 +2416,8 @@ void __glXDispSwap_MultMatrixd(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 128); @@ -2429,18 +2461,12 @@ void __glXDispSwap_PopMatrix(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glPopMatrix( ); } void __glXDispSwap_PushMatrix(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glPushMatrix( ); } @@ -2701,6 +2727,7 @@ { GLsizei n; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); n = *(GLsizei *)(pc + 0); @@ -2716,9 +2743,6 @@ void __glXDispSwap_Indexubv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - glIndexubv( (GLubyte *)(pc + 0) ); @@ -2757,6 +2781,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -2777,6 +2802,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -2850,6 +2876,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -2885,6 +2912,7 @@ GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -3033,8 +3061,8 @@ void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 12); @@ -3053,6 +3081,7 @@ void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 1); @@ -3066,6 +3095,7 @@ void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 1); @@ -3079,6 +3109,7 @@ void __glXDispSwap_MultiTexCoord1svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 1); @@ -3092,7 +3123,7 @@ void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -3112,6 +3143,7 @@ void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 2); @@ -3125,6 +3157,7 @@ void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 2); @@ -3138,6 +3171,7 @@ void __glXDispSwap_MultiTexCoord2svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 2); @@ -3151,8 +3185,8 @@ void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, 28); @@ -3171,6 +3205,7 @@ void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 3); @@ -3184,6 +3219,7 @@ void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 3); @@ -3197,6 +3233,7 @@ void __glXDispSwap_MultiTexCoord3svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 3); @@ -3210,7 +3247,7 @@ void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; - + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -3230,6 +3267,7 @@ void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 4); @@ -3243,6 +3281,7 @@ void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 4); @@ -3256,6 +3295,7 @@ void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 4); Index: xc/programs/Xserver/GL/glx/g_single.c diff -u xc/programs/Xserver/GL/glx/g_single.c:1.4 xc/programs/Xserver/GL/glx/g_single.c:1.5 --- xc/programs/Xserver/GL/glx/g_single.c:1.4 Wed Mar 21 11:29:35 2001 +++ xc/programs/Xserver/GL/glx/g_single.c Mon Jan 14 17:47:08 2002 @@ -1,5 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -41,7 +40,6 @@ int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -61,7 +59,6 @@ int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -77,7 +74,6 @@ int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -120,7 +116,6 @@ int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -140,7 +135,6 @@ int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1272,7 +1266,6 @@ { GLsizei n; __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1726,7 +1719,6 @@ { GLsizei n; __GLXcontext *cx; - ClientPtr client = cl->client; int error; cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); Index: xc/programs/Xserver/GL/glx/g_singleswap.c diff -u xc/programs/Xserver/GL/glx/g_singleswap.c:1.4 xc/programs/Xserver/GL/glx/g_singleswap.c:1.5 --- xc/programs/Xserver/GL/glx/g_singleswap.c:1.4 Wed Mar 21 11:29:35 2001 +++ xc/programs/Xserver/GL/glx/g_singleswap.c Mon Jan 14 17:47:08 2002 @@ -1,5 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_singleswap.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_singleswap.c,v 1.5 2002/01/14 22:47:08 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -41,7 +40,6 @@ int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; @@ -65,7 +63,6 @@ int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; @@ -83,7 +80,6 @@ int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; @@ -135,7 +131,6 @@ int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; @@ -159,7 +154,6 @@ int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; @@ -241,6 +235,7 @@ GLdouble answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -318,6 +313,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -370,6 +366,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -422,6 +419,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -476,6 +474,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -531,6 +530,7 @@ GLdouble answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -587,6 +587,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -643,6 +644,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -698,6 +700,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -752,6 +755,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -806,6 +810,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -858,6 +863,7 @@ GLuint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -910,6 +916,7 @@ GLushort answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -962,6 +969,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1016,6 +1024,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1070,6 +1079,7 @@ GLdouble answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1124,6 +1134,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1178,6 +1189,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1232,6 +1244,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1286,6 +1299,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1340,6 +1354,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1396,6 +1411,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1508,6 +1524,7 @@ GLboolean answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1539,9 +1556,9 @@ { GLsizei n; __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1569,6 +1586,7 @@ GLuint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1630,6 +1648,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1684,6 +1703,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1738,6 +1758,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1792,6 +1813,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1846,6 +1868,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1900,6 +1923,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -1954,6 +1978,7 @@ GLfloat answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -2008,6 +2033,7 @@ GLint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); @@ -2062,6 +2088,7 @@ GLboolean answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); @@ -2093,9 +2120,9 @@ { GLsizei n; __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); @@ -2123,6 +2150,7 @@ GLuint answerBuffer[200]; char *answer; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXVendorPrivateReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_VENDPRIV_CONTEXT_TAG(pc), &error); Index: xc/programs/Xserver/GL/glx/glxbuf.c diff -u xc/programs/Xserver/GL/glx/glxbuf.c:1.6 xc/programs/Xserver/GL/glx/glxbuf.c:1.7 --- xc/programs/Xserver/GL/glx/glxbuf.c:1.6 Sun Mar 25 00:32:01 2001 +++ xc/programs/Xserver/GL/glx/glxbuf.c Wed Oct 31 17:50:26 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.c,v 1.6 2001/03/25 05:32:01 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxbuf.c,v 1.7 2001/10/31 22:50:26 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -255,7 +255,9 @@ __glXFreeBuffers(__GLXdrawablePrivate *glxPriv) { __GLdrawablePrivate *glPriv = &glxPriv->glPriv; +#if defined(__GL_MAX_AUXBUFFERS) && (__GL_MAX_AUXBUFFERS > 0) __GLcontextModes *modes = glPriv->modes; +#endif if (glPriv->frontBuffer.free) { (*glPriv->frontBuffer.free)(&glPriv->frontBuffer, glPriv); Index: xc/programs/Xserver/GL/glx/glxcmdsswap.c diff -u xc/programs/Xserver/GL/glx/glxcmdsswap.c:1.5 xc/programs/Xserver/GL/glx/glxcmdsswap.c:1.7 --- xc/programs/Xserver/GL/glx/glxcmdsswap.c:1.5 Wed Mar 21 11:29:36 2001 +++ xc/programs/Xserver/GL/glx/glxcmdsswap.c Mon Jan 14 17:47:08 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.5 2001/03/21 16:29:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.7 2002/01/14 22:47:08 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -58,7 +58,6 @@ int __glXSwapCreateContext(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -73,7 +72,6 @@ int __glXSwapDestroyContext(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -85,7 +83,6 @@ int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -99,7 +96,6 @@ int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -111,7 +107,6 @@ int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -124,7 +119,6 @@ int __glXSwapWaitGL(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -136,7 +130,6 @@ int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXWaitXReq *req = (xGLXWaitXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -148,7 +141,6 @@ int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -171,6 +163,7 @@ unsigned int screen; int i, p; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&req->screen); screen = req->screen; @@ -249,7 +242,6 @@ int __glXSwapCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -264,7 +256,6 @@ int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -276,7 +267,6 @@ int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -289,7 +279,6 @@ int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -306,7 +295,6 @@ int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXQueryExtensionsStringReq *req = NULL; __GLX_DECLARE_SWAP_VARIABLES; @@ -318,7 +306,6 @@ int __glXSwapQueryServerString(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -331,7 +318,6 @@ int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc) { - ClientPtr client = cl->client; xGLXClientInfoReq *req = (xGLXClientInfoReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -345,7 +331,6 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc) { - ClientPtr client = cl->client; xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; @@ -393,6 +378,7 @@ { int length = reply->length; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); @@ -419,6 +405,7 @@ { int length = reply->length; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); @@ -465,7 +452,7 @@ pc += sz_xGLXRenderReq; left = (req->length << 2) - sz_xGLXRenderReq; while (left > 0) { - __GLXrenderSizeData *entry, renderEntry; + __GLXrenderSizeData *entry; int extra; void (* proc)(GLbyte *); @@ -581,7 +568,7 @@ pc += sz_xGLXRenderLargeReq; if (cl->largeCmdRequestsSoFar == 0) { - __GLXrenderSizeData *entry, renderEntry; + __GLXrenderSizeData *entry; int extra; size_t cmdlen; /* Index: xc/programs/Xserver/GL/glx/glxext.c diff -u xc/programs/Xserver/GL/glx/glxext.c:1.7 xc/programs/Xserver/GL/glx/glxext.c:1.8 --- xc/programs/Xserver/GL/glx/glxext.c:1.7 Wed Mar 21 11:29:36 2001 +++ xc/programs/Xserver/GL/glx/glxext.c Thu Aug 23 14:25:40 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.7 2001/03/21 16:29:36 dawes Exp $ +/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.8 2001/08/23 18:25:40 alanh Exp $ ** The contents of this file are subject to the GLX Public License Version 1.0 ** (the "License"). You may not use this file except in compliance with the ** License. You may obtain a copy of the License at Silicon Graphics, Inc., @@ -382,7 +382,6 @@ REQUEST(xGLXSingleReq); CARD8 opcode; int (*proc)(__GLXclientState *cl, GLbyte *pc); - __GLXcontext *cx; __GLXclientState *cl; opcode = stuff->glxCode; @@ -437,7 +436,6 @@ REQUEST(xGLXSingleReq); CARD8 opcode; int (*proc)(__GLXclientState *cl, GLbyte *pc); - __GLXcontext *cx; __GLXclientState *cl; opcode = stuff->glxCode; Index: xc/programs/Xserver/GL/glx/glxmem.c diff -u xc/programs/Xserver/GL/glx/glxmem.c:1.5 xc/programs/Xserver/GL/glx/glxmem.c:1.6 --- xc/programs/Xserver/GL/glx/glxmem.c:1.5 Wed Mar 21 11:29:36 2001 +++ xc/programs/Xserver/GL/glx/glxmem.c Wed Oct 31 17:50:27 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.5 2001/03/21 16:29:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxmem.c,v 1.6 2001/10/31 22:50:27 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -56,7 +56,6 @@ GLint x, GLint y, GLuint width, GLuint height, __GLdrawablePrivate *glPriv, GLuint bufferMask) { - __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *) glPriv->other; GLuint newSize; void *ubase; GLint pixelWidth; Index: xc/programs/Xserver/GL/glx/glxscreens.c diff -u xc/programs/Xserver/GL/glx/glxscreens.c:1.6 xc/programs/Xserver/GL/glx/glxscreens.c:1.8 --- xc/programs/Xserver/GL/glx/glxscreens.c:1.6 Wed Mar 21 11:29:36 2001 +++ xc/programs/Xserver/GL/glx/glxscreens.c Wed Oct 31 17:50:27 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.6 2001/03/21 16:29:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.8 2001/10/31 22:50:27 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -97,6 +97,7 @@ return count; } +#if 0 /* ** A typical implementation would not probably not run through the screen's ** visuals to find ones that match the visual configs supplied by the DDX @@ -155,6 +156,7 @@ __glXFree(used); return numMatchingVisuals; } +#endif /* ** Destroy routine that gets called when a drawable is freed. A drawable @@ -202,7 +204,6 @@ ScreenPtr pScreen; __GLXcontext *glxc; __GLXdrawablePrivate *glxPriv; - int i; Bool ret; /* Index: xc/programs/Xserver/GL/glx/glxserver.h diff -u xc/programs/Xserver/GL/glx/glxserver.h:1.3 xc/programs/Xserver/GL/glx/glxserver.h:1.4 --- xc/programs/Xserver/GL/glx/glxserver.h:1.3 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/glxserver.h Thu Aug 23 14:25:40 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.4 2001/08/23 18:25:40 alanh Exp $ */ #ifndef _GLX_server_h_ #define _GLX_server_h_ @@ -161,12 +161,6 @@ typedef void (*__GLXdispatchRenderProcPtr)(GLbyte *); typedef int (*__GLXdispatchSingleProcPtr)(__GLXclientState *, GLbyte *); typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *); -extern __GLXdispatchRenderProcPtr __glXRenderTable[]; -extern __GLXdispatchSingleProcPtr __glXSingleTable[]; -extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[]; -extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[]; -extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[]; -extern __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[]; /* * Dispatch for GLX commands. @@ -200,12 +194,7 @@ ** Prototypes. */ - extern char *__glXcombine_strings(const char *, const char *); - -extern void __glXDisp_DrawArrays(GLbyte*); -extern void __glXDispSwap_DrawArrays(GLbyte*); - /* ** Routines for sending swapped replies. Index: xc/programs/Xserver/GL/glx/render2swap.c diff -u xc/programs/Xserver/GL/glx/render2swap.c:1.5 xc/programs/Xserver/GL/glx/render2swap.c:1.6 --- xc/programs/Xserver/GL/glx/render2swap.c:1.5 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/render2swap.c Mon Jan 14 17:47:08 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/render2swap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/render2swap.c,v 1.6 2002/01/14 22:47:08 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -49,6 +49,7 @@ GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); @@ -80,6 +81,7 @@ GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); @@ -119,6 +121,7 @@ GLenum target; GLdouble u1, u2, *points; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_DOUBLE(pc + 0); __GLX_SWAP_DOUBLE(pc + 8); @@ -162,6 +165,7 @@ GLint uorder, vorder, ustride, vstride, k, compsize; GLenum target; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_DOUBLE(pc + 0); __GLX_SWAP_DOUBLE(pc + 8); @@ -212,6 +216,7 @@ GLenum type; GLsizei n; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 0); Index: xc/programs/Xserver/GL/glx/rensize.c diff -u xc/programs/Xserver/GL/glx/rensize.c:1.3 xc/programs/Xserver/GL/glx/rensize.c:1.4 --- xc/programs/Xserver/GL/glx/rensize.c:1.3 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/rensize.c Wed Oct 31 17:50:27 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.4 2001/10/31 22:50:27 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -680,7 +680,6 @@ int __glXTexSubImage1DReqSize(GLbyte *pc, Bool swap ) { __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - GLenum target = hdr->target; GLenum format = hdr->format; GLenum type = hdr->type; GLint w = hdr->width; @@ -702,7 +701,6 @@ int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap ) { __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - GLenum target = hdr->target; GLenum format = hdr->format; GLenum type = hdr->type; GLint w = hdr->width; Index: xc/programs/Xserver/GL/glx/single2.c diff -u xc/programs/Xserver/GL/glx/single2.c:1.5 xc/programs/Xserver/GL/glx/single2.c:1.6 --- xc/programs/Xserver/GL/glx/single2.c:1.5 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/single2.c Wed Jun 6 15:00:15 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.6 2001/06/06 19:00:15 dawes Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -242,6 +242,12 @@ size_t clen, slen; char *combo_string, *token, *s1; const char *s2, *end; + + /* safeguard to prevent potentially fatal errors in the string functions */ + if (!cext_string) + cext_string = ""; + if (!sext_string) + sext_string = ""; /* ** String can't be longer than min(cstring, sstring) Index: xc/programs/Xserver/GL/glx/single2swap.c diff -u xc/programs/Xserver/GL/glx/single2swap.c:1.5 xc/programs/Xserver/GL/glx/single2swap.c:1.7 --- xc/programs/Xserver/GL/glx/single2swap.c:1.5 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/single2swap.c Mon Jan 14 17:47:08 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/single2swap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/single2swap.c,v 1.7 2002/01/14 22:47:08 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -116,6 +116,7 @@ GLubyte *retBuffer = NULL; GLenum newMode; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; int error; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); @@ -218,7 +219,6 @@ int __glXDispSwap_Flush(__GLXclientState *cl, GLbyte *pc) { __GLXcontext *cx; - ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; @@ -268,7 +268,6 @@ const char *string; __GLX_DECLARE_SWAP_VARIABLES; int error; - GLubyte *answer; char *buf = NULL, *buf1 = NULL; GLint length = 0; @@ -324,6 +323,7 @@ int error; GLdouble answer[4]; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&((xGLXSingleReq *)pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); Index: xc/programs/Xserver/GL/glx/singlepixswap.c diff -u xc/programs/Xserver/GL/glx/singlepixswap.c:1.5 xc/programs/Xserver/GL/glx/singlepixswap.c:1.6 --- xc/programs/Xserver/GL/glx/singlepixswap.c:1.5 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/singlepixswap.c Wed Oct 31 17:50:27 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.6 2001/10/31 22:50:27 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -108,7 +108,7 @@ { GLint level, compsize; GLenum format, type, target; - GLboolean swapBytes, lsbFirst; + GLboolean swapBytes; __GLX_DECLARE_SWAP_VARIABLES; __GLXcontext *cx; ClientPtr client = cl->client; Index: xc/programs/Xserver/GL/glx/unpack.h diff -u xc/programs/Xserver/GL/glx/unpack.h:1.3 xc/programs/Xserver/GL/glx/unpack.h:1.4 --- xc/programs/Xserver/GL/glx/unpack.h:1.3 Wed Mar 21 11:29:37 2001 +++ xc/programs/Xserver/GL/glx/unpack.h Mon Jan 14 17:47:08 2002 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.4 2002/01/14 22:47:08 tsi Exp $ */ #ifndef __GLX_unpack_h__ #define __GLX_unpack_h__ @@ -144,7 +144,9 @@ ** conceivably be replaced with routines that do the job faster. */ #define __GLX_DECLARE_SWAP_VARIABLES \ - GLbyte sw; \ + GLbyte sw + +#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \ GLbyte *swapPC; \ GLbyte *swapEnd Index: xc/programs/Xserver/GL/include/GL/glx_ansic.h diff -u xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.5 xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.6 --- xc/programs/Xserver/GL/include/GL/glx_ansic.h:1.5 Wed Mar 21 15:49:08 2001 +++ xc/programs/Xserver/GL/include/GL/glx_ansic.h Thu Jan 10 16:51:47 2002 @@ -1,7 +1,7 @@ #ifndef _glx_ansic_h_ #define _glx_ansic_h_ -/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.5 2001/03/21 20:49:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.6 2002/01/10 21:51:47 tsi Exp $ */ /* ** License Applicability. Except to the extent portions of this file are ** made subject to an alternative license as permitted in the SGI Free @@ -52,7 +52,9 @@ #ifdef XFree86Server +#ifdef XFree86LOADER #include "xf86_ansic.h" +#endif #ifndef assert #define assert(a) #endif Index: xc/programs/Xserver/GL/mesa/src/X/Imakefile diff -u xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.9 xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.11 --- xc/programs/Xserver/GL/mesa/src/X/Imakefile:1.9 Thu Apr 26 12:54:47 2001 +++ xc/programs/Xserver/GL/mesa/src/X/Imakefile Thu Jan 10 16:51:47 2002 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.9 2001/04/26 16:54:47 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/GL/mesa/src/X/Imakefile,v 1.11 2002/01/10 21:51:47 tsi Exp $ #define IHaveModules #include @@ -13,6 +13,13 @@ DRIVER_SRCS = xmesa1.c xmesa2.c xmesa3.c xmesa4.c DRIVER_OBJS = xmesa1.o xmesa2.o xmesa3.o xmesa4.o +#ifndef XFree86Version + +/* This appears to be the quickest way to build a non-XFree86 server */ +GLXSRV_DEFINES = -DXFree86Server + +#endif + GLX_SRCS = xf86glx.c xf86glx_util.c compsize.c GLX_OBJS = xf86glx.o xf86glx_util.o compsize.o @@ -26,7 +33,7 @@ -I$(SERVERSRC)/include -I$(SERVERSRC)/GL/include \ -I$(SERVERSRC)/GL/glx - DEFINES = $(GLX_DEFINES) /*-DUSE_X86_ASM*/ + DEFINES = $(GLX_DEFINES) $(GLXSRV_DEFINES) /*-DUSE_X86_ASM*/ #if DoLoadableServer ModuleObjectRule() Index: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c diff -u xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.10 xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.11 --- xc/programs/Xserver/GL/mesa/src/X/xf86glx.c:1.10 Fri Feb 16 08:24:06 2001 +++ xc/programs/Xserver/GL/mesa/src/X/xf86glx.c Wed Oct 31 17:50:27 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.10 2001/02/16 13:24:06 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.11 2001/10/31 22:50:27 tsi Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -429,6 +429,8 @@ void __MESA_setVisualConfigs(int nconfigs, __GLXvisualConfig *configs, void **privates) { + (void)kernel8; + (void)DitherValues; numConfigs = nconfigs; visualConfigs = configs; visualPrivates = privates; Index: xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h:1.1.1.3 Tue Jan 16 17:30:03 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/ddpex2.h Fri Dec 14 14:57:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ddpex2.h,v 1.5 2000/08/17 19:47:02 cpqbld Exp $ */ +/* $Xorg: ddpex2.h,v 1.6 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h:1.1.1.3 Tue Jan 16 17:30:06 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miClip.h Fri Dec 14 14:57:10 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miClip.h,v 1.3 2000/08/17 19:47:02 cpqbld Exp $ */ +/* $Xorg: miClip.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h:1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h:1.4 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h:1.3 Wed Jan 17 17:12:19 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h Fri Dec 14 14:57:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miFont.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miFont.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h,v 1.3 2001/01/17 22:12:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miFont.h,v 1.4 2001/12/14 19:57:10 dawes Exp $ */ /* * font internal format */ Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h:1.1.1.3 Tue Jan 16 17:30:11 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miInfo.h Fri Dec 14 14:57:11 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miInfo.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miInfo.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h:1.1.1.3 Tue Jan 16 17:30:14 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miLUT.h Fri Dec 14 14:57:11 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miLUT.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miLUT.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h:1.5 xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h:1.6 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h:1.5 Wed Jan 17 17:12:20 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h Fri Dec 14 14:57:11 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLight.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miLight.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h,v 1.5 2001/01/17 22:12:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miLight.h,v 1.6 2001/12/14 19:57:11 dawes Exp $ */ #ifndef MI_LIGHT_H #define MI_LIGHT_H Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h:1.1.1.3 Tue Jan 16 17:30:19 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miLineDash.h Fri Dec 14 14:57:11 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miLineDash.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miLineDash.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /***************************************************************** Copyright 1989,1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h:1.1.1.3 Tue Jan 16 17:30:22 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miMarkers.h Fri Dec 14 14:57:12 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miMarkers.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miMarkers.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h:1.1.1.3 Tue Jan 16 17:30:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miNS.h Fri Dec 14 14:57:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miNS.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miNS.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h:1.1.1.3 Tue Jan 16 17:30:26 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miNurbs.h Fri Dec 14 14:57:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miNurbs.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miNurbs.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /***************************************************************** Copyright 1989,1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h:1.1.1.3 Tue Jan 16 17:30:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miPick.h Fri Dec 14 14:57:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miPick.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miPick.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h:1.1.1.3 Tue Jan 16 17:30:36 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miRender.h Fri Dec 14 14:57:12 2001 @@ -1,11 +1,15 @@ -/* $Xorg: miRender.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miRender.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h:1.1.1.3 Tue Jan 16 17:30:39 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miStrMacro.h Fri Dec 14 14:57:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miStrMacro.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miStrMacro.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.5 xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.7 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h:1.5 Wed Jan 17 17:12:20 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h Fri Dec 14 14:57:13 2001 @@ -1,11 +1,15 @@ -/* $Xorg: miStruct.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miStruct.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h,v 1.5 2001/01/17 22:12:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/miStruct.h,v 1.7 2001/12/14 19:57:13 dawes Exp $ */ #ifndef MISTRUCT_H #define MISTRUCT_H @@ -61,7 +65,8 @@ /* do the following to pad to 64 bit alignment for alpha and ia64 */ #if defined(__alpha) || defined(__alpha__) || \ - defined(ia64) || defined(__ia64__) + defined(ia64) || defined(__ia64__) || \ + defined(__s390x__) ddUSHORT unused0; ddUSHORT unused1; #endif Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h:1.1.1.3 Tue Jan 16 17:30:47 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miText.h Fri Dec 14 14:57:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miText.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miText.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989,1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h:1.1.1.3 Tue Jan 16 17:30:48 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/miWks.h Fri Dec 14 14:57:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miWks.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: miWks.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h:3.2 xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h:3.3 --- xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h:3.2 Wed Jan 17 17:12:20 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h Fri Dec 14 14:57:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mipex.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: mipex.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h,v 3.2 2001/01/17 22:12:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/include/mipex.h,v 3.3 2001/12/14 19:57:13 dawes Exp $ */ #ifndef MI_H #define MI_H Index: xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h diff -u xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h:1.1.1.3 Tue Jan 16 17:30:54 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/include/mixform.h Fri Dec 14 14:57:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mixform.h,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: mixform.h,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level0/README diff -u xc/programs/Xserver/PEX5/ddpex/mi/level0/README:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/level0/README:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/level0/README:1.1.1.3 Tue Jan 16 17:30:56 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level0/README Fri Dec 14 14:57:14 2001 @@ -1,11 +1,15 @@ -/* $Xorg: README,v 1.3 2000/08/17 19:47:03 cpqbld Exp $ */ +/* $Xorg: README,v 1.4 2001/02/09 02:04:08 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c:3.6 Wed Jan 17 17:12:20 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/mi52stubs.c Fri Dec 14 14:57:15 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mi52stubs.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: mi52stubs.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /*********************************************************** Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c:3.7 Wed Jan 17 17:12:20 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c Fri Dec 14 14:57:16 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miDDCtoGC.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miDDCtoGC.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c,v 3.7 2001/01/17 22:12:20 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miDDCtoGC.c,v 3.8 2001/12/14 19:57:16 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c:1.8 Wed Jan 17 17:12:20 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miLevel1.c Fri Dec 14 14:57:16 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLevel1.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miLevel1.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c:3.6 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c Fri Dec 14 14:57:16 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miListUtil.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miListUtil.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c,v 3.6 2001/01/17 22:12:21 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miListUtil.c,v 3.7 2001/12/14 19:57:16 dawes Exp $ */ #include "miRender.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c:1.8 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miLvl1Tab.c Fri Dec 14 14:57:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miLvl1Tab.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miLvl1Tab.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c:3.6 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miPck1Prim.c Fri Dec 14 14:57:17 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miPck1Prim.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miPck1Prim.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c:3.6 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndFArea.c Fri Dec 14 14:57:17 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miRndFArea.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miRndFArea.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c:3.7 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c Fri Dec 14 14:57:17 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miRndMarkr.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miRndMarkr.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c,v 3.7 2001/01/17 22:12:21 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndMarkr.c,v 3.8 2001/12/14 19:57:17 dawes Exp $ */ #define NEED_EVENTS #include "miRender.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c:3.6 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndPLine.c Fri Dec 14 14:57:18 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miRndPLine.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miRndPLine.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c:3.6 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndTStrip.c Fri Dec 14 14:57:18 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miRndTStrip.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miRndTStrip.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c:3.6 Wed Jan 17 17:12:21 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c Fri Dec 14 14:57:18 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miRndText.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miRndText.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c,v 3.6 2001/01/17 22:12:21 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level1/miRndText.c,v 3.7 2001/12/14 19:57:18 dawes Exp $ */ #define NEED_EVENTS #include "miRender.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c:3.6 Wed Jan 17 17:12:22 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c Fri Dec 14 14:57:19 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ddContext.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: ddContext.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -44,7 +48,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c,v 3.6 2001/01/17 22:12:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/ddContext.c,v 3.7 2001/12/14 19:57:19 dawes Exp $ */ #include "miWks.h" #include "miStruct.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c:3.6 Wed Jan 17 17:12:22 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c Fri Dec 14 14:57:20 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miBldXform.c,v 1.3 2000/08/17 19:47:04 cpqbld Exp $ */ +/* $Xorg: miBldXform.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c,v 3.6 2001/01/17 22:12:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miBldXform.c,v 3.7 2001/12/14 19:57:20 dawes Exp $ */ #include "X.h" #include "Xproto.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c:3.7 Wed Jan 17 17:12:22 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c Fri Dec 14 14:57:20 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miCellArray.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ +/* $Xorg: miCellArray.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c,v 3.7 2001/01/17 22:12:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCellArray.c,v 3.8 2001/12/14 19:57:20 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c:3.6 Wed Jan 17 17:12:22 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c Fri Dec 14 14:57:20 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miClip.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ +/* $Xorg: miClip.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c,v 3.6 2001/01/17 22:12:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miClip.c,v 3.7 2001/12/14 19:57:20 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c:1.8 Wed Jan 17 17:12:22 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c Fri Dec 14 14:57:20 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miConvert.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ +/* $Xorg: miConvert.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c,v 1.8 2001/01/17 22:12:22 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miConvert.c,v 1.9 2001/12/14 19:57:20 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c:3.7 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c Fri Dec 14 14:57:21 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miCopy.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ +/* $Xorg: miCopy.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c,v 3.7 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miCopy.c,v 3.8 2001/12/14 19:57:21 dawes Exp $ */ #include "ddpex.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c:3.7 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miDestroy.c Fri Dec 14 14:57:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miDestroy.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ +/* $Xorg: miDestroy.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /*********************************************************** Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c:3.6 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c Fri Dec 14 14:57:23 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miFillArea.c,v 1.3 2000/08/17 19:47:05 cpqbld Exp $ */ +/* $Xorg: miFillArea.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c,v 3.6 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miFillArea.c,v 3.7 2001/12/14 19:57:23 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c:3.7 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c Fri Dec 14 14:57:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miInquire.c,v 1.5 2000/08/17 19:47:06 cpqbld Exp $ */ +/* $Xorg: miInquire.c,v 1.6 2001/02/09 02:04:09 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c,v 3.7 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miInquire.c,v 3.8 2001/12/14 19:57:25 dawes Exp $ */ #include "ddpex.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c:1.8 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c Fri Dec 14 14:57:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLight.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ +/* $Xorg: miLight.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c,v 1.8 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLight.c,v 1.9 2001/12/14 19:57:28 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c:1.8 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miLvl2Tab.c Fri Dec 14 14:57:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLvl2Tab.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ +/* $Xorg: miLvl2Tab.c,v 1.4 2001/02/09 02:04:09 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c:3.6 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c Fri Dec 14 14:57:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miMarkers.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ +/* $Xorg: miMarkers.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c,v 3.6 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miMarkers.c,v 3.7 2001/12/14 19:57:28 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c:3.7 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c Fri Dec 14 14:57:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miNCurve.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ +/* $Xorg: miNCurve.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c,v 3.7 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNCurve.c,v 3.8 2001/12/14 19:57:28 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c:3.6 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c Fri Dec 14 14:57:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miNSTrim.c,v 1.3 2000/08/17 19:47:06 cpqbld Exp $ */ +/* $Xorg: miNSTrim.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c,v 3.6 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSTrim.c,v 3.7 2001/12/14 19:57:28 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c:3.8 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c:3.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c:3.8 Wed Jan 17 17:12:23 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c Fri Dec 14 14:57:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miNSurf.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miNSurf.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c,v 3.8 2001/01/17 22:12:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNSurf.c,v 3.9 2001/12/14 19:57:29 dawes Exp $ */ #define TRIMING 1 Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c:3.7 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c Fri Dec 14 14:57:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miNurbs.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miNurbs.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miNurbs.c,v 3.8 2001/12/14 19:57:29 dawes Exp $ */ #include "X.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c:3.6 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c Fri Dec 14 14:57:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miOCs.c,v 1.5 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miOCs.c,v 1.6 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c,v 3.6 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miOCs.c,v 3.7 2001/12/14 19:57:29 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c:3.7 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c Fri Dec 14 14:57:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miPickPrim.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miPickPrim.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPickPrim.c,v 3.8 2001/12/14 19:57:29 dawes Exp $ */ #include "miWks.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c:3.6 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c Fri Dec 14 14:57:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miPolyLine.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miPolyLine.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c,v 3.6 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miPolyLine.c,v 3.7 2001/12/14 19:57:29 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c:3.7 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c Fri Dec 14 14:57:29 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miQuadMesh.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miQuadMesh.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miQuadMesh.c,v 3.8 2001/12/14 19:57:29 dawes Exp $ */ #include "miLUT.h" #include "ddpex2.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c:3.7 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c Fri Dec 14 14:57:30 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miReplace.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miReplace.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miReplace.c,v 3.8 2001/12/14 19:57:30 dawes Exp $ */ #include "ddpex2.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c:3.7 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c Fri Dec 14 14:57:30 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miSOFAS.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miSOFAS.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSOFAS.c,v 3.8 2001/12/14 19:57:30 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c:3.6 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c Fri Dec 14 14:57:30 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miSearch.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miSearch.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c,v 3.6 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miSearch.c,v 3.7 2001/12/14 19:57:30 dawes Exp $ */ #include "miWks.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c:1.8 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miTestOCs.c Fri Dec 14 14:57:30 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miTestOCs.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miTestOCs.c,v 1.4 2001/02/09 02:04:10 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c:3.7 Wed Jan 17 17:12:24 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c Fri Dec 14 14:57:30 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miText.c,v 1.3 2000/08/17 19:47:07 cpqbld Exp $ */ +/* $Xorg: miText.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c,v 3.7 2001/01/17 22:12:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miText.c,v 3.8 2001/12/14 19:57:30 dawes Exp $ */ #include "miLUT.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c:1.8 Wed Jan 17 17:12:25 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c Fri Dec 14 14:57:30 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miTrans.c,v 1.3 2000/08/17 19:47:08 cpqbld Exp $ */ +/* $Xorg: miTrans.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c,v 1.8 2001/01/17 22:12:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTrans.c,v 1.9 2001/12/14 19:57:30 dawes Exp $ */ #include "mipex.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c:3.6 Wed Jan 17 17:12:25 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c Fri Dec 14 14:57:30 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miTriStrip.c,v 1.3 2000/08/17 19:47:08 cpqbld Exp $ */ +/* $Xorg: miTriStrip.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c,v 3.6 2001/01/17 22:12:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/miTriStrip.c,v 3.7 2001/12/14 19:57:30 dawes Exp $ */ #include "miClip.h" #include "misc.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c:3.7 xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c:3.8 --- xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c:3.7 Wed Jan 17 17:12:25 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c Fri Dec 14 14:57:31 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexOCParse.c,v 1.5 2000/08/17 19:47:08 cpqbld Exp $ */ +/* $Xorg: pexOCParse.c,v 1.6 2001/02/09 02:04:11 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c,v 3.7 2001/01/17 22:12:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level2/pexOCParse.c,v 3.8 2001/12/14 19:57:31 dawes Exp $ */ #include "miStruct.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c:3.6 Wed Jan 17 17:12:27 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c Fri Dec 14 14:57:33 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miRender.c,v 1.3 2000/08/17 19:47:08 cpqbld Exp $ */ +/* $Xorg: miRender.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c,v 3.6 2001/01/17 22:12:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRender.c,v 3.7 2001/12/14 19:57:33 dawes Exp $ */ #include "miLUT.h" #include "dipex.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c:1.9 Wed Jan 17 17:12:28 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c Fri Dec 14 14:57:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miRndrPick.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ +/* $Xorg: miRndrPick.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /************************************************************ Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ in this Software without prior written authorization from The Open Group. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c,v 1.9 2001/01/17 22:12:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level3/miRndrPick.c,v 1.10 2001/12/14 19:57:33 dawes Exp $ */ #include "miLUT.h" #include "ddpex3.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c:1.9 Wed Jan 17 17:12:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c Fri Dec 14 14:57:33 2001 @@ -1,9 +1,13 @@ -/* $Xorg: css_ex_str.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ +/* $Xorg: css_ex_str.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c,v 1.9 2001/01/17 22:12:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_ex_str.c,v 1.10 2001/12/14 19:57:33 dawes Exp $ */ /* * this file contains the element handling procedures for * the execute structure element. It is stored in PEX format Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c:1.9 Wed Jan 17 17:12:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c Fri Dec 14 14:57:34 2001 @@ -1,9 +1,13 @@ -/* $Xorg: css_plain.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ +/* $Xorg: css_plain.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c,v 1.9 2001/01/17 22:12:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_plain.c,v 1.10 2001/12/14 19:57:34 dawes Exp $ */ /* * this file contains the element handling procedures for elements * which are stored in the format they are received. This includes Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c:1.8 Wed Jan 17 17:12:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/css_tbls.c Fri Dec 14 14:57:34 2001 @@ -1,9 +1,13 @@ -/* $Xorg: css_tbls.c,v 1.3 2000/08/17 19:47:09 cpqbld Exp $ */ +/* $Xorg: css_tbls.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c:1.8 Wed Jan 17 17:12:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miDynamics.c Fri Dec 14 14:57:35 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miDynamics.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ +/* $Xorg: miDynamics.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c:1.8 Wed Jan 17 17:12:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c Fri Dec 14 14:57:35 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miPick.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ +/* $Xorg: miPick.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c,v 1.8 2001/01/17 22:12:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miPick.c,v 1.9 2001/12/14 19:57:35 dawes Exp $ */ #include "miWks.h" /* miPickMeasureStr is defined in here */ #include "miNS.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c:1.9 Wed Jan 17 17:12:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c Fri Dec 14 14:57:35 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miSC.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ +/* $Xorg: miSC.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c,v 1.9 2001/01/17 22:12:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miSC.c,v 1.10 2001/12/14 19:57:35 dawes Exp $ */ #include "ddpex4.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c:3.6 Wed Jan 17 17:12:29 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c Fri Dec 14 14:57:35 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miStruct.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ +/* $Xorg: miStruct.c,v 1.4 2001/02/09 02:04:11 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c,v 3.6 2001/01/17 22:12:29 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miStruct.c,v 3.7 2001/12/14 19:57:35 dawes Exp $ */ #include "mipex.h" #include "ddpex4.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c:1.9 Wed Jan 17 17:12:30 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c Fri Dec 14 14:57:36 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miTraverse.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ +/* $Xorg: miTraverse.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c,v 1.9 2001/01/17 22:12:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miTraverse.c,v 1.10 2001/12/14 19:57:36 dawes Exp $ */ #include "miWks.h" #include "PEXproto.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c:1.9 Wed Jan 17 17:12:30 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c Fri Dec 14 14:57:36 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miWks.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ +/* $Xorg: miWks.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c,v 1.9 2001/01/17 22:12:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/level4/miWks.c,v 1.10 2001/12/14 19:57:36 dawes Exp $ */ #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c:1.8 Wed Jan 17 17:12:32 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c Fri Dec 14 14:57:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miClrApLUT.c,v 1.3 2000/08/17 19:47:10 cpqbld Exp $ */ +/* $Xorg: miClrApLUT.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miClrApLUT.c,v 1.9 2001/12/14 19:57:37 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c:1.8 Wed Jan 17 17:12:32 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c Fri Dec 14 14:57:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miColrLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miColrLUT.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miColrLUT.c,v 1.9 2001/12/14 19:57:37 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c:1.8 Wed Jan 17 17:12:32 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c Fri Dec 14 14:57:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miDCueLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miDCueLUT.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miDCueLUT.c,v 1.9 2001/12/14 19:57:37 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c:1.8 Wed Jan 17 17:12:32 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c Fri Dec 14 14:57:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miEdgeLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miEdgeLUT.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c,v 1.8 2001/01/17 22:12:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miEdgeLUT.c,v 1.9 2001/12/14 19:57:37 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c:3.6 xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c:3.7 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c:3.6 Wed Jan 17 17:12:33 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c Fri Dec 14 14:57:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miFont.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miFont.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c,v 3.6 2001/01/17 22:12:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFont.c,v 3.7 2001/12/14 19:57:37 dawes Exp $ */ #include "miFont.h" #include "miLUT.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c:1.8 Wed Jan 17 17:12:33 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c Fri Dec 14 14:57:38 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miFontLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miFontLUT.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miFontLUT.c,v 1.9 2001/12/14 19:57:38 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c:1.8 Wed Jan 17 17:12:33 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c Fri Dec 14 14:57:38 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miIntLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miIntLUT.c,v 1.4 2001/02/09 02:04:12 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miIntLUT.c,v 1.9 2001/12/14 19:57:38 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c:1.10 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c:1.11 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c:1.10 Wed Jan 17 17:12:33 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c Fri Dec 14 14:57:38 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miLUT.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c,v 1.10 2001/01/17 22:12:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUT.c,v 1.11 2001/12/14 19:57:38 dawes Exp $ */ #include "miLUT.h" #include "pexUtils.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci:1.1.1.3 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci:1.2 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci:1.1.1.3 Tue Jan 16 17:34:02 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLUTProcs.ci Fri Dec 14 14:57:38 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLUTProcs.ci,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miLUTProcs.ci,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c:1.8 Wed Jan 17 17:12:33 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c Fri Dec 14 14:57:39 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLightLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miLightLUT.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLightLUT.c,v 1.9 2001/12/14 19:57:39 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c:1.8 Wed Jan 17 17:12:33 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c Fri Dec 14 14:57:39 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miLineLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miLineLUT.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miLineLUT.c,v 1.9 2001/12/14 19:57:39 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c:1.8 Wed Jan 17 17:12:33 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c Fri Dec 14 14:57:39 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miMarkLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miMarkLUT.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c,v 1.8 2001/01/17 22:12:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMarkLUT.c,v 1.9 2001/12/14 19:57:39 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c:1.8 Wed Jan 17 17:12:34 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c Fri Dec 14 14:57:39 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miMisc.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miMisc.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miMisc.c,v 1.9 2001/12/14 19:57:39 dawes Exp $ */ #include "mipex.h" #include "miInfo.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c:1.9 xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c:1.10 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c:1.9 Wed Jan 17 17:12:34 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c Fri Dec 14 14:57:39 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miNS.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miNS.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c,v 1.9 2001/01/17 22:12:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miNS.c,v 1.10 2001/12/14 19:57:39 dawes Exp $ */ #include "mipex.h" #include "miNS.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c:1.8 Wed Jan 17 17:12:34 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c Fri Dec 14 14:57:39 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miPattLUT.c,v 1.3 2000/08/17 19:47:11 cpqbld Exp $ */ +/* $Xorg: miPattLUT.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miPattLUT.c,v 1.9 2001/12/14 19:57:39 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c:1.8 Wed Jan 17 17:12:34 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c Fri Dec 14 14:57:39 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miTextLUT.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: miTextLUT.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miTextLUT.c,v 1.9 2001/12/14 19:57:39 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c:1.8 Wed Jan 17 17:12:34 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c Fri Dec 14 14:57:40 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miUtils.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: miUtils.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miUtils.c,v 1.9 2001/12/14 19:57:40 dawes Exp $ */ #include "mipex.h" #include "PEX.h" Index: xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c diff -u xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c:1.8 xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c:1.9 --- xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c:1.8 Wed Jan 17 17:12:34 2001 +++ xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c Fri Dec 14 14:57:40 2001 @@ -1,9 +1,13 @@ -/* $Xorg: miViewLUT.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: miViewLUT.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c,v 1.8 2001/01/17 22:12:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ddpex/mi/shared/miViewLUT.c,v 1.9 2001/12/14 19:57:40 dawes Exp $ */ #include "miLUT.h" #include "miWks.h" Index: xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c:3.6 xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c:3.7 --- xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c:3.6 Wed Jan 17 17:12:36 2001 +++ xc/programs/Xserver/PEX5/dipex/dispatch/dipexBuf.c Fri Dec 14 14:57:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: dipexBuf.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: dipexBuf.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c:3.20 xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c:3.22 --- xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c:3.20 Fri Feb 16 08:24:06 2001 +++ xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c Fri Dec 14 14:57:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: dipexExt.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: dipexExt.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c,v 3.20 2001/02/16 13:24:06 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/dipexExt.c,v 3.22 2001/12/14 19:57:41 dawes Exp $ */ #define NEED_EVENTS #include "X.h" @@ -228,7 +232,7 @@ PexErrorBase = PextEntry->errorBase; PexEventBase = PextEntry->eventBase; EventSwapVector[PexEventBase + PEXMaxHitsReached] = - SwapPEXMaxHitsReachedEvent; + (EventSwapPtr)SwapPEXMaxHitsReachedEvent; } Index: xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c:1.8 xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c:1.9 --- xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c:1.8 Wed Jan 17 17:12:36 2001 +++ xc/programs/Xserver/PEX5/dipex/dispatch/dipexParse.c Fri Dec 14 14:57:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: dipexParse.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: dipexParse.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c:1.8 xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c:1.9 --- xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c:1.8 Wed Jan 17 17:12:36 2001 +++ xc/programs/Xserver/PEX5/dipex/dispatch/pexDump.c Fri Dec 14 14:57:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexDump.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: pexDump.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c:1.1.1.3 xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c:1.2 --- xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c:1.1.1.3 Tue Jan 16 17:34:41 2001 +++ xc/programs/Xserver/PEX5/dipex/dispatch/pexError.c Fri Dec 14 14:57:41 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexError.c,v 1.3 2000/08/17 19:47:12 cpqbld Exp $ */ +/* $Xorg: pexError.c,v 1.4 2001/02/09 02:04:13 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c diff -u xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c:3.7 xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c:3.8 --- xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c:3.7 Wed Jan 17 17:12:36 2001 +++ xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c Fri Dec 14 14:57:41 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pexUtils.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ +/* $Xorg: pexUtils.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c,v 3.7 2001/01/17 22:12:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/dispatch/pexUtils.c,v 3.8 2001/12/14 19:57:41 dawes Exp $ */ #include "ddpex.h" #include "pexUtils.h" Index: xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c:3.7 Wed Jan 17 17:12:37 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexAccBuf.c Fri Dec 14 14:57:42 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pexAccBuf.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ +/* $Xorg: pexAccBuf.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/objects/pexFont.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexFont.c:3.8 xc/programs/Xserver/PEX5/dipex/objects/pexFont.c:3.9 --- xc/programs/Xserver/PEX5/dipex/objects/pexFont.c:3.8 Wed Jan 17 17:12:37 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexFont.c Fri Dec 14 14:57:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexFont.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ +/* $Xorg: pexFont.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexFont.c,v 3.8 2001/01/17 22:12:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexFont.c,v 3.9 2001/12/14 19:57:43 dawes Exp $ */ /*++ pexFont.c Index: xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c:1.8 xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c:1.9 --- xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c:1.8 Wed Jan 17 17:12:37 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c Fri Dec 14 14:57:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexInfo.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ +/* $Xorg: pexInfo.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c,v 1.8 2001/01/17 22:12:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexInfo.c,v 1.9 2001/12/14 19:57:43 dawes Exp $ */ /*++ pexInfo.c Index: xc/programs/Xserver/PEX5/dipex/objects/pexLut.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexLut.c:3.8 xc/programs/Xserver/PEX5/dipex/objects/pexLut.c:3.9 --- xc/programs/Xserver/PEX5/dipex/objects/pexLut.c:3.8 Wed Jan 17 17:12:37 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexLut.c Fri Dec 14 14:57:43 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pexLut.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ +/* $Xorg: pexLut.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexLut.c,v 3.8 2001/01/17 22:12:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexLut.c,v 3.9 2001/12/14 19:57:43 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexNs.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexNs.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexNs.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexNs.c:3.7 Wed Jan 17 17:12:37 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexNs.c Fri Dec 14 14:57:43 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pexNs.c,v 1.3 2000/08/17 19:47:13 cpqbld Exp $ */ +/* $Xorg: pexNs.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexNs.c,v 3.7 2001/01/17 22:12:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexNs.c,v 3.8 2001/12/14 19:57:43 dawes Exp $ */ #include "X.h" Index: xc/programs/Xserver/PEX5/dipex/objects/pexPc.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexPc.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexPc.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexPc.c:3.6 Wed Jan 17 17:12:37 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexPc.c Fri Dec 14 14:57:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexPc.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ +/* $Xorg: pexPc.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPc.c,v 3.6 2001/01/17 22:12:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPc.c,v 3.7 2001/12/14 19:57:43 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c:3.7 Wed Jan 17 17:12:38 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c Fri Dec 14 14:57:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexPhigs.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ +/* $Xorg: pexPhigs.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c,v 3.7 2001/01/17 22:12:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPhigs.c,v 3.8 2001/12/14 19:57:44 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexPick.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexPick.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexPick.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexPick.c:3.7 Wed Jan 17 17:12:38 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexPick.c Fri Dec 14 14:57:44 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pexPick.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ +/* $Xorg: pexPick.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPick.c,v 3.7 2001/01/17 22:12:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexPick.c,v 3.8 2001/12/14 19:57:44 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c:3.7 Wed Jan 17 17:12:38 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c Fri Dec 14 14:57:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexRndr.c,v 1.3 2000/08/17 19:47:14 cpqbld Exp $ */ +/* $Xorg: pexRndr.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c,v 3.7 2001/01/17 22:12:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexRndr.c,v 3.8 2001/12/14 19:57:44 dawes Exp $ */ /*++ * PEXCreateRenderer Index: xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c:1.8 xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c:1.9 --- xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c:1.8 Wed Jan 17 17:12:38 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexRndrPick.c Fri Dec 14 14:57:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexRndrPick.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: pexRndrPick.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /************************************************************ Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/objects/pexSc.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexSc.c:3.6 xc/programs/Xserver/PEX5/dipex/objects/pexSc.c:3.7 --- xc/programs/Xserver/PEX5/dipex/objects/pexSc.c:3.6 Wed Jan 17 17:12:38 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexSc.c Fri Dec 14 14:57:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexSc.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: pexSc.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexSc.c,v 3.6 2001/01/17 22:12:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/dipex/objects/pexSc.c,v 3.7 2001/12/14 19:57:44 dawes Exp $ */ /*++ Index: xc/programs/Xserver/PEX5/dipex/objects/pexStr.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexStr.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexStr.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexStr.c:3.7 Wed Jan 17 17:12:38 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexStr.c Fri Dec 14 14:57:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexStr.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: pexStr.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/objects/pexTM.c diff -u xc/programs/Xserver/PEX5/dipex/objects/pexTM.c:3.7 xc/programs/Xserver/PEX5/dipex/objects/pexTM.c:3.8 --- xc/programs/Xserver/PEX5/dipex/objects/pexTM.c:3.7 Wed Jan 17 17:12:38 2001 +++ xc/programs/Xserver/PEX5/dipex/objects/pexTM.c Fri Dec 14 14:57:45 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pexTM.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: pexTM.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /* Copyright 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci:1.1.1.3 Tue Jan 16 17:35:20 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/ConvName.ci Fri Dec 14 14:57:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ConvName.ci,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: ConvName.ci,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/ConvName.h diff -u xc/programs/Xserver/PEX5/dipex/swap/ConvName.h:3.2 xc/programs/Xserver/PEX5/dipex/swap/ConvName.h:3.3 --- xc/programs/Xserver/PEX5/dipex/swap/ConvName.h:3.2 Wed Jan 17 17:12:39 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/ConvName.h Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ConvName.h,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: ConvName.h,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/Convert.c diff -u xc/programs/Xserver/PEX5/dipex/swap/Convert.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/Convert.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/Convert.c:1.8 Wed Jan 17 17:12:39 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/Convert.c Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Convert.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: Convert.c,v 1.4 2001/02/09 02:04:14 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/OCTables.c diff -u xc/programs/Xserver/PEX5/dipex/swap/OCTables.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/OCTables.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/OCTables.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/OCTables.c Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: OCTables.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: OCTables.c,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/OCattr.c diff -u xc/programs/Xserver/PEX5/dipex/swap/OCattr.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/OCattr.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/OCattr.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/OCattr.c Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: OCattr.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: OCattr.c,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/OCattr.h diff -u xc/programs/Xserver/PEX5/dipex/swap/OCattr.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/OCattr.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/OCattr.h:1.1.1.3 Tue Jan 16 17:35:33 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/OCattr.h Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: OCattr.h,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: OCattr.h,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c diff -u xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/OCcolour.c Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: OCcolour.c,v 1.3 2000/08/17 19:47:15 cpqbld Exp $ */ +/* $Xorg: OCcolour.c,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci:1.1.1.3 Tue Jan 16 17:35:36 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/OCcolour.ci Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: OCcolour.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: OCcolour.ci,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h diff -u xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h:1.1.1.3 Tue Jan 16 17:35:38 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/OCcolour.h Fri Dec 14 14:57:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: OCcolour.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: OCcolour.h,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/OCprim.h diff -u xc/programs/Xserver/PEX5/dipex/swap/OCprim.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/OCprim.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/OCprim.h:1.1.1.3 Tue Jan 16 17:35:39 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/OCprim.h Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: OCprim.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: OCprim.h,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/RepTables.c diff -u xc/programs/Xserver/PEX5/dipex/swap/RepTables.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/RepTables.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/RepTables.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/RepTables.c Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: RepTables.c,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: RepTables.c,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/Replies.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/Replies.ci:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/Replies.ci:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/Replies.ci:1.1.1.3 Tue Jan 16 17:35:43 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/Replies.ci Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Replies.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: Replies.ci,v 1.4 2001/02/09 02:04:15 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c diff -u xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/ReqTables.c Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ReqTables.c,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: ReqTables.c,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/Requests.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/Requests.ci:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/Requests.ci:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/Requests.ci:1.1.1.3 Tue Jan 16 17:35:47 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/Requests.ci Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Requests.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: Requests.ci,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /****************************************************************** Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/Requests.h diff -u xc/programs/Xserver/PEX5/dipex/swap/Requests.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/Requests.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/Requests.h:1.1.1.3 Tue Jan 16 17:35:48 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/Requests.h Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: Requests.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: Requests.h,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /****************************************************************** Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h diff -u xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h:1.1.1.3 Tue Jan 16 17:35:50 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/SwapConv.h Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: SwapConv.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: SwapConv.h,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci:1.1.1.3 Tue Jan 16 17:35:51 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/UconvName.ci Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: UconvName.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: UconvName.ci,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/UconvName.h diff -u xc/programs/Xserver/PEX5/dipex/swap/UconvName.h:3.2 xc/programs/Xserver/PEX5/dipex/swap/UconvName.h:3.3 --- xc/programs/Xserver/PEX5/dipex/swap/UconvName.h:3.2 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/UconvName.h Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: UconvName.h,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: UconvName.h,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci:1.1.1.3 Tue Jan 16 17:35:55 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/cOCTables.ci Fri Dec 14 14:57:47 2001 @@ -1,11 +1,15 @@ -/* $Xorg: cOCTables.ci,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: cOCTables.ci,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /* Automatically generated OC table */ /****************************************************************** Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c diff -u xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/cOCprim.c Fri Dec 14 14:57:47 2001 @@ -1,10 +1,14 @@ -/* $Xorg: cOCprim.c,v 1.3 2000/08/17 19:47:16 cpqbld Exp $ */ +/* $Xorg: cOCprim.c,v 1.4 2001/02/09 02:04:16 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/check.c diff -u xc/programs/Xserver/PEX5/dipex/swap/check.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/check.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/check.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/check.c Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ - /* $Xorg: check.c,v 1.4 2000/08/17 19:47:17 cpqbld Exp $ +/* $Xorg: check.c,v 1.7 2001/02/09 02:04:16 xorgcvs Exp $ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/convEv.c diff -u xc/programs/Xserver/PEX5/dipex/swap/convEv.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/convEv.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/convEv.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/convEv.c Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: convEv.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: convEv.c,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /************************************************************ Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/convReq.c diff -u xc/programs/Xserver/PEX5/dipex/swap/convReq.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/convReq.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/convReq.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/convReq.c Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: convReq.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: convReq.c,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/convReq.h diff -u xc/programs/Xserver/PEX5/dipex/swap/convReq.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/convReq.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/convReq.h:1.1.1.3 Tue Jan 16 17:36:04 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/convReq.h Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: convReq.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: convReq.h,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/convUtil.c diff -u xc/programs/Xserver/PEX5/dipex/swap/convUtil.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/convUtil.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/convUtil.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/convUtil.c Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: convUtil.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: convUtil.c,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/convUtil.h diff -u xc/programs/Xserver/PEX5/dipex/swap/convUtil.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/convUtil.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/convUtil.h:1.1.1.3 Tue Jan 16 17:36:08 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/convUtil.h Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: convUtil.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: convUtil.h,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/convertStr.h diff -u xc/programs/Xserver/PEX5/dipex/swap/convertStr.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/convertStr.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/convertStr.h:1.1.1.3 Tue Jan 16 17:36:09 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/convertStr.h Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: convertStr.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: convertStr.h,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/floatconv.c diff -u xc/programs/Xserver/PEX5/dipex/swap/floatconv.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/floatconv.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/floatconv.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/floatconv.c Fri Dec 14 14:57:48 2001 @@ -1,10 +1,14 @@ -/* $Xorg: floatconv.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: floatconv.c,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/floatconv.h diff -u xc/programs/Xserver/PEX5/dipex/swap/floatconv.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/floatconv.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/floatconv.h:1.1.1.3 Tue Jan 16 17:36:11 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/floatconv.h Fri Dec 14 14:57:48 2001 @@ -1,4 +1,4 @@ -/* $Xorg: floatconv.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: floatconv.h,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /* * Copyright 1988-1991 by Sun Microsystems @@ -7,7 +7,11 @@ Copyright 1988-1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci diff -u xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci:1.1.1.3 Tue Jan 16 17:36:12 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/uOCTables.ci Fri Dec 14 14:57:49 2001 @@ -1,11 +1,15 @@ -/* $Xorg: uOCTables.ci,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: uOCTables.ci,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /* Automatically generated OC table */ /****************************************************************** Copyright 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c diff -u xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/uOCprim.c Fri Dec 14 14:57:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: uOCprim.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: uOCprim.c,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c diff -u xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c:1.8 xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c:1.9 --- xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c:1.8 Wed Jan 17 17:12:40 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/uconvRep.c Fri Dec 14 14:57:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: uconvRep.c,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: uconvRep.c,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h diff -u xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h:1.1.1.3 Tue Jan 16 17:36:16 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/uconvRep.h Fri Dec 14 14:57:49 2001 @@ -1,10 +1,14 @@ -/* $Xorg: uconvRep.h,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ */ +/* $Xorg: uconvRep.h,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk:1.1.1.3 Tue Jan 16 17:36:18 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.awk Fri Dec 14 14:57:51 2001 @@ -1,10 +1,14 @@ ## -# $Xorg: OCReduce.awk,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ +# $Xorg: OCReduce.awk,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ ## ## ## Copyright 1996, 1998 The Open Group ## -## All Rights Reserved. +## Permission to use, copy, modify, distribute, and sell this software and its +## documentation for any purpose is hereby granted without fee, provided that +## the above copyright notice appear in all copies and that both that +## copyright notice and this permission notice appear in supporting +## documentation. ## ## The above copyright notice and this permission notice shall be included in ## all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed diff -u xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed:1.1.1.3 Tue Jan 16 17:36:20 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/util/OCReduce.sed Fri Dec 14 14:57:51 2001 @@ -1,9 +1,13 @@ ## -# $Xorg: OCReduce.sed,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ +# $Xorg: OCReduce.sed,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ ## ## Copyright 1996, 1998 The Open Group ## -## All Rights Reserved. +## Permission to use, copy, modify, distribute, and sell this software and its +## documentation for any purpose is hereby granted without fee, provided that +## the above copyright notice appear in all copies and that both that +## copyright notice and this permission notice appear in supporting +## documentation. ## ## The above copyright notice and this permission notice shall be included in ## all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk:1.1.1.3 Tue Jan 16 17:36:21 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/util/OCTables.awk Fri Dec 14 14:57:51 2001 @@ -1,8 +1,12 @@ -# $Xorg: OCTables.awk,v 1.3 2000/08/17 19:47:17 cpqbld Exp $ +# $Xorg: OCTables.awk,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ ## ## Copyright 1996, 1998 The Open Group ## -## All Rights Reserved. +## Permission to use, copy, modify, distribute, and sell this software and its +## documentation for any purpose is hereby granted without fee, provided that +## the above copyright notice appear in all copies and that both that +## copyright notice and this permission notice appear in supporting +## documentation. ## ## The above copyright notice and this permission notice shall be included in ## all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk:1.1.1.3 Tue Jan 16 17:36:23 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/util/ReqSame.awk Fri Dec 14 14:57:51 2001 @@ -1,8 +1,12 @@ -# $Xorg: ReqSame.awk,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ +# $Xorg: ReqSame.awk,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ ## ## Copyright 1996, 1998 The Open Group ## -## All Rights Reserved. +## Permission to use, copy, modify, distribute, and sell this software and its +## documentation for any purpose is hereby granted without fee, provided that +## the above copyright notice appear in all copies and that both that +## copyright notice and this permission notice appear in supporting +## documentation. ## ## The above copyright notice and this permission notice shall be included in ## all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk diff -u xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk:1.1.1.3 xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk:1.2 --- xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk:1.1.1.3 Tue Jan 16 17:36:26 2001 +++ xc/programs/Xserver/PEX5/dipex/swap/util/ReqTab.awk Fri Dec 14 14:57:52 2001 @@ -1,8 +1,12 @@ -# $Xorg: ReqTab.awk,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ +# $Xorg: ReqTab.awk,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ ## ## Copyright 1996, 1998 The Open Group ## -## All Rights Reserved. +## Permission to use, copy, modify, distribute, and sell this software and its +## documentation for any purpose is hereby granted without fee, provided that +## the above copyright notice appear in all copies and that both that +## copyright notice and this permission notice appear in supporting +## documentation. ## ## The above copyright notice and this permission notice shall be included in ## all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/PEX.h diff -u xc/programs/Xserver/PEX5/include/PEX.h:1.1.1.4 xc/programs/Xserver/PEX5/include/PEX.h:1.2 --- xc/programs/Xserver/PEX5/include/PEX.h:1.1.1.4 Tue Jan 16 17:36:28 2001 +++ xc/programs/Xserver/PEX5/include/PEX.h Fri Dec 14 14:57:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: PEX.h,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ */ +/* $Xorg: PEX.h,v 1.4 2001/02/09 02:04:17 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/PEXErr.h diff -u xc/programs/Xserver/PEX5/include/PEXErr.h:1.1.1.3 xc/programs/Xserver/PEX5/include/PEXErr.h:1.2 --- xc/programs/Xserver/PEX5/include/PEXErr.h:1.1.1.3 Tue Jan 16 17:36:27 2001 +++ xc/programs/Xserver/PEX5/include/PEXErr.h Fri Dec 14 14:57:52 2001 @@ -1,10 +1,14 @@ -/* $Xorg: PEXErr.h,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ */ +/* $Xorg: PEXErr.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1988,1989,1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/PEXfuncs.h diff -u xc/programs/Xserver/PEX5/include/PEXfuncs.h:1.1.1.3 xc/programs/Xserver/PEX5/include/PEXfuncs.h:1.2 --- xc/programs/Xserver/PEX5/include/PEXfuncs.h:1.1.1.3 Tue Jan 16 17:36:30 2001 +++ xc/programs/Xserver/PEX5/include/PEXfuncs.h Fri Dec 14 14:57:53 2001 @@ -1,10 +1,14 @@ -/* $Xorg: PEXfuncs.h,v 1.3 2000/08/17 19:47:18 cpqbld Exp $ */ +/* $Xorg: PEXfuncs.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/PEXmacs.h diff -u xc/programs/Xserver/PEX5/include/PEXmacs.h:1.1.1.3 xc/programs/Xserver/PEX5/include/PEXmacs.h:1.2 --- xc/programs/Xserver/PEX5/include/PEXmacs.h:1.1.1.3 Tue Jan 16 17:36:31 2001 +++ xc/programs/Xserver/PEX5/include/PEXmacs.h Fri Dec 14 14:57:53 2001 @@ -1,10 +1,14 @@ -/* $Xorg: PEXmacs.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: PEXmacs.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/PEXproto.h diff -u xc/programs/Xserver/PEX5/include/PEXproto.h:1.1.1.4 xc/programs/Xserver/PEX5/include/PEXproto.h:1.2 --- xc/programs/Xserver/PEX5/include/PEXproto.h:1.1.1.4 Tue Jan 16 17:36:33 2001 +++ xc/programs/Xserver/PEX5/include/PEXproto.h Fri Dec 14 14:57:53 2001 @@ -1,10 +1,14 @@ -/* $Xorg: PEXproto.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: PEXproto.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/PEXprotost.h diff -u xc/programs/Xserver/PEX5/include/PEXprotost.h:1.1.1.3 xc/programs/Xserver/PEX5/include/PEXprotost.h:1.2 --- xc/programs/Xserver/PEX5/include/PEXprotost.h:1.1.1.3 Tue Jan 16 17:36:36 2001 +++ xc/programs/Xserver/PEX5/include/PEXprotost.h Fri Dec 14 14:57:54 2001 @@ -1,11 +1,15 @@ -/* $Xorg: PEXprotost.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: PEXprotost.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/ddpex.h diff -u xc/programs/Xserver/PEX5/include/ddpex.h:1.1.1.3 xc/programs/Xserver/PEX5/include/ddpex.h:1.2 --- xc/programs/Xserver/PEX5/include/ddpex.h:1.1.1.3 Tue Jan 16 17:36:37 2001 +++ xc/programs/Xserver/PEX5/include/ddpex.h Fri Dec 14 14:57:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ddpex.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: ddpex.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/ddpex3.h diff -u xc/programs/Xserver/PEX5/include/ddpex3.h:1.1.1.3 xc/programs/Xserver/PEX5/include/ddpex3.h:1.2 --- xc/programs/Xserver/PEX5/include/ddpex3.h:1.1.1.3 Tue Jan 16 17:36:39 2001 +++ xc/programs/Xserver/PEX5/include/ddpex3.h Fri Dec 14 14:57:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ddpex3.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: ddpex3.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/ddpex4.h diff -u xc/programs/Xserver/PEX5/include/ddpex4.h:1.1.1.3 xc/programs/Xserver/PEX5/include/ddpex4.h:1.2 --- xc/programs/Xserver/PEX5/include/ddpex4.h:1.1.1.3 Tue Jan 16 17:36:40 2001 +++ xc/programs/Xserver/PEX5/include/ddpex4.h Fri Dec 14 14:57:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ddpex4.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: ddpex4.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/dipex.h diff -u xc/programs/Xserver/PEX5/include/dipex.h:1.4 xc/programs/Xserver/PEX5/include/dipex.h:1.5 --- xc/programs/Xserver/PEX5/include/dipex.h:1.4 Wed Jan 17 17:12:43 2001 +++ xc/programs/Xserver/PEX5/include/dipex.h Fri Dec 14 14:57:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: dipex.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: dipex.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/pexError.h diff -u xc/programs/Xserver/PEX5/include/pexError.h:1.1.1.3 xc/programs/Xserver/PEX5/include/pexError.h:1.2 --- xc/programs/Xserver/PEX5/include/pexError.h:1.1.1.3 Tue Jan 16 17:36:42 2001 +++ xc/programs/Xserver/PEX5/include/pexError.h Fri Dec 14 14:57:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexError.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: pexError.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/pexExtract.h diff -u xc/programs/Xserver/PEX5/include/pexExtract.h:1.1.1.3 xc/programs/Xserver/PEX5/include/pexExtract.h:1.2 --- xc/programs/Xserver/PEX5/include/pexExtract.h:1.1.1.3 Tue Jan 16 17:36:43 2001 +++ xc/programs/Xserver/PEX5/include/pexExtract.h Fri Dec 14 14:57:54 2001 @@ -1,11 +1,15 @@ -/* $Xorg: pexExtract.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: pexExtract.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/pexLookup.h diff -u xc/programs/Xserver/PEX5/include/pexLookup.h:1.1.1.3 xc/programs/Xserver/PEX5/include/pexLookup.h:1.2 --- xc/programs/Xserver/PEX5/include/pexLookup.h:1.1.1.3 Tue Jan 16 17:36:45 2001 +++ xc/programs/Xserver/PEX5/include/pexLookup.h Fri Dec 14 14:57:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexLookup.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: pexLookup.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/pexSwap.h diff -u xc/programs/Xserver/PEX5/include/pexSwap.h:1.1.1.3 xc/programs/Xserver/PEX5/include/pexSwap.h:1.2 --- xc/programs/Xserver/PEX5/include/pexSwap.h:1.1.1.3 Tue Jan 16 17:36:46 2001 +++ xc/programs/Xserver/PEX5/include/pexSwap.h Fri Dec 14 14:57:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexSwap.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: pexSwap.h,v 1.4 2001/02/09 02:04:18 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/pexUtils.h diff -u xc/programs/Xserver/PEX5/include/pexUtils.h:1.1.1.3 xc/programs/Xserver/PEX5/include/pexUtils.h:1.2 --- xc/programs/Xserver/PEX5/include/pexUtils.h:1.1.1.3 Tue Jan 16 17:36:47 2001 +++ xc/programs/Xserver/PEX5/include/pexUtils.h Fri Dec 14 14:57:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pexUtils.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: pexUtils.h,v 1.4 2001/02/09 02:04:19 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/pex_site.h diff -u xc/programs/Xserver/PEX5/include/pex_site.h:1.1.1.3 xc/programs/Xserver/PEX5/include/pex_site.h:1.2 --- xc/programs/Xserver/PEX5/include/pex_site.h:1.1.1.3 Tue Jan 16 17:36:49 2001 +++ xc/programs/Xserver/PEX5/include/pex_site.h Fri Dec 14 14:57:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pex_site.h,v 1.3 2000/08/17 19:47:19 cpqbld Exp $ */ +/* $Xorg: pex_site.h,v 1.4 2001/02/09 02:04:19 xorgcvs Exp $ */ /*********************************************************** Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/PEX5/include/pexos.h diff -u xc/programs/Xserver/PEX5/include/pexos.h:1.2 xc/programs/Xserver/PEX5/include/pexos.h:1.3 --- xc/programs/Xserver/PEX5/include/pexos.h:1.2 Sun Jan 31 07:21:33 1999 +++ xc/programs/Xserver/PEX5/include/pexos.h Wed Jul 25 11:04:59 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/PEX5/include/pexos.h,v 1.2 1999/01/31 12:21:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/include/pexos.h,v 1.3 2001/07/25 15:04:59 dawes Exp $ */ /* * This file contains all external OS/ANSI header includes, prototypes and @@ -42,11 +42,7 @@ #ifdef NEED_GETENV #include -#ifndef X_NOT_STDC_ENV #include -#else -extern char *getenv(); -#endif #endif /* NEED_GETENV */ #ifndef SEEK_SET Index: xc/programs/Xserver/PEX5/ospex/osPexFont.c diff -u xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.17 xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.18 --- xc/programs/Xserver/PEX5/ospex/osPexFont.c:3.17 Wed Jan 17 17:12:43 2001 +++ xc/programs/Xserver/PEX5/ospex/osPexFont.c Fri Dec 14 14:57:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: osPexFont.c,v 1.3 2000/08/17 19:47:20 cpqbld Exp $ */ +/* $Xorg: osPexFont.c,v 1.4 2001/02/09 02:04:19 xorgcvs Exp $ */ /* Copyright 1989, 1990, 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/PEX5/ospex/osPexFont.c,v 3.17 2001/01/17 22:12:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/PEX5/ospex/osPexFont.c,v 3.18 2001/12/14 19:57:56 dawes Exp $ */ #ifdef WIN32 #define _WILLWINSOCK_ Index: xc/programs/Xserver/XIE/dixie/export/echist.c diff -u xc/programs/Xserver/XIE/dixie/export/echist.c:3.4 xc/programs/Xserver/XIE/dixie/export/echist.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/echist.c:3.4 Wed Jan 17 17:12:48 2001 +++ xc/programs/Xserver/XIE/dixie/export/echist.c Fri Dec 14 14:57:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: echist.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ +/* $Xorg: echist.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module echist.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/echist.c,v 3.4 2001/01/17 22:12:48 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/echist.c,v 3.5 2001/12/14 19:57:57 dawes Exp $ */ #define _XIEC_ECHIST Index: xc/programs/Xserver/XIE/dixie/export/eclut.c diff -u xc/programs/Xserver/XIE/dixie/export/eclut.c:3.4 xc/programs/Xserver/XIE/dixie/export/eclut.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/eclut.c:3.4 Wed Jan 17 17:12:48 2001 +++ xc/programs/Xserver/XIE/dixie/export/eclut.c Fri Dec 14 14:57:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: eclut.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ +/* $Xorg: eclut.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module eclut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eclut.c,v 3.4 2001/01/17 22:12:48 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eclut.c,v 3.5 2001/12/14 19:57:57 dawes Exp $ */ #define _XIEC_ECLUT Index: xc/programs/Xserver/XIE/dixie/export/ecphoto.c diff -u xc/programs/Xserver/XIE/dixie/export/ecphoto.c:3.5 xc/programs/Xserver/XIE/dixie/export/ecphoto.c:3.6 --- xc/programs/Xserver/XIE/dixie/export/ecphoto.c:3.5 Wed Jan 17 17:12:48 2001 +++ xc/programs/Xserver/XIE/dixie/export/ecphoto.c Fri Dec 14 14:57:57 2001 @@ -1,11 +1,15 @@ -/* $Xorg: ecphoto.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ +/* $Xorg: ecphoto.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module ecphoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecphoto.c,v 3.5 2001/01/17 22:12:48 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecphoto.c,v 3.6 2001/12/14 19:57:57 dawes Exp $ */ #define _XIEC_ECPHOTO Index: xc/programs/Xserver/XIE/dixie/export/ecroi.c diff -u xc/programs/Xserver/XIE/dixie/export/ecroi.c:3.4 xc/programs/Xserver/XIE/dixie/export/ecroi.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/ecroi.c:3.4 Wed Jan 17 17:12:48 2001 +++ xc/programs/Xserver/XIE/dixie/export/ecroi.c Fri Dec 14 14:57:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ecroi.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ +/* $Xorg: ecroi.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module ecroi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecroi.c,v 3.4 2001/01/17 22:12:48 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ecroi.c,v 3.5 2001/12/14 19:57:58 dawes Exp $ */ #define _XIEC_ECROI Index: xc/programs/Xserver/XIE/dixie/export/edraw.c diff -u xc/programs/Xserver/XIE/dixie/export/edraw.c:3.4 xc/programs/Xserver/XIE/dixie/export/edraw.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/edraw.c:3.4 Wed Jan 17 17:12:49 2001 +++ xc/programs/Xserver/XIE/dixie/export/edraw.c Fri Dec 14 14:57:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: edraw.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ +/* $Xorg: edraw.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module edraw.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edraw.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edraw.c,v 3.5 2001/12/14 19:57:58 dawes Exp $ */ #define _XIEC_EDRAW Index: xc/programs/Xserver/XIE/dixie/export/edrawp.c diff -u xc/programs/Xserver/XIE/dixie/export/edrawp.c:3.4 xc/programs/Xserver/XIE/dixie/export/edrawp.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/edrawp.c:3.4 Wed Jan 17 17:12:49 2001 +++ xc/programs/Xserver/XIE/dixie/export/edrawp.c Fri Dec 14 14:57:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: edrawp.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ +/* $Xorg: edrawp.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module edrawp.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edrawp.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/edrawp.c,v 3.5 2001/12/14 19:57:58 dawes Exp $ */ #define _XIEC_EDRAWP Index: xc/programs/Xserver/XIE/dixie/export/elut.c diff -u xc/programs/Xserver/XIE/dixie/export/elut.c:3.4 xc/programs/Xserver/XIE/dixie/export/elut.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/elut.c:3.4 Wed Jan 17 17:12:49 2001 +++ xc/programs/Xserver/XIE/dixie/export/elut.c Fri Dec 14 14:57:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: elut.c,v 1.3 2000/08/17 19:47:23 cpqbld Exp $ */ +/* $Xorg: elut.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module elut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/elut.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/elut.c,v 3.5 2001/12/14 19:57:59 dawes Exp $ */ #define _XIEC_ELUT Index: xc/programs/Xserver/XIE/dixie/export/ephoto.c diff -u xc/programs/Xserver/XIE/dixie/export/ephoto.c:3.5 xc/programs/Xserver/XIE/dixie/export/ephoto.c:3.6 --- xc/programs/Xserver/XIE/dixie/export/ephoto.c:3.5 Wed Jan 17 17:12:49 2001 +++ xc/programs/Xserver/XIE/dixie/export/ephoto.c Fri Dec 14 14:57:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ephoto.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: ephoto.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module ephoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley && Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ephoto.c,v 3.5 2001/01/17 22:12:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/ephoto.c,v 3.6 2001/12/14 19:57:59 dawes Exp $ */ #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/dixie/export/eroi.c diff -u xc/programs/Xserver/XIE/dixie/export/eroi.c:3.4 xc/programs/Xserver/XIE/dixie/export/eroi.c:3.5 --- xc/programs/Xserver/XIE/dixie/export/eroi.c:3.4 Wed Jan 17 17:12:49 2001 +++ xc/programs/Xserver/XIE/dixie/export/eroi.c Fri Dec 14 14:57:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: eroi.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: eroi.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module eroi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eroi.c,v 3.4 2001/01/17 22:12:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/export/eroi.c,v 3.5 2001/12/14 19:57:59 dawes Exp $ */ #define _XIEC_EROI Index: xc/programs/Xserver/XIE/dixie/import/iclut.c diff -u xc/programs/Xserver/XIE/dixie/import/iclut.c:3.4 xc/programs/Xserver/XIE/dixie/import/iclut.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/iclut.c:3.4 Wed Jan 17 17:12:50 2001 +++ xc/programs/Xserver/XIE/dixie/import/iclut.c Fri Dec 14 14:58:00 2001 @@ -1,11 +1,15 @@ -/* $Xorg: iclut.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: iclut.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module iclut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -68,7 +72,7 @@ Ben Fahy -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iclut.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iclut.c,v 3.5 2001/12/14 19:58:00 dawes Exp $ */ #define _XIEC_ICLUT Index: xc/programs/Xserver/XIE/dixie/import/icphoto.c diff -u xc/programs/Xserver/XIE/dixie/import/icphoto.c:3.4 xc/programs/Xserver/XIE/dixie/import/icphoto.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/icphoto.c:3.4 Wed Jan 17 17:12:50 2001 +++ xc/programs/Xserver/XIE/dixie/import/icphoto.c Fri Dec 14 14:58:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: icphoto.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: icphoto.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module icphoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley, Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icphoto.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icphoto.c,v 3.5 2001/12/14 19:58:00 dawes Exp $ */ #define _XIEC_ICPHOTO Index: xc/programs/Xserver/XIE/dixie/import/icroi.c diff -u xc/programs/Xserver/XIE/dixie/import/icroi.c:3.4 xc/programs/Xserver/XIE/dixie/import/icroi.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/icroi.c:3.4 Wed Jan 17 17:12:50 2001 +++ xc/programs/Xserver/XIE/dixie/import/icroi.c Fri Dec 14 14:58:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: icroi.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: icroi.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module icroi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley, Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icroi.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/icroi.c,v 3.5 2001/12/14 19:58:01 dawes Exp $ */ #define _XIEC_ICROI Index: xc/programs/Xserver/XIE/dixie/import/idraw.c diff -u xc/programs/Xserver/XIE/dixie/import/idraw.c:3.4 xc/programs/Xserver/XIE/dixie/import/idraw.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/idraw.c:3.4 Wed Jan 17 17:12:50 2001 +++ xc/programs/Xserver/XIE/dixie/import/idraw.c Fri Dec 14 14:58:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: idraw.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: idraw.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module idraw.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idraw.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idraw.c,v 3.5 2001/12/14 19:58:01 dawes Exp $ */ #define _XIEC_IDRAW Index: xc/programs/Xserver/XIE/dixie/import/idrawp.c diff -u xc/programs/Xserver/XIE/dixie/import/idrawp.c:3.4 xc/programs/Xserver/XIE/dixie/import/idrawp.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/idrawp.c:3.4 Wed Jan 17 17:12:50 2001 +++ xc/programs/Xserver/XIE/dixie/import/idrawp.c Fri Dec 14 14:58:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: idrawp.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: idrawp.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module idrawp.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idrawp.c,v 3.4 2001/01/17 22:12:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/idrawp.c,v 3.5 2001/12/14 19:58:01 dawes Exp $ */ #define _XIEC_IDRAWP Index: xc/programs/Xserver/XIE/dixie/import/ilut.c diff -u xc/programs/Xserver/XIE/dixie/import/ilut.c:3.4 xc/programs/Xserver/XIE/dixie/import/ilut.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/ilut.c:3.4 Wed Jan 17 17:12:51 2001 +++ xc/programs/Xserver/XIE/dixie/import/ilut.c Fri Dec 14 14:58:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ilut.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: ilut.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module ilut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/ilut.c,v 3.4 2001/01/17 22:12:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/ilut.c,v 3.5 2001/12/14 19:58:01 dawes Exp $ */ #define _XIEC_ILUT Index: xc/programs/Xserver/XIE/dixie/import/iphoto.c diff -u xc/programs/Xserver/XIE/dixie/import/iphoto.c:3.4 xc/programs/Xserver/XIE/dixie/import/iphoto.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/iphoto.c:3.4 Wed Jan 17 17:12:51 2001 +++ xc/programs/Xserver/XIE/dixie/import/iphoto.c Fri Dec 14 14:58:01 2001 @@ -1,10 +1,14 @@ -/* $Xorg: iphoto.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: iphoto.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module iphoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iphoto.c,v 3.4 2001/01/17 22:12:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iphoto.c,v 3.5 2001/12/14 19:58:01 dawes Exp $ */ #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/dixie/import/iroi.c diff -u xc/programs/Xserver/XIE/dixie/import/iroi.c:3.4 xc/programs/Xserver/XIE/dixie/import/iroi.c:3.5 --- xc/programs/Xserver/XIE/dixie/import/iroi.c:3.4 Wed Jan 17 17:12:51 2001 +++ xc/programs/Xserver/XIE/dixie/import/iroi.c Fri Dec 14 14:58:02 2001 @@ -1,10 +1,14 @@ -/* $Xorg: iroi.c,v 1.3 2000/08/17 19:47:24 cpqbld Exp $ */ +/* $Xorg: iroi.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module iroi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iroi.c,v 3.4 2001/01/17 22:12:51 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/import/iroi.c,v 3.5 2001/12/14 19:58:02 dawes Exp $ */ #define _XIEC_IROI Index: xc/programs/Xserver/XIE/dixie/process/parith.c diff -u xc/programs/Xserver/XIE/dixie/process/parith.c:3.4 xc/programs/Xserver/XIE/dixie/process/parith.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/parith.c:3.4 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/parith.c Fri Dec 14 14:58:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: parith.c,v 1.5 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: parith.c,v 1.6 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module parith.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/parith.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/parith.c,v 3.5 2001/12/14 19:58:03 dawes Exp $ */ #define _XIEC_PARITH Index: xc/programs/Xserver/XIE/dixie/process/pbandc.c diff -u xc/programs/Xserver/XIE/dixie/process/pbandc.c:3.4 xc/programs/Xserver/XIE/dixie/process/pbandc.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pbandc.c:3.4 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pbandc.c Fri Dec 14 14:58:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pbandc.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: pbandc.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module pbandc.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbandc.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbandc.c,v 3.5 2001/12/14 19:58:03 dawes Exp $ */ #define _XIEC_PBANDC Index: xc/programs/Xserver/XIE/dixie/process/pbande.c diff -u xc/programs/Xserver/XIE/dixie/process/pbande.c:3.4 xc/programs/Xserver/XIE/dixie/process/pbande.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pbande.c:3.4 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pbande.c Fri Dec 14 14:58:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pbande.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: pbande.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module pbande.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbande.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbande.c,v 3.5 2001/12/14 19:58:03 dawes Exp $ */ #define _XIEC_PBANDE Index: xc/programs/Xserver/XIE/dixie/process/pbands.c diff -u xc/programs/Xserver/XIE/dixie/process/pbands.c:3.4 xc/programs/Xserver/XIE/dixie/process/pbands.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pbands.c:3.4 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pbands.c Fri Dec 14 14:58:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pbands.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: pbands.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module pbands.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. September 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbands.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pbands.c,v 3.5 2001/12/14 19:58:03 dawes Exp $ */ #define _XIEC_PBANDS Index: xc/programs/Xserver/XIE/dixie/process/pblend.c diff -u xc/programs/Xserver/XIE/dixie/process/pblend.c:3.4 xc/programs/Xserver/XIE/dixie/process/pblend.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pblend.c:3.4 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pblend.c Fri Dec 14 14:58:03 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pblend.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: pblend.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module pblend.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pblend.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pblend.c,v 3.5 2001/12/14 19:58:03 dawes Exp $ */ #define _XIEC_PBLEND Index: xc/programs/Xserver/XIE/dixie/process/pcfrgb.c diff -u xc/programs/Xserver/XIE/dixie/process/pcfrgb.c:3.5 xc/programs/Xserver/XIE/dixie/process/pcfrgb.c:3.6 --- xc/programs/Xserver/XIE/dixie/process/pcfrgb.c:3.5 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pcfrgb.c Fri Dec 14 14:58:04 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pcfrgb.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: pcfrgb.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module pcfrgb.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfrgb.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfrgb.c,v 3.6 2001/12/14 19:58:04 dawes Exp $ */ #define _XIEC_PCFRGB Index: xc/programs/Xserver/XIE/dixie/process/pcfromi.c diff -u xc/programs/Xserver/XIE/dixie/process/pcfromi.c:3.4 xc/programs/Xserver/XIE/dixie/process/pcfromi.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pcfromi.c:3.4 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pcfromi.c Fri Dec 14 14:58:04 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pcfromi.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: pcfromi.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module pcfromi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfromi.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcfromi.c,v 3.5 2001/12/14 19:58:04 dawes Exp $ */ #define _XIEC_PCFROMI #define _XIEC_PCI Index: xc/programs/Xserver/XIE/dixie/process/pcnst.c diff -u xc/programs/Xserver/XIE/dixie/process/pcnst.c:3.5 xc/programs/Xserver/XIE/dixie/process/pcnst.c:3.6 --- xc/programs/Xserver/XIE/dixie/process/pcnst.c:3.5 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pcnst.c Fri Dec 14 14:58:04 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pcnst.c,v 1.3 2000/08/17 19:47:26 cpqbld Exp $ */ +/* $Xorg: pcnst.c,v 1.4 2001/02/09 02:04:20 xorgcvs Exp $ */ /**** module pcnst.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcnst.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcnst.c,v 3.6 2001/12/14 19:58:04 dawes Exp $ */ #define _XIEC_PCNST Index: xc/programs/Xserver/XIE/dixie/process/pcomp.c diff -u xc/programs/Xserver/XIE/dixie/process/pcomp.c:3.4 xc/programs/Xserver/XIE/dixie/process/pcomp.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pcomp.c:3.4 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pcomp.c Fri Dec 14 14:58:05 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pcomp.c,v 1.5 2000/08/17 19:47:27 cpqbld Exp $ */ +/* $Xorg: pcomp.c,v 1.6 2001/02/09 02:04:21 xorgcvs Exp $ */ /**** module pcomp.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcomp.c,v 3.4 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pcomp.c,v 3.5 2001/12/14 19:58:05 dawes Exp $ */ #define _XIEC_PCOMP Index: xc/programs/Xserver/XIE/dixie/process/pconv.c diff -u xc/programs/Xserver/XIE/dixie/process/pconv.c:3.5 xc/programs/Xserver/XIE/dixie/process/pconv.c:3.6 --- xc/programs/Xserver/XIE/dixie/process/pconv.c:3.5 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pconv.c Fri Dec 14 14:58:05 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pconv.c,v 1.3 2000/08/17 19:47:27 cpqbld Exp $ */ +/* $Xorg: pconv.c,v 1.4 2001/02/09 02:04:21 xorgcvs Exp $ */ /**** module pconv.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pconv.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pconv.c,v 3.6 2001/12/14 19:58:05 dawes Exp $ */ #define _XIEC_PCONV Index: xc/programs/Xserver/XIE/dixie/process/pctoi.c diff -u xc/programs/Xserver/XIE/dixie/process/pctoi.c:3.5 xc/programs/Xserver/XIE/dixie/process/pctoi.c:3.6 --- xc/programs/Xserver/XIE/dixie/process/pctoi.c:3.5 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pctoi.c Fri Dec 14 14:58:05 2001 @@ -1,11 +1,15 @@ -/* $Xorg: pctoi.c,v 1.3 2000/08/17 19:47:27 cpqbld Exp $ */ +/* $Xorg: pctoi.c,v 1.4 2001/02/09 02:04:21 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module pctoi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden && Robert NC Shelley -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctoi.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctoi.c,v 3.6 2001/12/14 19:58:05 dawes Exp $ */ #define _XIEC_PCTOI #define _XIEC_PCI Index: xc/programs/Xserver/XIE/dixie/process/pctrgb.c diff -u xc/programs/Xserver/XIE/dixie/process/pctrgb.c:3.5 xc/programs/Xserver/XIE/dixie/process/pctrgb.c:3.6 --- xc/programs/Xserver/XIE/dixie/process/pctrgb.c:3.5 Wed Jan 17 17:12:52 2001 +++ xc/programs/Xserver/XIE/dixie/process/pctrgb.c Fri Dec 14 14:58:05 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pctrgb.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ +/* $Xorg: pctrgb.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module pctrgb.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctrgb.c,v 3.5 2001/01/17 22:12:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pctrgb.c,v 3.6 2001/12/14 19:58:05 dawes Exp $ */ #define _XIEC_PCTRGB Index: xc/programs/Xserver/XIE/dixie/process/pdither.c diff -u xc/programs/Xserver/XIE/dixie/process/pdither.c:3.4 xc/programs/Xserver/XIE/dixie/process/pdither.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pdither.c:3.4 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/pdither.c Fri Dec 14 14:58:05 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pdither.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ +/* $Xorg: pdither.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module pdither.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pdither.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pdither.c,v 3.5 2001/12/14 19:58:05 dawes Exp $ */ #define _XIEC_PDITHER Index: xc/programs/Xserver/XIE/dixie/process/pgeom.c diff -u xc/programs/Xserver/XIE/dixie/process/pgeom.c:3.5 xc/programs/Xserver/XIE/dixie/process/pgeom.c:3.6 --- xc/programs/Xserver/XIE/dixie/process/pgeom.c:3.5 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/pgeom.c Fri Dec 14 14:58:05 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pgeom.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ +/* $Xorg: pgeom.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module pgeom.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Ben Fahy -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pgeom.c,v 3.5 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pgeom.c,v 3.6 2001/12/14 19:58:05 dawes Exp $ */ #define _XIEC_PGEOM Index: xc/programs/Xserver/XIE/dixie/process/phist.c diff -u xc/programs/Xserver/XIE/dixie/process/phist.c:3.5 xc/programs/Xserver/XIE/dixie/process/phist.c:3.6 --- xc/programs/Xserver/XIE/dixie/process/phist.c:3.5 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/phist.c Fri Dec 14 14:58:06 2001 @@ -1,10 +1,14 @@ -/* $Xorg: phist.c,v 1.3 2000/08/17 19:47:28 cpqbld Exp $ */ +/* $Xorg: phist.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module phist.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/phist.c,v 3.5 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/phist.c,v 3.6 2001/12/14 19:58:06 dawes Exp $ */ #define _XIEC_PHIST Index: xc/programs/Xserver/XIE/dixie/process/plogic.c diff -u xc/programs/Xserver/XIE/dixie/process/plogic.c:3.4 xc/programs/Xserver/XIE/dixie/process/plogic.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/plogic.c:3.4 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/plogic.c Fri Dec 14 14:58:06 2001 @@ -1,10 +1,14 @@ -/* $Xorg: plogic.c,v 1.5 2000/08/17 19:47:28 cpqbld Exp $ */ +/* $Xorg: plogic.c,v 1.6 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module plogic.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/plogic.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/plogic.c,v 3.5 2001/12/14 19:58:06 dawes Exp $ */ #define _XIEC_PLOGIC Index: xc/programs/Xserver/XIE/dixie/process/pmath.c diff -u xc/programs/Xserver/XIE/dixie/process/pmath.c:3.4 xc/programs/Xserver/XIE/dixie/process/pmath.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/pmath.c:3.4 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/pmath.c Fri Dec 14 14:58:06 2001 @@ -1,10 +1,14 @@ -/* $Xorg: pmath.c,v 1.5 2000/08/17 19:47:29 cpqbld Exp $ */ +/* $Xorg: pmath.c,v 1.6 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module pmath.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. July 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pmath.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/pmath.c,v 3.5 2001/12/14 19:58:06 dawes Exp $ */ #define _XIEC_PMATH Index: xc/programs/Xserver/XIE/dixie/process/ppaste.c diff -u xc/programs/Xserver/XIE/dixie/process/ppaste.c:3.4 xc/programs/Xserver/XIE/dixie/process/ppaste.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/ppaste.c:3.4 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/ppaste.c Fri Dec 14 14:58:07 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ppaste.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ +/* $Xorg: ppaste.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module ppaste.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. June 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppaste.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppaste.c,v 3.5 2001/12/14 19:58:07 dawes Exp $ */ #define _XIEC_PPASTE Index: xc/programs/Xserver/XIE/dixie/process/ppoint.c diff -u xc/programs/Xserver/XIE/dixie/process/ppoint.c:3.4 xc/programs/Xserver/XIE/dixie/process/ppoint.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/ppoint.c:3.4 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/ppoint.c Fri Dec 14 14:58:07 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ppoint.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ +/* $Xorg: ppoint.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module ppoint.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Ben Fahy -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppoint.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/ppoint.c,v 3.5 2001/12/14 19:58:07 dawes Exp $ */ #define _XIEC_PPOINT #define _XIEC_POINT Index: xc/programs/Xserver/XIE/dixie/process/puncnst.c diff -u xc/programs/Xserver/XIE/dixie/process/puncnst.c:3.4 xc/programs/Xserver/XIE/dixie/process/puncnst.c:3.5 --- xc/programs/Xserver/XIE/dixie/process/puncnst.c:3.4 Wed Jan 17 17:12:53 2001 +++ xc/programs/Xserver/XIE/dixie/process/puncnst.c Fri Dec 14 14:58:07 2001 @@ -1,10 +1,14 @@ -/* $Xorg: puncnst.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ +/* $Xorg: puncnst.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module puncnst.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. May 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/process/puncnst.c,v 3.4 2001/01/17 22:12:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/process/puncnst.c,v 3.5 2001/12/14 19:58:07 dawes Exp $ */ #define _XIEC_PUNCNST Index: xc/programs/Xserver/XIE/dixie/request/colorlst.c diff -u xc/programs/Xserver/XIE/dixie/request/colorlst.c:3.4 xc/programs/Xserver/XIE/dixie/request/colorlst.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/colorlst.c:3.4 Wed Jan 17 17:12:55 2001 +++ xc/programs/Xserver/XIE/dixie/request/colorlst.c Fri Dec 14 14:58:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: colorlst.c,v 1.3 2000/08/17 19:47:29 cpqbld Exp $ */ +/* $Xorg: colorlst.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module colorlst.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. March, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/colorlst.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/colorlst.c,v 3.5 2001/12/14 19:58:09 dawes Exp $ */ #define _XIEC_COLORLST Index: xc/programs/Xserver/XIE/dixie/request/difloat.c diff -u xc/programs/Xserver/XIE/dixie/request/difloat.c:1.7 xc/programs/Xserver/XIE/dixie/request/difloat.c:1.8 --- xc/programs/Xserver/XIE/dixie/request/difloat.c:1.7 Wed Jan 17 17:12:55 2001 +++ xc/programs/Xserver/XIE/dixie/request/difloat.c Fri Dec 14 14:58:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: difloat.c,v 1.3 2000/08/17 19:47:30 cpqbld Exp $ */ +/* $Xorg: difloat.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module difloat.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/difloat.c,v 1.7 2001/01/17 22:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/difloat.c,v 1.8 2001/12/14 19:58:09 dawes Exp $ */ #ifndef XIE_IEEE_IS_NATIVE #define _XIEC_DIFLOAT Index: xc/programs/Xserver/XIE/dixie/request/error.c diff -u xc/programs/Xserver/XIE/dixie/request/error.c:3.4 xc/programs/Xserver/XIE/dixie/request/error.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/error.c:3.4 Wed Jan 17 17:12:55 2001 +++ xc/programs/Xserver/XIE/dixie/request/error.c Fri Dec 14 14:58:09 2001 @@ -1,11 +1,15 @@ -/* $Xorg: error.c,v 1.5 2000/08/17 19:47:30 cpqbld Exp $ */ +/* $Xorg: error.c,v 1.6 2001/02/09 02:04:22 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module error.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -61,7 +65,7 @@ Title to this software shall at all times remain with AGE Logic, Inc. ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/error.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/error.c,v 3.5 2001/12/14 19:58:09 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/dixie/request/event.c diff -u xc/programs/Xserver/XIE/dixie/request/event.c:3.4 xc/programs/Xserver/XIE/dixie/request/event.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/event.c:3.4 Wed Jan 17 17:12:55 2001 +++ xc/programs/Xserver/XIE/dixie/request/event.c Fri Dec 14 14:58:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: event.c,v 1.3 2000/08/17 19:47:30 cpqbld Exp $ */ +/* $Xorg: event.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module event.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/event.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/event.c,v 3.5 2001/12/14 19:58:09 dawes Exp $ */ #define _XIEC_EVENT Index: xc/programs/Xserver/XIE/dixie/request/flo.c diff -u xc/programs/Xserver/XIE/dixie/request/flo.c:3.5 xc/programs/Xserver/XIE/dixie/request/flo.c:3.6 --- xc/programs/Xserver/XIE/dixie/request/flo.c:3.5 Wed Jan 17 17:12:55 2001 +++ xc/programs/Xserver/XIE/dixie/request/flo.c Fri Dec 14 14:58:09 2001 @@ -1,10 +1,14 @@ -/* $Xorg: flo.c,v 1.3 2000/08/17 19:47:30 cpqbld Exp $ */ +/* $Xorg: flo.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module flo.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/flo.c,v 3.5 2001/01/17 22:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/flo.c,v 3.6 2001/12/14 19:58:09 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/dixie/request/lut.c diff -u xc/programs/Xserver/XIE/dixie/request/lut.c:3.4 xc/programs/Xserver/XIE/dixie/request/lut.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/lut.c:3.4 Wed Jan 17 17:12:55 2001 +++ xc/programs/Xserver/XIE/dixie/request/lut.c Fri Dec 14 14:58:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: lut.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ +/* $Xorg: lut.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module lut.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -60,7 +64,7 @@ Title to this software shall at all times remain with AGE Logic, Inc. ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/lut.c,v 3.4 2001/01/17 22:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/lut.c,v 3.5 2001/12/14 19:58:10 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/dixie/request/memory.c diff -u xc/programs/Xserver/XIE/dixie/request/memory.c:3.6 xc/programs/Xserver/XIE/dixie/request/memory.c:3.7 --- xc/programs/Xserver/XIE/dixie/request/memory.c:3.6 Wed Jan 17 17:12:55 2001 +++ xc/programs/Xserver/XIE/dixie/request/memory.c Fri Dec 14 14:58:10 2001 @@ -1,11 +1,15 @@ -/* $Xorg: memory.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ +/* $Xorg: memory.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /* Module memory.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden, AGE Logic, Inc., April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/memory.c,v 3.6 2001/01/17 22:12:55 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/memory.c,v 3.7 2001/12/14 19:58:10 dawes Exp $ */ #define _XIEC_MEMORY Index: xc/programs/Xserver/XIE/dixie/request/photomap.c diff -u xc/programs/Xserver/XIE/dixie/request/photomap.c:3.4 xc/programs/Xserver/XIE/dixie/request/photomap.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/photomap.c:3.4 Wed Jan 17 17:12:56 2001 +++ xc/programs/Xserver/XIE/dixie/request/photomap.c Fri Dec 14 14:58:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: photomap.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ +/* $Xorg: photomap.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module photomap.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden, Robert NC Shelley AGE Logic, Inc. April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/photomap.c,v 3.4 2001/01/17 22:12:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/photomap.c,v 3.5 2001/12/14 19:58:10 dawes Exp $ */ #define _XIEC_PHOTOMAP Index: xc/programs/Xserver/XIE/dixie/request/protoflo.c diff -u xc/programs/Xserver/XIE/dixie/request/protoflo.c:3.4 xc/programs/Xserver/XIE/dixie/request/protoflo.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/protoflo.c:3.4 Wed Jan 17 17:12:56 2001 +++ xc/programs/Xserver/XIE/dixie/request/protoflo.c Fri Dec 14 14:58:10 2001 @@ -1,11 +1,15 @@ -/* $Xorg: protoflo.c,v 1.3 2000/08/17 19:47:31 cpqbld Exp $ */ +/* $Xorg: protoflo.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module protoflo.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Robert NC Shelley, Dean Verheiden -- AGE Logic, Inc., May 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/protoflo.c,v 3.4 2001/01/17 22:12:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/protoflo.c,v 3.5 2001/12/14 19:58:10 dawes Exp $ */ #include Index: xc/programs/Xserver/XIE/dixie/request/roi.c diff -u xc/programs/Xserver/XIE/dixie/request/roi.c:3.4 xc/programs/Xserver/XIE/dixie/request/roi.c:3.5 --- xc/programs/Xserver/XIE/dixie/request/roi.c:3.4 Wed Jan 17 17:12:56 2001 +++ xc/programs/Xserver/XIE/dixie/request/roi.c Fri Dec 14 14:58:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: roi.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: roi.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** module roi.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden, AGE Logic, Inc., April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/roi.c,v 3.4 2001/01/17 22:12:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/roi.c,v 3.5 2001/12/14 19:58:10 dawes Exp $ */ #define _XIEC_ROI Index: xc/programs/Xserver/XIE/dixie/request/session.c diff -u xc/programs/Xserver/XIE/dixie/request/session.c:3.13 xc/programs/Xserver/XIE/dixie/request/session.c:3.14 --- xc/programs/Xserver/XIE/dixie/request/session.c:3.13 Wed Jan 17 17:12:56 2001 +++ xc/programs/Xserver/XIE/dixie/request/session.c Fri Dec 14 14:58:10 2001 @@ -1,10 +1,14 @@ -/* $Xorg: session.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: session.c,v 1.4 2001/02/09 02:04:22 xorgcvs Exp $ */ /**** session.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc March, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/session.c,v 3.13 2001/01/17 22:12:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/session.c,v 3.14 2001/12/14 19:58:10 dawes Exp $ */ #define _XIEC_SESSION Index: xc/programs/Xserver/XIE/dixie/request/tables.c diff -u xc/programs/Xserver/XIE/dixie/request/tables.c:3.5 xc/programs/Xserver/XIE/dixie/request/tables.c:3.6 --- xc/programs/Xserver/XIE/dixie/request/tables.c:3.5 Wed Jan 17 17:12:56 2001 +++ xc/programs/Xserver/XIE/dixie/request/tables.c Fri Dec 14 14:58:11 2001 @@ -1,10 +1,14 @@ -/* $Xorg: tables.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: tables.c,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** tables.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden, AGE Logic, Inc March 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/tables.c,v 3.5 2001/01/17 22:12:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/tables.c,v 3.6 2001/12/14 19:58:11 dawes Exp $ */ #define _XIEC_TABLES Index: xc/programs/Xserver/XIE/dixie/request/technq.c diff -u xc/programs/Xserver/XIE/dixie/request/technq.c:3.6 xc/programs/Xserver/XIE/dixie/request/technq.c:3.7 --- xc/programs/Xserver/XIE/dixie/request/technq.c:3.6 Wed Jan 17 17:12:56 2001 +++ xc/programs/Xserver/XIE/dixie/request/technq.c Fri Dec 14 14:58:11 2001 @@ -1,10 +1,14 @@ -/* $Xorg: technq.c,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: technq.c,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module technq.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -64,7 +68,7 @@ Dean Verheiden AGE Logic, Inc. April 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/dixie/request/technq.c,v 3.6 2001/01/17 22:12:56 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/dixie/request/technq.c,v 3.7 2001/12/14 19:58:11 dawes Exp $ */ #define _XIEC_TECHNQ Index: xc/programs/Xserver/XIE/include/colorlst.h diff -u xc/programs/Xserver/XIE/include/colorlst.h:1.1.1.3 xc/programs/Xserver/XIE/include/colorlst.h:1.2 --- xc/programs/Xserver/XIE/include/colorlst.h:1.1.1.3 Tue Jan 16 17:38:08 2001 +++ xc/programs/Xserver/XIE/include/colorlst.h Fri Dec 14 14:58:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: colorlst.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: colorlst.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** colorlst.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/corex.h diff -u xc/programs/Xserver/XIE/include/corex.h:1.4 xc/programs/Xserver/XIE/include/corex.h:1.5 --- xc/programs/Xserver/XIE/include/corex.h:1.4 Wed Jan 17 17:12:57 2001 +++ xc/programs/Xserver/XIE/include/corex.h Fri Dec 14 14:58:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: corex.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: corex.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module corex.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. April, 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/corex.h,v 1.4 2001/01/17 22:12:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/corex.h,v 1.5 2001/12/14 19:58:12 dawes Exp $ */ #ifndef _XIEH_COREX #define _XIEH_COREX Index: xc/programs/Xserver/XIE/include/difloat.h diff -u xc/programs/Xserver/XIE/include/difloat.h:1.4 xc/programs/Xserver/XIE/include/difloat.h:1.5 --- xc/programs/Xserver/XIE/include/difloat.h:1.4 Wed Jan 17 17:12:57 2001 +++ xc/programs/Xserver/XIE/include/difloat.h Fri Dec 14 14:58:12 2001 @@ -1,10 +1,14 @@ -/* $Xorg: difloat.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: difloat.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module difloat.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/difloat.h,v 1.4 2001/01/17 22:12:57 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/difloat.h,v 1.5 2001/12/14 19:58:12 dawes Exp $ */ #ifndef _XIE_DIFLOAT #define _XIE_DIFLOAT Index: xc/programs/Xserver/XIE/include/element.h diff -u xc/programs/Xserver/XIE/include/element.h:1.1.1.5 xc/programs/Xserver/XIE/include/element.h:1.2 --- xc/programs/Xserver/XIE/include/element.h:1.1.1.5 Tue Jan 16 17:38:11 2001 +++ xc/programs/Xserver/XIE/include/element.h Fri Dec 14 14:58:12 2001 @@ -1,11 +1,15 @@ -/* $Xorg: element.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: element.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* module element.h */ /***************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/error.h diff -u xc/programs/Xserver/XIE/include/error.h:3.4 xc/programs/Xserver/XIE/include/error.h:3.5 --- xc/programs/Xserver/XIE/include/error.h:3.4 Wed Jan 17 17:12:58 2001 +++ xc/programs/Xserver/XIE/include/error.h Fri Dec 14 14:58:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: error.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: error.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module error.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/error.h,v 3.4 2001/01/17 22:12:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/error.h,v 3.5 2001/12/14 19:58:13 dawes Exp $ */ #ifndef _XIEH_ERROR #define _XIEH_ERROR Index: xc/programs/Xserver/XIE/include/flo.h diff -u xc/programs/Xserver/XIE/include/flo.h:1.4 xc/programs/Xserver/XIE/include/flo.h:1.5 --- xc/programs/Xserver/XIE/include/flo.h:1.4 Wed Jan 17 17:12:58 2001 +++ xc/programs/Xserver/XIE/include/flo.h Fri Dec 14 14:58:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: flo.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: flo.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module flo.h ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/flo.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/flo.h,v 1.5 2001/12/14 19:58:13 dawes Exp $ */ #ifndef _XIEH_FLO #define _XIEH_FLO Index: xc/programs/Xserver/XIE/include/flodata.h diff -u xc/programs/Xserver/XIE/include/flodata.h:1.1.1.3 xc/programs/Xserver/XIE/include/flodata.h:1.2 --- xc/programs/Xserver/XIE/include/flodata.h:1.1.1.3 Tue Jan 16 17:38:14 2001 +++ xc/programs/Xserver/XIE/include/flodata.h Fri Dec 14 14:58:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: flodata.h,v 1.3 2000/08/17 19:47:32 cpqbld Exp $ */ +/* $Xorg: flodata.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module flodata.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/flostr.h diff -u xc/programs/Xserver/XIE/include/flostr.h:1.1.1.4 xc/programs/Xserver/XIE/include/flostr.h:1.2 --- xc/programs/Xserver/XIE/include/flostr.h:1.1.1.4 Tue Jan 16 17:38:16 2001 +++ xc/programs/Xserver/XIE/include/flostr.h Fri Dec 14 14:58:13 2001 @@ -1,10 +1,14 @@ -/* $Xorg: flostr.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: flostr.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module flostr.h ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/lut.h diff -u xc/programs/Xserver/XIE/include/lut.h:1.1.1.3 xc/programs/Xserver/XIE/include/lut.h:1.2 --- xc/programs/Xserver/XIE/include/lut.h:1.1.1.3 Tue Jan 16 17:38:18 2001 +++ xc/programs/Xserver/XIE/include/lut.h Fri Dec 14 14:58:14 2001 @@ -1,10 +1,14 @@ -/* $Xorg: lut.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: lut.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module lut.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/macro.h diff -u xc/programs/Xserver/XIE/include/macro.h:1.9 xc/programs/Xserver/XIE/include/macro.h:1.10 --- xc/programs/Xserver/XIE/include/macro.h:1.9 Wed Jan 17 17:12:58 2001 +++ xc/programs/Xserver/XIE/include/macro.h Fri Dec 14 14:58:14 2001 @@ -1,10 +1,14 @@ -/* $Xorg: macro.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: macro.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module macro.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. March 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/macro.h,v 1.9 2001/01/17 22:12:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/macro.h,v 1.10 2001/12/14 19:58:14 dawes Exp $ */ #ifndef _XIEH_MACRO #define _XIEH_MACRO Index: xc/programs/Xserver/XIE/include/memory.h diff -u xc/programs/Xserver/XIE/include/memory.h:1.4 xc/programs/Xserver/XIE/include/memory.h:1.5 --- xc/programs/Xserver/XIE/include/memory.h:1.4 Wed Jan 17 17:12:58 2001 +++ xc/programs/Xserver/XIE/include/memory.h Fri Dec 14 14:58:14 2001 @@ -1,10 +1,14 @@ -/* $Xorg: memory.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: memory.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module memory.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/memory.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/memory.h,v 1.5 2001/12/14 19:58:14 dawes Exp $ */ #ifndef _XIEH_MEMORY #define _XIEH_MEMORY Index: xc/programs/Xserver/XIE/include/photomap.h diff -u xc/programs/Xserver/XIE/include/photomap.h:1.1.1.3 xc/programs/Xserver/XIE/include/photomap.h:1.2 --- xc/programs/Xserver/XIE/include/photomap.h:1.1.1.3 Tue Jan 16 17:38:20 2001 +++ xc/programs/Xserver/XIE/include/photomap.h Fri Dec 14 14:58:14 2001 @@ -1,10 +1,14 @@ -/* $Xorg: photomap.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: photomap.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module photomap.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/photospc.h diff -u xc/programs/Xserver/XIE/include/photospc.h:1.1.1.3 xc/programs/Xserver/XIE/include/photospc.h:1.2 --- xc/programs/Xserver/XIE/include/photospc.h:1.1.1.3 Tue Jan 16 17:38:21 2001 +++ xc/programs/Xserver/XIE/include/photospc.h Fri Dec 14 14:58:14 2001 @@ -1,10 +1,14 @@ -/* $Xorg: photospc.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: photospc.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module photospc.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/roi.h diff -u xc/programs/Xserver/XIE/include/roi.h:1.1.1.3 xc/programs/Xserver/XIE/include/roi.h:1.2 --- xc/programs/Xserver/XIE/include/roi.h:1.1.1.3 Tue Jan 16 17:38:23 2001 +++ xc/programs/Xserver/XIE/include/roi.h Fri Dec 14 14:58:14 2001 @@ -1,10 +1,14 @@ -/* $Xorg: roi.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: roi.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module roi.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/include/tables.h diff -u xc/programs/Xserver/XIE/include/tables.h:1.4 xc/programs/Xserver/XIE/include/tables.h:1.5 --- xc/programs/Xserver/XIE/include/tables.h:1.4 Wed Jan 17 17:12:58 2001 +++ xc/programs/Xserver/XIE/include/tables.h Fri Dec 14 14:58:15 2001 @@ -1,10 +1,14 @@ -/* $Xorg: tables.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: tables.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module tables.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden, Robert NC Shelley -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/tables.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/tables.h,v 1.5 2001/12/14 19:58:15 dawes Exp $ */ #ifndef _XIEH_TABLES #define _XIEH_TABLES Index: xc/programs/Xserver/XIE/include/technq.h diff -u xc/programs/Xserver/XIE/include/technq.h:1.4 xc/programs/Xserver/XIE/include/technq.h:1.5 --- xc/programs/Xserver/XIE/include/technq.h:1.4 Wed Jan 17 17:12:58 2001 +++ xc/programs/Xserver/XIE/include/technq.h Fri Dec 14 14:58:15 2001 @@ -1,10 +1,14 @@ -/* $Xorg: technq.h,v 1.3 2000/08/17 19:47:33 cpqbld Exp $ */ +/* $Xorg: technq.h,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module technq.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/include/technq.h,v 1.4 2001/01/17 22:12:58 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/include/technq.h,v 1.5 2001/12/14 19:58:15 dawes Exp $ */ #ifndef _XIEH_TECHNQ #define _XIEH_TECHNQ Index: xc/programs/Xserver/XIE/mixie/control/analyze.c diff -u xc/programs/Xserver/XIE/mixie/control/analyze.c:1.4 xc/programs/Xserver/XIE/mixie/control/analyze.c:1.5 --- xc/programs/Xserver/XIE/mixie/control/analyze.c:1.4 Wed Jan 17 17:13:00 2001 +++ xc/programs/Xserver/XIE/mixie/control/analyze.c Fri Dec 14 14:58:16 2001 @@ -1,10 +1,14 @@ -/* $Xorg: analyze.c,v 1.3 2000/08/17 19:47:34 cpqbld Exp $ */ +/* $Xorg: analyze.c,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module analyze.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/analyze.c,v 1.4 2001/01/17 22:13:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/analyze.c,v 1.5 2001/12/14 19:58:16 dawes Exp $ */ #define _XIEC_ANALYZE Index: xc/programs/Xserver/XIE/mixie/control/domain.c diff -u xc/programs/Xserver/XIE/mixie/control/domain.c:1.4 xc/programs/Xserver/XIE/mixie/control/domain.c:1.5 --- xc/programs/Xserver/XIE/mixie/control/domain.c:1.4 Wed Jan 17 17:13:00 2001 +++ xc/programs/Xserver/XIE/mixie/control/domain.c Fri Dec 14 14:58:17 2001 @@ -1,9 +1,13 @@ -/* $Xorg: domain.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: domain.c,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module domain.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/domain.c,v 1.4 2001/01/17 22:13:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/domain.c,v 1.5 2001/12/14 19:58:17 dawes Exp $ */ #define _XIEC_DOMAIN Index: xc/programs/Xserver/XIE/mixie/control/floman.c diff -u xc/programs/Xserver/XIE/mixie/control/floman.c:3.4 xc/programs/Xserver/XIE/mixie/control/floman.c:3.5 --- xc/programs/Xserver/XIE/mixie/control/floman.c:3.4 Wed Jan 17 17:13:00 2001 +++ xc/programs/Xserver/XIE/mixie/control/floman.c Fri Dec 14 14:58:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: floman.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: floman.c,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module floman.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/floman.c,v 3.4 2001/01/17 22:13:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/floman.c,v 3.5 2001/12/14 19:58:17 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/mixie/control/sched.c diff -u xc/programs/Xserver/XIE/mixie/control/sched.c:1.5 xc/programs/Xserver/XIE/mixie/control/sched.c:1.6 --- xc/programs/Xserver/XIE/mixie/control/sched.c:1.5 Wed Jan 17 17:13:00 2001 +++ xc/programs/Xserver/XIE/mixie/control/sched.c Fri Dec 14 14:58:17 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sched.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: sched.c,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /**** module sched.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden, Robert NC Shelley -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/sched.c,v 1.5 2001/01/17 22:13:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/sched.c,v 1.6 2001/12/14 19:58:17 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/mixie/control/strip.c diff -u xc/programs/Xserver/XIE/mixie/control/strip.c:3.6 xc/programs/Xserver/XIE/mixie/control/strip.c:3.7 --- xc/programs/Xserver/XIE/mixie/control/strip.c:3.6 Wed Jan 17 17:13:00 2001 +++ xc/programs/Xserver/XIE/mixie/control/strip.c Fri Dec 14 14:58:17 2001 @@ -1,11 +1,15 @@ -/* $Xorg: strip.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: strip.c,v 1.4 2001/02/09 02:04:23 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module strip.c ****/ /***************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/control/strip.c,v 3.6 2001/01/17 22:13:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/control/strip.c,v 3.7 2001/12/14 19:58:17 dawes Exp $ */ /* * Include files Index: xc/programs/Xserver/XIE/mixie/export/mechist.c diff -u xc/programs/Xserver/XIE/mixie/export/mechist.c:3.5 xc/programs/Xserver/XIE/mixie/export/mechist.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/mechist.c:3.5 Wed Jan 17 17:13:01 2001 +++ xc/programs/Xserver/XIE/mixie/export/mechist.c Fri Dec 14 14:58:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mechist.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: mechist.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module mechist.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mechist.c,v 3.5 2001/01/17 22:13:01 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mechist.c,v 3.6 2001/12/14 19:58:18 dawes Exp $ */ #define _XIEC_MECHIST #define _XIEC_ECHIST Index: xc/programs/Xserver/XIE/mixie/export/meclut.c diff -u xc/programs/Xserver/XIE/mixie/export/meclut.c:3.5 xc/programs/Xserver/XIE/mixie/export/meclut.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/meclut.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/meclut.c Fri Dec 14 14:58:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: meclut.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: meclut.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module meclut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meclut.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meclut.c,v 3.6 2001/12/14 19:58:18 dawes Exp $ */ #define _XIEC_MECLUT #define _XIEC_ECLUT Index: xc/programs/Xserver/XIE/mixie/export/mecphoto.c diff -u xc/programs/Xserver/XIE/mixie/export/mecphoto.c:3.5 xc/programs/Xserver/XIE/mixie/export/mecphoto.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/mecphoto.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/mecphoto.c Fri Dec 14 14:58:18 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mecphoto.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: mecphoto.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module mecphoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley && Dean Verheiden -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecphoto.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecphoto.c,v 3.6 2001/12/14 19:58:18 dawes Exp $ */ #define _XIEC_MECPHOTO #define _XIEC_ECPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/mecroi.c diff -u xc/programs/Xserver/XIE/mixie/export/mecroi.c:3.5 xc/programs/Xserver/XIE/mixie/export/mecroi.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/mecroi.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/mecroi.c Fri Dec 14 14:58:19 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mecroi.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: mecroi.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module mecroi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare && Dean Verheiden -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecroi.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mecroi.c,v 3.6 2001/12/14 19:58:19 dawes Exp $ */ #define _XIEC_MECROI #define _XIEC_ECROI Index: xc/programs/Xserver/XIE/mixie/export/medraw.c diff -u xc/programs/Xserver/XIE/mixie/export/medraw.c:3.5 xc/programs/Xserver/XIE/mixie/export/medraw.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/medraw.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/medraw.c Fri Dec 14 14:58:19 2001 @@ -1,10 +1,14 @@ -/* $Xorg: medraw.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: medraw.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module medraw.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medraw.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medraw.c,v 3.6 2001/12/14 19:58:19 dawes Exp $ */ #define _XIEC_MEDRAW #define _XIEC_EDRAW Index: xc/programs/Xserver/XIE/mixie/export/medrawp.c diff -u xc/programs/Xserver/XIE/mixie/export/medrawp.c:3.5 xc/programs/Xserver/XIE/mixie/export/medrawp.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/medrawp.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/medrawp.c Fri Dec 14 14:58:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: medrawp.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: medrawp.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module medrawp.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley && Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medrawp.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/medrawp.c,v 3.6 2001/12/14 19:58:20 dawes Exp $ */ #define _XIEC_MEDRAWP #define _XIEC_EDRAWP Index: xc/programs/Xserver/XIE/mixie/export/mefax.c diff -u xc/programs/Xserver/XIE/mixie/export/mefax.c:3.5 xc/programs/Xserver/XIE/mixie/export/mefax.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/mefax.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/mefax.c Fri Dec 14 14:58:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mefax.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: mefax.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module mefax.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Ben Fahy -- AGE Logic, Inc. Oct, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mefax.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mefax.c,v 3.6 2001/12/14 19:58:20 dawes Exp $ */ #define _XIEC_MEPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/mejpeg.c diff -u xc/programs/Xserver/XIE/mixie/export/mejpeg.c:3.7 xc/programs/Xserver/XIE/mixie/export/mejpeg.c:3.8 --- xc/programs/Xserver/XIE/mixie/export/mejpeg.c:3.7 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/mejpeg.c Fri Dec 14 14:58:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mejpeg.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: mejpeg.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module mejpeg.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Ben Fahy -- AGE Logic, Inc. Oct, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mejpeg.c,v 3.7 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mejpeg.c,v 3.8 2001/12/14 19:58:20 dawes Exp $ */ #define _XIEC_MEPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/melut.c diff -u xc/programs/Xserver/XIE/mixie/export/melut.c:3.5 xc/programs/Xserver/XIE/mixie/export/melut.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/melut.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/melut.c Fri Dec 14 14:58:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: melut.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: melut.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module melut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/melut.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/melut.c,v 3.6 2001/12/14 19:58:20 dawes Exp $ */ #define _XIEC_MELUT #define _XIEC_ELUT Index: xc/programs/Xserver/XIE/mixie/export/mephoto.c diff -u xc/programs/Xserver/XIE/mixie/export/mephoto.c:3.5 xc/programs/Xserver/XIE/mixie/export/mephoto.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/mephoto.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/mephoto.c Fri Dec 14 14:58:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mephoto.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: mephoto.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module mephoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean && Ben - various additions to handle different techniques *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mephoto.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/mephoto.c,v 3.6 2001/12/14 19:58:20 dawes Exp $ */ #define _XIEC_MEPHOTO #define _XIEC_EPHOTO Index: xc/programs/Xserver/XIE/mixie/export/meroi.c diff -u xc/programs/Xserver/XIE/mixie/export/meroi.c:3.5 xc/programs/Xserver/XIE/mixie/export/meroi.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/meroi.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/meroi.c Fri Dec 14 14:58:20 2001 @@ -1,10 +1,14 @@ -/* $Xorg: meroi.c,v 1.3 2000/08/17 19:47:35 cpqbld Exp $ */ +/* $Xorg: meroi.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module meroi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meroi.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meroi.c,v 3.6 2001/12/14 19:58:20 dawes Exp $ */ #define _XIEC_MEROI Index: xc/programs/Xserver/XIE/mixie/export/meuncomp.c diff -u xc/programs/Xserver/XIE/mixie/export/meuncomp.c:1.5 xc/programs/Xserver/XIE/mixie/export/meuncomp.c:1.6 --- xc/programs/Xserver/XIE/mixie/export/meuncomp.c:1.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/meuncomp.c Fri Dec 14 14:58:21 2001 @@ -1,10 +1,14 @@ -/* $Xorg: meuncomp.c,v 1.3 2000/08/17 19:47:36 cpqbld Exp $ */ +/* $Xorg: meuncomp.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module meuncomp.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. October 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meuncomp.c,v 1.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meuncomp.c,v 1.6 2001/12/14 19:58:21 dawes Exp $ */ #define _XIEC_MEUNCOMP Index: xc/programs/Xserver/XIE/mixie/export/schoice.c diff -u xc/programs/Xserver/XIE/mixie/export/schoice.c:3.5 xc/programs/Xserver/XIE/mixie/export/schoice.c:3.6 --- xc/programs/Xserver/XIE/mixie/export/schoice.c:3.5 Wed Jan 17 17:13:02 2001 +++ xc/programs/Xserver/XIE/mixie/export/schoice.c Fri Dec 14 14:58:21 2001 @@ -1,10 +1,14 @@ -/* $Xorg: schoice.c,v 1.3 2000/08/17 19:47:36 cpqbld Exp $ */ +/* $Xorg: schoice.c,v 1.4 2001/02/09 02:04:24 xorgcvs Exp $ */ /**** module schoice.c ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -64,7 +68,7 @@ Dean Verheiden && Robert NC Shelley AGE Logic, Inc. Jan 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/export/schoice.c,v 3.5 2001/01/17 22:13:02 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/export/schoice.c,v 3.6 2001/12/14 19:58:21 dawes Exp $ */ #define _XIEC_SCHOICE #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/mixie/fax/bits.h diff -u xc/programs/Xserver/XIE/mixie/fax/bits.h:1.1.1.4 xc/programs/Xserver/XIE/mixie/fax/bits.h:1.2 --- xc/programs/Xserver/XIE/mixie/fax/bits.h:1.1.1.4 Tue Jan 16 17:38:52 2001 +++ xc/programs/Xserver/XIE/mixie/fax/bits.h Fri Dec 14 14:58:22 2001 @@ -1,11 +1,15 @@ -/* $Xorg: bits.h,v 1.3 2000/08/17 19:47:36 cpqbld Exp $ */ +/* $Xorg: bits.h,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/bits.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/dg31d.c diff -u xc/programs/Xserver/XIE/mixie/fax/dg31d.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/dg31d.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/dg31d.c:1.1.1.3 Tue Jan 16 17:38:53 2001 +++ xc/programs/Xserver/XIE/mixie/fax/dg31d.c Fri Dec 14 14:58:22 2001 @@ -1,10 +1,14 @@ -/* $Xorg: dg31d.c,v 1.3 2000/08/17 19:47:37 cpqbld Exp $ */ +/* $Xorg: dg31d.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module fax/dg31d.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/dg32d.c diff -u xc/programs/Xserver/XIE/mixie/fax/dg32d.c:1.1.1.4 xc/programs/Xserver/XIE/mixie/fax/dg32d.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/dg32d.c:1.1.1.4 Tue Jan 16 17:38:53 2001 +++ xc/programs/Xserver/XIE/mixie/fax/dg32d.c Fri Dec 14 14:58:22 2001 @@ -1,11 +1,15 @@ -/* $Xorg: dg32d.c,v 1.3 2000/08/17 19:47:37 cpqbld Exp $ */ +/* $Xorg: dg32d.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/dg32d.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/dg4.c diff -u xc/programs/Xserver/XIE/mixie/fax/dg4.c:1.1.1.4 xc/programs/Xserver/XIE/mixie/fax/dg4.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/dg4.c:1.1.1.4 Tue Jan 16 17:38:54 2001 +++ xc/programs/Xserver/XIE/mixie/fax/dg4.c Fri Dec 14 14:58:22 2001 @@ -1,11 +1,15 @@ -/* $Xorg: dg4.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ +/* $Xorg: dg4.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/g4.c ****/ /****************************************************************************** Copyright 1993, 1994,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/dtiff2.c diff -u xc/programs/Xserver/XIE/mixie/fax/dtiff2.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/dtiff2.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/dtiff2.c:1.1.1.3 Tue Jan 16 17:38:55 2001 +++ xc/programs/Xserver/XIE/mixie/fax/dtiff2.c Fri Dec 14 14:58:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: dtiff2.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ +/* $Xorg: dtiff2.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module fax/dtiff2.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c diff -u xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c:1.1.1.4 xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c:1.1.1.4 Tue Jan 16 17:38:56 2001 +++ xc/programs/Xserver/XIE/mixie/fax/dtiffpb.c Fri Dec 14 14:58:23 2001 @@ -1,11 +1,15 @@ -/* $Xorg: dtiffpb.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ +/* $Xorg: dtiffpb.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module fax/tiffpb.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/eg31d.c diff -u xc/programs/Xserver/XIE/mixie/fax/eg31d.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/eg31d.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/eg31d.c:1.1.1.3 Tue Jan 16 17:38:57 2001 +++ xc/programs/Xserver/XIE/mixie/fax/eg31d.c Fri Dec 14 14:58:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: eg31d.c,v 1.3 2000/08/17 19:47:38 cpqbld Exp $ */ +/* $Xorg: eg31d.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module eg31d.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/eg32d.c diff -u xc/programs/Xserver/XIE/mixie/fax/eg32d.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/eg32d.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/eg32d.c:1.1.1.3 Tue Jan 16 17:38:59 2001 +++ xc/programs/Xserver/XIE/mixie/fax/eg32d.c Fri Dec 14 14:58:23 2001 @@ -1,10 +1,14 @@ -/* $Xorg: eg32d.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ +/* $Xorg: eg32d.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module eg32d.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/etiff2.c diff -u xc/programs/Xserver/XIE/mixie/fax/etiff2.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/etiff2.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/etiff2.c:1.1.1.3 Tue Jan 16 17:38:59 2001 +++ xc/programs/Xserver/XIE/mixie/fax/etiff2.c Fri Dec 14 14:58:24 2001 @@ -1,10 +1,14 @@ -/* $Xorg: etiff2.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ +/* $Xorg: etiff2.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module etiff2.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/etiffpb.c diff -u xc/programs/Xserver/XIE/mixie/fax/etiffpb.c:1.1.1.4 xc/programs/Xserver/XIE/mixie/fax/etiffpb.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/etiffpb.c:1.1.1.4 Tue Jan 16 17:39:00 2001 +++ xc/programs/Xserver/XIE/mixie/fax/etiffpb.c Fri Dec 14 14:58:24 2001 @@ -1,11 +1,15 @@ -/* $Xorg: etiffpb.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ +/* $Xorg: etiffpb.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module etiffpb.h ****/ /****************************************************************************** Copyright 1993, 1994,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/faxint.h diff -u xc/programs/Xserver/XIE/mixie/fax/faxint.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/faxint.h:1.2 --- xc/programs/Xserver/XIE/mixie/fax/faxint.h:1.1.1.3 Tue Jan 16 17:39:02 2001 +++ xc/programs/Xserver/XIE/mixie/fax/faxint.h Fri Dec 14 14:58:24 2001 @@ -1,10 +1,14 @@ -/* $Xorg: faxint.h,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ +/* $Xorg: faxint.h,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module fax/faxint.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/faxtabs.c diff -u xc/programs/Xserver/XIE/mixie/fax/faxtabs.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/faxtabs.c:1.2 --- xc/programs/Xserver/XIE/mixie/fax/faxtabs.c:1.1.1.3 Tue Jan 16 17:39:03 2001 +++ xc/programs/Xserver/XIE/mixie/fax/faxtabs.c Fri Dec 14 14:58:24 2001 @@ -1,10 +1,14 @@ -/* $Xorg: faxtabs.c,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ +/* $Xorg: faxtabs.c,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module fax/faxtabs.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/faxtabs.h diff -u xc/programs/Xserver/XIE/mixie/fax/faxtabs.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/faxtabs.h:1.2 --- xc/programs/Xserver/XIE/mixie/fax/faxtabs.h:1.1.1.3 Tue Jan 16 17:39:05 2001 +++ xc/programs/Xserver/XIE/mixie/fax/faxtabs.h Fri Dec 14 14:58:24 2001 @@ -1,10 +1,14 @@ -/* $Xorg: faxtabs.h,v 1.3 2000/08/17 19:47:39 cpqbld Exp $ */ +/* $Xorg: faxtabs.h,v 1.4 2001/02/09 02:04:25 xorgcvs Exp $ */ /**** module fax/bits.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/fencode.h diff -u xc/programs/Xserver/XIE/mixie/fax/fencode.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/fencode.h:1.2 --- xc/programs/Xserver/XIE/mixie/fax/fencode.h:1.1.1.3 Tue Jan 16 17:39:09 2001 +++ xc/programs/Xserver/XIE/mixie/fax/fencode.h Fri Dec 14 14:58:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fencode.h,v 1.3 2000/08/17 19:47:43 cpqbld Exp $ */ +/* $Xorg: fencode.h,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module fencode.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/fetabs.h diff -u xc/programs/Xserver/XIE/mixie/fax/fetabs.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/fetabs.h:1.2 --- xc/programs/Xserver/XIE/mixie/fax/fetabs.h:1.1.1.3 Tue Jan 16 17:39:10 2001 +++ xc/programs/Xserver/XIE/mixie/fax/fetabs.h Fri Dec 14 14:58:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fetabs.h,v 1.3 2000/08/17 19:47:43 cpqbld Exp $ */ +/* $Xorg: fetabs.h,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module fetabs.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/gbits.h diff -u xc/programs/Xserver/XIE/mixie/fax/gbits.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/fax/gbits.h:1.2 --- xc/programs/Xserver/XIE/mixie/fax/gbits.h:1.1.1.3 Tue Jan 16 17:39:12 2001 +++ xc/programs/Xserver/XIE/mixie/fax/gbits.h Fri Dec 14 14:58:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: gbits.h,v 1.3 2000/08/17 19:47:43 cpqbld Exp $ */ +/* $Xorg: gbits.h,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module fax/gbits.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/fax/zeroeven.c diff -u xc/programs/Xserver/XIE/mixie/fax/zeroeven.c:1.4 xc/programs/Xserver/XIE/mixie/fax/zeroeven.c:1.5 --- xc/programs/Xserver/XIE/mixie/fax/zeroeven.c:1.4 Wed Jan 17 17:13:03 2001 +++ xc/programs/Xserver/XIE/mixie/fax/zeroeven.c Fri Dec 14 14:58:25 2001 @@ -1,10 +1,14 @@ -/* $Xorg: zeroeven.c,v 1.3 2000/08/17 19:47:44 cpqbld Exp $ */ +/* $Xorg: zeroeven.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module fax/zeroeven.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/import/miclut.c diff -u xc/programs/Xserver/XIE/mixie/import/miclut.c:3.5 xc/programs/Xserver/XIE/mixie/import/miclut.c:3.6 --- xc/programs/Xserver/XIE/mixie/import/miclut.c:3.5 Wed Jan 17 17:13:04 2001 +++ xc/programs/Xserver/XIE/mixie/import/miclut.c Fri Dec 14 14:58:27 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miclut.c,v 1.3 2000/08/17 19:47:44 cpqbld Exp $ */ +/* $Xorg: miclut.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module miclut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Ben Fahy -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miclut.c,v 3.5 2001/01/17 22:13:04 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miclut.c,v 3.6 2001/12/14 19:58:27 dawes Exp $ */ #define _XIEC_MICLUT #define _XIEC_ICLUT Index: xc/programs/Xserver/XIE/mixie/import/micphoto.c diff -u xc/programs/Xserver/XIE/mixie/import/micphoto.c:3.4 xc/programs/Xserver/XIE/mixie/import/micphoto.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/micphoto.c:3.4 Wed Jan 17 17:13:04 2001 +++ xc/programs/Xserver/XIE/mixie/import/micphoto.c Fri Dec 14 14:58:27 2001 @@ -1,10 +1,14 @@ -/* $Xorg: micphoto.c,v 1.3 2000/08/17 19:47:44 cpqbld Exp $ */ +/* $Xorg: micphoto.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module micphoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -68,7 +72,7 @@ Fax stuff added by Ben Fahy *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/micphoto.c,v 3.4 2001/01/17 22:13:04 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/micphoto.c,v 3.5 2001/12/14 19:58:27 dawes Exp $ */ #define _XIEC_MICPHOTO #define _XIEC_ICPHOTO Index: xc/programs/Xserver/XIE/mixie/import/microi.c diff -u xc/programs/Xserver/XIE/mixie/import/microi.c:3.4 xc/programs/Xserver/XIE/mixie/import/microi.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/microi.c:3.4 Wed Jan 17 17:13:04 2001 +++ xc/programs/Xserver/XIE/mixie/import/microi.c Fri Dec 14 14:58:27 2001 @@ -1,11 +1,15 @@ -/* $Xorg: microi.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: microi.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module microi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/microi.c,v 3.4 2001/01/17 22:13:04 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/microi.c,v 3.5 2001/12/14 19:58:27 dawes Exp $ */ #define _XIEC_MICROI Index: xc/programs/Xserver/XIE/mixie/import/midraw.c diff -u xc/programs/Xserver/XIE/mixie/import/midraw.c:3.5 xc/programs/Xserver/XIE/mixie/import/midraw.c:3.6 --- xc/programs/Xserver/XIE/mixie/import/midraw.c:3.5 Wed Jan 17 17:13:04 2001 +++ xc/programs/Xserver/XIE/mixie/import/midraw.c Fri Dec 14 14:58:27 2001 @@ -1,10 +1,14 @@ -/* $Xorg: midraw.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: midraw.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module midraw.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/midraw.c,v 3.5 2001/01/17 22:13:04 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/midraw.c,v 3.6 2001/12/14 19:58:27 dawes Exp $ */ #define _XIEC_IDRAW #define _XIEC_MIDRAW Index: xc/programs/Xserver/XIE/mixie/import/mifax.c diff -u xc/programs/Xserver/XIE/mixie/import/mifax.c:3.4 xc/programs/Xserver/XIE/mixie/import/mifax.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/mifax.c:3.4 Wed Jan 17 17:13:05 2001 +++ xc/programs/Xserver/XIE/mixie/import/mifax.c Fri Dec 14 14:58:27 2001 @@ -1,11 +1,15 @@ -/* $Xorg: mifax.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: mifax.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mifax.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ Ben Fahy -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mifax.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mifax.c,v 3.5 2001/12/14 19:58:27 dawes Exp $ */ #define _XIEC_MICPHOTO #define _XIEC_ICPHOTO Index: xc/programs/Xserver/XIE/mixie/import/mijpeg.c diff -u xc/programs/Xserver/XIE/mixie/import/mijpeg.c:3.6 xc/programs/Xserver/XIE/mixie/import/mijpeg.c:3.7 --- xc/programs/Xserver/XIE/mixie/import/mijpeg.c:3.6 Wed Jan 17 17:13:05 2001 +++ xc/programs/Xserver/XIE/mixie/import/mijpeg.c Fri Dec 14 14:58:28 2001 @@ -1,9 +1,13 @@ -/* $Xorg: mijpeg.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: mijpeg.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module mijpeg.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -68,7 +72,7 @@ Ben Fahy -- AGE Logic, Inc. Oct, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mijpeg.c,v 3.6 2001/01/17 22:13:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/mijpeg.c,v 3.7 2001/12/14 19:58:28 dawes Exp $ */ #define _XIEC_MIPHOTO #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/mixie/import/milut.c diff -u xc/programs/Xserver/XIE/mixie/import/milut.c:3.4 xc/programs/Xserver/XIE/mixie/import/milut.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/milut.c:3.4 Wed Jan 17 17:13:05 2001 +++ xc/programs/Xserver/XIE/mixie/import/milut.c Fri Dec 14 14:58:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: milut.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: milut.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module milut.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/milut.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/milut.c,v 3.5 2001/12/14 19:58:28 dawes Exp $ */ #define _XIEC_ILUT #define _XIEC_MILUT Index: xc/programs/Xserver/XIE/mixie/import/miphoto.c diff -u xc/programs/Xserver/XIE/mixie/import/miphoto.c:3.4 xc/programs/Xserver/XIE/mixie/import/miphoto.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/miphoto.c:3.4 Wed Jan 17 17:13:05 2001 +++ xc/programs/Xserver/XIE/mixie/import/miphoto.c Fri Dec 14 14:58:28 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miphoto.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: miphoto.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module miphoto.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miphoto.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miphoto.c,v 3.5 2001/12/14 19:58:28 dawes Exp $ */ #define _XIEC_MIPHOTO #define _XIEC_IPHOTO Index: xc/programs/Xserver/XIE/mixie/import/miregion.c diff -u xc/programs/Xserver/XIE/mixie/import/miregion.c:3.6 xc/programs/Xserver/XIE/mixie/import/miregion.c:3.7 --- xc/programs/Xserver/XIE/mixie/import/miregion.c:3.6 Wed Jan 17 17:13:05 2001 +++ xc/programs/Xserver/XIE/mixie/import/miregion.c Fri Dec 14 14:58:28 2001 @@ -4,7 +4,11 @@ Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -117,7 +121,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miregion.c,v 3.6 2001/01/17 22:13:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miregion.c,v 3.7 2001/12/14 19:58:28 dawes Exp $ */ #define _XIEC_MIREGION Index: xc/programs/Xserver/XIE/mixie/import/miroi.c diff -u xc/programs/Xserver/XIE/mixie/import/miroi.c:3.4 xc/programs/Xserver/XIE/mixie/import/miroi.c:3.5 --- xc/programs/Xserver/XIE/mixie/import/miroi.c:3.4 Wed Jan 17 17:13:05 2001 +++ xc/programs/Xserver/XIE/mixie/import/miroi.c Fri Dec 14 14:58:29 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miroi.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: miroi.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module miroi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. April, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miroi.c,v 3.4 2001/01/17 22:13:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miroi.c,v 3.5 2001/12/14 19:58:29 dawes Exp $ */ #define _XIEC_MIROI #define _XIEC_IROI Index: xc/programs/Xserver/XIE/mixie/import/miuncomp.c diff -u xc/programs/Xserver/XIE/mixie/import/miuncomp.c:1.5 xc/programs/Xserver/XIE/mixie/import/miuncomp.c:1.6 --- xc/programs/Xserver/XIE/mixie/import/miuncomp.c:1.5 Wed Jan 17 17:13:05 2001 +++ xc/programs/Xserver/XIE/mixie/import/miuncomp.c Fri Dec 14 14:58:29 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miuncomp.c,v 1.3 2000/08/17 19:47:45 cpqbld Exp $ */ +/* $Xorg: miuncomp.c,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module miuncomp.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. September 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miuncomp.c,v 1.5 2001/01/17 22:13:05 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/import/miuncomp.c,v 1.6 2001/12/14 19:58:29 dawes Exp $ */ #define _XIEC_MIUNCOMP Index: xc/programs/Xserver/XIE/mixie/include/domain.h diff -u xc/programs/Xserver/XIE/mixie/include/domain.h:1.4 xc/programs/Xserver/XIE/mixie/include/domain.h:1.5 --- xc/programs/Xserver/XIE/mixie/include/domain.h:1.4 Wed Jan 17 17:13:06 2001 +++ xc/programs/Xserver/XIE/mixie/include/domain.h Fri Dec 14 14:58:30 2001 @@ -1,10 +1,14 @@ -/* $Xorg: domain.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: domain.h,v 1.4 2001/02/09 02:04:27 xorgcvs Exp $ */ /**** module domain.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. August 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/domain.h,v 1.4 2001/01/17 22:13:06 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/domain.h,v 1.5 2001/12/14 19:58:30 dawes Exp $ */ #ifndef _XIEH_DOMAIN Index: xc/programs/Xserver/XIE/mixie/include/fax.h diff -u xc/programs/Xserver/XIE/mixie/include/fax.h:1.3 xc/programs/Xserver/XIE/mixie/include/fax.h:1.4 --- xc/programs/Xserver/XIE/mixie/include/fax.h:1.3 Wed Jan 17 17:13:06 2001 +++ xc/programs/Xserver/XIE/mixie/include/fax.h Fri Dec 14 14:58:30 2001 @@ -1,10 +1,14 @@ -/* $Xorg: fax.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: fax.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module fax.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Ben Fahy -- AGE Logic, Inc. May 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/fax.h,v 1.3 2001/01/17 22:13:06 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/fax.h,v 1.4 2001/12/14 19:58:30 dawes Exp $ */ #ifndef XFree86LOADER #include Index: xc/programs/Xserver/XIE/mixie/include/floman.h diff -u xc/programs/Xserver/XIE/mixie/include/floman.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/floman.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/floman.h:1.1.1.3 Tue Jan 16 17:39:26 2001 +++ xc/programs/Xserver/XIE/mixie/include/floman.h Fri Dec 14 14:58:31 2001 @@ -1,10 +1,14 @@ -/* $Xorg: floman.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: floman.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module floman.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/jpeg.h diff -u xc/programs/Xserver/XIE/mixie/include/jpeg.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/jpeg.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/jpeg.h:1.1.1.3 Tue Jan 16 17:39:27 2001 +++ xc/programs/Xserver/XIE/mixie/include/jpeg.h Fri Dec 14 14:58:31 2001 @@ -1,9 +1,13 @@ -/* $Xorg: jpeg.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: jpeg.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/jpegd.h diff -u xc/programs/Xserver/XIE/mixie/include/jpegd.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/jpegd.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/jpegd.h:1.1.1.3 Tue Jan 16 17:39:27 2001 +++ xc/programs/Xserver/XIE/mixie/include/jpegd.h Fri Dec 14 14:58:31 2001 @@ -1,9 +1,13 @@ -/* $Xorg: jpegd.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: jpegd.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/jpege.h diff -u xc/programs/Xserver/XIE/mixie/include/jpege.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/jpege.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/jpege.h:1.1.1.3 Tue Jan 16 17:39:27 2001 +++ xc/programs/Xserver/XIE/mixie/include/jpege.h Fri Dec 14 14:58:31 2001 @@ -1,9 +1,13 @@ -/* $Xorg: jpege.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: jpege.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/meuncomp.h diff -u xc/programs/Xserver/XIE/mixie/include/meuncomp.h:1.4 xc/programs/Xserver/XIE/mixie/include/meuncomp.h:1.5 --- xc/programs/Xserver/XIE/mixie/include/meuncomp.h:1.4 Wed Jan 17 17:13:06 2001 +++ xc/programs/Xserver/XIE/mixie/include/meuncomp.h Fri Dec 14 14:58:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: meuncomp.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: meuncomp.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module miuncomp.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. October 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/meuncomp.h,v 1.4 2001/01/17 22:13:06 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/meuncomp.h,v 1.5 2001/12/14 19:58:32 dawes Exp $ */ typedef struct _meuncompdef { void (*action)(); Index: xc/programs/Xserver/XIE/mixie/include/microi.h diff -u xc/programs/Xserver/XIE/mixie/include/microi.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/microi.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/microi.h:1.1.1.3 Tue Jan 16 17:39:28 2001 +++ xc/programs/Xserver/XIE/mixie/include/microi.h Fri Dec 14 14:58:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: microi.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: microi.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module microi.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/miphoto.h diff -u xc/programs/Xserver/XIE/mixie/include/miphoto.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/miphoto.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/miphoto.h:1.1.1.3 Tue Jan 16 17:39:28 2001 +++ xc/programs/Xserver/XIE/mixie/include/miphoto.h Fri Dec 14 14:58:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miphoto.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: miphoto.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module miphoto.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/miuncomp.h diff -u xc/programs/Xserver/XIE/mixie/include/miuncomp.h:1.4 xc/programs/Xserver/XIE/mixie/include/miuncomp.h:1.5 --- xc/programs/Xserver/XIE/mixie/include/miuncomp.h:1.4 Wed Jan 17 17:13:07 2001 +++ xc/programs/Xserver/XIE/mixie/include/miuncomp.h Fri Dec 14 14:58:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: miuncomp.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: miuncomp.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module miuncomp.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. September 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/miuncomp.h,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/miuncomp.h,v 1.5 2001/12/14 19:58:32 dawes Exp $ */ #define MIUNCOMP_BP_ARGS \ BytePixel *src, \ Index: xc/programs/Xserver/XIE/mixie/include/mpgeom.h diff -u xc/programs/Xserver/XIE/mixie/include/mpgeom.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/mpgeom.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/mpgeom.h:1.1.1.3 Tue Jan 16 17:39:29 2001 +++ xc/programs/Xserver/XIE/mixie/include/mpgeom.h Fri Dec 14 14:58:32 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpgeom.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: mpgeom.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module mpgeom.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/mppoint.h diff -u xc/programs/Xserver/XIE/mixie/include/mppoint.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/mppoint.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/mppoint.h:1.1.1.3 Tue Jan 16 17:39:29 2001 +++ xc/programs/Xserver/XIE/mixie/include/mppoint.h Fri Dec 14 14:58:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mppoint.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: mppoint.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module mppoint.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/sched.h diff -u xc/programs/Xserver/XIE/mixie/include/sched.h:1.4 xc/programs/Xserver/XIE/mixie/include/sched.h:1.5 --- xc/programs/Xserver/XIE/mixie/include/sched.h:1.4 Wed Jan 17 17:13:07 2001 +++ xc/programs/Xserver/XIE/mixie/include/sched.h Fri Dec 14 14:58:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sched.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: sched.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module sched.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. May 1993 ******************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/sched.h,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/sched.h,v 1.5 2001/12/14 19:58:33 dawes Exp $ */ #ifndef _XIEH_SCHED #define _XIEH_SCHED Index: xc/programs/Xserver/XIE/mixie/include/strip.h diff -u xc/programs/Xserver/XIE/mixie/include/strip.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/include/strip.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/strip.h:1.1.1.3 Tue Jan 16 17:39:30 2001 +++ xc/programs/Xserver/XIE/mixie/include/strip.h Fri Dec 14 14:58:33 2001 @@ -1,10 +1,14 @@ -/* $Xorg: strip.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: strip.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module strip.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/tex.h diff -u xc/programs/Xserver/XIE/mixie/include/tex.h:1.4 xc/programs/Xserver/XIE/mixie/include/tex.h:1.5 --- xc/programs/Xserver/XIE/mixie/include/tex.h:1.4 Wed Jan 17 17:13:07 2001 +++ xc/programs/Xserver/XIE/mixie/include/tex.h Fri Dec 14 14:58:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: tex.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: tex.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module tex.h ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden -- AGE Logic, Inc. April 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/include/tex.h,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/include/tex.h,v 1.5 2001/12/14 19:58:34 dawes Exp $ */ #ifndef _XIEH_TEX #define _XIEH_TEX Index: xc/programs/Xserver/XIE/mixie/include/texstr.h diff -u xc/programs/Xserver/XIE/mixie/include/texstr.h:1.1.1.4 xc/programs/Xserver/XIE/mixie/include/texstr.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/texstr.h:1.1.1.4 Tue Jan 16 17:39:31 2001 +++ xc/programs/Xserver/XIE/mixie/include/texstr.h Fri Dec 14 14:58:34 2001 @@ -1,10 +1,14 @@ -/* $Xorg: texstr.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: texstr.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /**** module texstr.h ****/ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/include/xiemd.h diff -u xc/programs/Xserver/XIE/mixie/include/xiemd.h:1.1.1.4 xc/programs/Xserver/XIE/mixie/include/xiemd.h:1.2 --- xc/programs/Xserver/XIE/mixie/include/xiemd.h:1.1.1.4 Tue Jan 16 17:39:31 2001 +++ xc/programs/Xserver/XIE/mixie/include/xiemd.h Fri Dec 14 14:58:34 2001 @@ -1,11 +1,15 @@ -/* $Xorg: xiemd.h,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: xiemd.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module xiemd.h ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/README diff -u xc/programs/Xserver/XIE/mixie/jpeg/README:1.1.1.2 xc/programs/Xserver/XIE/mixie/jpeg/README:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/README:1.1.1.2 Tue Jan 16 17:39:32 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/README Fri Nov 23 14:50:41 2001 @@ -146,15 +146,15 @@ portable as the JPEG software is; you are likely to have difficulty making it work on any non-Unix machine. -If you are using X Windows you might want to use the xv or xloadimage viewers -to save yourself the trouble of converting PPM to some other format. Both of -these can be found in the contrib directory at export.lcs.mit.edu. Actually, -xv version 2.00 and up incorporates our software and thus can read and write -JPEG files directly. (NOTE: since xv internally reduces all images to 8 -bits/pixel, a JPEG file written by xv will not be very high quality; and xv -cannot fully exploit a 24-bit display. These problems are expected to go away -in the next xv release, planned for early 1993. In the meantime, use -xloadimage for 24-bit displays.) +If you are using the X Window System you might want to use the xv or +xloadimage viewers to save yourself the trouble of converting PPM to some other +format. Both of these can be found in the contrib directory at +export.lcs.mit.edu. Actually, xv version 2.00 and up incorporates our software +and thus can read and write JPEG files directly. (NOTE: since xv internally +reduces all images to 8 bits/pixel, a JPEG file written by xv will not be very +high quality; and xv cannot fully exploit a 24-bit display. These problems are +expected to go away in the next xv release, planned for early 1993. In the +meantime, use xloadimage for 24-bit displays.) For DOS machines, Lee Crocker's free Piclab program is a useful companion to the JPEG software. The latest version, currently 1.91, is available by FTP Index: xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c:1.4 Wed Jan 17 17:13:07 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c Fri Dec 14 14:58:35 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jcdeflts.c,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: jcdeflts.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jcdeflts.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c,v 1.4 2001/01/17 22:13:07 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jcdeflts.c,v 1.5 2001/12/14 19:58:35 dawes Exp $ */ /* * jcdeflts.c * Index: xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c:1.1.1.3 Tue Jan 16 17:39:34 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcexpand.c Fri Dec 14 14:58:36 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jcexpand.c,v 1.3 2000/08/17 19:47:46 cpqbld Exp $ */ +/* $Xorg: jcexpand.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jcexpand.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c:1.4 Wed Jan 17 17:13:07 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jchuff.c Fri Dec 14 14:58:36 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jchuff.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jchuff.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jchuff.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c:1.1.1.3 Tue Jan 16 17:39:35 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcmcu.c Fri Dec 14 14:58:36 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jcmcu.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jcmcu.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jcmcu.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h:1.6 xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h:1.7 --- xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h:1.6 Wed Jan 17 17:13:08 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h Fri Dec 14 14:58:36 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jconfig.h,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jconfig.h,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jconfig.h */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h,v 1.6 2001/01/17 22:13:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jconfig.h,v 1.7 2001/12/14 19:58:36 dawes Exp $ */ /* * jconfig.h Index: xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c:1.1.1.3 Tue Jan 16 17:39:36 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcsample.c Fri Dec 14 14:58:36 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jcsample.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jcsample.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jcsample.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c:1.4 Wed Jan 17 17:13:08 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcxie.c Fri Dec 14 14:58:37 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jcxie.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jcxie.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jcxie.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c:1.1.1.3 Tue Jan 16 17:39:37 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jcxief.c Fri Dec 14 14:58:37 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jcxief.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jcxief.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jcxief.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c:1.4 Wed Jan 17 17:13:08 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdbuffer.c Fri Dec 14 14:58:37 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jdbuffer.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jdbuffer.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /*** jdbuffer.c - transfer data from input strip to decode buffer */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c:1.1.1.4 xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c:1.1.1.4 Tue Jan 16 17:39:37 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jddeflts.c Fri Dec 14 14:58:37 2001 @@ -1,4 +1,4 @@ -/* $Xorg: jddeflts.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jddeflts.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jddeflts.c */ @@ -6,7 +6,11 @@ Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c:1.4 Wed Jan 17 17:13:08 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdhuff.c Fri Dec 14 14:58:38 2001 @@ -1,4 +1,4 @@ -/* $Xorg: jdhuff.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jdhuff.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jdhuff.c */ @@ -6,7 +6,11 @@ Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c:1.1.1.3 Tue Jan 16 17:39:38 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdlossy.c Fri Dec 14 14:58:38 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jdlossy.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jdlossy.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jdlossy.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c:1.1.1.3 Tue Jan 16 17:39:38 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdmcu.c Fri Dec 14 14:58:38 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jdmcu.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jdmcu.c,v 1.4 2001/02/09 02:04:28 xorgcvs Exp $ */ /* Module jdmcu.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c:1.1.1.3 Tue Jan 16 17:39:38 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdsample.c Fri Dec 14 14:58:38 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jdsample.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jdsample.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jdsample.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c:1.4 Wed Jan 17 17:13:08 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdxie.c Fri Dec 14 14:58:38 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jdxie.c,v 1.3 2000/08/17 19:47:47 cpqbld Exp $ */ +/* $Xorg: jdxie.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jdxie.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c:1.1.1.3 Tue Jan 16 17:39:39 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jdxief.c Fri Dec 14 14:58:38 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jdxief.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jdxief.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jdxief.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c:1.1.1.3 Tue Jan 16 17:39:40 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jelossy.c Fri Dec 14 14:58:38 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jelossy.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jelossy.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jelossy.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c:1.1.1.3 Tue Jan 16 17:39:40 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jfwddct.c Fri Dec 14 14:58:38 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jfwddct.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jfwddct.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jfwddct.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h:1.6 xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h:1.8 --- xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h:1.6 Wed Jan 17 17:13:08 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h Fri Dec 14 14:58:39 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jinclude.h,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jinclude.h,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jinclude.h */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h,v 1.6 2001/01/17 22:13:08 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jinclude.h,v 1.8 2001/12/14 19:58:39 dawes Exp $ */ /* * jinclude.h @@ -93,9 +97,7 @@ #endif #include "misc.h" /* for pointer ;*/ -#ifndef X_NOT_STDC_ENV #define INCLUDES_ARE_ANSI -#endif #undef SIZEOF /* in case you included X11/xmd.h */ Index: xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c:1.1.1.3 Tue Jan 16 17:39:41 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jmemmgr.c Fri Dec 14 14:58:39 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jmemmgr.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jmemmgr.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jmemmgr.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c:3.3 xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c:3.4 --- xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c:3.3 Wed Jan 17 17:13:09 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c Fri Dec 14 14:58:39 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jmemsys.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jmemsys.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jmemsys.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Gary Rogers, AGE Logic, Inc., January 1994 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c,v 3.3 2001/01/17 22:13:09 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.c,v 3.4 2001/12/14 19:58:39 dawes Exp $ */ /* * jmemnobs.c (jmemsys.c) Index: xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h:1.1.1.3 Tue Jan 16 17:39:42 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jmemsys.h Fri Dec 14 14:58:39 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jmemsys.h,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jmemsys.h,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jmemsys.h */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h diff -u xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h:1.1.1.4 xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h:1.1.1.4 Tue Jan 16 17:39:44 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jpegdata.h Fri Dec 14 14:58:40 2001 @@ -1,4 +1,4 @@ -/* $Xorg: jpegdata.h,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jpegdata.h,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jpegdata.h */ @@ -6,7 +6,11 @@ Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c:1.4 Wed Jan 17 17:13:09 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c Fri Dec 14 14:58:40 2001 @@ -1,4 +1,4 @@ -/* $Xorg: jrdjfif.c,v 1.3 2000/08/17 19:47:48 cpqbld Exp $ */ +/* $Xorg: jrdjfif.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /* Module jrdjfif.c */ @@ -6,7 +6,11 @@ Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Gary Rogers, AGE Logic, Inc., October 1993 ****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c,v 1.4 2001/01/17 22:13:09 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/jpeg/jrdjfif.c,v 1.5 2001/12/14 19:58:40 dawes Exp $ */ /* * jrdjfif.c Index: xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c:1.1.1.3 Tue Jan 16 17:39:46 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jrevdct.c Fri Dec 14 14:58:40 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jrevdct.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: jrevdct.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jrevdct.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jutils.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jutils.c:1.4 xc/programs/Xserver/XIE/mixie/jpeg/jutils.c:1.5 --- xc/programs/Xserver/XIE/mixie/jpeg/jutils.c:1.4 Wed Jan 17 17:13:09 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jutils.c Fri Dec 14 14:58:40 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jutils.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: jutils.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jutils.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c diff -u xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c:1.1.1.3 xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c:1.2 --- xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c:1.1.1.3 Tue Jan 16 17:39:47 2001 +++ xc/programs/Xserver/XIE/mixie/jpeg/jwrjfif.c Fri Dec 14 14:58:40 2001 @@ -1,11 +1,15 @@ -/* $Xorg: jwrjfif.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: jwrjfif.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /* Module jwrjfif.c */ /**************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/XIE/mixie/process/bitfun.c diff -u xc/programs/Xserver/XIE/mixie/process/bitfun.c:1.4 xc/programs/Xserver/XIE/mixie/process/bitfun.c:1.5 --- xc/programs/Xserver/XIE/mixie/process/bitfun.c:1.4 Wed Jan 17 17:13:10 2001 +++ xc/programs/Xserver/XIE/mixie/process/bitfun.c Fri Dec 14 14:58:42 2001 @@ -1,10 +1,14 @@ -/* $Xorg: bitfun.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: bitfun.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /**** module bitfun.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/bitfun.c,v 1.4 2001/01/17 22:13:10 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/bitfun.c,v 1.5 2001/12/14 19:58:42 dawes Exp $ */ #define _XIEC_MPBITFUN Index: xc/programs/Xserver/XIE/mixie/process/mparith.c diff -u xc/programs/Xserver/XIE/mixie/process/mparith.c:3.4 xc/programs/Xserver/XIE/mixie/process/mparith.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mparith.c:3.4 Wed Jan 17 17:13:10 2001 +++ xc/programs/Xserver/XIE/mixie/process/mparith.c Fri Dec 14 14:58:43 2001 @@ -1,11 +1,15 @@ -/* $Xorg: mparith.c,v 1.5 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: mparith.c,v 1.6 2001/02/09 02:04:29 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mparith.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mparith.c,v 3.4 2001/01/17 22:13:10 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mparith.c,v 3.5 2001/12/14 19:58:43 dawes Exp $ */ #define _XIEC_MPARITH Index: xc/programs/Xserver/XIE/mixie/process/mpbandc.c diff -u xc/programs/Xserver/XIE/mixie/process/mpbandc.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpbandc.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpbandc.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpbandc.c Fri Dec 14 14:58:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpbandc.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: mpbandc.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /**** module mpbandc.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbandc.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbandc.c,v 3.5 2001/12/14 19:58:43 dawes Exp $ */ #define _XIEC_MPBANDC #define _XIEC_PBANDC Index: xc/programs/Xserver/XIE/mixie/process/mpbande.c diff -u xc/programs/Xserver/XIE/mixie/process/mpbande.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpbande.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpbande.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpbande.c Fri Dec 14 14:58:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpbande.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: mpbande.c,v 1.4 2001/02/09 02:04:29 xorgcvs Exp $ */ /**** module mpbande.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbande.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbande.c,v 3.5 2001/12/14 19:58:43 dawes Exp $ */ #define _XIEC_MPBANDE #define _XIEC_PBANDE Index: xc/programs/Xserver/XIE/mixie/process/mpbands.c diff -u xc/programs/Xserver/XIE/mixie/process/mpbands.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpbands.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpbands.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpbands.c Fri Dec 14 14:58:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpbands.c,v 1.3 2000/08/17 19:47:49 cpqbld Exp $ */ +/* $Xorg: mpbands.c,v 1.4 2001/02/09 02:04:30 xorgcvs Exp $ */ /**** module mpbands.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. September, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbands.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpbands.c,v 3.5 2001/12/14 19:58:43 dawes Exp $ */ #define _XIEC_MPBANDS #define _XIEC_PBANDS Index: xc/programs/Xserver/XIE/mixie/process/mpblend.c diff -u xc/programs/Xserver/XIE/mixie/process/mpblend.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpblend.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpblend.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpblend.c Fri Dec 14 14:58:43 2001 @@ -1,11 +1,15 @@ -/* $Xorg: mpblend.c,v 1.3 2000/08/17 19:47:50 cpqbld Exp $ */ +/* $Xorg: mpblend.c,v 1.4 2001/02/09 02:04:30 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpblend.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpblend.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpblend.c,v 3.5 2001/12/14 19:58:43 dawes Exp $ */ #define _XIEC_MPBLEND #define _XIEC_PBLEND Index: xc/programs/Xserver/XIE/mixie/process/mpcfromi.c diff -u xc/programs/Xserver/XIE/mixie/process/mpcfromi.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpcfromi.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpcfromi.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpcfromi.c Fri Dec 14 14:58:43 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpcfromi.c,v 1.3 2000/08/17 19:47:50 cpqbld Exp $ */ +/* $Xorg: mpcfromi.c,v 1.4 2001/02/09 02:04:30 xorgcvs Exp $ */ /**** module mpcfromi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Robert NC Shelley -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcfromi.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcfromi.c,v 3.5 2001/12/14 19:58:43 dawes Exp $ */ #define _XIEC_MPCFROMI #define _XIEC_PCFROMI Index: xc/programs/Xserver/XIE/mixie/process/mpcnst.c diff -u xc/programs/Xserver/XIE/mixie/process/mpcnst.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpcnst.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpcnst.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpcnst.c Fri Dec 14 14:58:44 2001 @@ -1,11 +1,15 @@ -/* $Xorg: mpcnst.c,v 1.3 2000/08/17 19:47:50 cpqbld Exp $ */ +/* $Xorg: mpcnst.c,v 1.4 2001/02/09 02:04:30 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpcnst.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden && Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcnst.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcnst.c,v 3.5 2001/12/14 19:58:44 dawes Exp $ */ #define _XIEC_MPCNST Index: xc/programs/Xserver/XIE/mixie/process/mpcomp.c diff -u xc/programs/Xserver/XIE/mixie/process/mpcomp.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpcomp.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpcomp.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpcomp.c Fri Dec 14 14:58:44 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpcomp.c,v 1.5 2000/08/17 19:47:51 cpqbld Exp $ */ +/* $Xorg: mpcomp.c,v 1.6 2001/02/09 02:04:30 xorgcvs Exp $ */ /**** module mpcomp.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcomp.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpcomp.c,v 3.5 2001/12/14 19:58:44 dawes Exp $ */ #define _XIEC_MPCOMP Index: xc/programs/Xserver/XIE/mixie/process/mpconv.c diff -u xc/programs/Xserver/XIE/mixie/process/mpconv.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpconv.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpconv.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpconv.c Fri Dec 14 14:58:44 2001 @@ -1,11 +1,15 @@ -/* $Xorg: mpconv.c,v 1.3 2000/08/17 19:47:51 cpqbld Exp $ */ +/* $Xorg: mpconv.c,v 1.4 2001/02/09 02:04:30 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpconv.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Dean Verheiden && Robert NC Shelley -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpconv.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpconv.c,v 3.5 2001/12/14 19:58:44 dawes Exp $ */ #define _XIEC_MPCONV Index: xc/programs/Xserver/XIE/mixie/process/mpctoi.c diff -u xc/programs/Xserver/XIE/mixie/process/mpctoi.c:3.5 xc/programs/Xserver/XIE/mixie/process/mpctoi.c:3.6 --- xc/programs/Xserver/XIE/mixie/process/mpctoi.c:3.5 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpctoi.c Fri Dec 14 14:58:44 2001 @@ -1,11 +1,15 @@ -/* $Xorg: mpctoi.c,v 1.3 2000/08/17 19:47:51 cpqbld Exp $ */ +/* $Xorg: mpctoi.c,v 1.4 2001/02/09 02:04:30 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpctoi.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Robert NC Shelley -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpctoi.c,v 3.5 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpctoi.c,v 3.6 2001/12/14 19:58:44 dawes Exp $ */ #define _XIEC_MPCTOI #define _XIEC_PCTOI Index: xc/programs/Xserver/XIE/mixie/process/mpdither.c diff -u xc/programs/Xserver/XIE/mixie/process/mpdither.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpdither.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpdither.c:3.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpdither.c Fri Dec 14 14:58:45 2001 @@ -1,11 +1,15 @@ -/* $Xorg: mpdither.c,v 1.3 2000/08/17 19:47:51 cpqbld Exp $ */ +/* $Xorg: mpdither.c,v 1.4 2001/02/09 02:04:31 xorgcvs Exp $ */ /* AGE Logic - Oct 15 1995 - Larry Hare */ /**** module mpdither.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpdither.c,v 3.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpdither.c,v 3.5 2001/12/14 19:58:45 dawes Exp $ */ #define _XIEC_MPDITHER Index: xc/programs/Xserver/XIE/mixie/process/mpgeom.c diff -u xc/programs/Xserver/XIE/mixie/process/mpgeom.c:1.4 xc/programs/Xserver/XIE/mixie/process/mpgeom.c:1.5 --- xc/programs/Xserver/XIE/mixie/process/mpgeom.c:1.4 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpgeom.c Fri Dec 14 14:58:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpgeom.c,v 1.3 2000/08/17 19:47:52 cpqbld Exp $ */ +/* $Xorg: mpgeom.c,v 1.4 2001/02/09 02:04:31 xorgcvs Exp $ */ /**** module mpgeom.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Ben Fahy -- AGE Logic, Inc. June, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeom.c,v 1.4 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeom.c,v 1.5 2001/12/14 19:58:45 dawes Exp $ */ #define _XIEC_MPGEOM Index: xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c diff -u xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c:3.5 xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c:3.6 --- xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c:3.5 Wed Jan 17 17:13:11 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c Fri Dec 14 14:58:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpgeomaa.c,v 1.3 2000/08/17 19:47:52 cpqbld Exp $ */ +/* $Xorg: mpgeomaa.c,v 1.4 2001/02/09 02:04:31 xorgcvs Exp $ */ /**** module mpgeomaa.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ Ben Fahy && Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c,v 3.5 2001/01/17 22:13:11 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpgeomaa.c,v 3.6 2001/12/14 19:58:45 dawes Exp $ */ #define _XIEC_MPGEOM Index: xc/programs/Xserver/XIE/mixie/process/mphist.c diff -u xc/programs/Xserver/XIE/mixie/process/mphist.c:3.4 xc/programs/Xserver/XIE/mixie/process/mphist.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mphist.c:3.4 Wed Jan 17 17:13:12 2001 +++ xc/programs/Xserver/XIE/mixie/process/mphist.c Fri Dec 14 14:58:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mphist.c,v 1.3 2000/08/17 19:47:53 cpqbld Exp $ */ +/* $Xorg: mphist.c,v 1.4 2001/02/09 02:04:31 xorgcvs Exp $ */ /**** module mphist.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mphist.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mphist.c,v 3.5 2001/12/14 19:58:45 dawes Exp $ */ #define _XIEC_MPHIST #define _XIEC_PHIST Index: xc/programs/Xserver/XIE/mixie/process/mplogic.c diff -u xc/programs/Xserver/XIE/mixie/process/mplogic.c:3.4 xc/programs/Xserver/XIE/mixie/process/mplogic.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mplogic.c:3.4 Wed Jan 17 17:13:12 2001 +++ xc/programs/Xserver/XIE/mixie/process/mplogic.c Fri Dec 14 14:58:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mplogic.c,v 1.5 2000/08/17 19:47:53 cpqbld Exp $ */ +/* $Xorg: mplogic.c,v 1.6 2001/02/09 02:04:31 xorgcvs Exp $ */ /**** module mplogic.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mplogic.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mplogic.c,v 3.5 2001/12/14 19:58:45 dawes Exp $ */ #define _XIEC_MPLOGIC Index: xc/programs/Xserver/XIE/mixie/process/mppaste.c diff -u xc/programs/Xserver/XIE/mixie/process/mppaste.c:3.4 xc/programs/Xserver/XIE/mixie/process/mppaste.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mppaste.c:3.4 Wed Jan 17 17:13:12 2001 +++ xc/programs/Xserver/XIE/mixie/process/mppaste.c Fri Dec 14 14:58:45 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mppaste.c,v 1.3 2000/08/17 19:47:53 cpqbld Exp $ */ +/* $Xorg: mppaste.c,v 1.4 2001/02/09 02:04:31 xorgcvs Exp $ */ /**** module mppaste.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -67,7 +71,7 @@ July, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppaste.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppaste.c,v 3.5 2001/12/14 19:58:45 dawes Exp $ */ #define _XIEC_MPPASTE #define _XIEC_PPASTE Index: xc/programs/Xserver/XIE/mixie/process/mppoint.c diff -u xc/programs/Xserver/XIE/mixie/process/mppoint.c:3.4 xc/programs/Xserver/XIE/mixie/process/mppoint.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mppoint.c:3.4 Wed Jan 17 17:13:12 2001 +++ xc/programs/Xserver/XIE/mixie/process/mppoint.c Fri Dec 14 14:58:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mppoint.c,v 1.3 2000/08/17 19:47:54 cpqbld Exp $ */ +/* $Xorg: mppoint.c,v 1.4 2001/02/09 02:04:31 xorgcvs Exp $ */ /**** module mppoint.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppoint.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mppoint.c,v 3.5 2001/12/14 19:58:46 dawes Exp $ */ #define _XIEC_MPPOINT Index: xc/programs/Xserver/XIE/mixie/process/mprgb.c diff -u xc/programs/Xserver/XIE/mixie/process/mprgb.c:3.4 xc/programs/Xserver/XIE/mixie/process/mprgb.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mprgb.c:3.4 Wed Jan 17 17:13:12 2001 +++ xc/programs/Xserver/XIE/mixie/process/mprgb.c Fri Dec 14 14:58:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mprgb.c,v 1.3 2000/08/17 19:47:54 cpqbld Exp $ */ +/* $Xorg: mprgb.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ /**** module mprgb.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Larry Hare -- AGE Logic, Inc. August, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mprgb.c,v 3.4 2001/01/17 22:13:12 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mprgb.c,v 3.5 2001/12/14 19:58:46 dawes Exp $ */ #define _XIEC_MPRGB Index: xc/programs/Xserver/XIE/mixie/process/mpuncnst.c diff -u xc/programs/Xserver/XIE/mixie/process/mpuncnst.c:3.4 xc/programs/Xserver/XIE/mixie/process/mpuncnst.c:3.5 --- xc/programs/Xserver/XIE/mixie/process/mpuncnst.c:3.4 Wed Jan 17 17:13:13 2001 +++ xc/programs/Xserver/XIE/mixie/process/mpuncnst.c Fri Dec 14 14:58:46 2001 @@ -1,10 +1,14 @@ -/* $Xorg: mpuncnst.c,v 1.3 2000/08/17 19:47:54 cpqbld Exp $ */ +/* $Xorg: mpuncnst.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ /**** module mpuncnst.c ****/ /****************************************************************************** Copyright 1993, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ Dean Verheiden && Larry Hare -- AGE Logic, Inc. May, 1993 *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpuncnst.c,v 3.4 2001/01/17 22:13:13 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/XIE/mixie/process/mpuncnst.c,v 3.5 2001/12/14 19:58:46 dawes Exp $ */ #define _XIEC_MPUNCNST Index: xc/programs/Xserver/XTrap/Imakefile diff -u /dev/null xc/programs/Xserver/XTrap/Imakefile:1.1 --- /dev/null Fri Jan 18 15:24:16 2002 +++ xc/programs/Xserver/XTrap/Imakefile Fri Nov 2 18:29:29 2001 @@ -0,0 +1,27 @@ +XCOMM $XFree86: xc/programs/Xserver/XTrap/Imakefile,v 1.1 2001/11/02 23:29:29 dawes Exp $ + +#if DoLoadableServer +#define IHaveSubdirs +#endif + +#include + +#if DoLoadableServer + SUBDIRS = module +#endif + SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c + OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o + INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) + +NormalLibraryTarget(xtrap,$(OBJS)) +LintLibraryTarget(xtrap,$(SRCS)) +NormalLintTarget($(SRCS)) + +NormalLibraryObjectRule() + +#if DoLoadableServer +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) +#endif + +DependTarget() Index: xc/programs/Xserver/XTrap/xf86XTrapModule.c diff -u /dev/null xc/programs/Xserver/XTrap/xf86XTrapModule.c:1.1 --- /dev/null Fri Jan 18 15:24:16 2002 +++ xc/programs/Xserver/XTrap/xf86XTrapModule.c Fri Nov 2 18:29:29 2001 @@ -0,0 +1,47 @@ +/* $XFree86: xc/programs/Xserver/XTrap/xf86XTrapModule.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */ +/* This is the xf86 module code for the DEC_XTRAP extension. + */ + +#include "xf86Module.h" + +#include + +extern void DEC_XTRAPInit(INITARGS); + +#ifdef XFree86LOADER + +static MODULESETUPPROTO(xtrapSetup); + +ExtensionModule xtrapExt = +{ + DEC_XTRAPInit, + XTrapExtName, + NULL, + NULL, + NULL +}; + +static XF86ModuleVersionInfo xtrapVersRec = +{ + "xtrap", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XF86_VERSION_CURRENT, + 1, 0, 0, + ABI_CLASS_EXTENSION, /* needs the server extension ABI */ + ABI_EXTENSION_VERSION, + MOD_CLASS_EXTENSION, + {0,0,0,0} +}; + +XF86ModuleData xtrapModuleData = { &xtrapVersRec, xtrapSetup, NULL }; + +static pointer +xtrapSetup(pointer module, pointer opts, int *errmaj, int *errmin) { + LoadExtension(&xtrapExt, FALSE); + /* Need a non-NULL return value to indicate success */ + return (pointer)1; +} + +#endif /* XFree86LOADER */ Index: xc/programs/Xserver/XTrap/xtrapddmi.c diff -u /dev/null xc/programs/Xserver/XTrap/xtrapddmi.c:1.1 --- /dev/null Fri Jan 18 15:24:16 2002 +++ xc/programs/Xserver/XTrap/xtrapddmi.c Fri Nov 2 18:29:29 2001 @@ -0,0 +1,180 @@ +/* $XFree86: xc/programs/Xserver/XTrap/xtrapddmi.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * ABSTRACT: + * + * This module is the platform-specific but conditionally independent + * code for the XTrap extension (usually I/O or platform setup). + * This is shared code and is subject to change only by team approval. + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + */ + +#include +#include +#ifdef PC +# include "fcntl.h" +# include "io.h" +# define O_NDELAY 0L +#endif + +#define NEED_REPLIES +#define NEED_EVENTS +#include /* From library include environment */ +#include "input.h" /* From server include env. (must be before Xlib.h!) */ +#ifdef PC +# include "scrintst.h" /* Screen struct */ +# include "extnsist.h" +#else +# include "extnsionst.h" /* Server ExtensionEntry definitions */ +# include "scrnintstr.h" /* Screen struct */ +#endif + +#include +#include +#include + +extern int XETrapErrorBase; +extern xXTrapGetAvailReply XETrap_avail; +extern DevicePtr XETrapKbdDev; +extern DevicePtr XETrapPtrDev; + +/* + * DESCRIPTION: + * + * This function performs the platform specific setup for server + * extension implementations. + */ +void XETrapPlatformSetup() +{ +} + + +#if !defined _XINPUT +/* + * DESCRIPTION: + * + * This routine processes the simulation of some input event. + * + */ +int XETrapSimulateXEvent(register xXTrapInputReq *request, + register ClientPtr client) +{ + ScreenPtr pScr = NULL; + int status = Success; + xEvent xev; + register int x = request->input.x; + register int y = request->input.y; + DevicePtr keydev = LookupKeyboardDevice(); + DevicePtr ptrdev = LookupPointerDevice(); + + if (request->input.screen < screenInfo.numScreens) + { + pScr = screenInfo.screens[request->input.screen]; + } + else + { /* Trying to play bogus events to this WS! */ +#ifdef VERBOSE + ErrorF("%s: Trying to send events to screen %d!\n", XTrapExtName, + request->input.screen); +#endif + status = XETrapErrorBase + BadScreen; + } + /* Fill in the event structure with the information + * Note: root, event, child, eventX, eventY, state, and sameScreen + * are all updated by FixUpEventFromWindow() when the events + * are delivered via DeliverDeviceEvents() or whatever. XTrap + * needs to only concern itself with type, detail, time, rootX, + * and rootY. + */ + if (status == Success) + { + xev.u.u.type = request->input.type; + xev.u.u.detail = request->input.detail; + xev.u.keyButtonPointer.time = GetTimeInMillis(); + xev.u.keyButtonPointer.rootX = x; + xev.u.keyButtonPointer.rootY = y; + + if (request->input.type == MotionNotify) + { /* Set new cursor position on screen */ + XETrap_avail.data.cur_x = x; + XETrap_avail.data.cur_y = y; + NewCurrentScreen (pScr, x, y); /* fix from amnonc@mercury.co.il */ + if (!(*pScr->SetCursorPosition)(pScr, x, y, xFalse)) + { + status = BadImplementation; + } + } + } + if (status == Success) + { + switch(request->input.type) + { /* Now process the event appropriately */ + case KeyPress: + case KeyRelease: + (*XETrapKbdDev->realInputProc)(&xev,(DeviceIntPtr)keydev, 1L); + break; + case MotionNotify: + case ButtonPress: + case ButtonRelease: + (*XETrapPtrDev->realInputProc)(&xev,(DeviceIntPtr)ptrdev, 1L); + break; + default: + status = BadValue; + break; + } + } + return(status); +} +#endif /* _XINPUT */ + +#if defined vms && !defined LINKED_IN +/* Used by swapping code not visible from VMS (from main.c) */ +#ifndef BLADE +void +NotImplemented() +{ + FatalError("Not implemented"); +} +#endif + +int +#ifdef __STDC__ +ProcBadRequest( ClientPtr client) +#else +ProcBadRequest(client) + ClientPtr client; +#endif +{ + return (BadRequest); +} + +#endif /* vms && ! LINKED_IN */ Index: xc/programs/Xserver/XTrap/xtrapdi.c diff -u /dev/null xc/programs/Xserver/XTrap/xtrapdi.c:1.2 --- /dev/null Fri Jan 18 15:24:16 2002 +++ xc/programs/Xserver/XTrap/xtrapdi.c Wed Nov 7 23:00:12 2001 @@ -0,0 +1,2122 @@ +/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.2 2001/11/08 04:00:12 tsi Exp $ */ +/***************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA +X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*****************************************************************************/ +/* + * ABSTRACT: + * + * This module is the main module for extension initialization and setup. + * It is called by the server and by clients using the extension. + * This is shared code and is subject to change only by team approval. + * + * CONTRIBUTORS: + * + * Dick Annicchiarico + * Robert Chesler + * Gene Durso + * Marc Evans + * Alan Jamison + * Mark Henry + * Ken Miller + * + * CHANGES: + * + * Robert Chesler - grab-impreviousness patch to improve grab behavior + * Robert Chesler - add client arg to swapping routines for X11R6 port + * + */ + +/*-----------------* + * Include Files * + *-----------------*/ +#include +#include + +#define NEED_REPLIES +#define NEED_EVENTS +#include +#include +#include +#include "input.h" /* Server DevicePtr definitions */ +#include "misc.h" /* Server swapping macros */ +#include "dixstruct.h" /* Server ClientRec definitions */ +#include "resource.h" /* Used with the MakeAtom call */ +#ifdef PC +# include "scrintst.h" /* Screen struct */ +# include "extnsist.h" +#else +# include "extnsionst.h" /* Server ExtensionEntry definitions */ +# include "scrnintstr.h" /* Screen struct */ +#endif +#include "pixmapstr.h" /* DrawableRec */ +#include "windowstr.h" /* Drawable Lookup structures */ +#include +#include +#include +#include "colormapst.h" + +/*----------------------------* + * Global Data Declarations * + *----------------------------*/ + +DevicePtr XETrapKbdDev = NULL; +DevicePtr XETrapPtrDev = NULL; +int XETrapErrorBase = 0L; +xXTrapGetAvailReply XETrap_avail; /* What's available to clients */ + +globalref int_function XETrapDispatchVector[10L]; /* Vector of XTrap Rtns */ +globalref int_function XETSwDispatchVector[10L]; /* Swapped XTrap Rtns */ + +globalref int_function XETrapProcVector[256L]; /* The "shadowed" ProcVector */ + /* The "real" EventVector (XTrap creates it till events + * truly become vectored + */ +#ifndef VECTORED_EVENTS +globalref int_function EventProcVector[XETrapCoreEvents]; +#else +extern WindowPtr GetCurrentRootWindow(); +globalref int_function EventProcVector[128L]; +#endif +static int_function keybd_process_inp = NULL; /* Used for VECTORED_EVENTS */ + /* The "shadowed" Event Vector */ +globalref int_function XETrapEventProcVector[XETrapCoreEvents]; + +globalref void_function XETSwProcVector[256L];/* Vector of Req swapping rtns */ + +/* This macro returns a true/false indicator based on whether it changes the + * environment state bits local to the server extension. This is based on the + * idea that if a valid flag is set and the corresponding data bit is not in + * the same state as desired, then true is returned, otherwise false is + * returned. + */ +#define _CheckChangeBit(valid,data,local,bit) \ + (BitIsFalse(valid,bit) ? 0L : \ + (((BitIsTrue(data,bit) && BitIsTrue(local,bit)) || \ + (BitIsFalse(data,bit) && BitIsFalse(local,bit))) ? 0L : \ + (BitToggle(local,bit), 1L))) + +/* This macro is designed to return the number of elements in an + * automatically allocated array. + */ +#ifndef ASIZE +#define ASIZE(array) (sizeof(array)/sizeof(array[0L])) +#endif + +/* This macro is designed to return the number of long words beyond + * XETrapMinRepSize contained in a data structure. + */ +#ifndef XEXTRA +#define XEXTRA(s) \ + ((sizeof(s)+(sizeof(CARD32)-1L)-XETrapMinRepSize)/sizeof(CARD32)) +#endif + +/* Static Declarations known to XTrap Only + * All XTrap clients refer to these single copies! + */ +/* This carries all of the information XTrap uses for internal information */ +static XETrapEnv *XETenv[MAXCLIENTS] = {NULL}; +#ifndef RESTYPE +#define RESTYPE unsigned long +#endif +static RESTYPE XETrapClass = 0L; /* Resource class for this extension */ +static RESTYPE XETrapType = 0L; /* Resource type for this extension */ +static Bool gate_closed = False; /* The global "gatekeeper" */ +static Bool key_ignore = False; /* The global "keymaster" */ +static Bool ignore_grabs = False; +static CARD8 next_key = XEKeyIsClear; /* Echo, Clear, or Other */ +static INT16 current_screen = -1L; /* Current screen for events */ +static INT16 vectored_requests[256L] = {0L}; /* cnt of vectoring clients */ +static INT16 vectored_events[KeyPress+MotionNotify] = {0L}; +typedef struct _client_list +{ + struct _client_list *next; + ClientPtr client; +} ClientList; +static ClientList io_clients; /* Linked-list of clients currently doing I/O */ +static ClientList stats_clients; /* Linked-list of clients collecting stats */ +static ClientList cmd_clients; /* Linked-list of clients using command key */ + +/*----------------------------* + * Forward Declarations + *----------------------------*/ +static void _SwapProc (int (**f1 )(), int (**f2 )()); +static void sXETrapEvent (xETrapDataEvent *from , xETrapDataEvent *to ); +static int add_accelerator_node (ClientPtr client , ClientList *accel ); +static void remove_accelerator_node (ClientPtr client , ClientList *accel ); +static void update_protocol (xXTrapGetReq *reqptr , ClientPtr client ); +#ifdef COLOR_REPLIES +static void GetSendColorRep (ClientPtr client , xResourceReq *req ); +static void GetSendNamedColorRep (ClientPtr client , xResourceReq *req ); +static void GetSendColorCellsRep (ClientPtr client , xResourceReq *req ); +static void GetSendColorPlanesRep (ClientPtr client , xResourceReq *req ); +#endif + +/* + * DESCRIPTION: + * + * This routine is called by the server when a given client + * goes away (as identified by the first argument). All + * memory allocations, misc. values specific to a given + * client would be reset here. + * + */ +int XETrapDestroyEnv(pointer value, XID id) +{ + xXTrapReq request; + XETrapEnv *penv = XETenv[(int)value]; + + XETrapReset(&request,penv->client); + /* Free any memory malloc'd for a particular client here */ + /* In case stop I/O wasn't received for this client */ + if (penv->stats) + { /* Remove from client accelerator list */ + remove_accelerator_node(penv->client, &stats_clients); + Xfree(penv->stats); /* Free the stats buckets */ + } + if (cmd_clients.next == NULL) + { /* No more command key clients! Let's reset the gate */ + gate_closed = False; + key_ignore = False; + next_key = XEKeyIsClear; + } + + + current_screen = -1L; /* Invalidate current screen */ + +#ifdef VERBOSE + ErrorF("%s: Client '%d' Disconnected\n", XTrapExtName, + penv->client->index); +#endif + + Xfree(penv); + XETenv[(int)value] = NULL; + + return 0; +} + +/* + * DESCRIPTION: + * + * This routine is called by the server when the last client + * (the session manager in most cases) goes away. This is server + * reset. When the server comes back up, this extension will not + * be loaded unless this routine makes the proper arrangements. + * + * The real concern here is to unload the extension + * and possibly make arragements to be called upon + * server restart. + * + */ +void XETrapCloseDown(ExtensionEntry *extEntry) +{ + int i; + + for (i=0L; irealInputProc; + EventProcVector[KeyRelease] = + (int_function)XETrapKbdDev->realInputProc; + } +#ifdef VECTORED_EVENTS + keybd_process_inp = EventProcVector[KeyPress]; + EventProcVector[KeyPress] = EventProcVector[KeyRelease] = NULL; + XETrapEventProcVector[KeyPress] = XETrapEventVector; + XETrapEventProcVector[KeyRelease] = XETrapEventVector; +#else /* !VECTORED_EVENTS */ + XETrapEventProcVector[KeyPress] = XETrapKeyboard; + XETrapEventProcVector[KeyRelease] = XETrapKeyboard; +#endif /* !VECTORED_EVENTS */ + } + /* Do we need to redirect the pointer device? */ +#ifndef VECTORED_EVENTS + if (XETrapPtrDev == NULL) + { + if ((XETrapPtrDev = LookupPointerDevice()) == 0L) + { + retval = False; + } + else + { + EventProcVector[ButtonPress] = + (int_function)XETrapPtrDev->realInputProc; + EventProcVector[ButtonRelease] = + (int_function)XETrapPtrDev->realInputProc; + EventProcVector[MotionNotify] = + (int_function)XETrapPtrDev->realInputProc; + } + XETrapEventProcVector[ButtonPress] = XETrapPointer; + XETrapEventProcVector[ButtonRelease] = XETrapPointer; + XETrapEventProcVector[MotionNotify] = XETrapPointer; + } +#endif /* !VECTORED_EVENTS */ + return(retval); +} + +/* + * + * DESCRIPTION: + * + * This routine is the main entry point for the Xtrap extension. It is + * called by the server to inititalize the Xtrap extension. Once the + * extension is initialized, life is controlled by the XtrapDispatch + * routine by the requests it will handle. + * + * Initializes all the XTrap data structures with the proper + * addresses of defined routines that will help control the extension. + * It is vital that the extension state be kept accurate so that only + * one call to this routine be made. + * + */ + +void DEC_XTRAPInit() +{ + register ExtensionEntry *extEntry; + unsigned int i; + Atom a; + + /* Make the extension known to the server. Must be done every time + * DEC_XTRAPInit is called, else server will think it failed. + */ + if ((extEntry = AddExtension(XTrapExtName,XETrapNumEvents, + XETrapNumErrors,XETrapDispatch,sXETrapDispatch,XETrapCloseDown + ,StandardMinorOpcode)) == NULL) + { + ErrorF("%s: AddExtension Failed!\n", XTrapExtName); + return; + } +#ifdef VERBOSE + ErrorF("%s: AddExtension assigned Major Opcode '%d'\n", + XTrapExtName, extEntry->base); +#endif + XETrap_avail.data.major_opcode = extEntry->base; + XETrapErrorBase = extEntry->errorBase; + XETrap_avail.data.event_base = extEntry->eventBase; + + /* Set up our swapped reply vector */ + ReplySwapVector[XETrap_avail.data.major_opcode] = + (void_function) sReplyXTrapDispatch; + + /* Set up our swapped event vector */ + EventSwapVector[extEntry->eventBase + XETrapData] = + (EventSwapPtr) sXETrapEvent; + + /* make an atom saying that the extension is present. The + * adding of the resource occurs during XETrapCreateEnv(). + */ + if ((a = MakeAtom(XTrapExtName,strlen(XTrapExtName),1L)) == None || + (XETrapType = CreateNewResourceType(XETrapDestroyEnv)) == 0L) + { + ErrorF("%s: Setup can't create new resource type (%d,%d,%d)\n", + XTrapExtName, a,XETrapClass,XETrapType); + return; + } + /* initialize the GetAvailable info reply here */ + XETrap_avail.hdr.type = X_Reply; + XETrap_avail.hdr.length = XEXTRA(xXTrapGetAvailReply); + XETrap_avail.data.xtrap_release = XETrapRelease; + XETrap_avail.data.xtrap_version = XETrapVersion; + XETrap_avail.data.xtrap_revision = XETrapRevision; + XETrap_avail.data.pf_ident = XETrapPlatform; + XETrap_avail.data.max_pkt_size = 0xFFFF; /* very large number */ + for (i=0L; iindex > MAXCLIENTS) + { + status = BadImplementation; + } + else if ((XETenv[client->index] = (XETrapEnv *)Xcalloc(sizeof(XETrapEnv))) + == NULL) + { + status = BadAlloc; + } + if (status == Success) + { + penv = XETenv[client->index]; + penv->client = client; + penv->protocol = 31; /* default to backwards compatibility */ + /* prep for client's departure (for memory dealloc, cleanup) */ + AddResource(FakeClientID(client->index),XETrapType, + (pointer)(client->index)); + if (XETrapRedirectDevices() == False) + { + status = XETrapErrorBase + BadDevices; + } + /* Initialize the current state */ + if (status == Success) + { + status = XETrapReset(NULL, penv->client); + } + } + + current_screen = -1L; /* Invalidate current screen */ + +#ifdef VERBOSE + if (status == Success) + { + ErrorF("%s: Client '%d' Connection Accepted\n", XTrapExtName, + penv->client->index); + } +#endif + + return(status); +} + +/* + * DESCRIPTION: + * + * This procedure is defined for the call to AddExtension() + * in which it is expected to be a parameter of the call. + * + * This routine will be called by the server dispatcher + * when a client makes a request that is handled + * by the extension and the byte ordering of the client is the + * SAME as that of the extension. + * + * Note: the status of the requests is returned to the caller of + * the Dispatch routine which will in turn SendErrorToClient if + * necessary. + */ + +int XETrapDispatch(ClientPtr client) +{ + + REQUEST(xXTrapReq); + register int status = Success; + + REQUEST_AT_LEAST_SIZE(xXTrapReq); + + /* Have we seen this client before? */ + if (XETenv[client->index] == NULL) + { + status = XETrapCreateEnv(client); + } + /* Do we have a valid request? */ + if (status == Success) + { + if (stuff->minor_opcode < ASIZE(XETrapDispatchVector)) + { + /* Then vector to the pointed to function */ + status = + (*(XETrapDispatchVector[stuff->minor_opcode]))(stuff,client); + } + else + { + status = BadRequest; + } + } + return(status); +} + +/* + * DESCRIPTION: + * + * This procedure is defined for the call to AddExtension() + * in which it is expected to be a parameter of the call. + * + * This routine would ordinarily be called by the server + * dispatcher when a client makes a request that is handled + * by the extension and the byte ordering of the client is + * DIFFERENT than that of the extension. + */ + +int sXETrapDispatch(ClientPtr client) +{ + + REQUEST(xXTrapReq); + register int status = Success; + + REQUEST_AT_LEAST_SIZE(xXTrapReq); + + /* Have we seen this client before? */ + if (XETenv[client->index] == NULL) + { + status = XETrapCreateEnv(client); + } + /* Do we have a valid request? */ + if (status == Success) + { + if (stuff->minor_opcode < ASIZE(XETSwDispatchVector)) + { + /* Then vector to the pointed to function */ + status = + (*(XETSwDispatchVector[stuff->minor_opcode]))(stuff,client); + } + else + { + status = BadRequest; + } + } + return(status); +} + +/* + * DESCRIPTION: + * + * This routine will place the extension in a steady and known + * state. Any current state will be reset. This is called either + * by a client request (dispatched) or when a new client environment + * is created. + * + */ +int XETrapReset(xXTrapReq *request, ClientPtr client) +{ + static xXTrapConfigReq DummyReq; + register int i; + register int status = Success; + XETrapEnv *penv = XETenv[client->index]; + + /* in case any i/o's pending */ + (void)XETrapStopTrap((xXTrapReq *)NULL, client); + penv->cur.hdr.type = X_Reply; + penv->cur.hdr.length = XEXTRA(xXTrapGetCurReply); + /* Fill in a dummy config request to clear all elements */ + for (i=0L; icur.data_state_flags); i++) + { + penv->cur.data_state_flags[i] = 0L; /* Clear all env flags */ + } + penv->cur.data_config_max_pkt_size = XETrap_avail.data.max_pkt_size; + + return(status); +} + +/* + * DESCRIPTION: + * + * This function sends a reply back to the requesting client indicating + * the available states of the extension can be configured for. + */ +int XETrapGetAvailable(xXTrapGetReq *request, ClientPtr client) +{ + XETrapEnv *penv = XETenv[client->index]; + update_protocol(request, client); + /* Initialize the reply as needed */ + XETrap_avail.data.xtrap_protocol = penv->protocol; + XETrap_avail.hdr.detail = XETrap_GetAvailable; + XETrap_avail.hdr.sequenceNumber = client->sequence; + WriteReplyToClient(client, sizeof(xXTrapGetAvailReply), &XETrap_avail); + return(Success); +} + +/* + * DESCRIPTION: + * + * This function sends a reply back to the requesting client indicating + * the current state of the extension. + */ +int XETrapGetCurrent(xXTrapReq *request, ClientPtr client) +{ + XETrapEnv *penv = XETenv[client->index]; + int rep_size = (penv->protocol == 31 ? 284 : sz_xXTrapGetCurReply); + penv->cur.hdr.length = (rep_size - 32L) / SIZEOF(CARD32); + + /* Initialize the reply as needed */ + penv->cur.hdr.detail = XETrap_GetCurrent; + penv->cur.hdr.sequenceNumber = client->sequence; + WriteReplyToClient(client, rep_size, &(penv->cur)); + + return(Success); +} + +/* + * DESCRIPTION: + * + * This function sends a reply back to the requesting client dumping + * statistics (counts) of requests and events. If stat's isn't + * configured, return failure. + */ +int XETrapGetStatistics(xXTrapReq *request, ClientPtr client) +{ + int status = Success; + XETrapEnv *penv = XETenv[client->index]; + + if ((BitIsTrue(penv->cur.data_config_flags_data, XETrapStatistics)) && + (penv->stats)) + { + /* Initialize the reply as needed */ + int rep_size = sizeof(xXTrapGetStatsReply); + penv->stats->detail = XETrap_GetStatistics; + penv->stats->sequenceNumber = client->sequence; + if (penv->protocol == 31) + { + xXTrapGetStatsReply rep_stats; + rep_stats = *penv->stats; +#ifndef VECTORED_EVENTS + rep_size = 1060; +#else + rep_size = 1544; +#endif + rep_stats.length = (rep_size - 32L) / SIZEOF(CARD32); + /* + * Now we need to shift the data *into* the header area + * for bug compatibility. + */ + memcpy(&(rep_stats.pad0),&(penv->stats->data), + sizeof(XETrapGetStatsRep)); + WriteReplyToClient(client, rep_size, &rep_stats); + } + else + { + WriteReplyToClient(client, rep_size, penv->stats); + } + } + else + { + status = XETrapErrorBase + BadStatistics; + } + return(status); +} + +/* + * DESCRIPTION: + * + * This function is dispatched when a client requests the extension to + * be configured in some manner. + */ +int XETrapConfig(xXTrapConfigReq *request, ClientPtr client) +{ + UByteP vflags = request->config_flags_valid; + UByteP dflags = request->config_flags_data; + UByteP req_flags = request->config_flags_req; + UByteP event_flags = request->config_flags_event; + XETrapEnv *penv = XETenv[client->index]; + UByteP bit_flags = penv->cur.data_config_flags_data; + int status = Success; + CARD32 i = 0L; + + /* Check events and swap if desired */ + if (BitIsTrue(vflags,XETrapEvent)) + { /* Loop through all of the events */ + for (i=0L; icur.data_config_flags_event,i)))) + { /* At this point we *know* there's a change. The + * only question remaining is are there any more + * clients interested in this specific event. If + * so, *don't* swap this process! + */ + if (BitIsTrue(dflags,XETrapEvent)) + { /* Client wants the XTrap rtn */ + if (++(vectored_events[i]) <= 1L) + { /* first client, so do it */ + _SwapProc(&(XETrapEventProcVector[i]), + &(EventProcVector[i])); + } + } + else + { /* Client wants the *real* rtn */ + if (--(vectored_events[i]) <= 0L) + { /* No more clients using, so do it */ + _SwapProc(&(XETrapEventProcVector[i]), + &(EventProcVector[i])); + } + } + switch(i) + { + case KeyPress: /* needed for command key processing */ + case KeyRelease: + XETrapKbdDev->processInputProc = + (void_function)(EventProcVector[i] ? + (void_function)EventProcVector[i] : + (void_function)keybd_process_inp); + XETrapKbdDev->realInputProc = + (void_function)(EventProcVector[i] ? + (void_function)EventProcVector[i] : + (void_function)keybd_process_inp); + break; +#ifndef VECTORED_EVENTS + case ButtonPress: /* hack until events become vectored */ + case ButtonRelease: + case MotionNotify: + XETrapPtrDev->processInputProc = + (void_function)EventProcVector[i]; + XETrapPtrDev->realInputProc = + (void_function)EventProcVector[i]; + break; + default: + status = BadImplementation; + break; +#endif /* !VECTORED_EVENTS */ + } + BitToggle(penv->cur.data_config_flags_event,i); + } + } + } + if ((status == Success) && + (_CheckChangeBit(vflags,dflags,bit_flags,XETrapCmd))) + { + if (BitIsTrue(dflags, XETrapCmd)) + { /* Add accelerator entry to cmd_clients list iff necessary */ + penv->cur.data_config_cmd_key = request->config_cmd_key; + status = add_accelerator_node(penv->client, &cmd_clients); + } + else + { + penv->cur.data_config_cmd_key = 0L; /* default no KeyCode */ + remove_accelerator_node(penv->client, &cmd_clients); + } + } + if ((status == Success) && + (_CheckChangeBit(vflags,dflags,bit_flags,XETrapMaxPacket))) + { + if (BitIsTrue(dflags,XETrapMaxPacket)) + { /* Set size to what's passed in */ + if (request->config_max_pkt_size < XETrapMinPktSize) + { /* Tell them the value is too small */ + status = BadValue; + } + else + { + penv->cur.data_config_max_pkt_size = + request->config_max_pkt_size; + } + } + else + { /* Set it to the default (a *very* big number) */ + penv->cur.data_config_max_pkt_size = 0xFFFF; + } + } + /* If the valid flag is set for requests, then each of the + * requests is swapped if it's different from current state. + */ + if (BitIsTrue(vflags,XETrapRequest) && status == Success) + { /* Loop through all of the core requests */ + for (i=0L; icur.data_config_flags_req,i)))) + { /* At this point we *know* there's a change. The + * only question remaining is are there any more + * clients interested in this specific request. If + * so, *don't* swap this process! + */ + if (BitIsTrue(dflags,XETrapRequest)) + { /* Client wants the XTrap rtn */ + if (++(vectored_requests[i]) <= 1L) + { /* first client, so do it */ + _SwapProc(&(XETrapProcVector[i]), &(ProcVector[i])); + } + } + else + { /* Client wants the *real* rtn */ + if (--(vectored_requests[i]) <= 0L) + { /* No more clients using, so do it */ + _SwapProc(&(XETrapProcVector[i]), &(ProcVector[i])); + } + } + if (status == Success) + { + BitToggle(penv->cur.data_config_flags_req,i); + } + } + } + } + /* Check & Set the boolean flags */ + if (status == Success) + { + _CheckChangeBit(vflags,dflags,bit_flags,XETrapCmdKeyMod); + _CheckChangeBit(vflags,dflags,bit_flags,XETrapTimestamp); + _CheckChangeBit(vflags,dflags,bit_flags,XETrapWinXY); +/* _CheckChangeBit(vflags,dflags,bit_flags,XETrapCursor); */ +#ifdef COLOR_REPLIES + _CheckChangeBit(vflags,dflags,bit_flags,XETrapColorReplies); +#endif /* COLOR_REPLIES */ + if (_CheckChangeBit(vflags,dflags,bit_flags,XETrapGrabServer)) + { /* Let any client uncoditionally set/clear Grabs */ + ignore_grabs = BitValue(dflags, XETrapGrabServer); + } + } + /* The statistics vflag/dflag mechanism is a little different + * from most. The dflag is initially set to 0 to indicate no + * statistics. When a config request comes in to request + * statistics, memory's allocated and the dflag is set. + * Thereafter, whenever a client wants to clear the counters, he + * simply sets the vflag and clears the dflag. Multiple requests + * for statistics configuration are ignored, and the stats memory is + * free'd only when the client disconnects. + */ + if (status == Success) + { + if (_CheckChangeBit(vflags,dflags,bit_flags,XETrapStatistics)) + { + if (BitIsTrue(dflags,XETrapStatistics)) + { /* Do we need to allocate memory? */ + if (penv->stats == NULL && (penv->stats = + (xXTrapGetStatsReply *)Xcalloc(sizeof(xXTrapGetStatsReply))) + != NULL) + { /* Set up the reply header */ + penv->stats->type = X_Reply; + penv->stats->length = XEXTRA(xXTrapGetStatsReply); + /* add accelerator node for stats clients list */ + status = add_accelerator_node(penv->client, &stats_clients); + } + else if (penv->stats == NULL) + { /* No Memory! */ + status = BadAlloc; + } + } + else + { /* Zero out counters */ + (void)memset(penv->stats->data.requests, 0L, + sizeof(penv->stats->data.requests)); + (void)memset(penv->stats->data.events, 0L, + sizeof(penv->stats->data.events)); + /* Re-cock the Stat's flag so that it'll + * sense a change for next zero'ing out + * of the counters. + */ + BitTrue(penv->cur.data_config_flags_data, XETrapStatistics); + } + } + } + return(status); +} + +/* + * DESCRIPTION: + * + * This function sets the XETrapTrapActive bit to indicate that Trapping + * of requests and/or core events to the client may take place. + * + */ +int XETrapStartTrap(xXTrapReq *request, ClientPtr client) +{ + XETrapEnv *penv = XETenv[client->index]; + int status = add_accelerator_node(penv->client, &io_clients); + if (status == Success) + { + BitTrue(penv->cur.data_state_flags, XETrapTrapActive); + } + return(status); +} +/* + * DESCRIPTION: + * + * This function clears the XETrapTrapActive bit to indicate that Trapping + * of requests and/or core events to the client may *not* take place. + * + */ +int XETrapStopTrap(xXTrapReq *request, ClientPtr client) +{ + XETrapEnv *penv = XETenv[client->index]; + + remove_accelerator_node(penv->client, &io_clients); + BitFalse(penv->cur.data_state_flags, XETrapTrapActive); + return(Success); +} + +/* + * DESCRIPTION: + * + * This function sends a reply back to the requesting client indicating + * the specific XTrap version of this extension. + */ +int XETrapGetVersion(xXTrapGetReq *request, ClientPtr client) +{ + xXTrapGetVersReply ver_rep; + XETrapEnv *penv = XETenv[client->index]; + + update_protocol(request,client); /* to agree on protocol version */ + /* Initialize the reply as needed */ + ver_rep.hdr.type = X_Reply; + ver_rep.hdr.detail = XETrap_GetVersion; + ver_rep.hdr.sequenceNumber = client->sequence; + ver_rep.hdr.length = XEXTRA(xXTrapGetVersReply); + ver_rep.data.xtrap_release = XETrap_avail.data.xtrap_release; + ver_rep.data.xtrap_version = XETrap_avail.data.xtrap_version; + ver_rep.data.xtrap_revision = XETrap_avail.data.xtrap_revision; + ver_rep.data.xtrap_protocol = penv->protocol; /* return agreed protocol */ + WriteReplyToClient(client, sizeof(xXTrapGetVersReply), &ver_rep); + return(Success); +} + +/* + * DESCRIPTION: + * + * This function sends a reply back to the requesting client indicating + * the specific XTrap version of this extension. + */ +int XETrapGetLastInpTime(xXTrapReq *request, ClientPtr client) +{ + xXTrapGetLITimReply tim_rep; + XETrapEnv *penv = XETenv[client->index]; + + /* Initialize the reply as needed */ + tim_rep.hdr.type = X_Reply; + tim_rep.hdr.detail = XETrap_GetLastInpTime; + tim_rep.hdr.sequenceNumber = client->sequence; + tim_rep.hdr.length = XEXTRA(xXTrapGetLITimReply); + tim_rep.data_last_time = penv->last_input_time; + WriteReplyToClient(client, sizeof(xXTrapGetLITimReply), &tim_rep); + return(Success); +} + +/* + * DESCRIPTION: + * + * This routine is swapped in for the server's output request vectors. + * After writing the request to one (or more) XTrap client(s), this + * routine ALWAYS returns by calling the REAL output request vector rtn. + * + * Note: Swapped Requests are handled automatically since the unswapped + * vectored routine is called after the request has been swapped. + * IOW, all requests are directed through ProcVector eventually and are + * "unswapped" at that point. It is necessary to swap the data + * back if writing to a swapped client, however, and this is done + * by calling the appropriate XETSwProcVector[] routine. + */ +int XETrapRequestVector(ClientPtr client) +{ + int status = True; + XETrapDatum *pdata, *spdata = NULL; + REQUEST(xResourceReq); + WindowPtr window_ptr; + XETrapEnv *penv; + BYTE *tptr; + ClientList *ioc = &io_clients; + ClientList *stc = &stats_clients; + INT32 asize = sizeof(pdata->hdr) + stuff->length * sizeof(CARD32); + INT32 size = MAX(asize,XETrapMinPktSize); /* Must be at least */ + INT32 csize; /* size of request to send to the XTrap client */ + + /* Get memory for the data to be sent */ + if ((pdata = (XETrapDatum *)Xcalloc(size)) == NULL) + { /* Can't do anything accept set a flag since we don't + * know who to send the error to yet. + */ + status = False; + } + + while (ioc->next != NULL) + { + ioc = ioc->next; + penv = XETenv[ioc->client->index]; + if (status == False) + { /* We didn't get the memory! Complain */ + SendErrorToClient(penv->client,XETrap_avail.data.major_opcode, + stuff->reqType, 0L, BadAlloc); + break; + } + if (BitIsTrue(penv->cur.data_config_flags_req,stuff->reqType)) + { /* This particular client is interested in *this* request */ + pdata->hdr.client = client->index; /* stuff client index in hdr */ + if (BitIsTrue(penv->cur.data_config_flags_data,XETrapWinXY)) + { + window_ptr = (WindowPtr) LookupDrawable(stuff->id, client); + if (window_ptr == 0L) + { /* Failed...invalidate the X and Y coordinate data. */ + pdata->hdr.win_x = -1L; + pdata->hdr.win_y = -1L; + } + else + { + pdata->hdr.screen = window_ptr->drawable.pScreen->myNum; + pdata->hdr.win_x = window_ptr->drawable.x; + pdata->hdr.win_y = window_ptr->drawable.y; + } + } + if (BitIsTrue(penv->cur.data_config_flags_data,XETrapTimestamp)) + { + pdata->hdr.timestamp = GetTimeInMillis(); + } + /* Copy the information to a location we can write it from */ + (void) memcpy(&(pdata->u.req),stuff,stuff->length*sizeof(CARD32)); + pdata->hdr.count = MIN(penv->cur.data_config_max_pkt_size,asize); + XETrapSetHeaderRequest(&(pdata->hdr)); + + /* Perform any needed byte/word swapping. NOTE: This is not + * the "normal" technique that should be used to perform the + * swapping. The reason that we do it here is to be sure to + * do it only once in a controlled manner, which we can not + * guarentee in the case of the Xlib transport. Notice that + * we don't swap the XTRAP EVENT information. This is done + * in the XETrapWriteXLib() routine. + */ + + if (penv->client->swapped) + { /* need to deal with swapped clients */ + if (spdata == NULL) + { /* Get memory for the swapped data to be sent */ + if ((spdata = (XETrapDatum *)Xcalloc(size)) == NULL) + { + SendErrorToClient(penv->client, + XETrap_avail.data.major_opcode, + stuff->reqType, 0L, BadAlloc); + break; + } + + memcpy(spdata,pdata,size); /* fill in the info */ + /* Now call the request-specific rtn to swap the request */ + if (stuff->reqType < 128) + { /* a core request, good */ + (*XETSwProcVector[stuff->reqType])(&(spdata->u.req), + penv->client); /* RTC X11R6 */ + } + else if (penv->cur.data_config_max_pkt_size == + XETrapMinPktSize) + { /* Minimum size, so swap it as an ResourceReq */ + XETSwResourceReq(&(spdata->u.req)); + } + else + { /* trying to swap an extension request! */ + SendErrorToClient(penv->client, + XETrap_avail.data.major_opcode, + stuff->reqType, 0L, XETrapErrorBase + BadSwapReq); + } + } + /* need to stow in the latest header (count) */ + memcpy(spdata,pdata,SIZEOF(XETrapHeader)); + sXETrapHeader(&(spdata->hdr)); /* swap the XTrap Header */ + } + /* Write as many bytes of information as the client wants */ + tptr = (BYTE *)(penv->client->swapped ? spdata : pdata); + csize = MAX(pdata->hdr.count, XETrapMinPktSize); + if (XETrapWriteXLib(penv, tptr, csize) != csize) + { + SendErrorToClient(penv->client,XETrap_avail.data.major_opcode, + stuff->reqType, 0L, XETrapErrorBase + BadIO); + } +#ifdef COLOR_REPLIES + /* Process Color Replies, if desired, and applicable */ + if (BitIsTrue(penv->cur.data_config_flags_data,XETrapColorReplies)) + { /* wants color replies */ + switch(stuff->reqType) + { + case X_AllocColor: + GetSendColorRep(client, stuff); + break; + case X_AllocNamedColor: + GetSendNamedColorRep(client, stuff); + break; + case X_AllocColorCells: + GetSendColorCellsRep(client, stuff); + break; + case X_AllocColorPlanes: + GetSendColorPlanesRep(client, stuff); + break; + default: + break; + } + } +#endif /* COLOR_REPLIES */ + } + } + while (stc->next != NULL) + { /* increment appropriate stats bucket for each interested client */ + stc = stc->next; + penv = XETenv[stc->client->index]; + if (BitIsTrue(penv->cur.data_config_flags_req,stuff->reqType)) + { /* This particular client would like this particular stat */ + penv->stats->data.requests[stuff->reqType]++; + } + } + + if (pdata) + { + Xfree(pdata); + } + if (spdata) + { + Xfree(spdata); + } + if (ignore_grabs == True && + (stuff->reqType == X_GrabServer || stuff->reqType == X_UngrabServer)) + { /* doesn't want Grab's! Note: this is a "last configured" setting */ +#ifndef NO_NEW_XTRAP + int status; + + if (stuff->reqType == X_GrabServer) + { + ClientList *pclient; + + /* first call grab server procedure */ + status = (*XETrapProcVector[stuff->reqType])(client); + + /* then add XTrap controlling clients */ + for (pclient = &io_clients; pclient; pclient = pclient->next) + if (pclient->client) + MakeClientGrabImpervious(pclient->client); + } + else + { + ClientList *pclient; + + /* first drop XTrap controlling clients */ + for (pclient = &io_clients; pclient; pclient = pclient->next) + if (pclient->client) + MakeClientGrabPervious(pclient->client); + + /* then call ungrab server procedure */ + status = (*XETrapProcVector[stuff->reqType])(client); + } + return status; +#else /* NO_NEW_XTRAP */ + return(Success); +#endif /* NO_NEW_XTRAP */ + } + else + { + return((*XETrapProcVector[stuff->reqType])(client)); + } +} +/* + * + * DESCRIPTION: + * + * This routine intercepts input xEvents from the keyboard. + * if XETrapTrapActive, will write record to client(s) + * and then pass the event to the server iff not command + * key and gate is open. If it's a command key, then twiddle + * the gate state as required (optional, see below). + * + * This routine implements an optional user specified command key + * that can be used to close the input pipe into the server + * while a client command is generated. The keypress of the + * command key places this routine in command mode, the keyrelease + * exits command mode. + * + * A keypress of the command key followed by the + * optionally specified lock key will place this routine in continuous + * command mode until the command key and lock key are pressed again + * to exit command mode. In the locked state, the client interprets + * keystrokes as it wishes, as commands or as input to a prior command. + * + * Both mechanisms can be used alternately. + * + * IMPLICIT INPUTS : + * + * penv->cur.data_config_cmd_key : + * This is the keycode of the key that is used to stop + * and restart the transmission of intercepted input + * events to the server. If specified, the gate_state + * flag will be set or cleared depending on the state of + * the command_key. + * + * penv->cur.data_config_flags_data.XETrapCmdKeyMod: + * This is the value of the mode in which the command_key + * will operate. It currently has two values: MODIFIER and + * COMMAND_LOCK. MODIFIER mode clears gate_state on + * keypress, and sets gate_state on keyrelease. + * COMMAND_LOCK mode toggles gate_state on + * or off. + * + * gate_closed: + * A flag that is set/cleared in the xtrap_keyboard + * routine that indicates whether intercepted input + * should be passed to the server at any particular + * instance. + * + * + * next_key: + * This variable tracks the state of the next key to be + * pressed or released. It allows the checking of double + * presses of the command key to be sent to the server and + * keeps good state order when the command key is used. + * + * key_ignore: + * This variable indicates whether or not the specific + * key should be ignored for subsequent server processing. + * + */ +int XETrapKeyboard(xEvent *x_event, DevicePtr keybd, int count) +{ + register BYTE type = x_event->u.u.type; + register BYTE detail = x_event->u.u.detail; + XETrapEnv *penv; + ClientList *stc = &stats_clients; + ClientList *cmc = &cmd_clients; + int_function cur_func = XETrapKeyboard; + +#ifdef VERBOSE + if (count != 1L) + { /* We haven't coded for this situation yet! */ + ErrorF("Warning! Event count != 1 (%d)\n", count); + } +#endif + while (stc->next != NULL) + { /* increment appropriate stats bucket for each interested client */ + stc = stc->next; + penv = XETenv[stc->client->index]; + if (BitIsTrue(penv->cur.data_config_flags_event,type)) + { /* This particular client would like this particular stat */ + penv->stats->data.events[type]++; + } + } +#ifndef VECTORED_EVENTS + /* We *only* StampAndMail command keys with vectored events since + * we get much more data by waiting till we get called in XETrapEventVector + */ + XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ +#endif + while (cmc->next != NULL) + { + cmc = cmc->next; + penv = XETenv[cmc->client->index]; + key_ignore = False; + if (detail == penv->cur.data_config_cmd_key) + { + if (BitIsTrue(penv->cur.data_config_flags_data, XETrapCmdKeyMod)) + { + switch (type) + { + case KeyPress: + if (next_key == XEKeyIsEcho) + { + break; + } + gate_closed = True; + next_key = XEKeyIsClear; + break; + + case KeyRelease: + if (next_key == XEKeyIsEcho) + { + next_key = XEKeyIsClear; + break; + } + if (next_key == XEKeyIsClear) + { + next_key = XEKeyIsEcho; + } + else + { /* it's Other, so Clear it */ + next_key = XEKeyIsClear; + } + gate_closed = False; + key_ignore = True; + break; + + default: break; + } + } + else + { + switch (type) + { + case KeyPress: + if (next_key == XEKeyIsEcho) + { + gate_closed = False; + break; + } + /* Open gate on cmd key release */ + if ((next_key == XEKeyIsOther) && + gate_closed == True) + { + break; + } + gate_closed = True; + next_key = XEKeyIsClear; + break; + + case KeyRelease: + if (next_key == XEKeyIsClear) + { + next_key = XEKeyIsEcho; + break; + } + + if (next_key == XEKeyIsEcho) + { + next_key = XEKeyIsClear; + break; + } + + gate_closed = False; + key_ignore = True; + next_key = XEKeyIsClear; + break; + + default: + break; + } + } + } + else + { + next_key = XEKeyIsOther; + } + } + + /* + * If the gate to the server is open, + * and we are not ignoring a keyrelease, + * pass the event to the server for normal processing. + */ +#ifndef VECTORED_EVENTS + if ((gate_closed == False) && (key_ignore == False)) + { + if (XETrapEventProcVector[type] != cur_func) + { /* to protect us from infinite loops */ + (void)(*XETrapEventProcVector[type])(x_event,keybd,count); + } + else + { + (void)(*EventProcVector[type])(x_event,keybd,count); + } + } +#else /* VECTORED_EVENTS */ + if ((gate_closed == False) && (key_ignore == False)) + { /* send event on to server to be trapped again in XETrapEventVector */ + (void)(*keybd_process_inp)(x_event,keybd,count); + } + else + { + XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ + } +#endif + key_ignore = False; /* reset for next time around */ + return 0; +} + +/* + * DESCRIPTION: + * + * This routine intercepts input xEvents from the pointer device + * and passes the input event back to the server for normal processing. + * + * This routine is sensitive to whether input is being passed + * up to the server or not. This state is set by the keyboard + * input routine. + * + * + */ +#ifndef VECTORED_EVENTS +int XETrapPointer(xEvent *x_event, DevicePtr ptrdev, int count) +{ + XETrapEnv *penv; + ClientList *stc = &stats_clients; + int_function cur_func = XETrapPointer; + +#ifdef VERBOSE + if (count != 1L) + { /* We haven't coded for this situation yet! */ + ErrorF("Warning! Event count != 1 (%d)\n", count); + } +#endif + while (stc->next != NULL) + { /* increment appropriate stats bucket for each interested client */ + stc = stc->next; + penv = XETenv[stc->client->index]; + if (BitIsTrue(penv->cur.data_config_flags_event,x_event->u.u.type)) + { /* This particular client would like this particular stat */ + penv->stats->data.events[x_event->u.u.type]++; + } + } + XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ + /* + * If the gate to the server is open, + * pass the event up like nothing has happened. + */ + if (gate_closed == False) + { + if (XETrapEventProcVector[x_event->u.u.type] != cur_func) + { /* to protect us from infinite loops */ + (void)(*XETrapEventProcVector[x_event->u.u.type])(x_event,ptrdev, + count); + } + else + { + (void)(*EventProcVector[x_event->u.u.type])(x_event,ptrdev,count); + } + } + return 0; +} +#endif /* !VECTORED_EVENTS */ + + +/* + * DESCRIPTION: + * + * This routine determines whether it needs to send event data + * to the XTrap Client(s). If so, it timestamps it appropriately + * and writes out both the header and detail information. + * + */ +void XETrapStampAndMail(xEvent *x_event) +{ + XETrapDatum data; + register CARD32 size; + XETrapEnv *penv; + ClientList *ioc = &io_clients; + + /* Currently, we're intercepting core events *before* most + * of the event information's filled in. Specifically, the + * only fields that are valid at this level are: type, detail, + * time, rootX, rootY, and state. + */ + /* Loop through all clients wishing I/O */ + while (ioc->next != NULL) + { + ioc = ioc->next; + penv = XETenv[ioc->client->index]; + /* Do we have a valid fd? Do we care about this event? */ + if (BitIsTrue(penv->cur.data_config_flags_event, x_event->u.u.type)) + { + XETrapSetHeaderEvent(&(data.hdr)); + data.hdr.win_x = data.hdr.win_y = -1L; /* Invalidate req draw */ + data.hdr.screen = 0L; /* not till Events are vectored! */ + data.hdr.client = 0L; /* not till Events are vectored! */ + if (BitIsTrue(penv->cur.data_config_flags_data, + XETrapTimestamp)) + { + data.hdr.timestamp = GetTimeInMillis(); + } + size = data.hdr.count = XETrapMinPktSize; /* Always for evts */ + penv->last_input_time = x_event->u.keyButtonPointer.time; + /* Copy the event information into our local memory */ + (void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); + + if (penv->client->swapped) + { /* + * Notice that we don't swap the XTRAP EVENT information. + * This is done in the XETrapWriteXLib() routine. + */ + xEvent ToEvent; + (*EventSwapVector[data.u.event.u.u.type & 0177]) + (&data.u.event,&ToEvent); + (void)memcpy(&(data.u.event),&ToEvent,sizeof(ToEvent)); + sXETrapHeader(&(data.hdr)); /* swap the XTrap Header */ + } + /* From this point on, the contents of data is swapped and + * therefore we should not refer to it for information. + */ + if (XETrapWriteXLib(penv, (BYTE *)&data, size) != size) + { + SendErrorToClient(penv->client, + XETrap_avail.data.major_opcode, + x_event->u.u.type, 0L, XETrapErrorBase + BadIO); + } + } + } + return; +} +#ifdef VECTORED_EVENTS +int XETrapEventVector(ClientPtr client, xEvent *x_event) +{ + XETrapDatum data; + register CARD32 size; + XETrapEnv *penv; + ClientList *ioc = &io_clients; + + /* Loop through all clients wishing I/O */ + while (ioc->next != NULL) + { + ioc = ioc->next; + penv = XETenv[ioc->client->index]; + /* Do we care about this event? */ + if (BitIsTrue(penv->cur.data_config_flags_event, x_event->u.u.type)) + { + XETrapSetHeaderEvent(&(data.hdr)); + data.hdr.client = client->index; + data.hdr.win_x = data.hdr.win_y = -1L; /* Invalidate req draw */ + if ((current_screen < 0L) || ((x_event->u.u.type >= KeyPress) && + (x_event->u.u.type <= MotionNotify) && + (!x_event->u.keyButtonPointer.sameScreen))) + { /* we've moved/warped to another screen */ + WindowPtr root_win = GetCurrentRootWindow(); + current_screen = root_win->drawable.pScreen->myNum; + } + data.hdr.screen = current_screen; + if (BitIsTrue(penv->cur.data_config_flags_data, + XETrapTimestamp)) + { + data.hdr.timestamp = GetTimeInMillis(); + } + size = data.hdr.count = XETrapMinPktSize; /* Always for evts */ + penv->last_input_time = x_event->u.keyButtonPointer.time; + /* Copy the event information into our local memory */ + (void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); + + if (penv->client->swapped) + { + xEvent ToEvent; + (*EventSwapVector[data.u.event.u.u.type & 0177]) + (&data.u.event,&ToEvent); + (void)memcpy(&(data.u.event),&ToEvent,sizeof(ToEvent)); + sXETrapHeader(&(data.hdr)); /* swap the XTrap Header */ + } + /* From this point on, the contents of pdata is swapped and + * therefore we should not refer to it for information. + */ + if (XETrapWriteXLib(penv, (BYTE *)&data, size) != size) + { + SendErrorToClient(penv->client, + XETrap_avail.data.major_opcode, + x_event->u.u.type, 0L, XETrapErrorBase + BadIO); + } + } + } + return; +} +#endif /* VECTORED_EVENTS */ +void sReplyXTrapDispatch(ClientPtr client, int size, char *reply) +{ + register XETrapRepHdr *rep = (XETrapRepHdr *)reply; + + switch(rep->detail) + { + case XETrap_GetAvailable: + { + xXTrapGetAvailReply lrep; + (void)memcpy((char *)&lrep,reply,sizeof(lrep)); + sReplyXETrapGetAvail(client,size,(char *)&lrep); + } + break; + case XETrap_GetCurrent: + { + xXTrapGetCurReply lrep; + (void)memcpy((char *)&lrep,reply,sizeof(lrep)); + sReplyXETrapGetCur(client,size,(char *)&lrep); + } + break; + case XETrap_GetStatistics: + { + xXTrapGetStatsReply lrep; + (void)memcpy((char *)&lrep,reply,sizeof(lrep)); + sReplyXETrapGetStats(client,size,(char *)&lrep); + } + break; + case XETrap_GetVersion: + { + xXTrapGetVersReply lrep; + (void)memcpy((char *)&lrep,reply,sizeof(lrep)); + sReplyXETrapGetVers(client,size,(char *)&lrep); + } + break; + case XETrap_GetLastInpTime: + { + xXTrapGetLITimReply lrep; + (void)memcpy((char *)&lrep,reply,sizeof(lrep)); + sReplyXETrapGetLITim(client,size,(char *)&lrep); + } + break; + default: + SendErrorToClient(client,XETrap_avail.data.major_opcode, + rep->detail, 0L, BadImplementation); + break; + } + return; +} + +/* + * XLib communications routines + */ + +/* + * DESCRIPTION: + * + * This function performs the transport specific functions required + * for writing data back to an XTrap client over XLib. The trick is + * packaging the data into <=32 byte packets to conform to the sizeof + * an X Event. nbytes must be at least equal to XETrapMinPktSize + * + */ +int XETrapWriteXLib(XETrapEnv *penv, BYTE *data, CARD32 nbytes) +{ + CARD32 size, total = 0L; + xETrapDataEvent event; + + /* Initialize the detail field to show the beginning of a datum */ + event.detail = XETrapDataStart; + event.idx = 0L; + + /* This loop could be optimized by not calling Write until after all + * of the events are packaged. However, this would require memory + * games, and may not therefore be a win. + */ + while (nbytes > 0L) + { /* How many bytes can we send in this packet */ + size = (nbytes > sz_EventData) ? sz_EventData : nbytes; + + /* Initialize the event */ + event.type = XETrapData + XETrap_avail.data.event_base; + event.sequenceNumber = penv->client->sequence; + + /* Copy the data we are sending */ + (void)memcpy(event.data,data,size); + if (size < sz_EventData) + (void)memset(event.data+size,0L,sz_EventData-size); + data += size; + nbytes -= size; + total += size; + + /* Set the detail field to show the continuation of datum */ + if (total != size) + { /* this is not the first one */ + event.detail = (nbytes > 0) ? XETrapDataContinued : XETrapDataLast; + } + + /* Send this part to the client */ + WriteEventsToClient(penv->client, 1L, (xEvent *) &event); + event.idx++; /* Bump the index for the next event */ + } + return(total); +} + +/*----------------------------* + * Static Functions + *----------------------------*/ + +static void update_protocol(xXTrapGetReq *reqptr, ClientPtr client) +{ + XETrapEnv *penv = XETenv[client->index]; + /* update protocol number */ + switch (reqptr->protocol) + { + /* known acceptable protocols */ + case 31: + case XETrapProtocol: + penv->protocol = reqptr->protocol; + break; + /* all else */ + default: /* stay backwards compatible */ + penv->protocol = 31; + break; + } +} + +/* Swap 2 functions. This is a function instead of a macro to help to keep + * lint from complaining about mixed types. It seems to work, but I would + * probably classify this as a hack. + */ +static void _SwapProc( register int (**f1)(), register int (**f2)()) +{ + register int (*t1)() = *f1; + *f1 = *f2; + *f2 = t1; + + return; +} + +/* + * DESCRIPTION: + * + * This function swaps the byte order of fields within + * the XTrap Event Header. It assumes the data will be + * swapped by code in XETrapRequestVector(). + * + */ +static void sXETrapEvent(xETrapDataEvent *from, xETrapDataEvent *to) +{ + to->type = from->type; + to->detail = from->detail; + cpswaps(from->sequenceNumber,to->sequenceNumber); + cpswapl(from->idx,to->idx); + /* Assumes that the data's already been swapped by XETrapRequestVector */ + memcpy(to->data, from->data, SIZEOF(EventData)); +} + +/* + * DESCRIPTION: + * + * This function adds a node from an accelerator linked-list + * (either io_clients, stats_clients, or cmd_clients). + * + */ +static int add_accelerator_node(ClientPtr client, ClientList *accel) +{ + Bool found = False; + int status = Success; + + while (accel->next != NULL) + { + if (accel->client == client) + { + found = True; /* Client's already known */ + break; + } + else + { + accel = accel->next; + } + } + if (found == False) + { + if ((accel->next = (ClientList *)Xcalloc(sizeof(ClientList))) == NULL) + { + status = BadAlloc; + } + else + { /* fill in the node */ + accel = accel->next; + accel->next = NULL; + accel->client = client; + } + } + return(status); +} +/* + * DESCRIPTION: + * + * This function removes a node from an accelerator linked-list + * (either io_clients, stats_clients, or cmd_clients). + * + */ +static void remove_accelerator_node(ClientPtr client, ClientList *accel) +{ + while (accel->next != NULL) + { + if (accel->next->client == client) + { + ClientList *tmp = accel->next->next; + Xfree(accel->next); + accel->next = tmp; + break; + } + else + { + accel = accel->next; + } + } + + return; +} + +#ifdef COLOR_REPLIES +static void GetSendColorRep(ClientPtr client, xResourceReq *req) +{ /* adapted from ProcAllocColor() in dispatch.c */ + XETrapDatum data; + int retval; + XETrapEnv *penv = XETenv[client->index]; + xAllocColorReply *crep = (xAllocColorReply *)&(data.u.reply); + xAllocColorReq *creq = (xAllocColorReq *)req; + ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); + + /* Fill in the header fields */ + data.hdr.count = XETrapMinPktSize; /* The color replies are 32 bytes */ + XETrapSetHeaderReply(&(data.hdr)); + /* Hack alert: + * We need to pass the "reply" type in the header since replies don't + * contain the id's themselves. However, we're not changing the + * protocol to support this until we decide exactly how we want to + * do *all* replies (e.g. not just ColorReplies). So until then, stow + * the reply id in the screen field which wouldn't normally be used in + * this context. + */ + data.hdr.screen = req->reqType; + if (!pmap) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadColor); + return; + } + crep->red = creq->red; + crep->green = creq->green; + crep->blue = creq->blue; + crep->pixel = 0; + if ((retval = AllocColor(pmap, &(crep->red), &(crep->green), + &(crep->blue), &(crep->pixel), client->index)) != Success) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, retval); + return; + } + /* Swap data if necessary */ + if (client->swapped) + { + INT32 n; + swaps(&(crep->red), n); + swaps(&(crep->green), n); + swaps(&(crep->blue), n); + swapl(&(crep->pixel), n); + } + /* Send data to client */ + if (XETrapWriteXLib(penv, (BYTE *)&data, XETrapMinPktSize) + != XETrapMinPktSize) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, XETrapErrorBase + BadIO); + } +} + +static void GetSendNamedColorRep(ClientPtr client, xResourceReq *req) +{ /* adapted from ProcAllocNamedColor() in dispatch.c */ + XETrapDatum data; + XETrapEnv *penv = XETenv[client->index]; + int retval; + xAllocNamedColorReply *nrep = (xAllocNamedColorReply *)&(data.u.reply); + xAllocNamedColorReq *nreq = (xAllocNamedColorReq *)req; + ColormapPtr pcmp = (ColormapPtr )LookupIDByType(nreq->cmap, RT_COLORMAP); + + data.hdr.count = XETrapMinPktSize; /* The color replies are 32 bytes */ + XETrapSetHeaderReply(&(data.hdr)); + /* Hack alert: + * We need to pass the "reply" type in the header since replies don't + * contain the id's themselves. However, we're not changing the + * protocol to support this until we decide exactly how we want to + * do *all* replies (e.g. not just ColorReplies). So until then, stow + * the reply id in the screen field which wouldn't normally be used in + * this context. + */ + data.hdr.screen = req->reqType; + if (!pcmp) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadColor); + return; + } + if (!OsLookupColor(pcmp->pScreen->myNum, (char *)&nreq[1], + nreq->nbytes, &(nrep->exactRed), &(nrep->exactGreen), + &(nrep->exactBlue))) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadName); + return; + } + nrep->screenRed = nrep->exactRed; + nrep->screenGreen = nrep->exactGreen; + nrep->screenBlue = nrep->exactBlue; + nrep->pixel = 0; + if ((retval = AllocColor(pcmp, &(nrep->screenRed), + &(nrep->screenGreen), &(nrep->screenBlue), &(nrep->pixel), + client->index)) != Success) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, retval); + return; + } + /* Swap data if necessary */ + if (client->swapped) + { + INT32 n; + swapl(&(nrep->pixel), n); + swaps(&(nrep->exactRed), n); + swaps(&(nrep->exactGreen), n); + swaps(&(nrep->exactBlue), n); + swaps(&(nrep->screenRed), n); + swaps(&(nrep->screenGreen), n); + swaps(&(nrep->screenBlue), n); + } + + /* Send data to client */ + if (XETrapWriteXLib(penv, (BYTE *)&data, XETrapMinPktSize) + != XETrapMinPktSize) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, XETrapErrorBase + BadIO); + } +} + +static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req) +{ /* adapted from ProcAllocColorCells() in dispatch.c */ + int retval; + int npixels, nmasks; + unsigned long *ppixels, *pmasks; + long length; + XETrapDatum *data; + XETrapEnv *penv = XETenv[client->index]; + xAllocColorCellsReply *crep; + xAllocColorCellsReq *creq = (xAllocColorCellsReq *)req; + ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); + + if (!pmap) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadColor); + return; + } + npixels = creq->colors; + if (!npixels) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadValue); + return; + } + nmasks = creq->planes; + length = ((long)npixels + (long)nmasks) * sizeof(Pixel); + data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); + if (!data) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadAlloc); + return; + } + data->hdr.count = MIN(penv->cur.data_config_max_pkt_size, + sizeof(XETrapDatum)+length); + XETrapSetHeaderReply(&(data->hdr)); + data->hdr.screen = req->reqType; /* hack! but necessary */ + ppixels = (unsigned long *)((char *)data + sizeof(XETrapDatum)); + pmasks = ppixels + npixels; + if ((retval = AllocColorCells(client->index, pmap, npixels, + nmasks, (Bool)creq->contiguous, ppixels, pmasks)) != Success) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, retval); + DEALLOCATE_LOCAL(data); + return; + } + crep = (xAllocColorCellsReply *)&(data->u.reply); + crep->nPixels = npixels; + crep->nMasks = nmasks; + /* Swap data if necessary */ + if (client->swapped) + { + INT32 n, i, *ptr; + ptr=(INT32 *)ppixels; + swaps(&(crep->nPixels), n); + swaps(&(crep->nMasks), n); + for (i=0; ihdr.count) + != data->hdr.count) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, XETrapErrorBase + BadIO); + } + DEALLOCATE_LOCAL(data); +} +static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) +{ /* adapted from ProcAllocColorPlanes() in dispatch.c */ + int retval; + int npixels, nmasks; + unsigned long *ppixels, *pmasks; + long length; + XETrapDatum *data; + XETrapEnv *penv = XETenv[client->index]; + xAllocColorPlanesReply *crep; + xAllocColorPlanesReq *creq = (xAllocColorPlanesReq *)req; + ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); + + if (!pmap) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadColor); + return; + } + npixels = creq->colors; + if (!npixels) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadValue); + return; + } + length = (long)npixels * sizeof(Pixel); + data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); + if (!data) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, BadAlloc); + return; + } + data->hdr.count = MIN(penv->cur.data_config_max_pkt_size, + sizeof(XETrapDatum)+length); + XETrapSetHeaderReply(&(data->hdr)); + data->hdr.screen = req->reqType; /* hack! but necessary */ + ppixels = (unsigned long *)((char *)data + sizeof(XETrapDatum)); + crep = (xAllocColorPlanesReply *)&(data->u.reply); + if ((retval = AllocColorPlanes(client->index, pmap, npixels, + (int)creq->red, (int)creq->green, (int)creq->blue, + (int)creq->contiguous, ppixels, &(crep->redMask), &(crep->greenMask), + &(crep->blueMask))) != Success) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, retval); + DEALLOCATE_LOCAL(data); + return; + } + crep->nPixels = npixels; + /* Swap data if necessary */ + if (client->swapped) + { + INT32 n, i, *ptr; + ptr=(INT32 *)ppixels; + swaps(&(crep->nPixels), n); + swapl(&(crep->redMask), n); + swapl(&(crep->greenMask), n); + swapl(&(crep->blueMask), n); + for (i=0; ihdr.count) + != data->hdr.count) + { + SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, + req->reqType, 0L, XETrapErrorBase + BadIO); + } + DEALLOCATE_LOCAL(data); +} +#endif /* COLOR_REPLIES */ Index: xc/programs/Xserver/XTrap/xtrapdiswp.c diff -u /dev/null xc/programs/Xserver/XTrap/xtrapdiswp.c:1.1 --- /dev/null Fri Jan 18 15:24:16 2002 +++ xc/programs/Xserver/XTrap/xtrapdiswp.c Fri Nov 2 18:29:29 2001 @@ -0,0 +1,1006 @@ +/* $XFree86: xc/programs/Xserver/XTrap/xtrapdiswp.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */ +/**************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991, 1992 by + + Digital Equipment Corp., Maynard, MA + +X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +*****************************************************************************/ +/* + * ABSTRACT: + * + * This module is the device independent module responsible for all + * routines required for proper communication in a heterogeneous + * networking environment (i.e. client & server on different endian + * machines). The bulk of this module is patterned after X11/R4's + * server/dix/swapreq.c ; however, they infact swap fields + * in the exact opposite order since XTrap requires "unswapped" data + * to become "swapped" before sending it to a "swapped" client. + * + * CONTRIBUTORS: + * + * Ken Miller + * Marc Evans + * + * CHANGES: + * + * Robert Chesler - added client arg for X11R6 port in many spots + * + */ + +#include +#define NEED_REPLIES +#define NEED_EVENTS +#include +#include +#include +#include "input.h" /* Server DevicePtr definitions */ +#include "misc.h" +#include "dixstruct.h" +#ifdef PC +# include "extnsist.h" +#else +# include "extnsionst.h" /* Server ExtensionEntry definitions */ +#endif +# include "swapreq.h" /* Server SwapColorItem definition */ +#include +#include + +/* In-coming XTrap requests needing to be swapped to native format */ + +int sXETrapReset(xXTrapReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + return(XETrapReset(request,client)); +} + +int sXETrapGetAvailable(xXTrapGetReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + swaps(&(request->protocol),n); + return(XETrapGetAvailable(request,client)); +} + +int sXETrapConfig(xXTrapConfigReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + swaps(&(request->config_max_pkt_size),n); + return(XETrapConfig(request,client)); +} + +int sXETrapStartTrap(xXTrapReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + return(XETrapStartTrap(request,client)); +} + +int sXETrapStopTrap(xXTrapReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + return(XETrapStopTrap(request,client)); +} + +int sXETrapGetCurrent(xXTrapReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + return(XETrapGetCurrent(request,client)); +} + +int sXETrapGetStatistics(xXTrapReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + return(XETrapGetStatistics(request,client)); +} + +#ifndef _XINPUT +int sXETrapSimulateXEvent(xXTrapInputReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->input.x),n); + swaps(&(request->input.y),n); + return(XETrapSimulateXEvent(request,client)); +} +#endif + +int sXETrapGetVersion(xXTrapGetReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + swaps(&(request->protocol),n); + return(XETrapGetVersion(request,client)); +} + +int sXETrapGetLastInpTime(xXTrapReq *request, ClientPtr client) +{ + register char n; + swaps(&(request->length),n); + return(XETrapGetLastInpTime(request,client)); +} + + +/* Out-going XTrap replies needing to be swapped *from* native format */ + +void sReplyXETrapGetAvail(ClientPtr client, int size, char *reply) +{ + xXTrapGetAvailReply *rep = (xXTrapGetAvailReply *)reply; + register char n; + swaps(&(rep->hdr.sequenceNumber),n); + swapl(&(rep->hdr.length),n); + swapl(&(rep->data.pf_ident),n); + swaps(&(rep->data.xtrap_release),n); + swaps(&(rep->data.xtrap_version),n); + swaps(&(rep->data.xtrap_revision),n); + swaps(&(rep->data.max_pkt_size),n); + swapl(&(rep->data.major_opcode),n); + swapl(&(rep->data.event_base),n); + swaps(&(rep->data.cur_x),n); + swaps(&(rep->data.cur_y),n); + (void)WriteToClient(client,size,reply); + return; +} +void sReplyXETrapGetVers(ClientPtr client, int size, char *reply) +{ + xXTrapGetVersReply *rep = (xXTrapGetVersReply *)reply; + register char n; + swaps(&(rep->hdr.sequenceNumber),n); + swapl(&(rep->hdr.length),n); + swaps(&(rep->data.xtrap_release),n); + swaps(&(rep->data.xtrap_version),n); + swaps(&(rep->data.xtrap_revision),n); + (void)WriteToClient(client,size,reply); + return; +} +void sReplyXETrapGetLITim(ClientPtr client, int size, char *reply) +{ + xXTrapGetLITimReply *rep = (xXTrapGetLITimReply *)reply; + register char n; + swaps(&(rep->hdr.sequenceNumber),n); + swapl(&(rep->hdr.length),n); + swapl(&(rep->data_last_time),n); + (void)WriteToClient(client,size,reply); + return; +} +void sReplyXETrapGetCur(ClientPtr client, int size, char *reply) +{ + xXTrapGetCurReply *rep = (xXTrapGetCurReply *)reply; + register char n; + swaps(&(rep->hdr.sequenceNumber),n); + swapl(&(rep->hdr.length),n); + swaps(&(rep->data_config_max_pkt_size),n); + (void)WriteToClient(client,size,reply); + return; +} +void sReplyXETrapGetStats(ClientPtr client, int size, char *reply) +{ + xXTrapGetStatsReply *rep = (xXTrapGetStatsReply *)reply; + register char n; + register int i; + long *p; + + swaps(&(rep->sequenceNumber),n); + swapl(&(rep->length),n); + for (i=0L, p = (long *)rep->data.requests; i<256L; i++, p++) + { + swapl(p,n); + } + for (i=0L, p = (long *)rep->data.events; icount), n); + swapl(&(hdr->timestamp), n); + swaps(&(hdr->win_x), n); + swaps(&(hdr->win_y), n); + swaps(&(hdr->client), n); +} + + /* Out-going requests needing to be swapped *from* native format + * aka swapreq.c "equivalents" + */ + +/* The following is used for all requests that have + no fields to be swapped (except "length") */ +void XETSwSimpleReq(register xReq *data) +{ + register char n; + swaps(&(data->length), n); +} + +/* The following is used for all requests that have + only a single 32-bit field to be swapped, coming + right after the "length" field */ + +void XETSwResourceReq(register xResourceReq *data) +{ + register char n; + + swaps(&(data->length), n); + swapl(&(data->id), n); +} + +void XETSwCreateWindow(register xCreateWindowReq *data,ClientPtr client) +{ + register char n; + + swapl(&(data->wid), n); + swapl(&(data->parent), n); + swaps(&(data->x), n); + swaps(&(data->y), n); + swaps(&(data->width), n); + swaps(&(data->height), n); + swaps(&(data->borderWidth), n); + swaps(&(data->class), n); + swapl(&(data->visual), n); + swapl(&(data->mask), n); + SwapRestL(data); + swaps(&(data->length), n); +} + +void XETSwChangeWindowAttributes(register xChangeWindowAttributesReq *data, +ClientPtr client) +{ + register char n; + + swapl(&(data->window), n); + swapl(&(data->valueMask), n); + SwapRestL(data); + swaps(&(data->length), n); +} + +void XETSwReparentWindow(register xReparentWindowReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->window), n); + swapl(&(data->parent), n); + swaps(&(data->x), n); + swaps(&(data->y), n); +} + +void XETSwConfigureWindow(xConfigureWindowReq *data, ClientPtr client) +{ + register char n; + swapl(&(data->window), n); + swaps(&(data->mask), n); + SwapRestL(data); + swaps(&(data->length), n); +} + + +void XETSwInternAtom(register xInternAtomReq *data) +{ + register char n; + swaps(&(data->length), n); + swaps(&(data->nbytes), n); +} + +void XETSwChangeProperty(register xChangePropertyReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->window), n); + swapl(&(data->property), n); + swapl(&(data->type), n); + switch ( data->format ) { + case 8L : break; + case 16L: + SwapShorts((short *)(data + 1), data->nUnits); + break; + case 32L: + SwapLongs((CARD32 *)(data + 1), data->nUnits); + break; + } + swapl(&(data->nUnits), n); +} + +void XETSwDeleteProperty(register xDeletePropertyReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->window), n); + swapl(&(data->property), n); + +} +void XETSwGetProperty(register xGetPropertyReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->window), n); + swapl(&(data->property), n); + swapl(&(data->type), n); + swapl(&(data->longOffset), n); + swapl(&(data->longLength), n); +} + +void XETSwSetSelectionOwner(register xSetSelectionOwnerReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->window), n); + swapl(&(data->selection), n); + swapl(&(data->time), n); +} + +void XETSwConvertSelection(register xConvertSelectionReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->requestor), n); + swapl(&(data->selection), n); + swapl(&(data->target), n); + swapl(&(data->property), n); + swapl(&(data->time), n); +} + +void XETSwSendEvent(register xSendEventReq *data) +{ + register char n; + xEvent eventT; + void (*proc)(); + swapl(&(data->destination), n); + swapl(&(data->eventMask), n); + + /* Swap event */ + proc = EventSwapVector[data->event.u.u.type & 0177]; + if (!proc || (int (*)()) proc == (int (*)()) NotImplemented) + (*proc)(&(data->event), &eventT); + data->event = eventT; + swaps(&(data->length), n); +} + +void XETSwGrabPointer(register xGrabPointerReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->grabWindow), n); + swaps(&(data->eventMask), n); + swapl(&(data->confineTo), n); + swapl(&(data->cursor), n); + swapl(&(data->time), n); +} + +void XETSwGrabButton(register xGrabButtonReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->grabWindow), n); + swaps(&(data->eventMask), n); + swapl(&(data->confineTo), n); + swapl(&(data->cursor), n); + swaps(&(data->modifiers), n); +} + +void XETSwUngrabButton(register xUngrabButtonReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->grabWindow), n); + swaps(&(data->modifiers), n); +} + +void XETSwChangeActivePointerGrab(register xChangeActivePointerGrabReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cursor), n); + swapl(&(data->time), n); + swaps(&(data->eventMask), n); +} + +void XETSwGrabKeyboard(register xGrabKeyboardReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->grabWindow), n); + swapl(&(data->time), n); +} + +void XETSwGrabKey(register xGrabKeyReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->grabWindow), n); + swaps(&(data->modifiers), n); +} + +void XETSwUngrabKey(register xUngrabKeyReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->grabWindow), n); + swaps(&(data->modifiers), n); +} + +void XETSwGetMotionEvents(register xGetMotionEventsReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->window), n); + swapl(&(data->start), n); + swapl(&(data->stop), n); +} + +void XETSwTranslateCoords(register xTranslateCoordsReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->srcWid), n); + swapl(&(data->dstWid), n); + swaps(&(data->srcX), n); + swaps(&(data->srcY), n); +} + +void XETSwWarpPointer(register xWarpPointerReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->srcWid), n); + swapl(&(data->dstWid), n); + swaps(&(data->srcX), n); + swaps(&(data->srcY), n); + swaps(&(data->srcWidth), n); + swaps(&(data->srcHeight), n); + swaps(&(data->dstX), n); + swaps(&(data->dstY), n); +} + +void XETSwSetInputFocus(register xSetInputFocusReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->focus), n); + swapl(&(data->time), n); +} + +void XETSwOpenFont(register xOpenFontReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->fid), n); + swaps(&(data->nbytes), n); +} + +void XETSwListFonts(register xListFontsReq *data) +{ + register char n; + swaps(&(data->length), n); + swaps(&(data->maxNames), n); + swaps(&(data->nbytes), n); +} + +void XETSwListFontsWithInfo(register xListFontsWithInfoReq *data) +{ + register char n; + swaps(&(data->length), n); + swaps(&(data->maxNames), n); + swaps(&(data->nbytes), n); +} + +void XETSwSetFontPath(register xSetFontPathReq *data) +{ + register char n; + swaps(&(data->length), n); + swaps(&(data->nFonts), n); +} + +void XETSwCreatePixmap(register xCreatePixmapReq *data) +{ + register char n; + + swaps(&(data->length), n); + swapl(&(data->pid), n); + swapl(&(data->drawable), n); + swaps(&(data->width), n); + swaps(&(data->height), n); +} + +void XETSwCreateGC(register xCreateGCReq *data, ClientPtr client) +{ + register char n; + swapl(&(data->gc), n); + swapl(&(data->drawable), n); + swapl(&(data->mask), n); + SwapRestL(data); + swaps(&(data->length), n); +} + +void XETSwChangeGC(register xChangeGCReq *data, ClientPtr client) +{ + register char n; + swapl(&(data->gc), n); + swapl(&(data->mask), n); + SwapRestL(data); + swaps(&(data->length), n); +} + +void XETSwCopyGC(register xCopyGCReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->srcGC), n); + swapl(&(data->dstGC), n); + swapl(&(data->mask), n); +} + +void XETSwSetDashes(register xSetDashesReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->gc), n); + swaps(&(data->dashOffset), n); + swaps(&(data->nDashes), n); +} + +void XETSwSetClipRectangles(register xSetClipRectanglesReq *data, ClientPtr +client) +{ + register char n; + swapl(&(data->gc), n); + swaps(&(data->xOrigin), n); + swaps(&(data->yOrigin), n); + SwapRestS(data); + swaps(&(data->length), n); +} + +void XETSwClearToBackground(register xClearAreaReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->window), n); + swaps(&(data->x), n); + swaps(&(data->y), n); + swaps(&(data->width), n); + swaps(&(data->height), n); +} + +void XETSwCopyArea(register xCopyAreaReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->srcDrawable), n); + swapl(&(data->dstDrawable), n); + swapl(&(data->gc), n); + swaps(&(data->srcX), n); + swaps(&(data->srcY), n); + swaps(&(data->dstX), n); + swaps(&(data->dstY), n); + swaps(&(data->width), n); + swaps(&(data->height), n); +} + +void XETSwCopyPlane(register xCopyPlaneReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->srcDrawable), n); + swapl(&(data->dstDrawable), n); + swapl(&(data->gc), n); + swaps(&(data->srcX), n); + swaps(&(data->srcY), n); + swaps(&(data->dstX), n); + swaps(&(data->dstY), n); + swaps(&(data->width), n); + swaps(&(data->height), n); + swapl(&(data->bitPlane), n); +} + +/* The following routine is used for all Poly drawing requests + (except FillPoly, which uses a different request format) */ +void XETSwPoly(register xPolyPointReq *data, ClientPtr client) +{ + register char n; + + swapl(&(data->drawable), n); + swapl(&(data->gc), n); + SwapRestS(data); + swaps(&(data->length), n); +} + /* cannot use XETSwPoly for this one, because xFillPolyReq + * is longer than xPolyPointReq, and we don't want to swap + * the difference as shorts! + */ +void XETSwFillPoly(register xFillPolyReq *data, ClientPtr client) +{ + register char n; + + swapl(&(data->drawable), n); + swapl(&(data->gc), n); + SwapRestS(data); + swaps(&(data->length), n); +} + +void XETSwPutImage(register xPutImageReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->drawable), n); + swapl(&(data->gc), n); + swaps(&(data->width), n); + swaps(&(data->height), n); + swaps(&(data->dstX), n); + swaps(&(data->dstY), n); + /* Image should already be swapped */ +} + +void XETSwGetImage(register xGetImageReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->drawable), n); + swaps(&(data->x), n); + swaps(&(data->y), n); + swaps(&(data->width), n); + swaps(&(data->height), n); + swapl(&(data->planeMask), n); +} + +/* ProcPolyText used for both PolyText8 and PolyText16 */ + +void XETSwPolyText(register xPolyTextReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->drawable), n); + swapl(&(data->gc), n); + swaps(&(data->x), n); + swaps(&(data->y), n); +} + +/* ProcImageText used for both ImageText8 and ImageText16 */ + +void XETSwImageText(register xImageTextReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->drawable), n); + swapl(&(data->gc), n); + swaps(&(data->x), n); + swaps(&(data->y), n); +} + +void XETSwCreateColormap(register xCreateColormapReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->mid), n); + swapl(&(data->window), n); + swapl(&(data->visual), n); +} + + +void XETSwCopyColormapAndFree(register xCopyColormapAndFreeReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->mid), n); + swapl(&(data->srcCmap), n); + +} + +void XETSwAllocColor (register xAllocColorReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cmap), n); + swaps(&(data->red), n); + swaps(&(data->green), n); + swaps(&(data->blue), n); +} + +void XETSwAllocNamedColor (register xAllocNamedColorReq *data) +{ + register char n; + + swaps(&(data->length), n); + swapl(&(data->cmap), n); + swaps(&(data->nbytes), n); +} + +void XETSwAllocColorCells (register xAllocColorCellsReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cmap), n); + swaps(&(data->colors), n); + swaps(&(data->planes), n); +} + +void XETSwAllocColorPlanes(register xAllocColorPlanesReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cmap), n); + swaps(&(data->colors), n); + swaps(&(data->red), n); + swaps(&(data->green), n); + swaps(&(data->blue), n); +} + +void XETSwFreeColors (register xFreeColorsReq *data, ClientPtr +client) +{ + register char n; + swapl(&(data->cmap), n); + swapl(&(data->planeMask), n); + SwapRestL(data); + swaps(&(data->length), n); + +} + +void XETSwStoreColors (register xStoreColorsReq *data,ClientPtr +client) +{ + register char n; + unsigned long count; + xColorItem *pItem; + + swapl(&(data->cmap), n); + pItem = (xColorItem *) &(data[1]); + for(count = LengthRestB(data)/sizeof(xColorItem); count != 0; count--) + SwapColorItem(pItem++); + swaps(&(data->length), n); +} + +void XETSwStoreNamedColor (register xStoreNamedColorReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cmap), n); + swapl(&(data->pixel), n); + swaps(&(data->nbytes), n); +} + +void XETSwQueryColors(register xQueryColorsReq *data, ClientPtr client) +{ + register char n; + swapl(&(data->cmap), n); + SwapRestL(data); + swaps(&(data->length), n); +} + +void XETSwLookupColor(register xLookupColorReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cmap), n); + swaps(&(data->nbytes), n); +} + +void XETSwCreateCursor(register xCreateCursorReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cid), n); + swapl(&(data->source), n); + swapl(&(data->mask), n); + swaps(&(data->foreRed), n); + swaps(&(data->foreGreen), n); + swaps(&(data->foreBlue), n); + swaps(&(data->backRed), n); + swaps(&(data->backGreen), n); + swaps(&(data->backBlue), n); + swaps(&(data->x), n); + swaps(&(data->y), n); +} + +void XETSwCreateGlyphCursor(register xCreateGlyphCursorReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cid), n); + swapl(&(data->source), n); + swapl(&(data->mask), n); + swaps(&(data->sourceChar), n); + swaps(&(data->maskChar), n); + swaps(&(data->foreRed), n); + swaps(&(data->foreGreen), n); + swaps(&(data->foreBlue), n); + swaps(&(data->backRed), n); + swaps(&(data->backGreen), n); + swaps(&(data->backBlue), n); +} + + +void XETSwRecolorCursor(register xRecolorCursorReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->cursor), n); + swaps(&(data->foreRed), n); + swaps(&(data->foreGreen), n); + swaps(&(data->foreBlue), n); + swaps(&(data->backRed), n); + swaps(&(data->backGreen), n); + swaps(&(data->backBlue), n); +} + +void XETSwQueryBestSize (register xQueryBestSizeReq *data) +{ + register char n; + swaps(&(data->length), n); + swapl(&(data->drawable), n); + swaps(&(data->width), n); + swaps(&(data->height), n); + +} + +void XETSwQueryExtension (register xQueryExtensionReq *data) +{ + register char n; + swaps(&(data->length), n); + swaps(&(data->nbytes), n); +} + +void XETSwChangeKeyboardMapping (register xChangeKeyboardMappingReq *data) +{ + register char n; + register long *p; + register int i, count; + + swaps(&(data->length), n); + p = (long *)&(data[1]); + count = data->keyCodes * data->keySymsPerKeyCode; + for(i = 0; i < count; i++) + { + swapl(p, n); + p++; + } +} + + +void XETSwChangeKeyboardControl (register xChangeKeyboardControlReq *data, + ClientPtr client) +{ + register char n; + swapl(&(data->mask), n); + SwapRestL(data); + swaps(&(data->length), n); +} + +void XETSwChangePointerControl (register xChangePointerControlReq *data) +{ + register char n; + swaps(&(data->length), n); + swaps(&(data->accelNum), n); + swaps(&(data->accelDenum), n); + swaps(&(data->threshold), n); +} + + +void XETSwSetScreenSaver (register xSetScreenSaverReq *data) +{ + register char n; + swaps(&(data->length), n); + swaps(&(data->timeout), n); + swaps(&(data->interval), n); +} + +void XETSwChangeHosts(register xChangeHostsReq *data) +{ + register char n; + + swaps(&(data->length), n); + swaps(&(data->hostLength), n); + +} +void XETSwRotateProperties(register xRotatePropertiesReq *data, ClientPtr client) +{ + register char n; + swapl(&(data->window), n); + swaps(&(data->nAtoms), n); + swaps(&(data->nPositions), n); + SwapRestL(data); + swaps(&(data->length), n); +} + +/*ARGSUSED*/ +void XETSwNoOperation(xReq *data) +{ + /* noop -- don't do anything */ +} + +/* Byte swap a list of longs */ +#if defined vms && !defined MITR5 +#ifndef LINKED_IN +void SwapLongs ( register long *list, register unsigned long count) +{ + register char n; + + while (count >= 8) { + swapl(list+0, n); + swapl(list+1, n); + swapl(list+2, n); + swapl(list+3, n); + swapl(list+4, n); + swapl(list+5, n); + swapl(list+6, n); + swapl(list+7, n); + list += 8; + count -= 8; + } + if (count != 0) { + do { + swapl(list, n); + list++; + } while (--count != 0); + } +} + +/* Byte swap a list of shorts */ + +void SwapShorts (register short *list, register unsigned long count) +{ + register char n; + + while (count >= 16) { + swaps(list+0, n); + swaps(list+1, n); + swaps(list+2, n); + swaps(list+3, n); + swaps(list+4, n); + swaps(list+5, n); + swaps(list+6, n); + swaps(list+7, n); + swaps(list+8, n); + swaps(list+9, n); + swaps(list+10, n); + swaps(list+11, n); + swaps(list+12, n); + swaps(list+13, n); + swaps(list+14, n); + swaps(list+15, n); + list += 16; + count -= 16; + } + if (count != 0) { + do { + swaps(list, n); + list++; + } while (--count != 0); + } +} + +SwapColorItem(xColorItem *pItem) +{ + register char n; + swapl(&pItem->pixel, n); + swaps(&pItem->red, n); + swaps(&pItem->green, n); + swaps(&pItem->blue, n); +} +#endif /* LINKED_IN */ +#endif /* vms */ Index: xc/programs/Xserver/XTrap/xtrapditbl.c diff -u /dev/null xc/programs/Xserver/XTrap/xtrapditbl.c:1.1 --- /dev/null Fri Jan 18 15:24:16 2002 +++ xc/programs/Xserver/XTrap/xtrapditbl.c Fri Nov 2 18:29:29 2001 @@ -0,0 +1,238 @@ +/* $XFree86: xc/programs/Xserver/XTrap/xtrapditbl.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */ +/**************************************************************************** +Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +*****************************************************************************/ +/* + * ABSTRACT: + * + * This module is contains Vector tables used for swapping and general + * dispatch by the XTrap server extension. + * + * CONTRIBUTORS: + * + * Ken Miller + * Marc Evans + * + */ + +/*-----------------* + * Include Files * + *-----------------*/ +#include +#define NEED_REPLIES +#define NEED_EVENTS +#include +#include +#include +#include "input.h" /* Server DevicePtr definitions */ +#include "misc.h" +#include "dixstruct.h" +#ifdef PC +# include "extnsist.h" +#else +# include "extnsionst.h" /* Server ExtensionEntry definitions */ +#endif +#include +#include + +globaldef void_function XETSwProcVector[256L] = +{ + (void_function)ProcBadRequest, + XETSwCreateWindow, + XETSwChangeWindowAttributes, + XETSwResourceReq, /* GetWindowAttributes */ + XETSwResourceReq, /* DestroyWindow */ + XETSwResourceReq, /* 5 DestroySubwindows */ + XETSwResourceReq, /* XETSwChangeSaveSet, */ + XETSwReparentWindow, + XETSwResourceReq, /* MapWindow */ + XETSwResourceReq, /* MapSubwindows */ + XETSwResourceReq, /* 10 UnmapWindow */ + XETSwResourceReq, /* UnmapSubwindows */ + XETSwConfigureWindow, + XETSwResourceReq, /* XETSwCirculateWindow, */ + XETSwResourceReq, /* GetGeometry */ + XETSwResourceReq, /* 15 QueryTree */ + XETSwInternAtom, + XETSwResourceReq, /* XETSwGetAtomName, */ + XETSwChangeProperty, + XETSwDeleteProperty, + XETSwGetProperty, /* 20 */ + XETSwResourceReq, /* XETSwListProperties, */ + XETSwSetSelectionOwner, + XETSwResourceReq, /* XETSwGetSelectionOwner, */ + XETSwConvertSelection, + XETSwSendEvent, /* 25 */ + XETSwGrabPointer, + XETSwResourceReq, /* XETSwUngrabPointer, */ + XETSwGrabButton, + XETSwUngrabButton, + XETSwChangeActivePointerGrab, /* 30 */ + XETSwGrabKeyboard, + XETSwResourceReq, /* XETSwUngrabKeyboard, */ + XETSwGrabKey, + XETSwUngrabKey, + XETSwResourceReq, /* 35 XETSwAllowEvents, */ + XETSwSimpleReq, /* XETSwGrabServer, */ + XETSwSimpleReq, /* XETSwUngrabServer, */ + XETSwResourceReq, /* XETSwQueryPointer, */ + XETSwGetMotionEvents, + XETSwTranslateCoords, /*40 */ + XETSwWarpPointer, + XETSwSetInputFocus, + XETSwSimpleReq, /* XETSwGetInputFocus, */ + XETSwSimpleReq, /* QueryKeymap, */ + XETSwOpenFont, /* 45 */ + XETSwResourceReq, /* XETSwCloseFont, */ + XETSwResourceReq, /* XETSwQueryFont, */ + XETSwResourceReq, /* XETSwQueryTextExtents, */ + XETSwListFonts, + XETSwListFontsWithInfo, /* 50 */ + XETSwSetFontPath, + XETSwSimpleReq, /* GetFontPath, */ + XETSwCreatePixmap, + XETSwResourceReq, /* XETSwFreePixmap, */ + XETSwCreateGC, /* 55 */ + XETSwChangeGC, + XETSwCopyGC, + XETSwSetDashes, + XETSwSetClipRectangles, + XETSwResourceReq, /* 60 XETSwFreeGC, */ + XETSwClearToBackground, + XETSwCopyArea, + XETSwCopyPlane, + XETSwPoly, /* PolyPoint, */ + XETSwPoly, /* 65 PolyLine */ + XETSwPoly, /* PolySegment, */ + XETSwPoly, /* PolyRectangle, */ + XETSwPoly, /* PolyArc, */ + XETSwFillPoly, + XETSwPoly, /* 70 PolyFillRectangle */ + XETSwPoly, /* PolyFillArc, */ + XETSwPutImage, + XETSwGetImage, + XETSwPolyText, + XETSwPolyText, /* 75 */ + XETSwImageText, + XETSwImageText, + XETSwCreateColormap, + XETSwResourceReq, /* XETSwFreeColormap, */ + XETSwCopyColormapAndFree, /* 80 */ + XETSwResourceReq, /* XETSwInstallColormap, */ + XETSwResourceReq, /* XETSwUninstallColormap, */ + XETSwResourceReq, /* XETSwListInstalledColormaps, */ + XETSwAllocColor, + XETSwAllocNamedColor, /* 85 */ + XETSwAllocColorCells, + XETSwAllocColorPlanes, + XETSwFreeColors, + XETSwStoreColors, + XETSwStoreNamedColor, /* 90 */ + XETSwQueryColors, + XETSwLookupColor, + XETSwCreateCursor, + XETSwCreateGlyphCursor, + XETSwResourceReq, /* 95 XETSwFreeCursor, */ + XETSwRecolorCursor, + XETSwQueryBestSize, + XETSwQueryExtension, + XETSwSimpleReq, /* ListExtensions, */ + XETSwChangeKeyboardMapping, /* 100 */ + XETSwSimpleReq, /* GetKeyboardMapping, */ + XETSwChangeKeyboardControl, + XETSwSimpleReq, /* GetKeyboardControl, */ + XETSwSimpleReq, /* Bell, */ + XETSwChangePointerControl, /* 105 */ + XETSwSimpleReq, /* GetPointerControl, */ + XETSwSetScreenSaver, + XETSwSimpleReq, /* GetScreenSaver, */ + XETSwChangeHosts, + XETSwSimpleReq, /* 110 ListHosts, */ + XETSwSimpleReq, /* XETSwChangeAccessControl, */ + XETSwSimpleReq, /* XETSwChangeCloseDownMode, */ + XETSwResourceReq, /* XETSwKillClient, */ + XETSwRotateProperties, + XETSwSimpleReq, /* 115 ForceScreenSaver */ + XETSwSimpleReq, /* SetPointerMapping, */ + XETSwSimpleReq, /* GetPointerMapping, */ + XETSwSimpleReq, /* SetModifierMapping, */ + XETSwSimpleReq, /* GetModifierMapping, */ + NotImplemented, /* 120 */ + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, + NotImplemented, /* 125 */ + NotImplemented, + XETSwNoOperation +}; + +/* NOTE: This array must align with the values of the constants used + * as minor_opcode values in the request structure. Failure to do this + * could result in random code paths. + */ +globaldef int_function XETrapDispatchVector[10L] = +{ + XETrapReset, /* 0 XETrap_Reset */ + XETrapGetAvailable, /* 1 XETrap_GetAvailable */ + XETrapConfig, /* 2 XETrap_Config */ + XETrapStartTrap, /* 3 XETrap_StartTrap */ + XETrapStopTrap, /* 4 XETrap_StopTrap */ + XETrapGetCurrent, /* 5 XETrap_GetCurrent */ + XETrapGetStatistics, /* 6 XETrap_GetStatistics */ +#ifndef _XINPUT + XETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */ +#endif + XETrapGetVersion, /* 8 XETrap_GetVersion */ + XETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */ +}; + +/* NOTE: This array must align with the values of the constants used + * as minor_opcode values in the request structure. Failure to do this + * could result in random code paths. + */ +globaldef int_function XETSwDispatchVector[10L] = +{ + sXETrapReset, /* 0 XETrap_Reset */ + sXETrapGetAvailable, /* 1 XETrap_GetAvailable */ + sXETrapConfig, /* 2 XETrap_Config */ + sXETrapStartTrap, /* 3 XETrap_StartTrap */ + sXETrapStopTrap, /* 4 XETrap_StopTrap */ + sXETrapGetCurrent, /* 5 XETrap_GetCurrent */ + sXETrapGetStatistics, /* 6 XETrap_GetStatistics */ +#ifndef _XINPUT + sXETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */ +#endif + sXETrapGetVersion, /* 8 XETrap_GetVersion */ + sXETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */ +}; + +/* ProcVector shadow vector */ +globaldef int_function XETrapProcVector[256L] = {XETrapRequestVector}; +/* + * Events are faked as if they're vectored since that's + * the way it'll eventually be (X11 R5?). + */ +#ifndef VECTORED_EVENTS +globaldef int_function EventProcVector[XETrapCoreEvents] = {NULL}; +#endif +globaldef int_function XETrapEventProcVector[XETrapCoreEvents] = {NULL}; + + Index: xc/programs/Xserver/XTrap/module/Imakefile diff -u /dev/null xc/programs/Xserver/XTrap/module/Imakefile:1.1 --- /dev/null Fri Jan 18 15:24:16 2002 +++ xc/programs/Xserver/XTrap/module/Imakefile Fri Nov 2 18:29:29 2001 @@ -0,0 +1,24 @@ +XCOMM $XFree86: xc/programs/Xserver/XTrap/module/Imakefile,v 1.1 2001/11/02 23:29:29 dawes Exp $ + +#define IHaveModules +#include + + SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c xf86XTrapModule.c + OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o xf86XTrapModule.o + INCLUDES = -I.. -I../../include -I$(EXTINCSRC) -I$(XINCLUDESRC) + +LinkSourceFile(xf86XTrapModule.c,..) +LinkSourceFile(xtrapddmi.c,..) +LinkSourceFile(xtrapdi.c,..) +LinkSourceFile(xtrapdiswp.c,..) +LinkSourceFile(xtrapditbl.c,..) + +ModuleObjectRule() +LibraryModuleTarget(xtrap,$(OBJS)) + +InstallLibraryModule(xtrap,$(MODULEDIR),extensions) + +DependTarget() + +InstallDriverSDKLibraryModule(xtrap,$(DRIVERSDKMODULEDIR),extensions) + Index: xc/programs/Xserver/Xext/EVI.c diff -u xc/programs/Xserver/Xext/EVI.c:3.6 xc/programs/Xserver/Xext/EVI.c:3.9 --- xc/programs/Xserver/Xext/EVI.c:3.6 Wed Jan 17 17:13:14 2001 +++ xc/programs/Xserver/Xext/EVI.c Sat Oct 27 23:32:50 2001 @@ -21,6 +21,8 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.9 2001/10/28 03:32:50 tsi Exp $ */ + #include "X.h" #include "Xproto.h" #include "dixstruct.h" @@ -34,7 +36,7 @@ static int ProcEVIQueryVersion(ClientPtr client) { - REQUEST(xEVIQueryVersionReq); + /* REQUEST(xEVIQueryVersionReq); */ xEVIQueryVersionReply rep; register int n; REQUEST_SIZE_MATCH (xEVIQueryVersionReq); @@ -167,11 +169,11 @@ void EVIExtensionInit(void) { - ExtensionEntry *extEntry, *AddExtension(); - if (extEntry = AddExtension(EVINAME, 0, 0, + ExtensionEntry *extEntry; + if ((extEntry = AddExtension(EVINAME, 0, 0, ProcEVIDispatch, SProcEVIDispatch, - EVIResetProc, StandardMinorOpcode)) + EVIResetProc, StandardMinorOpcode))) { XEVIReqCode = (unsigned char)extEntry->base; eviPriv = eviDDXInit(); Index: xc/programs/Xserver/Xext/appgroup.c diff -u xc/programs/Xserver/Xext/appgroup.c:1.4 xc/programs/Xserver/Xext/appgroup.c:1.9 --- xc/programs/Xserver/Xext/appgroup.c:1.4 Wed Jan 17 17:13:14 2001 +++ xc/programs/Xserver/Xext/appgroup.c Mon Dec 17 15:52:25 2001 @@ -1,8 +1,12 @@ -/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.4 2001/01/17 22:13:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.9 2001/12/17 20:52:25 dawes Exp $ */ /* -Copyright 1996, 1998 The Open Group +Copyright 1996, 1998, 2001 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $Xorg: appgroup.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ +/* $Xorg: appgroup.c,v 1.6 2001/02/09 02:04:32 xorgcvs Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -71,9 +75,9 @@ static RESTYPE RT_APPGROUP; static AppGroupPtr appGrpList = NULL; -extern WindowPtr* WindowTable; extern xConnSetupPrefix connSetupPrefix; extern char* ConnectionInfo; +extern int connBlockScreenStart; static int XagAppGroupFree (what, id) @@ -118,7 +122,7 @@ NewClientInfoRec* pci = (NewClientInfoRec*) calldata; ClientPtr pClient = pci->client; AppGroupPtr pAppGrp; - XID authId; + XID authId = 0; if (!pClient->appgroup) { switch (pClient->clientState) { @@ -217,13 +221,13 @@ { ExtensionEntry* extEntry; - if (extEntry = AddExtension (XAGNAME, + if ((extEntry = AddExtension (XAGNAME, 0, XagNumberErrors, ProcXagDispatch, SProcXagDispatch, XagResetProc, - StandardMinorOpcode)) { + StandardMinorOpcode))) { XagReqCode = (unsigned char)extEntry->base; XagErrorBase = extEntry->errorBase; RT_APPGROUP = CreateNewResourceType (XagAppGroupFree); @@ -244,7 +248,7 @@ int ProcXagQueryVersion (client) register ClientPtr client; { - REQUEST (xXagQueryVersionReq); + /* REQUEST (xXagQueryVersionReq); */ xXagQueryVersionReply rep; register int n; @@ -273,7 +277,7 @@ { int i; - for (i = XagNsingleScreen; i <= XagNappGroupLeader; i++) { + for (i = 0; i <= XagNappGroupLeader; i++) { switch (attrib_mask & (1 << i)) { case XagSingleScreenMask: pAppGrp->single_screen = *attribs; @@ -306,8 +310,6 @@ void CreateConnectionInfo (pAppGrp) AppGroupPtr pAppGrp; { - extern int connBlockScreenStart; - xConnSetup *setup = (xConnSetup*) ConnectionInfo; xWindowRoot* rootp; xWindowRoot* roots[MAXSCREENS]; unsigned int rootlens[MAXSCREENS]; @@ -373,7 +375,6 @@ CARD32* attribs; { AppGroupPtr pAppGrp; - int i; pAppGrp = (AppGroupPtr) xalloc (sizeof(AppGroupRec)); if (pAppGrp) { @@ -499,9 +500,14 @@ pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client, (XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess); if (!pAppGrp) return XagBadAppGroup; + rep.type = X_Reply; + rep.length = 0; + rep.sequence_number = client->sequence; rep.default_root = pAppGrp->default_root; rep.root_visual = pAppGrp->root_visual; rep.default_colormap = pAppGrp->default_colormap; + rep.black_pixel = pAppGrp->black_pixel; + rep.white_pixel = pAppGrp->white_pixel; rep.single_screen = pAppGrp->single_screen; rep.app_group_leader = (pAppGrp->leader) ? 1 : 0; if (client->swapped) { @@ -510,6 +516,8 @@ swapl (&rep.default_root, n); swapl (&rep.root_visual, n); swapl (&rep.default_colormap, n); + swapl (&rep.black_pixel, n); + swapl (&rep.white_pixel, n); } WriteToClient (client, sizeof (xXagGetAttrReply), (char *)&rep); return client->noClientException; @@ -574,7 +582,7 @@ int ProcXagDestroyAssoc (client) register ClientPtr client; { - REQUEST (xXagDestroyAssocReq); + /* REQUEST (xXagDestroyAssocReq); */ REQUEST_SIZE_MATCH (xXagDestroyAssocReq); /* Macintosh, OS/2, and MS-Windows servers have some work to do here */ Index: xc/programs/Xserver/Xext/bigreq.c diff -u xc/programs/Xserver/Xext/bigreq.c:3.4 xc/programs/Xserver/Xext/bigreq.c:3.5 --- xc/programs/Xserver/Xext/bigreq.c:3.4 Wed Jan 17 17:13:14 2001 +++ xc/programs/Xserver/Xext/bigreq.c Fri Dec 14 14:58:48 2001 @@ -1,9 +1,13 @@ -/* $Xorg: bigreq.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ +/* $Xorg: bigreq.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.4 2001/01/17 22:13:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.5 2001/12/14 19:58:48 dawes Exp $ */ #define NEED_EVENTS #include "X.h" Index: xc/programs/Xserver/Xext/cup.c diff -u xc/programs/Xserver/Xext/cup.c:1.6 xc/programs/Xserver/Xext/cup.c:1.10 --- xc/programs/Xserver/Xext/cup.c:1.6 Wed Jan 17 17:13:14 2001 +++ xc/programs/Xserver/Xext/cup.c Fri Dec 14 14:58:48 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cup.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ +/* $Xorg: cup.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ /* Copyright 1997, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.6 2001/01/17 22:13:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.10 2001/12/14 19:58:48 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -32,6 +36,7 @@ #include "colormapst.h" #include "scrnintstr.h" #include "servermd.h" +#include "swapreq.h" #define _XCUP_SERVER_ #include "Xcupstr.h" #include "Xfuncproto.h" @@ -122,13 +127,13 @@ { ExtensionEntry* extEntry; - if (extEntry = AddExtension (XCUPNAME, + if ((extEntry = AddExtension (XCUPNAME, 0, XcupNumberErrors, ProcDispatch, SProcDispatch, ResetProc, - StandardMinorOpcode)) { + StandardMinorOpcode))) { ReqCode = (unsigned char)extEntry->base; ErrorBase = extEntry->errorBase; } @@ -147,7 +152,7 @@ int ProcQueryVersion (client) register ClientPtr client; { - REQUEST (xXcupQueryVersionReq); + /* REQUEST (xXcupQueryVersionReq); */ xXcupQueryVersionReply rep; register int n; @@ -215,7 +220,6 @@ int ncolors, n; xXcupStoreColorsReply rep; xColorItem* cptr; - Pixel pixel; if (!(pcmp->class & DynamicClass)) return BadMatch; @@ -303,7 +307,7 @@ } static -int SProcStoreColors (client) +int SProcXcupStoreColors (client) ClientPtr client; { register int n; @@ -332,7 +336,7 @@ case X_XcupGetReservedColormapEntries: return SProcGetReservedColormapEntries (client); case X_XcupStoreColors: - return SProcStoreColors (client); + return SProcXcupStoreColors (client); default: return BadRequest; } Index: xc/programs/Xserver/Xext/dpms.c diff -u xc/programs/Xserver/Xext/dpms.c:3.8 xc/programs/Xserver/Xext/dpms.c:3.9 --- xc/programs/Xserver/Xext/dpms.c:3.8 Wed Jan 17 17:13:14 2001 +++ xc/programs/Xserver/Xext/dpms.c Sat Oct 27 23:32:50 2001 @@ -33,7 +33,7 @@ * @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00 */ -/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.8 2001/01/17 22:13:14 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.9 2001/10/28 03:32:50 tsi Exp $ */ #include "X.h" #include "Xproto.h" @@ -91,7 +91,7 @@ ProcDPMSGetVersion(client) register ClientPtr client; { - REQUEST(xDPMSGetVersionReq); + /* REQUEST(xDPMSGetVersionReq); */ xDPMSGetVersionReply rep; register int n; @@ -114,7 +114,7 @@ static int ProcDPMSCapable(register ClientPtr client) { - REQUEST(xDPMSCapableReq); + /* REQUEST(xDPMSCapableReq); */ xDPMSCapableReply rep; register int n; @@ -136,7 +136,7 @@ ProcDPMSGetTimeouts(client) register ClientPtr client; { - REQUEST(xDPMSGetTimeoutsReq); + /* REQUEST(xDPMSGetTimeoutsReq); */ xDPMSGetTimeoutsReply rep; register int n; @@ -189,7 +189,7 @@ ProcDPMSEnable(client) register ClientPtr client; { - REQUEST(xDPMSEnableReq); + /* REQUEST(xDPMSEnableReq); */ REQUEST_SIZE_MATCH(xDPMSEnableReq); @@ -203,7 +203,7 @@ ProcDPMSDisable(client) register ClientPtr client; { - REQUEST(xDPMSDisableReq); + /* REQUEST(xDPMSDisableReq); */ REQUEST_SIZE_MATCH(xDPMSDisableReq); @@ -250,7 +250,7 @@ static int ProcDPMSInfo(register ClientPtr client) { - REQUEST(xDPMSInfoReq); + /* REQUEST(xDPMSInfoReq); */ xDPMSInfoReply rep; register int n; Index: xc/programs/Xserver/Xext/dpmsproc.h diff -u xc/programs/Xserver/Xext/dpmsproc.h:1.2 xc/programs/Xserver/Xext/dpmsproc.h:1.3 --- xc/programs/Xserver/Xext/dpmsproc.h:1.2 Sat Jul 25 04:48:37 1998 +++ xc/programs/Xserver/Xext/dpmsproc.h Sat Oct 27 23:32:50 2001 @@ -1,11 +1,12 @@ -/* $XFree86: xc/programs/Xserver/Xext/dpmsproc.h,v 1.2 1998/07/25 08:48:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/dpmsproc.h,v 1.3 2001/10/28 03:32:50 tsi Exp $ */ /* Prototypes for functions that the DDX must provide */ #ifndef _DPMSPROC_H_ #define _DPMSPROC_H_ -void DPMSSet(CARD16 level); +void DPMSSet(int level); +int DPMSGet(int *level); Bool DPMSSupported(void); #endif Index: xc/programs/Xserver/Xext/mbuf.c diff -u xc/programs/Xserver/Xext/mbuf.c:3.10 xc/programs/Xserver/Xext/mbuf.c:3.14 --- xc/programs/Xserver/Xext/mbuf.c:3.10 Wed Jan 17 17:13:15 2001 +++ xc/programs/Xserver/Xext/mbuf.c Fri Dec 14 14:58:49 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.10 2001/01/17 22:13:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.14 2001/12/14 19:58:49 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ ********************************************************/ -/* $Xorg: mbuf.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */ +/* $Xorg: mbuf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #include "X.h" @@ -36,6 +40,7 @@ #include "dixstruct.h" #include "resource.h" #include "opaque.h" +#include "sleepuntil.h" #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #include "multibufst.h" @@ -43,7 +48,7 @@ #include "xf86_ansic.h" #else #include -#if !defined(WIN32) && !defined(MINIX) && !defined(Lynx) +#if !defined(WIN32) && !defined(Lynx) #include #endif #endif @@ -1214,7 +1219,6 @@ if (pExposed) { RegionPtr pWinSize; - ScreenPtr pScreen = pWin->drawable.pScreen; pWinSize = CreateUnclippedWinSize (pWin); /* pExposed is window-relative, but at this point @@ -1222,13 +1226,13 @@ * window-relative so that region ops involving * pExposed and pWinSize behave sensibly. */ - REGION_TRANSLATE(pScreen, pWinSize, - -pWin->drawable.x, - -pWin->drawable.y); - REGION_INTERSECT(pScreen, pExposed, pExposed, pWinSize); - REGION_DESTROY(pScreen, pWinSize); + REGION_TRANSLATE(pWin->drawable.pScreen, pWinSize, + -pWin->drawable.x, -pWin->drawable.y); + REGION_INTERSECT(pWin->drawable.pScreen, pExposed, + pExposed, pWinSize); + REGION_DESTROY(pWin->drawable.pScreen, pWinSize); MultibufferExpose (pPrevMultibuffer, pExposed); - REGION_DESTROY(pScreen, pExposed); + REGION_DESTROY(pWin->drawable.pScreen, pExposed); } graphicsExpose = FALSE; DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE); Index: xc/programs/Xserver/Xext/mbufbf.c diff -u xc/programs/Xserver/Xext/mbufbf.c:3.2 xc/programs/Xserver/Xext/mbufbf.c:3.4 --- xc/programs/Xserver/Xext/mbufbf.c:3.2 Wed Jan 17 17:13:15 2001 +++ xc/programs/Xserver/Xext/mbufbf.c Fri Dec 14 14:58:49 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.2 2001/01/17 22:13:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ */ -/* $Xorg: mbufbf.c,v 1.3 2000/08/17 19:47:57 cpqbld Exp $ */ +/* $Xorg: mbufbf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -41,9 +45,7 @@ #include "gcstruct.h" #include "inputstr.h" #include "validate.h" -#ifndef MINIX #include -#endif #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #define _MULTIBUF_BUFFER_ Index: xc/programs/Xserver/Xext/mbufpx.c diff -u xc/programs/Xserver/Xext/mbufpx.c:3.2 xc/programs/Xserver/Xext/mbufpx.c:3.4 --- xc/programs/Xserver/Xext/mbufpx.c:3.2 Wed Jan 17 17:13:15 2001 +++ xc/programs/Xserver/Xext/mbufpx.c Fri Dec 14 14:58:49 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.2 2001/01/17 22:13:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ ********************************************************/ -/* $Xorg: mbufpx.c,v 1.3 2000/08/17 19:47:57 cpqbld Exp $ */ +/* $Xorg: mbufpx.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #include @@ -39,9 +43,7 @@ #include "regionstr.h" #include "gcstruct.h" #include "inputstr.h" -#ifndef MINIX #include -#endif #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #define _MULTIBUF_PIXMAP_ Index: xc/programs/Xserver/Xext/mitmisc.c diff -u xc/programs/Xserver/Xext/mitmisc.c:3.3 xc/programs/Xserver/Xext/mitmisc.c:3.4 --- xc/programs/Xserver/Xext/mitmisc.c:3.3 Wed Jan 17 17:13:15 2001 +++ xc/programs/Xserver/Xext/mitmisc.c Fri Dec 14 14:58:49 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.3 2001/01/17 22:13:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.4 2001/12/14 19:58:49 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ -/* $Xorg: mitmisc.c,v 1.3 2000/08/17 19:47:57 cpqbld Exp $ */ +/* $Xorg: mitmisc.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ #define NEED_EVENTS #include "X.h" Index: xc/programs/Xserver/Xext/panoramiX.c diff -u xc/programs/Xserver/Xext/panoramiX.c:3.25 xc/programs/Xserver/Xext/panoramiX.c:3.31 --- xc/programs/Xserver/Xext/panoramiX.c:3.25 Wed Jan 17 17:13:15 2001 +++ xc/programs/Xserver/Xext/panoramiX.c Sat Oct 27 23:32:51 2001 @@ -23,7 +23,7 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.25 2001/01/17 22:13:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.31 2001/10/28 03:32:51 tsi Exp $ */ #define NEED_REPLIES #include @@ -71,7 +71,7 @@ int PanoramiXNumVisuals; VisualPtr PanoramiXVisuals; /* We support at most 256 visuals */ -XID PanoramiXVisualTable[256][MAXSCREENS]; +XID *PanoramiXVisualTable = NULL; unsigned long XRC_DRAWABLE; unsigned long XRT_WINDOW; @@ -98,7 +98,6 @@ extern int SProcPanoramiXDispatch(); extern char *ConnectionInfo; extern int connBlockScreenStart; -extern int (* ProcVector[256]) (); extern xConnSetupPrefix connSetupPrefix; /* @@ -181,7 +180,8 @@ pScreen->CreateGC = pScreenPriv->CreateGC; REGION_UNINIT(pScreen, &XineramaScreenRegions[pScreen->myNum]); - REGION_UNINIT(pScreen, &PanoramiXScreenRegion); + if (pScreen->myNum == 0) + REGION_UNINIT(pScreen, &PanoramiXScreenRegion); xfree ((pointer) pScreenPriv); @@ -447,7 +447,7 @@ { int i; Bool success = FALSE; - ExtensionEntry *extEntry, *AddExtension(); + ExtensionEntry *extEntry; ScreenPtr pScreen; PanoramiXScreenPtr pScreenPriv; int w, h; @@ -622,16 +622,17 @@ #ifdef RENDER PanoramiXRenderInit (); #endif - return; } -extern + +extern Bool CreateConnectionBlock(void); + Bool PanoramiXCreateConnectionBlock(void) { int i, j, length; Bool disableBackingStore = FALSE; Bool disableSaveUnders = FALSE; int old_width, old_height; - int width_mult, height_mult; + float width_mult, height_mult; xWindowRoot *root; xConnSetup *setup; xVisualType *visual; @@ -728,8 +729,8 @@ root->pixWidth = PanoramiXPixWidth; root->pixHeight = PanoramiXPixHeight; - width_mult = root->pixWidth / old_width; - height_mult = root->pixHeight / old_height; + width_mult = (1.0 * root->pixWidth) / old_width; + height_mult = (1.0 * root->pixHeight) / old_height; root->mmWidth *= width_mult; root->mmHeight *= height_mult; @@ -748,16 +749,13 @@ extern void PanoramiXConsolidate(void) { - int i, j, k, l; + int i, j, k; VisualPtr pVisual, pVisual2; ScreenPtr pScreen, pScreen2; PanoramiXRes *root, *defmap; - /* initialize the visual table */ - for (i = 0; i < 256; i++) { - for (j = 0; j < MAXSCREENS - 1; j++) - PanoramiXVisualTable[i][j] = 0; - } + if(!PanoramiXVisualTable) + PanoramiXVisualTable = xcalloc(256 * MAXSCREENS, sizeof(XID)); pScreen = screenInfo.screens[0]; pVisual = pScreen->visuals; @@ -768,7 +766,7 @@ PanoramiXVisuals = xcalloc(pScreen->numVisuals,sizeof(VisualRec)); for (i = 0; i < pScreen->numVisuals; i++, pVisual++) { - PanoramiXVisualTable[pVisual->vid][0] = pVisual->vid; + PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = pVisual->vid; /* check if the visual exists on all screens */ for (j = 1; j < PanoramiXNumScreens; j++) { @@ -787,14 +785,20 @@ (pVisual->offsetBlue == pVisual2->offsetBlue)) { Bool AlreadyUsed = FALSE; +#if 0 +/* Open GL should do this reduction, not us */ for (l = 0; l < 256; l++) { - if (pVisual2->vid == PanoramiXVisualTable[l][j]) { + if (pVisual2->vid == + PanoramiXVisualTable[(l * MAXSCREENS) + j]) + { AlreadyUsed = TRUE; break; } } +#endif if (!AlreadyUsed) { - PanoramiXVisualTable[pVisual->vid][j] = pVisual2->vid; + PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = + pVisual2->vid; break; } } @@ -803,14 +807,14 @@ /* if it doesn't exist on all screens we can't use it */ for (j = 0; j < PanoramiXNumScreens; j++) { - if (!PanoramiXVisualTable[pVisual->vid][j]) { - PanoramiXVisualTable[pVisual->vid][0] = 0; + if (!PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j]) { + PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = 0; break; } } /* if it does, make sure it's in the list of supported depths and visuals */ - if(PanoramiXVisualTable[pVisual->vid][0]) { + if(PanoramiXVisualTable[pVisual->vid * MAXSCREENS]) { Bool GotIt = FALSE; PanoramiXVisuals[PanoramiXNumVisuals].vid = pVisual->vid; @@ -885,7 +889,7 @@ int ProcPanoramiXQueryVersion (ClientPtr client) { - REQUEST(xPanoramiXQueryVersionReq); + /* REQUEST(xPanoramiXQueryVersionReq); */ xPanoramiXQueryVersionReply rep; register int n; @@ -988,7 +992,7 @@ int ProcXineramaIsActive(ClientPtr client) { - REQUEST(xXineramaIsActiveReq); + /* REQUEST(xXineramaIsActiveReq); */ xXineramaIsActiveReply rep; REQUEST_SIZE_MATCH(xXineramaIsActiveReq); @@ -1011,7 +1015,7 @@ int ProcXineramaQueryScreens(ClientPtr client) { - REQUEST(xXineramaQueryScreensReq); + /* REQUEST(xXineramaQueryScreensReq); */ xXineramaQueryScreensReply rep; REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); @@ -1118,7 +1122,6 @@ BoxRec SrcBox, *pbox; int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth; DrawablePtr pDraw = pDrawables[0]; - ScreenPtr pScreen = pDraw->pScreen; char *ScratchMem = NULL; size = 0; Index: xc/programs/Xserver/Xext/panoramiXSwap.c diff -u xc/programs/Xserver/Xext/panoramiXSwap.c:3.7 xc/programs/Xserver/Xext/panoramiXSwap.c:3.8 --- xc/programs/Xserver/Xext/panoramiXSwap.c:3.7 Wed Jan 17 17:13:15 2001 +++ xc/programs/Xserver/Xext/panoramiXSwap.c Thu Aug 23 09:01:36 2001 @@ -23,7 +23,7 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.7 2001/01/17 22:13:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.8 2001/08/23 13:01:36 alanh Exp $ */ #include #include "X.h" @@ -53,11 +53,8 @@ * External references for data variables */ -extern WindowPtr *WindowTable; -extern int defaultBackingStore; extern char *ConnectionInfo; extern int connBlockScreenStart; -extern int (* ProcVector[256]) (); #if NeedFunctionPrototypes #define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr) Index: xc/programs/Xserver/Xext/panoramiXprocs.c diff -u xc/programs/Xserver/Xext/panoramiXprocs.c:3.28 xc/programs/Xserver/Xext/panoramiXprocs.c:3.31 --- xc/programs/Xserver/Xext/panoramiXprocs.c:3.28 Wed Jan 17 17:13:15 2001 +++ xc/programs/Xserver/Xext/panoramiXprocs.c Thu Aug 23 09:01:36 2001 @@ -26,7 +26,7 @@ /* Massively rewritten by Mark Vojkovich */ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.28 2001/01/17 22:13:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.31 2001/08/23 13:01:36 alanh Exp $ */ #include #include "X.h" @@ -52,27 +52,14 @@ CWDontPropagate | CWOverrideRedirect | CWCursor ) extern ScreenInfo *GlobalScrInfo; -extern WindowPtr *WindowTable; extern char *ConnectionInfo; extern int connBlockScreenStart; -extern WindowPtr *WindowTable; -extern void Swap32Write(); - -extern int (* InitialVector[3]) (); -extern int (* ProcVector[256]) (); -extern int (* SwappedProcVector[256]) (); extern int (* SavedProcVector[256]) (); extern void (* EventSwapVector[128]) (); -extern void (* ReplySwapVector[256]) (); extern void Swap32Write(), SLHostsExtend(), SQColorsExtend(), WriteSConnectionInfo(); extern void WriteSConnSetupPrefix(); -extern char *ClientAuthorized(); -extern Bool InsertFakeRequest(); -extern void ProcessWorkQueue(); - -extern char isItTimeToYield; /* Various of the DIX function interfaces were not designed to allow * the client->errorValue to be set on BadValue and other errors. @@ -81,11 +68,6 @@ */ extern XID clientErrorValue; /* XXX this is a kludge */ - - -extern int Ones(); - - int PanoramiXCreateWindow(ClientPtr client) { PanoramiXRes *parent, *newWin; @@ -93,8 +75,8 @@ PanoramiXRes *bordPix = NULL; PanoramiXRes *cmap = NULL; REQUEST(xCreateWindowReq); - int pback_offset, pbord_offset, cmap_offset; - int result, len, j; + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + int result = 0, len, j; int orig_x, orig_y; XID orig_visual, tmp; Bool parentIsRoot; @@ -173,7 +155,7 @@ if (cmap) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; if ( orig_visual != CopyFromParent ) - stuff->visual = PanoramiXVisualTable[orig_visual][j]; + stuff->visual = PanoramiXVisualTable[(orig_visual*MAXSCREENS) + j]; result = (*SavedProcVector[X_CreateWindow])(client); if(result != Success) break; } @@ -194,8 +176,8 @@ PanoramiXRes *bordPix = NULL; PanoramiXRes *cmap = NULL; REQUEST(xChangeWindowAttributesReq); - int pback_offset, pbord_offset, cmap_offset; - int result, len, j; + int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; + int result = 0, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); @@ -259,7 +241,7 @@ int PanoramiXDestroyWindow(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -284,7 +266,7 @@ int PanoramiXDestroySubwindows(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -309,7 +291,7 @@ int PanoramiXChangeSaveSet(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xChangeSaveSetReq); REQUEST_SIZE_MATCH(xChangeSaveSetReq); @@ -331,7 +313,7 @@ int PanoramiXReparentWindow(ClientPtr client) { PanoramiXRes *win, *parent; - int result, j; + int result = 0, j; int x, y; Bool parentIsRoot; REQUEST(xReparentWindowReq); @@ -367,7 +349,7 @@ int PanoramiXMapWindow(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -389,7 +371,7 @@ int PanoramiXMapSubwindows(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -411,7 +393,7 @@ int PanoramiXUnmapWindow(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -433,7 +415,7 @@ int PanoramiXUnmapSubwindows(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -457,7 +439,7 @@ PanoramiXRes *win; PanoramiXRes *sib = NULL; WindowPtr pWin; - int result, j, len, sib_offset, x, y; + int result = 0, j, len, sib_offset = 0, x = 0, y = 0; int x_offset = -1; int y_offset = -1; REQUEST(xConfigureWindowReq); @@ -519,7 +501,7 @@ int PanoramiXCirculateWindow(ClientPtr client) { PanoramiXRes *win; - int result, j; + int result = 0, j; REQUEST(xCirculateWindowReq); REQUEST_SIZE_MATCH(xCirculateWindowReq); @@ -627,7 +609,9 @@ */ && (!wBoundingShape(pWin) || POINT_IN_REGION(pWin->drawable.pScreen, - &pWin->borderSize, x, y, &box)) + wBoundingShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) #endif ) { @@ -651,7 +635,7 @@ int PanoramiXCreatePixmap(ClientPtr client) { PanoramiXRes *refDraw, *newPix; - int result, j; + int result = 0, j; REQUEST(xCreatePixmapReq); REQUEST_SIZE_MATCH(xCreatePixmapReq); @@ -689,7 +673,7 @@ int PanoramiXFreePixmap(ClientPtr client) { PanoramiXRes *pix; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -721,8 +705,8 @@ PanoramiXRes *tile = NULL; PanoramiXRes *clip = NULL; REQUEST(xCreateGCReq); - int tile_offset, stip_offset, clip_offset; - int result, len, j; + int tile_offset = 0, stip_offset = 0, clip_offset = 0; + int result = 0, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xCreateGCReq); @@ -797,8 +781,8 @@ PanoramiXRes *tile = NULL; PanoramiXRes *clip = NULL; REQUEST(xChangeGCReq); - int tile_offset, stip_offset, clip_offset; - int result, len, j; + int tile_offset = 0, stip_offset = 0, clip_offset = 0; + int result = 0, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xChangeGCReq); @@ -856,7 +840,7 @@ int PanoramiXCopyGC(ClientPtr client) { PanoramiXRes *srcGC, *dstGC; - int result, j; + int result = 0, j; REQUEST(xCopyGCReq); REQUEST_SIZE_MATCH(xCopyGCReq); @@ -883,7 +867,7 @@ int PanoramiXSetDashes(ClientPtr client) { PanoramiXRes *gc; - int result, j; + int result = 0, j; REQUEST(xSetDashesReq); REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); @@ -905,7 +889,7 @@ int PanoramiXSetClipRectangles(ClientPtr client) { PanoramiXRes *gc; - int result, j; + int result = 0, j; REQUEST(xSetClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); @@ -927,7 +911,7 @@ int PanoramiXFreeGC(ClientPtr client) { PanoramiXRes *gc; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -952,7 +936,7 @@ int PanoramiXClearToBackground(ClientPtr client) { PanoramiXRes *win; - int result, j, x, y; + int result = 0, j, x, y; Bool isRoot; REQUEST(xClearAreaReq); @@ -991,7 +975,7 @@ int PanoramiXCopyArea(ClientPtr client) { - int j, result, srcx, srcy, dstx, dsty; + int j, result = 0, srcx, srcy, dstx, dsty; PanoramiXRes *gc, *src, *dst; Bool srcIsRoot = FALSE; Bool dstIsRoot = FALSE; @@ -1067,8 +1051,8 @@ result = Success; } else { - DrawablePtr pDst, pSrc; - GCPtr pGC; + DrawablePtr pDst = NULL, pSrc = NULL; + GCPtr pGC = NULL; RegionPtr pRgn[MAXSCREENS]; FOR_NSCREENS_BACKWARD(j) { @@ -1143,8 +1127,8 @@ Bool srcIsRoot = FALSE; Bool dstIsRoot = FALSE; Bool srcShared, dstShared; - DrawablePtr psrcDraw, pdstDraw; - GCPtr pGC; + DrawablePtr psrcDraw, pdstDraw = NULL; + GCPtr pGC = NULL; RegionPtr pRgn[MAXSCREENS]; REQUEST(xCopyPlaneReq); @@ -1245,7 +1229,7 @@ int PanoramiXPolyPoint(ClientPtr client) { PanoramiXRes *gc, *draw; - int result, npoint, j; + int result = 0, npoint, j; xPoint *origPts; Bool isRoot; REQUEST(xPolyPointReq); @@ -1304,7 +1288,7 @@ int PanoramiXPolyLine(ClientPtr client) { PanoramiXRes *gc, *draw; - int result, npoint, j; + int result = 0, npoint, j; xPoint *origPts; Bool isRoot; REQUEST(xPolyLineReq); @@ -1362,7 +1346,7 @@ int PanoramiXPolySegment(ClientPtr client) { - int result, nsegs, i, j; + int result = 0, nsegs, i, j; PanoramiXRes *gc, *draw; xSegment *origSegs; Bool isRoot; @@ -1424,7 +1408,7 @@ int PanoramiXPolyRectangle(ClientPtr client) { - int result, nrects, i, j; + int result = 0, nrects, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xRectangle *origRecs; @@ -1486,7 +1470,7 @@ int PanoramiXPolyArc(ClientPtr client) { - int result, narcs, i, j; + int result = 0, narcs, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xArc *origArcs; @@ -1545,7 +1529,7 @@ int PanoramiXFillPoly(ClientPtr client) { - int result, count, j; + int result = 0, count, j; PanoramiXRes *gc, *draw; Bool isRoot; DDXPointPtr locPts; @@ -1605,7 +1589,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client) { - int result, things, i, j; + int result = 0, things, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xRectangle *origRects; @@ -1667,7 +1651,7 @@ { PanoramiXRes *gc, *draw; Bool isRoot; - int result, narcs, i, j; + int result = 0, narcs, i, j; xArc *origArcs; REQUEST(xPolyFillArcReq); @@ -1727,7 +1711,7 @@ { PanoramiXRes *gc, *draw; Bool isRoot; - int j, result, orig_x, orig_y; + int j, result = 0, orig_x, orig_y; REQUEST(xPutImageReq); REQUEST_AT_LEAST_SIZE(xPutImageReq); @@ -1771,7 +1755,7 @@ Bool isRoot; char *pBuf; int i, x, y, w, h, format; - Mask plane, planemask; + Mask plane = 0, planemask; int linesDone, nlines, linesPerBuf; long widthBytesLine, length; @@ -1919,7 +1903,7 @@ { PanoramiXRes *gc, *draw; Bool isRoot; - int result, j; + int result = 0, j; int orig_x, orig_y; REQUEST(xPolyTextReq); @@ -1959,7 +1943,7 @@ { PanoramiXRes *gc, *draw; Bool isRoot; - int result, j; + int result = 0, j; int orig_x, orig_y; REQUEST(xPolyTextReq); @@ -1997,7 +1981,7 @@ int PanoramiXImageText8(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *gc, *draw; Bool isRoot; int orig_x, orig_y; @@ -2037,7 +2021,7 @@ int PanoramiXImageText16(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *gc, *draw; Bool isRoot; int orig_x, orig_y; @@ -2079,7 +2063,7 @@ int PanoramiXCreateColormap(ClientPtr client) { PanoramiXRes *win, *newCmap; - int result, j, orig_visual; + int result = 0, j, orig_visual; REQUEST(xCreateColormapReq); REQUEST_SIZE_MATCH(xCreateColormapReq); @@ -2103,7 +2087,7 @@ FOR_NSCREENS_BACKWARD(j){ stuff->mid = newCmap->info[j].id; stuff->window = win->info[j].id; - stuff->visual = PanoramiXVisualTable[orig_visual][j]; + stuff->visual = PanoramiXVisualTable[(orig_visual * MAXSCREENS) + j]; result = (* SavedProcVector[X_CreateColormap])(client); if(result != Success) break; } @@ -2120,7 +2104,7 @@ int PanoramiXFreeColormap(ClientPtr client) { PanoramiXRes *cmap; - int result, j; + int result = 0, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -2148,7 +2132,7 @@ PanoramiXCopyColormapAndFree(ClientPtr client) { PanoramiXRes *cmap, *newCmap; - int result, j; + int result = 0, j; REQUEST(xCopyColormapAndFreeReq); REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); @@ -2187,7 +2171,7 @@ int PanoramiXInstallColormap(ClientPtr client) { REQUEST(xResourceReq); - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST_SIZE_MATCH(xResourceReq); @@ -2210,7 +2194,7 @@ int PanoramiXUninstallColormap(ClientPtr client) { REQUEST(xResourceReq); - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST_SIZE_MATCH(xResourceReq); @@ -2232,7 +2216,7 @@ int PanoramiXAllocColor(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST(xAllocColorReq); @@ -2255,7 +2239,7 @@ int PanoramiXAllocNamedColor(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST(xAllocNamedColorReq); @@ -2278,7 +2262,7 @@ int PanoramiXAllocColorCells(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST(xAllocColorCellsReq); @@ -2301,7 +2285,7 @@ int PanoramiXAllocColorPlanes(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST(xAllocColorPlanesReq); @@ -2325,7 +2309,7 @@ int PanoramiXFreeColors(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST(xFreeColorsReq); @@ -2348,7 +2332,7 @@ int PanoramiXStoreColors(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST(xStoreColorsReq); @@ -2371,7 +2355,7 @@ int PanoramiXStoreNamedColor(ClientPtr client) { - int result, j; + int result = 0, j; PanoramiXRes *cmap; REQUEST(xStoreNamedColorReq); Index: xc/programs/Xserver/Xext/panoramiXsrv.h diff -u xc/programs/Xserver/Xext/panoramiXsrv.h:1.7 xc/programs/Xserver/Xext/panoramiXsrv.h:1.9 --- xc/programs/Xserver/Xext/panoramiXsrv.h:1.7 Tue Jan 2 21:54:17 2001 +++ xc/programs/Xserver/Xext/panoramiXsrv.h Sat Aug 11 17:00:06 2001 @@ -1,14 +1,16 @@ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.7 2001/01/03 02:54:17 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.9 2001/08/11 21:00:06 mvojkovi Exp $ */ #ifndef _PANORAMIXSRV_H_ #define _PANORAMIXSRV_H_ +#include "panoramiX.h" + extern int PanoramiXNumScreens; extern PanoramiXData *panoramiXdataPtr; extern int PanoramiXPixWidth; extern int PanoramiXPixHeight; extern RegionRec PanoramiXScreenRegion; -extern XID PanoramiXVisualTable[256][MAXSCREENS]; +extern XID *PanoramiXVisualTable; extern void PanoramiXConsolidate(void); extern Bool PanoramiXCreateConnectionBlock(void); Index: xc/programs/Xserver/Xext/saver.c diff -u xc/programs/Xserver/Xext/saver.c:3.3 xc/programs/Xserver/Xext/saver.c:3.4 --- xc/programs/Xserver/Xext/saver.c:3.3 Wed Apr 5 14:13:29 2000 +++ xc/programs/Xserver/Xext/saver.c Thu Aug 23 09:01:36 2001 @@ -1,6 +1,6 @@ /* * $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $ - * $XFree86: xc/programs/Xserver/Xext/saver.c,v 3.3 2000/04/05 18:13:29 dawes Exp $ + * $XFree86: xc/programs/Xserver/Xext/saver.c,v 3.4 2001/08/23 13:01:36 alanh Exp $ * Copyright (c) 1992 X Consortium @@ -117,8 +117,6 @@ #endif ); -extern WindowPtr *WindowTable; - /* * each screen has a list of clients requesting * ScreenSaverNotify events. Each client has a resource @@ -539,7 +537,6 @@ WindowPtr pWin; int result; unsigned long mask; - extern int GrabInProgress; Colormap *installedMaps; int numInstalled; int i; @@ -678,7 +675,7 @@ int xstate; Bool force; { - int state; + int state = 0; Bool ret = FALSE; ScreenSaverScreenPrivatePtr pPriv; Index: xc/programs/Xserver/Xext/security.c diff -u xc/programs/Xserver/Xext/security.c:1.6 xc/programs/Xserver/Xext/security.c:1.10 --- xc/programs/Xserver/Xext/security.c:1.6 Wed Jan 17 17:13:16 2001 +++ xc/programs/Xserver/Xext/security.c Fri Dec 14 14:58:50 2001 @@ -1,9 +1,13 @@ -/* $Xorg: security.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ +/* $Xorg: security.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +24,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.6 2001/01/17 22:13:16 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.10 2001/12/14 19:58:50 dawes Exp $ */ #include "dixstruct.h" #include "extnsionst.h" @@ -79,9 +83,6 @@ #endif ); -extern int ProcBadRequest(); - - /* SecurityAudit * * Arguments: @@ -147,7 +148,7 @@ /* send revoke events */ - while (pEventClient = pAuth->eventClients) + while ((pEventClient = pAuth->eventClients)) { /* send revocation event event */ ClientPtr client = rClient(pEventClient); @@ -315,7 +316,7 @@ ProcSecurityQueryVersion(client) ClientPtr client; { - REQUEST(xSecurityQueryVersionReq); + /* REQUEST(xSecurityQueryVersionReq); */ xSecurityQueryVersionReply rep; /* paranoia: this "can't happen" because this extension is hidden @@ -392,7 +393,6 @@ Bool removeAuth = FALSE; /* if bailout, call RemoveAuthorization? */ SecurityAuthorizationPtr pAuth = NULL; /* auth we are creating */ int err; /* error to return from this function */ - int status; /* return value from os functions */ XID authId; /* authorization ID assigned by os layer */ xSecurityGenerateAuthorizationReply rep; /* reply struct */ unsigned int trustLevel; /* trust level of new auth */ @@ -785,7 +785,7 @@ Bool untrusted_got_event; Bool found_event_window; Mask eventmask; - int reqtype; + int reqtype = 0; /* trusted clients always allowed to do anything */ if (client->trustLevel == XSecurityClientTrusted) @@ -1441,7 +1441,6 @@ char action = SecurityDefaultAction; char readAction, writeAction, destroyAction; PropertyAccessPtr pacl, prev, cur; - ATOM atom; char *mustHaveProperty = NULL; char *mustHaveValue = NULL; Bool invalid; @@ -1973,7 +1972,7 @@ SecurityEventBase = extEntry->eventBase; EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] = - SwapSecurityAuthorizationRevokedEvent; + (EventSwapPtr)SwapSecurityAuthorizationRevokedEvent; /* initialize untrusted proc vectors */ Index: xc/programs/Xserver/Xext/shape.c diff -u xc/programs/Xserver/Xext/shape.c:3.13.2.1 xc/programs/Xserver/Xext/shape.c:3.16 --- xc/programs/Xserver/Xext/shape.c:3.13.2.1 Thu May 31 12:33:38 2001 +++ xc/programs/Xserver/Xext/shape.c Fri Dec 14 14:58:50 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.13.2.1 2001/05/31 16:33:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.16 2001/12/14 19:58:50 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ ********************************************************/ -/* $Xorg: shape.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ +/* $Xorg: shape.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #include "X.h" @@ -128,8 +132,6 @@ #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" -extern int PanoramiXNumScreens; -extern Bool noPanoramiXExtension; #endif static unsigned char ShapeReqCode = 0; @@ -393,7 +395,7 @@ { REQUEST(xShapeRectanglesReq); PanoramiXRes *win; - int j, result; + int j, result = 0; REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); @@ -482,7 +484,7 @@ { REQUEST(xShapeMaskReq); PanoramiXRes *win, *pmap; - int j, result; + int j, result = 0; REQUEST_SIZE_MATCH (xShapeMaskReq); @@ -597,7 +599,7 @@ { REQUEST(xShapeCombineReq); PanoramiXRes *win, *win2; - int j, result; + int j, result = 0; REQUEST_AT_LEAST_SIZE (xShapeCombineReq); @@ -666,7 +668,7 @@ { REQUEST(xShapeOffsetReq); PanoramiXRes *win; - int j, result; + int j, result = 0; REQUEST_AT_LEAST_SIZE (xShapeOffsetReq); Index: xc/programs/Xserver/Xext/shm.c diff -u xc/programs/Xserver/Xext/shm.c:3.29 xc/programs/Xserver/Xext/shm.c:3.33 --- xc/programs/Xserver/Xext/shm.c:3.29 Tue May 1 13:03:35 2001 +++ xc/programs/Xserver/Xext/shm.c Fri Dec 14 14:58:51 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.29 2001/05/01 17:03:35 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.33 2001/12/14 19:58:51 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ -/* $Xorg: shm.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ +/* $Xorg: shm.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ #include #ifndef Lynx @@ -33,6 +37,7 @@ #include #include #endif +#include #define NEED_REPLIES #define NEED_EVENTS #include "X.h" @@ -57,9 +62,6 @@ #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" -extern int PanoramiXNumScreens; -extern Bool noPanoramiXExtension; -extern PanoramiXData *panoramiXdataPtr; #endif typedef struct _ShmDesc { @@ -99,8 +101,6 @@ static DISPATCH_PROC(ProcShmDetach); static DISPATCH_PROC(ProcShmDispatch); static DISPATCH_PROC(ProcShmGetImage); -static DISPATCH_PROC(ProcShmGetImage); -static DISPATCH_PROC(ProcShmGetImage); static DISPATCH_PROC(ProcShmPutImage); static DISPATCH_PROC(ProcShmQueryVersion); static DISPATCH_PROC(SProcShmAttach); @@ -504,7 +504,7 @@ static int ProcPanoramiXShmPutImage(register ClientPtr client) { - int j, result, orig_x, orig_y; + int j, result = 0, orig_x, orig_y; PanoramiXRes *draw, *gc; Bool sendEvent, isRoot; @@ -549,8 +549,8 @@ xShmGetImageReply xgi; ShmDescPtr shmdesc; int i, x, y, w, h, format; - Mask plane, planemask; - long lenPer, length, widthBytesLine; + Mask plane = 0, planemask; + long lenPer = 0, length, widthBytesLine; Bool isRoot; REQUEST(xShmGetImageReq); @@ -659,8 +659,8 @@ ProcPanoramiXShmCreatePixmap(client) register ClientPtr client; { - ScreenPtr pScreen; - PixmapPtr pMap; + ScreenPtr pScreen = NULL; + PixmapPtr pMap = NULL; DrawablePtr pDraw; DepthPtr pDepth; int i, j, result; @@ -853,8 +853,8 @@ register ClientPtr client; { register DrawablePtr pDraw; - long lenPer, length; - Mask plane; + long lenPer = 0, length; + Mask plane = 0; xShmGetImageReply xgi; ShmDescPtr shmdesc; int n; Index: xc/programs/Xserver/Xext/sleepuntil.c diff -u xc/programs/Xserver/Xext/sleepuntil.c:3.2 xc/programs/Xserver/Xext/sleepuntil.c:3.5 --- xc/programs/Xserver/Xext/sleepuntil.c:3.2 Wed Jan 17 17:13:18 2001 +++ xc/programs/Xserver/Xext/sleepuntil.c Fri Dec 14 14:58:51 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: sleepuntil.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ + * $Xorg: sleepuntil.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ * Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,10 +25,11 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.2 2001/01/17 22:13:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.5 2001/12/14 19:58:51 dawes Exp $ */ /* dixsleep.c - implement millisecond timeouts for X clients */ +#include "sleepuntil.h" #include "X.h" #include "Xmd.h" #include "misc.h" @@ -179,7 +184,7 @@ pointer LastSelectMask; { SertafiedPtr pReq, pNext; - unsigned long newdelay, olddelay; + unsigned long delay; TimeStamp now; if (!pPending) @@ -204,8 +209,8 @@ pReq = pPending; if (!pReq) return; - newdelay = pReq->revive.milliseconds - now.milliseconds; - AdjustWaitForDelay (wt, newdelay); + delay = pReq->revive.milliseconds - now.milliseconds; + AdjustWaitForDelay (wt, delay); } static void Index: xc/programs/Xserver/Xext/sleepuntil.h diff -u /dev/null xc/programs/Xserver/Xext/sleepuntil.h:1.1 --- /dev/null Fri Jan 18 15:24:17 2002 +++ xc/programs/Xserver/Xext/sleepuntil.h Tue Jul 31 20:44:44 2001 @@ -0,0 +1,47 @@ +/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.h,v 1.1 2001/08/01 00:44:44 tsi Exp $ */ +/* + * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the XFree86 Project shall + * not be used in advertising or otherwise to promote the sale, use or other + * dealings in this Software without prior written authorization from the + * XFree86 Project. + */ + +#ifndef _SLEEPUNTIL_H_ +#define _SLEEPUNTIL_H_ 1 + +#include "dix.h" + +extern int ClientSleepUntil( +#if NeedFunctionPrototypes + ClientPtr client, + TimeStamp *revive, + void (*notifyFunc)( +#if NeedNestedPrototypes + ClientPtr /* client */, + pointer /* closure */ +#endif + ), + pointer Closure +#endif +); + +#endif Index: xc/programs/Xserver/Xext/sync.c diff -u xc/programs/Xserver/Xext/sync.c:3.8 xc/programs/Xserver/Xext/sync.c:3.11 --- xc/programs/Xserver/Xext/sync.c:3.8 Wed Jan 17 17:13:18 2001 +++ xc/programs/Xserver/Xext/sync.c Fri Dec 14 14:58:51 2001 @@ -1,9 +1,13 @@ -/* $Xorg: sync.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ +/* $Xorg: sync.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* Copyright 1991, 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.8 2001/01/17 22:13:18 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.11 2001/12/14 19:58:51 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -67,7 +71,7 @@ #include "xf86_ansic.h" #else #include -#if !defined(WIN32) && !defined(MINIX) && !defined(Lynx) +#if !defined(WIN32) && !defined(Lynx) #include #endif #endif @@ -320,7 +324,6 @@ static DISPATCH_PROC(ProcSyncGetPriority); static DISPATCH_PROC(ProcSyncInitialize); static DISPATCH_PROC(ProcSyncListSystemCounters); -static DISPATCH_PROC(ProcSyncListSystemCounters); static DISPATCH_PROC(ProcSyncQueryAlarm); static DISPATCH_PROC(ProcSyncQueryCounter); static DISPATCH_PROC(ProcSyncSetCounter); @@ -333,7 +336,6 @@ static DISPATCH_PROC(SProcSyncDestroyAlarm); static DISPATCH_PROC(SProcSyncDestroyCounter); static DISPATCH_PROC(SProcSyncDispatch); -static DISPATCH_PROC(SProcSyncDispatch); static DISPATCH_PROC(SProcSyncGetPriority); static DISPATCH_PROC(SProcSyncInitialize); static DISPATCH_PROC(SProcSyncListSystemCounters); @@ -1413,7 +1415,7 @@ { xSyncListSystemCountersReply rep; int i, len; - xSyncSystemCounter *list, *walklist; + xSyncSystemCounter *list = NULL, *walklist = NULL; REQUEST_SIZE_MATCH(xSyncListSystemCountersReq); Index: xc/programs/Xserver/Xext/xcmisc.c diff -u xc/programs/Xserver/Xext/xcmisc.c:3.4 xc/programs/Xserver/Xext/xcmisc.c:3.5 --- xc/programs/Xserver/Xext/xcmisc.c:3.4 Wed Jan 17 17:13:19 2001 +++ xc/programs/Xserver/Xext/xcmisc.c Fri Dec 14 14:58:51 2001 @@ -1,9 +1,13 @@ -/* $Xorg: xcmisc.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ +/* $Xorg: xcmisc.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.4 2001/01/17 22:13:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.5 2001/12/14 19:58:51 dawes Exp $ */ #define NEED_EVENTS #define NEED_REPLIES Index: xc/programs/Xserver/Xext/xf86bigfont.c diff -u xc/programs/Xserver/Xext/xf86bigfont.c:1.12 xc/programs/Xserver/Xext/xf86bigfont.c:1.13 --- xc/programs/Xserver/Xext/xf86bigfont.c:1.12 Tue May 1 13:29:59 2001 +++ xc/programs/Xserver/Xext/xf86bigfont.c Sat Jun 30 18:41:44 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.12 2001/05/01 17:29:59 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.13 2001/06/30 22:41:44 tsi Exp $ */ /* * BIGFONT extension for sharing font metrics between clients (if possible) * and for transmitting font metrics to clients in a compressed form. @@ -47,7 +47,7 @@ #ifdef SVR4 #include #endif -#if defined(ISC) || defined(__CYGWIN__) +#if defined(ISC) || defined(__CYGWIN__) || defined(SCO) || defined(SCO325) #include #include #endif Index: xc/programs/Xserver/Xext/xf86dga2.c diff -u xc/programs/Xserver/Xext/xf86dga2.c:1.16 xc/programs/Xserver/Xext/xf86dga2.c:1.17 --- xc/programs/Xserver/Xext/xf86dga2.c:1.16 Fri Jun 30 15:06:54 2000 +++ xc/programs/Xserver/Xext/xf86dga2.c Sat Oct 27 23:32:51 2001 @@ -3,7 +3,7 @@ Written by Mark Vojkovich */ -/* $XFree86: xc/programs/Xserver/Xext/xf86dga2.c,v 1.16 2000/06/30 19:06:54 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86dga2.c,v 1.17 2001/10/28 03:32:51 tsi Exp $ */ #define NEED_REPLIES @@ -12,6 +12,7 @@ #include "Xproto.h" #include "misc.h" #include "dixstruct.h" +#include "dixevents.h" #include "pixmapstr.h" #include "extnsionst.h" #include "colormapst.h" Index: xc/programs/Xserver/Xext/xf86misc.c diff -u xc/programs/Xserver/Xext/xf86misc.c:3.33 xc/programs/Xserver/Xext/xf86misc.c:3.35 --- xc/programs/Xserver/Xext/xf86misc.c:3.33 Tue May 2 20:43:42 2000 +++ xc/programs/Xserver/Xext/xf86misc.c Wed Aug 15 12:25:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.33 2000/05/03 00:43:42 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.35 2001/08/15 16:25:20 paulo Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc @@ -29,15 +29,11 @@ #include "../os/osdep.h" #include #ifndef USL -#ifndef ESIX #ifndef Lynx #include #else #include #endif -#else -#include -#endif #endif /* USL */ #endif @@ -59,6 +55,7 @@ static DISPATCH_PROC(ProcXF86MiscGetMouseSettings); static DISPATCH_PROC(ProcXF86MiscSetKbdSettings); static DISPATCH_PROC(ProcXF86MiscSetMouseSettings); +static DISPATCH_PROC(ProcXF86MiscSetGrabKeysState); #ifdef _XF86MISC_SAVER_COMPAT_ static DISPATCH_PROC(ProcXF86MiscGetSaver); static DISPATCH_PROC(ProcXF86MiscSetSaver); @@ -69,6 +66,7 @@ static DISPATCH_PROC(SProcXF86MiscGetMouseSettings); static DISPATCH_PROC(SProcXF86MiscSetKbdSettings); static DISPATCH_PROC(SProcXF86MiscSetMouseSettings); +static DISPATCH_PROC(SProcXF86MiscSetGrabKeysState); #ifdef _XF86MISC_SAVER_COMPAT_ static DISPATCH_PROC(SProcXF86MiscGetSaver); static DISPATCH_PROC(SProcXF86MiscSetSaver); @@ -381,6 +379,38 @@ } static int +ProcXF86MiscSetGrabKeysState(client) + register ClientPtr client; +{ + int n, status; + xXF86MiscSetGrabKeysStateReply rep; + REQUEST(xXF86MiscSetGrabKeysStateReq); + + DEBUG_P("XF86MiscSetGrabKeysState"); + + REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); + + if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) { + if (xf86GetVerbosity() > 1) + ErrorF("SetGrabKeysState - %s\n", + stuff->enable ? "enabled" : "disabled"); + } + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.status = status; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.status, n); + } + WriteToClient(client, SIZEOF(xXF86MiscSetGrabKeysStateReply), (char *)&rep); + + return (client->noClientException); +} + +static int ProcXF86MiscDispatch (client) register ClientPtr client; { @@ -408,6 +438,8 @@ return ProcXF86MiscSetMouseSettings(client); case X_XF86MiscSetKbdSettings: return ProcXF86MiscSetKbdSettings(client); + case X_XF86MiscSetGrabKeysState: + return ProcXF86MiscSetGrabKeysState(client); default: return BadRequest; } @@ -509,6 +541,18 @@ } static int +SProcXF86MiscSetGrabKeysState(client) + ClientPtr client; +{ + register int n; + REQUEST(xXF86MiscSetGrabKeysStateReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); + swaps(&stuff->enable, n); + return ProcXF86MiscSetGrabKeysState(client); +} + +static int SProcXF86MiscDispatch (client) register ClientPtr client; { @@ -536,6 +580,8 @@ return SProcXF86MiscSetMouseSettings(client); case X_XF86MiscSetKbdSettings: return SProcXF86MiscSetKbdSettings(client); + case X_XF86MiscSetGrabKeysState: + return SProcXF86MiscSetGrabKeysState(client); default: return BadRequest; } Index: xc/programs/Xserver/Xext/xf86miscproc.h diff -u xc/programs/Xserver/Xext/xf86miscproc.h:1.2 xc/programs/Xserver/Xext/xf86miscproc.h:1.3 --- xc/programs/Xserver/Xext/xf86miscproc.h:1.2 Mon Apr 17 12:29:48 2000 +++ xc/programs/Xserver/Xext/xf86miscproc.h Wed Aug 15 12:25:20 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.2 2000/04/17 16:29:48 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.3 2001/08/15 16:25:20 paulo Exp $ */ /* Prototypes for Pointer/Keyboard functions that the DDX must provide */ @@ -52,6 +52,7 @@ Bool MiscExtGetKbdSettings(pointer *kbd); int MiscExtGetKbdValue(pointer kbd, MiscExtKbdValType valtype); Bool MiscExtSetKbdValue(pointer kbd, MiscExtKbdValType valtype, int value); +int MiscExtSetGrabKeysState(ClientPtr client, int enable); pointer MiscExtCreateStruct(MiscExtStructType mse_or_kbd); void MiscExtDestroyStruct(pointer structure, MiscExtStructType mse_or_kbd); MiscExtReturn MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd); Index: xc/programs/Xserver/Xext/xf86vmode.c diff -u xc/programs/Xserver/Xext/xf86vmode.c:3.52 xc/programs/Xserver/Xext/xf86vmode.c:3.53 --- xc/programs/Xserver/Xext/xf86vmode.c:3.52 Sat May 5 20:51:19 2001 +++ xc/programs/Xserver/Xext/xf86vmode.c Mon Aug 6 16:51:03 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.52 2001/05/06 00:51:19 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.53 2001/08/06 20:51:03 dawes Exp $ */ /* @@ -221,7 +221,7 @@ VidModeErrorBase = extEntry->errorBase; #ifdef XF86VIDMODE_EVENTS XF86VidModeEventBase = extEntry->eventBase; - EventSwapVector[XF86VidModeEventBase] = SXF86VidModeNotifyEvent; + EventSwapVector[XF86VidModeEventBase] = (EventSwapPtr)SXF86VidModeNotifyEvent; #endif } } Index: xc/programs/Xserver/Xext/xprint.c diff -u xc/programs/Xserver/Xext/xprint.c:1.9 xc/programs/Xserver/Xext/xprint.c:1.13 --- xc/programs/Xserver/Xext/xprint.c:1.9 Wed Jan 17 17:13:19 2001 +++ xc/programs/Xserver/Xext/xprint.c Fri Nov 23 14:21:31 2001 @@ -1,4 +1,4 @@ -/* $Xorg: xprint.c,v 1.4 2000/08/17 19:47:59 cpqbld Exp $ */ +/* $Xorg: xprint.c,v 1.5 2001/03/05 20:42:26 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -64,8 +64,9 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.9 2001/01/17 22:13:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.13 2001/11/23 19:21:31 dawes Exp $ */ +#define _XP_PRINT_SERVER_ #include "X.h" #include "Xos.h" #define NEED_EVENTS @@ -78,18 +79,11 @@ #include "extnsionst.h" #include "dixstruct.h" #include "Xatom.h" -#define _XP_PRINT_SERVER_ #include "Print.h" #include "Printstr.h" -#undef _XP_PRINT_SERVER_ #include "../Xprint/DiPrint.h" #include "../Xprint/attributes.h" -extern WindowPtr *WindowTable; /* declared in dix:globals.c */ - -extern XpContextPtr XpContextOfClient(ClientPtr); -extern void XpRegisterInitFunc(ScreenPtr, char *, int (*)(struct _XpContext *)); - static void XpResetProc(ExtensionEntry *); static int ProcXpDispatch(ClientPtr); @@ -237,7 +231,6 @@ static int XpEventBase; static int XpErrorBase; static unsigned long XpGeneration = 0; -static int XpWindowPrivateIndex; static int XpClientPrivateIndex; /* Variables for the context private machinery. @@ -345,12 +338,13 @@ static void XpResetProc(ExtensionEntry *extEntry) { - int i; - /* * We can't free up the XpScreens recs here, because extensions are * closed before screens, and our CloseScreen function uses the XpScreens * recs. + + int i; + for(i = 0; i < MAXSCREENS; i++) { if(XpScreens[i] != (XpScreenPtr)NULL) @@ -392,6 +386,7 @@ return (*CloseScreen)(index, pScreen); } +#if 0 /* NOT USED */ static void FreeScreenEntry(XpScreenPtr pScreenEntry) { @@ -408,6 +403,7 @@ } xfree(pScreenEntry); } +#endif /* * XpRegisterInitFunc tells the print extension which screens @@ -569,7 +565,7 @@ static int ProcXpQueryVersion(ClientPtr client) { - REQUEST(xPrintQueryVersionReq); + /* REQUEST(xPrintQueryVersionReq); */ xPrintQueryVersionReply rep; register int n; long l; @@ -604,7 +600,7 @@ REQUEST(xPrintGetPrinterListReq); int totalSize; int numEntries; - XpDiListEntry **pList, *pEntry; + XpDiListEntry **pList; xPrintGetPrinterListReply *rep; int n, i, totalBytes; long l; @@ -686,7 +682,7 @@ static int ProcXpQueryScreens(ClientPtr client) { - REQUEST(xPrintQueryScreensReq); + /* REQUEST(xPrintQueryScreensReq); */ int i, numPrintScreens, totalSize; WINDOW *pWinId; xPrintQueryScreensReply *rep; @@ -850,8 +846,6 @@ REQUEST(xPrintGetImageResolutionReq); xPrintGetImageResolutionReply rep; XpContextPtr pContext; - Bool status; - int result; REQUEST_SIZE_MATCH(xPrintGetImageResolutionReq); @@ -895,7 +889,7 @@ static int ProcXpRehashPrinterList(ClientPtr client) { - REQUEST(xPrintRehashPrinterListReq); + /* REQUEST(xPrintRehashPrinterListReq); */ REQUEST_SIZE_MATCH(xPrintRehashPrinterListReq); @@ -935,9 +929,8 @@ REQUEST(xPrintCreateContextReq); XpScreenPtr pPrintScreen; WindowPtr pRoot; - char *printerName, *driverName; + char *driverName; XpContextPtr pContext; - XpClientPtr pNewPrintClient; int result = Success; XpDriverPtr pDriver; @@ -1097,12 +1090,10 @@ static int ProcXpGetContext(ClientPtr client) { - REQUEST(xPrintGetContextReq); + /* REQUEST(xPrintGetContextReq); */ xPrintGetContextReply rep; XpContextPtr pContext; - XpClientPtr pNewPrintClient; - int result = Success; register int n; register long l; @@ -1137,8 +1128,6 @@ REQUEST(xPrintDestroyContextReq); XpContextPtr pContext; - XpClientPtr pXpClient; - ClientPtr curClient; REQUEST_SIZE_MATCH(xPrintDestroyContextReq); @@ -1265,7 +1254,7 @@ static int XpFreeClient(pointer data, XID id) { - FreeXpClient((XpClientPtr)data, FALSE); + FreeXpClient((XpClientPtr)data, TRUE); return Success; } @@ -1367,7 +1356,6 @@ if(page->context != (XpContextPtr)NULL && page->context->state & PAGE_STARTED) { - XpScreenPtr pPrintScreen = XpScreens[page->context->screenNum]; if(page->context->funcs.EndPage != 0) result = page->context->funcs.EndPage(page->context, pWin); SendXpNotify(page->context, XPEndPageNotify, (int)TRUE); @@ -1546,7 +1534,6 @@ { REQUEST(xPrintEndJobReq); XpScreenPtr pPrintScreen; - WindowPtr pWin; int result = Success; XpContextPtr pContext; @@ -1658,7 +1645,6 @@ ProcXpStartDoc(ClientPtr client) { REQUEST(xPrintStartDocReq); - XpScreenPtr pPrintScreen; int result = Success; XpContextPtr pContext; XpStDocPtr c; @@ -1854,11 +1840,9 @@ ProcXpStartPage(ClientPtr client) { REQUEST(xPrintStartPageReq); - XpScreenPtr pPrintScreen; WindowPtr pWin; int result = Success; XpContextPtr pContext; - XpPagePtr pPage; XpStPagePtr c; REQUEST_SIZE_MATCH(xPrintStartPageReq); @@ -1954,7 +1938,6 @@ XpContextPtr pContext; DrawablePtr pDraw; int result = Success; - int len; unsigned totalSize; char *pData, *pDoc_fmt, *pOptions; @@ -2014,7 +1997,6 @@ { REQUEST(xPrintGetDocumentDataReq); xPrintGetDocumentDataReply rep; - XpScreenPtr pPrintScreen; XpContextPtr pContext; int result = Success; @@ -2356,8 +2338,7 @@ REQUEST(xPrintInputSelectedReq); xPrintInputSelectedReply rep; register int n; - long l, allMask; - WindowPtr pWin; + long l; XpClientPtr pXpClient; XpContextPtr pContext; @@ -2470,8 +2451,6 @@ XpContextPtr XpContextOfClient(ClientPtr client) { - XpContextPtr pContext; - return (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr; } @@ -2515,7 +2494,6 @@ SProcXpRehashPrinterList(ClientPtr client) { int i; - long n; REQUEST(xPrintRehashPrinterListReq); swaps(&stuff->length, i); @@ -2526,7 +2504,6 @@ SProcXpSetContext(ClientPtr client) { int i; - long n; REQUEST(xPrintSetContextReq); swaps(&stuff->length, i); Index: xc/programs/Xserver/Xext/xtest.c diff -u xc/programs/Xserver/Xext/xtest.c:3.4 xc/programs/Xserver/Xext/xtest.c:3.7 --- xc/programs/Xserver/Xext/xtest.c:3.4 Wed Jan 17 17:13:19 2001 +++ xc/programs/Xserver/Xext/xtest.c Fri Dec 14 14:58:51 2001 @@ -1,9 +1,13 @@ -/* $Xorg: xtest.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ +/* $Xorg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.4 2001/01/17 22:13:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.7 2001/12/14 19:58:51 dawes Exp $ */ #include "X.h" #define NEED_EVENTS @@ -35,6 +39,7 @@ #include "inputstr.h" #include "scrnintstr.h" #include "dixevents.h" +#include "sleepuntil.h" #define _XTEST_SERVER_ #include "XTest.h" #include "xteststr.h" @@ -161,12 +166,12 @@ int nev; int n; xEvent *ev; - DeviceIntPtr dev; + DeviceIntPtr dev = NULL; WindowPtr root; int type; #ifdef XINPUT Bool extension = FALSE; - deviceValuator *dv; + deviceValuator *dv = NULL; int base; int *values; #endif /* XINPUT */ Index: xc/programs/Xserver/Xext/xtest1dd.c diff -u xc/programs/Xserver/Xext/xtest1dd.c:3.3 xc/programs/Xserver/Xext/xtest1dd.c:3.5 --- xc/programs/Xserver/Xext/xtest1dd.c:3.3 Wed Jan 17 17:13:19 2001 +++ xc/programs/Xserver/Xext/xtest1dd.c Fri Dec 14 14:58:52 2001 @@ -1,4 +1,4 @@ -/* $Xorg: xtest1dd.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ +/* $Xorg: xtest1dd.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* * File: xtest1dd.c * @@ -11,7 +11,11 @@ Copyright 1986, 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,7 +52,7 @@ University of California. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.c,v 3.3 2001/01/17 22:13:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.c,v 3.5 2001/12/14 19:58:52 dawes Exp $ */ /*************************************************************** * include files @@ -849,7 +853,7 @@ * time delta from previous event */ CARD16 tchar; - char keytrans; + char keytrans = 0; /* * update the logical position of the locator if the physical position Index: xc/programs/Xserver/Xext/xtest1dd.h diff -u xc/programs/Xserver/Xext/xtest1dd.h:3.1 xc/programs/Xserver/Xext/xtest1dd.h:3.2 --- xc/programs/Xserver/Xext/xtest1dd.h:3.1 Sat Mar 13 22:21:30 1999 +++ xc/programs/Xserver/Xext/xtest1dd.h Tue Jul 31 20:44:44 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.h,v 3.1 1999/03/14 03:21:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xtest1dd.h,v 3.2 2001/08/01 00:44:44 tsi Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey @@ -120,6 +120,31 @@ return_input_array_size( #if NeedFunctionPrototypes ClientPtr /* client */ +#endif +); + +extern void XTestGenerateEvent( +#if NeedFunctionPrototypes + int /* dev_type */, + int /* keycode */, + int /* keystate */, + int /* mousex */, + int /* mousey */ +#endif +); + +extern void XTestGetPointerPos( +#if NeedFunctionPrototypes + short * /* fmousex */, + short * /* fmousey */ +#endif +); + +extern void XTestJumpPointer( +#if NeedFunctionPrototypes + int /* jx */, + int /* jy */, + int /* dev_type */ #endif ); Index: xc/programs/Xserver/Xext/xtest1di.c diff -u xc/programs/Xserver/Xext/xtest1di.c:3.2 xc/programs/Xserver/Xext/xtest1di.c:3.3 --- xc/programs/Xserver/Xext/xtest1di.c:3.2 Wed Jan 17 17:13:19 2001 +++ xc/programs/Xserver/Xext/xtest1di.c Fri Dec 14 14:58:52 2001 @@ -1,4 +1,4 @@ -/* $Xorg: xtest1di.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ +/* $Xorg: xtest1di.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* * File: xtest1di.c * @@ -11,7 +11,11 @@ Copyright 1986, 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,7 +52,7 @@ University of California. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest1di.c,v 3.2 2001/01/17 22:13:19 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xtest1di.c,v 3.3 2001/12/14 19:58:52 dawes Exp $ */ /***************************************************************************** * include files Index: xc/programs/Xserver/Xext/xvdisp.c diff -u xc/programs/Xserver/Xext/xvdisp.c:1.19 xc/programs/Xserver/Xext/xvdisp.c:1.25 --- xc/programs/Xserver/Xext/xvdisp.c:1.19 Wed Mar 7 14:37:51 2001 +++ xc/programs/Xserver/Xext/xvdisp.c Sun Nov 18 18:55:48 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.19 2001/03/07 19:37:51 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.25 2001/11/18 23:55:48 mvojkovi Exp $ */ /* ** File: @@ -349,7 +349,7 @@ ProcXvQueryExtension(ClientPtr client) { xvQueryExtensionReply rep; - REQUEST(xvQueryExtensionReq); + /* REQUEST(xvQueryExtensionReq); */ REQUEST_SIZE_MATCH(xvQueryExtensionReq); rep.type = X_Reply; @@ -1206,6 +1206,9 @@ } #endif +#ifdef XvMCExtension +XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id); +#endif static int ProcXvQueryImageAttributes(ClientPtr client) @@ -1234,6 +1237,11 @@ } } +#ifdef XvMCExtension + if(!pImage) + pImage = XvMCFindXvImage(pPort, stuff->id); +#endif + if(!pImage) return BadMatch; @@ -2109,6 +2117,8 @@ int i, j, k, l; XvXRTPort = CreateNewResourceType(XineramaDeleteResource); + + if(!xvsp0) return; for(i = 0; i < xvsp0->nAdaptors; i++) { refAdapt = xvsp0->pAdaptors + i; @@ -2152,7 +2162,7 @@ /* prefer overlay/overlay non-overlay/non-overlay pairing */ for(k = 0; k < xvsp->nAdaptors; k++) { pAdapt = xvsp->pAdaptors + k; - if((pAdapt->type & XvImageMask) & (pAdapt->nImages > 0)) { + if((pAdapt->type & XvImageMask) && (pAdapt->nImages > 0)) { hasOverlay = FALSE; for(l = 0; l < pAdapt->nAttributes; l++) { if(!strcmp(pAdapt->name, "XV_COLORKEY")) { @@ -2177,7 +2187,7 @@ for(k = 0; k < xvsp->nAdaptors; k++) { pAdapt = xvsp->pAdaptors + k; - if((pAdapt->type & XvImageMask) & (pAdapt->nImages > 0)) { + if((pAdapt->type & XvImageMask) && (pAdapt->nImages > 0)) { MatchingAdaptors[j] = pAdapt; break; } Index: xc/programs/Xserver/Xext/xvdix.h diff -u xc/programs/Xserver/Xext/xvdix.h:1.7 xc/programs/Xserver/Xext/xvdix.h:1.8 --- xc/programs/Xserver/Xext/xvdix.h:1.7 Mon May 7 17:37:51 2001 +++ xc/programs/Xserver/Xext/xvdix.h Wed Jul 25 11:05:00 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvdix.h,v 1.7 2001/05/07 21:37:51 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvdix.h,v 1.8 2001/07/25 15:05:00 dawes Exp $ */ #ifndef XVDIX_H #define XVDIX_H @@ -276,7 +276,7 @@ extern int XvdiUngrabPort( ClientPtr, XvPortPtr, Time); -#if defined(__STDC__) && !defined(UNIXCPP) +#if !defined(UNIXCPP) #define XVCALL(name) Xv##name Index: xc/programs/Xserver/Xext/xvmain.c diff -u xc/programs/Xserver/Xext/xvmain.c:1.11 xc/programs/Xserver/Xext/xvmain.c:1.13 --- xc/programs/Xserver/Xext/xvmain.c:1.11 Thu Sep 7 22:29:41 2000 +++ xc/programs/Xserver/Xext/xvmain.c Thu Aug 23 09:01:36 2001 @@ -21,7 +21,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvmain.c,v 1.11 2000/09/08 02:29:41 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvmain.c,v 1.13 2001/08/23 13:01:36 alanh Exp $ */ /* ** File: @@ -124,7 +124,6 @@ /* EXTERNAL */ -extern WindowPtr *WindowTable; extern XID clientErrorValue; static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *); @@ -195,9 +194,9 @@ XvErrorBase = extEntry->errorBase; EventSwapVector[XvEventBase+XvVideoNotify] = - WriteSwappedVideoNotifyEvent; + (EventSwapPtr)WriteSwappedVideoNotifyEvent; EventSwapVector[XvEventBase+XvPortNotify] = - WriteSwappedPortNotifyEvent; + (EventSwapPtr)WriteSwappedPortNotifyEvent; (void)MakeAtom(XvName, strlen(XvName), xTrue); Index: xc/programs/Xserver/Xext/xvmc.c diff -u xc/programs/Xserver/Xext/xvmc.c:1.4 xc/programs/Xserver/Xext/xvmc.c:1.7 --- xc/programs/Xserver/Xext/xvmc.c:1.4 Sat Apr 7 07:04:21 2001 +++ xc/programs/Xserver/Xext/xvmc.c Sun Nov 18 18:55:48 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/Xext/xvmc.c,v 1.4 2001/04/07 11:04:21 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/Xext/xvmc.c,v 1.7 2001/11/18 23:55:48 mvojkovi Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -97,7 +97,7 @@ ProcXvMCQueryVersion(ClientPtr client) { xvmcQueryVersionReply rep; - REQUEST(xvmcQueryVersionReq); + /* REQUEST(xvmcQueryVersionReq); */ REQUEST_SIZE_MATCH(xvmcQueryVersionReq); rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -113,7 +113,6 @@ ProcXvMCListSurfaceTypes(ClientPtr client) { XvPortPtr pPort; - ScreenPtr pScreen; int i; XvMCScreenPtr pScreenPriv; xvmcListSurfaceTypesReply rep; @@ -127,15 +126,17 @@ client->errorValue = stuff->port; return _XvBadPort; } - - pScreen = pPort->pAdaptor->pScreen; - pScreenPriv = XVMC_GET_PRIVATE(pScreen); - for(i = 0; i < pScreenPriv->num_adaptors; i++) { - if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { - adaptor = &(pScreenPriv->adaptors[i]); - break; - } + if(XvMCScreenIndex >= 0) { /* any adaptors at all */ + ScreenPtr pScreen = pPort->pAdaptor->pScreen; + if((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */ + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + } } rep.type = X_Reply; @@ -149,7 +150,6 @@ surface = adaptor->surfaces[i]; info.surface_type_id = surface->surface_type_id; info.chroma_format = surface->chroma_format; - info.color_description = surface->color_description; info.max_width = surface->max_width; info.max_height = surface->max_height; info.subpicture_max_width = surface->subpicture_max_width; @@ -184,8 +184,13 @@ } pScreen = pPort->pAdaptor->pScreen; - pScreenPriv = XVMC_GET_PRIVATE(pScreen); + if(XvMCScreenIndex < 0) /* no XvMC adaptors */ + return BadMatch; + + if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */ + return BadMatch; + for(i = 0; i < pScreenPriv->num_adaptors; i++) { if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { adaptor = &(pScreenPriv->adaptors[i]); @@ -194,7 +199,7 @@ } } - if(adapt_num < 0) /* that port doesn't support MC */ + if(adapt_num < 0) /* none this port */ return BadMatch; for(i = 0; i < adaptor->num_surfaces; i++) { @@ -462,7 +467,12 @@ } pScreen = pPort->pAdaptor->pScreen; - pScreenPriv = XVMC_GET_PRIVATE(pScreen); + + if(XvMCScreenIndex < 0) /* No XvMC adaptors */ + return BadMatch; + + if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) + return BadMatch; /* None this screen */ for(i = 0; i < pScreenPriv->num_adaptors; i++) { if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { @@ -629,4 +639,36 @@ pScreenPriv->adaptors = pAdapt; return Success; +} + +XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id) +{ + XvImagePtr pImage = NULL; + ScreenPtr pScreen = pPort->pAdaptor->pScreen; + XvMCScreenPtr pScreenPriv; + XvMCAdaptorPtr adaptor = NULL; + int i; + + if(XvMCScreenIndex < 0) return NULL; + + if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) + return NULL; + + for(i = 0; i < pScreenPriv->num_adaptors; i++) { + if(pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { + adaptor = &(pScreenPriv->adaptors[i]); + break; + } + } + + if(!adaptor) return NULL; + + for(i = 0; i < adaptor->num_subpictures; i++) { + if(adaptor->subpictures[i]->id == id) { + pImage = adaptor->subpictures[i]; + break; + } + } + + return pImage; } Index: xc/programs/Xserver/Xi/allowev.c diff -u xc/programs/Xserver/Xi/allowev.c:3.3 xc/programs/Xserver/Xi/allowev.c:3.4 --- xc/programs/Xserver/Xi/allowev.c:3.3 Wed Jan 17 17:13:23 2001 +++ xc/programs/Xserver/Xi/allowev.c Fri Dec 14 14:58:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: allowev.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: allowev.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/allowev.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/allowev.c,v 3.4 2001/12/14 19:58:54 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/chgdctl.c diff -u xc/programs/Xserver/Xi/chgdctl.c:3.3 xc/programs/Xserver/Xi/chgdctl.c:3.4 --- xc/programs/Xserver/Xi/chgdctl.c:3.3 Wed Jan 17 17:13:23 2001 +++ xc/programs/Xserver/Xi/chgdctl.c Fri Dec 14 14:58:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: chgdctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: chgdctl.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgdctl.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgdctl.c,v 3.4 2001/12/14 19:58:54 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/chgfctl.c diff -u xc/programs/Xserver/Xi/chgfctl.c:3.3 xc/programs/Xserver/Xi/chgfctl.c:3.4 --- xc/programs/Xserver/Xi/chgfctl.c:3.3 Wed Jan 17 17:13:23 2001 +++ xc/programs/Xserver/Xi/chgfctl.c Fri Dec 14 14:58:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: chgfctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: chgfctl.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgfctl.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgfctl.c,v 3.4 2001/12/14 19:58:54 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/chgkbd.c diff -u xc/programs/Xserver/Xi/chgkbd.c:3.4 xc/programs/Xserver/Xi/chgkbd.c:3.6 --- xc/programs/Xserver/Xi/chgkbd.c:3.4 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/chgkbd.c Fri Dec 14 14:58:54 2001 @@ -1,10 +1,14 @@ -/* $Xorg: chgkbd.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: chgkbd.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgkbd.c,v 3.4 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgkbd.c,v 3.6 2001/12/14 19:58:54 dawes Exp $ */ /*********************************************************************** * @@ -57,7 +61,7 @@ #include "XI.h" #include "XIproto.h" #include "XIstubs.h" - +#include "globals.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ @@ -104,7 +108,6 @@ KeyClassPtr k; xChangeKeyboardDeviceReply rep; changeDeviceNotify ev; - extern Bool Must_have_memory; REQUEST(xChangeKeyboardDeviceReq); REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); Index: xc/programs/Xserver/Xi/chgkmap.c diff -u xc/programs/Xserver/Xi/chgkmap.c:3.2 xc/programs/Xserver/Xi/chgkmap.c:3.3 --- xc/programs/Xserver/Xi/chgkmap.c:3.2 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/chgkmap.c Fri Dec 14 14:58:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: chgkmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: chgkmap.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgkmap.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgkmap.c,v 3.3 2001/12/14 19:58:55 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/chgprop.c diff -u xc/programs/Xserver/Xi/chgprop.c:3.2 xc/programs/Xserver/Xi/chgprop.c:3.3 --- xc/programs/Xserver/Xi/chgprop.c:3.2 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/chgprop.c Fri Dec 14 14:58:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: chgprop.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: chgprop.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgprop.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgprop.c,v 3.3 2001/12/14 19:58:55 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/chgptr.c diff -u xc/programs/Xserver/Xi/chgptr.c:3.5 xc/programs/Xserver/Xi/chgptr.c:3.7 --- xc/programs/Xserver/Xi/chgptr.c:3.5 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/chgptr.c Fri Dec 14 14:58:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: chgptr.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: chgptr.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/chgptr.c,v 3.5 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/chgptr.c,v 3.7 2001/12/14 19:58:55 dawes Exp $ */ /*********************************************************************** * @@ -68,9 +72,6 @@ #include "exglobals.h" #include "chgptr.h" - -extern ScreenInfo screenInfo; -extern WindowPtr *WindowTable; /*********************************************************************** * Index: xc/programs/Xserver/Xi/closedev.c diff -u xc/programs/Xserver/Xi/closedev.c:3.2 xc/programs/Xserver/Xi/closedev.c:3.4 --- xc/programs/Xserver/Xi/closedev.c:3.2 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/closedev.c Fri Dec 14 14:58:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: closedev.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: closedev.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/closedev.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/closedev.c,v 3.4 2001/12/14 19:58:55 dawes Exp $ */ /*********************************************************************** * @@ -64,9 +68,6 @@ #include "exglobals.h" #include "closedev.h" - -extern ScreenInfo screenInfo; -extern WindowPtr *WindowTable; /*********************************************************************** * Index: xc/programs/Xserver/Xi/devbell.c diff -u xc/programs/Xserver/Xi/devbell.c:3.2 xc/programs/Xserver/Xi/devbell.c:3.3 --- xc/programs/Xserver/Xi/devbell.c:3.2 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/devbell.c Fri Dec 14 14:58:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: devbell.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: devbell.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/devbell.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/devbell.c,v 3.3 2001/12/14 19:58:55 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/exevents.c diff -u xc/programs/Xserver/Xi/exevents.c:3.8 xc/programs/Xserver/Xi/exevents.c:3.10 --- xc/programs/Xserver/Xi/exevents.c:3.8 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/exevents.c Fri Dec 14 14:58:55 2001 @@ -1,9 +1,13 @@ -/* $Xorg: exevents.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: exevents.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -40,7 +44,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/exevents.c,v 3.8 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/exevents.c,v 3.10 2001/12/14 19:58:55 dawes Exp $ */ /******************************************************************** * @@ -118,7 +122,7 @@ register CARD16 mask; GrabPtr grab = other->grab; Bool deactivateDeviceGrab = FALSE; - int key, bit, rootX, rootY; + int key = 0, bit = 0, rootX, rootY; ButtonClassPtr b = other->button; KeyClassPtr k = other->key; ValuatorClassPtr v = other->valuator; @@ -1023,7 +1027,7 @@ KeyCode *inputMap; KeyClassPtr *k; { - KeyCode *map; + KeyCode *map = NULL; int inputMapLen; register int i; Index: xc/programs/Xserver/Xi/extinit.c diff -u xc/programs/Xserver/Xi/extinit.c:3.5 xc/programs/Xserver/Xi/extinit.c:3.6 --- xc/programs/Xserver/Xi/extinit.c:3.5 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/extinit.c Fri Dec 14 14:58:55 2001 @@ -1,10 +1,14 @@ -/* $Xorg: extinit.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: extinit.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/extinit.c,v 3.5 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/extinit.c,v 3.6 2001/12/14 19:58:55 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getbmap.c diff -u xc/programs/Xserver/Xi/getbmap.c:3.2 xc/programs/Xserver/Xi/getbmap.c:3.3 --- xc/programs/Xserver/Xi/getbmap.c:3.2 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/getbmap.c Fri Dec 14 14:58:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getbmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: getbmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getbmap.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getbmap.c,v 3.3 2001/12/14 19:58:56 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/getdctl.c diff -u xc/programs/Xserver/Xi/getdctl.c:3.3 xc/programs/Xserver/Xi/getdctl.c:3.4 --- xc/programs/Xserver/Xi/getdctl.c:3.3 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/getdctl.c Fri Dec 14 14:58:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getdctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: getdctl.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getdctl.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getdctl.c,v 3.4 2001/12/14 19:58:56 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getfctl.c diff -u xc/programs/Xserver/Xi/getfctl.c:3.3 xc/programs/Xserver/Xi/getfctl.c:3.4 --- xc/programs/Xserver/Xi/getfctl.c:3.3 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/getfctl.c Fri Dec 14 14:58:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getfctl.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: getfctl.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getfctl.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getfctl.c,v 3.4 2001/12/14 19:58:56 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getfocus.c diff -u xc/programs/Xserver/Xi/getfocus.c:3.2 xc/programs/Xserver/Xi/getfocus.c:3.3 --- xc/programs/Xserver/Xi/getfocus.c:3.2 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/getfocus.c Fri Dec 14 14:58:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getfocus.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: getfocus.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getfocus.c,v 3.2 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getfocus.c,v 3.3 2001/12/14 19:58:56 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/getkmap.c diff -u xc/programs/Xserver/Xi/getkmap.c:3.3 xc/programs/Xserver/Xi/getkmap.c:3.4 --- xc/programs/Xserver/Xi/getkmap.c:3.3 Wed Jan 17 17:13:24 2001 +++ xc/programs/Xserver/Xi/getkmap.c Fri Dec 14 14:58:56 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getkmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: getkmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getkmap.c,v 3.3 2001/01/17 22:13:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getkmap.c,v 3.4 2001/12/14 19:58:56 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getmmap.c diff -u xc/programs/Xserver/Xi/getmmap.c:3.2 xc/programs/Xserver/Xi/getmmap.c:3.3 --- xc/programs/Xserver/Xi/getmmap.c:3.2 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/getmmap.c Fri Dec 14 14:58:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getmmap.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: getmmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getmmap.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getmmap.c,v 3.3 2001/12/14 19:58:57 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/getprop.c diff -u xc/programs/Xserver/Xi/getprop.c:3.4 xc/programs/Xserver/Xi/getprop.c:3.6 --- xc/programs/Xserver/Xi/getprop.c:3.4 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/getprop.c Fri Dec 14 14:58:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getprop.c,v 1.3 2000/08/17 19:48:00 cpqbld Exp $ */ +/* $Xorg: getprop.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getprop.c,v 3.4 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getprop.c,v 3.6 2001/12/14 19:58:57 dawes Exp $ */ /*********************************************************************** * @@ -98,7 +102,7 @@ { CARD16 count = 0; int i; - XEventClass *buf, *tbuf; + XEventClass *buf = NULL, *tbuf; WindowPtr pWin; xGetDeviceDontPropagateListReply rep; OtherInputMasks *others; Index: xc/programs/Xserver/Xi/getselev.c diff -u xc/programs/Xserver/Xi/getselev.c:3.4 xc/programs/Xserver/Xi/getselev.c:3.6 --- xc/programs/Xserver/Xi/getselev.c:3.4 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/getselev.c Fri Dec 14 14:58:57 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/Xi/getselev.c,v 3.4 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getselev.c,v 3.6 2001/12/14 19:58:57 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ ********************************************************/ -/* $Xorg: getselev.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ +/* $Xorg: getselev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /*********************************************************************** * @@ -99,7 +103,7 @@ int total_length = 0; xGetSelectedExtensionEventsReply rep; WindowPtr pWin; - XEventClass *buf; + XEventClass *buf = NULL; XEventClass *tclient; XEventClass *aclient; OtherInputMasks *pOthers; Index: xc/programs/Xserver/Xi/getvers.c diff -u xc/programs/Xserver/Xi/getvers.c:3.2 xc/programs/Xserver/Xi/getvers.c:3.3 --- xc/programs/Xserver/Xi/getvers.c:3.2 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/getvers.c Fri Dec 14 14:58:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: getvers.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ +/* $Xorg: getvers.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/getvers.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/getvers.c,v 3.3 2001/12/14 19:58:57 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/grabdev.c diff -u xc/programs/Xserver/Xi/grabdev.c:3.2 xc/programs/Xserver/Xi/grabdev.c:3.3 --- xc/programs/Xserver/Xi/grabdev.c:3.2 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/grabdev.c Fri Dec 14 14:58:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: grabdev.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ +/* $Xorg: grabdev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdev.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/grabdev.c,v 3.3 2001/12/14 19:58:57 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/grabdevb.c diff -u xc/programs/Xserver/Xi/grabdevb.c:3.2 xc/programs/Xserver/Xi/grabdevb.c:3.3 --- xc/programs/Xserver/Xi/grabdevb.c:3.2 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/grabdevb.c Fri Dec 14 14:58:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: grabdevb.c,v 1.3 2000/08/17 19:48:01 cpqbld Exp $ */ +/* $Xorg: grabdevb.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdevb.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/grabdevb.c,v 3.3 2001/12/14 19:58:57 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/grabdevk.c diff -u xc/programs/Xserver/Xi/grabdevk.c:3.2 xc/programs/Xserver/Xi/grabdevk.c:3.3 --- xc/programs/Xserver/Xi/grabdevk.c:3.2 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/grabdevk.c Fri Dec 14 14:58:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: grabdevk.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: grabdevk.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/grabdevk.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/grabdevk.c,v 3.3 2001/12/14 19:58:57 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/gtmotion.c diff -u xc/programs/Xserver/Xi/gtmotion.c:3.5 xc/programs/Xserver/Xi/gtmotion.c:3.7 --- xc/programs/Xserver/Xi/gtmotion.c:3.5 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/gtmotion.c Fri Dec 14 14:58:57 2001 @@ -1,10 +1,14 @@ -/* $Xorg: gtmotion.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: gtmotion.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/gtmotion.c,v 3.5 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/gtmotion.c,v 3.7 2001/12/14 19:58:57 dawes Exp $ */ /*********************************************************************** * @@ -96,7 +100,7 @@ INT32 *coords = NULL, *bufptr; xGetDeviceMotionEventsReply rep; unsigned long i; - int num_events, axes, size, tsize; + int num_events, axes, size = 0, tsize; unsigned long nEvents; DeviceIntPtr dev; TimeStamp start, stop; Index: xc/programs/Xserver/Xi/listdev.c diff -u xc/programs/Xserver/Xi/listdev.c:3.3 xc/programs/Xserver/Xi/listdev.c:3.4 --- xc/programs/Xserver/Xi/listdev.c:3.3 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/listdev.c Fri Dec 14 14:58:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: listdev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: listdev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/listdev.c,v 3.3 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/listdev.c,v 3.4 2001/12/14 19:58:58 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/opendev.c diff -u xc/programs/Xserver/Xi/opendev.c:3.2 xc/programs/Xserver/Xi/opendev.c:3.3 --- xc/programs/Xserver/Xi/opendev.c:3.2 Wed Jan 17 17:13:25 2001 +++ xc/programs/Xserver/Xi/opendev.c Fri Dec 14 14:58:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: opendev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: opendev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/opendev.c,v 3.2 2001/01/17 22:13:25 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/opendev.c,v 3.3 2001/12/14 19:58:58 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/queryst.c diff -u xc/programs/Xserver/Xi/queryst.c:3.4 xc/programs/Xserver/Xi/queryst.c:3.5 --- xc/programs/Xserver/Xi/queryst.c:3.4 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/queryst.c Fri Dec 14 14:58:58 2001 @@ -1,9 +1,13 @@ -/* $Xorg: queryst.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: queryst.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /* Copyright 1998, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xi/queryst.c,v 3.4 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/queryst.c,v 3.5 2001/12/14 19:58:58 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/selectev.c diff -u xc/programs/Xserver/Xi/selectev.c:3.2 xc/programs/Xserver/Xi/selectev.c:3.3 --- xc/programs/Xserver/Xi/selectev.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/selectev.c Fri Dec 14 14:58:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: selectev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: selectev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/selectev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/selectev.c,v 3.3 2001/12/14 19:58:58 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/sendexev.c diff -u xc/programs/Xserver/Xi/sendexev.c:3.2 xc/programs/Xserver/Xi/sendexev.c:3.3 --- xc/programs/Xserver/Xi/sendexev.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/sendexev.c Fri Dec 14 14:58:58 2001 @@ -1,10 +1,14 @@ -/* $Xorg: sendexev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: sendexev.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/sendexev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/sendexev.c,v 3.3 2001/12/14 19:58:58 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setbmap.c diff -u xc/programs/Xserver/Xi/setbmap.c:3.2 xc/programs/Xserver/Xi/setbmap.c:3.3 --- xc/programs/Xserver/Xi/setbmap.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/setbmap.c Fri Dec 14 14:58:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: setbmap.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: setbmap.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setbmap.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setbmap.c,v 3.3 2001/12/14 19:58:59 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setdval.c diff -u xc/programs/Xserver/Xi/setdval.c:3.2 xc/programs/Xserver/Xi/setdval.c:3.3 --- xc/programs/Xserver/Xi/setdval.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/setdval.c Fri Dec 14 14:58:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: setdval.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: setdval.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setdval.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setdval.c,v 3.3 2001/12/14 19:58:59 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setfocus.c diff -u xc/programs/Xserver/Xi/setfocus.c:3.2 xc/programs/Xserver/Xi/setfocus.c:3.3 --- xc/programs/Xserver/Xi/setfocus.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/setfocus.c Fri Dec 14 14:58:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: setfocus.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: setfocus.c,v 1.4 2001/02/09 02:04:34 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setfocus.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setfocus.c,v 3.3 2001/12/14 19:58:59 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/setmmap.c diff -u xc/programs/Xserver/Xi/setmmap.c:3.2 xc/programs/Xserver/Xi/setmmap.c:3.3 --- xc/programs/Xserver/Xi/setmmap.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/setmmap.c Fri Dec 14 14:58:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: setmmap.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: setmmap.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setmmap.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setmmap.c,v 3.3 2001/12/14 19:58:59 dawes Exp $ */ /******************************************************************** * Index: xc/programs/Xserver/Xi/setmode.c diff -u xc/programs/Xserver/Xi/setmode.c:3.2 xc/programs/Xserver/Xi/setmode.c:3.3 --- xc/programs/Xserver/Xi/setmode.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/setmode.c Fri Dec 14 14:58:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: setmode.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: setmode.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/setmode.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/setmode.c,v 3.3 2001/12/14 19:58:59 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/stubs.c diff -u xc/programs/Xserver/Xi/stubs.c:3.3 xc/programs/Xserver/Xi/stubs.c:3.4 --- xc/programs/Xserver/Xi/stubs.c:3.3 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/stubs.c Fri Dec 14 14:58:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: stubs.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: stubs.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/stubs.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/stubs.c,v 3.4 2001/12/14 19:58:59 dawes Exp $ */ /* * stubs.c -- stub routines for the X server side of the XINPUT Index: xc/programs/Xserver/Xi/ungrdev.c diff -u xc/programs/Xserver/Xi/ungrdev.c:3.2 xc/programs/Xserver/Xi/ungrdev.c:3.3 --- xc/programs/Xserver/Xi/ungrdev.c:3.2 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/ungrdev.c Fri Dec 14 14:58:59 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ungrdev.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: ungrdev.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdev.c,v 3.2 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/ungrdev.c,v 3.3 2001/12/14 19:58:59 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/ungrdevb.c diff -u xc/programs/Xserver/Xi/ungrdevb.c:3.3 xc/programs/Xserver/Xi/ungrdevb.c:3.4 --- xc/programs/Xserver/Xi/ungrdevb.c:3.3 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/ungrdevb.c Fri Dec 14 14:59:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ungrdevb.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: ungrdevb.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/ungrdevb.c,v 3.4 2001/12/14 19:59:00 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xi/ungrdevk.c diff -u xc/programs/Xserver/Xi/ungrdevk.c:3.3 xc/programs/Xserver/Xi/ungrdevk.c:3.4 --- xc/programs/Xserver/Xi/ungrdevk.c:3.3 Wed Jan 17 17:13:26 2001 +++ xc/programs/Xserver/Xi/ungrdevk.c Fri Dec 14 14:59:00 2001 @@ -1,10 +1,14 @@ -/* $Xorg: ungrdevk.c,v 1.3 2000/08/17 19:48:02 cpqbld Exp $ */ +/* $Xorg: ungrdevk.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.c,v 3.3 2001/01/17 22:13:26 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xi/ungrdevk.c,v 3.4 2001/12/14 19:59:00 dawes Exp $ */ /*********************************************************************** * Index: xc/programs/Xserver/Xprint/AttrValid.c diff -u xc/programs/Xserver/Xprint/AttrValid.c:1.4 xc/programs/Xserver/Xprint/AttrValid.c:1.5 --- xc/programs/Xserver/Xprint/AttrValid.c:1.4 Wed Jan 17 17:36:27 2001 +++ xc/programs/Xserver/Xprint/AttrValid.c Fri Dec 21 16:02:04 2001 @@ -1,4 +1,4 @@ -/* $Xorg: AttrValid.c,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ */ +/* $Xorg: AttrValid.c,v 1.4 2001/03/14 18:43:17 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.c,v 1.4 2001/01/17 22:36:27 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.c,v 1.5 2001/12/21 21:02:04 dawes Exp $ */ #include @@ -421,6 +421,13 @@ XpValidatePrinterMediaAttrs(pContext, vpr->valid_input_trays, vpr->valid_medium_sizes); + /* + * available-compressions-supported + */ + XpValidateListAttr(pContext, XPPrinterAttr, + xpoid_att_available_compressions_supported, + vpr->valid_available_compressions_supported, + vpr->default_available_compressions_supported); } @@ -601,6 +608,20 @@ xp_listfonts_modes_supported, (const XpOidList*)NULL); XpOidListDelete(xp_listfonts_modes_supported); + } + /* + * available-compressions + */ + if(XpOidListHasOid(attrs_supported, xpoid_att_available_compression)) + { + XpOidList* available_compressions_supported; + available_compressions_supported = + XpGetListAttr(pContext, XPPrinterAttr, + xpoid_att_available_compressions_supported, + vpr->valid_available_compressions_supported); + XpValidateOidAttr(pContext, pool, xpoid_att_available_compression, + available_compressions_supported, xpoid_none); + XpOidListDelete(available_compressions_supported); } } Index: xc/programs/Xserver/Xprint/AttrValid.h diff -u xc/programs/Xserver/Xprint/AttrValid.h:1.4 xc/programs/Xserver/Xprint/AttrValid.h:1.7 --- xc/programs/Xserver/Xprint/AttrValid.h:1.4 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/AttrValid.h Fri Dec 21 16:02:04 2001 @@ -1,4 +1,4 @@ -/* $Xorg: AttrValid.h,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ */ +/* $Xorg: AttrValid.h,v 1.4 2001/03/14 18:43:40 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,12 +30,12 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/AttrValid.h,v 1.7 2001/12/21 21:02:04 dawes Exp $ */ #ifndef _Xp_AttrValid_h #define _Xp_AttrValid_h -#include "Printstr.h" +#include #include "Oid.h" #define XpNumber(a) (sizeof(a) / sizeof(*(a))) @@ -72,6 +72,8 @@ XpOidList* valid_xp_setup_proviso; XpOidDocFmt* default_document_format; + XpOidList* valid_available_compressions_supported; + XpOidList* default_available_compressions_supported; } XpValidatePoolsRec; Index: xc/programs/Xserver/Xprint/Imakefile diff -u xc/programs/Xserver/Xprint/Imakefile:1.16 xc/programs/Xserver/Xprint/Imakefile:1.18 --- xc/programs/Xserver/Xprint/Imakefile:1.16 Fri Apr 20 11:51:16 2001 +++ xc/programs/Xserver/Xprint/Imakefile Fri Dec 21 16:02:04 2001 @@ -1,14 +1,14 @@ -XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:04 cpqbld Exp $ +XCOMM $Xorg: Imakefile,v 1.4 2001/03/14 18:44:11 pookie Exp $ -XCOMM $XFree86: xc/programs/Xserver/Xprint/Imakefile,v 1.16 2001/04/20 15:51:16 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/Imakefile,v 1.18 2001/12/21 21:02:04 dawes Exp $ #include #ifndef XpRasterDDX -#define XpRasterDDX NO +#define XpRasterDDX YES #endif #ifndef XpColorPclDDX #define XpColorPclDDX YES @@ -73,15 +73,17 @@ MKTMP_DEFINES = -DHAS_MKSTEMP #endif +#if XpRasterDDX || XpColorPclDDX || XpMonoPclDDX || XpPostScriptDDX + SUBDIRS = $(RASTDIR) $(PCLDIR) $(MPCLDIR) $(PSDIR) + #define IHaveSubdirs + +#endif - INCLUDES = -I. -I../mfb \ - -I../mi \ - -I../cfb \ - -I../include \ - -I$(XINCLUDESRC) -I$(TOP)/include \ - -I$(EXTINCSRC) -I$(FONTINCSRC) + INCLUDES = -I$(XINCLUDESRC) -I. -I../mfb -I../mi -I../cfb \ + -I../include -I$(TOP)/include \ + -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(XLIBSRC) LINTLIBS = $(TOP)/server/dix/llib-ldix.ln $(TOP)/server/os/llib-los.ln \ $(TOP)/server/ddx/mfb/llib-lmfb.ln \ @@ -89,8 +91,14 @@ $(TOP)/server/ddx/cfb/llib-lcfb.ln DEFINES = -DXPRINTDIR=\"$(XPRINTDIR)\" $(RASTDEF) $(PCLDEF) $(MPCLDEF) \ - $(PSDEF) $(MKTMP_DEFINES) -UXFree86LOADER + $(PSDEF) $(MKTMP_DEFINES) -UXFree86LOADER -D_XP_PRINT_SERVER_ +/* Go ahead: Call me paranoid ... */ +Makefiles:: + RemoveFiles(Quark.c Xlcint.h Xresource.h Xrm.c XrmI.h) + +LinkSourceFile(Quarks.c,$(XLIBSRC)) + NormalLibraryObjectRule() #if XprtServer @@ -115,8 +123,10 @@ SpecialCObjectRule(os2_stubs,$(ICONFIGFILES),-DOS2NULLSELECT) #endif +#ifdef IHaveSubdirs MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) MakeLintLibSubdirs($(SUBDIRS)) +#endif DependTarget() Index: xc/programs/Xserver/Xprint/Init.c diff -u xc/programs/Xserver/Xprint/Init.c:1.9 xc/programs/Xserver/Xprint/Init.c:1.13 --- xc/programs/Xserver/Xprint/Init.c:1.9 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/Init.c Fri Dec 21 16:02:04 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Init.c,v 1.4 2000/08/17 19:48:05 cpqbld Exp $ */ +/* $Xorg: Init.c,v 1.5 2001/03/07 17:31:33 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -50,7 +50,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/Init.c,v 1.9 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Init.c,v 1.13 2001/12/21 21:02:04 dawes Exp $ */ #include #include @@ -90,12 +90,8 @@ #include "DiPrint.h" #include "attributes.h" -extern char *display; /* display number as a string */ - #include "os.h" -extern WindowPtr *WindowTable; /* declared in dix:globals.c */ - static void GenericScreenInit( int index, ScreenPtr pScreen, @@ -175,12 +171,11 @@ static PixmapFormatRec RasterPixmapFormats[] = { - 1, 1, BITMAP_SCANLINE_PAD + { 1, 1, BITMAP_SCANLINE_PAD } }; #define NUMRASTFORMATS (sizeof RasterPixmapFormats)/(sizeof RasterPixmapFormats[0]) -extern Bool InitializeRasterDriver(); -extern XpValidatePoolsRec RasterValidatePoolsRec; /* From RasterAttVal.c */ +#include "raster/Raster.h" #endif @@ -195,12 +190,6 @@ #define NUMCPCLFORMATS (sizeof ColorPclPixmapFormats)/(sizeof ColorPclPixmapFormats[0]) -#ifdef XPPCLDDX -extern Bool InitializeColorPclDriver(BFuncArgs); -#endif - -extern XpValidatePoolsRec PclValidatePoolsRec; - #endif #ifdef XPMONOPCLDDX @@ -212,9 +201,10 @@ #define NUMMPCLFORMATS (sizeof MonoPclPixmapFormats)/(sizeof MonoPclPixmapFormats[0]) -extern Bool InitializeMonoPclDriver(); -extern XpValidatePoolsRec PclValidatePoolsRec; +#endif +#if defined(XPPCLDDX) || defined(XPMONOPCLDDX) +#include "pcl/Pcl.h" #endif #ifdef XPPSDDX @@ -229,7 +219,6 @@ #define NUMPSFORMATS (sizeof PSPixmapFormats)/(sizeof PSPixmapFormats[0]) #include "ps/Ps.h" -extern XpValidatePoolsRec PsValidatePoolsRec; #endif @@ -341,10 +330,6 @@ static const char printServerConfigDir[] = "XPSERVERCONFIGDIR"; -static int printScreenPrivIndex, - printWindowPrivIndex, - printGCPrivIndex; -static unsigned long printGeneration = 0; static char *configFileName = (char *)NULL; static Bool freeDefaultFontPath = FALSE; static char *origFontPath = (char *)NULL; @@ -362,6 +347,10 @@ { if(strcmp(argv[i], "-XpFile") == 0) { + if ((i + 1) >= argc) { + ddxUseMsg (); + return i + 2; + } configFileName = argv[i + 1]; return i + 2; } @@ -717,7 +706,6 @@ static PrinterDbPtr BuildPrinterDb(void) { - char *printerList, *augmentCmd = (char *)NULL; Bool defaultAugment = TRUE, freeConfigFileName; if(configFileName && access(configFileName, R_OK) != 0) @@ -1030,8 +1018,8 @@ static void AugmentFontPath(void) { - char *newPath, *modelID, **allIDs = (char **)NULL; - PrinterDbPtr pDb, pDbEntry; + char *modelID, **allIDs = (char **)NULL; + PrinterDbPtr pDbEntry; int numModels, i; if(!origFontPath) @@ -1468,10 +1456,9 @@ int argc, char **argv) { - int i; float fWidth, fHeight, maxWidth, maxHeight; unsigned short width, height; - PrinterDbPtr pDb, pDb2; + PrinterDbPtr pDb; int res, maxRes; /* @@ -1617,7 +1604,7 @@ int localeLen, char *locale) { - PrinterDbPtr pDb, pDb2; + PrinterDbPtr pDb; for(pDb = printerDb; pDb != (PrinterDbPtr)NULL; pDb = pDb->next) { @@ -1667,7 +1654,7 @@ if(!nameLen || name == (char *)NULL) { int i; - PrinterDbPtr pDb, pDb2; + PrinterDbPtr pDb; for(pDb = printerDb, i = 0; pDb != (PrinterDbPtr)NULL; pDb = pDb->next, i++) @@ -1717,7 +1704,6 @@ XpDiValidatePrinter(char *printerName, int printerNameLen) { PrinterDbPtr pCurEntry; - WindowPtr pWin; for(pCurEntry = printerDb; pCurEntry != (PrinterDbPtr)NULL; pCurEntry = pCurEntry->next) Index: xc/programs/Xserver/Xprint/Oid.c diff -u xc/programs/Xserver/Xprint/Oid.c:1.4 xc/programs/Xserver/Xprint/Oid.c:1.5 --- xc/programs/Xserver/Xprint/Oid.c:1.4 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/Oid.c Sat Oct 27 23:32:53 2001 @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/Oid.c,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Oid.c,v 1.5 2001/10/28 03:32:53 tsi Exp $ */ #include "attributes.h" @@ -1652,8 +1652,6 @@ const XpOidMediumSS* msss) { int i_mss, i_ds, i_itm; - XpOidMediumDiscreteSizeList* ds_list; - int tray_count; XpOid current_tray, current_medium; XpOidMediumDiscreteSizeList* unspecified_tray_ds; XpOidMediumDiscreteSizeList* tray_ds; Index: xc/programs/Xserver/Xprint/OidDefs.h diff -u xc/programs/Xserver/Xprint/OidDefs.h:1.1.1.2 xc/programs/Xserver/Xprint/OidDefs.h:1.2 --- xc/programs/Xserver/Xprint/OidDefs.h:1.1.1.2 Tue Jan 16 17:41:45 2001 +++ xc/programs/Xserver/Xprint/OidDefs.h Fri Dec 21 16:02:05 2001 @@ -1,4 +1,4 @@ -/* $Xorg: OidDefs.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ +/* $Xorg: OidDefs.h,v 1.4 2001/03/14 18:45:13 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -67,6 +67,8 @@ xpoid_att_job_attributes_supported, xpoid_att_locale, xpoid_att_multiple_documents_supported, + xpoid_att_available_compression, + xpoid_att_available_compressions_supported, xpoid_val_content_orientation_portrait, xpoid_val_content_orientation_landscape, xpoid_val_content_orientation_reverse_portrait, @@ -149,5 +151,13 @@ xpoid_val_xp_setup_ok, xpoid_val_xp_setup_incomplete, xpoid_val_xp_list_glyph_fonts, - xpoid_val_xp_list_internal_printer_fonts + xpoid_val_xp_list_internal_printer_fonts, + xpoid_val_available_compressions_0, + xpoid_val_available_compressions_01, + xpoid_val_available_compressions_02, + xpoid_val_available_compressions_03, + xpoid_val_available_compressions_012, + xpoid_val_available_compressions_013, + xpoid_val_available_compressions_023, + xpoid_val_available_compressions_0123 } XpOid; Index: xc/programs/Xserver/Xprint/OidStrs.h diff -u xc/programs/Xserver/Xprint/OidStrs.h:1.4 xc/programs/Xserver/Xprint/OidStrs.h:1.5 --- xc/programs/Xserver/Xprint/OidStrs.h:1.4 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/OidStrs.h Fri Dec 21 16:02:05 2001 @@ -1,4 +1,4 @@ -/* $Xorg: OidStrs.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ +/* $Xorg: OidStrs.h,v 1.4 2001/03/14 18:45:40 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,9 +30,9 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/OidStrs.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/OidStrs.h,v 1.5 2001/12/21 21:02:05 dawes Exp $ */ -static int XpOidStringMapCount = 117; +static int XpOidStringMapCount = 127; #define OIDATA(name) { name, sizeof(name)-1, 0, 0, 0 } @@ -71,6 +71,8 @@ OIDATA("job-attributes-supported"), OIDATA("locale"), OIDATA("multiple-documents-supported"), + OIDATA("available-compression"), + OIDATA("available-compressions-supported"), OIDATA("portrait"), OIDATA("landscape"), OIDATA("reverse-portrait"), @@ -153,7 +155,15 @@ OIDATA("xp-setup-ok"), OIDATA("xp-setup-incomplete"), OIDATA("xp-list-glyph-fonts"), - OIDATA("xp-list-internal-printer-fonts") + OIDATA("xp-list-internal-printer-fonts"), + OIDATA("0"), + OIDATA("01"), + OIDATA("02"), + OIDATA("03"), + OIDATA("012"), + OIDATA("013"), + OIDATA("023"), + OIDATA("0123") }; #undef OIDATA Index: xc/programs/Xserver/Xprint/Quarks.c diff -u xc/programs/Xserver/Xprint/Quarks.c:1.4 xc/programs/Xserver/Xprint/Quarks.c:removed --- xc/programs/Xserver/Xprint/Quarks.c:1.4 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/Quarks.c Fri Jan 18 15:24:22 2002 @@ -1,352 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xprint/Quarks.c,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ - -/* - * $Xorg: Quarks.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ - */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -#include "Xlibint.h" -#include - -/* Not cost effective, at least for vanilla MIT clients */ -/* #define PERMQ */ - -typedef unsigned long Signature; -typedef unsigned long Entry; -#ifdef PERMQ -typedef unsigned char Bits; -#endif - -static XrmQuark nextQuark = 1; /* next available quark number */ -static unsigned long quarkMask = 0; -static Entry zero = 0; -static Entry *quarkTable = &zero; /* crock */ -static unsigned long quarkRehash; -static XrmString **stringTable = NULL; -#ifdef PERMQ -static Bits **permTable = NULL; -#endif -static XrmQuark nextUniq = -1; /* next quark from XrmUniqueQuark */ - -#define QUANTUMSHIFT 8 -#define QUANTUMMASK ((1 << QUANTUMSHIFT) - 1) -#define CHUNKPER 8 -#define CHUNKMASK ((CHUNKPER << QUANTUMSHIFT) - 1) - -#define LARGEQUARK ((Entry)0x80000000L) -#define QUARKSHIFT 18 -#define QUARKMASK ((LARGEQUARK - 1) >> QUARKSHIFT) -#define XSIGMASK ((1L << QUARKSHIFT) - 1) - -#define STRQUANTSIZE (sizeof(XrmString) * (QUANTUMMASK + 1)) -#ifdef PERMQ -#define QUANTSIZE (STRQUANTSIZE + \ - (sizeof(Bits) * ((QUANTUMMASK + 1) >> 3)) -#else -#define QUANTSIZE STRQUANTSIZE -#endif - -#define HASH(sig) ((sig) & quarkMask) -#define REHASHVAL(sig) ((((sig) % quarkRehash) + 2) | 1) -#define REHASH(idx,rehash) ((idx + rehash) & quarkMask) -#define NAME(q) stringTable[(q) >> QUANTUMSHIFT][(q) & QUANTUMMASK] -#ifdef PERMQ -#define BYTEREF(q) permTable[(q) >> QUANTUMSHIFT][((q) & QUANTUMMASK) >> 3] -#define ISPERM(q) (BYTEREF(q) & (1 << ((q) & 7))) -#define SETPERM(q) BYTEREF(q) |= (1 << ((q) & 7)) -#define CLEARPERM(q) BYTEREF(q) &= ~(1 << ((q) & 7)) -#endif - -/* Permanent memory allocation */ - -#define WALIGN sizeof(unsigned long) -#define DALIGN sizeof(double) - -#define NEVERFREETABLESIZE ((8192-12) & ~(DALIGN-1)) -static char *neverFreeTable = NULL; -static unsigned neverFreeTableSize = 0; - -static char *permalloc(register unsigned int length) -{ - char *ret; - - if (neverFreeTableSize < length) { - if (length >= NEVERFREETABLESIZE) - return Xmalloc(length); - if (! (ret = Xmalloc(NEVERFREETABLESIZE))) - return (char *) NULL; - neverFreeTableSize = NEVERFREETABLESIZE; - neverFreeTable = ret; - } - ret = neverFreeTable; - neverFreeTable += length; - neverFreeTableSize -= length; - return(ret); -} - -char *Xpermalloc(unsigned int length) -{ - int i; - - if (neverFreeTableSize && length < NEVERFREETABLESIZE) { -#ifndef WORD64 - if ((sizeof(struct {char a; double b;}) != - (sizeof(struct {char a; unsigned long b;}) - - sizeof(unsigned long) + sizeof(double))) && - !(length & (DALIGN-1)) && - (i = (NEVERFREETABLESIZE - neverFreeTableSize) & (DALIGN-1))) { - neverFreeTableSize -= DALIGN - i; - neverFreeTable += DALIGN - i; - } else -#endif - if ((i = (NEVERFREETABLESIZE - neverFreeTableSize) & (WALIGN-1)) != 0) { - neverFreeTableSize -= WALIGN - i; - neverFreeTable += WALIGN - i; - } - } - return permalloc(length); -} - -static Bool -ExpandQuarkTable(void) -{ - unsigned long oldmask, newmask; - register char c, *s; - register Entry *oldentries, *entries; - register Entry entry; - register unsigned long oldidx, newidx, rehash; - Signature sig; - XrmQuark q; - - oldentries = quarkTable; - if ((oldmask = quarkMask) != 0) - newmask = (oldmask << 1) + 1; - else { - if (!stringTable) { - stringTable = (XrmString **)Xmalloc(sizeof(XrmString *) * - CHUNKPER); - if (!stringTable) - return False; - stringTable[0] = (XrmString *)NULL; - } -#ifdef PERMQ - if (!permTable) - permTable = (Bits **)Xmalloc(sizeof(Bits *) * CHUNKPER); - if (!permTable) - return False; -#endif - stringTable[0] = (XrmString *)Xpermalloc(QUANTSIZE); - if (!stringTable[0]) - return False; -#ifdef PERMQ - permTable[0] = (Bits *)((char *)stringTable[0] + STRQUANTSIZE); -#endif - newmask = 0x1ff; - } - entries = (Entry *)Xmalloc(sizeof(Entry) * (newmask + 1)); - if (!entries) - return False; - bzero((char *)entries, sizeof(Entry) * (newmask + 1)); - quarkTable = entries; - quarkMask = newmask; - quarkRehash = quarkMask - 2; - for (oldidx = 0; oldidx <= oldmask; oldidx++) { - if ((entry = oldentries[oldidx]) != 0) { - if (entry & LARGEQUARK) - q = entry & (LARGEQUARK-1); - else - q = (entry >> QUARKSHIFT) & QUARKMASK; - for (sig = 0, s = NAME(q); (c = *s++) != 0; ) - sig = (sig << 1) + c; - newidx = HASH(sig); - if (entries[newidx]) { - rehash = REHASHVAL(sig); - do { - newidx = REHASH(newidx, rehash); - } while (entries[newidx]); - } - entries[newidx] = entry; - } - } - if (oldmask) - Xfree((char *)oldentries); - return True; -} - -XrmQuark _XrmInternalStringToQuark( - register _Xconst char *name, register int len, register Signature sig, - Bool permstring) -{ - register XrmQuark q; - register Entry entry; - register int idx, rehash; - register int i; - register char *s1, *s2; - char *new; - - rehash = 0; - idx = HASH(sig); - while ((entry = quarkTable[idx]) != 0) { - if (entry & LARGEQUARK) - q = entry & (LARGEQUARK-1); - else { - if ((entry - sig) & XSIGMASK) - goto nomatch; - q = (entry >> QUARKSHIFT) & QUARKMASK; - } - for (i = len, s1 = (char *)name, s2 = NAME(q); --i >= 0; ) { - if (*s1++ != *s2++) - goto nomatch; - } - if (*s2) { -nomatch: if (!rehash) - rehash = REHASHVAL(sig); - idx = REHASH(idx, rehash); - continue; - } -#ifdef PERMQ - if (permstring && !ISPERM(q)) { - Xfree(NAME(q)); - NAME(q) = (char *)name; - SETPERM(q); - } -#endif - return q; - } - if (nextUniq == nextQuark) - return NULLQUARK; - if ((unsigned long)(nextQuark + (nextQuark >> 2)) > quarkMask) { - if (!ExpandQuarkTable()) - return NULLQUARK; - return _XrmInternalStringToQuark(name, len, sig, permstring); - } - q = nextQuark; - if (!(q & QUANTUMMASK)) { - if (!(q & CHUNKMASK)) { - if (!(new = Xrealloc((char *)stringTable, - sizeof(XrmString *) * - ((q >> QUANTUMSHIFT) + CHUNKPER)))) - return NULLQUARK; - stringTable = (XrmString **)new; -#ifdef PERMQ - if (!(new = Xrealloc((char *)permTable, - sizeof(Bits *) * - ((q >> QUANTUMSHIFT) + CHUNKPER)))) - return NULLQUARK; - permTable = (Bits **)new; -#endif - } - new = Xpermalloc(QUANTSIZE); - if (!new) - return NULLQUARK; - stringTable[q >> QUANTUMSHIFT] = (XrmString *)new; -#ifdef PERMQ - permTable[q >> QUANTUMSHIFT] = (Bits *)(new + STRQUANTSIZE); -#endif - } - if (!permstring) { - s2 = (char *)name; -#ifdef PERMQ - name = Xmalloc(len+1); -#else - name = permalloc(len+1); -#endif - if (!name) - return NULLQUARK; - for (i = len, s1 = (char *)name; --i >= 0; ) - *s1++ = *s2++; - *s1++ = '\0'; -#ifdef PERMQ - CLEARPERM(q); - } - else { - SETPERM(q); -#endif - } - NAME(q) = (char *)name; - if ((unsigned long)q <= QUARKMASK) - entry = (q << QUARKSHIFT) | (sig & XSIGMASK); - else - entry = q | LARGEQUARK; - quarkTable[idx] = entry; - nextQuark++; - return q; -} - -XrmQuark XrmStringToQuark(_Xconst char *name) -{ - register char c, *tname; - register Signature sig = 0; - - if (!name) - return (NULLQUARK); - - for (tname = (char *)name; (c = *tname++) != 0; ) - sig = (sig << 1) + c; - - return _XrmInternalStringToQuark(name, tname-(char *)name-1, sig, False); -} - -XrmQuark XrmPermStringToQuark(_Xconst char *name) -{ - register char c, *tname; - register Signature sig = 0; - - if (!name) - return (NULLQUARK); - - for (tname = (char *)name; (c = *tname++) != 0; ) - sig = (sig << 1) + c; - - return _XrmInternalStringToQuark(name, tname-(char *)name-1, sig, True); -} - -XrmQuark XrmUniqueQuark(void) -{ - if (nextUniq == nextQuark) - return NULLQUARK; - return nextUniq--; -} - -XrmString XrmQuarkToString(register XrmQuark quark) -{ - if (quark <= 0 || quark >= nextQuark) - return NULLSTRING; -#ifdef PERMQ - /* We have to mark the quark as permanent, since the caller might hold - * onto the string pointer forver. - */ - SETPERM(quark); -#endif - return NAME(quark); -} Index: xc/programs/Xserver/Xprint/Util.c diff -u xc/programs/Xserver/Xprint/Util.c:1.11 xc/programs/Xserver/Xprint/Util.c:1.13 --- xc/programs/Xserver/Xprint/Util.c:1.11 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/Util.c Wed Oct 31 17:50:28 2001 @@ -30,23 +30,21 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/Util.c,v 1.11 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/Util.c,v 1.13 2001/10/31 22:50:28 tsi Exp $ */ /* To get the tempnam() prototype in */ #if defined(linux) && defined(__STRICT_ANSI__) #undef __STRICT_ANSI__ #endif -#include "Xos.h" /* for unistd.h and string.h */ +#include /* for unistd.h and string.h */ #include #include #include #include "misc.h" #include "dixstruct.h" -#define _XP_PRINT_SERVER_ -#include "extensions/Print.h" -#undef _XP_PRINT_SERVER_ +#include #include "attributes.h" @@ -325,6 +323,7 @@ return Success; } +#ifndef HAS_MKSTEMP static char *XpDirName(char *fname) { @@ -343,6 +342,7 @@ } return fn; } +#endif Bool XpOpenTmpFile( Index: xc/programs/Xserver/Xprint/Xlcint.h diff -u xc/programs/Xserver/Xprint/Xlcint.h:1.1.1.2 xc/programs/Xserver/Xprint/Xlcint.h:removed --- xc/programs/Xserver/Xprint/Xlcint.h:1.1.1.2 Tue Jan 16 17:41:47 2001 +++ xc/programs/Xserver/Xprint/Xlcint.h Fri Jan 18 15:24:22 2002 @@ -1,625 +0,0 @@ -/* - * $Xorg: Xlcint.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ - */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -/* - * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation, - * and Nippon Telegraph and Telephone Corporation - * Copyright 1991 by the Massachusetts Institute of Technology - * Copyright 1991 by the Open Software Foundation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of OMRON, NTT Software, NTT, Open - * Software Foundation and M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. OMRON, NTT Software, NTT, Open Software - * Foundation and M.I.T. make no representations about the suitability of this - * software for any purpose. It is provided "as is" without express or - * implied warranty. - * - * OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION AND M.I.T. - * DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT - * SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATIONN OR M.I.T. BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Authors: Li Yuhong OMRON Corporation - * Tatsuya Kato NTT Software Corporation - * Hiroshi Kuribayashi OMRON Coproration - * Muneiyoshi Suzuki Nippon Telegraph and Telephone Co. - * - * M. Collins OSF - */ - - -#ifndef _XLCINT_H_ -#define _XLCINT_H_ - -#ifdef NOT_IN_SERVER - -#include - -/* current Ultrix compiler gets horribly confused */ -#if defined(FUNCPROTO) && defined(ultrix) -#undef NeedFunctionPrototypes -#endif - -typedef struct _XIMFilter { - struct _XIMFilter *next; - Window window; - unsigned long event_mask; - int start_type, end_type; - Bool (*filter)( -#if NeedFunctionPrototypes - Display*, Window, XEvent*, XPointer -#endif - ); - XPointer client_data; -} XFilterEventRec, *XFilterEventList; - -#ifdef offsetof -#define XOffsetOf(s_type,field) offsetof(s_type,field) -#else -#define XOffsetOf(s_type,field) ((unsigned int)&(((s_type*)NULL)->field)) -#endif - -#define XIMNumber(arr) ((unsigned int) (sizeof(arr) / sizeof(arr[0]))) - -typedef struct { - char *name; - XPointer value; -} XIMArg; - -#define ICInputStyle 0 -#define ICClientWindow 1 -#define ICFocusWindow 2 -#define ICFilterEvents 3 -#define ICArea 4 -#define ICAreaNeeded 5 -#define ICSpotLocation 6 -#define ICColormap 7 -#define ICStdColormap 8 -#define ICForeground 9 -#define ICBackground 10 -#define ICBackgroundPixmap 11 -#define ICFontSet 12 -#define ICLineSpace 13 -#define ICCursor 14 -#define ICResourceClass 26 -#define ICResourceName 27 -#ifdef __hpux -#define ICNlioctl 28 /* must be > 14 + 11 */ -#endif - -#define IMQueryInputStyle 0 - -#define IMResourceWrite 1 -#define IMResourceRead 2 -#define IMResourceReadWrite 3 - -/* - * define secondary data structs which are part of Input methods - * and input context - */ -typedef struct { - XrmQuark xrm_name; /* Resource name quark */ - int xrm_size; /* Size in bytes of data */ - long xrm_offset; /* -offset-1 */ - unsigned short mode; /* Read Write Permission */ - int mask; /* ? */ -} XIMrmResource, *XIMrmResourceList; - -typedef struct { - char *resource_name; /* Resource string */ - int resource_size; /* Size in bytes of data */ - long resource_offset; /* -offset-1 */ - unsigned short mode; /* Read Write Permission */ - int mask; /* ? */ -} XIMResource, *XIMResourceList; - -typedef struct { - XIMCallback start; - XIMCallback done; - XIMCallback draw; - XIMCallback caret; -} ICCallbacks; - -/* - * data block describing the visual attributes associated with - * an input context - */ -typedef struct { - XRectangle area; - XRectangle area_needed; - XPoint spot_location; - Colormap colormap; - Atom std_colormap; - unsigned long foreground; - unsigned long background; - Pixmap background_pixmap; - XFontSet fontset; - int line_space; - Cursor cursor; - ICCallbacks callbacks; -} ICAttributes, *ICAttributesPtr; - -typedef struct _XLCd *XLCd; /* need forward reference */ - -/* - * define an LC, it's methods, and data. - */ - -typedef struct { - char* (*map_modifiers)( /* called by XSetModifiers */ -#if NeedFunctionPrototypes - XLCd, char*, char* -#endif - ); - XFontSet (*create_fontset)( -#if NeedFunctionPrototypes - XLCd, Display*, char*, char**, int, char***, int* -#endif - ); - XIM (*open_im)( -#if NeedFunctionPrototypes - XLCd, Display*, XrmDatabase, char*, char* -#endif - ); -} XLCdMethodsRec, *XLCdMethods; - - -typedef struct { - char* name; /* name of this LC */ - char* modifiers; /* modifiers of locale */ -} XLCdCoreRec, *XLCdCore; - - -typedef struct _XLCd { - XLCdMethods methods; /* methods of this LC */ - XLCdCoreRec core; /* data of this LC */ -} XLCdRec; - - -/* - * X Font Sets are an instantiable object, so we define it, the - * object itself, a method list and data - */ - -/* - * XFontSet object method list - */ -typedef struct { - /* pure font methods */ - - void (*free)( -#if NeedFunctionPrototypes - Display*, XFontSet -#endif - ); - - /* multi-byte text drawing methods */ - - int (*mb_escapement)( -#if NeedFunctionPrototypes - XFontSet, char*, int -#endif - ); - int (*mb_extents)( -#if NeedFunctionPrototypes - XFontSet, char*, int, XRectangle*, XRectangle* -#endif - ); - Status (*mb_extents_per_char)( -#if NeedFunctionPrototypes - XFontSet, char*, int, XRectangle*, XRectangle*, int, int*, - XRectangle*, XRectangle* -#endif - ); - int (*mb_draw_string)( -#if NeedFunctionPrototypes - Display*, Drawable, XFontSet, GC, int, int, char*, int -#endif - ); - void (*mb_draw_image_string)( -#if NeedFunctionPrototypes - Display*, Drawable, XFontSet, GC, int, int, char*, int -#endif - ); - - /* wide character text drawing methods */ - - int (*wc_escapement)( -#if NeedFunctionPrototypes - XFontSet, wchar_t*, int -#endif - ); - int (*wc_extents)( -#if NeedFunctionPrototypes - XFontSet, wchar_t*, int, XRectangle*, XRectangle* -#endif - ); - Status (*wc_extents_per_char)( -#if NeedFunctionPrototypes - XFontSet, wchar_t*, int, XRectangle*, XRectangle*, int, int*, - XRectangle*, XRectangle* -#endif - ); - int (*wc_draw_string)( -#if NeedFunctionPrototypes - Display*, Drawable, XFontSet, GC, int, int, wchar_t*, int -#endif - ); - void (*wc_draw_image_string)( -#if NeedFunctionPrototypes - Display*, Drawable, XFontSet, GC, int, int, wchar_t*, int -#endif - ); -} XFontSetMethodsRec, *XFontSetMethods; - - -/* - * XFontSet LC independent data - */ - -typedef struct { - XLCd lcd; /* LC of this font set */ - char * base_name_list; /* base font name list */ - int num_of_fonts; /* number of fonts */ - char ** font_name_list; /* font names list */ - XFontStruct ** font_struct_list; /* font struct list */ - XFontSetExtents font_set_extents; /* font set extents */ - char * default_string; /* default string */ - Bool context_dependent; /* context-dependent drawing */ -} XFontSetCoreRec, *XFontSetCore; - - -/* - * An XFontSet. Implementations may need to extend this data structure to - * accomodate additional data, state information etc. - */ -typedef struct _XFontSet { - XFontSetMethods methods; /* methods of this font set */ - XFontSetCoreRec core; /* data of this font set */ -} XFontSetRec; - - - -/* - * X Input Managers are an instantiable object, so we define it, the - * object itself, a method list and data. - */ - -/* - * an Input Manager object method list - */ -typedef struct { - Status (*close)( -#if NeedFunctionPrototypes - XIM -#endif - ); - char* (*get_values)( -#if NeedFunctionPrototypes - XIM, XIMArg* -#endif - ); - XIC (*create_ic)( -#if NeedFunctionPrototypes - XIM, XIMArg* -#endif - ); -} XIMMethodsRec, *XIMMethods; - -/* - * Input Manager LC independent data - */ -typedef struct { - XLCd lcd; /* LC of this input method */ - XIC ic_chain; /* list of ICs for this IM */ - - Display * display; /* display */ - XrmDatabase rdb; - char * res_name; - char * res_class; - - XIMrmResourceList ic_resources; /* compiled IC resource list */ - unsigned int ic_num_resources; - XIMrmResourceList ic_attr_resources; /* compiled IC visual res */ - unsigned int ic_num_attr_resources; -} XIMCoreRec, *XIMCore; - - - -/* - * An X Input Manager (IM). Implementations may need to extend this data - * structure to accomodate additional data, state information etc. - */ -typedef struct _XIM { - XIMMethods methods; /* method list of this IM */ - XIMCoreRec core; /* data of this IM */ -} XIMRec; - - - -/* - * X Input Contexts (IC) are an instantiable object, so we define it, the - * object itself, a method list and data for this object - */ - -/* - * Input Context method list - */ -typedef struct { - void (*destroy)( -#if NeedFunctionPrototypes - XIC -#endif - ); - void (*set_focus)( -#if NeedFunctionPrototypes - XIC -#endif - ); - void (*unset_focus)( -#if NeedFunctionPrototypes - XIC -#endif - ); - char* (*set_values)( -#if NeedFunctionPrototypes - XIC, XIMArg* -#endif - ); - char* (*get_values)( -#if NeedFunctionPrototypes - XIC, XIMArg* -#endif - ); - char* (*mb_reset)( -#if NeedFunctionPrototypes - XIC -#endif - ); - wchar_t* (*wc_reset)( -#if NeedFunctionPrototypes - XIC -#endif - ); - int (*mb_lookup_string)( -#if NeedFunctionPrototypes - XIC, XKeyEvent*, char*, int, KeySym*, Status* -#endif - ); - int (*wc_lookup_string)( -#if NeedFunctionPrototypes - XIC, XKeyEvent*, wchar_t*, int, KeySym*, Status* -#endif - ); -} XICMethodsRec, *XICMethods; - - - -/* - * Input Context LC independent data - */ -typedef struct { - XIM im; /* XIM this IC belongs too */ - XIC next; /* linked list of ICs for IM */ - - Window client_window; /* window IM can use for */ - /* display or subwindows */ - XIMStyle input_style; /* IM's input style */ - Window focus_window; /* where key events go */ - XrmDatabase res_database; /* where IM gets resources */ - char * string_database; /* string for IM's resources */ - XIMCallback geometry_callback; /* client callback */ - int preedit_state; /* */ - unsigned long filter_events; /* event mask from IM */ - - ICAttributes preedit_attr; /* visuals of preedit area */ - ICAttributes status_attr; /* visuals of status area */ -} XICCoreRec, *XICCore; - - -/* - * an Input Context. Implementations may need to extend this data - * structure to accomodate additional data, state information etc. - */ -typedef struct _XIC { - XICMethods methods; /* method list of this IC */ - XICCoreRec core; /* data of this IC */ -} XICRec; - -#endif /* NOT_IN_SERVER */ - -/* - * Methods for Xrm parsing - */ - -typedef struct { - void (*mbinit)( -#if NeedFunctionPrototypes - XPointer /* state */ -#endif - ); - char (*mbchar)( -#if NeedFunctionPrototypes - XPointer /* state */, - char* /* str */, - int* /* lenp */ -#endif - ); - void (*mbfinish)( -#if NeedFunctionPrototypes - XPointer /* state */ -#endif - ); - char* (*lcname)( -#if NeedFunctionPrototypes - XPointer /* state */ -#endif - ); - void (*destroy)( -#if NeedFunctionPrototypes - XPointer /* state */ -#endif - ); -} XrmMethodsRec, *XrmMethods; - -#ifdef NOT_IN_SERVER - -/* current Ultrix compiler gets horribly confused */ -#if !defined(NeedFunctionPrototypes) && defined(FUNCPROTO) -#define NeedFunctionPrototypes 1 -#endif - -typedef XLCd (*XLCdLoadProc)( -#if NeedFunctionPrototypes - char* -#endif -); - -_XFUNCPROTOBEGIN - -extern XLCd _XlcCurrentLC( -#if NeedFunctionPrototypes - void -#endif -); - -extern Bool _XlcValidModSyntax( -#if NeedFunctionPrototypes - char* /* mods */, - char** /* valid */ -#endif -); - -extern char *_XlcDefaultMapModifiers( -#if NeedFunctionPrototypes - XLCd /* lcd */, - char* /* user_mods */, - char* /* prog_mods */ -#endif -); - -extern void _XIMCompileResourceList( -#if NeedFunctionPrototypes - XIMResourceList /* res */, - unsigned int /* num_res */ -#endif -); - -extern void _XCopyToArg( -#if NeedFunctionPrototypes - XPointer /* src */, - XPointer* /* dst */, - unsigned int /* size */ -#endif -); - -extern char ** _XParseBaseFontNameList( -#if NeedFunctionPrototypes - char* /* str */, - int* /* num */ -#endif -); - -extern XrmMethods _XrmInitParseInfo( -#if NeedFunctionPrototypes - XPointer* /* statep */ -#endif -); - -extern void _XRegisterFilterByMask( -#if NeedFunctionPrototypes - Display* /* dpy */, - Window /* window */, - unsigned long /* event_mask */, - Bool (*)( -#if NeedNestedPrototypes - Display* /* display */, - Window /* window */, - XEvent* /* event */, - XPointer /* client_data */ -#endif - ) /* filter */, - XPointer /* client_data */ -#endif -); - -extern void _XRegisterFilterByType( -#if NeedFunctionPrototypes - Display* /* dpy */, - Window /* window */, - int /* start_type */, - int /* end_type */, - Bool (*)( -#if NeedNestedPrototypes - Display* /* display */, - Window /* window */, - XEvent* /* event */, - XPointer /* client_data */ -#endif - ) /* filter */, - XPointer /* client_data */ -#endif -); - -extern void _XUnregisterFilter( -#if NeedFunctionPrototypes - Display* /* dpy */, - Window /* window */, - Bool (*)( -#if NeedNestedPrototypes - Display* /* display */, - Window /* window */, - XEvent* /* event */, - XPointer /* client_data */ -#endif - ) /* filter */, - XPointer /* client_data */ -#endif -); - -_XFUNCPROTOEND - -#endif /* NOT_IN_SERVER */ - -#endif /* _XLCINT_H_ */ Index: xc/programs/Xserver/Xprint/Xresource.h diff -u xc/programs/Xserver/Xprint/Xresource.h:1.6 xc/programs/Xserver/Xprint/Xresource.h:removed --- xc/programs/Xserver/Xprint/Xresource.h:1.6 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/Xresource.h Fri Jan 18 15:24:22 2002 @@ -1,366 +0,0 @@ -/* $Xorg: Xresource.h,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/* $XFree86: xc/programs/Xserver/Xprint/Xresource.h,v 1.6 2001/01/17 22:36:28 dawes Exp $ */ - -/*********************************************************** -Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, -and the Massachusetts Institute of Technology, Cambridge, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the names of Digital or MIT not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifndef _XRESOURCE_H_ -#define _XRESOURCE_H_ - -/* You must include before including this file */ - -/**************************************************************** - **************************************************************** - *** *** - *** *** - *** X Resource Manager Intrinsics *** - *** *** - *** *** - **************************************************************** - ****************************************************************/ - -_XFUNCPROTOBEGIN - -/**************************************************************** - * - * Memory Management - * - ****************************************************************/ - -extern char *Xpermalloc( - unsigned int /* size */ -); - -/**************************************************************** - * - * Quark Management - * - ****************************************************************/ - -typedef int XrmQuark, *XrmQuarkList; -#define NULLQUARK ((XrmQuark) 0) - -typedef char *XrmString; -#define NULLSTRING ((XrmString) 0) - -/* find quark for string, create new quark if none already exists */ -extern XrmQuark XrmStringToQuark( - _Xconst char* /* string */ -); - -extern XrmQuark XrmPermStringToQuark( - _Xconst char* /* string */ -); - -/* find string for quark */ -extern XrmString XrmQuarkToString( - XrmQuark /* quark */ -); - -extern XrmQuark XrmUniqueQuark( - void -); - -#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0) - - -/**************************************************************** - * - * Conversion of Strings to Lists - * - ****************************************************************/ - -typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList; - -extern void XrmStringToQuarkList( - _Xconst char* /* string */, - XrmQuarkList /* quarks_return */ -); - -extern void XrmStringToBindingQuarkList( - _Xconst char* /* string */, - XrmBindingList /* bindings_return */, - XrmQuarkList /* quarks_return */ -); - -/**************************************************************** - * - * Name and Class lists. - * - ****************************************************************/ - -typedef XrmQuark XrmName; -typedef XrmQuarkList XrmNameList; -#define XrmNameToString(name) XrmQuarkToString(name) -#define XrmStringToName(string) XrmStringToQuark(string) -#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name) - -typedef XrmQuark XrmClass; -typedef XrmQuarkList XrmClassList; -#define XrmClassToString(c_class) XrmQuarkToString(c_class) -#define XrmStringToClass(c_class) XrmStringToQuark(c_class) -#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class) - - - -/**************************************************************** - * - * Resource Representation Types and Values - * - ****************************************************************/ - -typedef XrmQuark XrmRepresentation; -#define XrmStringToRepresentation(string) XrmStringToQuark(string) -#define XrmRepresentationToString(type) XrmQuarkToString(type) - -typedef struct { - unsigned int size; - XPointer addr; -} XrmValue, *XrmValuePtr; - - -/**************************************************************** - * - * Resource Manager Functions - * - ****************************************************************/ - -typedef struct _XrmHashBucketRec *XrmHashBucket; -typedef XrmHashBucket *XrmHashTable; -typedef XrmHashTable XrmSearchList[]; -typedef struct _XrmHashBucketRec *XrmDatabase; - - -extern void XrmDestroyDatabase( - XrmDatabase /* database */ -); - -extern void XrmQPutResource( - XrmDatabase* /* database */, - XrmBindingList /* bindings */, - XrmQuarkList /* quarks */, - XrmRepresentation /* type */, - XrmValue* /* value */ -); - -extern void XrmPutResource( - XrmDatabase* /* database */, - _Xconst char* /* specifier */, - _Xconst char* /* type */, - XrmValue* /* value */ -); - -extern void XrmQPutStringResource( - XrmDatabase* /* database */, - XrmBindingList /* bindings */, - XrmQuarkList /* quarks */, - _Xconst char* /* value */ -); - -extern void XrmPutStringResource( - XrmDatabase* /* database */, - _Xconst char* /* specifier */, - _Xconst char* /* value */ -); - -extern void XrmPutLineResource( - XrmDatabase* /* database */, - _Xconst char* /* line */ -); - -extern Bool XrmQGetResource( - XrmDatabase /* database */, - XrmNameList /* quark_name */, - XrmClassList /* quark_class */, - XrmRepresentation* /* quark_type_return */, - XrmValue* /* value_return */ -); - -extern Bool XrmGetResource( - XrmDatabase /* database */, - _Xconst char* /* str_name */, - _Xconst char* /* str_class */, - char** /* str_type_return */, - XrmValue* /* value_return */ -); - -extern Bool XrmQGetSearchList( - XrmDatabase /* database */, - XrmNameList /* names */, - XrmClassList /* classes */, - XrmSearchList /* list_return */, - int /* list_length */ -); - -extern Bool XrmQGetSearchResource( - XrmSearchList /* list */, - XrmName /* name */, - XrmClass /* class */, - XrmRepresentation* /* type_return */, - XrmValue* /* value_return */ -); - -/**************************************************************** - * - * Resource Database Management - * - ****************************************************************/ - -#ifdef NOT_IN_SERVER - -extern void XrmSetDatabase( - Display* /* display */, - XrmDatabase /* database */ -); - -extern XrmDatabase XrmGetDatabase( - Display* /* display */ -); - -#endif /* NOT_IN_SERVER */ - -extern XrmDatabase XrmGetFileDatabase( - _Xconst char* /* filename */ -); - -extern Status XrmCombineFileDatabase( - _Xconst char* /* filename */, - XrmDatabase* /* target */, - Bool /* override */ -); - -extern XrmDatabase XrmGetStringDatabase( - _Xconst char* /* data */ /* null terminated string */ -); - -extern void XrmPutFileDatabase( - XrmDatabase /* database */, - _Xconst char* /* filename */ -); - -extern void XrmMergeDatabases( - XrmDatabase /* source_db */, - XrmDatabase* /* target_db */ -); - -extern void XrmCombineDatabase( - XrmDatabase /* source_db */, - XrmDatabase* /* target_db */, - Bool /* override */ -); - -#define XrmEnumAllLevels 0 -#define XrmEnumOneLevel 1 - -extern Bool XrmEnumerateDatabase( - XrmDatabase /* db */, - XrmNameList /* name_prefix */, - XrmClassList /* class_prefix */, - int /* mode */, - Bool (*)( - XrmDatabase* /* db */, - XrmBindingList /* bindings */, - XrmQuarkList /* quarks */, - XrmRepresentation* /* type */, - XrmValue* /* value */, - XPointer /* closure */ - ) /* proc */, - XPointer /* closure */ -); - -extern char *XrmLocaleOfDatabase( - XrmDatabase /* database */ -); - - -/**************************************************************** - * - * Command line option mapping to resource entries - * - ****************************************************************/ - -typedef enum { - XrmoptionNoArg, /* Value is specified in OptionDescRec.value */ - XrmoptionIsArg, /* Value is the option string itself */ - XrmoptionStickyArg, /* Value is characters immediately following option */ - XrmoptionSepArg, /* Value is next argument in argv */ - XrmoptionResArg, /* Resource and value in next argument in argv */ - XrmoptionSkipArg, /* Ignore this option and the next argument in argv */ - XrmoptionSkipLine, /* Ignore this option and the rest of argv */ - XrmoptionSkipNArgs /* Ignore this option and the next - OptionDescRes.value arguments in argv */ -} XrmOptionKind; - -typedef struct { - char *option; /* Option abbreviation in argv */ - char *specifier; /* Resource specifier */ - XrmOptionKind argKind; /* Which style of option it is */ - XPointer value; /* Value to provide if XrmoptionNoArg */ -} XrmOptionDescRec, *XrmOptionDescList; - - -extern void XrmParseCommand( - XrmDatabase* /* database */, - XrmOptionDescList /* table */, - int /* table_count */, - _Xconst char* /* name */, - int* /* argc_in_out */, - char** /* argv_in_out */ -); - -_XFUNCPROTOEND - -#endif /* _XRESOURCE_H_ */ -/* DON'T ADD STUFF AFTER THIS #endif */ Index: xc/programs/Xserver/Xprint/Xrm.c diff -u xc/programs/Xserver/Xprint/Xrm.c:1.7 xc/programs/Xserver/Xprint/Xrm.c:removed --- xc/programs/Xserver/Xprint/Xrm.c:1.7 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/Xrm.c Fri Jan 18 15:24:22 2002 @@ -1,2505 +0,0 @@ -/* - * $Xorg: Xrm.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ - */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ - -/*********************************************************** -Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, -Massachusetts, and the Massachusetts Institute of Technology, Cambridge, -Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the names of Digital or MIT not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/Xrm.c,v 1.7 2001/01/17 22:36:28 dawes Exp $ */ - -#include -#include -#ifdef NOT_IN_SERVER -#include "Xlibint.h" -#include -#else -typedef char *XPointer; -#define Status int -#define True 1 -#define False 0 -#include "misc.h" -#include -#include "Xresource.h" -#endif /* NOT_IN_SERVER */ -#include "Xlcint.h" -#include "XrmI.h" - -#if __STDC__ -#define Const const -#else -#define Const /**/ -#endif -#if __STDC__ && !defined(VMS) -#define RConst const -#else -#define RConst /**/ -#endif - -/* - -These Xrm routines allow very fast lookup of resources in the resource -database. Several usage patterns are exploited: - -(1) Widgets get a lot of resources at one time. Rather than look up each from -scratch, we can precompute the prioritized list of database levels once, then -search for each resource starting at the beginning of the list. - -(2) Many database levels don't contain any leaf resource nodes. There is no -point in looking for resources on a level that doesn't contain any. This -information is kept on a per-level basis. - -(3) Sometimes the widget instance tree is structured such that you get the same -class name repeated on the fully qualified widget name. This can result in the -same database level occuring multiple times on the search list. The code below -only checks to see if you get two identical search lists in a row, rather than -look back through all database levels, but in practice this removes all -duplicates I've ever observed. - -Joel McCormack - -*/ - -/* - -The Xrm representation has been completely redesigned to substantially reduce -memory and hopefully improve performance. - -The database is structured into two kinds of tables: LTables that contain -only values, and NTables that contain only other tables. - -Some invariants: - -The next pointer of the top-level node table points to the top-level leaf -table, if any. - -Within an LTable, for a given name, the tight value always precedes the -loose value, and if both are present the loose value is always right after -the tight value. - -Within an NTable, all of the entries for a given name are contiguous, -in the order tight NTable, loose NTable, tight LTable, loose LTable. - -Bob Scheifler - -*/ - -typedef unsigned long Signature; - -static XrmQuark XrmQString, XrmQANY; - -typedef Bool (*DBEnumProc)( -#if NeedNestedPrototypes /* this is Nested on purpose, to match Xlib.h */ - XrmDatabase* /* db */, - XrmBindingList /* bindings */, - XrmQuarkList /* quarks */, - XrmRepresentation* /* type */, - XrmValue* /* value */, - XPointer /* closure */ -#endif -); - -typedef struct _VEntry { - struct _VEntry *next; /* next in chain */ - XrmQuark name; /* name of this entry */ - unsigned int tight:1; /* 1 if it is a tight binding */ - unsigned int string:1; /* 1 if type is String */ - unsigned int size:30; /* size of value */ -} VEntryRec, *VEntry; - - -typedef struct _DEntry { - VEntryRec entry; /* entry */ - XrmRepresentation type; /* representation type */ -} DEntryRec, *DEntry; - -/* the value is right after the structure */ -#define StringValue(ve) (XPointer)((ve) + 1) -#define RepType(ve) ((DEntry)(ve))->type -/* the value is right after the structure */ -#define DataValue(ve) (XPointer)(((DEntry)(ve)) + 1) -#define RawValue(ve) (char *)((ve)->string ? StringValue(ve) : DataValue(ve)) - -typedef struct _NTable { - struct _NTable *next; /* next in chain */ - XrmQuark name; /* name of this entry */ - unsigned int tight:1; /* 1 if it is a tight binding */ - unsigned int leaf:1; /* 1 if children are values */ - unsigned int hasloose:1; /* 1 if has loose children */ - unsigned int hasany:1; /* 1 if has ANY entry */ - unsigned int pad:4; /* unused */ - unsigned int mask:8; /* hash size - 1 */ - unsigned int entries:16; /* number of children */ -} NTableRec, *NTable; - -/* the buckets are right after the structure */ -#define NodeBuckets(ne) ((NTable *)((ne) + 1)) -#define NodeHash(ne,q) NodeBuckets(ne)[(q) & (ne)->mask] - -/* leaf tables have an extra level of indirection for the buckets, - * so that resizing can be done without invalidating a search list. - * This is completely ugly, and wastes some memory, but the Xlib - * spec doesn't really specify whether invalidation is OK, and the - * old implementation did not invalidate. - */ -typedef struct _LTable { - NTableRec table; - VEntry *buckets; -} LTableRec, *LTable; - -#define LeafHash(le,q) (le)->buckets[(q) & (le)->table.mask] - -/* An XrmDatabase just holds a pointer to the first top-level table. - * The type name is no longer descriptive, but better to not change - * the Xresource.h header file. This type also gets used to define - * XrmSearchList, which is a complete crock, but we'll just leave it - * and caste types as required. - */ -typedef struct _XrmHashBucketRec { - NTable table; - XPointer mbstate; - XrmMethods methods; -} XrmHashBucketRec; - -/* closure used in get/put resource */ -typedef struct _VClosure { - XrmRepresentation *type; /* type of value */ - XrmValuePtr value; /* value itself */ -} VClosureRec, *VClosure; - -/* closure used in get search list */ -typedef struct _SClosure { - LTable *list; /* search list */ - int idx; /* index of last filled element */ - int limit; /* maximum index */ -} SClosureRec, *SClosure; - -/* placed in XrmSearchList to indicate next table is loose only */ -#define LOOSESEARCH ((LTable)1) - -/* closure used in enumerate database */ -typedef struct _EClosure { - XrmDatabase db; /* the database */ - DBEnumProc proc; /* the user proc */ - XPointer closure; /* the user closure */ - XrmBindingList bindings; /* binding list */ - XrmQuarkList quarks; /* quark list */ - int mode; /* XrmEnum */ -} EClosureRec, *EClosure; - -/* predicate to determine when to resize a hash table */ -#define GrowthPred(n,m) ((unsigned)(n) > (((m) + 1) << 2)) - -#define GROW(prev) \ - if (GrowthPred((*prev)->entries, (*prev)->mask)) \ - GrowTable(prev) - -/* pick a reasonable value for maximum depth of resource database */ -#define MAXDBDEPTH 100 - -/* macro used in get/search functions */ - -/* find an entry named ename, with leafness given by leaf */ -#define NFIND(ename) \ - q = ename; \ - entry = NodeHash(table, q); \ - while (entry && entry->name != q) \ - entry = entry->next; \ - if (leaf && entry && !entry->leaf) { \ - entry = entry->next; \ - if (entry && !entry->leaf) \ - entry = entry->next; \ - if (entry && entry->name != q) \ - entry = (NTable)NULL; \ - } - -/* resourceQuarks keeps track of what quarks have been associated with values - * in all LTables. If a quark has never been used in an LTable, we don't need - * to bother looking for it. - */ - -static unsigned char *resourceQuarks = (unsigned char *)NULL; -static XrmQuark maxResourceQuark = -1; - -/* determines if a quark has been used for a value in any database */ -#define IsResourceQuark(q) ((q) > 0 && (q) <= maxResourceQuark && \ - resourceQuarks[(q) >> 3] & (1 << ((q) & 7))) - -typedef unsigned char XrmBits; - -#define BSLASH ((XrmBits) (1 << 5)) -#define NORMAL ((XrmBits) (1 << 4)) -#define EOQ ((XrmBits) (1 << 3)) -#define SEP ((XrmBits) (1 << 2)) -#define ENDOF ((XrmBits) (1 << 1)) -#define SPACE (NORMAL|EOQ|SEP|(XrmBits)0) -#define RSEP (NORMAL|EOQ|SEP|(XrmBits)1) -#define EOS (EOQ|SEP|ENDOF|(XrmBits)0) -#define EOL (EOQ|SEP|ENDOF|(XrmBits)1) -#define BINDING (NORMAL|EOQ) -#define ODIGIT (NORMAL|(XrmBits)1) - -#define next_char(ch,str) xrmtypes[(unsigned char)((ch) = *(++(str)))] -#define next_mbchar(ch,len,str) xrmtypes[(unsigned char)(ch = (*db->methods->mbchar)(db->mbstate, str, &len), str += len, ch)] - -#define is_space(bits) ((bits) == SPACE) -#define is_EOQ(bits) ((bits) & EOQ) -#define is_EOF(bits) ((bits) == EOS) -#define is_EOL(bits) ((bits) & ENDOF) -#define is_binding(bits) ((bits) == BINDING) -#define is_odigit(bits) ((bits) == ODIGIT) -#define is_separator(bits) ((bits) & SEP) -#define is_nonpcs(bits) (!(bits)) -#define is_normal(bits) ((bits) & NORMAL) -#define is_simple(bits) ((bits) & (NORMAL|BSLASH)) -#define is_special(bits) ((bits) & (ENDOF|BSLASH)) - -/* parsing types */ -static XrmBits Const xrmtypes[256] = { - EOS,0,0,0,0,0,0,0, - 0,SPACE,EOL,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0, - SPACE,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,BINDING,NORMAL,NORMAL,NORMAL,BINDING,NORMAL, - ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT, - NORMAL,NORMAL,RSEP,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,BSLASH,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL, - NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,0 - /* The rest will be automatically initialized to zero. */ -}; - -void XrmInitialize(void) -{ - XrmQString = XrmPermStringToQuark("String"); - XrmQANY = XrmPermStringToQuark("?"); -} - -#ifdef NOT_IN_SERVER -XrmDatabase XrmGetDatabase(Display *display) -{ - return display->db; -} - -void XrmSetDatabase( - Display *display, - XrmDatabase database) -{ - display->db = database; -} -#endif /* NOT_IN_SERVER */ - -void XrmStringToQuarkList( - register _Xconst char *name, - register XrmQuarkList quarks) /* RETURN */ -{ - register XrmBits bits; - register Signature sig = 0; - register char ch; - register const char *tname; - register int i = 0; - - if ((tname = name) != 0) { - tname--; - while (!is_EOF(bits = next_char(ch, tname))) { - if (is_binding (bits)) { - if (i) { - /* Found a complete name */ - *quarks++ = _XrmInternalStringToQuark(name,tname - name, - sig, False); - i = 0; - sig = 0; - } - name = tname+1; - } - else { - sig = (sig << 1) + ch; /* Compute the signature. */ - i++; - } - } - *quarks++ = _XrmInternalStringToQuark(name, tname - name, sig, False); - } - *quarks = NULLQUARK; -} - -void XrmStringToBindingQuarkList( - register _Xconst char *name, - register XrmBindingList bindings, /* RETURN */ - register XrmQuarkList quarks) /* RETURN */ -{ - register XrmBits bits; - register Signature sig = 0; - register char ch, *tname; - register XrmBinding binding; - register int i = 0; - - if ((tname = (char *)name) != 0) { - tname--; - binding = XrmBindTightly; - while (!is_EOF(bits = next_char(ch, tname))) { - if (is_binding (bits)) { - if (i) { - /* Found a complete name */ - *bindings++ = binding; - *quarks++ = _XrmInternalStringToQuark(name, tname - name, - sig, False); - - i = 0; - sig = 0; - binding = XrmBindTightly; - } - name = tname+1; - - if (ch == '*') - binding = XrmBindLoosely; - } - else { - sig = (sig << 1) + ch; /* Compute the signature. */ - i++; - } - } - *bindings = binding; - *quarks++ = _XrmInternalStringToQuark(name, tname - name, sig, False); - } - *quarks = NULLQUARK; -} - -#ifdef DEBUG - -static void PrintQuarkList( - XrmQuarkList quarks, - FILE *stream) -{ - Bool firstNameSeen; - - for (firstNameSeen = False; *quarks; quarks++) { - if (firstNameSeen) { - (void) fprintf(stream, "."); - } - firstNameSeen = True; - (void) fputs(XrmQuarkToString(*quarks), stream); - } -} /* PrintQuarkList */ - -#endif /* DEBUG */ - -/*ARGSUSED*/ -static void mbnoop(XPointer state) -{ -} - -/*ARGSUSED*/ -static char mbchar( - XPointer state, - char *str, - int *lenp) -{ - *lenp = 1; - return *str; -} - -/*ARGSUSED*/ -static char *lcname(XPointer state) -{ - return "C"; -} - -static RConst XrmMethodsRec mb_methods = { - mbnoop, - mbchar, - mbnoop, - lcname, - mbnoop -}; - -static XrmDatabase NewDatabase(void) -{ - register XrmDatabase db; - - db = (XrmDatabase) xalloc(sizeof(XrmHashBucketRec)); - if (db) { - db->table = (NTable)NULL; - db->mbstate = (XPointer)NULL; -#ifdef NOT_IN_SERVER - db->methods = _XrmInitParseInfo(&db->mbstate); -#else - db->methods = (XrmMethods) NULL; -#endif /* NOT_IN_SERVER */ - if (!db->methods) - db->methods = (XrmMethods)&mb_methods; - } - return db; -} - -/* move all values from ftable to ttable, and free ftable's buckets. - * ttable is quaranteed empty to start with. - */ -static void MoveValues(LTable ftable, register LTable ttable) -{ - register VEntry fentry, nfentry; - register VEntry *prev; - register VEntry *bucket; - register VEntry tentry; - register int i; - - for (i = ftable->table.mask, bucket = ftable->buckets; i >= 0; i--) { - for (fentry = *bucket++; fentry; fentry = nfentry) { - prev = &LeafHash(ttable, fentry->name); - tentry = *prev; - *prev = fentry; - /* chain on all with same name, to preserve invariant order */ - while ((nfentry = fentry->next) && nfentry->name == fentry->name) - fentry = nfentry; - fentry->next = tentry; - } - } - xfree((char *)ftable->buckets); -} - -/* move all tables from ftable to ttable, and free ftable. - * ttable is quaranteed empty to start with. - */ -static void MoveTables(NTable ftable, register NTable ttable) -{ - register NTable fentry, nfentry; - register NTable *prev; - register NTable *bucket; - register NTable tentry; - register int i; - - for (i = ftable->mask, bucket = NodeBuckets(ftable); i >= 0; i--) { - for (fentry = *bucket++; fentry; fentry = nfentry) { - prev = &NodeHash(ttable, fentry->name); - tentry = *prev; - *prev = fentry; - /* chain on all with same name, to preserve invariant order */ - while ((nfentry = fentry->next) && nfentry->name == fentry->name) - fentry = nfentry; - fentry->next = tentry; - } - } - xfree((char *)ftable); -} - -/* grow the table, based on current number of entries */ -static void GrowTable(NTable *prev) -{ - register NTable table; - register int i; - - table = *prev; - i = table->mask; - if (i == 255) /* biggest it gets */ - return; - while (i < 255 && GrowthPred(table->entries, i)) - i = (i << 1) + 1; - i++; /* i is now the new size */ - if (table->leaf) { - register LTable ltable; - LTableRec otable; - - ltable = (LTable)table; - /* cons up a copy to make MoveValues look symmetric */ - otable = *ltable; - ltable->buckets = (VEntry *)xalloc(i * sizeof(VEntry)); - if (!ltable->buckets) { - ltable->buckets = otable.buckets; - return; - } - ltable->table.mask = i - 1; - bzero((char *)ltable->buckets, i * sizeof(VEntry)); - MoveValues(&otable, ltable); - } else { - register NTable ntable; - - ntable = (NTable)xalloc(sizeof(NTableRec) + i * sizeof(NTable)); - if (!ntable) - return; - *ntable = *table; - ntable->mask = i - 1; - bzero((char *)NodeBuckets(ntable), i * sizeof(NTable)); - *prev = ntable; - MoveTables(table, ntable); - } -} - -/* merge values from ftable into *pprev, destroy ftable in the process */ -static void MergeValues(LTable ftable, NTable *pprev, Bool override) -{ - register VEntry fentry, tentry; - register VEntry *prev; - register LTable ttable; - VEntry *bucket; - int i; - register XrmQuark q; - - ttable = (LTable)*pprev; - if (ftable->table.hasloose) - ttable->table.hasloose = 1; - for (i = ftable->table.mask, bucket = ftable->buckets; - i >= 0; - i--, bucket++) { - for (fentry = *bucket; fentry; ) { - q = fentry->name; - prev = &LeafHash(ttable, q); - tentry = *prev; - while (tentry && tentry->name != q) - tentry = *(prev = &tentry->next); - /* note: test intentionally uses fentry->name instead of q */ - /* permits serendipitous inserts */ - while (tentry && tentry->name == fentry->name) { - /* if tentry is earlier, skip it */ - if (!fentry->tight && tentry->tight) { - tentry = *(prev = &tentry->next); - continue; - } - if (fentry->tight != tentry->tight) { - /* no match, chain in fentry */ - *prev = fentry; - prev = &fentry->next; - fentry = *prev; - *prev = tentry; - ttable->table.entries++; - } else if (override) { - /* match, chain in fentry, splice out and free tentry */ - *prev = fentry; - prev = &fentry->next; - fentry = *prev; - *prev = tentry->next; - /* free the overridden entry */ - xfree((char *)tentry); - /* get next tentry */ - tentry = *prev; - } else { - /* match, discard fentry */ - prev = &tentry->next; - tentry = fentry; /* use as a temp var */ - fentry = fentry->next; - /* free the overpowered entry */ - xfree((char *)tentry); - /* get next tentry */ - tentry = *prev; - } - if (!fentry) - break; - } - /* at this point, tentry cannot match any fentry named q */ - /* chain in all bindings together, preserve invariant order */ - while (fentry && fentry->name == q) { - *prev = fentry; - prev = &fentry->next; - fentry = *prev; - *prev = tentry; - ttable->table.entries++; - } - } - } - xfree((char *)ftable->buckets); - xfree((char *)ftable); - /* resize if necessary, now that we're all done */ - GROW(pprev); -} - -/* merge tables from ftable into *pprev, destroy ftable in the process */ -static void MergeTables(NTable ftable, NTable *pprev, Bool override) -{ - register NTable fentry, tentry; - NTable nfentry; - register NTable *prev; - register NTable ttable; - NTable *bucket; - int i; - register XrmQuark q; - - ttable = *pprev; - if (ftable->hasloose) - ttable->hasloose = 1; - if (ftable->hasany) - ttable->hasany = 1; - for (i = ftable->mask, bucket = NodeBuckets(ftable); - i >= 0; - i--, bucket++) { - for (fentry = *bucket; fentry; ) { - q = fentry->name; - prev = &NodeHash(ttable, q); - tentry = *prev; - while (tentry && tentry->name != q) - tentry = *(prev = &tentry->next); - /* note: test intentionally uses fentry->name instead of q */ - /* permits serendipitous inserts */ - while (tentry && tentry->name == fentry->name) { - /* if tentry is earlier, skip it */ - if ((fentry->leaf && !tentry->leaf) || - (!fentry->tight && tentry->tight && - (fentry->leaf || !tentry->leaf))) { - tentry = *(prev = &tentry->next); - continue; - } - nfentry = fentry->next; - if (fentry->leaf != tentry->leaf || - fentry->tight != tentry->tight) { - /* no match, just chain in */ - *prev = fentry; - *(prev = &fentry->next) = tentry; - ttable->entries++; - } else { - if (fentry->leaf) - MergeValues((LTable)fentry, prev, override); - else - MergeTables(fentry, prev, override); - /* bump to next tentry */ - tentry = *(prev = &(*prev)->next); - } - /* bump to next fentry */ - fentry = nfentry; - if (!fentry) - break; - } - /* at this point, tentry cannot match any fentry named q */ - /* chain in all bindings together, preserve invariant order */ - while (fentry && fentry->name == q) { - *prev = fentry; - prev = &fentry->next; - fentry = *prev; - *prev = tentry; - ttable->entries++; - } - } - } - xfree((char *)ftable); - /* resize if necessary, now that we're all done */ - GROW(pprev); -} - -void XrmCombineDatabase(XrmDatabase from, XrmDatabase *into, Bool override) -{ - register NTable *prev; - register NTable ftable, ttable, nftable; - - if (!*into) { - *into = from; - } else if (from) { - if ((ftable = from->table) != 0) { - prev = &(*into)->table; - ttable = *prev; - if (!ftable->leaf) { - nftable = ftable->next; - if (ttable && !ttable->leaf) { - /* both have node tables, merge them */ - MergeTables(ftable, prev, override); - /* bump to into's leaf table, if any */ - ttable = *(prev = &(*prev)->next); - } else { - /* into has no node table, link from's in */ - *prev = ftable; - *(prev = &ftable->next) = ttable; - } - /* bump to from's leaf table, if any */ - ftable = nftable; - } else { - /* bump to into's leaf table, if any */ - if (ttable && !ttable->leaf) - ttable = *(prev = &ttable->next); - } - if (ftable) { - /* if into has a leaf, merge, else insert */ - if (ttable) - MergeValues((LTable)ftable, prev, override); - else - *prev = ftable; - } - } - (from->methods->destroy)(from->mbstate); - xfree((char *)from); - } -} - -void XrmMergeDatabases(XrmDatabase from, XrmDatabase *into) -{ - XrmCombineDatabase(from, into, True); -} - -/* store a value in the database, overriding any existing entry */ -static void PutEntry( - XrmDatabase db, - XrmBindingList bindings, - XrmQuarkList quarks, - XrmRepresentation type, - XrmValuePtr value) -{ - register NTable *pprev, *prev; - register NTable table; - register XrmQuark q; - register VEntry *vprev; - register VEntry entry; - NTable *nprev, *firstpprev; - -#define NEWTABLE(q,i) \ - table = (NTable)xalloc(sizeof(LTableRec)); \ - if (!table) \ - return; \ - table->name = q; \ - table->hasloose = 0; \ - table->hasany = 0; \ - table->mask = 0; \ - table->entries = 0; \ - if (quarks[i]) { \ - table->leaf = 0; \ - nprev = NodeBuckets(table); \ - } else { \ - table->leaf = 1; \ - if (!(nprev = (NTable *)xalloc(sizeof(VEntry *)))) \ - return; \ - ((LTable)table)->buckets = (VEntry *)nprev; \ - } \ - *nprev = (NTable)NULL; \ - table->next = *prev; \ - *prev = table - - if (!db || !*quarks) - return; - table = *(prev = &db->table); - /* if already at leaf, bump to the leaf table */ - if (!quarks[1] && table && !table->leaf) - table = *(prev = &table->next); - pprev = prev; - if (!table || (quarks[1] && table->leaf)) { - /* no top-level node table, create one and chain it in */ - NEWTABLE(NULLQUARK,1); - table->tight = 1; /* arbitrary */ - prev = nprev; - } else { - /* search along until we need a value */ - while (quarks[1]) { - q = *quarks; - table = *(prev = &NodeHash(table, q)); - while (table && table->name != q) - table = *(prev = &table->next); - if (!table) - break; /* not found */ - if (quarks[2]) { - if (table->leaf) - break; /* not found */ - } else { - if (!table->leaf) { - /* bump to leaf table, if any */ - table = *(prev = &table->next); - if (!table || table->name != q) - break; /* not found */ - if (!table->leaf) { - /* bump to leaf table, if any */ - table = *(prev = &table->next); - if (!table || table->name != q) - break; /* not found */ - } - } - } - if (*bindings == XrmBindTightly) { - if (!table->tight) - break; /* not found */ - } else { - if (table->tight) { - /* bump to loose table, if any */ - table = *(prev = &table->next); - if (!table || table->name != q || - !quarks[2] != table->leaf) - break; /* not found */ - } - } - /* found that one, bump to next quark */ - pprev = prev; - quarks++; - bindings++; - } - if (!quarks[1]) { - /* found all the way to a leaf */ - q = *quarks; - entry = *(vprev = &LeafHash((LTable)table, q)); - while (entry && entry->name != q) - entry = *(vprev = &entry->next); - /* if want loose and have tight, bump to next entry */ - if (entry && *bindings == XrmBindLoosely && entry->tight) - entry = *(vprev = &entry->next); - if (entry && entry->name == q && - (*bindings == XrmBindTightly) == entry->tight) { - /* match, need to override */ - if ((type == XrmQString) == entry->string && - entry->size == value->size) { - /* update type if not String, can be different */ - if (!entry->string) - RepType(entry) = type; - /* identical size, just overwrite value */ - bcopy((char *)value->addr, RawValue(entry), value->size); - return; - } - /* splice out and free old entry */ - *vprev = entry->next; - xfree((char *)entry); - (*pprev)->entries--; - } - /* this is where to insert */ - prev = (NTable *)vprev; - } - } - /* keep the top table, because we may have to grow it */ - firstpprev = pprev; - /* iterate until we get to the leaf */ - while (quarks[1]) { - /* build a new table and chain it in */ - NEWTABLE(*quarks,2); - if (*quarks++ == XrmQANY) - (*pprev)->hasany = 1; - if (*bindings++ == XrmBindTightly) { - table->tight = 1; - } else { - table->tight = 0; - (*pprev)->hasloose = 1; - } - (*pprev)->entries++; - pprev = prev; - prev = nprev; - } - /* now allocate the value entry */ - entry = (VEntry)xalloc(((type == XrmQString) ? - sizeof(VEntryRec) : sizeof(DEntryRec)) + - value->size); - if (!entry) - return; - entry->name = q = *quarks; - if (*bindings == XrmBindTightly) { - entry->tight = 1; - } else { - entry->tight = 0; - (*pprev)->hasloose = 1; - } - /* chain it in, with a bit of type cast ugliness */ - entry->next = *((VEntry *)prev); - *((VEntry *)prev) = entry; - entry->size = value->size; - if (type == XrmQString) { - entry->string = 1; - } else { - entry->string = 0; - RepType(entry) = type; - } - /* save a copy of the value */ - bcopy((char *)value->addr, RawValue(entry), value->size); - (*pprev)->entries++; - /* this is a new leaf, need to remember it for search lists */ - if (q > maxResourceQuark) { - unsigned oldsize = (maxResourceQuark + 1) >> 3; - unsigned size = ((q | 0x7f) + 1) >> 3; /* reallocate in chunks */ - if (resourceQuarks) - resourceQuarks = (unsigned char *)xrealloc((char *)resourceQuarks, - size); - else - resourceQuarks = (unsigned char *)xalloc(size); - if (resourceQuarks) { - bzero((char *)&resourceQuarks[oldsize], size - oldsize); - maxResourceQuark = (size << 3) - 1; - } else { - maxResourceQuark = -1; - } - } - if (q > 0 && resourceQuarks) - resourceQuarks[q >> 3] |= 1 << (q & 0x7); - GROW(firstpprev); - -#undef NEWTABLE -} - -void XrmQPutResource( - XrmDatabase *pdb, - XrmBindingList bindings, - XrmQuarkList quarks, - XrmRepresentation type, - XrmValuePtr value) -{ - if (!*pdb) *pdb = NewDatabase(); - PutEntry(*pdb, bindings, quarks, type, value); -} - -void XrmPutResource( - XrmDatabase *pdb, - _Xconst char *specifier, - _Xconst char *type, - XrmValuePtr value) -{ - XrmBinding bindings[MAXDBDEPTH+1]; - XrmQuark quarks[MAXDBDEPTH+1]; - - if (!*pdb) *pdb = NewDatabase(); - XrmStringToBindingQuarkList(specifier, bindings, quarks); - PutEntry(*pdb, bindings, quarks, XrmStringToQuark(type), value); -} - -void XrmQPutStringResource( - XrmDatabase *pdb, - XrmBindingList bindings, - XrmQuarkList quarks, - _Xconst char *str) -{ - XrmValue value; - - if (!*pdb) *pdb = NewDatabase(); - value.addr = (XPointer) str; - value.size = strlen(str)+1; - PutEntry(*pdb, bindings, quarks, XrmQString, &value); -} - -/* Function Name: GetDatabase - * Description: Parses a string and stores it as a database. - * Arguments: db - the database. - * str - a pointer to the string containing the database. - * filename - source filename, if any. - * doall - whether to do all lines or just one - */ - -/* - * This function is highly optimized to inline as much as possible. - * Be very careful with modifications, or simplifications, as they - * may adversely affect the performance. - * - * Chris Peterson, MIT X Consortium 5/17/90. - */ - -/* - * Xlib spec says max 100 quarks in a lookup, will stop and return if - * return if any single production's lhs has more than 100 components. - */ -#define QLIST_SIZE 100 - -/* - * This should be big enough to handle things like the XKeysymDB or biggish - * ~/.Xdefaults or app-defaults files. Anything bigger will be allocated on - * the heap. - */ -#define DEF_BUFF_SIZE 8192 - -static void GetIncludeFile(XrmDatabase /* db */, _Xconst char * /*base */, _Xconst char * /*fname */, int /*fnamelen */); - -static void GetDatabase( - XrmDatabase db, - register char *str, - _Xconst char *filename, - Bool doall) -{ - char *rhs; - char *lhs, lhs_s[DEF_BUFF_SIZE]; - XrmQuark quarks[QLIST_SIZE + 1]; /* allow for a terminal NullQuark */ - XrmBinding bindings[QLIST_SIZE + 1]; - - register char *ptr; - register XrmBits bits = 0; - register char c; - register Signature sig; - register char *ptr_max; - register int num_quarks; - register XrmBindingList t_bindings; - - int len, alloc_chars; - unsigned long str_len; - XrmValue value; - Bool only_pcs; - Bool dolines; - - if (!db) - return; - - /* - * if strlen (str) < DEF_BUFF_SIZE allocate buffers on the stack for - * speed otherwise malloc the buffer. From a buffer overflow standpoint - * we can be sure that neither: a) a component on the lhs, or b) a - * value on the rhs, will be longer than the overall length of str, - * i.e. strlen(str). - * - * This should give good performance when parsing "*foo: bar" type - * databases as might be passed with -xrm command line options; but - * with larger databases, e.g. .Xdefaults, app-defaults, or KeysymDB - * files, the size of the buffers will be overly large. One way - * around this would be to double-parse each production with a resulting - * performance hit. In any event we can be assured that a lhs component - * name or a rhs value won't be longer than str itself. - */ - - str_len = strlen (str); - if (DEF_BUFF_SIZE > str_len) lhs = lhs_s; - else if ((lhs = (char*) xalloc (str_len)) == NULL) - return; - - alloc_chars = DEF_BUFF_SIZE < str_len ? str_len : DEF_BUFF_SIZE; - if ((rhs = (char*) xalloc (alloc_chars)) == NULL) { - if (lhs != lhs_s) Xfree (lhs); - return; - } - - (*db->methods->mbinit)(db->mbstate); - str--; - dolines = True; - while (!is_EOF(bits) && dolines) { - dolines = doall; - - /* - * First: Remove extra whitespace. - */ - - do { - bits = next_char(c, str); - } while is_space(bits); - - /* - * Ignore empty lines. - */ - - if (is_EOL(bits)) - continue; /* start a new line. */ - - /* - * Second: check the first character in a line to see if it is - * "!" signifying a comment, or "#" signifying a directive. - */ - - if (c == '!') { /* Comment, spin to next newline */ - while (is_simple(bits = next_char(c, str))) {} - if (is_EOL(bits)) - continue; - while (!is_EOL(bits = next_mbchar(c, len, str))) {} - str--; - continue; /* start a new line. */ - } - - if (c == '#') { /* Directive */ - /* remove extra whitespace */ - only_pcs = True; - while (is_space(bits = next_char(c, str))) {}; - /* only "include" directive is currently defined */ - if (!strncmp(str, "include", 7)) { - str += (7-1); - /* remove extra whitespace */ - while (is_space(bits = next_char(c, str))) {}; - /* must have a starting " */ - if (c == '"') { - char *fname = str+1; - len = 0; - do { - if (only_pcs) { - bits = next_char(c, str); - if (is_nonpcs(bits)) - only_pcs = False; - } - if (!only_pcs) - bits = next_mbchar(c, len, str); - } while (c != '"' && !is_EOL(bits)); - /* must have an ending " */ - if (c == '"') - GetIncludeFile(db, filename, fname, str - len - fname); - } - } - /* spin to next newline */ - if (only_pcs) { - while (is_simple(bits)) - bits = next_char(c, str); - if (is_EOL(bits)) - continue; - } - while (!is_EOL(bits)) - bits = next_mbchar(c, len, str); - str--; - continue; /* start a new line. */ - } - - /* - * Third: loop through the LHS of the resource specification - * storing characters and converting this to a Quark. - */ - - num_quarks = 0; - t_bindings = bindings; - - sig = 0; - ptr = lhs; - *t_bindings = XrmBindTightly; - for(;;) { - if (!is_binding(bits)) { - while (!is_EOQ(bits)) { - *ptr++ = c; - sig = (sig << 1) + c; /* Compute the signature. */ - bits = next_char(c, str); - } - - quarks[num_quarks++] = - _XrmInternalStringToQuark(lhs, ptr - lhs, sig, False); - - if (num_quarks > QLIST_SIZE) { - Xfree(rhs); - if (lhs != lhs_s) Xfree (lhs); - (*db->methods->mbfinish)(db->mbstate); - return; - } - - if (is_separator(bits)) { - if (!is_space(bits)) - break; - - /* Remove white space */ - do { - *ptr++ = c; - sig = (sig << 1) + c; /* Compute the signature. */ - } while (is_space(bits = next_char(c, str))); - - /* - * The spec doesn't permit it, but support spaces - * internal to resource name/class - */ - - if (is_separator(bits)) - break; - num_quarks--; - continue; - } - - if (c == '.') - *(++t_bindings) = XrmBindTightly; - else - *(++t_bindings) = XrmBindLoosely; - - sig = 0; - ptr = lhs; - } - else { - /* - * Magic unspecified feature #254. - * - * If two separators appear with no Text between them then - * ignore them. - * - * If anyone of those separators is a '*' then the binding - * will be loose, otherwise it will be tight. - */ - - if (c == '*') - *t_bindings = XrmBindLoosely; - } - - bits = next_char(c, str); - } - - quarks[num_quarks] = NULLQUARK; - - /* - * Make sure that there is a ':' in this line. - */ - - if (c != ':') { - char oldc; - - /* - * A parsing error has occured, toss everything on the line - * a new_line can still be escaped with a '\'. - */ - - while (is_normal(bits)) - bits = next_char(c, str); - if (is_EOL(bits)) - continue; - bits = next_mbchar(c, len, str); - do { - oldc = c; - bits = next_mbchar(c, len, str); - } while (c && (c != '\n' || oldc == '\\')); - str--; - continue; - } - - /* - * I now have a quark and binding list for the entire left hand - * side. "c" currently points to the ":" separating the left hand - * side for the right hand side. It is time to begin processing - * the right hand side. - */ - - /* - * Fourth: Remove more whitespace - */ - - for(;;) { - if (is_space(bits = next_char(c, str))) - continue; - if (c != '\\') - break; - bits = next_char(c, str); - if (c == '\n') - continue; - str--; - bits = BSLASH; - c = '\\'; - break; - } - - /* - * Fifth: Process the right hand side. - */ - - ptr = rhs; - ptr_max = ptr + alloc_chars - 4; - only_pcs = True; - len = 1; - - for(;;) { - - /* - * Tight loop for the normal case: Non backslash, non-end of value - * character that will fit into the allocated buffer. - */ - - if (only_pcs) { - while (is_normal(bits) && ptr < ptr_max) { - *ptr++ = c; - bits = next_char(c, str); - } - if (is_EOL(bits)) - break; - if (is_nonpcs(bits)) { - only_pcs = False; - bits = next_mbchar(c, len, str); - } - } - while (!is_special(bits) && ptr + len <= ptr_max) { - len = -len; - while (len) - *ptr++ = str[len++]; - bits = next_mbchar(c, len, str); - } - - if (is_EOL(bits)) { - str--; - break; - } - - if (c == '\\') { - /* - * We need to do some magic after a backslash. - */ - - if (only_pcs) { - bits = next_char(c, str); - if (is_nonpcs(bits)) - only_pcs = False; - } - if (!only_pcs) - bits = next_mbchar(c, len, str); - - if (is_EOL(bits)) { - if (is_EOF(bits)) - continue; - } else if (c == 'n') { - /* - * "\n" means insert a newline. - */ - *ptr++ = '\n'; - } else if (c == '\\') { - /* - * "\\" completes to just one backslash. - */ - *ptr++ = '\\'; - } else { - /* - * pick up to three octal digits after the '\'. - */ - char temp[3]; - int count = 0; - while (is_odigit(bits) && count < 3) { - temp[count++] = c; - if (only_pcs) { - bits = next_char(c, str); - if (is_nonpcs(bits)) - only_pcs = False; - } - if (!only_pcs) - bits = next_mbchar(c, len, str); - } - - /* - * If we found three digits then insert that octal code - * into the value string as a character. - */ - - if (count == 3) { - *ptr++ = (unsigned char) ((temp[0] - '0') * 0100 + - (temp[1] - '0') * 010 + - (temp[2] - '0')); - } - else { - int tcount; - - /* - * Otherwise just insert those characters into the - * string, since no special processing is needed on - * numerics we can skip the special processing. - */ - - for (tcount = 0; tcount < count; tcount++) { - *ptr++ = temp[tcount]; /* print them in - the correct order */ - } - } - continue; - } - if (only_pcs) { - bits = next_char(c, str); - if (is_nonpcs(bits)) - only_pcs = False; - } - if (!only_pcs) - bits = next_mbchar(c, len, str); - } - - /* - * It is important to make sure that there is room for at least - * four more characters in the buffer, since I can add that - * many characters into the buffer after a backslash has occured. - */ - - if (ptr + len > ptr_max) { - char * temp_str; - - alloc_chars += BUFSIZ/10; - temp_str = (char *)xrealloc(rhs, sizeof(char) * alloc_chars); - - if (!temp_str) { - xfree(rhs); - if (lhs != lhs_s) xfree(lhs); - (*db->methods->mbfinish)(db->mbstate); - return; - } - - ptr = temp_str + (ptr - rhs); /* reset pointer. */ - rhs = temp_str; - ptr_max = rhs + alloc_chars - 4; - } - } - - /* - * Lastly: Terminate the value string, and store this entry - * into the database. - */ - - *ptr++ = '\0'; - - /* Store it in database */ - value.size = ptr - rhs; - value.addr = (XPointer) rhs; - - PutEntry(db, bindings, quarks, XrmQString, &value); - } - - if (lhs != lhs_s) xfree (lhs); - xfree(rhs); - (*db->methods->mbfinish)(db->mbstate); -} - -void XrmPutStringResource( - XrmDatabase *pdb, - _Xconst char*specifier, - _Xconst char*str) -{ - XrmValue value; - XrmBinding bindings[MAXDBDEPTH+1]; - XrmQuark quarks[MAXDBDEPTH+1]; - - if (!*pdb) *pdb = NewDatabase(); - XrmStringToBindingQuarkList(specifier, bindings, quarks); - value.addr = (XPointer) str; - value.size = strlen(str)+1; - PutEntry(*pdb, bindings, quarks, XrmQString, &value); -} - - -void XrmPutLineResource( - XrmDatabase *pdb, - _Xconst char*line) -{ - if (!*pdb) *pdb = NewDatabase(); - GetDatabase(*pdb, (char *)line, (char *)NULL, False); -} - -XrmDatabase XrmGetStringDatabase( - _Xconst char *data) -{ - XrmDatabase db; - - db = NewDatabase(); - GetDatabase(db, (char *)data, (char *)NULL, True); - return db; -} - -/* Function Name: ReadInFile - * Description: Reads the file into a buffer. - * Arguments: filename - the name of the file. - * Returns: An allocated string containing the contents of the file. - */ - -static char * -ReadInFile(_Xconst char * filename) -{ - register int fd, size; - char * filebuf; - - if ( (fd = OpenFile(filename)) == -1 ) - return (char *)NULL; - - GetSizeOfFile(filename, size); - - if (!(filebuf = (char *)xalloc(size + 1))) { /* leave room for '\0' */ - close(fd); - return (char *)NULL; - } - - if (ReadFile(fd, filebuf, size) != size) { /* If we didn't read the - correct number of bytes. */ - CloseFile(fd); - xfree(filebuf); - return (char *)NULL; - } - CloseFile(fd); - - filebuf[size] = '\0'; /* NULL terminate it. */ - return filebuf; -} - -static void -GetIncludeFile( - XrmDatabase db, - _Xconst char *base, - _Xconst char *fname, - int fnamelen) -{ - int len; - char *str; - char realfname[BUFSIZ]; - - if (fnamelen <= 0 || fnamelen >= BUFSIZ) - return; - if (*fname != '/' && base && (str = rindex(base, '/'))) { - len = str - base + 1; - if (len + fnamelen >= BUFSIZ) - return; - strncpy(realfname, base, len); - strncpy(realfname + len, fname, fnamelen); - realfname[len + fnamelen] = '\0'; - } else { - strncpy(realfname, fname, fnamelen); - realfname[fnamelen] = '\0'; - } - if (!(str = ReadInFile(realfname))) - return; - GetDatabase(db, str, realfname, True); - xfree(str); -} - -XrmDatabase XrmGetFileDatabase( - _Xconst char *filename) -{ - XrmDatabase db; - char *str; - - if (!(str = ReadInFile(filename))) - return (XrmDatabase)NULL; - - db = NewDatabase(); - GetDatabase(db, str, filename, True); - xfree(str); - return db; -} - -Status XrmCombineFileDatabase( - _Xconst char *filename, - XrmDatabase *target, - Bool override) -{ - XrmDatabase db; - char *str; - - if (!(str = ReadInFile(filename))) - return 0; - if (override) { - db = *target; - if (!db) - *target = db = NewDatabase(); - } else - db = NewDatabase(); - GetDatabase(db, str, filename, True); - xfree(str); - if (!override) - XrmCombineDatabase(db, target, False); - return 1; -} - -/* call the user proc for every value in the table, arbitrary order. - * stop if user proc returns True. level is current depth in database. - */ -/*ARGSUSED*/ -static Bool EnumLTable( - LTable table, - XrmNameList names, - XrmClassList classes, - register int level, - register EClosure closure) -{ - register VEntry *bucket; - register int i; - register VEntry entry; - XrmValue value; - XrmRepresentation type; - Bool tightOk; - - closure->bindings[level] = (table->table.tight ? - XrmBindTightly : XrmBindLoosely); - closure->quarks[level] = table->table.name; - level++; - tightOk = !*names; - closure->quarks[level + 1] = NULLQUARK; - for (i = table->table.mask, bucket = table->buckets; - i >= 0; - i--, bucket++) { - for (entry = *bucket; entry; entry = entry->next) { - if (entry->tight && !tightOk) - continue; - closure->bindings[level] = (entry->tight ? - XrmBindTightly : XrmBindLoosely); - closure->quarks[level] = entry->name; - value.size = entry->size; - if (entry->string) { - type = XrmQString; - value.addr = StringValue(entry); - } else { - type = RepType(entry); - value.addr = DataValue(entry); - } - if ((*closure->proc)(&closure->db, closure->bindings+1, - closure->quarks+1, &type, &value, - closure->closure)) - return True; - } - } - return False; -} - -static Bool EnumAllNTable( - NTable table, - register int level, - register EClosure closure) -{ - register NTable *bucket; - register int i; - register NTable entry; - XrmQuark empty = NULLQUARK; - - if (level >= MAXDBDEPTH) - return False; - for (i = table->mask, bucket = NodeBuckets(table); - i >= 0; - i--, bucket++) { - for (entry = *bucket; entry; entry = entry->next) { - if (entry->leaf) { - if (EnumLTable((LTable)entry, &empty, &empty, level, closure)) - return True; - } else { - closure->bindings[level] = (entry->tight ? - XrmBindTightly : XrmBindLoosely); - closure->quarks[level] = entry->name; - if (EnumAllNTable(entry, level+1, closure)) - return True; - } - } - } - return False; -} - -/* recurse on every table in the table, arbitrary order. - * stop if user proc returns True. level is current depth in database. - */ -static Bool EnumNTable( - NTable table, - XrmNameList names, - XrmClassList classes, - register int level, - register EClosure closure) -{ - register NTable entry; - register XrmQuark q; - register unsigned int leaf; - Bool (*get)(); - Bool bilevel; - -/* find entries named ename, leafness leaf, tight or loose, and call get */ -#define ITIGHTLOOSE(ename) \ - NFIND(ename); \ - if (entry) { \ - if (leaf == entry->leaf) { \ - if (!leaf && !entry->tight && entry->next && \ - entry->next->name == q && entry->next->tight && \ - (bilevel || entry->next->hasloose) && \ - EnumLTable((LTable)entry->next, names+1, classes+1, \ - level, closure)) \ - return True; \ - if ((*get)(entry, names+1, classes+1, level, closure)) \ - return True; \ - if (entry->tight && (entry = entry->next) && \ - entry->name == q && leaf == entry->leaf && \ - (*get)(entry, names+1, classes+1, level, closure)) \ - return True; \ - } else if (entry->leaf) { \ - if ((bilevel || entry->hasloose) && \ - EnumLTable((LTable)entry, names+1, classes+1, level, closure))\ - return True; \ - if (entry->tight && (entry = entry->next) && \ - entry->name == q && (bilevel || entry->hasloose) && \ - EnumLTable((LTable)entry, names+1, classes+1, level, closure))\ - return True; \ - } \ - } - -/* find entries named ename, leafness leaf, loose only, and call get */ -#define ILOOSE(ename) \ - NFIND(ename); \ - if (entry && entry->tight && (entry = entry->next) && entry->name != q) \ - entry = (NTable)NULL; \ - if (entry) { \ - if (leaf == entry->leaf) { \ - if ((*get)(entry, names+1, classes+1, level, closure)) \ - return True; \ - } else if (entry->leaf && (bilevel || entry->hasloose)) { \ - if (EnumLTable((LTable)entry, names+1, classes+1, level, closure))\ - return True; \ - } \ - } - - if (level >= MAXDBDEPTH) - return False; - closure->bindings[level] = (table->tight ? - XrmBindTightly : XrmBindLoosely); - closure->quarks[level] = table->name; - level++; - if (!*names) { - if (EnumAllNTable(table, level, closure)) - return True; - } else { - if (names[1] || closure->mode == XrmEnumAllLevels) { - get = EnumNTable; /* recurse */ - leaf = 0; - bilevel = !names[1]; - } else { - get = EnumLTable; /* bottom of recursion */ - leaf = 1; - bilevel = False; - } - if (table->hasloose && closure->mode == XrmEnumAllLevels) { - NTable *bucket; - int i; - XrmQuark empty = NULLQUARK; - - for (i = table->mask, bucket = NodeBuckets(table); - i >= 0; - i--, bucket++) { - q = NULLQUARK; - for (entry = *bucket; entry; entry = entry->next) { - if (!entry->tight && entry->name != q && - entry->name != *names && entry->name != *classes) { - q = entry->name; - if (entry->leaf) { - if (EnumLTable((LTable)entry, &empty, &empty, - level, closure)) - return True; - } else { - if (EnumNTable(entry, &empty, &empty, - level, closure)) - return True; - } - } - } - } - } - - ITIGHTLOOSE(*names); /* do name, tight and loose */ - ITIGHTLOOSE(*classes); /* do class, tight and loose */ - if (table->hasany) { - ITIGHTLOOSE(XrmQANY); /* do ANY, tight and loose */ - } - if (table->hasloose) { - while (1) { - names++; - classes++; - if (!*names) - break; - if (!names[1] && closure->mode != XrmEnumAllLevels) { - get = EnumLTable; /* bottom of recursion */ - leaf = 1; - } - ILOOSE(*names); /* loose names */ - ILOOSE(*classes); /* loose classes */ - if (table->hasany) { - ILOOSE(XrmQANY); /* loose ANY */ - } - } - names--; - classes--; - } - } - /* now look for matching leaf nodes */ - entry = table->next; - if (!entry) - return False; - if (entry->leaf) { - if (entry->tight && !table->tight) - entry = entry->next; - } else { - entry = entry->next; - if (!entry || !entry->tight) - return False; - } - if (!entry || entry->name != table->name) - return False; - /* found one */ - level--; - if ((!*names || entry->hasloose) && - EnumLTable((LTable)entry, names, classes, level, closure)) - return True; - if (entry->tight && entry == table->next && (entry = entry->next) && - entry->name == table->name && (!*names || entry->hasloose)) - return EnumLTable((LTable)entry, names, classes, level, closure); - return False; - -#undef ITIGHTLOOSE -#undef ILOOSE -} - -/* call the proc for every value in the database, arbitrary order. - * stop if the proc returns True. - */ -Bool XrmEnumerateDatabase( - XrmDatabase db, - XrmNameList names, - XrmClassList classes, - int mode, - DBEnumProc proc, - XPointer closure) -{ - XrmBinding bindings[MAXDBDEPTH+2]; - XrmQuark quarks[MAXDBDEPTH+2]; - register NTable table; - EClosureRec eclosure; - - if (!db) - return False; - eclosure.db = db; - eclosure.proc = proc; - eclosure.closure = closure; - eclosure.bindings = bindings; - eclosure.quarks = quarks; - eclosure.mode = mode; - table = db->table; - if (table && !table->leaf && !*names && mode == XrmEnumOneLevel) - table = table->next; - if (table) { - if (!table->leaf) - return EnumNTable(table, names, classes, 0, &eclosure); - else - return EnumLTable((LTable)table, names, classes, 0, &eclosure); - } - return False; -} - -static void PrintBindingQuarkList( - XrmBindingList bindings, - XrmQuarkList quarks, - FILE *stream) -{ - Bool firstNameSeen; - - for (firstNameSeen = False; *quarks; bindings++, quarks++) { - if (*bindings == XrmBindLoosely) { - (void) fprintf(stream, "*"); - } else if (firstNameSeen) { - (void) fprintf(stream, "."); - } - firstNameSeen = True; - (void) fputs(XrmQuarkToString(*quarks), stream); - } -} - -/* output out the entry in correct file syntax */ -/*ARGSUSED*/ -static Bool DumpEntry( - XrmDatabase *db, - XrmBindingList bindings, - XrmQuarkList quarks, - XrmRepresentation *type, - XrmValuePtr value, - XPointer data) -{ - FILE *stream = (FILE *)data; - register unsigned int i; - register char *s; - register char c; - - if (*type != XrmQString) - (void) putc('!', stream); - PrintBindingQuarkList(bindings, quarks, stream); - s = value->addr; - i = value->size; - if (*type == XrmQString) { - (void) fputs(":\t", stream); - if (i) - i--; - } - else - fprintf(stream, "=%s:\t", XrmRepresentationToString(*type)); - if (i && (*s == ' ' || *s == '\t')) - (void) putc('\\', stream); /* preserve leading whitespace */ - while (i--) { - c = *s++; - if (c == '\n') { - if (i) - (void) fputs("\\n\\\n", stream); - else - (void) fputs("\\n", stream); - } else if (c == '\\') - (void) fputs("\\\\", stream); - else if ((c < ' ' && c != '\t') || - ((unsigned char)c >= 0x7f && (unsigned char)c < 0xa0)) - (void) fprintf(stream, "\\%03o", (unsigned char)c); - else - (void) putc(c, stream); - } - (void) putc('\n', stream); - return False; -} - -#ifdef DEBUG - -void PrintTable( - NTable table, - FILE *file) -{ - XrmBinding bindings[MAXDBDEPTH+1]; - XrmQuark quarks[MAXDBDEPTH+1]; - EClosureRec closure; - XrmQuark empty = NULLQUARK; - - closure.db = (XrmDatabase)NULL; - closure.proc = DumpEntry; - closure.closure = (XPointer)file; - closure.bindings = bindings; - closure.quarks = quarks; - closure.mode = XrmEnumAllLevels; - if (table->leaf) - EnumLTable((LTable)table, &empty, &empty, 0, &closure); - else - EnumNTable(table, &empty, &empty, 0, &closure); -} - -#endif /* DEBUG */ - -void XrmPutFileDatabase( - XrmDatabase db, - _Xconst char *fileName) -{ - FILE *file; - XrmQuark empty = NULLQUARK; - - if (!db) return; - if (!(file = fopen(fileName, "w"))) return; - (void)XrmEnumerateDatabase(db, &empty, &empty, XrmEnumAllLevels, - DumpEntry, (XPointer) file); - fclose(file); -} - -/* macros used in get/search functions */ - -/* find entries named ename, leafness leaf, tight or loose, and call get */ -#define GTIGHTLOOSE(ename,looseleaf) \ - NFIND(ename); \ - if (entry) { \ - if (leaf == entry->leaf) { \ - if (!leaf && !entry->tight && entry->next && \ - entry->next->name == q && entry->next->tight && \ - entry->next->hasloose && \ - looseleaf((LTable)entry->next, names+1, classes+1, closure)) \ - return True; \ - if ((*get)(entry, names+1, classes+1, closure)) \ - return True; \ - if (entry->tight && (entry = entry->next) && \ - entry->name == q && leaf == entry->leaf && \ - (*get)(entry, names+1, classes+1, closure)) \ - return True; \ - } else if (entry->leaf) { \ - if (entry->hasloose && \ - looseleaf((LTable)entry, names+1, classes+1, closure)) \ - return True; \ - if (entry->tight && (entry = entry->next) && \ - entry->name == q && entry->hasloose && \ - looseleaf((LTable)entry, names+1, classes+1, closure)) \ - return True; \ - } \ - } - -/* find entries named ename, leafness leaf, loose only, and call get */ -#define GLOOSE(ename,looseleaf) \ - NFIND(ename); \ - if (entry && entry->tight && (entry = entry->next) && entry->name != q) \ - entry = (NTable)NULL; \ - if (entry) { \ - if (leaf == entry->leaf) { \ - if ((*get)(entry, names+1, classes+1, closure)) \ - return True; \ - } else if (entry->leaf && entry->hasloose) { \ - if (looseleaf((LTable)entry, names+1, classes+1, closure)) \ - return True; \ - } \ - } - -/* add tight/loose entry to the search list, return True if list is full */ -/*ARGSUSED*/ -static Bool AppendLEntry( - LTable table, - XrmNameList names, - XrmClassList classes, - register SClosure closure) -{ - /* check for duplicate */ - if (closure->idx >= 0 && closure->list[closure->idx] == table) - return False; - if (closure->idx == closure->limit) - return True; - /* append it */ - closure->idx++; - closure->list[closure->idx] = table; - return False; -} - -/* add loose entry to the search list, return True if list is full */ -/*ARGSUSED*/ -static Bool AppendLooseLEntry( - LTable table, - XrmNameList names, - XrmClassList classes, - register SClosure closure) -{ - /* check for duplicate */ - if (closure->idx >= 0 && closure->list[closure->idx] == table) - return False; - if (closure->idx >= closure->limit - 1) - return True; - /* append it */ - closure->idx++; - closure->list[closure->idx] = LOOSESEARCH; - closure->idx++; - closure->list[closure->idx] = table; - return False; -} - -/* search for a leaf table */ -static Bool SearchNEntry( - NTable table, - XrmNameList names, - XrmClassList classes, - SClosure closure) -{ - register NTable entry; - register XrmQuark q; - register unsigned int leaf; - Bool (*get)(); - - if (names[1]) { - get = SearchNEntry; /* recurse */ - leaf = 0; - } else { - get = AppendLEntry; /* bottom of recursion */ - leaf = 1; - } - GTIGHTLOOSE(*names, AppendLooseLEntry); /* do name, tight and loose */ - GTIGHTLOOSE(*classes, AppendLooseLEntry); /* do class, tight and loose */ - if (table->hasany) { - GTIGHTLOOSE(XrmQANY, AppendLooseLEntry); /* do ANY, tight and loose */ - } - if (table->hasloose) { - while (1) { - names++; - classes++; - if (!*names) - break; - if (!names[1]) { - get = AppendLEntry; /* bottom of recursion */ - leaf = 1; - } - GLOOSE(*names, AppendLooseLEntry); /* loose names */ - GLOOSE(*classes, AppendLooseLEntry); /* loose classes */ - if (table->hasany) { - GLOOSE(XrmQANY, AppendLooseLEntry); /* loose ANY */ - } - } - } - /* now look for matching leaf nodes */ - entry = table->next; - if (!entry) - return False; - if (entry->leaf) { - if (entry->tight && !table->tight) - entry = entry->next; - } else { - entry = entry->next; - if (!entry || !entry->tight) - return False; - } - if (!entry || entry->name != table->name) - return False; - /* found one */ - if (entry->hasloose && - AppendLooseLEntry((LTable)entry, names, classes, closure)) - return True; - if (entry->tight && entry == table->next && (entry = entry->next) && - entry->name == table->name && entry->hasloose) - return AppendLooseLEntry((LTable)entry, names, classes, closure); - return False; -} - -Bool XrmQGetSearchList( - XrmDatabase db, - XrmNameList names, - XrmClassList classes, - XrmSearchList searchList, /* RETURN */ - int listLength) -{ - register NTable table; - SClosureRec closure; - - if (listLength <= 0) - return False; - closure.list = (LTable *)searchList; - closure.idx = -1; - closure.limit = listLength - 2; - if (db) { - table = db->table; - if (*names) { - if (table && !table->leaf) { - if (SearchNEntry(table, names, classes, &closure)) - return False; - } else if (table && table->hasloose && - AppendLooseLEntry((LTable)table, names, classes, - &closure)) - return False; - } else { - if (table && !table->leaf) - table = table->next; - if (table && AppendLEntry((LTable)table, names, classes, &closure)) - return False; - } - } - closure.list[closure.idx + 1] = (LTable)NULL; - return True; -} - -Bool XrmQGetSearchResource( - XrmSearchList searchList, - register XrmName name, - register XrmClass class, - XrmRepresentation *pType, /* RETURN */ - XrmValue *pValue) /* RETURN */ -{ - register LTable *list; - register LTable table; - register VEntry entry; - int flags; - -/* find tight or loose entry */ -#define VTIGHTLOOSE(q) \ - entry = LeafHash(table, q); \ - while (entry && entry->name != q) \ - entry = entry->next; \ - if (entry) \ - break - -/* find loose entry */ -#define VLOOSE(q) \ - entry = LeafHash(table, q); \ - while (entry && entry->name != q) \ - entry = entry->next; \ - if (entry) { \ - if (!entry->tight) \ - break; \ - if ((entry = entry->next) && entry->name == q) \ - break; \ - } - - list = (LTable *)searchList; - /* figure out which combination of name and class we need to search for */ - flags = 0; - if (IsResourceQuark(name)) - flags = 2; - if (IsResourceQuark(class)) - flags |= 1; - if (!flags) { - /* neither name nor class has ever been used to name a resource */ - table = (LTable)NULL; - } else if (flags == 3) { - /* both name and class */ - while ((table = *list++) != 0) { - if (table != LOOSESEARCH) { - VTIGHTLOOSE(name); /* do name, tight and loose */ - VTIGHTLOOSE(class); /* do class, tight and loose */ - } else { - table = *list++; - VLOOSE(name); /* do name, loose only */ - VLOOSE(class); /* do class, loose only */ - } - } - } else { - /* just one of name or class */ - if (flags == 1) - name = class; - while ((table = *list++) != 0) { - if (table != LOOSESEARCH) { - VTIGHTLOOSE(name); /* tight and loose */ - } else { - table = *list++; - VLOOSE(name); /* loose only */ - } - } - } - if (table) { - /* found a match */ - if (entry->string) { - *pType = XrmQString; - pValue->addr = StringValue(entry); - } else { - *pType = RepType(entry); - pValue->addr = DataValue(entry); - } - pValue->size = entry->size; - return True; - } - *pType = NULLQUARK; - pValue->addr = (XPointer)NULL; - pValue->size = 0; - return False; - -#undef VTIGHTLOOSE -#undef VLOOSE -} - -/* look for a tight/loose value */ -static Bool GetVEntry( - LTable table, - XrmNameList names, - XrmClassList classes, - VClosure closure) -{ - register VEntry entry; - register XrmQuark q; - - /* try name first */ - q = *names; - entry = LeafHash(table, q); - while (entry && entry->name != q) - entry = entry->next; - if (!entry) { - /* not found, try class */ - q = *classes; - entry = LeafHash(table, q); - while (entry && entry->name != q) - entry = entry->next; - if (!entry) - return False; - } - if (entry->string) { - *closure->type = XrmQString; - closure->value->addr = StringValue(entry); - } else { - *closure->type = RepType(entry); - closure->value->addr = DataValue(entry); - } - closure->value->size = entry->size; - return True; -} - -/* look for a loose value */ -static Bool GetLooseVEntry( - LTable table, - XrmNameList names, - XrmClassList classes, - VClosure closure) -{ - register VEntry entry; - register XrmQuark q; - -#define VLOOSE(ename) \ - q = ename; \ - entry = LeafHash(table, q); \ - while (entry && entry->name != q) \ - entry = entry->next; \ - if (entry && entry->tight && (entry = entry->next) && entry->name != q) \ - entry = (VEntry)NULL; - - /* bump to last component */ - while (names[1]) { - names++; - classes++; - } - VLOOSE(*names); /* do name, loose only */ - if (!entry) { - VLOOSE(*classes); /* do class, loose only */ - if (!entry) - return False; - } - if (entry->string) { - *closure->type = XrmQString; - closure->value->addr = StringValue(entry); - } else { - *closure->type = RepType(entry); - closure->value->addr = DataValue(entry); - } - closure->value->size = entry->size; - return True; - -#undef VLOOSE -} - -/* recursive search for a value */ -static Bool GetNEntry( - NTable table, - XrmNameList names, - XrmClassList classes, - VClosure closure) -{ - register NTable entry; - register XrmQuark q; - register unsigned int leaf; - Bool (*get)(); - NTable otable; - - if (names[2]) { - get = GetNEntry; /* recurse */ - leaf = 0; - } else { - get = GetVEntry; /* bottom of recursion */ - leaf = 1; - } - GTIGHTLOOSE(*names, GetLooseVEntry); /* do name, tight and loose */ - GTIGHTLOOSE(*classes, GetLooseVEntry); /* do class, tight and loose */ - if (table->hasany) { - GTIGHTLOOSE(XrmQANY, GetLooseVEntry); /* do ANY, tight and loose */ - } - if (table->hasloose) { - while (1) { - names++; - classes++; - if (!names[1]) - break; - if (!names[2]) { - get = GetVEntry; /* bottom of recursion */ - leaf = 1; - } - GLOOSE(*names, GetLooseVEntry); /* do name, loose only */ - GLOOSE(*classes, GetLooseVEntry); /* do class, loose only */ - if (table->hasany) { - GLOOSE(XrmQANY, GetLooseVEntry); /* do ANY, loose only */ - } - } - } - /* look for matching leaf tables */ - otable = table; - table = table->next; - if (!table) - return False; - if (table->leaf) { - if (table->tight && !otable->tight) - table = table->next; - } else { - table = table->next; - if (!table || !table->tight) - return False; - } - if (!table || table->name != otable->name) - return False; - /* found one */ - if (table->hasloose && - GetLooseVEntry((LTable)table, names, classes, closure)) - return True; - if (table->tight && table == otable->next) { - table = table->next; - if (table && table->name == otable->name && table->hasloose) - return GetLooseVEntry((LTable)table, names, classes, closure); - } - return False; -} - -Bool XrmQGetResource( - XrmDatabase db, - XrmNameList names, - XrmClassList classes, - XrmRepresentation *pType, /* RETURN */ - XrmValuePtr pValue) /* RETURN */ -{ - register NTable table; - VClosureRec closure; - - if (db && *names) { - closure.type = pType; - closure.value = pValue; - table = db->table; - if (names[1]) { - if (table && !table->leaf) { - if (GetNEntry(table, names, classes, &closure)) - return True; - } else if (table && table->hasloose && - GetLooseVEntry((LTable)table, names, classes, &closure)) - return True; - } else { - if (table && !table->leaf) - table = table->next; - if (table && GetVEntry((LTable)table, names, classes, &closure)) - return True; - } - } - *pType = NULLQUARK; - pValue->addr = (XPointer)NULL; - pValue->size = 0; - return False; -} - -Bool XrmGetResource( - XrmDatabase db, - _Xconst char *name_str, - _Xconst char *class_str, - XrmString *pType_str, /* RETURN */ - XrmValuePtr pValue) /* RETURN */ -{ - XrmName names[MAXDBDEPTH+1]; - XrmClass classes[MAXDBDEPTH+1]; - XrmRepresentation fromType; - Bool result; - - XrmStringToNameList(name_str, names); - XrmStringToClassList(class_str, classes); - result = XrmQGetResource(db, names, classes, &fromType, pValue); - (*pType_str) = XrmQuarkToString(fromType); - return result; -} - -/* destroy all values, plus table itself */ -static void DestroyLTable(LTable table) -{ - register int i; - register VEntry *buckets; - register VEntry entry, next; - - buckets = table->buckets; - for (i = table->table.mask; i >= 0; i--, buckets++) { - for (next = *buckets; (entry = next) != 0; ) { - next = entry->next; - xfree((char *)entry); - } - } - xfree((char *)table->buckets); - xfree((char *)table); -} - -/* destroy all contained tables, plus table itself */ -static void DestroyNTable(NTable table) -{ - register int i; - register NTable *buckets; - register NTable entry, next; - - buckets = NodeBuckets(table); - for (i = table->mask; i >= 0; i--, buckets++) { - for (next = *buckets; (entry = next) != 0; ) { - next = entry->next; - if (entry->leaf) - DestroyLTable((LTable)entry); - else - DestroyNTable(entry); - } - } - xfree((char *)table); -} - -char *XrmLocaleOfDatabase(XrmDatabase db) -{ - return (*db->methods->lcname)(db->mbstate); -} - -void XrmDestroyDatabase(XrmDatabase db) -{ - register NTable table, next; - - if (db) { - for (next = db->table; (table = next) != 0; ) { - next = table->next; - if (table->leaf) - DestroyLTable((LTable)table); - else - DestroyNTable(table); - } - (*db->methods->destroy)(db->mbstate); - xfree((char *)db); - } -} Index: xc/programs/Xserver/Xprint/XrmI.h diff -u xc/programs/Xserver/Xprint/XrmI.h:1.1.1.2 xc/programs/Xserver/Xprint/XrmI.h:removed --- xc/programs/Xserver/Xprint/XrmI.h:1.1.1.2 Tue Jan 16 17:41:49 2001 +++ xc/programs/Xserver/Xprint/XrmI.h Fri Jan 18 15:24:22 2002 @@ -1,68 +0,0 @@ -/* $Xorg: XrmI.h,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/* - -Copyright 1990 by the Massachusetts Institute of Technology - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of M.I.T. not be used in advertising or -publicity pertaining to distribution of the software without specific, -written prior permission. M.I.T. makes no representations about the -suitability of this software for any purpose. It is provided "as is" -without express or implied warranty. - -*/ - -/* - * Macros to abstract out reading the file, and getting its size. - * - * You may need to redefine these for various other operating systems. - */ - -#include -#include - -#define OpenFile(name) open((name), O_RDONLY) -#define CloseFile(fd) close((fd)) -#define ReadFile(fd,buf,size) read((fd), (buf), (size)) -#define GetSizeOfFile(name,size) \ -{ \ - struct stat status_buffer; \ - if ( (stat((name), &status_buffer)) == -1 ) \ - size = -1; \ - else \ - size = status_buffer.st_size; \ -} Index: xc/programs/Xserver/Xprint/attributes.c diff -u xc/programs/Xserver/Xprint/attributes.c:1.12 xc/programs/Xserver/Xprint/attributes.c:1.17 --- xc/programs/Xserver/Xprint/attributes.c:1.12 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/attributes.c Wed Dec 19 16:55:57 2001 @@ -44,20 +44,21 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.12 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/attributes.c,v 1.17 2001/12/19 21:55:57 dawes Exp $ */ -#include +#include #include #include #include #include #include +#if defined(sun) && defined(SVR4) +#include +#endif -#include +#include "scrnintstr.h" -#define _XP_PRINT_SERVER_ -#include "extensions/Printstr.h" -#undef _XP_PRINT_SERVER_ +#include #include "attributes.h" #include "Xrm.c" @@ -302,7 +303,7 @@ if(systemAttributes.printers != (XrmDatabase)NULL) { - char *dirName, *fileName; + char *fileName; XrmDatabase modelDB = (XrmDatabase)NULL; XrmName xrm_name[5], xrm_class[2]; XrmRepresentation rep_type; @@ -602,7 +603,6 @@ { ContextAttrPtr pCtxtAttrs; XrmDatabase db = (XrmDatabase)NULL; - char *retVal; XrmName xrm_name[3]; XrmRepresentation rep_type; XrmValue value; @@ -853,7 +853,6 @@ { ContextAttrPtr pCtxtAttrs; XrmDatabase db = (XrmDatabase)NULL; - char *retVal; StringDbStruct enumStruct; XrmQuark empty = NULLQUARK; @@ -1136,8 +1135,6 @@ } else { - int res; - (void) close(pipefd[0]); outPipe = fdopen(pipefd[1], "w"); @@ -1157,7 +1154,6 @@ * store for the supplied print context. The ReplaceAnyString utility * routine is used to perform the actual replacements. */ -extern char *ReplaceAnyString(char *, char *, char *); static char * ReplaceAllKeywords( @@ -1206,7 +1202,16 @@ #define toascii( c ) ((unsigned)(c) & 0x007f) #endif -#if defined(CSRG_BASED) || defined(linux) || defined(__CYGWIN__) || (defined(sun) && !defined(SVR4)) || (defined(SVR4) && !defined(sun) && !defined(USL)) || defined(__EMX__) || defined(ISC) || defined(Lynx) || defined(__QNX__) || defined(__DARWIN__) +#if defined(CSRG_BASED) || \ + defined(linux) || \ + defined(__CYGWIN__) || \ + (defined(sun) && !defined(SVR4)) || \ + (defined(SVR4) && !defined(sun) && !defined(USL)) || \ + defined(__EMX__) || \ + defined(ISC) || \ + defined(Lynx) || \ + defined(__QNX__) || \ + defined(__DARWIN__) #define iswspace(c) (isascii(c) && isspace(toascii(c))) #endif @@ -1360,8 +1365,8 @@ char ***pVector, XpContextPtr pContext) { - char *cmdName, *curTok; - int i, numChars; + char *cmdName; + int numChars; if(command == (char *)NULL) return (char *)NULL; @@ -1387,7 +1392,7 @@ char *fileName, XpContextPtr pContext) { - char **vector, *cmdNam, *cmdOpt, *command, *userName; + char **vector, *cmdNam, *command, *userName; int i; command = XpGetOneAttribute(pContext, XPPrinterAttr, "xp-spooler-command"); @@ -1498,7 +1503,6 @@ { char *defMedium, *defTray; char *t, *m; - char *pS, *pE, *pLast; defMedium = XpGetOneAttribute( pCon, XPPageAttr, "default-medium" ); Index: xc/programs/Xserver/Xprint/attributes.h diff -u xc/programs/Xserver/Xprint/attributes.h:1.4 xc/programs/Xserver/Xprint/attributes.h:1.6 --- xc/programs/Xserver/Xprint/attributes.h:1.4 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/attributes.h Fri Dec 21 16:02:05 2001 @@ -1,4 +1,4 @@ -/* $Xorg: attributes.h,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ +/* $Xorg: attributes.h,v 1.4 2001/03/14 18:42:44 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,12 +30,11 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/attributes.h,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/attributes.h,v 1.6 2001/12/21 21:02:05 dawes Exp $ */ #ifndef _Xp_attributes_h #define _Xp_attributes_h 1 -#define _XP_PRINT_SERVER_ #include "scrnintstr.h" #include "AttrValid.h" @@ -85,6 +84,7 @@ */ int XpGetResolution(XpContextPtr pContext); XpOid XpGetContentOrientation(XpContextPtr pContext); +XpOid XpGetAvailableCompression(XpContextPtr pContext); XpOid XpGetPlex(XpContextPtr pContext); XpOid XpGetPageSize(XpContextPtr pContext, XpOid* pTray, @@ -126,7 +126,5 @@ Bool XpOpenTmpFile(char *mode, char **fname, FILE **stream); - -#undef _XP_PRINT_SERVER_ #endif /* _Xp_attributes_h */ Index: xc/programs/Xserver/Xprint/ddxInit.c diff -u xc/programs/Xserver/Xprint/ddxInit.c:1.12 xc/programs/Xserver/Xprint/ddxInit.c:1.14 --- xc/programs/Xserver/Xprint/ddxInit.c:1.12 Sun Mar 4 12:40:04 2001 +++ xc/programs/Xserver/Xprint/ddxInit.c Sat Oct 27 23:32:53 2001 @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ddxInit.c,v 1.12 2001/03/04 17:40:04 herrb Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ddxInit.c,v 1.14 2001/10/28 03:32:53 tsi Exp $ */ #include "X.h" #include "Xproto.h" @@ -39,14 +39,6 @@ #include "Xos.h" #include "DiPrint.h" -#ifdef XFree86Server -/* - * when building the loader, we add some code that tries to - * switch bit ordering based on xf86bpp; since Xprt doesn't - * use that, we have to add this dummy here - */ -int xf86bpp = 8; -#endif static void Exit(int); /*- @@ -82,8 +74,6 @@ int argc, char **argv) { - int i; - pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; Index: xc/programs/Xserver/Xprint/mediaSizes.c diff -u xc/programs/Xserver/Xprint/mediaSizes.c:1.4 xc/programs/Xserver/Xprint/mediaSizes.c:1.5 --- xc/programs/Xserver/Xprint/mediaSizes.c:1.4 Wed Jan 17 17:36:28 2001 +++ xc/programs/Xserver/Xprint/mediaSizes.c Fri Dec 21 16:02:05 2001 @@ -1,4 +1,4 @@ -/* $Xorg: mediaSizes.c,v 1.3 2000/08/17 19:48:07 cpqbld Exp $ */ +/* $Xorg: mediaSizes.c,v 1.4 2001/03/14 18:44:37 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/mediaSizes.c,v 1.4 2001/01/17 22:36:28 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/mediaSizes.c,v 1.5 2001/12/21 21:02:05 dawes Exp $ */ /******************************************************************* ** @@ -208,6 +208,44 @@ XpOidListDelete(content_orientations_supported); } return orientation; +} + +/* + * XpGetAvailableCompression determines the available-compression as + * determined by the passed context. The page and document pools are + * queried in turn for a specified content-orientation attribute. If none + * is found the first available-compression in the + * avaiable-compressions-supported printer attribute is taken as the + * default. + * + * Note: This routine assumes the values found in the passed context's + * attributes pools have been validated. + */ +XpOid +XpGetAvailableCompression( + XpContextPtr pContext) +{ + XpOid compression; + + compression = XpGetOidAttr(pContext, XPPageAttr, + xpoid_att_available_compression, + (XpOidList*)NULL); + if(xpoid_none == compression) + compression = XpGetOidAttr(pContext, XPDocAttr, + xpoid_att_available_compression, + (XpOidList*)NULL); + if(xpoid_none == compression) + { + XpOidList* available_compressions_supported; + + available_compressions_supported = + XpGetListAttr(pContext, XPPrinterAttr, + xpoid_att_available_compressions_supported, + (XpOidList*)NULL); + compression = XpOidListGetOid(available_compressions_supported, 0); + XpOidListDelete(available_compressions_supported); + } + return compression; } /* Index: xc/programs/Xserver/Xprint/pcl/Imakefile diff -u xc/programs/Xserver/Xprint/pcl/Imakefile:1.6 xc/programs/Xserver/Xprint/pcl/Imakefile:1.7 --- xc/programs/Xserver/Xprint/pcl/Imakefile:1.6 Wed Jan 17 17:36:29 2001 +++ xc/programs/Xserver/Xprint/pcl/Imakefile Tue Jul 31 20:44:45 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/pcl/Imakefile,v 1.6 2001/01/17 22:36:29 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/pcl/Imakefile,v 1.7 2001/08/01 00:44:45 tsi Exp $ #include @@ -31,12 +31,10 @@ OBJS = $(OBJS1) -DEFINES = -DPSZ=PixelSize $(PCL_DRIVER) -UXFree86LOADER +DEFINES = -DPSZ=PixelSize $(PCL_DRIVER) -UXFree86LOADER -D_XP_PRINT_SERVER_ - INCLUDES = -I. \ - -I../../cfb \ - -I$(TOP) \ - -I../../include -I.. -I$(TOP)/include \ + INCLUDES = -I. -I$(XINCLUDESRC) -I.. \ + -I../../include -I$(TOP)/include \ -I$(TOP)/include/extensions -I$(TOP)/include/fonts \ -I../../mi -I../../mfb -I../../cfb Index: xc/programs/Xserver/Xprint/pcl/Pcl.h diff -u xc/programs/Xserver/Xprint/pcl/Pcl.h:1.7 xc/programs/Xserver/Xprint/pcl/Pcl.h:1.12 --- xc/programs/Xserver/Xprint/pcl/Pcl.h:1.7 Fri Jan 19 12:10:50 2001 +++ xc/programs/Xserver/Xprint/pcl/Pcl.h Fri Dec 21 16:02:05 2001 @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pcl.h,v 1.7 2001/01/19 17:10:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pcl.h,v 1.12 2001/12/21 21:02:05 dawes Exp $ */ #ifndef _PCL_H_ #define _PCL_H_ @@ -52,25 +52,12 @@ #include #include "scrnintstr.h" -/* -#include "X.h" -#include "Xproto.h" -#include "Xatom.h" -#include "misc.h" -#include "screenint.h" -#include "colormapst.h" -#include "windowstr.h" -#include "propertyst.h" -#include "servermd.h" */ /* needed for IMAGE_BUFSIZE */ - #include "PclDef.h" #include "Pclmap.h" #include "PclSFonts.h" -#define _XP_PRINT_SERVER_ -#include "Print.h" -#include "extensions/Printstr.h" -#undef _XP_PRINT_SERVER_ +#include +#include #include "miscstruct.h" #include "fontstruct.h" @@ -80,13 +67,16 @@ /* * Some sleazes to force the XrmDB stuff into the server */ +#ifndef HAVE_XPointer typedef char *XPointer; +#endif #define Status int #define True 1 #define False 0 #include "misc.h" -#include -#include "../Xresource.h" +#include +#include +#include "attributes.h" /****** * externally visible variables from PclInit.c @@ -96,6 +86,11 @@ extern int PclPixmapPrivateIndex; extern int PclGCPrivateIndex; +/****** + * externally visible variables from PclAttVal.c + ******/ +extern XpValidatePoolsRec PclValidatePoolsRec; + /* * This structure defines a mapping from an X colormap ID to a list of * print contexts which use the colormap. @@ -381,12 +376,21 @@ extern Bool PclCloseScreen( int index, ScreenPtr pScreen); -extern Bool InitializePclDriver( +extern Bool InitializeColorPclDriver( + int ndx, + ScreenPtr pScreen, + int argc, + char **argv); +extern Bool InitializeMonoPclDriver( + int ndx, + ScreenPtr pScreen, + int argc, + char **argv); +extern Bool InitializeLj3PclDriver( int ndx, ScreenPtr pScreen, int argc, char **argv); -static Bool PclDestroyContext( XpContextPtr pCon ); extern XpContextPtr PclGetContextFromWindow( WindowPtr win ); /****** Index: xc/programs/Xserver/Xprint/pcl/PclArea.c diff -u xc/programs/Xserver/Xprint/pcl/PclArea.c:1.8 xc/programs/Xserver/Xprint/pcl/PclArea.c:1.9 --- xc/programs/Xserver/Xprint/pcl/PclArea.c:1.8 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclArea.c Sat Oct 27 23:32:54 2001 @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclArea.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclArea.c,v 1.9 2001/10/28 03:32:54 tsi Exp $ */ #include #include @@ -279,14 +279,13 @@ int dsty) { PixmapPtr pixSrc = (PixmapPtr)pSrc; - char t[80]; - FILE *srcFile, *dstFile; - GC srcGC, dstGC; +/* + FILE *srcFile; + GC srcGC; +*/ + FILE *dstFile; + GC dstGC; unsigned long valid; - struct stat statBuf; - XpContextPtr pCon; - xRectangle repro; - PclPixmapPrivPtr pPriv; RegionPtr drawRegion, region, whole, ret; BoxRec box; BoxPtr prect; Index: xc/programs/Xserver/Xprint/pcl/PclColor.c diff -u xc/programs/Xserver/Xprint/pcl/PclColor.c:1.8 xc/programs/Xserver/Xprint/pcl/PclColor.c:1.9 --- xc/programs/Xserver/Xprint/pcl/PclColor.c:1.8 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclColor.c Sat Oct 27 23:32:54 2001 @@ -45,7 +45,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclColor.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclColor.c,v 1.9 2001/10/28 03:32:54 tsi Exp $ */ #include #include @@ -254,7 +254,7 @@ PclContextListPtr con; PclContextPrivPtr cPriv; PclPaletteMapPtr pMap; - char t[80], t2[30]; + char t[80]; int i; sPriv = (PclScreenPrivPtr)pColor->pScreen @@ -738,11 +738,11 @@ static void lookup(unsigned char *src, unsigned char *dst, int num, unsigned char *map, int dim) { int i; - unsigned char *p1, *p2, *p3; - int shift, offset; #define _INTERPOLATE #ifndef _INTERPOLATE + unsigned char *p1, *p2, *p3; + for (i=0; itype ) @@ -327,14 +326,12 @@ DrawablePtr pDrawable, FILE **outFile) { - Mask drawableMask, changeMask = 0; + Mask changeMask = 0; GC dGC; unsigned long valid; int i; XpContextPtr pCon; PclContextPrivPtr cPriv; - Colormap c; - ColormapPtr cmap; PclGCPrivPtr gcPriv = (PclGCPrivPtr) (pGC->devPrivates[PclGCPrivateIndex].ptr); @@ -505,9 +502,11 @@ if( changeMask & GCForeground ) { +#ifdef XP_PCL_COLOR + ColormapPtr cmap; + Colormap c; char t[40]; -#ifdef XP_PCL_COLOR c = wColormap( ((WindowPtr)pDrawable) ); cmap = (ColormapPtr)LookupIDByType( c, RT_COLORMAP ); @@ -646,9 +645,8 @@ if( changeMask & GCTile && !pGC->tileIsPixel ) { - char t[80], *bits, *row, *mod; - int h, w, w2, sz; - int i, j; + char *bits; + int h, w, sz; h = pGC->tile.pixmap->drawable.height; w = pGC->tile.pixmap->drawable.width; @@ -864,8 +862,6 @@ GCPtr pGC, DrawablePtr pDrawable) { - ScreenPtr pScreen = pGC->pScreen; - if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDrawable; @@ -894,7 +890,7 @@ if (pGC->clientClipType == CT_NONE) { if (freeCompClip) - REGION_DESTROY(pScreen, pGC->pCompositeClip); + REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); pGC->pCompositeClip = pregWin; pGC->freeCompClip = freeTmpClip; } @@ -909,7 +905,7 @@ * clip. if neither is real, create a new region. */ - REGION_TRANSLATE(pScreen, pGC->clientClip, + REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, pDrawable->x + pGC->clipOrg.x, pDrawable->y + pGC->clipOrg.y); @@ -918,21 +914,22 @@ REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin, pGC->clientClip); if (freeTmpClip) - REGION_DESTROY(pScreen, pregWin); + REGION_DESTROY(pGC->pScreen, pregWin); } else if (freeTmpClip) { - REGION_INTERSECT(pScreen, pregWin, pregWin, pGC->clientClip); + REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, + pGC->clientClip); pGC->pCompositeClip = pregWin; } else { - pGC->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0); + REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin, pGC->clientClip); } pGC->freeCompClip = TRUE; - REGION_TRANSLATE(pScreen, pGC->clientClip, + REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, -(pDrawable->x + pGC->clipOrg.x), -(pDrawable->y + pGC->clipOrg.y)); } @@ -949,21 +946,21 @@ if (pGC->freeCompClip) { - REGION_RESET(pScreen, pGC->pCompositeClip, &pixbounds); + REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds); } else { pGC->freeCompClip = TRUE; - pGC->pCompositeClip = REGION_CREATE(pScreen, &pixbounds, 1); + pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1); } if (pGC->clientClipType == CT_REGION) { - REGION_TRANSLATE(pScreen, pGC->pCompositeClip, + REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, -pGC->clipOrg.x, -pGC->clipOrg.y); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pGC->pCompositeClip, pGC->clientClip); - REGION_TRANSLATE(pScreen, pGC->pCompositeClip, + REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, pGC->clipOrg.x, pGC->clipOrg.y); } } /* end of composite clip for pixmap */ Index: xc/programs/Xserver/Xprint/pcl/PclInit.c diff -u xc/programs/Xserver/Xprint/pcl/PclInit.c:1.8 xc/programs/Xserver/Xprint/pcl/PclInit.c:1.11 --- xc/programs/Xserver/Xprint/pcl/PclInit.c:1.8 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclInit.c Fri Dec 21 16:02:05 2001 @@ -76,7 +76,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclInit.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclInit.c,v 1.11 2001/12/21 21:02:05 dawes Exp $ */ #include #include @@ -92,13 +92,11 @@ #include "DiPrint.h" #define MODELDIRNAME "/models" -extern XpValidatePoolsRec PclValidatePoolsRec; static void AllocatePclPrivates(ScreenPtr pScreen); static int PclInitContext(XpContextPtr pCon); +static Bool PclDestroyContext(XpContextPtr pCon); -extern unsigned char *PclReadMap(char *, int *); - int PclScreenPrivateIndex; int PclContextPrivateIndex; int PclPixmapPrivateIndex; @@ -166,11 +164,9 @@ int argc, char **argv) { - int maxRes, xRes, yRes, maxWidth, maxHeight, maxDim, numBytes; + int maxRes, xRes, yRes, maxDim; unsigned i; PclScreenPrivPtr pPriv; - char **printerNames; - int numPrinters; /* * Register this driver's InitContext function with the print Index: xc/programs/Xserver/Xprint/pcl/PclMisc.c diff -u xc/programs/Xserver/Xprint/pcl/PclMisc.c:1.8 xc/programs/Xserver/Xprint/pcl/PclMisc.c:1.10 --- xc/programs/Xserver/Xprint/pcl/PclMisc.c:1.8 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclMisc.c Sun Dec 2 08:35:28 2001 @@ -44,13 +44,12 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclMisc.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclMisc.c,v 1.10 2001/12/02 13:35:28 herrb Exp $ */ -#ifdef __CYGWIN__ -#include #include -#endif - +#include +#include +#include #include "Xos.h" /* for SIGCLD on pre-POSIX systems */ #include "Pcl.h" @@ -148,12 +147,14 @@ } #include +#include /* ARGSUSED */ static void SigchldHndlr ( int dummy) { int status, w; + int olderrno = errno; struct sigaction act; sigfillset(&act.sa_mask); act.sa_flags = 0; @@ -165,6 +166,7 @@ * Is this really necessary? */ sigaction(SIGCHLD, &act, (struct sigaction *)NULL); + errno = olderrno; } /* Index: xc/programs/Xserver/Xprint/pcl/PclPixel.c diff -u xc/programs/Xserver/Xprint/pcl/PclPixel.c:1.5 xc/programs/Xserver/Xprint/pcl/PclPixel.c:1.6 --- xc/programs/Xserver/Xprint/pcl/PclPixel.c:1.5 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclPixel.c Sat Oct 27 23:32:55 2001 @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixel.c,v 1.5 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixel.c,v 1.6 2001/10/28 03:32:55 tsi Exp $ */ #include @@ -61,7 +61,7 @@ int nPoints; xPoint *pPoints; { - char t[80], *command; + char t[80]; FILE *outFile; int xoffset, yoffset; BoxRec box; Index: xc/programs/Xserver/Xprint/pcl/PclPrint.c diff -u xc/programs/Xserver/Xprint/pcl/PclPrint.c:1.6 xc/programs/Xserver/Xprint/pcl/PclPrint.c:1.7 --- xc/programs/Xserver/Xprint/pcl/PclPrint.c:1.6 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclPrint.c Sat Oct 27 23:32:55 2001 @@ -43,7 +43,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPrint.c,v 1.6 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPrint.c,v 1.7 2001/10/28 03:32:55 tsi Exp $ */ #include #include @@ -72,8 +72,6 @@ { PclContextPrivPtr pConPriv = (PclContextPrivPtr)pCon->devPrivates[PclContextPrivateIndex].ptr; - char *jobHeader; - char s[40]; PclPaletteMap *pal; /* @@ -140,7 +138,7 @@ char *fileName, *trailer; struct stat statBuf; int n; - PclPaletteMapPtr p, t; + PclPaletteMapPtr p; trailer = "\033%-12345X@PJL RESET\n"; @@ -250,7 +248,6 @@ XpContextPtr pCon, WindowPtr pWin) { - register WindowPtr pChild; PclContextPrivPtr pConPriv = (PclContextPrivPtr) pCon->devPrivates[PclContextPrivateIndex].ptr; PclWindowPrivPtr pWinPriv = @@ -258,9 +255,7 @@ xRectangle repro; char t[80]; XpOid orient, plex, tray, medium; - unsigned short wid, ht; int dir, plexNum, num; - xEvent event; /* * Put a pointer to the context in the window private structure @@ -493,8 +488,6 @@ { PclContextPrivPtr pConPriv = (PclContextPrivPtr) pCon->devPrivates[PclContextPrivateIndex].ptr; - PclWindowPrivPtr pWinPriv = - (PclWindowPrivPtr)pWin->devPrivates[PclWindowPrivateIndex].ptr; struct stat statBuf; Index: xc/programs/Xserver/Xprint/pcl/PclSFonts.c diff -u xc/programs/Xserver/Xprint/pcl/PclSFonts.c:1.5 xc/programs/Xserver/Xprint/pcl/PclSFonts.c:1.6 --- xc/programs/Xserver/Xprint/pcl/PclSFonts.c:1.5 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclSFonts.c Sat Oct 27 23:32:55 2001 @@ -45,7 +45,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSFonts.c,v 1.5 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclSFonts.c,v 1.6 2001/10/28 03:32:55 tsi Exp $ */ #include @@ -152,7 +152,7 @@ PclFontHead16Ptr pfh16, pfh16_next; PclInternalFontPtr pin, pin_next; unsigned char nindex_row, nindex_col; -int i, j; +int i; if ( pSoftFontInfo == (PclSoftFontInfoPtr) NULL ) return; Index: xc/programs/Xserver/Xprint/pcl/PclText.c diff -u xc/programs/Xserver/Xprint/pcl/PclText.c:1.8 xc/programs/Xserver/Xprint/pcl/PclText.c:1.10 --- xc/programs/Xserver/Xprint/pcl/PclText.c:1.8 Fri Jan 19 12:10:50 2001 +++ xc/programs/Xserver/Xprint/pcl/PclText.c Wed Dec 19 16:55:58 2001 @@ -1,4 +1,4 @@ -/* $Xorg: PclText.c,v 1.4 2000/08/17 19:48:08 cpqbld Exp $ */ +/* $Xorg: PclText.c,v 1.5 2001/03/06 16:28:48 pookie Exp $ */ /******************************************************************* ** ** ********************************************************* @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclText.c,v 1.8 2001/01/19 17:10:50 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclText.c,v 1.10 2001/12/19 21:55:58 dawes Exp $ */ #ifdef DO_TWO_BYTE_PCL #include "iconv.h" @@ -182,8 +182,6 @@ MACRO_END( outFile ); } else { - char *internalFont; - int pixel_size; int fid = 0; pin = makeInternalFont(pGC->font, pSoftFontInfo); @@ -270,7 +268,6 @@ FILE *outFile; PclSoftFontInfoPtr pSoftFontInfo; PclFontHead16Ptr pfh16 = (PclFontHead16Ptr)NULL; -PclInternalFontPtr pin = (PclInternalFontPtr)NULL; PclCharDataRec cd; FontInfoPtr pfi; unsigned char row, col; @@ -379,8 +376,7 @@ } else { #ifdef DO_TWO_BYTE_PCL - char *internalFont; - int pixel_size; + PclInternalFontPtr pin; int fid = 0; pin = makeInternalFont(pGC->font, pSoftFontInfo); @@ -506,7 +502,7 @@ FontInfoPtr pfi; char *fontname; unsigned char nindex; -int i, j; +int i; unsigned long n; CharInfoPtr charinfo[1]; unsigned int space_width; @@ -863,7 +859,7 @@ FontPropPtr props; Atom dest; - dest = MakeAtom("DESTINATION", strlen("DESTINATION"), TRUE); + dest = MakeAtom("PRINTER_RESIDENT_FONT", strlen("PRINTER_RESIDENT_FONT"), TRUE); pfi = (FontInfoRec *)&pfont->info; props = pfi->props; Index: xc/programs/Xserver/Xprint/pcl/PclWindow.c diff -u xc/programs/Xserver/Xprint/pcl/PclWindow.c:1.8 xc/programs/Xserver/Xprint/pcl/PclWindow.c:1.10 --- xc/programs/Xserver/Xprint/pcl/PclWindow.c:1.8 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/PclWindow.c Wed Dec 19 16:55:58 2001 @@ -44,7 +44,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclWindow.c,v 1.8 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclWindow.c,v 1.10 2001/12/19 21:55:58 dawes Exp $ */ #include @@ -59,8 +59,7 @@ #include "Pcl.h" -extern WindowPtr *WindowTable; - +#if 0 /* * The following list of strings defines the properties which will be * placed on the screen's root window if the property was defined in @@ -77,7 +76,7 @@ DT_PRINT_PAGE_COMMAND, (char *)NULL }; - +#endif /* * PclCreateWindow - watch for the creation of the root window. @@ -209,7 +208,6 @@ RegionPtr pRegion, int what) { - int status; WindowPtr pRoot; #define FUNCTION 0 Index: xc/programs/Xserver/Xprint/pcl/Pclmap.h diff -u xc/programs/Xserver/Xprint/pcl/Pclmap.h:1.4 xc/programs/Xserver/Xprint/pcl/Pclmap.h:1.6 --- xc/programs/Xserver/Xprint/pcl/Pclmap.h:1.4 Wed Jan 17 17:36:30 2001 +++ xc/programs/Xserver/Xprint/pcl/Pclmap.h Fri Dec 21 16:02:05 2001 @@ -30,7 +30,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pclmap.h,v 1.4 2001/01/17 22:36:30 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/pcl/Pclmap.h,v 1.6 2001/12/21 21:02:05 dawes Exp $ */ #ifndef _PCLMAP_H_ #define _PCLMAP_H_ @@ -39,7 +39,7 @@ #ifdef CATNAME #undef CATNAME #endif -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define PCLNAME(subname) PclCr##subname #define CATNAME(prefix,subname) prefix##Color##subname #else @@ -52,7 +52,7 @@ #ifdef CATNAME #undef CATNAME #endif -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define PCLNAME(subname) PclMn##subname #define CATNAME(prefix,subname) prefix##Mono##subname #else @@ -65,7 +65,7 @@ #ifdef CATNAME #undef CATNAME #endif -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define PCLNAME(subname) PclLj3##subname #define CATNAME(prefix,subname) prefix##Lj3##subname #else @@ -74,6 +74,8 @@ #endif #endif /* XP_PCL_LJ3 */ +#ifdef PCLNAME + /* PclInit.c */ #define InitializePclDriver CATNAME(Initialize, PclDriver) #define PclCloseScreen PCLNAME(CloseScreen) @@ -201,5 +203,7 @@ #define PclUnrealizeCursor PCLNAME(UnrealizeCursor) #define PclRecolorCursor PCLNAME(RecolorCursor) #define PclSetCursorPosition PCLNAME(SetCursorPosition) + +#endif #endif /* _PCLMAP_H_ */ Index: xc/programs/Xserver/Xprint/ps/Imakefile diff -u xc/programs/Xserver/Xprint/ps/Imakefile:1.6 xc/programs/Xserver/Xprint/ps/Imakefile:1.8 --- xc/programs/Xserver/Xprint/ps/Imakefile:1.6 Wed Jan 17 17:36:31 2001 +++ xc/programs/Xserver/Xprint/ps/Imakefile Fri Dec 21 16:02:05 2001 @@ -3,32 +3,27 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/ps/Imakefile,v 1.6 2001/01/17 22:36:31 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/ps/Imakefile,v 1.8 2001/12/21 21:02:05 dawes Exp $ #include SRCS1 = PsInit.c PsPrint.c PsGC.c PsMisc.c PsSpans.c PsArea.c PsPixel.c \ PsLine.c PsPolygon.c PsArc.c PsText.c PsWindow.c PsFonts.c \ - PsAttr.c PsAttVal.c PsColor.c PsPixmap.c psout.c + PsAttr.c PsAttVal.c PsColor.c PsPixmap.c psout.c PsCache.c OBJS1 = PsInit.o PsPrint.o PsGC.o PsMisc.o PsSpans.o PsArea.o PsPixel.o \ PsLine.o PsPolygon.o PsArc.o PsText.o PsWindow.o PsFonts.o \ - PsAttr.o PsAttVal.o PsColor.o PsPixmap.o psout.o + PsAttr.o PsAttVal.o PsColor.o PsPixmap.o psout.o PsCache.o SRCS = $(SRCS1) OBJS = $(OBJS1) -XCOMM DEFINES = -DPIXPRIV - DEFINES = -UXFree86LOADER -DXP_PSTEXT + DEFINES = -UXFree86LOADER -DXP_PSTEXT -D_XP_PRINT_SERVER_ -DBM_CACHE - INCLUDES = -I. \ - -I../../cfb \ - -I../$(TOP) \ - -I../../include -I.. -I$(TOP)/include \ - -I$(EXTINCSRC) -I$(FONTINCSRC) \ - -I$(FONTLIBSRC)/include \ - -I../../mi -I../../mfb + INCLUDES = -I. -I../../cfb -I../../mi -I../../mfb \ + -I$(XINCLUDESRC) -I../../include -I.. -I$(TOP)/include \ + -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(FONTLIBSRC)/include LINTLIBS = $(TOP)/server/dix/llib-ldix.ln $(TOP)/server/os/llib-los.ln \ $(TOP)/server/ddx/mfb/llib-lmfb.ln \ Index: xc/programs/Xserver/Xprint/ps/Ps.h diff -u xc/programs/Xserver/Xprint/ps/Ps.h:1.6 xc/programs/Xserver/Xprint/ps/Ps.h:1.13 --- xc/programs/Xserver/Xprint/ps/Ps.h:1.6 Wed Jan 17 17:36:31 2001 +++ xc/programs/Xserver/Xprint/ps/Ps.h Fri Dec 21 16:02:05 2001 @@ -1,9 +1,12 @@ -/* $Xorg: Ps.h,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ +/* $Xorg: Ps.h,v 1.5 2001/02/09 02:04:35 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -70,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/Ps.h,v 1.6 2001/01/17 22:36:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/Ps.h,v 1.13 2001/12/21 21:02:05 dawes Exp $ */ #ifndef _PS_H_ #define _PS_H_ @@ -84,24 +87,11 @@ #include "scrnintstr.h" #include "dix.h" -/* -#include "X.h" -#include "Xproto.h" -#include "Xatom.h" -#include "misc.h" -#include "screenint.h" -#include "colormapst.h" -#include "windowstr.h" -#include "propertyst.h" -#include "servermd.h"*/ /* needed for IMAGE_BUFSIZE */ - #include "PsDef.h" #include "psout.h" -#define _XP_PRINT_SERVER_ -#include "Print.h" -#include "extensions/Printstr.h" -#undef _XP_PRINT_SERVER_ +#include +#include #include "miscstruct.h" #include "fontstruct.h" @@ -119,8 +109,8 @@ #endif #include "misc.h" -#include -#include "../Xresource.h" +#include +#include #include "attributes.h" /* @@ -301,7 +291,6 @@ extern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc, char **argv); -static Bool PsDestroyContext(XpContextPtr pCon); extern XpContextPtr PsGetContextFromWindow(WindowPtr win); /* @@ -325,9 +314,6 @@ */ extern Bool PsCreateGC(GCPtr pGC); -static int PsGetDrawablePrivateStuff(DrawablePtr pDrawable, GC *gc, - unsigned long *valid, PsOutPtr *psOut, - ColormapPtr *cMap); extern int PsUpdateDrawableGC(GCPtr pGC, DrawablePtr pDrawable, PsOutPtr *psOut, ColormapPtr *cMap); extern void PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); @@ -380,6 +366,9 @@ extern void PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage); +extern void PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, int format, + char *pImage); extern RegionPtr PsCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty); @@ -513,5 +502,15 @@ extern PsElmPtr PsCreateFillElementList(PixmapPtr pix, int *nElms); extern PsElmPtr PsCloneFillElementList(int nElms, PsElmPtr elms); extern void PsDestroyFillElementList(int nElms, PsElmPtr elms); + +/* + * Functions in PsCache.c + */ + +#ifdef BM_CACHE +extern int PsBmIsImageCached(int gWidth, int gHeight, char *pBuffer); +extern int PsBmPutImageInCache(int gWidth, int gHeight, char *pBuffer); +extern void PsBmClearImageCache(void); +#endif #endif /* _PS_H_ */ Index: xc/programs/Xserver/Xprint/ps/PsArc.c diff -u xc/programs/Xserver/Xprint/ps/PsArc.c:1.1.1.3 xc/programs/Xserver/Xprint/ps/PsArc.c:1.2 --- xc/programs/Xserver/Xprint/ps/PsArc.c:1.1.1.3 Tue Jan 16 17:41:58 2001 +++ xc/programs/Xserver/Xprint/ps/PsArc.c Fri Dec 14 14:59:15 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsArc.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ +/* $Xorg: PsArc.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/Xprint/ps/PsArea.c diff -u xc/programs/Xserver/Xprint/ps/PsArea.c:1.1.1.3 xc/programs/Xserver/Xprint/ps/PsArea.c:1.3 --- xc/programs/Xserver/Xprint/ps/PsArea.c:1.1.1.3 Tue Jan 16 17:41:58 2001 +++ xc/programs/Xserver/Xprint/ps/PsArea.c Fri Dec 21 16:02:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsArea.c,v 1.4 2000/08/17 19:48:09 cpqbld Exp $ */ +/* $Xorg: PsArea.c,v 1.6 2001/03/14 18:27:44 pookie Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -224,7 +228,7 @@ return; } -void +static void PsPutScaledImageIM(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, int imageRes, char *pImage) { @@ -264,7 +268,10 @@ PsOutPtr psOut; ColormapPtr cMap; int pageRes, sw, sh; - +#ifdef BM_CACHE + long cache_id = 0; +#endif + if( PsUpdateDrawableGC(pGC, pDrawable, &psOut, &cMap)==FALSE ) return; if (!imageRes) { sw = w; @@ -277,6 +284,18 @@ PsOut_Offset(psOut, pDrawable->x, pDrawable->y); pt = (char *)(&i); i = 1; if( pt[0]=='\001' ) swap = 1; else swap = 0; +#ifdef BM_CACHE + cache_id = PsBmIsImageCached(w, h, pImage); + + if(!cache_id) + { + cache_id = PsBmPutImageInCache(w, h, pImage); + + if(!cache_id) + return; + + PsOut_BeginImageCache(psOut, cache_id); +#endif if( depth==24 ) { PsOut_BeginImageIM(psOut, 0, 0, x, y, w, h, sw, sh, 3); @@ -369,6 +388,12 @@ PsOut_EndImage(psOut); } } +#ifdef BM_CACHE + PsOut_EndImageCache(psOut); + } + PsOut_ImageCache(psOut, x, y, cache_id, PsGetPixelColor(cMap, pGC->bgPixel), + PsGetPixelColor(cMap, pGC->fgPixel)); +#endif } error: return; Index: xc/programs/Xserver/Xprint/ps/PsAttVal.c diff -u xc/programs/Xserver/Xprint/ps/PsAttVal.c:1.4 xc/programs/Xserver/Xprint/ps/PsAttVal.c:1.5 --- xc/programs/Xserver/Xprint/ps/PsAttVal.c:1.4 Wed Jan 17 17:36:31 2001 +++ xc/programs/Xserver/Xprint/ps/PsAttVal.c Wed Dec 19 16:28:44 2001 @@ -1,5 +1,5 @@ /* - * $Xorg: PsAttVal.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ + * $Xorg: PsAttVal.c,v 1.5 2001/03/13 18:45:31 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company @@ -32,7 +32,7 @@ dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttVal.c,v 1.4 2001/01/17 22:36:31 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttVal.c,v 1.5 2001/12/19 21:28:44 dawes Exp $ */ #include "Ps.h" #include "AttrValid.h" @@ -74,7 +74,12 @@ static unsigned long ValidPrinterResolutionsCards[] = { 300, - 600 + 600, + 720, + 940, + 1200, + 1440, + 2400 }; static XpOidCardList ValidPrinterResolutions = { ValidPrinterResolutionsCards, XpNumber(ValidPrinterResolutionsCards) Index: xc/programs/Xserver/Xprint/ps/PsAttr.c diff -u xc/programs/Xserver/Xprint/ps/PsAttr.c:1.4 xc/programs/Xserver/Xprint/ps/PsAttr.c:1.5 --- xc/programs/Xserver/Xprint/ps/PsAttr.c:1.4 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsAttr.c Fri Dec 14 14:59:15 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsAttr.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ +/* $Xorg: PsAttr.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -53,7 +57,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttr.c,v 1.4 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsAttr.c,v 1.5 2001/12/14 19:59:15 dawes Exp $ */ /******************************************************************* ** Index: xc/programs/Xserver/Xprint/ps/PsCache.c diff -u /dev/null xc/programs/Xserver/Xprint/ps/PsCache.c:1.1 --- /dev/null Fri Jan 18 15:24:23 2002 +++ xc/programs/Xserver/Xprint/ps/PsCache.c Fri Dec 21 16:02:06 2001 @@ -0,0 +1,324 @@ +/* + +Copyright 1996, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ +/* + * (c) Copyright 1996 Hewlett-Packard Company + * (c) Copyright 1996 International Business Machines Corp. + * (c) Copyright 1996, 2000 Sun Microsystems, Inc. All Rights Reserved. + * (c) Copyright 1996 Novell, Inc. + * (c) Copyright 1996 Digital Equipment Corp. + * (c) Copyright 1996 Fujitsu Limited + * (c) Copyright 1996 Hitachi, Ltd. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject + * to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the names of the copyright holders + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * from said copyright holders. + */ + +/******************************************************************* +** +** ********************************************************* +** * +** * File: PsCache.c +** * +** * Contents: Character-caching routines +** * +** * Created By: Jay Hobson (Sun MicroSystems) +** * +** * Copyright: Copyright 1996 The Open Group, Inc. +** * +** ********************************************************* +** +********************************************************************/ + +#include "Ps.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "fntfil.h" +#include "fntfilst.h" + +#define GET 0 +#define RESET 1 + +struct bm_cache_list { + struct bm_cache_list *next; + struct bm_cache_list *prev; + int height; + long id; + char *pBuffer; +}; + +struct bm_cache_head { + struct bm_cache_list *head; + int width; + struct bm_cache_head *next; + struct bm_cache_head *prev; +}; + +static struct bm_cache_head *bm_cache = NULL; + +static long +PsBmUniqueId(int func) +{ + static long unique_id = 0; + + if(func == RESET) + { + unique_id = 0; + return 0; + } + else + return ++unique_id; +} + +int +PsBmIsImageCached( + int gWidth, + int gHeight, + char *pBuffer) +{ + int return_val = 0; + struct bm_cache_head *pList = bm_cache; + + while(pList != NULL && !return_val) + { + if(pList->width == gWidth) + { + struct bm_cache_list *pItem = pList->head; + + while(pItem != NULL) + { + if(pItem->height == gHeight) + { + int length = 4*(gWidth/32+(gWidth%32!=0))*gHeight; + + if(!memcmp(pItem->pBuffer, pBuffer, sizeof(char)*length)) + { + return_val = pItem->id; + break; + } + } + else if(pItem->height > gHeight) + break; + + pItem = pItem->next; + } + } + else if(pList->width > gWidth) + break; + + pList = pList->next; + } + return return_val; +} + +int +PsBmPutImageInCache( + int gWidth, + int gHeight, + char *pBuffer) +{ + int return_val = 0; + struct bm_cache_head *pList = bm_cache; + struct bm_cache_list *pNew; + int length = 4*(gWidth/32+(gWidth%32!=0))*gHeight; + + if(gWidth == 1 && gHeight == 1 && pBuffer[0] == 0) + return return_val; + + pNew = (struct bm_cache_list *)malloc(sizeof(struct bm_cache_list)); + pNew->next = NULL; + pNew->prev = NULL; + pNew->height = gHeight; + pNew->id = PsBmUniqueId(GET); + pNew->pBuffer = (char *)malloc(sizeof(char)*length); + + memcpy(pNew->pBuffer, pBuffer, length); + + while(pList != NULL) + { + if(pList->width == gWidth) + { + struct bm_cache_list *pItem = pList->head; + + while(pItem != NULL) + { + if(pItem->height >= gHeight) + { + pNew->next = pItem; + pNew->prev = pItem->prev; + if(pItem->prev != NULL) + pItem->prev->next = pNew; + else + pList->head = pNew; + pItem->prev = pNew; + + return_val = pNew->id; + + break; + } + else if(pItem->next == NULL) + { + pNew->prev = pItem; + pItem->next = pNew; + + return_val = pNew->id; + + break; + } + + pItem = pItem->next; + } + + break; + } + + pList = pList->next; + } + + if(pList == NULL) + { + struct bm_cache_head *pNewList; + + pNewList = (struct bm_cache_head *)malloc(sizeof(struct bm_cache_head)); + + pNewList->next = NULL; + pNewList->prev = NULL; + pNewList->width = gWidth; + pNewList->head = pNew; + + if(bm_cache == NULL) + { + bm_cache = pNewList; + return_val = pNew->id; + } + else + { + pList = bm_cache; + + while(pList != NULL) + { + if(pList->width > gWidth) + { + pNewList->next = pList; + pNewList->prev = pList->prev; + + if(pList->prev != NULL) + pList->prev->next = pNewList; + else + bm_cache = pNewList; + pList->prev = pNewList; + + return_val = pNew->id; + + break; + } + else if(pList->next == NULL) + { + pNewList->prev = pList; + pList->next = pNewList; + + return_val = pNew->id; + + break; + } + + pList = pList->next; + } + } + } + + return return_val; +} + + +static void +PsBmClearImageCacheItem( + struct bm_cache_list *pItem) +{ + if(pItem != NULL) + { + if(pItem->pBuffer != NULL) + free(pItem->pBuffer); + pItem->pBuffer = NULL; + + if(pItem->next) + PsBmClearImageCacheItem(pItem->next); + pItem->next = NULL; + + free(pItem); + pItem = NULL; + } +} + +static void +PsBmClearImageCacheList( + struct bm_cache_head *pList) +{ + if(pList != NULL) + { + if(pList->head) + PsBmClearImageCacheItem(pList->head); + pList->head = NULL; + + if(pList->next) + PsBmClearImageCacheList(pList->next); + pList->next = NULL; + + free(pList); + pList = NULL; + } +} + +void +PsBmClearImageCache() +{ + PsBmClearImageCacheList(bm_cache); + + bm_cache = NULL; + + PsBmUniqueId(RESET); +} + Index: xc/programs/Xserver/Xprint/ps/PsColor.c diff -u xc/programs/Xserver/Xprint/ps/PsColor.c:1.1.1.3 xc/programs/Xserver/Xprint/ps/PsColor.c:1.3 --- xc/programs/Xserver/Xprint/ps/PsColor.c:1.1.1.3 Tue Jan 16 17:41:59 2001 +++ xc/programs/Xserver/Xprint/ps/PsColor.c Fri Dec 14 14:59:15 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsColor.c,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ +/* $Xorg: PsColor.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,6 +73,7 @@ ** ********************************************************* ** ********************************************************************/ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsColor.c,v 1.3 2001/12/14 19:59:15 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" @@ -81,7 +86,6 @@ int i; unsigned short rgb; VisualPtr pVisual = pColor->pVisual; - Pixel pix; if( pVisual->class==TrueColor ) { Index: xc/programs/Xserver/Xprint/ps/PsDef.h diff -u xc/programs/Xserver/Xprint/ps/PsDef.h:1.1.1.3 xc/programs/Xserver/Xprint/ps/PsDef.h:1.2 --- xc/programs/Xserver/Xprint/ps/PsDef.h:1.1.1.3 Tue Jan 16 17:41:59 2001 +++ xc/programs/Xserver/Xprint/ps/PsDef.h Fri Dec 14 14:59:15 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsDef.h,v 1.3 2000/08/17 19:48:09 cpqbld Exp $ */ +/* $Xorg: PsDef.h,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/Xprint/ps/PsFonts.c diff -u xc/programs/Xserver/Xprint/ps/PsFonts.c:1.4 xc/programs/Xserver/Xprint/ps/PsFonts.c:1.6 --- xc/programs/Xserver/Xprint/ps/PsFonts.c:1.4 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsFonts.c Wed Dec 19 16:55:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsFonts.c,v 1.4 2000/08/17 19:48:09 cpqbld Exp $ */ +/* $Xorg: PsFonts.c,v 1.6 2001/03/06 16:30:15 pookie Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -53,7 +57,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsFonts.c,v 1.4 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsFonts.c,v 1.6 2001/12/19 21:55:59 dawes Exp $ */ /******************************************************************* ** @@ -141,7 +145,7 @@ int i; int nprops = pFont->info.nprops; FontPropPtr props = pFont->info.props; - Atom name = MakeAtom("_ADOBE_POSTSCRIPT_FONTNAME", 26, True); + Atom name = MakeAtom("PRINTER_RESIDENT_FONT", 21, True); Atom value = (Atom)0; for( i=0 ; i #include +#include #include #include #include @@ -87,6 +92,7 @@ static void AllocatePsPrivates(ScreenPtr pScreen); static int PsInitContext(XpContextPtr pCon); +static int PsDestroyContext(XpContextPtr pCon); extern Bool cfbCreateDefColormap(ScreenPtr pScreen); @@ -102,11 +108,7 @@ int argc; char **argv; { - int maxXres, maxYres, maxWidth, maxHeight; - int maxRes, maxDim, numBytes; PsScreenPrivPtr pPriv; - char **printerNames; - int numPrinters; int nVisuals; int nDepths; VisualPtr visuals; Index: xc/programs/Xserver/Xprint/ps/PsLine.c diff -u xc/programs/Xserver/Xprint/ps/PsLine.c:1.5 xc/programs/Xserver/Xprint/ps/PsLine.c:1.6 --- xc/programs/Xserver/Xprint/ps/PsLine.c:1.5 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsLine.c Fri Dec 14 14:59:16 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsLine.c,v 1.3 2000/08/17 19:48:10 cpqbld Exp $ */ +/* $Xorg: PsLine.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsLine.c,v 1.5 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsLine.c,v 1.6 2001/12/14 19:59:16 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" Index: xc/programs/Xserver/Xprint/ps/PsMisc.c diff -u xc/programs/Xserver/Xprint/ps/PsMisc.c:1.5 xc/programs/Xserver/Xprint/ps/PsMisc.c:1.6 --- xc/programs/Xserver/Xprint/ps/PsMisc.c:1.5 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsMisc.c Fri Dec 14 14:59:16 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsMisc.c,v 1.3 2000/08/17 19:48:10 cpqbld Exp $ */ +/* $Xorg: PsMisc.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsMisc.c,v 1.5 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsMisc.c,v 1.6 2001/12/14 19:59:16 dawes Exp $ */ #include "Xos.h" /* for SIGCLD on pre-POSIX systems */ #include Index: xc/programs/Xserver/Xprint/ps/PsPixel.c diff -u xc/programs/Xserver/Xprint/ps/PsPixel.c:1.5 xc/programs/Xserver/Xprint/ps/PsPixel.c:1.6 --- xc/programs/Xserver/Xprint/ps/PsPixel.c:1.5 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsPixel.c Fri Dec 14 14:59:16 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsPixel.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: PsPixel.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixel.c,v 1.5 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixel.c,v 1.6 2001/12/14 19:59:16 dawes Exp $ */ #include Index: xc/programs/Xserver/Xprint/ps/PsPixmap.c diff -u xc/programs/Xserver/Xprint/ps/PsPixmap.c:1.4 xc/programs/Xserver/Xprint/ps/PsPixmap.c:1.5 --- xc/programs/Xserver/Xprint/ps/PsPixmap.c:1.4 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsPixmap.c Fri Dec 14 14:59:16 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsPixmap.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: PsPixmap.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -53,7 +57,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixmap.c,v 1.4 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPixmap.c,v 1.5 2001/12/14 19:59:16 dawes Exp $ */ /******************************************************************* ** ** ********************************************************* Index: xc/programs/Xserver/Xprint/ps/PsPolygon.c diff -u xc/programs/Xserver/Xprint/ps/PsPolygon.c:1.6 xc/programs/Xserver/Xprint/ps/PsPolygon.c:1.7 --- xc/programs/Xserver/Xprint/ps/PsPolygon.c:1.6 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsPolygon.c Fri Dec 14 14:59:17 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsPolygon.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: PsPolygon.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPolygon.c,v 1.6 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPolygon.c,v 1.7 2001/12/14 19:59:17 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" Index: xc/programs/Xserver/Xprint/ps/PsPrint.c diff -u xc/programs/Xserver/Xprint/ps/PsPrint.c:1.7 xc/programs/Xserver/Xprint/ps/PsPrint.c:1.11 --- xc/programs/Xserver/Xprint/ps/PsPrint.c:1.7 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsPrint.c Fri Dec 21 16:02:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsPrint.c,v 1.4 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: PsPrint.c,v 1.7 2001/03/14 18:28:18 pookie Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPrint.c,v 1.7 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsPrint.c,v 1.11 2001/12/21 21:02:06 dawes Exp $ */ #include #include @@ -158,8 +162,6 @@ Bool sendClientData, ClientPtr client) { - int iorient, iplex, icount, ires; - unsigned short iwd, iht; PsContextPrivPtr pConPriv = (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; @@ -169,17 +171,6 @@ if (!XpOpenTmpFile("w", &pConPriv->jobFileName, &pConPriv->pJobFile)) return BadAlloc; -/* - * Write the job header to the job file. - */ - - /* get document level attributes */ - S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht); - - pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile, - iorient, icount, iplex, ires, - (int)iwd, (int)iht); - return Success; } @@ -274,6 +265,10 @@ xfree(priv->jobFileName); priv->jobFileName = (char *)NULL; +#ifdef BM_CACHE + PsBmClearImageCache(); +#endif + return r; } @@ -286,13 +281,10 @@ { int iorient, iplex, icount, ires; unsigned short iwd, iht; - register WindowPtr pChild; PsContextPrivPtr pConPriv = (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr; - char s[80]; - xEvent event; /* * Put a pointer to the context in the window private structure @@ -305,6 +297,11 @@ /* * Start the page */ + if (pConPriv->pPsOut == NULL) { + pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile, + iorient, icount, iplex, ires, + (int)iwd, (int)iht, False); + } PsOut_BeginPage(pConPriv->pPsOut, iorient, icount, iplex, ires, (int)iwd, (int)iht); @@ -349,6 +346,18 @@ int PsStartDoc(XpContextPtr pCon, XPDocumentType type) { + int iorient, iplex, icount, ires; + unsigned short iwd, iht; + PsContextPrivPtr pConPriv = + (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; + + /* get document level attributes */ + S_GetPageAttributes(pCon,&iorient,&icount,&iplex,&ires,&iwd,&iht); + + pConPriv->pPsOut = PsOut_BeginFile(pConPriv->pJobFile, + iorient, icount, iplex, ires, + (int)iwd, (int)iht, (type == XPDocRaw)); + return Success; } Index: xc/programs/Xserver/Xprint/ps/PsSpans.c diff -u xc/programs/Xserver/Xprint/ps/PsSpans.c:1.7 xc/programs/Xserver/Xprint/ps/PsSpans.c:1.9 --- xc/programs/Xserver/Xprint/ps/PsSpans.c:1.7 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsSpans.c Fri Dec 14 14:59:17 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsSpans.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: PsSpans.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsSpans.c,v 1.7 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsSpans.c,v 1.9 2001/12/14 19:59:17 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" @@ -84,7 +88,6 @@ int *pWidths, int fSorted) { - char t[80]; PsOutPtr psOut; int xoffset, yoffset; xRectangle *rects, *r; Index: xc/programs/Xserver/Xprint/ps/PsText.c diff -u xc/programs/Xserver/Xprint/ps/PsText.c:1.10 xc/programs/Xserver/Xprint/ps/PsText.c:1.12 --- xc/programs/Xserver/Xprint/ps/PsText.c:1.10 Fri Jan 19 12:42:53 2001 +++ xc/programs/Xserver/Xprint/ps/PsText.c Fri Dec 14 14:59:17 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsText.c,v 1.6 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: PsText.c,v 1.7 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsText.c,v 1.10 2001/01/19 17:42:53 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsText.c,v 1.12 2001/12/14 19:59:17 dawes Exp $ */ #include "Ps.h" #include "gcstruct.h" @@ -81,9 +85,8 @@ { FILE *file; struct stat statb; - int count, i, status; char buf[256]; - char *front, *end, *fn; + char *front, *fn; file = fopen(fileName, "r"); if(file) @@ -385,7 +388,7 @@ pointer pGlyphBase) { int width, height; - PixmapPtr pPixmap; + PixmapPtr pPixmap = NullPixmap; int nbyLine; /* bytes per line of padded pixmap */ FontPtr pfont; GCPtr pGCtmp; Index: xc/programs/Xserver/Xprint/ps/PsWindow.c diff -u xc/programs/Xserver/Xprint/ps/PsWindow.c:1.9 xc/programs/Xserver/Xprint/ps/PsWindow.c:1.12 --- xc/programs/Xserver/Xprint/ps/PsWindow.c:1.9 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/PsWindow.c Wed Dec 19 16:55:59 2001 @@ -1,9 +1,13 @@ -/* $Xorg: PsWindow.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: PsWindow.c,v 1.4 2001/02/09 02:04:36 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/PsWindow.c,v 1.9 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/PsWindow.c,v 1.12 2001/12/19 21:55:59 dawes Exp $ */ #include #include @@ -83,8 +87,7 @@ #include "Ps.h" -extern WindowPtr *WindowTable; - +#if 0 /* * The following list of strings defines the properties which will be * placed on the screen's root window if the property was defined in @@ -101,7 +104,7 @@ DT_PRINT_PAGE_COMMAND, (char *)NULL }; - +#endif /* * PsCreateWindow - watch for the creation of the root window. @@ -216,7 +219,6 @@ RegionPtr pRegion, int what) { - int status; WindowPtr pRoot; #define FUNCTION 0 Index: xc/programs/Xserver/Xprint/ps/psout.c diff -u xc/programs/Xserver/Xprint/ps/psout.c:1.7 xc/programs/Xserver/Xprint/ps/psout.c:1.12 --- xc/programs/Xserver/Xprint/ps/psout.c:1.7 Wed Jan 17 17:36:32 2001 +++ xc/programs/Xserver/Xprint/ps/psout.c Fri Dec 21 16:02:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: psout.c,v 1.5 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: psout.c,v 1.9 2001/03/26 15:25:12 coskrey Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -69,7 +73,7 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xprint/ps/psout.c,v 1.7 2001/01/17 22:36:32 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/psout.c,v 1.12 2001/12/21 21:02:06 dawes Exp $ */ /* * For XFree86 3.3.3: @@ -87,8 +91,6 @@ #include "Ps.h" #include "psout.h" -PsElmPtr PsCloneFillElementList(int nElms, PsElmPtr elms); - typedef void *voidPtr; typedef struct PsPatRec_ @@ -140,6 +142,9 @@ int NDownloads; int MxDownloads; char **Downloads; + Bool isRaw; + + int start_image; } PsOutRec; /* @@ -333,6 +338,7 @@ {p dp currentpagedevice dp 3 -1 r kn \ {x get eq} {p p p t}ie} \ {p p t}ie}bd \ +/mtx{scl t [3 i 0 0 5 i 0 0]}bd \ "; int pagenum = 0; @@ -558,9 +564,21 @@ * PUBLIC FUNCTIONS * *******************************************************************/ +FILE * +PsOut_ChangeFile(PsOutPtr self, FILE *fp) +{ + FILE *nfp; + + nfp = self->Fp; + + self->Fp = fp; + + return nfp; +} + PsOutPtr PsOut_BeginFile(FILE *fp, int orient, int count, int plex, int res, - int wd, int ht) + int wd, int ht, Bool raw) { int i; /* @@ -570,27 +588,30 @@ psout = (PsOutPtr)xalloc(sizeof(PsOutRec)); memset(psout, 0, sizeof(PsOutRec)); psout->Fp = fp; + psout->isRaw = raw; pagenum = 0; + if (!raw) { /* * Output PostScript header */ - S_Comment(psout, "%!PS-Adobe-3.0 EPSF-3.0"); - S_Comment(psout, "%%Creator: The Open Group PostScript Print Server"); - /*### BoundingBox ###*/ - S_Comment(psout, "%%EndComments"); - S_Comment(psout, "%%BeginProlog"); - S_Comment(psout, "%%BeginProcSet: XServer_PS_Functions"); - S_OutDefs(psout, S_StandardDefs); - S_OutDefs(psout, S_CompositeDefs); - S_Comment(psout, "%%EndProcSet"); - S_Comment(psout, "%%EndProlog"); - S_Comment(psout, "%%BeginSetup"); - /* set document level page attributes */ - S_SetPageDevice(psout, orient, count, plex, res, wd, ht, 0); - S_Comment(psout, "%%Pages: atend"); - S_OutDefs(psout, S_SetupDefs); - S_Comment(psout, "%%EndSetup"); + S_Comment(psout, "%!PS-Adobe-3.0 EPSF-3.0"); + S_Comment(psout, "%%Creator: The Open Group PostScript Print Server"); + /*### BoundingBox ###*/ + S_Comment(psout, "%%EndComments"); + S_Comment(psout, "%%BeginProlog"); + S_Comment(psout, "%%BeginProcSet: XServer_PS_Functions"); + S_OutDefs(psout, S_StandardDefs); + S_OutDefs(psout, S_CompositeDefs); + S_Comment(psout, "%%EndProcSet"); + S_Comment(psout, "%%EndProlog"); + S_Comment(psout, "%%BeginSetup"); + /* set document level page attributes */ + S_SetPageDevice(psout, orient, count, plex, res, wd, ht, 0); + S_Comment(psout, "%%Pages: atend"); + S_OutDefs(psout, S_SetupDefs); + S_Comment(psout, "%%EndSetup"); + } /* * Initialize the structure */ @@ -602,6 +623,7 @@ psout->Dashes = (int *)0; psout->FontName = (char *)0; psout->FontSize = 0; + psout->start_image = 0; for( i=0 ; i<4 ; i++ ) psout->FontMtx[i] = 0.; psout->ImageFormat = 0; return(psout); @@ -613,10 +635,12 @@ char coms[50]; int i; - S_Comment(self,"%%Trailer"); - sprintf(coms,"%%%%Pages: %d",pagenum); - S_Comment(self, coms); - S_Comment(self, "%%EOF"); + if (!self->isRaw) { + S_Comment(self,"%%Trailer"); + sprintf(coms,"%%%%Pages: %d",pagenum); + S_Comment(self, coms); + S_Comment(self, "%%EOF"); + } if( self->NDashes && self->Dashes ) xfree(self->Dashes); if( self->FontName ) xfree(self->FontName); if( self->Patterns ) xfree(self->Patterns); @@ -766,7 +790,6 @@ } } } - if( !changed ) return; if( self->Clip.rects ) xfree(self->Clip.rects); if( self->Clip.outterClips ) xfree(self->Clip.outterClips); @@ -1148,6 +1171,61 @@ } } +#ifdef BM_CACHE +void /* new */ +PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, int bclr, int fclr) +{ + char cacheID[10]; + int xo = self->XOff; + int yo = self->YOff; + + if( self->InFrame || self->InTile ) xo = yo = 0; + x += xo; y += yo; + sprintf(cacheID, "c%ldi", cache_id); + + S_OutNum(self, (float)x); + S_OutNum(self, (float)y); + + if( fclr==0xFFFFFF ) + { + int ir, ig, ib; + ir = bclr>>16; ig = (bclr>>8)&0xFF; ib = bclr&0xFF; + if( ir==ig && ig==ib ) + S_OutNum(self, (float)ir/255.); + else + S_OutNum(self, (float)0); + self->RevImage = 1; + } + else + { + int ir, ig, ib; + ir = fclr>>16; ig = (fclr>>8)&0xFF; ib = fclr&0xFF; + if( ir==ig && ig==ib ) + S_OutNum(self, (float)ir/255.); + else + S_OutNum(self, (float)0); + } + + S_OutTok(self, cacheID, 1); +} /* new */ + +void /* new */ +PsOut_BeginImageCache(PsOutPtr self, long cache_id) +{ + char cacheID[10]; + + sprintf(cacheID, "/c%ldi {", cache_id); + + S_OutTok(self, cacheID, 0); +} /* new */ + +void /* new */ +PsOut_EndImageCache(PsOutPtr self) +{ + S_OutTok(self, "}bd", 1); +} /* new */ +#endif + void PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y, int w, int h, int sw, int sh, int format) @@ -1237,6 +1315,9 @@ if( format==1 ) { S_OutTok(self, "gs", 0); +#ifdef BM_CACHE + S_OutTok(self, "g", 1); +#else if( fclr==0xFFFFFF ) { PsOut_Color(self, bclr); @@ -1246,13 +1327,24 @@ { PsOut_Color(self, fclr); } +#endif } + +#ifdef BM_CACHE + S_OutTok(self, "tr", 0); /* new */ +#else S_OutNum(self, (float)x); S_OutNum(self, (float)y); +#endif S_OutNum(self, (float)w); S_OutNum(self, (float)h); S_OutNum(self, (float)sw); S_OutNum(self, (float)sh); +#ifdef BM_CACHE + S_OutTok(self, "mtx", 1); /* new */ + S_OutTok(self, "<", 0); /* new */ + self->start_image = 1; +#else if( format==1 ){ if(self->RevImage) S_OutTok(self, "Im1rev", 1); @@ -1260,6 +1352,7 @@ S_OutTok(self, "Im1", 1); } else S_OutTok(self, "Im24", 1); +#endif self->ImageFormat = format; self->CurColor = savClr; } @@ -1299,10 +1392,24 @@ return; } +#ifdef BM_CACHE + if(self->start_image) + S_OutTok(self, "> im", 1); /* new */ +#endif self->ImageFormat = 0; self->RevImage = 0; S_Flush(self); +#ifdef BM_CACHE + if(self->start_image) + { + self->start_image = 0; + S_OutTok(self, "gr", 0); + } + else + S_OutTok(self, "gr", 1); +#else S_OutTok(self, "gr", 1); +#endif } void Index: xc/programs/Xserver/Xprint/ps/psout.h diff -u xc/programs/Xserver/Xprint/ps/psout.h:1.1.1.3 xc/programs/Xserver/Xprint/ps/psout.h:1.5 --- xc/programs/Xserver/Xprint/ps/psout.h:1.1.1.3 Tue Jan 16 17:42:05 2001 +++ xc/programs/Xserver/Xprint/ps/psout.h Fri Dec 21 16:02:06 2001 @@ -1,9 +1,13 @@ -/* $Xorg: psout.h,v 1.4 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: psout.h,v 1.6 2001/02/09 02:04:37 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -53,6 +57,7 @@ * or other dealings in this Software without prior written authorization * from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/ps/psout.h,v 1.5 2001/12/21 21:02:06 dawes Exp $ */ /******************************************************************* ** @@ -145,7 +150,7 @@ typedef struct PsOutRec_ *PsOutPtr; extern PsOutPtr PsOut_BeginFile(FILE *fp, int orient, int count, int plex, - int res, int wd, int ht); + int res, int wd, int ht, Bool raw); extern void PsOut_EndFile(PsOutPtr self, int closeFile); extern void PsOut_BeginPage(PsOutPtr self, int orient, int count, int plex, int res, int wd, int ht); @@ -178,8 +183,10 @@ extern void PsOut_Text(PsOutPtr self, int x, int y, char *text, int textl, int bclr); -extern void PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y, +extern void PsOut_BeginImage(PsOutPtr self, int bclr, int fclr, int x, int y, int w, int h, int sw, int sh, int format); +extern void PsOut_BeginImageIM(PsOutPtr self, int bclr, int fclr, int x, int y, + int w, int h, int sw, int sh, int format); extern void PsOut_EndImage(PsOutPtr self); extern void PsOut_OutImageBytes(PsOutPtr self, int nBytes, char *bytes); @@ -194,5 +201,15 @@ extern void PsOut_RawData(PsOutPtr self, char *data, int len); extern void PsOut_DownloadType1(PsOutPtr self, char *name, char *fname); + +#ifdef BM_CACHE +extern void PsOut_BeginImageCache(PsOutPtr self, long cache_id); +extern void PsOut_EndImageCache(PsOutPtr self); +extern void PsOut_ImageCache(PsOutPtr self, int x, int y, long cache_id, + int bclr, int fclr); +#endif + +extern FILE *PsOut_ChangeFile(PsOutPtr self, FILE *fp); + #endif Index: xc/programs/Xserver/Xprint/raster/Imakefile diff -u xc/programs/Xserver/Xprint/raster/Imakefile:1.5 xc/programs/Xserver/Xprint/raster/Imakefile:1.6 --- xc/programs/Xserver/Xprint/raster/Imakefile:1.5 Wed Jan 17 17:36:33 2001 +++ xc/programs/Xserver/Xprint/raster/Imakefile Tue Jul 31 20:44:46 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/Xprint/raster/Imakefile,v 1.5 2001/01/17 22:36:33 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/Xprint/raster/Imakefile,v 1.6 2001/08/01 00:44:46 tsi Exp $ #include @@ -14,13 +14,15 @@ OBJS = $(OBJS1) - INCLUDES = -I. \ - -I../../cfb -I$(TOP) \ - -I../../include -I.. -I$(TOP)/include + INCLUDES = -I. -I$(XINCLUDESRC) -I.. \ + -I../../cfb -I../../mfb -I../../mi \ + -I../../include -I$(TOP)/include -I$(FONTINCSRC) LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln \ ../../mfb/llib-lmfb.ln ../../mi/llib-lmi.ln \ ../../cfb/llib-lcfb.ln + + DEFINES = -D_XP_PRINT_SERVER_ -UXFree86LOADER NormalLibraryObjectRule() Index: xc/programs/Xserver/Xprint/raster/Raster.c diff -u xc/programs/Xserver/Xprint/raster/Raster.c:1.4 xc/programs/Xserver/Xprint/raster/Raster.c:1.11 --- xc/programs/Xserver/Xprint/raster/Raster.c:1.4 Wed Jan 17 17:36:33 2001 +++ xc/programs/Xserver/Xprint/raster/Raster.c Fri Dec 21 16:02:06 2001 @@ -1,4 +1,4 @@ -/* $Xorg: Raster.c,v 1.3 2000/08/17 19:48:11 cpqbld Exp $ */ +/* $Xorg: Raster.c,v 1.4 2001/03/14 18:46:12 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -31,7 +31,7 @@ copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/raster/Raster.c,v 1.4 2001/01/17 22:36:33 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/Xprint/raster/Raster.c,v 1.11 2001/12/21 21:02:06 dawes Exp $ */ /******************************************************************* ** @@ -48,12 +48,14 @@ ** ********************************************************************/ +#include #include #include #include #include #include - +#include +#include #include "X.h" #include "Xos.h" /* for SIGCLD on pre-POSIX systems */ #define NEED_EVENTS @@ -68,14 +70,15 @@ #include "windowstr.h" #include "propertyst.h" #include "servermd.h" /* needed for IMAGE_BUFSIZE */ +#include "mfb.h" +#include "mi.h" -#define _XP_PRINT_SERVER_ -#include "extensions/Print.h" -#undef _XP_PRINT_SERVER_ +#include #include "Raster.h" #include "attributes.h" #include "AttrValid.h" +#include "DiPrint.h" static void AllocateRasterPrivates( ScreenPtr pScreen); @@ -84,12 +87,14 @@ unsigned long mask); static int StartJob( XpContextPtr pCon, - Bool sendClientData); + Bool sendClientData, + ClientPtr client); static int StartPage( XpContextPtr pCon, WindowPtr pWin); static int StartDoc( - XpContextPtr pCon); + XpContextPtr pCon, + XPDocumentType type); static int EndDoc( XpContextPtr pCon, Bool cancel); @@ -98,8 +103,7 @@ Bool cancel); static int EndPage( XpContextPtr pCon, - WindowPtr pWin, - Bool cancel); + WindowPtr pWin); static int DocumentData( XpContextPtr pCon, DrawablePtr pDraw, @@ -129,10 +133,10 @@ static char *RasterGetOneAttribute(XpContextPtr pCon, XPAttributes class, char *attribute); -static void RasterSetAttributes(XpContextPtr pCon, +static int RasterSetAttributes(XpContextPtr pCon, XPAttributes class, char *attributes); -static void RasterAugmentAttributes(XpContextPtr pCon, +static int RasterAugmentAttributes(XpContextPtr pCon, XPAttributes class, char *attributes); static int RasterMediumDimensions(XpContextPtr pCon, @@ -142,22 +146,37 @@ xRectangle *pRect); #define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#define DOC_PCL 1 +#define DOC_RASTER 2 -extern Bool _XpBoolNoop(); -extern void _XpVoidNoop(); -extern void XpDestroyAttributes(); -extern char *ReplaceFileString( - char *string, - char *inFileName, - char *outFileName); -extern char *XpGetConfigDir(); - -extern XpValidatePoolsRec RasterValidatePoolsRec; /* From RasterAttVal.c */ - static int RasterScreenPrivateIndex, RasterContextPrivateIndex; static int RasterGeneration = 0; static char RASTER_DRIV_NAME[] = "XP-RASTER"; +static int doc_type = DOC_RASTER; + +#define ABSOLUTE_PCLCOMP_PATH1 "/usr/openwin/bin/pclcomp" +#define ABSOLUTE_PCLCOMP_PATH2 "/usr/X11/bin/pclcomp" +static char *pcl3_output_cmds[] = { + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -0 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -01 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -02 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -03 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -012 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -013 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -023 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% | pclcomp -0123 > %(OutFile)%", + "xpr -device ljet -rv -landscape < %(InFile)% > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -0 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -01 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -02 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -03 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -012 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -013 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -023 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% | pclcomp -0123 > %(OutFile)%", + "xpr -device ljet -rv < %(InFile)% > %(OutFile)%"}; + Bool InitializeRasterDriver( int ndx, @@ -165,13 +184,9 @@ int argc, char **argv) { - char specifier[MAX_TOKEN_LEN]; - int xRes, yRes, maxWidth, maxHeight; + int xRes, yRes; int maxRes, maxDim, numBytes; RasterScreenPrivPtr pPriv; - XpDriverFuncsPtr pFuncs; - char **printerNames, *printDescFile; - int numPrinters; /* * Register this driver's InitContext function with the print extension. @@ -218,7 +233,7 @@ scalingScreenInit(pScreen); */ - pScreen->SaveScreen = _XpBoolNoop; + pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop; pPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes; pPriv->CloseScreen = pScreen->CloseScreen; @@ -245,25 +260,125 @@ pCon->devPrivates[RasterContextPrivateIndex].ptr; char *type; XrmValue val; - + struct stat status; + int pclcomp_exists = 0; + if( XrmGetResource(pConPriv->config, propName, propName, &type, &val) == True ) return (char *)val.addr; if( !strcmp( propName, RASTER_PRINT_PAGE_COMMAND ) ) - return "xpr -device ps %(InFile)% > %(OutFile)%"; + if( doc_type == DOC_RASTER ) + return "xpr -device ps %(InFile)% > %(OutFile)%"; + else + { + XpOid orientation; + XpOid compression; + int pcl3_output_index = 0; + + orientation = XpGetContentOrientation(pCon); + compression = XpGetAvailableCompression(pCon); + + switch(orientation) { + case xpoid_val_content_orientation_landscape: + pcl3_output_index = 0; + break; + default: + pcl3_output_index += 9; + break; + } + + if(stat(ABSOLUTE_PCLCOMP_PATH1, &status) != -1) + pclcomp_exists = 1; + else if(stat(ABSOLUTE_PCLCOMP_PATH2, &status) != -1) + pclcomp_exists = 1; + + if(pclcomp_exists) + switch(compression) { + case xpoid_val_available_compressions_0: + pcl3_output_index += 0; + break; + case xpoid_val_available_compressions_01: + pcl3_output_index += 1; + break; + case xpoid_val_available_compressions_02: + pcl3_output_index += 2; + break; + case xpoid_val_available_compressions_03: + pcl3_output_index += 3; + break; + case xpoid_val_available_compressions_012: + pcl3_output_index += 4; + break; + case xpoid_val_available_compressions_013: + pcl3_output_index += 5; + break; + case xpoid_val_available_compressions_023: + pcl3_output_index += 6; + break; + default: + pcl3_output_index += 7; + break; + } + else + pcl3_output_index += 8; + + return pcl3_output_cmds[pcl3_output_index]; + } else return NULL; } +static void +SetDocumentType( + XpContextPtr pCon) +{ + XpOidList* attrs_supported; + + /* + * only validate attributes found in document-attributes-supported + */ + attrs_supported = + XpGetListAttr(pCon, XPPrinterAttr, + xpoid_att_document_attributes_supported, + (const XpOidList*)NULL); + + if(XpOidListHasOid(attrs_supported, xpoid_att_document_format)) + { + const char* value_in; + XpOidDocFmt *f; + + value_in = XpGetStringAttr(pCon, XPDocAttr, xpoid_att_document_format); + + f = XpOidDocFmtNew( value_in ); + + if( f != NULL ) + { + if( !strcmp( f->format, "PCL" ) ) + doc_type = DOC_PCL; + else + doc_type = DOC_RASTER; + + XpOidDocFmtDelete( f ); + } + } + + /* + * clean up + */ + XpOidListDelete(attrs_supported); +} + static int StartJob( XpContextPtr pCon, - Bool sendClientData) + Bool sendClientData, + ClientPtr client) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) pCon->devPrivates[RasterContextPrivateIndex].ptr; - char *jobHeader; + + SetDocumentType( pCon ); /* * Check for existing page file, and delete it if it exists. @@ -302,7 +417,8 @@ static int StartDoc( - XpContextPtr pCon) + XpContextPtr pCon, + XPDocumentType type) { return Success; } @@ -314,6 +430,10 @@ return Success; } +#if 0 + +/* XXX Not used. */ + /* * BuidArgVector takes a pointer to a comma-separated list of command * options and splits it out into an array of argument pointers. The @@ -331,7 +451,6 @@ int argCount) { char *curArg, *lastChar, *endArg; - int optionLen; curArg = optionList; lastChar = optionList + strlen(optionList); /* includes final NULL */ @@ -366,6 +485,7 @@ return argVector; } +#endif static int EndJob( @@ -433,11 +553,8 @@ XpContextPtr pCon, WindowPtr pWin) { - register WindowPtr pChild; RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) pCon->devPrivates[RasterContextPrivateIndex].ptr; - unsigned short width, height; - xEvent event; if(pConPriv->pPageFile != (FILE *)NULL) { @@ -530,7 +647,7 @@ return(colors); } -static +static void _swapshort ( register char *bp, register unsigned n) @@ -546,7 +663,7 @@ } } -static +static void _swaplong ( register char *bp, register unsigned n) @@ -757,19 +874,14 @@ static int EndPage( XpContextPtr pCon, - WindowPtr pWin, - Bool cancel) + WindowPtr pWin) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) pCon->devPrivates[RasterContextPrivateIndex].ptr; struct stat statBuf; - char *rasterFileName = (char *)NULL, *pCommand = (char *)NULL, - *pHeader = (char *)NULL, *pTrailer = (char *)NULL; + char *rasterFileName = (char *)NULL, *pCommand = (char *)NULL; FILE *pRasterFile = (FILE *)NULL; - if( cancel == True ) - return Success; - if(pConPriv->pageFileName == (char *)NULL) { /* @@ -1072,14 +1184,13 @@ mask |= CWBackingStore; } - if(pScreenPriv->ChangeWindowAttributes != (Bool (*)())NULL) + if(pScreenPriv->ChangeWindowAttributes != NULL) { pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; status = pScreen->ChangeWindowAttributes(pWin, mask); pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes; } - if(status != TRUE) - return status; + return status; } /* @@ -1153,12 +1264,12 @@ pFuncs->PutDocumentData = DocumentData; pFuncs->GetDocumentData = GetDocumentData; pFuncs->DestroyContext = RasterDestroyContext; - pFuncs->GetAttributes = (char *(*)())RasterGetAttributes; - pFuncs->GetOneAttribute = (char *(*)())RasterGetOneAttribute; - pFuncs->SetAttributes = (int(*)())RasterSetAttributes; - pFuncs->AugmentAttributes = (int(*)())RasterAugmentAttributes; - pFuncs->GetMediumDimensions = (int(*)())RasterMediumDimensions; - pFuncs->GetReproducibleArea = (int(*)())RasterReproducibleArea; + pFuncs->GetAttributes = RasterGetAttributes; + pFuncs->GetOneAttribute = RasterGetOneAttribute; + pFuncs->SetAttributes = RasterSetAttributes; + pFuncs->AugmentAttributes = RasterAugmentAttributes; + pFuncs->GetMediumDimensions = RasterMediumDimensions; + pFuncs->GetReproducibleArea = RasterReproducibleArea; /* * Set up the context privates @@ -1293,21 +1404,21 @@ return XpGetOneAttribute( pContext, class, attr ); } -static void +static int RasterSetAttributes(XpContextPtr pCon, XPAttributes class, char *attributes) { - XpSetAttributes( pCon, class, attributes ); + return XpSetAttributes( pCon, class, attributes ); } -static void +static int RasterAugmentAttributes( XpContextPtr pCon, XPAttributes class, char *attributes) { - XpAugmentAttributes( pCon, class, attributes ); + return XpAugmentAttributes( pCon, class, attributes ); } static void @@ -1376,7 +1487,7 @@ /* * Call any wrapped CloseScreen proc. */ - if(pScreenPriv->CloseScreen != (Bool (*)())NULL) + if(pScreenPriv->CloseScreen != NULL) { pScreen->CloseScreen = pScreenPriv->CloseScreen; status = pScreen->CloseScreen(index, pScreen); @@ -1395,6 +1506,7 @@ static void SigchldHndlr (int dummy) { int status, w; + int olderrno = errno; struct sigaction act; sigfillset(&act.sa_mask); act.sa_flags = 0; @@ -1406,6 +1518,7 @@ * Is this really necessary? */ sigaction(SIGCHLD, &act, (struct sigaction *)NULL); + errno = olderrno; } /* Index: xc/programs/Xserver/Xprint/raster/Raster.h diff -u xc/programs/Xserver/Xprint/raster/Raster.h:1.1.1.2 xc/programs/Xserver/Xprint/raster/Raster.h:1.4 --- xc/programs/Xserver/Xprint/raster/Raster.h:1.1.1.2 Tue Jan 16 17:42:07 2001 +++ xc/programs/Xserver/Xprint/raster/Raster.h Fri Dec 21 16:02:06 2001 @@ -30,6 +30,8 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/raster/Raster.h,v 1.4 2001/12/21 21:02:06 dawes Exp $ */ + /******************************************************************* ** ** ********************************************************* @@ -50,17 +52,18 @@ /* * Some sleazes to force the XrmDB stuff into the server */ +#ifndef HAVE_XPointer typedef char *XPointer; +#endif #define Status int #define True 1 #define False 0 #include "misc.h" #include -#include "../Xresource.h" +#include +#include "attributes.h" -#define _XP_PRINT_SERVER_ -#include "extensions/Printstr.h" -#undef _XP_PRINT_SERVER_ +#include #define MAX_TOKEN_LEN 512 @@ -81,10 +84,10 @@ typedef struct { char *pBits; - Bool (* CreateWindow)(); /* pWin */ - Bool (* ChangeWindowAttributes)(); /* pWin, mask */ - Bool (* DestroyWindow)(); /* pWin */ - Bool (* CloseScreen)(); /* index, pScreen */ + CreateWindowProcPtr CreateWindow; + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + DestroyWindowProcPtr DestroyWindow; + CloseScreenProcPtr CloseScreen; } RasterScreenPrivRec, *RasterScreenPrivPtr; typedef struct { @@ -102,5 +105,11 @@ ClientPtr getDocClient; int getDocBufSize; } RasterContextPrivRec, *RasterContextPrivPtr; + + +extern XpValidatePoolsRec RasterValidatePoolsRec; + +extern Bool InitializeRasterDriver(int ndx, ScreenPtr pScreen, int argc, + char **argv); #endif /* _RASTER_H_ */ Index: xc/programs/Xserver/Xprint/raster/RasterAttVal.c diff -u xc/programs/Xserver/Xprint/raster/RasterAttVal.c:1.1.1.2 xc/programs/Xserver/Xprint/raster/RasterAttVal.c:1.4 --- xc/programs/Xserver/Xprint/raster/RasterAttVal.c:1.1.1.2 Tue Jan 16 17:42:07 2001 +++ xc/programs/Xserver/Xprint/raster/RasterAttVal.c Fri Dec 21 16:02:06 2001 @@ -1,4 +1,4 @@ -/* $Xorg: RasterAttVal.c,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ +/* $Xorg: RasterAttVal.c,v 1.4 2001/03/14 18:46:34 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -30,15 +30,15 @@ dealings in this Software without prior written authorization from said copyright holders. */ +/* $XFree86: xc/programs/Xserver/Xprint/raster/RasterAttVal.c,v 1.4 2001/12/21 21:02:06 dawes Exp $ */ + #include #include "X.h" #include "misc.h" #include "dixstruct.h" #include "scrnintstr.h" #include "screenint.h" -#define _XP_PRINT_SERVER_ -#include "extensions/Print.h" -#undef _XP_PRINT_SERVER_ +#include #include "Raster.h" #include "attributes.h" @@ -48,14 +48,16 @@ * define valid values and defaults for Printer pool */ static XpOid ValidContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait + xpoid_val_content_orientation_portrait, + xpoid_val_content_orientation_landscape }; static XpOidList ValidContentOrientations = { ValidContentOrientationsOids, XpNumber(ValidContentOrientationsOids) }; static XpOid DefaultContentOrientationsOids[] = { - xpoid_val_content_orientation_portrait + xpoid_val_content_orientation_portrait, + xpoid_val_content_orientation_landscape }; static XpOidList DefaultContentOrientations = { DefaultContentOrientationsOids, XpNumber(DefaultContentOrientationsOids) @@ -111,7 +113,8 @@ }; static XpOidDocFmt ValidDocFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } + { "Postscript", "2", NULL }, + { "PCL", "3", NULL } }; static XpOidDocFmtList ValidDocFormatsSupported = { ValidDocFormatsSupportedFmts, XpNumber(ValidDocFormatsSupportedFmts) @@ -133,7 +136,8 @@ }; static XpOidDocFmt ValidRawFormatsSupportedFmts[] = { - { "Postscript", "2", NULL } + { "Postscript", "2", NULL }, + { "PCL", "3", NULL } }; static XpOidDocFmtList ValidRawFormatsSupported = { ValidRawFormatsSupportedFmts, XpNumber(ValidRawFormatsSupportedFmts) @@ -218,6 +222,30 @@ "Postscript", "2", NULL }; +static XpOid ValidAvailableCompressionsOids[] = { + xpoid_val_available_compressions_0, + xpoid_val_available_compressions_01, + xpoid_val_available_compressions_02, + xpoid_val_available_compressions_03, + xpoid_val_available_compressions_012, + xpoid_val_available_compressions_013, + xpoid_val_available_compressions_023, + xpoid_val_available_compressions_0123 +}; + +static XpOidList ValidAvailableCompressions = { + ValidAvailableCompressionsOids, XpNumber(ValidAvailableCompressionsOids) +}; + +static XpOid DefaultAvailableCompressionsOids[] = { + xpoid_val_available_compressions_0123, + xpoid_val_available_compressions_0 +}; + +static XpOidList DefaultAvailableCompressions = { + DefaultAvailableCompressionsOids, XpNumber(DefaultAvailableCompressionsOids) +}; + /* * init struct for XpValidate*Pool @@ -232,5 +260,6 @@ &ValidListfontsModes, &DefaultListfontsModes, &ValidRawFormatsSupported, &DefaultRawFormatsSupported, &ValidSetupProviso, - &DefaultDocumentFormat + &DefaultDocumentFormat, + &ValidAvailableCompressions, &DefaultAvailableCompressions }; Index: xc/programs/Xserver/afb/afb.h diff -u xc/programs/Xserver/afb/afb.h:3.6 xc/programs/Xserver/afb/afb.h:3.8 --- xc/programs/Xserver/afb/afb.h:3.6 Fri Jul 14 20:27:07 2000 +++ xc/programs/Xserver/afb/afb.h Sat Oct 27 23:32:57 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afb.h,v 3.6 2000/07/15 00:27:07 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afb.h,v 3.8 2001/10/28 03:32:57 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -58,6 +58,7 @@ #include "colormap.h" #include "miscstruct.h" #include "mibstore.h" +#include "mfb.h" extern int afbInverseAlu[]; extern int afbScreenPrivateIndex; @@ -282,12 +283,25 @@ /* afbcmap.c */ -extern Bool afbInitializeColormap( +extern int afbListInstalledColormaps( +#if NeedFunctionPrototypes + ScreenPtr /*pScreen*/, + Colormap * /*pmaps*/ +#endif +); + +extern void afbInstallColormap( #if NeedFunctionPrototypes ColormapPtr /*pmap*/ #endif ); +extern void afbUninstallColormap( +#if NeedFunctionPrototypes + ColormapPtr /*pmap*/ +#endif +); + extern void afbResolveColor( #if NeedFunctionPrototypes unsigned short * /*pred*/, @@ -297,6 +311,27 @@ #endif ); +extern Bool afbInitializeColormap( +#if NeedFunctionPrototypes + ColormapPtr /*pmap*/ +#endif +); + +extern int afbExpandDirectColors( +#if NeedFunctionPrototypes + ColormapPtr /*pmap*/, + int /*ndefs*/, + xColorItem * /*indefs*/, + xColorItem * /*outdefs*/ +#endif +); + +extern Bool afbCreateDefColormap( +#if NeedFunctionPrototypes + ScreenPtr /*pScreen*/ +#endif +); + extern Bool afbSetVisualTypes( #if NeedFunctionPrototypes int /*depth*/, @@ -305,10 +340,18 @@ #endif ); -extern int afbListInstalledColormaps(ScreenPtr, Colormap *); -extern void afbInstallColormap(ColormapPtr); -extern void afbUninstallColormap(ColormapPtr); -extern Bool afbCreateDefColormap(ScreenPtr); +extern Bool afbInitVisuals( +#if NeedFunctionPrototypes + VisualPtr * /*visualp*/, + DepthPtr * /*depthp*/, + int * /*nvisualp*/, + int * /*ndepthp*/, + int * /*rootDepthp*/, + VisualID * /*defaultVisp*/, + unsigned long /*sizes*/, + int /*bitsPerRGB*/ +#endif +); /* afbfillarc.c */ @@ -500,7 +543,7 @@ ); /* afbhrzvert.c */ -extern int afbHorzS( +extern void afbHorzS( #if NeedFunctionPrototypes PixelType * /*addrl*/, int /*nlwidth*/, @@ -513,7 +556,7 @@ #endif ); -extern int afbVertS( +extern void afbVertS( #if NeedFunctionPrototypes PixelType * /*addrl*/, int /*nlwidth*/, @@ -792,7 +835,7 @@ ); /* afbsetsp.c */ -extern int afbSetScanline( +extern void afbSetScanline( #if NeedFunctionPrototypes int /*y*/, int /*xOrigin*/, @@ -1215,6 +1258,7 @@ case GXandInverted: \ result = fnANDINVERTED (src, dst); \ break; \ + default: \ case GXnoop: \ result = fnNOOP (src, dst); \ break; \ Index: xc/programs/Xserver/afb/afbbitblt.c diff -u xc/programs/Xserver/afb/afbbitblt.c:3.2 xc/programs/Xserver/afb/afbbitblt.c:3.3 --- xc/programs/Xserver/afb/afbbitblt.c:3.2 Fri Mar 20 16:04:53 1998 +++ xc/programs/Xserver/afb/afbbitblt.c Sat Oct 27 23:32:57 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbbitblt.c,v 3.2 1998/03/20 21:04:53 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbbitblt.c,v 3.3 2001/10/28 03:32:57 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -171,7 +171,7 @@ void (*doBitBlt)(); unsigned long planemask; { - RegionPtr prgnSrcClip; /* may be a new region, or just a copy */ + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ Bool freeSrcClip = FALSE; RegionPtr prgnExposed; @@ -188,7 +188,6 @@ BoxRec fastBox; int fastClip = 0; /* for fast clipping with pixmap source */ int fastExpose = 0; /* for fast exposures with pixmap source */ - void (*localDoBitBlt)(); origSource.x = srcx; origSource.y = srcy; @@ -374,7 +373,6 @@ int alu; RegionPtr prgnExposed = NULL; unsigned long old_planemask; - PixmapPtr pPixmap = NULL; if (pDstDrawable->depth == 1) { old_planemask = pGC->planemask; @@ -405,7 +403,7 @@ int free_pixmap = FALSE; PixmapPtr pBitmap = (PixmapPtr)pSrcDrawable; ScreenPtr pScreen = pSrcDrawable->pScreen; - GCPtr pGC1; + GCPtr pGC1 = NULL; if (pSrcDrawable == pDstDrawable || pSrcDrawable->type == DRAWABLE_WINDOW || pSrcDrawable->depth != 1) { Index: xc/programs/Xserver/afb/afbblt.c diff -u xc/programs/Xserver/afb/afbblt.c:3.0 xc/programs/Xserver/afb/afbblt.c:3.1 --- xc/programs/Xserver/afb/afbblt.c:3.0 Sat Aug 17 21:45:24 1996 +++ xc/programs/Xserver/afb/afbblt.c Sat Oct 27 23:32:57 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbblt.c,v 3.0 1996/08/18 01:45:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbblt.c,v 3.1 2001/10/28 03:32:57 tsi Exp $ */ /* * afb copy area */ @@ -56,7 +56,6 @@ { PixelType *psrcBase, *pdstBase; /* start of src and dst bitmaps */ int widthSrc, widthDst; /* add to get to same position in next line */ - int heightSrc, heightDst; int sizeSrc, sizeDst; BoxPtr pbox; @@ -87,13 +86,7 @@ register PixelType bits1; register int nl; /* temp copy of nlMiddle */ - /* place to store full source word */ - int nstart; /* number of ragged bits at start of dst */ - int nend; /* number of ragged bits at end of dst */ - int srcStartOver; /* pulling nstart bits from src - overflows into the next word? */ int careful; - int tmpSrc; int depthSrc; int depthDst; Index: xc/programs/Xserver/afb/afbclip.c diff -u xc/programs/Xserver/afb/afbclip.c:3.1 xc/programs/Xserver/afb/afbclip.c:3.2 --- xc/programs/Xserver/afb/afbclip.c:3.1 Sun Jun 13 09:47:37 1999 +++ xc/programs/Xserver/afb/afbclip.c Sat Oct 27 23:32:57 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbclip.c,v 3.1 1999/06/13 13:47:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbclip.c,v 3.2 2001/10/28 03:32:57 tsi Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -94,18 +94,18 @@ afbPixmapToRegion(pPix) PixmapPtr pPix; { - register RegionPtr pReg; - register PixelType *pw, w; + register RegionPtr pReg; + register PixelType *pw, w; register int ib; - int width, h, base, rx1, crects; - PixelType *pwLineEnd; - int irectPrevStart, irectLineStart; + int width, h, base, rx1 = 0, crects; + PixelType *pwLineEnd; + int irectPrevStart, irectLineStart; register BoxPtr prectO, prectN; - BoxPtr FirstRect, rects, prectLineStart; - Bool fInBox, fSame; - register PixelType mask0 = mask[0]; - PixelType *pwLine; - int nWidth; + BoxPtr FirstRect, rects, prectLineStart; + Bool fInBox, fSame; + register PixelType mask0 = mask[0]; + PixelType *pwLine; + int nWidth; pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1); if(!pReg) Index: xc/programs/Xserver/afb/afbfillsp.c diff -u xc/programs/Xserver/afb/afbfillsp.c:3.3 xc/programs/Xserver/afb/afbfillsp.c:3.4 --- xc/programs/Xserver/afb/afbfillsp.c:3.3 Tue Nov 21 19:58:12 2000 +++ xc/programs/Xserver/afb/afbfillsp.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbfillsp.c,v 3.3 2000/11/22 00:58:12 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbfillsp.c,v 3.4 2001/10/28 03:32:58 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -353,7 +353,7 @@ switch(rop) { case GXcopy: -#define DoMaskCopyRop(src,dst,mask) ((dst) & ~(mask) | (src) & (mask)) +#define DoMaskCopyRop(src,dst,mask) (((dst) & ~(mask)) | ((src) & (mask))) while (n--) { if (*pwidth) { addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); @@ -447,7 +447,7 @@ PixelType *pBase; int nlwidth; /* width in longwords of bitmap */ register PixelType *addrl; /* pointer to current longword in bitmap */ - register PixelType src; + register PixelType src = 0; register int nlmiddle; register PixelType startmask; register PixelType endmask; @@ -486,7 +486,6 @@ switch(rop) { case GXcopy: -#define DoMaskCopyRop(src,dst,mask) ((dst) & ~(mask) | (src) & (mask)) while (n--) { addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); if (*pwidth) { @@ -902,7 +901,7 @@ register PixelType *psrc;/* pointer to current word in tile */ register int nlMiddle; register int d; - register PixelType tmpsrc; + register PixelType tmpsrc = 0; register PixelType tmpdst; register int alu, nstart; register unsigned char *rropsOS; @@ -914,7 +913,6 @@ int *pwidthFree; /* copies of the pointers to free */ DDXPointPtr pptFree; int sizeDst; - int sizeTile; int depthDst; n = nInit * miFindMaxBand(pGC->pCompositeClip); Index: xc/programs/Xserver/afb/afbgc.c diff -u xc/programs/Xserver/afb/afbgc.c:3.2 xc/programs/Xserver/afb/afbgc.c:3.3 --- xc/programs/Xserver/afb/afbgc.c:3.2 Sun Jun 20 11:02:46 1999 +++ xc/programs/Xserver/afb/afbgc.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbgc.c,v 3.2 1999/06/20 15:02:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbgc.c,v 3.3 2001/10/28 03:32:58 tsi Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -156,7 +156,6 @@ int mask; /* stateChanges */ int index; /* used for stepping through bitfields */ int xrot, yrot; /* rotations for tile and stipple pattern */ - int rrop; /* reduced rasterop */ /* flags for changing the proc vector and updating things in devPriv */ @@ -621,8 +620,6 @@ GCPtr pGC; DrawablePtr pDrawable; { - ScreenPtr pScreen = pGC->pScreen; - if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDrawable; RegionPtr pregWin; @@ -646,7 +643,7 @@ */ if (pGC->clientClipType == CT_NONE) { if (freeCompClip) - REGION_DESTROY(pScreen, pGC->pCompositeClip); + REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); pGC->pCompositeClip = pregWin; pGC->freeCompClip = freeTmpClip; } else { @@ -659,7 +656,7 @@ * clip. if neither is real, create a new region. */ - REGION_TRANSLATE(pScreen, pGC->clientClip, + REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, pDrawable->x + pGC->clipOrg.x, pDrawable->y + pGC->clipOrg.y); @@ -667,17 +664,17 @@ REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin, pGC->clientClip); if (freeTmpClip) - REGION_DESTROY(pScreen, pregWin); + REGION_DESTROY(pGC->pScreen, pregWin); } else if (freeTmpClip) { - REGION_INTERSECT(pScreen, pregWin, pregWin, pGC->clientClip); + REGION_INTERSECT(pGC->pScreen, pregWin, pregWin, pGC->clientClip); pGC->pCompositeClip = pregWin; } else { - pGC->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, NullBox, 0); + REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pregWin, pGC->clientClip); } pGC->freeCompClip = TRUE; - REGION_TRANSLATE(pScreen, pGC->clientClip, + REGION_TRANSLATE(pGC->pScreen, pGC->clientClip, -(pDrawable->x + pGC->clipOrg.x), -(pDrawable->y + pGC->clipOrg.y)); } @@ -692,18 +689,18 @@ pixbounds.y2 = pDrawable->height; if (pGC->freeCompClip) { - REGION_RESET(pScreen, pGC->pCompositeClip, &pixbounds); + REGION_RESET(pGC->pScreen, pGC->pCompositeClip, &pixbounds); } else { pGC->freeCompClip = TRUE; - pGC->pCompositeClip = REGION_CREATE(pScreen, &pixbounds, 1); + pGC->pCompositeClip = REGION_CREATE(pGC->pScreen, &pixbounds, 1); } if (pGC->clientClipType == CT_REGION) { - REGION_TRANSLATE(pScreen, pGC->pCompositeClip, -pGC->clipOrg.x, + REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, -pGC->clipOrg.x, -pGC->clipOrg.y); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, pGC->pCompositeClip, pGC->clientClip); - REGION_TRANSLATE(pScreen, pGC->pCompositeClip, pGC->clipOrg.x, + REGION_TRANSLATE(pGC->pScreen, pGC->pCompositeClip, pGC->clipOrg.x, pGC->clipOrg.y); } } /* end of composite clip for pixmap */ Index: xc/programs/Xserver/afb/afbgetsp.c diff -u xc/programs/Xserver/afb/afbgetsp.c:3.0 xc/programs/Xserver/afb/afbgetsp.c:3.1 --- xc/programs/Xserver/afb/afbgetsp.c:3.0 Sat Aug 17 21:45:37 1996 +++ xc/programs/Xserver/afb/afbgetsp.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbgetsp.c,v 3.0 1996/08/18 01:45:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbgetsp.c,v 3.1 2001/10/28 03:32:58 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -72,31 +72,31 @@ /*ARGSUSED*/ void afbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart) - DrawablePtr pDrawable; /* drawable from which to get bits */ - int wMax; /* largest value of all *pwidths */ - register DDXPointPtr ppt; /* points to start copying from */ - int *pwidth; /* list of number of bits to copy */ - int nspans; /* number of scanlines to copy */ - char *pchardstStart; /* where to put the bits */ + DrawablePtr pDrawable; /* drawable from which to get bits */ + int wMax; /* largest value of all *pwidths */ + register DDXPointPtr ppt; /* points to start copying from */ + int *pwidth; /* list of number of bits to copy */ + int nspans; /* number of scanlines to copy */ + char *pchardstStart; /* where to put the bits */ { - PixelType *pdstStart = (PixelType *)pchardstStart; - register PixelType *pdst; /* where to put the bits */ - register PixelType *psrc; /* where to get the bits */ - register PixelType tmpSrc; /* scratch buffer for bits */ - PixelType *psrcBase; /* start of src bitmap */ - int widthSrc; /* width of pixmap in bytes */ - int sizeSrc; - int depthSrc; - register DDXPointPtr pptLast; /* one past last point to get */ - int xEnd; /* last pixel to copy from */ + PixelType *pdstStart = (PixelType *)pchardstStart; + register PixelType *pdst; /* where to put the bits */ + register PixelType *psrc; /* where to get the bits */ + register PixelType tmpSrc; /* scratch buffer for bits */ + PixelType *psrcBase; /* start of src bitmap */ + int widthSrc; /* width of pixmap in bytes */ + int sizeSrc; + int depthSrc; + register DDXPointPtr pptLast; /* one past last point to get */ + int xEnd; /* last pixel to copy from */ register int nstart; register int d; - int nend; - int srcStartOver; - PixelType startmask, endmask; + int nend = 0; + int srcStartOver; + PixelType startmask, endmask; unsigned int srcBit; - int nlMiddle, nl; - int w; + int nlMiddle, nl; + int w; pptLast = ppt + nspans; Index: xc/programs/Xserver/afb/afbhrzvert.c diff -u xc/programs/Xserver/afb/afbhrzvert.c:3.0 xc/programs/Xserver/afb/afbhrzvert.c:3.1 --- xc/programs/Xserver/afb/afbhrzvert.c:3.0 Sat Aug 17 21:45:38 1996 +++ xc/programs/Xserver/afb/afbhrzvert.c Tue Jul 31 20:44:47 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbhrzvert.c,v 3.0 1996/08/18 01:45:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbhrzvert.c,v 3.1 2001/08/01 00:44:47 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -62,6 +62,7 @@ /* horizontal solid line abs(len) > 1 */ +void afbHorzS(pbase, nlwidth, sizeDst, depthDst, x1, y1, len, rrops) PixelType *pbase; /* pointer to base of bitmap */ register int nlwidth; /* width in longwords of bitmap */ @@ -156,7 +157,7 @@ better code. sigh. we know that len will never be 0 or 1, so it's OK to use it. */ - +void afbVertS(pbase, nlwidth, sizeDst, depthDst, x1, y1, len, rrops) PixelType *pbase; /* pointer to base of bitmap */ register int nlwidth; /* width in longwords of bitmap */ Index: xc/programs/Xserver/afb/afbimage.c diff -u xc/programs/Xserver/afb/afbimage.c:3.2 xc/programs/Xserver/afb/afbimage.c:3.3 --- xc/programs/Xserver/afb/afbimage.c:3.2 Fri Mar 20 16:04:55 1998 +++ xc/programs/Xserver/afb/afbimage.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbimage.c,v 3.2 1998/03/20 21:04:55 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbimage.c,v 3.3 2001/10/28 03:32:58 tsi Exp $ */ #include "X.h" #include "windowstr.h" @@ -215,7 +215,7 @@ register int shift_step; register int start_endbit; int start_startbit; - register int end_endbit; + register int end_endbit = 0; register int start_dstshift; register int nl; register int h; Index: xc/programs/Xserver/afb/afbline.c diff -u xc/programs/Xserver/afb/afbline.c:3.1 xc/programs/Xserver/afb/afbline.c:3.2 --- xc/programs/Xserver/afb/afbline.c:3.1 Fri Mar 20 16:04:55 1998 +++ xc/programs/Xserver/afb/afbline.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbline.c,v 3.1 1998/03/20 21:04:55 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbline.c,v 3.2 2001/10/28 03:32:58 tsi Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -118,7 +118,6 @@ unsigned int oc2; /* outcode of point 2 */ PixelType *addrlBase; /* pointer to start of drawable */ - PixelType *addrl; /* address of destination pixmap */ int nlwidth; /* width in longwords of destination pixmap */ int xorg, yorg; /* origin of window */ @@ -132,7 +131,10 @@ int octant; unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); int depthDst; +#ifndef POLYSEGMENT + PixelType *addrl; /* address of destination pixmap */ int d; +#endif int sizeDst; unsigned char *rrops; @@ -451,7 +453,6 @@ register unsigned int oc2; /* outcode of point 2 */ PixelType *addrlBase; /* address of destination pixmap */ - PixelType *addrl; int nlwidth; /* width in longwords of destination pixmap */ int sizeDst; int depthDst; @@ -477,7 +478,10 @@ int isDoubleDash; int dashIndexTmp, dashOffsetTmp; int unclippedlen; +#ifndef POLYSEGMENT + PixelType *addrl; int d; +#endif cclip = pGC->pCompositeClip; rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; Index: xc/programs/Xserver/afb/afbply1rct.c diff -u xc/programs/Xserver/afb/afbply1rct.c:3.1 xc/programs/Xserver/afb/afbply1rct.c:3.2 --- xc/programs/Xserver/afb/afbply1rct.c:3.1 Fri Mar 20 16:04:56 1998 +++ xc/programs/Xserver/afb/afbply1rct.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbply1rct.c,v 3.1 1998/03/20 21:04:56 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbply1rct.c,v 3.2 2001/10/28 03:32:58 tsi Exp $ */ /* * $XConsortium: afbply1rct.c,v 1.9 94/04/17 20:28:28 dpw Exp $ * @@ -77,14 +77,14 @@ BoxPtr extents; int clip; int y; - int *vertex1p, *vertex2p; + int *vertex1p = NULL, *vertex2p; int *endp; - int x1, x2; - int dx1, dx2; - int dy1, dy2; - int e1, e2; - int step1, step2; - int sign1, sign2; + int x1 = 0, x2 = 0; + int dx1 = 0, dx2 = 0; + int dy1 = 0, dy2 = 0; + int e1 = 0, e2 = 0; + int step1 = 0, step2 = 0; + int sign1 = 0, sign2 = 0; int h; int l, r; PixelType mask, bits = ~((PixelType)0); @@ -144,7 +144,7 @@ vertex2p = (int *) ptsIn; #define Setup(c,x,vertex,dx,dy,e,sign,step) {\ x = intToX(vertex); \ - if (dy = intToY(c) - y) { \ + if ((dy = intToY(c) - y)) { \ dx = intToX(c) - x; \ step = 0; \ if (dx >= 0) { \ Index: xc/programs/Xserver/afb/afbplygblt.c diff -u xc/programs/Xserver/afb/afbplygblt.c:3.1 xc/programs/Xserver/afb/afbplygblt.c:3.2 --- xc/programs/Xserver/afb/afbplygblt.c:3.1 Fri Mar 20 16:04:56 1998 +++ xc/programs/Xserver/afb/afbplygblt.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbplygblt.c,v 3.1 1998/03/20 21:04:56 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbplygblt.c,v 3.2 2001/10/28 03:32:58 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -94,10 +94,6 @@ { ExtentInfoRec info; /* used by QueryGlyphExtents() */ BoxRec bbox; /* string's bounding box */ - xRectangle backrect; /* backing rectangle to paint. - in the general case, NOT necessarily - the same as the string's bounding box - */ CharInfoPtr pci; int xorg, yorg; /* origin of drawable in bitmap */ Index: xc/programs/Xserver/afb/afbpntarea.c diff -u xc/programs/Xserver/afb/afbpntarea.c:3.0 xc/programs/Xserver/afb/afbpntarea.c:3.1 --- xc/programs/Xserver/afb/afbpntarea.c:3.0 Sat Aug 17 21:45:49 1996 +++ xc/programs/Xserver/afb/afbpntarea.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbpntarea.c,v 3.0 1996/08/18 01:45:49 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbpntarea.c,v 3.1 2001/10/28 03:32:58 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -533,7 +533,6 @@ register PixelType *pdst; /* pointer to bits we're writing */ int sizeDst; int depthDst; - int sizeTile; int tileLine; int iline; int w, width, x, xSrc, ySrc, srcStartOver, nend; Index: xc/programs/Xserver/afb/afbsetsp.c diff -u xc/programs/Xserver/afb/afbsetsp.c:3.1 xc/programs/Xserver/afb/afbsetsp.c:3.3 --- xc/programs/Xserver/afb/afbsetsp.c:3.1 Fri Mar 20 16:04:57 1998 +++ xc/programs/Xserver/afb/afbsetsp.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbsetsp.c,v 3.1 1998/03/20 21:04:57 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbsetsp.c,v 3.3 2001/10/28 03:32:58 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -71,6 +71,7 @@ * boxes, we may not want to start grabbing bits at psrc but at some offset * further on.) */ +void afbSetScanline(y, xOrigin, xStart, xEnd, psrc, alu, pdstBase, widthDst, sizeDst, depthDst, sizeSrc) int y; @@ -163,7 +164,7 @@ int widthDst; /* width of bitmap in words */ int sizeDst; int depthDst; - int sizeSrc; + int sizeSrc = 0; register BoxPtr pbox, pboxLast, pboxTest; register DDXPointPtr pptLast; int alu; Index: xc/programs/Xserver/afb/afbtegblt.c diff -u xc/programs/Xserver/afb/afbtegblt.c:3.1 xc/programs/Xserver/afb/afbtegblt.c:3.2 --- xc/programs/Xserver/afb/afbtegblt.c:3.1 Fri Mar 20 16:04:57 1998 +++ xc/programs/Xserver/afb/afbtegblt.c Sat Oct 27 23:32:58 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbtegblt.c,v 3.1 1998/03/20 21:04:57 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbtegblt.c,v 3.2 2001/10/28 03:32:58 tsi Exp $ */ /* $XConsortium: afbtegblt.c,v 5.14 94/04/17 20:28:35 dpw Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -371,7 +371,7 @@ # endif FASTPUTBITS(~c, xoff1, widthGlyphs, dst); #else - *(dst) = (*dst) & ~startmask | ~SCRRIGHT(c, xoff1) & startmask; + *(dst) = ((*dst) & ~startmask) | (~SCRRIGHT(c, xoff1) & startmask); #endif afbScanlineInc(dst, widthDst); } @@ -390,7 +390,7 @@ #endif FASTPUTBITS(c, xoff1, widthGlyphs, dst); #else - *(dst) = (*dst) & ~startmask | SCRRIGHT(c, xoff1) & startmask; + *(dst) = ((*dst) & ~startmask) | (SCRRIGHT(c, xoff1) & startmask); #endif afbScanlineInc(dst, widthDst); } @@ -431,10 +431,8 @@ while (hTmp--) { GetBits4 - dst[0] = dst[0] & ~startmask | - ~SCRRIGHT(c,xoff1) & startmask; - dst[1] = dst[1] & ~endmask | - ~SCRLEFT(c,nfirst) & endmask; + dst[0] = (dst[0] & ~startmask) | (~SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (~SCRLEFT(c,nfirst) & endmask); afbScanlineInc(dst, widthDst); } break; @@ -446,10 +444,8 @@ while (hTmp--) { GetBits4 - dst[0] = dst[0] & ~startmask | - SCRRIGHT(c,xoff1) & startmask; - dst[1] = dst[1] & ~endmask | - SCRLEFT(c,nfirst) & endmask; + dst[0] = (dst[0] & ~startmask) | (SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (SCRLEFT(c,nfirst) & endmask); afbScanlineInc(dst, widthDst); } break; @@ -507,7 +503,7 @@ FASTPUTBITS (~c,xoff1,widthGlyph,dst); #else GetBits1 - (*dst) = (*dst) & ~startmask | ~SCRRIGHT(c, xoff1) & startmask; + (*dst) = ((*dst) & ~startmask) | (~SCRRIGHT(c, xoff1) & startmask); #endif afbScanlineInc(dst, widthDst); } @@ -527,7 +523,7 @@ FASTPUTBITS (c,xoff1,widthGlyph,dst); #else GetBits1 - (*dst) = (*dst) & ~startmask | SCRRIGHT(c, xoff1) & startmask; + (*dst) = ((*dst) & ~startmask) | (SCRRIGHT(c, xoff1) & startmask); #endif afbScanlineInc(dst, widthDst); } @@ -564,20 +560,16 @@ case RROP_INVERT: while (hTmp--) { GetBits1 - dst[0] = dst[0] & ~startmask | - ~SCRRIGHT(c,xoff1) & startmask; - dst[1] = dst[1] & ~endmask | - ~SCRLEFT(c,nfirst) & endmask; + dst[0] = (dst[0] & ~startmask) | (~SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (~SCRLEFT(c,nfirst) & endmask); afbScanlineInc(dst, widthDst); } break; case RROP_COPY: while (hTmp--) { GetBits1 - dst[0] = dst[0] & ~startmask | - SCRRIGHT(c,xoff1) & startmask; - dst[1] = dst[1] & ~endmask | - SCRLEFT(c,nfirst) & endmask; + dst[0] = (dst[0] & ~startmask) | (SCRRIGHT(c,xoff1) & startmask); + dst[1] = (dst[1] & ~endmask) | (SCRLEFT(c,nfirst) & endmask); afbScanlineInc(dst, widthDst); } break; Index: xc/programs/Xserver/afb/afbtile.c diff -u xc/programs/Xserver/afb/afbtile.c:3.2 xc/programs/Xserver/afb/afbtile.c:3.3 --- xc/programs/Xserver/afb/afbtile.c:3.2 Tue Nov 21 19:58:12 2000 +++ xc/programs/Xserver/afb/afbtile.c Sat Oct 27 23:32:59 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbtile.c,v 3.2 2000/11/22 00:58:12 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbtile.c,v 3.3 2001/10/28 03:32:59 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -241,7 +241,10 @@ MROP_DECLARE_REG () register int h; /* height of current box */ register PixelType *pdst; /* pointer to bits we're writing */ - register PixelType tmpsrc, tmpdst; + register PixelType tmpsrc; +#if (MROP) != Mcopy + register PixelType tmpdst; +#endif int sizeDst; int depthDst; int sizeTile; @@ -408,7 +411,7 @@ register PixelType *psrc; /* pointer to bits in tile, if needed */ int tileHeight; /* height of the tile */ - register PixelType srcpix; + register PixelType srcpix = 0; int nlwidth; /* width in longwords of the drawable */ int w; /* width of current box */ MROP_DECLARE_REG () @@ -627,7 +630,10 @@ MROP_DECLARE_REG () register int h; /* height of current box */ register PixelType *pdst; /* pointer to bits we're writing */ - register PixelType tmpsrc, tmpdst; + register PixelType tmpsrc = 0; +#if (MROP) != Mcopy + register PixelType tmpdst; +#endif int sizeDst; int depthDst; int tileLine; Index: xc/programs/Xserver/afb/afbzerarc.c diff -u xc/programs/Xserver/afb/afbzerarc.c:3.1 xc/programs/Xserver/afb/afbzerarc.c:3.2 --- xc/programs/Xserver/afb/afbzerarc.c:3.1 Fri Mar 20 16:04:58 1998 +++ xc/programs/Xserver/afb/afbzerarc.c Sat Oct 27 23:32:59 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbzerarc.c,v 3.1 1998/03/20 21:04:58 hohndel Exp $ */ +/* $XFree86: xc/programs/Xserver/afb/afbzerarc.c,v 3.2 2001/10/28 03:32:59 tsi Exp $ */ /************************************************************ Copyright (c) 1989 X Consortium @@ -91,7 +91,6 @@ register int k1, k3, dx, dy; PixelType *addrl; PixelType *yorgl, *yorgol; - PixelType pixel; int nlwidth, yoffset, dyoffset; int sizeDst, depthDst; PixelType pmask; Index: xc/programs/Xserver/cfb/cfb8bit.c diff -u xc/programs/Xserver/cfb/cfb8bit.c:1.4 xc/programs/Xserver/cfb/cfb8bit.c:1.5 --- xc/programs/Xserver/cfb/cfb8bit.c:1.4 Wed Jan 17 17:36:34 2001 +++ xc/programs/Xserver/cfb/cfb8bit.c Fri Dec 14 14:59:20 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfb8bit.c,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ +/* $Xorg: cfb8bit.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ /* Copyright 1989, 1994, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.c,v 1.4 2001/01/17 22:36:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.c,v 1.5 2001/12/14 19:59:20 dawes Exp $ */ /* * cfb8bit.c Index: xc/programs/Xserver/cfb/cfb8bit.h diff -u xc/programs/Xserver/cfb/cfb8bit.h:3.5 xc/programs/Xserver/cfb/cfb8bit.h:3.7 --- xc/programs/Xserver/cfb/cfb8bit.h:3.5 Wed Jan 17 17:36:34 2001 +++ xc/programs/Xserver/cfb/cfb8bit.h Fri Dec 14 14:59:20 2001 @@ -7,13 +7,17 @@ * are used for depths other than 8. Perhaps the file should be * renamed. dpw */ -/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.h,v 3.5 2001/01/17 22:36:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.h,v 3.7 2001/12/14 19:59:20 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -30,7 +34,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $Xorg: cfb8bit.h,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ +/* $Xorg: cfb8bit.h,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "servermd.h" @@ -165,13 +169,11 @@ #define RRopBitGroup(dst,bits) \ { \ - register PixelGroup _bitsTmp = (bits); \ *(dst) = RRopPixels(*(dst),bits); \ } #define MaskRRopBitGroup(dst,bits,mask) \ { \ - register PixelGroup _bitsTmp = (bits); \ *(dst) = MaskRRopPixels(*(dst),bits,mask); \ } #endif /* PSZ == 8 */ Index: xc/programs/Xserver/cfb/cfb8line.c diff -u xc/programs/Xserver/cfb/cfb8line.c:3.15 xc/programs/Xserver/cfb/cfb8line.c:3.17 --- xc/programs/Xserver/cfb/cfb8line.c:3.15 Tue Jan 30 17:06:15 2001 +++ xc/programs/Xserver/cfb/cfb8line.c Fri Dec 14 14:59:20 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfb8line.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ + * $Xorg: cfb8line.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium * - * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.15 2001/01/30 22:06:15 tsi Exp $ + * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.17 2001/12/14 19:59:20 dawes Exp $ * Jeff Anton'x fixes: cfb8line.c 97/02/07 */ @@ -271,7 +275,7 @@ int npt; /* number of points */ DDXPointPtr pptInit, pptInitOrig; int *x1p, *y1p, *x2p, *y2p; -#endif /* POLYSEGEMENT */ +#endif /* POLYSEGMENT */ { register long e; register int y1_or_e1; @@ -293,8 +297,8 @@ #else register int c2; #endif -#ifndef ORIGIN - register int _x1, _y1, _x2, _y2; /* only used for CoordModePrevious */ +#if !defined(ORIGIN) && !defined(POLYSEGMENT) + register int _x1 = 0, _y1 = 0, _x2 = 0, _y2 = 0; int extents_x1, extents_y1, extents_x2, extents_y2; #endif /* !ORIGIN */ #ifndef PREVIOUS @@ -329,7 +333,6 @@ #if PSZ == 24 int xBase; /* x of addr */ int xOffset; /* x of addrp */ - int xOffset_t; /* x of t */ PixelType *addrLineEnd; char *addrb; int stepmajor3, stepminor3, majordx, minordx; @@ -932,9 +935,7 @@ #endif /* !ORIGIN */ return ((DDXPointPtr) ppt - pptInit) - 1; } -#endif /* POLYSEGMENT */ -#ifndef POLYSEGMENT # ifndef ORIGIN # define C2 c2 # else Index: xc/programs/Xserver/cfb/cfballpriv.c diff -u xc/programs/Xserver/cfb/cfballpriv.c:1.11 xc/programs/Xserver/cfb/cfballpriv.c:1.12 --- xc/programs/Xserver/cfb/cfballpriv.c:1.11 Tue Jan 30 17:06:15 2001 +++ xc/programs/Xserver/cfb/cfballpriv.c Fri Dec 14 14:59:21 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfballpriv.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ + * $Xorg: cfballpriv.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ * Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfballpriv.c,v 1.11 2001/01/30 22:06:15 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfballpriv.c,v 1.12 2001/12/14 19:59:21 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbbitblt.c diff -u xc/programs/Xserver/cfb/cfbbitblt.c:1.12 xc/programs/Xserver/cfb/cfbbitblt.c:1.14 --- xc/programs/Xserver/cfb/cfbbitblt.c:1.12 Wed Jan 17 17:36:34 2001 +++ xc/programs/Xserver/cfb/cfbbitblt.c Fri Dec 14 14:59:21 2001 @@ -2,13 +2,17 @@ * cfb copy area */ -/* $XFree86: xc/programs/Xserver/cfb/cfbbitblt.c,v 1.12 2001/01/17 22:36:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbbitblt.c,v 1.14 2001/12/14 19:59:21 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -27,7 +31,7 @@ Author: Keith Packard */ -/* $Xorg: cfbbitblt.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ +/* $Xorg: cfbbitblt.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" @@ -76,7 +80,7 @@ void (*doBitBlt)(); unsigned long bitPlane; { - RegionPtr prgnSrcClip; /* may be a new region, or just a copy */ + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ Bool freeSrcClip = FALSE; RegionPtr prgnExposed; @@ -413,8 +417,8 @@ CfbBits endmask; /* right edge pixel mask */ register int nlMiddle; /* number of words in middle of the row to draw */ register int nl; - int firstoff; - int secondoff; + int firstoff = 0; + int secondoff = 0; CfbBits src; int nbox; /* number of boxes in region to copy */ BoxPtr pbox; /* steps thru boxes in region */ @@ -757,7 +761,9 @@ register unsigned int bits, tmp; register unsigned int fgpixel, bgpixel; register unsigned int src; +#if PSZ == 24 register unsigned int dst; +#endif register int leftShift, rightShift; register int i, nl; int nbox; @@ -1069,10 +1075,10 @@ unsigned long bitPlane; { RegionPtr ret; - extern RegionPtr miHandleExposures(); - void (*doBitBlt)(); #if IMAGE_BYTE_ORDER == LSBFirst + + void (*doBitBlt)(); if (pSrcDrawable->bitsPerPixel == 1 && pDstDrawable->bitsPerPixel == PSZ) { Index: xc/programs/Xserver/cfb/cfbblt.c diff -u xc/programs/Xserver/cfb/cfbblt.c:3.10 xc/programs/Xserver/cfb/cfbblt.c:3.12 --- xc/programs/Xserver/cfb/cfbblt.c:3.10 Wed Jan 17 17:36:34 2001 +++ xc/programs/Xserver/cfb/cfbblt.c Fri Dec 14 14:59:21 2001 @@ -1,13 +1,17 @@ /* * cfb copy area */ -/* $XFree86: xc/programs/Xserver/cfb/cfbblt.c,v 3.10 2001/01/17 22:36:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbblt.c,v 3.12 2001/12/14 19:59:21 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26,7 +30,7 @@ Author: Keith Packard */ -/* $Xorg: cfbblt.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ +/* $Xorg: cfbblt.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ /* 24-bit bug fixes: Peter Wainwright, 1998/11/28 */ @@ -147,19 +151,16 @@ /* following used for looping through a line */ CfbBits startmask, endmask; /* masks for writing ends of dst */ int nlMiddle; /* whole longwords in dst */ - int xoffSrc, xoffDst, xoffEnd; + int xoffSrc, xoffDst; + register int nl; /* temp copy of nlMiddle */ + int careful; + +#if (PSZ != 24) || (MROP != 0) register int leftShift, rightShift; register CfbBits bits; register CfbBits bits1; - register int nl; /* temp copy of nlMiddle */ +#endif - /* place to store full source word */ - int nstart; /* number of ragged bits at start of dst */ - int nend; /* number of ragged bits at end of dst */ - int srcStartOver; /* pulling nstart bits from src - overflows into the next word? */ - int careful; - int tmpSrc; #if PSZ == 24 #ifdef DO_MEMCPY int w2; Index: xc/programs/Xserver/cfb/cfbbres.c diff -u xc/programs/Xserver/cfb/cfbbres.c:3.4 xc/programs/Xserver/cfb/cfbbres.c:3.5 --- xc/programs/Xserver/cfb/cfbbres.c:3.4 Wed Jan 17 17:36:34 2001 +++ xc/programs/Xserver/cfb/cfbbres.c Fri Dec 14 14:59:21 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbres.c,v 3.4 2001/01/17 22:36:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbbres.c,v 3.5 2001/12/14 19:59:21 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cfbbres.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ +/* $Xorg: cfbbres.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "X.h" #include "misc.h" #include "cfb.h" Index: xc/programs/Xserver/cfb/cfbbresd.c diff -u xc/programs/Xserver/cfb/cfbbresd.c:3.5 xc/programs/Xserver/cfb/cfbbresd.c:3.6 --- xc/programs/Xserver/cfb/cfbbresd.c:3.5 Wed Jan 17 17:36:34 2001 +++ xc/programs/Xserver/cfb/cfbbresd.c Fri Dec 14 14:59:22 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbresd.c,v 3.5 2001/01/17 22:36:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbbresd.c,v 3.6 2001/12/14 19:59:22 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cfbbresd.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ +/* $Xorg: cfbbresd.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "X.h" #include "misc.h" #include "cfb.h" Index: xc/programs/Xserver/cfb/cfbcppl.c diff -u xc/programs/Xserver/cfb/cfbcppl.c:1.4 xc/programs/Xserver/cfb/cfbcppl.c:1.6 --- xc/programs/Xserver/cfb/cfbcppl.c:1.4 Fri Feb 11 22:39:23 2000 +++ xc/programs/Xserver/cfb/cfbcppl.c Fri Dec 14 14:59:22 2001 @@ -3,7 +3,11 @@ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbcppl.c,v 1.4 2000/02/12 03:39:23 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbcppl.c,v 1.6 2001/12/14 19:59:22 dawes Exp $ */ #include "X.h" #include "Xmd.h" @@ -108,8 +112,8 @@ register CfbBits bits; register PixelType *pdst; PixelType startmask, endmask; - int niStart, niEnd; - int bitStart, bitEnd; + int niStart = 0, niEnd = 0; + int bitStart = 0, bitEnd = 0; int nl, nlMiddle; int nbox; BoxPtr pbox; @@ -176,7 +180,7 @@ i = niStart; curBit = bitStart; GetBits (psrc, i, curBit, bitPos, bits); - *pdst = *pdst & ~startmask | bits; + *pdst = (*pdst & ~startmask) | bits; pdst++; } nl = nlMiddle; @@ -192,7 +196,7 @@ i = niEnd; curBit = bitEnd; GetBits (psrc, i, curBit, bitPos, bits); - *pdst = *pdst & ~endmask | bits; + *pdst = (*pdst & ~endmask) | bits; } } } @@ -329,8 +333,8 @@ register int bitPos; register unsigned int bits; unsigned int startmask, endmask; - int niStart, niEnd; - int bitStart, bitEnd; + int niStart = 0, niEnd = 0; + int bitStart = 0, bitEnd = 0; int nl, nlMiddle; int nbox; BoxPtr pbox; Index: xc/programs/Xserver/cfb/cfbfillarc.c diff -u xc/programs/Xserver/cfb/cfbfillarc.c:3.4 xc/programs/Xserver/cfb/cfbfillarc.c:3.5 --- xc/programs/Xserver/cfb/cfbfillarc.c:3.4 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbfillarc.c Fri Dec 14 14:59:22 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillarc.c,v 3.4 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbfillarc.c,v 3.5 2001/12/14 19:59:22 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ ********************************************************/ -/* $Xorg: cfbfillarc.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbfillarc.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "X.h" #include "Xprotostr.h" Index: xc/programs/Xserver/cfb/cfbfillrct.c diff -u xc/programs/Xserver/cfb/cfbfillrct.c:3.7 xc/programs/Xserver/cfb/cfbfillrct.c:3.8 --- xc/programs/Xserver/cfb/cfbfillrct.c:3.7 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbfillrct.c Fri Dec 14 14:59:22 2001 @@ -1,13 +1,17 @@ /* * Fill rectangles. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillrct.c,v 3.7 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbfillrct.c,v 3.8 2001/12/14 19:59:22 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -24,7 +28,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $Xorg: cfbfillrct.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbfillrct.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbfillsp.c diff -u xc/programs/Xserver/cfb/cfbfillsp.c:3.5 xc/programs/Xserver/cfb/cfbfillsp.c:3.7 --- xc/programs/Xserver/cfb/cfbfillsp.c:3.5 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbfillsp.c Fri Dec 14 14:59:22 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillsp.c,v 3.5 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbfillsp.c,v 3.7 2001/12/14 19:59:22 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -32,7 +32,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -71,7 +75,7 @@ ******************************************************************/ -/* $Xorg: cfbfillsp.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbfillsp.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" @@ -416,7 +420,7 @@ CfbBits tmpSrc, tmpDst1, tmpDst2; int stwidth, stippleWidth; CfbBits *psrcS; - int rop, stiprop; + int rop, stiprop = 0; int stippleHeight; int *pwidthFree; /* copies of the pointers to free */ DDXPointPtr pptFree; @@ -837,7 +841,6 @@ CfbBits *pbits; /* pointer to start of pixmap */ register CfbBits xor; - register CfbBits mask; register CfbBits bits; /* bits from stipple */ int wEnd; @@ -898,8 +901,8 @@ { if (startmask) { - *dst = *dst & ~startmask | - GetPixelGroup (bits) & startmask; + *dst = (*dst & ~startmask) | + (GetPixelGroup (bits) & startmask); dst++; RotBitsLeft (bits, PGSZB); } @@ -910,8 +913,8 @@ } if (endmask) { - *dst = *dst & ~endmask | - GetPixelGroup (bits) & endmask; + *dst = (*dst & ~endmask) | + (GetPixelGroup (bits) & endmask); } } else @@ -922,8 +925,8 @@ nlwTmp = nlw; if (startmask) { - *dstTmp = *dstTmp & ~startmask | - GetPixelGroup (bits) & startmask; + *dstTmp = (*dstTmp & ~startmask) | + (GetPixelGroup (bits) & startmask); dstTmp++; RotBitsLeft (bits, PGSZB); } @@ -947,7 +950,7 @@ { dst = dstTmp + (nlwTmp << 3); *dst = (*dst & ~endmask) | - GetPixelGroup (bits) & endmask; + (GetPixelGroup (bits) & endmask); } while (w--) { Index: xc/programs/Xserver/cfb/cfbgc.c diff -u xc/programs/Xserver/cfb/cfbgc.c:1.5 xc/programs/Xserver/cfb/cfbgc.c:1.6 --- xc/programs/Xserver/cfb/cfbgc.c:1.5 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbgc.c Fri Dec 14 14:59:22 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbgc.c,v 1.5 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbgc.c,v 1.6 2001/12/14 19:59:22 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ ******************************************************************/ -/* $Xorg: cfbgc.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbgc.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/cfb/cfbgetsp.c diff -u xc/programs/Xserver/cfb/cfbgetsp.c:3.7 xc/programs/Xserver/cfb/cfbgetsp.c:3.9 --- xc/programs/Xserver/cfb/cfbgetsp.c:3.7 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbgetsp.c Fri Dec 14 14:59:22 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbgetsp.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbgetsp.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbgetsp.c,v 3.7 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbgetsp.c,v 3.9 2001/12/14 19:59:22 dawes Exp $ */ #include "X.h" #include "Xmd.h" @@ -79,15 +83,17 @@ int widthSrc; /* width of pixmap in bytes */ register DDXPointPtr pptLast; /* one past last point to get */ int xEnd; /* last pixel to copy from */ - register int nstart; - int nend; - PixelGroup startmask, endmask; - int nlMiddle, nl, srcBit; + int nl, srcBit; int w; PixelGroup *pdstNext; #if PSZ == 24 register char *psrcb, *pdstb; register int xIndex = 0; +#else + register int nstart; + int nend; + PixelGroup startmask, endmask; + int nlMiddle; #endif switch (pDrawable->bitsPerPixel) { Index: xc/programs/Xserver/cfb/cfbglblt8.c diff -u xc/programs/Xserver/cfb/cfbglblt8.c:3.4 xc/programs/Xserver/cfb/cfbglblt8.c:3.6 --- xc/programs/Xserver/cfb/cfbglblt8.c:3.4 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbglblt8.c Fri Dec 14 14:59:23 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbglblt8.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbglblt8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbglblt8.c,v 3.4 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbglblt8.c,v 3.6 2001/12/14 19:59:23 dawes Exp $ */ /* * Poly glyph blt. Accepts an arbitrary font <= 32 bits wide, in Copy mode @@ -118,11 +122,13 @@ CharInfoPtr *ppci; /* array of character info */ pointer pglyphBase; /* start of array of glyphs */ { - register CfbBits c; #ifndef GLYPHROP register CfbBits pixel; #endif +#if !defined(STIPPLE) && !defined(USE_STIPPLE_CODE) + register CfbBits c; register CfbBits *dst; +#endif register glyphPointer glyphBits; register int xoff; @@ -134,9 +140,7 @@ int bwidthDst; int widthDst; int h; - int ew; BoxRec bbox; /* for clipping */ - int widthDiff; int w; RegionPtr clip; BoxPtr extents; @@ -224,7 +228,7 @@ (y - pci->metrics.ascent) * widthDst + (xoff >> PWSH); #endif x += pci->metrics.characterWidth; - if (hTmp = pci->metrics.descent + pci->metrics.ascent) + if ((hTmp = pci->metrics.descent + pci->metrics.ascent)) { #if PSZ == 24 xoff &= 0x03; @@ -271,39 +275,43 @@ CharInfoPtr *ppci; /* array of character info */ unsigned char *pglyphBase; /* start of array of glyphs */ { - register CfbBits c; #ifndef GLYPHROP - register CfbBits pixel; + register CfbBits pixel; #endif - register CfbBits *dst; +#if !defined(STIPPLE) && !defined(USE_STIPPLE_CODE) + register CfbBits c; +#endif register glyphPointer glyphBits; - register int xoff; - CfbBits c1; + register int xoff; +#if defined(USE_LEFT_BITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE)) + register CfbBits *dst; +#endif CharInfoPtr pci; FontPtr pfont = pGC->font; - CfbBits *dstLine; - CfbBits *pdstBase; - CARD32 *cTmp, *clips; + CfbBits *dstLine; + CfbBits *pdstBase; +#ifdef USE_LEFT_BITS + CARD32 *cTmp; +#endif + CARD32 *clips; int maxAscent, maxDescent; int minLeftBearing; int hTmp; int widthDst; int bwidthDst; - int ew; int xG, yG; BoxPtr pBox; int numRects; - int widthDiff; int w; RegionPtr pRegion; int yBand; #ifdef GLYPHROP - CfbBits bits; + CfbBits bits; #endif #ifdef USE_LEFTBITS int widthGlyph; - CfbBits widthMask; + CfbBits widthMask; #endif #ifdef GLYPHROP @@ -348,7 +356,7 @@ xG = x + pci->metrics.leftSideBearing; yG = y - pci->metrics.ascent; x += pci->metrics.characterWidth; - if (hTmp = pci->metrics.descent + pci->metrics.ascent) + if ((hTmp = pci->metrics.descent + pci->metrics.ascent)) { #if PSZ == 24 dstLine = pdstBase + yG * widthDst + ((xG>> 2)*3); @@ -429,7 +437,7 @@ c = BitLeft(c,PGSZB - xoff); dst += DST_INC; #else /* GLYPHROP */ - if (bits = GetBitGroup(BitRight(c,xoff))) + if ((bits = GetBitGroup(BitRight(c,xoff)))) WriteBitGroup(dst, pixel, bits); c = BitLeft(c,PGSZB - xoff); dst += DST_INC; Index: xc/programs/Xserver/cfb/cfbhrzvert.c diff -u xc/programs/Xserver/cfb/cfbhrzvert.c:3.5 xc/programs/Xserver/cfb/cfbhrzvert.c:3.7 --- xc/programs/Xserver/cfb/cfbhrzvert.c:3.5 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbhrzvert.c Fri Dec 14 14:59:23 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbhrzvert.c,v 3.5 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbhrzvert.c,v 3.7 2001/12/14 19:59:23 dawes Exp $ */ /*********************************************************** Copyright 1987,1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cfbhrzvert.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbhrzvert.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #include "X.h" #include "gc.h" @@ -67,10 +71,10 @@ int len; /* length of line */ { register int nlmiddle; - register CfbBits startmask; - register CfbBits endmask; + #if PSZ == 24 - int leftIndex, rightIndex, xOffset; + + int leftIndex, rightIndex; CfbBits piQxelAnd[3], piQxelXor[3]; piQxelAnd[0] = (and & 0xFFFFFF) | ((and<<24) & 0xFF000000); piQxelAnd[1] = ((and>>8) & 0xFFFF)| ((and<<16) & 0xFFFF0000); @@ -275,6 +279,9 @@ } } #else + register CfbBits startmask; + register CfbBits endmask; + addrl = addrl + (y1 * nlwidth) + (x1 >> PWSH); /* all bits inside same longword */ @@ -338,7 +345,7 @@ { #if PSZ == 24 int xIdx; - CfbBits and2, xor2, offset, mask, mask2; + CfbBits and2 = 0, xor2 = 0, mask = 0, mask2; #endif #ifdef PIXEL_ADDR register PixelType *bits = (PixelType *) addrl; Index: xc/programs/Xserver/cfb/cfbigblt8.c diff -u xc/programs/Xserver/cfb/cfbigblt8.c:1.4 xc/programs/Xserver/cfb/cfbigblt8.c:1.6 --- xc/programs/Xserver/cfb/cfbigblt8.c:1.4 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbigblt8.c Fri Dec 14 14:59:23 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfbigblt8.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ + * $Xorg: cfbigblt8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbigblt8.c,v 1.4 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbigblt8.c,v 1.6 2001/12/14 19:59:23 dawes Exp $ */ #include "X.h" #include "Xmd.h" @@ -50,14 +54,8 @@ { ExtentInfoRec info; /* used by QueryGlyphExtents() */ xRectangle backrect; - int fillStyle; - int alu; int fgPixel; - int rop; - int xor; - int and; - int pm; - cfbPrivGC *priv; + cfbPrivGC *priv; /* * We can't avoid GC validations if calling mi functions. Index: xc/programs/Xserver/cfb/cfbimage.c diff -u xc/programs/Xserver/cfb/cfbimage.c:1.11 xc/programs/Xserver/cfb/cfbimage.c:1.13 --- xc/programs/Xserver/cfb/cfbimage.c:1.11 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbimage.c Fri Dec 14 14:59:23 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbimage.c,v 1.11 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbimage.c,v 1.13 2001/12/14 19:59:23 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cfbimage.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbimage.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #include "X.h" #include "windowstr.h" @@ -62,7 +66,6 @@ int format; char *pImage; { - int bitsPerPixel; PixmapPtr pPixmap; if ((w == 0) || (h == 0)) Index: xc/programs/Xserver/cfb/cfbline.c diff -u xc/programs/Xserver/cfb/cfbline.c:3.4 xc/programs/Xserver/cfb/cfbline.c:3.6 --- xc/programs/Xserver/cfb/cfbline.c:3.4 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbline.c Fri Dec 14 14:59:23 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbline.c,v 3.4 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbline.c,v 3.6 2001/12/14 19:59:23 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cfbline.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbline.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #include "X.h" #include "gcstruct.h" @@ -634,7 +638,6 @@ int clip1 = 0, clip2 = 0; int clipdx, clipdy; int err; - int dashIndexTmp, dashOffsetTmp; if (miZeroClipLine(pbox->x1, pbox->y1, pbox->x2-1, pbox->y2-1, Index: xc/programs/Xserver/cfb/cfbmap.h diff -u xc/programs/Xserver/cfb/cfbmap.h:3.9 xc/programs/Xserver/cfb/cfbmap.h:3.11 --- xc/programs/Xserver/cfb/cfbmap.h:3.9 Wed Jan 17 17:36:35 2001 +++ xc/programs/Xserver/cfb/cfbmap.h Fri Dec 14 14:59:23 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfbmap.h,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ + * $Xorg: cfbmap.h,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbmap.h,v 3.9 2001/01/17 22:36:35 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbmap.h,v 3.11 2001/12/14 19:59:23 dawes Exp $ */ /* * Map names around so that multiple depths can be supported simultaneously @@ -154,7 +158,7 @@ #if PSZ != 8 #if PSZ == 32 -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define CFBNAME(subname) cfb32##subname #else #define CFBNAME(subname) cfb32/**/subname @@ -162,7 +166,7 @@ #endif #if PSZ == 24 -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define CFBNAME(subname) cfb24##subname #else #define CFBNAME(subname) cfb24/**/subname @@ -170,7 +174,7 @@ #endif #if PSZ == 16 -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define CFBNAME(subname) cfb16##subname #else #define CFBNAME(subname) cfb16/**/subname @@ -178,7 +182,7 @@ #endif #if PSZ == 4 -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define CFBNAME(subname) cfb4##subname #else #define CFBNAME(subname) cfb4/**/subname @@ -191,7 +195,7 @@ #undef CATNAME -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define CATNAME(prefix,subname) prefix##subname #else #define CATNAME(prefix,subname) prefix/**/subname Index: xc/programs/Xserver/cfb/cfbmskbits.h diff -u xc/programs/Xserver/cfb/cfbmskbits.h:3.12 xc/programs/Xserver/cfb/cfbmskbits.h:3.13 --- xc/programs/Xserver/cfb/cfbmskbits.h:3.12 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbmskbits.h Sat Oct 27 23:33:01 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.h,v 3.12 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.h,v 3.13 2001/10/28 03:33:01 tsi Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -817,9 +817,7 @@ */ #define getstipplepixels24(psrcstip,xt,ones,psrcpix,destpix,stipindex) \ { \ - PixelGroup q, srcpix, srcstip; \ - CfbBits src; \ - register unsigned int stipidx; \ + PixelGroup q; \ q = *(psrcstip) >> (xt); \ q = ((ones) ? q : ~q) & 1; \ *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ @@ -840,13 +838,12 @@ } #if PSZ == 24 # if 0 -#define getstipplepixels24( psrcstip,xt,w,ones,psrcpix,destpix,stipindex,srcindex,dstindex) \ +#define getstipplepixels24(psrcstip,xt,w,ones,psrcpix,destpix,stipindex,srcindex,dstindex) \ { \ - PixelGroup q, srcpix, srcstip; \ + PixelGroup q; \ CfbBits src; \ register unsigned int sidx; \ register unsigned int didx; \ - register unsigned int stipidx; \ sidx = ((srcindex) & 3)<<1; \ didx = ((dstindex) & 3)<<1; \ q = *(psrcstip) >> (xt); \ @@ -878,9 +875,7 @@ # else #define getstipplepixels24(psrcstip,xt,ones,psrcpix,destpix,stipindex) \ { \ - PixelGroup q, srcpix, srcstip; \ - CfbBits src; \ - register unsigned int stipidx; \ + PixelGroup q; \ q = *(psrcstip) >> (xt); \ q = ((ones) ? q : ~q) & 1; \ *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ Index: xc/programs/Xserver/cfb/cfbpixmap.c diff -u xc/programs/Xserver/cfb/cfbpixmap.c:1.4 xc/programs/Xserver/cfb/cfbpixmap.c:1.5 --- xc/programs/Xserver/cfb/cfbpixmap.c:1.4 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbpixmap.c Fri Dec 14 14:59:23 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbpixmap.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbpixmap.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbpixmap.c,v 1.4 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpixmap.c,v 1.5 2001/12/14 19:59:23 dawes Exp $ */ /* pixmap management written by drewry, september 1986 Index: xc/programs/Xserver/cfb/cfbply1rct.c diff -u xc/programs/Xserver/cfb/cfbply1rct.c:3.7 xc/programs/Xserver/cfb/cfbply1rct.c:3.9 --- xc/programs/Xserver/cfb/cfbply1rct.c:3.7 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbply1rct.c Fri Dec 14 14:59:24 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfbply1rct.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ + * $Xorg: cfbply1rct.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbply1rct.c,v 3.7 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbply1rct.c,v 3.9 2001/12/14 19:59:24 dawes Exp $ */ #include "X.h" @@ -47,29 +51,32 @@ { cfbPrivGCPtr devPriv; int nwidth; - CfbBits *addrl, *addr; + CfbBits *addrl, *addr; #if PSZ == 24 - CfbBits startmask, endmask; - register int pidx; + CfbBits startmask, endmask; + register int pidx; +#else +#if PPW > 1 + CfbBits mask, bits = ~((CfbBits)0); +#endif #endif int maxy; int origin; register int vertex1, vertex2; - int c; + int c = 0; BoxPtr extents; int clip; int y; - int *vertex1p, *vertex2p; + int *vertex1p = NULL, *vertex2p; int *endp; - int x1, x2; - int dx1, dx2; - int dy1, dy2; - int e1, e2; - int step1, step2; - int sign1, sign2; + int x1 = 0, x2 = 0; + int dx1 = 0, dx2 = 0; + int dy1 = 0, dy2 = 0; + int e1 = 0, e2 = 0; + int step1 = 0, step2 = 0; + int sign1 = 0, sign2 = 0; int h; int l, r; - CfbBits mask, bits = ~((CfbBits)0); int nmiddle; RROP_DECLARE @@ -179,7 +186,7 @@ vertex2p = (int *) ptsIn; #define Setup(c,x,vertex,dx,dy,e,sign,step) {\ x = intToX(vertex); \ - if (dy = intToY(c) - y) { \ + if ((dy = intToY(c) - y)) { \ dx = intToX(c) - x; \ step = 0; \ if (dx >= 0) \ @@ -329,7 +336,7 @@ RROP_SOLID(addr); addr++; } #if PPW > 1 - if (mask = ~SCRRIGHT(bits, r & PIM)) + if ((mask = ~SCRRIGHT(bits, r & PIM))) RROP_SOLID_MASK(addr,mask); } #endif Index: xc/programs/Xserver/cfb/cfbpntwin.c diff -u xc/programs/Xserver/cfb/cfbpntwin.c:3.4 xc/programs/Xserver/cfb/cfbpntwin.c:3.6 --- xc/programs/Xserver/cfb/cfbpntwin.c:3.4 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbpntwin.c Fri Dec 14 14:59:24 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbpntwin.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ +/* $Xorg: cfbpntwin.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.4 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.6 2001/12/14 19:59:24 dawes Exp $ */ #include "X.h" @@ -224,17 +228,18 @@ register int h; register CfbBits rrop_xor; register CfbBits *pdst; - register CfbBits leftMask, rightMask; int nmiddle; - register int m; int w; #if PSZ == 24 int leftIndex, rightIndex; - CfbBits piQxelArray[3], xOffset, *pdstULC; /*upper left corner*/ + CfbBits piQxelArray[3], *pdstULC; /*upper left corner*/ piQxelArray[0] = (pixel&0xFFFFFF) | ((pixel&0xFF)<<24); piQxelArray[1] = ((pixel&0xFFFF00)>>8) | ((pixel&0xFFFF)<<16); piQxelArray[2] = ((pixel&0xFFFFFF)<<8) | ((pixel&0xFF0000)>>16); +#else + register CfbBits leftMask, rightMask; + register int m; #endif cfbGetLongWidthAndPointer(pDrawable, widthDst, pdstBase); @@ -467,17 +472,13 @@ BoxPtr pBox; /* pointer to list of boxes to fill */ PixmapPtr tile; /* rotated, expanded tile */ { - register CfbBits rrop_xor; register CfbBits *pdst; - register int m; CfbBits *psrc; int tileHeight; int widthDst; int w; int h; - register CfbBits leftMask; - register CfbBits rightMask; int nmiddle; int y; int srcy; @@ -485,7 +486,12 @@ CfbBits *pdstBase; #if PSZ == 24 int leftIndex, rightIndex; - CfbBits piQxelArray[3], xOffset, *pdstULC; + CfbBits piQxelArray[3], *pdstULC; +#else + register CfbBits rrop_xor; + register CfbBits leftMask; + register CfbBits rightMask; + register int m; #endif tileHeight = tile->drawable.height; Index: xc/programs/Xserver/cfb/cfbpolypnt.c diff -u xc/programs/Xserver/cfb/cfbpolypnt.c:3.4 xc/programs/Xserver/cfb/cfbpolypnt.c:3.6 --- xc/programs/Xserver/cfb/cfbpolypnt.c:3.4 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbpolypnt.c Fri Dec 14 14:59:24 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbpolypnt.c,v 3.4 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpolypnt.c,v 3.6 2001/12/14 19:59:24 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ ********************************************************/ -/* $Xorg: cfbpolypnt.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbpolypnt.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #include "X.h" #include "gcstruct.h" @@ -74,7 +78,9 @@ #ifdef PIXEL_ADDR register PixelType *addrp; register int npwidth; +#if PSZ != 24 PixelType *addrpt; +#endif #else register CfbBits *addrl; register int nlwidth; Index: xc/programs/Xserver/cfb/cfbpush8.c diff -u xc/programs/Xserver/cfb/cfbpush8.c:1.5 xc/programs/Xserver/cfb/cfbpush8.c:1.6 --- xc/programs/Xserver/cfb/cfbpush8.c:1.5 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbpush8.c Fri Dec 14 14:59:24 2001 @@ -2,13 +2,17 @@ * Push Pixels for 8 bit displays. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbpush8.c,v 1.5 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbpush8.c,v 1.6 2001/12/14 19:59:24 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -24,7 +28,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $Xorg: cfbpush8.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbpush8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #if PSZ == 8 Index: xc/programs/Xserver/cfb/cfbrctstp8.c diff -u xc/programs/Xserver/cfb/cfbrctstp8.c:3.4 xc/programs/Xserver/cfb/cfbrctstp8.c:3.6 --- xc/programs/Xserver/cfb/cfbrctstp8.c:3.4 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbrctstp8.c Fri Dec 14 14:59:24 2001 @@ -1,12 +1,16 @@ /* * Fill 32 bit stippled rectangles for 8 bit frame buffers */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrctstp8.c,v 3.4 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbrctstp8.c,v 3.6 2001/12/14 19:59:24 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26,7 +30,7 @@ */ -/* $Xorg: cfbrctstp8.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbrctstp8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #if PSZ == 8 @@ -70,8 +74,8 @@ CfbBits *pbits;/* pointer to start of pixmap */ register CfbBits bits; /* bits from stipple */ - int rot, lastStop, i; - register CfbBits xor, and; + int rot; + register CfbBits xor; PixmapPtr stipple; int wEnd; @@ -120,8 +124,8 @@ dstLine += nlwDst; if (startmask) { - *dst = *dst & ~startmask | - GetPixelGroup (bits) & startmask; + *dst = (*dst & ~startmask) | + (GetPixelGroup (bits) & startmask); dst++; RotBitsLeft (bits, PGSZB); } @@ -133,8 +137,8 @@ } if (endmask) { - *dst = *dst & ~endmask | - GetPixelGroup (bits) & endmask; + *dst = (*dst & ~endmask) | + (GetPixelGroup (bits) & endmask); } } } @@ -154,8 +158,8 @@ dstLine += nlwDst; if (startmask) { - *dstTmp = *dstTmp & ~startmask | - GetPixelGroup (bits) & startmask; + *dstTmp = (*dstTmp & ~startmask) | + (GetPixelGroup (bits) & startmask); dstTmp++; RotBitsLeft (bits, PGSZB); } @@ -179,7 +183,7 @@ { dst = dstTmp + (nlwMiddle << 3); *dst = (*dst & ~endmask) | - GetPixelGroup (bits) & endmask; + (GetPixelGroup(bits) & endmask); } while (w--) { @@ -243,7 +247,7 @@ BoxPtr pBox; /* pointer to list of boxes to fill */ { int x, y, w, h; - int nlwMiddle, nlwDst, nlwTmp; + int nlwMiddle, nlwDst; CfbBits startmask, endmask; register CfbBits *dst; CfbBits *dstLine, *pbits, *dstTmp; Index: xc/programs/Xserver/cfb/cfbrrop.c diff -u xc/programs/Xserver/cfb/cfbrrop.c:1.4 xc/programs/Xserver/cfb/cfbrrop.c:1.6 --- xc/programs/Xserver/cfb/cfbrrop.c:1.4 Wed Jan 17 17:36:36 2001 +++ xc/programs/Xserver/cfb/cfbrrop.c Fri Dec 14 14:59:24 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfbrrop.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: cfbrrop.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.c,v 1.4 2001/01/17 22:36:36 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.c,v 1.6 2001/12/14 19:59:24 dawes Exp $ */ /* cfb reduced rasterop computations */ @@ -193,6 +197,9 @@ case GXset: and = 0; xor = ~0; + break; + default: + and = xor = 0; break; } and |= ~pm; Index: xc/programs/Xserver/cfb/cfbrrop.h diff -u xc/programs/Xserver/cfb/cfbrrop.h:3.8 xc/programs/Xserver/cfb/cfbrrop.h:3.10 --- xc/programs/Xserver/cfb/cfbrrop.h:3.8 Tue Jan 30 17:06:15 2001 +++ xc/programs/Xserver/cfb/cfbrrop.h Fri Dec 14 14:59:24 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfbrrop.h,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: cfbrrop.h,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.h,v 3.8 2001/01/30 22:06:15 tsi Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.h,v 3.10 2001/12/14 19:59:24 dawes Exp $ */ #ifndef GXcopy #include "X.h" @@ -316,7 +320,7 @@ } #endif -#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) +#if !defined(UNIXCPP) || defined(ANSICPP) #define RROP_NAME_CAT(prefix,suffix) prefix##suffix #else #define RROP_NAME_CAT(prefix,suffix) prefix/**/suffix Index: xc/programs/Xserver/cfb/cfbsetsp.c diff -u xc/programs/Xserver/cfb/cfbsetsp.c:3.3 xc/programs/Xserver/cfb/cfbsetsp.c:3.5 --- xc/programs/Xserver/cfb/cfbsetsp.c:3.3 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/cfbsetsp.c Fri Dec 14 14:59:24 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbsetsp.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbsetsp.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbsetsp.c,v 3.3 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbsetsp.c,v 3.5 2001/12/14 19:59:24 dawes Exp $ */ #include "X.h" #include "Xmd.h" @@ -81,13 +85,15 @@ register int tmpSrc; /* scratch buffer to collect bits in */ int dstBit; /* offset in bits from beginning of * word */ - register int nstart; /* number of bits from first partial */ - register int nend; /* " " last partial word */ int offSrc; - int startmask, endmask, nlMiddle, nl; + int nl; #if PSZ == 24 register char *psrcb, *pdstb; register int xIndex; +#else + register int nstart; /* number of bits from first partial */ + register int nend; /* " " last partial word */ + int startmask, endmask, nlMiddle; #endif DeclareMergeRop() Index: xc/programs/Xserver/cfb/cfbsolid.c diff -u xc/programs/Xserver/cfb/cfbsolid.c:3.5 xc/programs/Xserver/cfb/cfbsolid.c:3.7 --- xc/programs/Xserver/cfb/cfbsolid.c:3.5 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/cfbsolid.c Fri Dec 14 14:59:25 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: cfbsolid.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: cfbsolid.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.5 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.7 2001/12/14 19:59:25 dawes Exp $ */ #include "X.h" @@ -116,14 +120,15 @@ register int m; register CfbBits *pdst; RROP_DECLARE - register CfbBits leftMask, rightMask; CfbBits *pdstBase, *pdstRect; int nmiddle; int h; int w; int widthDst; #if PSZ == 24 - int leftIndex, rightIndex, xOffset; + int leftIndex, rightIndex; +#else + register CfbBits leftMask, rightMask; #endif cfbGetLongWidthAndPointer (pDrawable, widthDst, pdstBase) @@ -765,7 +770,6 @@ register CfbBits *pdst; register int nlmiddle; - register CfbBits startmask, endmask; register int w; int x; @@ -777,7 +781,9 @@ int *pwidth; cfbPrivGCPtr devPriv; #if PSZ == 24 - int leftIndex, rightIndex, xOffset; + int leftIndex, rightIndex; +#else + register CfbBits startmask, endmask; #endif devPriv = cfbGetGCPrivate(pGC); Index: xc/programs/Xserver/cfb/cfbteblt8.c diff -u xc/programs/Xserver/cfb/cfbteblt8.c:1.4 xc/programs/Xserver/cfb/cfbteblt8.c:1.6 --- xc/programs/Xserver/cfb/cfbteblt8.c:1.4 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/cfbteblt8.c Fri Dec 14 14:59:25 2001 @@ -3,12 +3,16 @@ * 8 bit displays, in Copy mode with no clipping. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbteblt8.c,v 1.4 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbteblt8.c,v 1.6 2001/12/14 19:59:25 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -25,7 +29,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $Xorg: cfbteblt8.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbteblt8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #if PSZ == 8 @@ -350,7 +354,10 @@ glyphPointer oldRightChar; CfbBits *pdstBase; glyphPointer leftChar; - int widthDst, widthLeft; + int widthDst; +#ifndef FAST_CONSTANT_OFFSET_MODE + int widthLeft; +#endif int widthGlyph; int h; int ew; @@ -451,8 +458,8 @@ leftMask = cfbendtab[xoff1]; rightMask = cfbstarttab[xoff1]; -#define StoreBits0 StorePixels (0,dst[0] & leftMask | \ - GetPixelGroup(c) & rightMask); +#define StoreBits0 StorePixels (0, (dst[0] & leftMask) | \ + (GetPixelGroup(c) & rightMask)); #define GetBits GetBitsNS SwitchEm @@ -517,7 +524,8 @@ leftMask = cfbendtab[xoff1]; rightMask = cfbstarttab[xoff1]; -#define StoreBits0 StorePixels (0,dst[0] & leftMask | GetPixelGroup(c) & rightMask); +#define StoreBits0 StorePixels (0, (dst[0] & leftMask) | \ + (GetPixelGroup(c) & rightMask)); #define GetBits WGetBits1S SwitchEm Index: xc/programs/Xserver/cfb/cfbtegblt.c diff -u xc/programs/Xserver/cfb/cfbtegblt.c:3.4 xc/programs/Xserver/cfb/cfbtegblt.c:3.6 --- xc/programs/Xserver/cfb/cfbtegblt.c:3.4 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/cfbtegblt.c Fri Dec 14 14:59:25 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbtegblt.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbtegblt.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.4 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.6 2001/12/14 19:59:25 dawes Exp $ */ #include "X.h" #include "Xmd.h" @@ -106,9 +110,6 @@ register int wtmp,xtemp,width; CfbBits bgfill,fgfill,*ptemp,tmpDst1,tmpDst2,*pdtmp; int tmpx; -#if PSZ == 24 - int xIndex; -#endif xpos += pDrawable->x; ypos += pDrawable->y; Index: xc/programs/Xserver/cfb/cfbtile32.c diff -u xc/programs/Xserver/cfb/cfbtile32.c:3.4 xc/programs/Xserver/cfb/cfbtile32.c:3.6 --- xc/programs/Xserver/cfb/cfbtile32.c:3.4 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/cfbtile32.c Fri Dec 14 14:59:25 2001 @@ -2,13 +2,17 @@ * Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow. * no depth dependencies. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbtile32.c,v 3.4 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbtile32.c,v 3.6 2001/12/14 19:59:25 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -25,7 +29,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $Xorg: cfbtile32.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbtile32.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" @@ -223,7 +227,7 @@ register CfbBits endmask; /* masks for reggedy bits at either end of line */ int nlwMiddle; /* number of longwords between sides of boxes */ int nlwExtra; /* to get from right of box to left of next span */ - register int nlw; /* loop version of nlwMiddle */ + register int nlw = 0; /* loop version of nlwMiddle */ register CfbBits *p; /* pointer to bits we're writing */ int y; /* current scan line */ int srcy; /* current tile position */ Index: xc/programs/Xserver/cfb/cfbtileodd.c diff -u xc/programs/Xserver/cfb/cfbtileodd.c:3.4 xc/programs/Xserver/cfb/cfbtileodd.c:3.6 --- xc/programs/Xserver/cfb/cfbtileodd.c:3.4 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/cfbtileodd.c Fri Dec 14 14:59:25 2001 @@ -2,13 +2,17 @@ * Fill odd tiled rectangles and spans. * no depth dependencies. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.4 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.6 2001/12/14 19:59:25 dawes Exp $ */ /* Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -25,7 +29,7 @@ in this Software without prior written authorization from The Open Group. */ -/* $Xorg: cfbtileodd.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbtileodd.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" @@ -143,8 +147,7 @@ CfbBits *pSrcLine; /* pointer to start of source line */ register CfbBits *pDst; register CfbBits *pSrc; - register CfbBits bits, tmp; - register int nlwPart; + register CfbBits bits, tmp = 0; int xoffStart, xoff; int leftShiftStart, rightShiftStart, nlwSrcStart; CfbBits tileEndMask; @@ -153,8 +156,8 @@ int tileEndPart; int needFirst; CfbBits narrow[2]; - CfbBits narrowMask; - int narrowShift; + CfbBits narrowMask = 0; + int narrowShift = 0; Bool narrowTile; MROP_INITIALIZE (alu, planemask) @@ -292,7 +295,8 @@ #if MROP == Mcopy if (nlwSrc > 1) { - nlwPart = nlw; + int nlwPart = nlw; + if (nlwPart >= nlwSrc) nlwPart = nlwSrc - 1; nlw -= nlwPart; @@ -399,8 +403,7 @@ CfbBits *pSrcLine; /* pointer to start of source line */ register CfbBits *pDst; register CfbBits *pSrc; - register CfbBits bits, tmp; - register int nlwPart; + register CfbBits bits, tmp = 0; int xoffStart, xoff; int leftShiftStart, rightShiftStart, nlwSrcStart; CfbBits tileEndMask; @@ -409,8 +412,8 @@ int tileEndPart; int needFirst; CfbBits narrow[2]; - CfbBits narrowMask; - int narrowShift; + CfbBits narrowMask = 0; + int narrowShift = 0; Bool narrowTile; MROP_INITIALIZE (alu, planemask) @@ -541,7 +544,8 @@ #if MROP == Mcopy if (nlwSrc > 1) { - nlwPart = nlw; + int nlwPart = nlw; + if (nlwPart >= nlwSrc) nlwPart = nlwSrc - 1; nlw -= nlwPart; Index: xc/programs/Xserver/cfb/cfbwindow.c diff -u xc/programs/Xserver/cfb/cfbwindow.c:1.1.1.3 xc/programs/Xserver/cfb/cfbwindow.c:1.2 --- xc/programs/Xserver/cfb/cfbwindow.c:1.1.1.3 Tue Jan 16 17:42:26 2001 +++ xc/programs/Xserver/cfb/cfbwindow.c Fri Dec 14 14:59:25 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbwindow.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbwindow.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/cfb/cfbzerarc.c diff -u xc/programs/Xserver/cfb/cfbzerarc.c:3.2 xc/programs/Xserver/cfb/cfbzerarc.c:3.3 --- xc/programs/Xserver/cfb/cfbzerarc.c:3.2 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/cfbzerarc.c Fri Dec 14 14:59:25 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbzerarc.c,v 3.2 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/cfbzerarc.c,v 3.3 2001/12/14 19:59:25 dawes Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ ********************************************************/ -/* $Xorg: cfbzerarc.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ +/* $Xorg: cfbzerarc.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ /* Derived from: * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" Index: xc/programs/Xserver/cfb/stip68kgnu.h diff -u xc/programs/Xserver/cfb/stip68kgnu.h:3.3 xc/programs/Xserver/cfb/stip68kgnu.h:3.4 --- xc/programs/Xserver/cfb/stip68kgnu.h:3.3 Wed Jan 17 17:36:37 2001 +++ xc/programs/Xserver/cfb/stip68kgnu.h Fri Dec 14 14:59:25 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: stip68kgnu.h,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: stip68kgnu.h,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stip68kgnu.h,v 3.3 2001/01/17 22:36:37 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stip68kgnu.h,v 3.4 2001/12/14 19:59:25 dawes Exp $ */ /* * Stipple stack macro for 68k GCC Index: xc/programs/Xserver/cfb/stipmips.s diff -u xc/programs/Xserver/cfb/stipmips.s:1.1.1.3 xc/programs/Xserver/cfb/stipmips.s:1.2 --- xc/programs/Xserver/cfb/stipmips.s:1.1.1.3 Tue Jan 16 17:42:28 2001 +++ xc/programs/Xserver/cfb/stipmips.s Fri Dec 14 14:59:26 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: stipmips.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: stipmips.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/cfb/stipple68k.s diff -u xc/programs/Xserver/cfb/stipple68k.s:3.2 xc/programs/Xserver/cfb/stipple68k.s:3.3 --- xc/programs/Xserver/cfb/stipple68k.s:3.2 Wed Jan 17 17:36:38 2001 +++ xc/programs/Xserver/cfb/stipple68k.s Fri Dec 14 14:59:26 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: stipple68k.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: stipple68k.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stipple68k.s,v 3.2 2001/01/17 22:36:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stipple68k.s,v 3.3 2001/12/14 19:59:26 dawes Exp $ */ /* * Stipple code for 68k processors Index: xc/programs/Xserver/cfb/stipsparc.s diff -u xc/programs/Xserver/cfb/stipsparc.s:1.4 xc/programs/Xserver/cfb/stipsparc.s:1.5 --- xc/programs/Xserver/cfb/stipsparc.s:1.4 Wed Jan 17 17:36:38 2001 +++ xc/programs/Xserver/cfb/stipsparc.s Fri Dec 14 14:59:26 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: stipsparc.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: stipsparc.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stipsparc.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stipsparc.s,v 1.5 2001/12/14 19:59:26 dawes Exp $ */ /* * SPARC assembly code for optimized text rendering. Index: xc/programs/Xserver/cfb/stipsprc32.s diff -u xc/programs/Xserver/cfb/stipsprc32.s:1.4 xc/programs/Xserver/cfb/stipsprc32.s:1.5 --- xc/programs/Xserver/cfb/stipsprc32.s:1.4 Wed Jan 17 17:36:38 2001 +++ xc/programs/Xserver/cfb/stipsprc32.s Fri Dec 14 14:59:26 2001 @@ -1,9 +1,13 @@ /* - * $Xorg: stipsprc32.s,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ + * $Xorg: stipsprc32.s,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -21,7 +25,7 @@ * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stipsprc32.s,v 1.4 2001/01/17 22:36:38 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb/stipsprc32.s,v 1.5 2001/12/14 19:59:26 dawes Exp $ */ /* * SPARC assembly code for optimized text rendering. Index: xc/programs/Xserver/cfb24/cfbrrop24.h diff -u xc/programs/Xserver/cfb24/cfbrrop24.h:3.0 xc/programs/Xserver/cfb24/cfbrrop24.h:3.1 --- xc/programs/Xserver/cfb24/cfbrrop24.h:3.0 Sat Jun 29 05:06:09 1996 +++ xc/programs/Xserver/cfb24/cfbrrop24.h Sat Oct 27 23:33:03 2001 @@ -1,6 +1,6 @@ -/* $XFree86: xc/programs/Xserver/cfb24/cfbrrop24.h,v 3.0 1996/06/29 09:06:09 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/cfb24/cfbrrop24.h,v 3.1 2001/10/28 03:33:03 tsi Exp $ */ -#define RROP_DECLARE register unsigned long rrop_and, rrop_xor; \ +#define RROP_DECLARE \ unsigned long piQxelAnd[3], piQxelXor[3], spiQxelAnd[8], spiQxelXor[8]; #define RROP_COPY_SETUP(ptn) \ Index: xc/programs/Xserver/dbe/Imakefile diff -u xc/programs/Xserver/dbe/Imakefile:3.10 xc/programs/Xserver/dbe/Imakefile:3.11 --- xc/programs/Xserver/dbe/Imakefile:3.10 Wed Jan 17 17:36:41 2001 +++ xc/programs/Xserver/dbe/Imakefile Mon Dec 17 15:00:39 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/dbe/Imakefile,v 3.10 2001/01/17 22:36:41 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/dbe/Imakefile,v 3.11 2001/12/17 20:00:39 dawes Exp $ #if DoLoadableServer #define IHaveSubdirs @@ -17,7 +17,7 @@ SRCS = dbe.c midbe.c OBJS = dbe.o midbe.o - INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(EXTRAINCLUDES) + INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES) LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln NormalLibraryObjectRule() Index: xc/programs/Xserver/dbe/dbe.c diff -u xc/programs/Xserver/dbe/dbe.c:3.8 xc/programs/Xserver/dbe/dbe.c:3.11 --- xc/programs/Xserver/dbe/dbe.c:3.8 Wed Jan 17 17:36:41 2001 +++ xc/programs/Xserver/dbe/dbe.c Sat Oct 27 23:33:04 2001 @@ -30,7 +30,7 @@ * DIX DBE code * *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/dbe/dbe.c,v 3.8 2001/01/17 22:36:41 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dbe/dbe.c,v 3.11 2001/10/28 03:33:04 tsi Exp $ */ /* INCLUDES */ @@ -177,7 +177,7 @@ ptr = (char *)(ppriv + pDbeScreenPriv->winPrivPrivLen); for (i = pDbeScreenPriv->winPrivPrivLen; --i >= 0; ppriv++, sizes++) { - if (size = *sizes) + if ((size = *sizes)) { ppriv->ptr = (pointer)ptr; ptr += size; @@ -202,13 +202,14 @@ * *****************************************************************************/ +#if 0 /* NOT USED */ static DbeWindowPrivPtr DbeFallbackAllocWinPriv(pScreen) ScreenPtr pScreen; { return (NULL); - } /* DbeFallbackAllocWinPriv() */ +#endif /****************************************************************************** @@ -350,7 +351,7 @@ ProcDbeGetVersion(client) ClientPtr client; { - REQUEST(xDbeGetVersionReq); + /* REQUEST(xDbeGetVersionReq); */ xDbeGetVersionReply rep; register int n; @@ -834,7 +835,7 @@ ProcDbeBeginIdiom(client) ClientPtr client; { - REQUEST(xDbeBeginIdiomReq); + /* REQUEST(xDbeBeginIdiomReq); */ DbeScreenPrivPtr pDbeScreenPriv; register int i; @@ -962,7 +963,7 @@ rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = length; + rep.length = length >> 2; rep.m = count; if (client->swapped) @@ -1755,7 +1756,7 @@ ************************************************************************** */ - if (pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)) + if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) { while (pDbeWindowPriv) { @@ -1814,13 +1815,12 @@ { ExtensionEntry *extEntry; register int i, j; - ScreenPtr pScreen; + ScreenPtr pScreen = NULL; DbeScreenPrivPtr pDbeScreenPriv; int nStubbedScreens = 0; Bool ddxInitSuccess; #ifdef PANORAMIX - extern Bool noPanoramiXExtension; if(!noPanoramiXExtension) return; #endif Index: xc/programs/Xserver/dbe/midbe.c diff -u xc/programs/Xserver/dbe/midbe.c:3.4 xc/programs/Xserver/dbe/midbe.c:3.5 --- xc/programs/Xserver/dbe/midbe.c:3.4 Tue Mar 6 12:31:34 2001 +++ xc/programs/Xserver/dbe/midbe.c Thu Aug 23 10:19:24 2001 @@ -30,7 +30,7 @@ * Machine-independent DBE code * *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/dbe/midbe.c,v 3.4 2001/03/06 17:31:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dbe/midbe.c,v 3.5 2001/08/23 14:19:24 alanh Exp $ */ /* INCLUDES */ @@ -70,7 +70,6 @@ static int miDbePrivPrivGeneration = 0; static int miDbeWindowPrivPrivIndex = -1; -static int miDbeScreenPrivPrivIndex = -1; RESTYPE dbeDrawableResType; RESTYPE dbeWindowPrivResType; int dbeScreenPrivIndex = -1; @@ -308,7 +307,6 @@ DbeScreenPrivPtr pDbeScreenPriv; GCPtr pGC; WindowPtr pWin; - register int i; MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv; PixmapPtr pTmpBuffer; xRectangle clearRect; Index: xc/programs/Xserver/dbe/module/Imakefile diff -u xc/programs/Xserver/dbe/module/Imakefile:1.1 xc/programs/Xserver/dbe/module/Imakefile:1.2 --- xc/programs/Xserver/dbe/module/Imakefile:1.1 Thu Apr 6 11:35:03 2000 +++ xc/programs/Xserver/dbe/module/Imakefile Mon Dec 17 15:00:39 2001 @@ -1,6 +1,6 @@ XCOMM $XConsortium: Imakefile /main/2 1996/09/28 17:06:40 rws $ -XCOMM $XFree86: xc/programs/Xserver/dbe/module/Imakefile,v 1.1 2000/04/06 15:35:03 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/dbe/module/Imakefile,v 1.2 2001/12/17 20:00:39 dawes Exp $ #define IHaveModules #include @@ -12,7 +12,7 @@ SRCS = dbe.c midbe.c $(MSRCS) OBJS = dbe.o midbe.o $(MOBJS) - INCLUDES = -I.. -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(EXTRAINCLUDES) + INCLUDES = -I.. -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES) LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln LinkSourceFile(dbemodule.c,..) Index: xc/programs/Xserver/dix/Imakefile diff -u xc/programs/Xserver/dix/Imakefile:3.13 xc/programs/Xserver/dix/Imakefile:3.14 --- xc/programs/Xserver/dix/Imakefile:3.13 Sun Mar 4 12:40:04 2001 +++ xc/programs/Xserver/dix/Imakefile Tue Jul 31 20:44:47 2001 @@ -3,7 +3,7 @@ -XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.13 2001/03/04 17:40:04 herrb Exp $ +XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.14 2001/08/01 00:44:47 tsi Exp $ #include @@ -26,7 +26,8 @@ main.o property.o resource.o swaprep.o swapreq.o \ tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ) - INCLUDES = -I../include -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext + INCLUDES = -I../include -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(EXTINCSRC) \ + -I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx LINTLIBS = ../os/llib-los.ln /* Index: xc/programs/Xserver/dix/atom.c diff -u xc/programs/Xserver/dix/atom.c:3.2 xc/programs/Xserver/dix/atom.c:3.3 --- xc/programs/Xserver/dix/atom.c:3.2 Wed Jan 17 17:36:42 2001 +++ xc/programs/Xserver/dix/atom.c Fri Dec 14 14:59:29 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/atom.c,v 3.2 2001/01/17 22:36:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/atom.c,v 3.3 2001/12/14 19:59:29 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ ******************************************************************/ -/* $Xorg: atom.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ +/* $Xorg: atom.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #include "X.h" #include "Xatom.h" Index: xc/programs/Xserver/dix/colormap.c diff -u xc/programs/Xserver/dix/colormap.c:3.5 xc/programs/Xserver/dix/colormap.c:3.8 --- xc/programs/Xserver/dix/colormap.c:3.5 Wed Jan 17 17:36:42 2001 +++ xc/programs/Xserver/dix/colormap.c Fri Dec 14 14:59:29 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.5 2001/01/17 22:36:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.8 2001/12/14 19:59:29 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ ******************************************************************/ -/* $Xorg: colormap.c,v 1.3 2000/08/17 19:48:17 cpqbld Exp $ */ +/* $Xorg: colormap.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #include "X.h" #define NEED_EVENTS @@ -54,6 +58,9 @@ #include "scrnintstr.h" #include "resource.h" #include "windowstr.h" +#ifdef LBX +#include "lbxserve.h" +#endif extern XID clientErrorValue; @@ -1266,9 +1273,9 @@ { EntryPtr pent; Bool foundFree; - Pixel pixel, Free; - int npix, count, *nump; - Pixel **pixp, *ppix; + Pixel pixel, Free = 0; + int npix, count, *nump = NULL; + Pixel **pixp = NULL, *ppix; xColorItem def; foundFree = FALSE; Index: xc/programs/Xserver/dix/cursor.c diff -u xc/programs/Xserver/dix/cursor.c:3.4 xc/programs/Xserver/dix/cursor.c:3.5 --- xc/programs/Xserver/dix/cursor.c:3.4 Wed Jan 17 17:36:42 2001 +++ xc/programs/Xserver/dix/cursor.c Fri Dec 14 14:59:30 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.4 2001/01/17 22:36:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.5 2001/12/14 19:59:30 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ ******************************************************************/ -/* $Xorg: cursor.c,v 1.3 2000/08/17 19:48:17 cpqbld Exp $ */ +/* $Xorg: cursor.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/dix/devices.c diff -u xc/programs/Xserver/dix/devices.c:3.17 xc/programs/Xserver/dix/devices.c:3.20 --- xc/programs/Xserver/dix/devices.c:3.17 Fri Feb 16 08:24:06 2001 +++ xc/programs/Xserver/dix/devices.c Fri Dec 14 14:59:30 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/devices.c,v 3.17 2001/02/16 13:24:06 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/devices.c,v 3.20 2001/12/14 19:59:30 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -43,7 +47,7 @@ ********************************************************/ -/* $Xorg: devices.c,v 1.3 2000/08/17 19:48:17 cpqbld Exp $ */ +/* $Xorg: devices.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #include "X.h" #include "misc.h" @@ -65,6 +69,9 @@ #define _SECURITY_SERVER #include "security.h" #endif +#ifdef LBX +#include "lbxserve.h" +#endif #include "dispatch.h" #include "swaprep.h" @@ -1384,9 +1391,9 @@ if (!noXkbExtension) { XkbEventCauseRec cause; XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client); - keybd->kbdfeed->ctrl.leds = ctrl.leds; XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))), ctrl.leds, &cause); + ctrl.leds = keybd->kbdfeed->ctrl.leds; } #endif break; Index: xc/programs/Xserver/dix/dispatch.c diff -u xc/programs/Xserver/dix/dispatch.c:3.23 xc/programs/Xserver/dix/dispatch.c:3.26 --- xc/programs/Xserver/dix/dispatch.c:3.23 Wed Jan 17 17:36:42 2001 +++ xc/programs/Xserver/dix/dispatch.c Fri Dec 14 14:59:30 2001 @@ -1,9 +1,13 @@ -/* $Xorg: dispatch.c,v 1.4 2000/08/17 19:48:17 cpqbld Exp $ */ +/* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */ /************************************************************ Copyright 1987, 1989, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -64,7 +68,7 @@ * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.23 2001/01/17 22:36:42 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.26 2001/12/14 19:59:30 dawes Exp $ */ #ifdef PANORAMIX_DEBUG #include @@ -104,6 +108,9 @@ #include "inputstr.h" #include "XKBsrv.h" #endif +#ifdef LBX +#include "lbxserve.h" +#endif #define mskcnt ((MAXCLIENTS + 31) / 32) #define BITMASK(i) (1U << ((i) & 31)) @@ -276,9 +283,8 @@ ClientPtr pClient; int i; int client; - int bestPrio, best; + int bestPrio, best = 0; int bestRobin, robin; - int prio; long now = SmartScheduleTime; long idle; @@ -2118,7 +2124,7 @@ int nlines, linesPerBuf; register int linesDone; long widthBytesLine, length; - Mask plane; + Mask plane = 0; char *pBuf; xGetImageReply xgi; RegionPtr pVisibleRegion = NULL; @@ -3357,7 +3363,7 @@ xListHostsReply reply; int len, nHosts, result; pointer pdata; - REQUEST(xListHostsReq); + /* REQUEST(xListHostsReq); */ REQUEST_SIZE_MATCH(xListHostsReq); #ifdef XCSECURITY @@ -3482,7 +3488,7 @@ xGetFontPathReply reply; int stringLens, numpaths; unsigned char *bufferStart; - REQUEST (xReq); + /* REQUEST (xReq); */ REQUEST_SIZE_MATCH(xReq); bufferStart = GetFontPath(&numpaths, &stringLens); @@ -3908,7 +3914,6 @@ if (reason) { xConnSetupPrefix csp; - char pad[3]; csp.success = xFalse; csp.lengthReason = strlen(reason); Index: xc/programs/Xserver/dix/dispatch.h diff -u xc/programs/Xserver/dix/dispatch.h:3.1 xc/programs/Xserver/dix/dispatch.h:3.2 --- xc/programs/Xserver/dix/dispatch.h:3.1 Mon May 6 01:56:15 1996 +++ xc/programs/Xserver/dix/dispatch.h Tue Jul 31 20:44:48 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/dispatch.h,v 3.1 1996/05/06 05:56:15 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dispatch.h,v 3.2 2001/08/01 00:44:48 tsi Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey @@ -76,6 +76,18 @@ #if NeedFunctionPrototypes HWEventQueuePtr /* c0 */, HWEventQueuePtr /* c1 */ +#endif +); + +void ProcessWorkQueue( +#if NeedFunctionPrototypes + void +#endif +); + +void ProcessWorkQueueZombies( +#if NeedFunctionPrototypes + void #endif ); Index: xc/programs/Xserver/dix/dixfonts.c diff -u xc/programs/Xserver/dix/dixfonts.c:3.24 xc/programs/Xserver/dix/dixfonts.c:3.26 --- xc/programs/Xserver/dix/dixfonts.c:3.24 Wed Jan 17 17:36:43 2001 +++ xc/programs/Xserver/dix/dixfonts.c Sat Oct 27 23:33:06 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.24 2001/01/17 22:36:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.26 2001/10/28 03:33:06 tsi Exp $ */ /************************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -45,6 +45,15 @@ #include "panoramiX.h" #endif +#ifdef LBX +#include "lbxserve.h" +#endif + +#ifdef XF86BIGFONT +#define _XF86BIGFONT_SERVER_ +#include "xf86bigfont.h" +#endif + #define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics extern pointer fosNaturalParams; @@ -220,7 +229,7 @@ #endif { FontPtr pfont = NullFont; - FontPathElementPtr fpe; + FontPathElementPtr fpe = NULL; ScreenPtr pScr; int err = Successful; int i; @@ -586,7 +595,7 @@ xListFontsReply reply; char *bufptr; char *bufferStart; - int aliascount; + int aliascount = 0; if (client->clientGone) { @@ -897,7 +906,7 @@ int length; xFontProp *pFP; int i; - int aliascount; + int aliascount = 0; xListFontsWithInfoReply finalReply; if (client->clientGone) @@ -1165,9 +1174,9 @@ register FontPtr pFont = c->pGC->font, oldpFont; Font fid, oldfid; int err = Success, lgerr; /* err is in X error, not font error, space */ - enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state; + enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT; FontPathElementPtr fpe; - GC *origGC; + GC *origGC = NULL; if (client->clientGone) { @@ -1718,13 +1727,11 @@ Bool persist; #endif { - int i, - err; + int i, err = 0; int valid_paths = 0; unsigned int len; unsigned char *cp = paths; - FontPathElementPtr fpe, - *fplist; + FontPathElementPtr fpe = NULL, *fplist; fplist = (FontPathElementPtr *) xalloc(sizeof(FontPathElementPtr) * npaths); Index: xc/programs/Xserver/dix/dixutils.c diff -u xc/programs/Xserver/dix/dixutils.c:3.6 xc/programs/Xserver/dix/dixutils.c:3.9 --- xc/programs/Xserver/dix/dixutils.c:3.6 Wed Jan 17 17:36:43 2001 +++ xc/programs/Xserver/dix/dixutils.c Fri Dec 14 14:59:31 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.6 2001/01/17 22:36:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.9 2001/12/14 19:59:31 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -78,7 +82,7 @@ */ -/* $Xorg: dixutils.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: dixutils.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" @@ -323,7 +327,7 @@ unsigned mode; { int numnow; - pointer *pTmp; + pointer *pTmp = NULL; int j; numnow = client->numSaved; @@ -394,11 +398,7 @@ * procedure to call than to check if there's a procedure */ void -NoopDDA( -#if NeedVarargsPrototypes - void* f, ... -#endif -) +NoopDDA(void* f, ...) { } @@ -564,7 +564,7 @@ * they will be called again. This must be reentrant with * QueueWorkProc. */ - while (q = *p) + while ((q = *p)) { if ((*q->function) (q->client, q->closure)) { @@ -586,7 +586,7 @@ WorkQueuePtr q, *p; p = &workQueue; - while (q = *p) + while ((q = *p)) { if (q->client && q->client->clientGone) { Index: xc/programs/Xserver/dix/events.c diff -u xc/programs/Xserver/dix/events.c:3.38 xc/programs/Xserver/dix/events.c:3.44 --- xc/programs/Xserver/dix/events.c:3.38 Fri Feb 16 08:24:07 2001 +++ xc/programs/Xserver/dix/events.c Sun Dec 16 13:29:45 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.38 2001/02/16 13:24:07 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.44 2001/12/16 18:29:45 keithp Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -64,7 +68,7 @@ * * *****************************************************************/ -/* $Xorg: events.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: events.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #include "X.h" #include "misc.h" @@ -108,8 +112,6 @@ extern WindowPtr *WindowTable; -extern void (* EventSwapVector[128]) (); - #define EXTENSION_EVENT_BASE 64 #define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ @@ -605,7 +607,7 @@ #endif /* PANORAMIX */ -Mask +static Mask GetNextEventMask() { lastEventMask <<= 1; @@ -814,7 +816,7 @@ ROOT = WindowTable[sprite.hot.pScreen->myNum]; } -void +static void ConfineCursorToWindow(pWin, generateEvents, confineToScreen) WindowPtr pWin; Bool generateEvents; @@ -1190,6 +1192,24 @@ PostNewCursor(); } +#ifdef RANDR +void +ScreenRestructured (ScreenPtr pScreen) +{ + GrabPtr grab; + + if ((grab = inputInfo.pointer->grab) && grab->confineTo) + { + if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys.x = sprite.hotPhys.y = 0; + ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + } + else + ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + TRUE, FALSE); +} +#endif + void CheckGrabForSyncs(thisDev, thisMode, otherMode) register DeviceIntPtr thisDev; @@ -1616,7 +1636,7 @@ int attempt; register InputClients *other; ClientPtr client = NullClient; - Mask deliveryMask; /* If a grab occurs due to a button press, then + Mask deliveryMask = 0; /* If a grab occurs due to a button press, then this mask is the mask of the grab. */ int type = pEvents->u.u.type; @@ -2517,7 +2537,7 @@ int count; { register int i; - register WindowPtr pWin; + register WindowPtr pWin = NULL; register FocusClassPtr focus = device->focus; if ((xE->u.u.type == ButtonPress @@ -2878,7 +2898,8 @@ { case ButtonPress: mouse->valuator->motionHintWindow = NullWindow; - butc->buttonsDown++; + if (!(*kptr & bit)) + butc->buttonsDown++; butc->motionMask = ButtonMotionMask; *kptr |= bit; #if !defined(XFree86Server) || !defined(XINPUT) @@ -2895,7 +2916,9 @@ break; case ButtonRelease: mouse->valuator->motionHintWindow = NullWindow; - if (!--butc->buttonsDown) + if (*kptr & bit) + --butc->buttonsDown; + if (!butc->buttonsDown) butc->motionMask = 0; *kptr &= ~bit; #if !defined(XFree86Server) || !defined(XINPUT) @@ -3660,7 +3683,7 @@ ClientPtr client; { xGetInputFocusReply rep; - REQUEST(xReq); + /* REQUEST(xReq); */ FocusClassPtr focus = inputInfo.keyboard->focus; REQUEST_SIZE_MATCH(xReq); Index: xc/programs/Xserver/dix/extension.c diff -u xc/programs/Xserver/dix/extension.c:3.9 xc/programs/Xserver/dix/extension.c:3.11 --- xc/programs/Xserver/dix/extension.c:3.9 Wed Jan 17 17:36:43 2001 +++ xc/programs/Xserver/dix/extension.c Fri Dec 14 14:59:31 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.9 2001/01/17 22:36:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.11 2001/12/14 19:59:31 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: extension.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: extension.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #include "X.h" #define NEED_EVENTS @@ -56,6 +60,9 @@ #ifdef XCSECURITY #define _SECURITY_SERVER #include "security.h" +#endif +#ifdef LBX +#include "lbxserve.h" #endif #define EXTENSION_BASE 128 Index: xc/programs/Xserver/dix/ffs.c diff -u xc/programs/Xserver/dix/ffs.c:1.1.1.3 xc/programs/Xserver/dix/ffs.c:1.2 --- xc/programs/Xserver/dix/ffs.c:1.1.1.3 Tue Jan 16 17:42:43 2001 +++ xc/programs/Xserver/dix/ffs.c Fri Dec 14 14:59:32 2001 @@ -1,9 +1,13 @@ -/* $Xorg: ffs.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: ffs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/dix/gc.c diff -u xc/programs/Xserver/dix/gc.c:3.7 xc/programs/Xserver/dix/gc.c:3.9 --- xc/programs/Xserver/dix/gc.c:3.7 Mon Apr 23 16:31:06 2001 +++ xc/programs/Xserver/dix/gc.c Fri Dec 14 14:59:32 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/gc.c,v 3.7 2001/04/23 20:31:06 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/gc.c,v 3.9 2001/12/14 19:59:32 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ ******************************************************************/ -/* $Xorg: gc.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: gc.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" @@ -404,8 +408,8 @@ break; case GCClipMask: { - Pixmap pid; - int clipType; + Pixmap pid = 0; + int clipType = 0; if (pUnion) { @@ -564,9 +568,9 @@ { if (fPointer) /* XXX might be a problem on 64 bit big-endian servers */ - dixChangeGC(NullClient, pGC, mask, NULL, (ChangeGCValPtr)pval); + return dixChangeGC(NullClient, pGC, mask, NULL, (ChangeGCValPtr)pval); else - dixChangeGC(NullClient, pGC, mask, pval, NULL); + return dixChangeGC(NullClient, pGC, mask, pval, NULL); } Index: xc/programs/Xserver/dix/globals.c diff -u xc/programs/Xserver/dix/globals.c:1.8 xc/programs/Xserver/dix/globals.c:1.9 --- xc/programs/Xserver/dix/globals.c:1.8 Wed Jan 17 17:36:43 2001 +++ xc/programs/Xserver/dix/globals.c Fri Dec 14 14:59:32 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.8 2001/01/17 22:36:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.9 2001/12/14 19:59:32 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ ********************************************************/ -/* $Xorg: globals.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: globals.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/dix/glyphcurs.c diff -u xc/programs/Xserver/dix/glyphcurs.c:1.1.1.4 xc/programs/Xserver/dix/glyphcurs.c:1.2 --- xc/programs/Xserver/dix/glyphcurs.c:1.1.1.4 Tue Jan 16 17:42:44 2001 +++ xc/programs/Xserver/dix/glyphcurs.c Fri Dec 14 14:59:32 2001 @@ -2,7 +2,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ ************************************************************************/ -/* $Xorg: glyphcurs.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: glyphcurs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #include "misc.h" #include "fontstruct.h" Index: xc/programs/Xserver/dix/grabs.c diff -u xc/programs/Xserver/dix/grabs.c:3.2 xc/programs/Xserver/dix/grabs.c:3.3 --- xc/programs/Xserver/dix/grabs.c:3.2 Wed Jan 17 17:36:43 2001 +++ xc/programs/Xserver/dix/grabs.c Fri Dec 14 14:59:32 2001 @@ -1,9 +1,13 @@ -/* $Xorg: grabs.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: grabs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.2 2001/01/17 22:36:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.3 2001/12/14 19:59:32 dawes Exp $ */ #include "X.h" #include "misc.h" Index: xc/programs/Xserver/dix/main.c diff -u xc/programs/Xserver/dix/main.c:3.35 xc/programs/Xserver/dix/main.c:3.38 --- xc/programs/Xserver/dix/main.c:3.35 Sat Apr 28 16:42:17 2001 +++ xc/programs/Xserver/dix/main.c Fri Dec 14 14:59:32 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.35 2001/04/28 20:42:17 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.38 2001/12/14 19:59:32 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: main.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: main.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* The panoramix components contained the following notice */ /**************************************************************** @@ -79,9 +83,6 @@ #include "dixstruct.h" #include "gcstruct.h" #include "extension.h" -#ifndef PANORAMIX -#include "extnsionst.h" -#endif #include "colormap.h" #include "colormapst.h" #include "cursorstr.h" @@ -90,7 +91,10 @@ #include "servermd.h" #include "site.h" #include "dixfont.h" -#ifndef PANORAMIX +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#else +#include "extnsionst.h" #include "dixevents.h" /* InitEvents() */ #include "dispatch.h" /* InitProcVectors() */ #endif @@ -98,6 +102,7 @@ #ifdef DPMSExtension #define DPMS_SERVER #include "dpms.h" +#include "dpmsproc.h" #endif void ddxGiveUp(); @@ -147,7 +152,7 @@ /*ARGSUSED*/ void NotImplemented( -#if NeedFunctionPrototypes && defined(EVENT_SWAP_PTR) +#if NeedFunctionPrototypes xEvent * from, xEvent * to #endif Index: xc/programs/Xserver/dix/pixmap.c diff -u xc/programs/Xserver/dix/pixmap.c:3.4 xc/programs/Xserver/dix/pixmap.c:3.5 --- xc/programs/Xserver/dix/pixmap.c:3.4 Wed Jan 17 17:36:44 2001 +++ xc/programs/Xserver/dix/pixmap.c Fri Dec 14 14:59:32 2001 @@ -1,9 +1,13 @@ -/* $Xorg: pixmap.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: pixmap.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/dix/pixmap.c,v 3.4 2001/01/17 22:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/pixmap.c,v 3.5 2001/12/14 19:59:32 dawes Exp $ */ #include "X.h" #include "scrnintstr.h" Index: xc/programs/Xserver/dix/privates.c diff -u xc/programs/Xserver/dix/privates.c:3.7 xc/programs/Xserver/dix/privates.c:3.8 --- xc/programs/Xserver/dix/privates.c:3.7 Wed Jan 17 17:36:44 2001 +++ xc/programs/Xserver/dix/privates.c Fri Dec 14 14:59:32 2001 @@ -1,9 +1,13 @@ -/* $Xorg: privates.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: privates.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1993, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -22,7 +26,7 @@ from The Open Group. */ -/* $XFree86: xc/programs/Xserver/dix/privates.c,v 3.7 2001/01/17 22:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/privates.c,v 3.8 2001/12/14 19:59:32 dawes Exp $ */ #include "X.h" #include "scrnintstr.h" Index: xc/programs/Xserver/dix/property.c diff -u xc/programs/Xserver/dix/property.c:3.8 xc/programs/Xserver/dix/property.c:3.11 --- xc/programs/Xserver/dix/property.c:3.8 Wed Jan 17 17:36:44 2001 +++ xc/programs/Xserver/dix/property.c Fri Dec 14 14:59:33 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.8 2001/01/17 22:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.11 2001/12/14 19:59:33 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: property.c,v 1.3 2000/08/17 19:48:18 cpqbld Exp $ */ +/* $Xorg: property.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #include "X.h" #define NEED_REPLIES @@ -56,6 +60,10 @@ #define _SECURITY_SERVER #include "security.h" #endif +#ifdef LBX +#include "lbxserve.h" +#include "lbxtags.h" +#endif #if defined(LBX) || defined(LBX_COMPAT) int fWriteToClient(client, len, buf) @@ -647,7 +655,7 @@ ProcListProperties(client) ClientPtr client; { - Atom *pAtoms, *temppAtoms; + Atom *pAtoms = NULL, *temppAtoms; xListPropertiesReply xlpr; int numProps = 0; WindowPtr pWin; Index: xc/programs/Xserver/dix/resource.c diff -u xc/programs/Xserver/dix/resource.c:3.8 xc/programs/Xserver/dix/resource.c:3.10 --- xc/programs/Xserver/dix/resource.c:3.8 Fri Feb 16 08:24:07 2001 +++ xc/programs/Xserver/dix/resource.c Fri Dec 14 14:59:33 2001 @@ -2,7 +2,11 @@ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ ********************************************************/ -/* $Xorg: resource.c,v 1.4 2000/08/17 19:48:19 cpqbld Exp $ */ +/* $Xorg: resource.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */ /* $TOG: resource.c /main/41 1998/02/09 14:20:31 kaleb $ */ @@ -68,7 +72,7 @@ * 1, and an otherwise arbitrary ID in the low 22 bits, we can create a * resource "owned" by the client. */ -/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.8 2001/02/16 13:24:07 eich Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.10 2001/12/14 19:59:33 dawes Exp $ */ #define NEED_EVENTS #include "X.h" @@ -822,7 +826,7 @@ Mask mode; { int cid; - register ResourcePtr res; + register ResourcePtr res = NULL; pointer retval = NULL; assert(client == NullClient || Index: xc/programs/Xserver/dix/swaprep.c diff -u xc/programs/Xserver/dix/swaprep.c:3.6 xc/programs/Xserver/dix/swaprep.c:3.7 --- xc/programs/Xserver/dix/swaprep.c:3.6 Wed Jan 17 17:36:44 2001 +++ xc/programs/Xserver/dix/swaprep.c Fri Dec 14 14:59:33 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.6 2001/01/17 22:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.7 2001/12/14 19:59:33 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ ********************************************************/ -/* $Xorg: swaprep.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ +/* $Xorg: swaprep.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #include "X.h" #define NEED_REPLIES Index: xc/programs/Xserver/dix/swapreq.c diff -u xc/programs/Xserver/dix/swapreq.c:3.3 xc/programs/Xserver/dix/swapreq.c:3.4 --- xc/programs/Xserver/dix/swapreq.c:3.3 Wed Jan 17 17:36:44 2001 +++ xc/programs/Xserver/dix/swapreq.c Fri Dec 14 14:59:33 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/swapreq.c,v 3.3 2001/01/17 22:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/swapreq.c,v 3.4 2001/12/14 19:59:33 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -42,7 +46,7 @@ ********************************************************/ -/* $Xorg: swapreq.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ +/* $Xorg: swapreq.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #include "X.h" #define NEED_EVENTS Index: xc/programs/Xserver/dix/tables.c diff -u xc/programs/Xserver/dix/tables.c:3.3 xc/programs/Xserver/dix/tables.c:3.4 --- xc/programs/Xserver/dix/tables.c:3.3 Wed Jan 17 17:36:44 2001 +++ xc/programs/Xserver/dix/tables.c Fri Dec 14 14:59:33 2001 @@ -1,9 +1,13 @@ -/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.3 2001/01/17 22:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.4 2001/12/14 19:59:33 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: tables.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ +/* $Xorg: tables.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #include "X.h" #define NEED_EVENTS Index: xc/programs/Xserver/dix/window.c diff -u xc/programs/Xserver/dix/window.c:3.22 xc/programs/Xserver/dix/window.c:3.24 --- xc/programs/Xserver/dix/window.c:3.22 Wed Jan 17 17:36:44 2001 +++ xc/programs/Xserver/dix/window.c Fri Dec 14 14:59:34 2001 @@ -1,9 +1,13 @@ -/* $Xorg: window.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ +/* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -66,7 +70,7 @@ * * *****************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.22 2001/01/17 22:36:44 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.24 2001/12/14 19:59:34 dawes Exp $ */ #include "misc.h" #include "scrnintstr.h" @@ -84,9 +88,8 @@ #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" -#else -#include "dixevents.h" #endif +#include "dixevents.h" #include "globals.h" #ifdef XAPPGROUP @@ -2255,7 +2258,7 @@ #define REBORDER_WIN 3 register WindowPtr pSib = NullWindow; register WindowPtr pParent = pWin->parent; - Window sibwid; + Window sibwid = 0; Mask index2, tmask; register XID *pVlist; short x, y, beforeX, beforeY; @@ -3135,7 +3138,7 @@ Bool wasViewable = (Bool)pWin->viewable; Bool anyMarked = FALSE; Mask parentNotify; - WindowPtr pLayerWin; + WindowPtr pLayerWin = NULL; ScreenPtr pScreen = pWin->drawable.pScreen; if (!pWin->firstChild) @@ -3500,7 +3503,7 @@ CursorMetricRec cm; unsigned char *srcbits, *mskbits; CursorPtr cursor; - XID cursorID; + XID cursorID = 0; int attri; mask = 0; Index: xc/programs/Xserver/dix/xpstubs.c diff -u xc/programs/Xserver/dix/xpstubs.c:1.1.1.3 xc/programs/Xserver/dix/xpstubs.c:1.4 --- xc/programs/Xserver/dix/xpstubs.c:1.1.1.3 Tue Jan 16 17:42:51 2001 +++ xc/programs/Xserver/dix/xpstubs.c Thu Dec 20 14:41:00 2001 @@ -1,7 +1,12 @@ +/* $XFree86: xc/programs/Xserver/dix/xpstubs.c,v 1.4 2001/12/20 19:41:00 tsi Exp $ */ /* Copyright 1996, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -20,7 +25,7 @@ from The Open Group. */ -/* $Xorg: xpstubs.c,v 1.3 2000/08/17 19:48:19 cpqbld Exp $ */ +/* $Xorg: xpstubs.c,v 1.5 2001/03/08 17:52:08 pookie Exp $ */ #include "misc.h" #include "font.h" @@ -38,4 +43,12 @@ FontPathElementPtr fpe; { return FALSE; +} +int +XprintOptions(argc, argv, i) + int argc; + char **argv; + int i; +{ + return i; } Index: xc/programs/Xserver/fb/Imakefile diff -u xc/programs/Xserver/fb/Imakefile:1.13 xc/programs/Xserver/fb/Imakefile:1.14 --- xc/programs/Xserver/fb/Imakefile:1.13 Sun Jan 21 16:19:09 2001 +++ xc/programs/Xserver/fb/Imakefile Tue Jul 17 11:28:58 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.13 2001/01/21 21:19:09 tsi Exp $ +XCOMM $XFree86: xc/programs/Xserver/fb/Imakefile,v 1.14 2001/07/17 15:28:58 keithp Exp $ XCOMM XCOMM XCOMM Id: Imakefile,v 1.1 1999/11/02 03:54:44 keithp Exp $ @@ -82,7 +82,7 @@ INCLUDES = -I. -I../mi -I../include -I$(XINCLUDESRC) \ -I$(FONTINCSRC) -I$(XF86SRC)/common $(EXTRAINCLUDES) \ - -I../render -I$(EXTINCSRC) + -I../render -I$(EXTINCSRC) -I$(SERVERSRC)/Xext LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln \ ../mi/llib-lmi.ln Index: xc/programs/Xserver/fb/fb.h diff -u xc/programs/Xserver/fb/fb.h:1.26 xc/programs/Xserver/fb/fb.h:1.32 --- xc/programs/Xserver/fb/fb.h:1.26 Thu Mar 29 21:15:19 2001 +++ xc/programs/Xserver/fb/fb.h Sat Oct 27 23:33:08 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.26 2001/03/30 02:15:19 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.32 2001/10/28 03:33:08 tsi Exp $ * * Copyright © 1998 Keith Packard * @@ -102,7 +102,9 @@ typedef unsigned __int64 FbBits; # else # if defined(__alpha__) || defined(__alpha) || \ - defined(ia64) || defined(__ia64__) + defined(ia64) || defined(__ia64__) || \ + defined(__sparc64__) || \ + defined(__s390x__) typedef unsigned long FbBits; # else typedef unsigned long long FbBits; @@ -456,16 +458,16 @@ #define FbLaneCase2(n,a,o) ((n) == 0x03 ? \ (*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \ fgxor) : \ - (FbLaneCase1((n)&1,a,o), \ - FbLaneCase1((n)>>1,a,(o)+1))) + ((void)FbLaneCase1((n)&1,a,o), \ + FbLaneCase1((n)>>1,a,(o)+1))) #define FbLaneCase4(n,a,o) ((n) == 0x0f ? \ (*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \ fgxor) : \ - (FbLaneCase2((n)&3,a,o), \ - FbLaneCase2((n)>>2,a,(o)+2))) -#define FbLaneCase8(n,a,o) ((n) == 0xff ? (*(FbBits *) ((a)+(o)) = fgxor) : \ - (FbLaneCase4((n)&0xf,a,o), \ - FbLaneCase4((n)>>4,a,(o)+4))) + ((void)FbLaneCase2((n)&3,a,o), \ + FbLaneCase2((n)>>2,a,(o)+2))) +#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \ + ((void)FbLaneCase4((n)&15,a,o), \ + FbLaneCase4((n)>>4,a,(o)+4))) #if FB_SHIFT == 6 #define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0) @@ -628,13 +630,21 @@ #define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate) #ifdef FB_NO_WINDOW_PIXMAPS -#define fbGetWindowPixmap(d) fbGetScreenPixmap((d)->pScreen) +#define fbGetWindowPixmap(d) fbGetScreenPixmap(((DrawablePtr) (d))->pScreen) #else #define fbGetWindowPixmap(pWin) ((PixmapPtr)\ ((WindowPtr) (pWin))->devPrivates[fbWinPrivateIndex].ptr) #endif -#define fbGetDrawable(pDrawable, pointer, stride, bpp) { \ +#if 0 +#define __fbPixOriginX(pPix) ((pPix)->drawable.x) +#define __fbPixOriginY(pPix) ((pPix)->drawable.y) +#else +#define __fbPixOriginX(pPix) 0 +#define __fbPixOriginY(pPix) 0 +#endif + +#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ PixmapPtr _pPix; \ if ((pDrawable)->type != DRAWABLE_PIXMAP) \ _pPix = fbGetWindowPixmap(pDrawable); \ @@ -643,9 +653,11 @@ (pointer) = (FbBits *) _pPix->devPrivate.ptr; \ (stride) = ((int) _pPix->devKind) / sizeof (FbBits); \ (bpp) = _pPix->drawable.bitsPerPixel; \ + (xoff) = __fbPixOriginX(_pPix); \ + (yoff) = __fbPixOriginY(_pPix); \ } -#define fbGetStipDrawable(pDrawable, pointer, stride, bpp) { \ +#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ PixmapPtr _pPix; \ if ((pDrawable)->type != DRAWABLE_PIXMAP) \ _pPix = fbGetWindowPixmap(pDrawable); \ @@ -654,6 +666,8 @@ (pointer) = (FbStip *) _pPix->devPrivate.ptr; \ (stride) = ((int) _pPix->devKind) / sizeof (FbStip); \ (bpp) = _pPix->drawable.bitsPerPixel; \ + (xoff) = __fbPixOriginX(_pPix); \ + (yoff) = __fbPixOriginY(_pPix); \ } /* @@ -1543,23 +1557,6 @@ * fbpict.c */ -#ifdef RENDER -void -fbComposite (CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height); - -#endif - Bool fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, @@ -1687,6 +1684,14 @@ fbQueryBestSize (int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen); + +#ifndef FB_OLD_SCREEN +PixmapPtr +_fbGetWindowPixmap (WindowPtr pWindow); + +void +_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap); +#endif Bool fbSetupScreen(ScreenPtr pScreen, Index: xc/programs/Xserver/fb/fb24_32.c diff -u xc/programs/Xserver/fb/fb24_32.c:1.4 xc/programs/Xserver/fb/fb24_32.c:1.5 --- xc/programs/Xserver/fb/fb24_32.c:1.4 Wed Aug 9 13:50:51 2000 +++ xc/programs/Xserver/fb/fb24_32.c Tue May 29 00:54:08 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fb24_32.c,v 1.4 2000/08/09 17:50:51 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fb24_32.c,v 1.5 2001/05/29 04:54:08 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -278,17 +278,18 @@ CARD8 *src; FbStride srcStride; int srcBpp; + int srcXoff, srcYoff; CARD8 *dst; - fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp); + fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); src = (CARD8 *) srcBits; srcStride *= sizeof (FbBits); while (nspans--) { dst = (CARD8 *) pchardstStart; - fb24_32BltUp (src + ppt->y * srcStride, srcStride, - ppt->x, + fb24_32BltUp (src + (ppt->y + srcYoff) * srcStride, srcStride, + ppt->x + srcXoff, dst, 1, @@ -321,16 +322,17 @@ CARD8 *dst, *d, *s; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; BoxPtr pbox; int n; int x1, x2; - fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp); + fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); dst = (CARD8 *) dstBits; dstStride *= sizeof (FbBits); while (nspans--) { - d = dst + ppt->y * dstStride; + d = dst + (ppt->y + dstYoff) * dstStride; s = (CARD8 *) src; n = REGION_NUM_RECTS(pClip); pbox = REGION_RECTS (pClip); @@ -352,7 +354,7 @@ (x1 - ppt->x), d, dstStride, - x1, + x1 + dstXoff, (x2 - x1), 1, @@ -385,11 +387,12 @@ CARD8 *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; int nbox; BoxPtr pbox; int x1, y1, x2, y2; - fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp); + fbGetDrawable (pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); dstStride *= sizeof(FbBits); dst = (CARD8 *) dstBits; @@ -416,9 +419,9 @@ srcStride, (x1 - x), - dst + y1 * dstStride, + dst + (y1 + dstYoff) * dstStride, dstStride, - x1, + x1 + dstXoff, (x2 - x1), (y2 - y1), @@ -442,10 +445,11 @@ CARD8 *src; FbStride srcStride; int srcBpp; + int srcXoff, srcYoff; FbStride dstStride; FbBits pm; - fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp); + fbGetDrawable (pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); src = (CARD8 *) srcBits; srcStride *= sizeof (FbBits); @@ -456,7 +460,7 @@ dstStride = PixmapBytePad(w, pDrawable->depth); if (pm != FB_ALLONES) memset (d, 0, dstStride * h); - fb24_32BltUp (src + y * srcStride, srcStride, x, + fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff, (CARD8 *) d, dstStride, 0, w, h, GXcopy, pm); } @@ -484,11 +488,13 @@ FbStride dstStride; int dstBpp; fb24_32BltFunc blt; + int srcXoff, srcYoff; + int dstXoff, dstYoff; - fbGetDrawable (pSrcDrawable, srcBits, srcStride, srcBpp); + fbGetDrawable (pSrcDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); src = (CARD8 *) srcBits; srcStride *= sizeof (FbBits); - fbGetDrawable (pDstDrawable, dstBits, dstStride, dstBpp); + fbGetDrawable (pDstDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); dst = (CARD8 *) dstBits; dstStride *= sizeof (FbBits); if (srcBpp == 24) @@ -498,13 +504,13 @@ while (nbox--) { - (*blt) (src + (pbox->y1 + dy) * srcStride, + (*blt) (src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, - (pbox->x1 + dx), + (pbox->x1 + dx + srcXoff), - dst + (pbox->y1) * dstStride, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - (pbox->x1), + (pbox->x1 + dstXoff), (pbox->x2 - pbox->x1), (pbox->y2 - pbox->y1), @@ -524,6 +530,8 @@ FbStride oldStride, newStride; int oldBpp, newBpp; fb24_32BltFunc blt; + int oldXoff, oldYoff; + int newXoff, newYoff; pNewTile = fbCreatePixmapBpp (pScreen, pOldTile->drawable.width, @@ -533,9 +541,9 @@ if (!pNewTile) return 0; fbGetDrawable (&pOldTile->drawable, - old, oldStride, oldBpp); + old, oldStride, oldBpp, oldXoff, oldYoff); fbGetDrawable (&pNewTile->drawable, - new, newStride, newBpp); + new, newStride, newBpp, newXoff, newYoff); if (oldBpp == 24) blt = fb24_32BltUp; else Index: xc/programs/Xserver/fb/fbarc.c diff -u xc/programs/Xserver/fb/fbarc.c:1.5 xc/programs/Xserver/fb/fbarc.c:1.6 --- xc/programs/Xserver/fb/fbarc.c:1.5 Thu Apr 6 11:27:24 2000 +++ xc/programs/Xserver/fb/fbarc.c Tue May 29 00:54:08 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbarc.c,v 1.5 2000/04/06 15:27:24 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbarc.c,v 1.6 2001/05/29 04:54:08 keithp Exp $ */ #include "fb.h" #include "mizerarc.h" @@ -68,12 +68,13 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; BoxRec box; int x2, y2; RegionPtr cclip; cclip = fbGetCompositeClip (pGC); - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (narcs--) { if (miCanZeroArc (parcs)) @@ -98,7 +99,7 @@ if ( (x2 <= MAXSHORT) && (y2 <= MAXSHORT) && (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) ) (*arc) (dst, dstStride, dstBpp, - parcs, pDrawable->x, pDrawable->y, + parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff, pPriv->and, pPriv->xor); else miZeroPolyArc(pDrawable, pGC, 1, parcs); Index: xc/programs/Xserver/fb/fbbits.h diff -u xc/programs/Xserver/fb/fbbits.h:1.10 xc/programs/Xserver/fb/fbbits.h:1.13 --- xc/programs/Xserver/fb/fbbits.h:1.10 Sun Mar 18 03:35:30 2001 +++ xc/programs/Xserver/fb/fbbits.h Sun Nov 18 00:00:25 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.10 2001/03/18 08:35:30 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbbits.h,v 1.13 2001/11/18 05:00:25 torrey Exp $ */ /* * This file defines functions for drawing some primitives using @@ -83,14 +83,15 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); UNIT *bits; FbStride bitsStride; FbStride majorStep, minorStep; BITS xor = (BITS) pPriv->xor; - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); - bits = ((UNIT *) (dst + (y1 * dstStride))) + x1 * MUL; + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + bits = ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff) * MUL; bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); if (signdy < 0) bitsStride = -bitsStride; @@ -136,6 +137,7 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); UNIT *bits; FbStride bitsStride; @@ -146,14 +148,14 @@ Bool even; Bool doOdd; - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); doOdd = pGC->lineStyle == LineDoubleDash; xorfg = (BITS) pPriv->xor; xorbg = (BITS) pPriv->bgxor; FbDashInit (pGC, pPriv, dashOffset, dashlen, even); - bits = ((UNIT *) (dst + (y1 * dstStride))) + x1 * MUL; + bits = ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff) * MUL; bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); if (signdy < 0) bitsStride = -bitsStride; @@ -281,14 +283,11 @@ BITS band = (BITS) and; FbStride bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); INT32 ul, lr; - INT32 off; INT32 pt; - off = coordToInt(xoff,yoff); - off -= (off & 0x8000) << 1; - ul = *((int *) &pBox->x1) - off; - lr = *((int *) &pBox->x2) - off - 0x00010001; - + ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); + lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); + bits += bitsStride * yoff + xoff * MUL; if (and == 0) @@ -669,6 +668,7 @@ FbBits *dst; int dstStride; int dstBpp; + int dstXoff, dstYoff; UNIT *bits, *bitsBase; FbStride bitsStride; @@ -677,7 +677,6 @@ int dashoffset = 0; INT32 ul, lr; - INT32 off; INT32 pt1, pt2; int e, e1, e3, len; @@ -687,14 +686,12 @@ if (mode == CoordModePrevious) fbFixCoordModePrevious (npt, ptsOrig); - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); - bitsBase = ((UNIT *) dst) + yoff * bitsStride + xoff * MUL; - off = coordToInt(xoff,yoff); - off -= (off & 0x8000) << 1; - ul = *((int *) &pBox->x1) - off; - lr = *((int *) &pBox->x2) - off - 0x00010001; - + bitsBase = ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff) * MUL; + ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); + lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); + pt1 = *pts++; npt--; pt2 = *pts++; @@ -803,6 +800,7 @@ FbBits *dst; int dstStride; int dstBpp; + int dstXoff, dstYoff; UNIT *bits, *bitsBase; FbStride bitsStride; @@ -813,7 +811,6 @@ int dashoffset = 0; INT32 ul, lr; - INT32 off; INT32 pt1, pt2; int e, e1, e3, len; @@ -821,14 +818,12 @@ int octant; Bool capNotLast; - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); bitsStride = dstStride * (sizeof (FbBits) / sizeof (UNIT)); - bitsBase = ((UNIT *) dst) + yoff * bitsStride + xoff * MUL; - off = coordToInt(xoff,yoff); - off -= (off & 0x8000) << 1; - ul = *((int *) &pBox->x1) - off; - lr = *((int *) &pBox->x2) - off - 0x00010001; - + bitsBase = ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff) * MUL; + ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); + lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); + bits += bitsStride * yoff + xoff * MUL; capNotLast = pGC->capStyle == CapNotLast; @@ -876,10 +871,10 @@ if (!capNotLast) x2++; } - dstX = (x1 + xoff) * (sizeof (UNIT) * 8 * MUL); + dstX = (x1 + xoff + dstXoff) * (sizeof (UNIT) * 8 * MUL); width = (x2 - x1) * (sizeof (UNIT) * 8 * MUL); - dstLine = dst + (intToY(pt1) + yoff) * dstStride; + dstLine = dst + (intToY(pt1) + yoff + dstYoff) * dstStride; dstLine += dstX >> FB_SHIFT; dstX &= FB_MASK; FbMaskBits (dstX, width, startmask, nmiddle, endmask); Index: xc/programs/Xserver/fb/fbbltone.c diff -u xc/programs/Xserver/fb/fbbltone.c:1.10 xc/programs/Xserver/fb/fbbltone.c:1.12 --- xc/programs/Xserver/fb/fbbltone.c:1.10 Fri Sep 22 01:58:01 2000 +++ xc/programs/Xserver/fb/fbbltone.c Sat Oct 27 23:33:08 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbbltone.c,v 1.10 2000/09/22 05:58:01 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbbltone.c,v 1.12 2001/10/28 03:33:08 tsi Exp $ */ #include "fb.h" @@ -58,15 +58,15 @@ #ifndef FBNOPIXADDR -#define LaneCases1(n,a) case n: FbLaneCase(n,a); break; -#define LaneCases2(n,a) LaneCases1(n,a) LaneCases1(n+1,a) -#define LaneCases4(n,a) LaneCases2(n,a) LaneCases2(n+2,a) -#define LaneCases8(n,a) LaneCases4(n,a) LaneCases4(n+4,a) -#define LaneCases16(n,a) LaneCases8(n,a) LaneCases8(n+8,a) -#define LaneCases32(n,a) LaneCases16(n,a) LaneCases16(n+16,a) -#define LaneCases64(n,a) LaneCases32(n,a) LaneCases32(n+32,a) -#define LaneCases128(n,a) LaneCases64(n,a) LaneCases64(n+64,a) -#define LaneCases256(n,a) LaneCases128(n,a) LaneCases128(n+128,a) +#define LaneCases1(n,a) case n: (void)FbLaneCase(n,a); break +#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a) +#define LaneCases4(n,a) LaneCases2(n,a); LaneCases2(n+2,a) +#define LaneCases8(n,a) LaneCases4(n,a); LaneCases4(n+4,a) +#define LaneCases16(n,a) LaneCases8(n,a); LaneCases8(n+8,a) +#define LaneCases32(n,a) LaneCases16(n,a); LaneCases16(n+16,a) +#define LaneCases64(n,a) LaneCases32(n,a); LaneCases32(n+32,a) +#define LaneCases128(n,a) LaneCases64(n,a); LaneCases64(n+64,a) +#define LaneCases256(n,a) LaneCases128(n,a); LaneCases128(n+128,a) #if FB_SHIFT == 6 #define LaneCases(a) LaneCases256(0,a) @@ -151,7 +151,7 @@ int unitsPerSrc; /* src patterns per FbStip */ int leftShift, rightShift; /* align source with dest */ FbBits startmask, endmask; /* dest scanline masks */ - FbStip bits, bitsLeft, bitsRight; /* source bits */ + FbStip bits=0, bitsLeft, bitsRight;/* source bits */ FbStip left; FbBits mask; int nDst; /* dest longwords (w.o. end) */ @@ -161,7 +161,7 @@ Bool copy; /* accelerate dest-invariant */ Bool transparent; /* accelerate 0 nop */ int srcinc; /* source units consumed */ - Bool endNeedsLoad; /* need load for endmask */ + Bool endNeedsLoad = FALSE; /* need load for endmask */ #ifndef FBNOPIXADDR CARD8 *fbLane; #endif @@ -753,7 +753,7 @@ FbBits pm; FbBits srcMask; FbBits srcMaskFirst; - FbBits srcMask0; + FbBits srcMask0 = 0; FbBits srcBits; FbStip dstBits; Index: xc/programs/Xserver/fb/fbcmap.c diff -u xc/programs/Xserver/fb/fbcmap.c:1.5 xc/programs/Xserver/fb/fbcmap.c:1.6 --- xc/programs/Xserver/fb/fbcmap.c:1.5 Tue Sep 19 20:09:13 2000 +++ xc/programs/Xserver/fb/fbcmap.c Sat Oct 27 23:33:08 2001 @@ -1,5 +1,5 @@ /* $XConsortium: fbcmap.c,v 4.19 94/04/17 20:28:46 dpw Exp $ */ -/* $XFree86: xc/programs/Xserver/fb/fbcmap.c,v 1.5 2000/09/20 00:09:13 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbcmap.c,v 1.6 2001/10/28 03:33:08 tsi Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -215,7 +215,6 @@ xColorItem *indefs, xColorItem *outdefs) { - int minred, mingreen, minblue; register int red, green, blue; int maxred, maxgreen, maxblue; int stepred, stepgreen, stepblue; @@ -404,7 +403,7 @@ new->greenMask = greenMask; new->blueMask = blueMask; new->count = popCount (visuals); - for (prev = &fbVisuals; v = *prev; prev = &v->next); + for (prev = &fbVisuals; (v = *prev); prev = &v->next); *prev = new; return TRUE; } @@ -423,8 +422,8 @@ Bool fbSetVisualTypes (int depth, int visuals, int bitsPerRGB) { - fbSetVisualTypesAndMasks (depth, visuals, bitsPerRGB, - _RM(depth), _GM(depth), _BM(depth)); + return fbSetVisualTypesAndMasks (depth, visuals, bitsPerRGB, + _RM(depth), _GM(depth), _BM(depth)); } /* @@ -443,7 +442,7 @@ unsigned long sizes, int bitsPerRGB) { - int i, j, k; + int i, j = 0, k; VisualPtr visual; DepthPtr depth; VisualID *vid; @@ -452,7 +451,6 @@ int ndepth, nvisual; int nvtype; int vtype; - VisualID defaultVisual; fbVisualsPtr visuals, nextVisuals; /* none specified, we'll guess from pixmap formats */ Index: xc/programs/Xserver/fb/fbcompose.c diff -u xc/programs/Xserver/fb/fbcompose.c:1.5 xc/programs/Xserver/fb/fbcompose.c:1.13 --- xc/programs/Xserver/fb/fbcompose.c:1.5 Mon Nov 20 02:13:07 2000 +++ xc/programs/Xserver/fb/fbcompose.c Sat Oct 27 23:33:08 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.5 2000/11/20 07:13:07 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.13 2001/10/28 03:33:08 tsi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -35,11 +35,6 @@ * and storing these exist for each format. */ -typedef struct _fbCompSrc { - CARD32 value; - CARD32 alpha; -} FbCompSrc; - /* * Combine src and mask using IN */ @@ -54,13 +49,13 @@ CARD32 m,n,o,p; if (!msk) - return (*src->fetch) (src->line, src->offset); + return (*src->fetch) (src); - a = (*msk->fetch) (msk->line, msk->offset) >> 24; + a = (*msk->fetch) (msk) >> 24; if (!a) return 0; - x = (*src->fetch) (src->line, src->offset); + x = (*src->fetch) (src); if (a == 0xff) return x; @@ -84,7 +79,7 @@ if (!msk) { - x = (*src->fetch) (src->line, src->offset); + x = (*src->fetch) (src); s.value = x; x = x >> 24; x |= x << 8; @@ -93,7 +88,7 @@ return s; } - a = (*msk->fetcha) (msk->line, msk->offset); + a = (*msk->fetcha) (msk); if (!a) { s.value = 0; @@ -101,7 +96,7 @@ return s; } - x = (*src->fetch) (src->line, src->offset); + x = (*src->fetch) (src); if (a == 0xffffffff) { s.value = x; @@ -132,20 +127,19 @@ { CARD32 x; CARD32 a; - CARD16 xa; CARD16 t; CARD32 m,n,o,p; if (!msk) { - return (*src->fetch) (src->line, src->offset); + return (*src->fetch) (src); } - a = (*msk->fetcha) (msk->line, msk->offset); + a = (*msk->fetcha) (msk); if (!a) return a; - x = (*src->fetch) (src->line, src->offset); + x = (*src->fetch) (src); if (a == 0xffffffff) return x; @@ -168,13 +162,13 @@ CARD16 t; if (!msk) - return (*src->fetch) (src->line, src->offset); + return (*src->fetch) (src); - a = (*msk->fetch) (msk->line, msk->offset) >> 24; + a = (*msk->fetch) (msk) >> 24; if (!a) return 0; - x = (*src->fetch) (src->line, src->offset); + x = (*src->fetch) (src); if (a == 0xff) return x; @@ -187,18 +181,17 @@ { CARD32 x; CARD32 a; - CARD16 xa; CARD16 t; CARD32 m,n,o,p; if (!msk) - return (*src->fetch) (src->line, src->offset); + return (*src->fetch) (src); - a = (*msk->fetcha) (msk->line, msk->offset); + a = (*msk->fetcha) (msk); if (!a) return 0; - x = (*src->fetcha) (src->line, src->offset); + x = (*src->fetcha) (src); if (a == 0xffffffff) return x; @@ -217,7 +210,7 @@ FbCompositeOperand *msk, FbCompositeOperand *dst) { - (*dst->store) (dst->line, dst->offset, 0); + (*dst->store) (dst, 0); } void @@ -225,7 +218,7 @@ FbCompositeOperand *msk, FbCompositeOperand *dst) { - (*dst->store) (dst->line, dst->offset, fbCombineMaskU (src, msk)); + (*dst->store) (dst, fbCombineMaskU (src, msk)); } void @@ -233,7 +226,7 @@ FbCompositeOperand *msk, FbCompositeOperand *dst) { - (*dst->store) (dst->line, dst->offset, fbCombineMaskValueC (src, msk)); + (*dst->store) (dst, fbCombineMaskValueC (src, msk)); } void @@ -260,14 +253,14 @@ { if (a) { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); m = FbOverU(s,d,0,a,t); n = FbOverU(s,d,8,a,t); o = FbOverU(s,d,16,a,t); p = FbOverU(s,d,24,a,t); s = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } } @@ -289,14 +282,14 @@ { if (a) { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); m = FbOverC(s,d,0,a,t); n = FbOverC(s,d,8,a,t); o = FbOverC(s,d,16,a,t); p = FbOverC(s,d,24,a,t); s = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } } @@ -310,7 +303,7 @@ CARD16 t; CARD32 m,n,o,p; - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); a = ~d >> 24; if (a) { @@ -323,7 +316,7 @@ p = FbOverU(d,s,24,a,t); s = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } } @@ -337,7 +330,7 @@ CARD16 t; CARD32 m,n,o,p; - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); a = ~d >> 24; if (a) { @@ -350,7 +343,7 @@ p = FbOverU(d,s,24,a,t); s = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } } @@ -364,7 +357,7 @@ CARD16 t; CARD32 m,n,o,p; - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); a = d >> 24; s = 0; if (a) @@ -379,7 +372,7 @@ s = m|n|o|p; } } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } void @@ -392,7 +385,7 @@ CARD16 t; CARD32 m,n,o,p; - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); a = d >> 24; s = 0; if (a) @@ -407,7 +400,7 @@ s = m|n|o|p; } } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } void @@ -427,14 +420,14 @@ d = 0; if (a) { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); m = FbInU(d,0,a,t); n = FbInU(d,8,a,t); o = FbInU(d,16,a,t); p = FbInU(d,24,a,t); d = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, d); + (*dst->store) (dst, d); } } @@ -455,14 +448,14 @@ d = 0; if (a) { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); m = FbInC(d,0,a,t); n = FbInC(d,8,a,t); o = FbInC(d,16,a,t); p = FbInC(d,24,a,t); d = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, d); + (*dst->store) (dst, d); } } @@ -476,7 +469,7 @@ CARD16 t; CARD32 m,n,o,p; - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); a = ~d >> 24; s = 0; if (a) @@ -491,7 +484,7 @@ s = m|n|o|p; } } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } void @@ -504,7 +497,7 @@ CARD16 t; CARD32 m,n,o,p; - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); a = ~d >> 24; s = 0; if (a) @@ -519,7 +512,7 @@ s = m|n|o|p; } } - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); } void @@ -539,14 +532,14 @@ d = 0; if (a) { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); m = FbInU(d,0,a,t); n = FbInU(d,8,a,t); o = FbInU(d,16,a,t); p = FbInU(d,24,a,t); d = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, d); + (*dst->store) (dst, d); } } @@ -567,14 +560,14 @@ d = 0; if (a) { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); m = FbInC(d,0,a,t); n = FbInC(d,8,a,t); o = FbInC(d,16,a,t); p = FbInC(d,24,a,t); d = m|n|o|p; } - (*dst->store) (dst->line, dst->offset, d); + (*dst->store) (dst, d); } } @@ -585,18 +578,18 @@ { CARD32 s, d; CARD16 ad, as; - CARD16 t; + CARD16 t,u,v; CARD32 m,n,o,p; s = fbCombineMaskU (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); ad = ~s >> 24; as = d >> 24; - m = FbGen(s,d,0,as,ad,t); - n = FbGen(s,d,8,as,ad,t); - o = FbGen(s,d,16,as,ad,t); - p = FbGen(s,d,24,as,ad,t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + m = FbGen(s,d,0,as,ad,t,u,v); + n = FbGen(s,d,8,as,ad,t,u,v); + o = FbGen(s,d,16,as,ad,t,u,v); + p = FbGen(s,d,24,as,ad,t,u,v); + (*dst->store) (dst, m|n|o|p); } void @@ -608,19 +601,19 @@ CARD32 s, d; CARD32 ad; CARD16 as; - CARD16 t; + CARD16 t, u, v; CARD32 m,n,o,p; cs = fbCombineMaskC (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); s = cs.value; ad = cs.alpha; as = d >> 24; - m = FbGen(s,d,0,as,FbGet8(ad,0),t); - n = FbGen(s,d,8,as,FbGet8(ad,8),t); - o = FbGen(s,d,16,as,FbGet8(ad,16),t); - p = FbGen(s,d,24,as,FbGet8(ad,24),t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + m = FbGen(s,d,0,as,FbGet8(ad,0),t,u,v); + n = FbGen(s,d,8,as,FbGet8(ad,8),t,u,v); + o = FbGen(s,d,16,as,FbGet8(ad,16),t,u,v); + p = FbGen(s,d,24,as,FbGet8(ad,24),t,u,v); + (*dst->store) (dst, m|n|o|p); } void @@ -630,18 +623,18 @@ { CARD32 s, d; CARD16 ad, as; - CARD16 t; + CARD16 t, u, v; CARD32 m,n,o,p; s = fbCombineMaskU (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); ad = s >> 24; as = ~d >> 24; - m = FbGen(s,d,0,as,ad,t); - n = FbGen(s,d,8,as,ad,t); - o = FbGen(s,d,16,as,ad,t); - p = FbGen(s,d,24,as,ad,t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + m = FbGen(s,d,0,as,ad,t,u,v); + n = FbGen(s,d,8,as,ad,t,u,v); + o = FbGen(s,d,16,as,ad,t,u,v); + p = FbGen(s,d,24,as,ad,t,u,v); + (*dst->store) (dst, m|n|o|p); } void @@ -652,19 +645,19 @@ FbCompSrc cs; CARD32 s, d, ad; CARD16 as; - CARD16 t; + CARD16 t, u, v; CARD32 m,n,o,p; cs = fbCombineMaskC (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); s = cs.value; ad = cs.alpha; as = ~d >> 24; - m = FbGen(s,d,0,as,FbGet8(ad,0),t); - n = FbGen(s,d,8,as,FbGet8(ad,8),t); - o = FbGen(s,d,16,as,FbGet8(ad,16),t); - p = FbGen(s,d,24,as,FbGet8(ad,24),t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + m = FbGen(s,d,0,as,FbGet8(ad,0),t,u,v); + n = FbGen(s,d,8,as,FbGet8(ad,8),t,u,v); + o = FbGen(s,d,16,as,FbGet8(ad,16),t,u,v); + p = FbGen(s,d,24,as,FbGet8(ad,24),t,u,v); + (*dst->store) (dst, m|n|o|p); } void @@ -674,18 +667,18 @@ { CARD32 s, d; CARD16 ad, as; - CARD16 t; + CARD16 t, u, v; CARD32 m,n,o,p; s = fbCombineMaskU (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); ad = ~s >> 24; as = ~d >> 24; - m = FbGen(s,d,0,as,ad,t); - n = FbGen(s,d,8,as,ad,t); - o = FbGen(s,d,16,as,ad,t); - p = FbGen(s,d,24,as,ad,t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + m = FbGen(s,d,0,as,ad,t,u,v); + n = FbGen(s,d,8,as,ad,t,u,v); + o = FbGen(s,d,16,as,ad,t,u,v); + p = FbGen(s,d,24,as,ad,t,u,v); + (*dst->store) (dst, m|n|o|p); } void @@ -696,19 +689,19 @@ FbCompSrc cs; CARD32 s, d, ad; CARD16 as; - CARD16 t; + CARD16 t, u, v; CARD32 m,n,o,p; cs = fbCombineMaskC (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); s = cs.value; ad = ~cs.alpha; as = ~d >> 24; - m = FbGen(s,d,0,as,ad,t); - n = FbGen(s,d,8,as,ad,t); - o = FbGen(s,d,16,as,ad,t); - p = FbGen(s,d,24,as,ad,t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + m = FbGen(s,d,0,as,ad,t,u,v); + n = FbGen(s,d,8,as,ad,t,u,v); + o = FbGen(s,d,16,as,ad,t,u,v); + p = FbGen(s,d,24,as,ad,t,u,v); + (*dst->store) (dst, m|n|o|p); } void @@ -722,17 +715,17 @@ s = fbCombineMaskU (src, msk); if (s == ~0) - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); else { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); if (s && d != ~0) { m = FbAdd(s,d,0,t); n = FbAdd(s,d,8,t); o = FbAdd(s,d,16,t); p = FbAdd(s,d,24,t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + (*dst->store) (dst, m|n|o|p); } } } @@ -748,17 +741,17 @@ s = fbCombineMaskValueC (src, msk); if (s == ~0) - (*dst->store) (dst->line, dst->offset, s); + (*dst->store) (dst, s); else { - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); if (s && d != ~0) { m = FbAdd(s,d,0,t); n = FbAdd(s,d,8,t); o = FbAdd(s,d,16,t); p = FbAdd(s,d,24,t); - (*dst->store) (dst->line, dst->offset, m|n|o|p); + (*dst->store) (dst, m|n|o|p); } } } @@ -768,14 +761,14 @@ FbCompositeOperand *msk, FbCompositeOperand *dst) { - CARD32 s, d; + CARD32 s = fbCombineMaskU (src, msk), d; +#if 0 CARD16 sa, da; CARD16 ad, as; CARD16 t; CARD32 m,n,o,p; - s = fbCombineMaskU (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); sa = s >> 24; da = ~d >> 24; if (sa <= da) @@ -789,12 +782,22 @@ { as = (da << 8) / sa; ad = 0xff; - m = FbGen(s,d,0,as,ad,t); - n = FbGen(s,d,8,as,ad,t); - o = FbGen(s,d,16,as,ad,t); - p = FbGen(s,d,24,as,ad,t); + m = FbGen(s,d,0,as,ad,t,u,v); + n = FbGen(s,d,8,as,ad,t,u,v); + o = FbGen(s,d,16,as,ad,t,u,v); + p = FbGen(s,d,24,as,ad,t,u,v); } - (*dst->store) (dst->line, dst->offset, m|n|o|p); + (*dst->store) (dst, m|n|o|p); +#else + if ((s >> 24) == 0xff) + (*dst->store) (dst, s); + else + { + d = (*dst->fetch) (dst); + if ((s >> 24) > (d >> 24)) + (*dst->store) (dst, s); + } +#endif } void @@ -805,12 +808,11 @@ FbCompSrc cs; CARD32 s, d; CARD16 sa, sr, sg, sb, da; - CARD16 ad, as; - CARD16 t; + CARD16 t, u, v; CARD32 m,n,o,p; cs = fbCombineMaskC (src, msk); - d = (*dst->fetch) (dst->line, dst->offset); + d = (*dst->fetch) (dst); s = cs.value; sa = (cs.alpha >> 24) & 0xff; sr = (cs.alpha >> 16) & 0xff; @@ -821,26 +823,687 @@ if (sb <= da) m = FbAdd(s,d,0,t); else - m = FbGen (s, d, 0, (da << 8) / sb, 0xff, t); + m = FbGen (s, d, 0, (da << 8) / sb, 0xff, t, u, v); if (sg <= da) n = FbAdd(s,d,8,t); else - n = FbGen (s, d, 8, (da << 8) / sg, 0xff, t); + n = FbGen (s, d, 8, (da << 8) / sg, 0xff, t, u, v); if (sr < da) o = FbAdd(s,d,16,t); else - o = FbGen (s, d, 16, (da << 8) / sr, 0xff, t); + o = FbGen (s, d, 16, (da << 8) / sr, 0xff, t, u, v); if (sa <= da) p = FbAdd(s,d,24,t); else - p = FbGen (s, d, 24, (da << 8) / sa, 0xff, t); + p = FbGen (s, d, 24, (da << 8) / sa, 0xff, t, u, v); + + (*dst->store) (dst, m|n|o|p); +} + +/* + * All of the disjoint composing functions + + The four entries in the first column indicate what source contributions + come from each of the four areas of the picture -- areas covered by neither + A nor B, areas covered only by A, areas covered only by B and finally + areas covered by both A and B. + + Disjoint Conjoint + Fa Fb Fa Fb +(0,0,0,0) 0 0 0 0 +(0,A,0,A) 1 0 1 0 +(0,0,B,B) 0 1 0 1 +(0,A,B,A) 1 min((1-a)/b,1) 1 max(1-a/b,0) +(0,A,B,B) min((1-b)/a,1) 1 max(1-b/a,0) 1 +(0,0,0,A) max(1-(1-b)/a,0) 0 min(1,b/a) 0 +(0,0,0,B) 0 max(1-(1-a)/b,0) 0 min(a/b,1) +(0,A,0,0) min(1,(1-b)/a) 0 max(1-b/a,0) 0 +(0,0,B,0) 0 min(1,(1-a)/b) 0 max(1-a/b,0) +(0,0,B,A) max(1-(1-b)/a,0) min(1,(1-a)/b) min(1,b/a) max(1-a/b,0) +(0,A,0,B) min(1,(1-b)/a) max(1-(1-a)/b,0) max(1-b/a,0) min(1,a/b) +(0,A,B,0) min(1,(1-b)/a) min(1,(1-a)/b) max(1-b/a,0) max(1-a/b,0) + + */ + +#define CombineAOut 1 +#define CombineAIn 2 +#define CombineBOut 4 +#define CombineBIn 8 + +#define CombineClear 0 +#define CombineA (CombineAOut|CombineAIn) +#define CombineB (CombineBOut|CombineBIn) +#define CombineAOver (CombineAOut|CombineBOut|CombineAIn) +#define CombineBOver (CombineAOut|CombineBOut|CombineBIn) +#define CombineAAtop (CombineBOut|CombineAIn) +#define CombineBAtop (CombineAOut|CombineBIn) +#define CombineXor (CombineAOut|CombineBOut) + +/* portion covered by a but not b */ +CARD8 +fbCombineDisjointOutPart (CARD8 a, CARD8 b) +{ + /* min (1, (1-b) / a) */ + + b = ~b; /* 1 - b */ + if (b >= a) /* 1 - b >= a -> (1-b)/a >= 1 */ + return 0xff; /* 1 */ + return FbIntDiv(b,a); /* (1-b) / a */ +} + +/* portion covered by both a and b */ +CARD8 +fbCombineDisjointInPart (CARD8 a, CARD8 b) +{ + /* max (1-(1-b)/a,0) */ + /* = - min ((1-b)/a - 1, 0) */ + /* = 1 - min (1, (1-b)/a) */ + + b = ~b; /* 1 - b */ + if (b >= a) /* 1 - b >= a -> (1-b)/a >= 1 */ + return 0; /* 1 - 1 */ + return ~FbIntDiv(b,a); /* 1 - (1-b) / a */ +} + +void +fbCombineDisjointGeneralU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine) +{ + CARD32 s, d; + CARD32 m,n,o,p; + CARD16 Fa, Fb, t, u, v; + CARD8 sa, da; + + s = fbCombineMaskU (src, msk); + sa = s >> 24; + + d = (*dst->fetch) (dst); + da = d >> 24; + + switch (combine & CombineA) { + default: + Fa = 0; + break; + case CombineAOut: + Fa = fbCombineDisjointOutPart (sa, da); + break; + case CombineAIn: + Fa = fbCombineDisjointInPart (sa, da); + break; + case CombineA: + Fa = 0xff; + break; + } + + switch (combine & CombineB) { + default: + Fb = 0; + break; + case CombineBOut: + Fb = fbCombineDisjointOutPart (da, sa); + break; + case CombineBIn: + Fb = fbCombineDisjointInPart (da, sa); + break; + case CombineB: + Fb = 0xff; + break; + } + m = FbGen (s,d,0,Fa,Fb,t,u,v); + n = FbGen (s,d,8,Fa,Fb,t,u,v); + o = FbGen (s,d,16,Fa,Fb,t,u,v); + p = FbGen (s,d,24,Fa,Fb,t,u,v); + s = m|n|o|p; + (*dst->store) (dst, s); +} + +void +fbCombineDisjointGeneralC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine) +{ + FbCompSrc cs; + CARD32 s, d; + CARD32 m,n,o,p; + CARD32 Fa; + CARD16 Fb, t, u, v; + CARD32 sa; + CARD8 da; + + cs = fbCombineMaskC (src, msk); + s = cs.value; + sa = cs.alpha; + + d = (*dst->fetch) (dst); + da = d >> 24; + + switch (combine & CombineA) { + default: + Fa = 0; + break; + case CombineAOut: + m = fbCombineDisjointOutPart ((CARD8) (sa >> 0), da); + n = fbCombineDisjointOutPart ((CARD8) (sa >> 8), da) << 8; + o = fbCombineDisjointOutPart ((CARD8) (sa >> 16), da) << 16; + p = fbCombineDisjointOutPart ((CARD8) (sa >> 24), da) << 24; + Fa = m|n|o|p; + break; + case CombineAIn: + m = fbCombineDisjointOutPart ((CARD8) (sa >> 0), da); + n = fbCombineDisjointOutPart ((CARD8) (sa >> 8), da) << 8; + o = fbCombineDisjointOutPart ((CARD8) (sa >> 16), da) << 16; + p = fbCombineDisjointOutPart ((CARD8) (sa >> 24), da) << 24; + Fa = m|n|o|p; + break; + case CombineA: + Fa = 0xffffffff; + break; + } + + switch (combine & CombineB) { + default: + Fb = 0; + break; + case CombineBOut: + Fb = fbCombineDisjointOutPart (da, sa); + break; + case CombineBIn: + Fb = fbCombineDisjointInPart (da, sa); + break; + case CombineB: + Fb = 0xff; + break; + } + m = FbGen (s,d,0,FbGet8(Fa,0),Fb,t,u,v); + n = FbGen (s,d,8,FbGet8(Fa,8),Fb,t,u,v); + o = FbGen (s,d,16,FbGet8(Fa,16),Fb,t,u,v); + p = FbGen (s,d,24,FbGet8(Fa,24),Fb,t,u,v); + s = m|n|o|p; + (*dst->store) (dst, s); +} + +void +fbCombineDisjointOverU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + CARD32 s, d; + CARD16 a; + CARD16 t; + CARD32 m,n,o,p; + + s = fbCombineMaskU (src, msk); + a = s >> 24; + if (a != 0x00) + { + if (a != 0xff) + { + d = (*dst->fetch) (dst); + a = fbCombineDisjointOutPart (d >> 24, a); + m = FbOverU(s,d,0,a,t); + n = FbOverU(s,d,8,a,t); + o = FbOverU(s,d,16,a,t); + p = FbOverU(s,d,24,a,t); + s = m|n|o|p; + } + (*dst->store) (dst, s); + } +} + +void +fbCombineDisjointOverC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineAOver); +} + +void +fbCombineDisjointOverReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineBOver); +} + +void +fbCombineDisjointOverReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineBOver); +} + +void +fbCombineDisjointInU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineAIn); +} + +void +fbCombineDisjointInC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineAIn); +} + +void +fbCombineDisjointInReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineBIn); +} + +void +fbCombineDisjointInReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineBIn); +} + +void +fbCombineDisjointOutU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineAOut); +} + +void +fbCombineDisjointOutC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineAOut); +} + +void +fbCombineDisjointOutReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineBOut); +} + +void +fbCombineDisjointOutReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineBOut); +} + +void +fbCombineDisjointAtopU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineAAtop); +} + +void +fbCombineDisjointAtopC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineAAtop); +} + +void +fbCombineDisjointAtopReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineBAtop); +} + +void +fbCombineDisjointAtopReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineBAtop); +} + +void +fbCombineDisjointXorU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralU (src, msk, dst, CombineXor); +} + +void +fbCombineDisjointXorC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineDisjointGeneralC (src, msk, dst, CombineXor); +} + +/* portion covered by a but not b */ +CARD8 +fbCombineConjointOutPart (CARD8 a, CARD8 b) +{ + /* max (1-b/a,0) */ + /* = 1-min(b/a,1) */ - (*dst->store) (dst->line, dst->offset, m|n|o|p); + /* min (1, (1-b) / a) */ + + if (b >= a) /* b >= a -> b/a >= 1 */ + return 0x00; /* 0 */ + return ~FbIntDiv(b,a); /* 1 - b/a */ +} + +/* portion covered by both a and b */ +CARD8 +fbCombineConjointInPart (CARD8 a, CARD8 b) +{ + /* min (1,b/a) */ + + if (b >= a) /* b >= a -> b/a >= 1 */ + return 0xff; /* 1 */ + return FbIntDiv(b,a); /* b/a */ +} + +void +fbCombineConjointGeneralU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine) +{ + CARD32 s, d; + CARD32 m,n,o,p; + CARD16 Fa, Fb, t, u, v; + CARD8 sa, da; + + s = fbCombineMaskU (src, msk); + sa = s >> 24; + + d = (*dst->fetch) (dst); + da = d >> 24; + + switch (combine & CombineA) { + default: + Fa = 0; + break; + case CombineAOut: + Fa = fbCombineConjointOutPart (sa, da); + break; + case CombineAIn: + Fa = fbCombineConjointInPart (sa, da); + break; + case CombineA: + Fa = 0xff; + break; + } + + switch (combine & CombineB) { + default: + Fb = 0; + break; + case CombineBOut: + Fb = fbCombineConjointOutPart (da, sa); + break; + case CombineBIn: + Fb = fbCombineConjointInPart (da, sa); + break; + case CombineB: + Fb = 0xff; + break; + } + m = FbGen (s,d,0,Fa,Fb,t,u,v); + n = FbGen (s,d,8,Fa,Fb,t,u,v); + o = FbGen (s,d,16,Fa,Fb,t,u,v); + p = FbGen (s,d,24,Fa,Fb,t,u,v); + s = m|n|o|p; + (*dst->store) (dst, s); +} + +void +fbCombineConjointGeneralC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst, + CARD8 combine) +{ + FbCompSrc cs; + CARD32 s, d; + CARD32 m,n,o,p; + CARD32 Fa; + CARD16 Fb, t, u, v; + CARD32 sa; + CARD8 da; + + cs = fbCombineMaskC (src, msk); + s = cs.value; + sa = cs.alpha; + + d = (*dst->fetch) (dst); + da = d >> 24; + + switch (combine & CombineA) { + default: + Fa = 0; + break; + case CombineAOut: + m = fbCombineConjointOutPart ((CARD8) (sa >> 0), da); + n = fbCombineConjointOutPart ((CARD8) (sa >> 8), da) << 8; + o = fbCombineConjointOutPart ((CARD8) (sa >> 16), da) << 16; + p = fbCombineConjointOutPart ((CARD8) (sa >> 24), da) << 24; + Fa = m|n|o|p; + break; + case CombineAIn: + m = fbCombineConjointOutPart ((CARD8) (sa >> 0), da); + n = fbCombineConjointOutPart ((CARD8) (sa >> 8), da) << 8; + o = fbCombineConjointOutPart ((CARD8) (sa >> 16), da) << 16; + p = fbCombineConjointOutPart ((CARD8) (sa >> 24), da) << 24; + Fa = m|n|o|p; + break; + case CombineA: + Fa = 0xffffffff; + break; + } + + switch (combine & CombineB) { + default: + Fb = 0; + break; + case CombineBOut: + Fb = fbCombineConjointOutPart (da, sa); + break; + case CombineBIn: + Fb = fbCombineConjointInPart (da, sa); + break; + case CombineB: + Fb = 0xff; + break; + } + m = FbGen (s,d,0,FbGet8(Fa,0),Fb,t,u,v); + n = FbGen (s,d,8,FbGet8(Fa,8),Fb,t,u,v); + o = FbGen (s,d,16,FbGet8(Fa,16),Fb,t,u,v); + p = FbGen (s,d,24,FbGet8(Fa,24),Fb,t,u,v); + s = m|n|o|p; + (*dst->store) (dst, s); +} + +void +fbCombineConjointOverU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineAOver); +/* + CARD32 s, d; + CARD16 a; + CARD16 t; + CARD32 m,n,o,p; + + s = fbCombineMaskU (src, msk); + a = s >> 24; + if (a != 0x00) + { + if (a != 0xff) + { + d = (*dst->fetch) (dst); + a = fbCombineConjointOutPart (d >> 24, a); + m = FbOverU(s,d,0,a,t); + n = FbOverU(s,d,8,a,t); + o = FbOverU(s,d,16,a,t); + p = FbOverU(s,d,24,a,t); + s = m|n|o|p; + } + (*dst->store) (dst, s); + } + */ +} + +void +fbCombineConjointOverC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineAOver); +} + +void +fbCombineConjointOverReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineBOver); +} + +void +fbCombineConjointOverReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineBOver); +} + +void +fbCombineConjointInU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineAIn); +} + +void +fbCombineConjointInC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineAIn); +} + +void +fbCombineConjointInReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineBIn); +} + +void +fbCombineConjointInReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineBIn); +} + +void +fbCombineConjointOutU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineAOut); +} + +void +fbCombineConjointOutC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineAOut); +} + +void +fbCombineConjointOutReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineBOut); +} + +void +fbCombineConjointOutReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineBOut); +} + +void +fbCombineConjointAtopU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineAAtop); +} + +void +fbCombineConjointAtopC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineAAtop); +} + +void +fbCombineConjointAtopReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineBAtop); +} + +void +fbCombineConjointAtopReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineBAtop); +} + +void +fbCombineConjointXorU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralU (src, msk, dst, CombineXor); } +void +fbCombineConjointXorC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst) +{ + fbCombineConjointGeneralC (src, msk, dst, CombineXor); +} + FbCombineFunc fbCombineFuncU[] = { fbCombineClear, fbCombineSrcU, @@ -855,7 +1518,37 @@ fbCombineAtopReverseU, fbCombineXorU, fbCombineAddU, - fbCombineSaturateU, + fbCombineDisjointOverU, /* Saturate */ + 0, + 0, + fbCombineClear, + fbCombineSrcU, + fbCombineDst, + fbCombineDisjointOverU, + fbCombineDisjointOverReverseU, + fbCombineDisjointInU, + fbCombineDisjointInReverseU, + fbCombineDisjointOutU, + fbCombineDisjointOutReverseU, + fbCombineDisjointAtopU, + fbCombineDisjointAtopReverseU, + fbCombineDisjointXorU, + 0, + 0, + 0, + 0, + fbCombineClear, + fbCombineSrcU, + fbCombineDst, + fbCombineConjointOverU, + fbCombineConjointOverReverseU, + fbCombineConjointInU, + fbCombineConjointInReverseU, + fbCombineConjointOutU, + fbCombineConjointOutReverseU, + fbCombineConjointAtopU, + fbCombineConjointAtopReverseU, + fbCombineConjointXorU, }; FbCombineFunc fbCombineFuncC[] = { @@ -872,7 +1565,37 @@ fbCombineAtopReverseC, fbCombineXorC, fbCombineAddC, - fbCombineSaturateC, + fbCombineDisjointOverC, /* Saturate */ + 0, + 0, + fbCombineClear, /* 0x10 */ + fbCombineSrcC, + fbCombineDst, + fbCombineDisjointOverC, + fbCombineDisjointOverReverseC, + fbCombineDisjointInC, + fbCombineDisjointInReverseC, + fbCombineDisjointOutC, + fbCombineDisjointOutReverseC, + fbCombineDisjointAtopC, + fbCombineDisjointAtopReverseC, + fbCombineDisjointXorC, /* 0x1b */ + 0, + 0, + 0, + 0, + fbCombineClear, + fbCombineSrcC, + fbCombineDst, + fbCombineConjointOverC, + fbCombineConjointOverReverseC, + fbCombineConjointInC, + fbCombineConjointInReverseC, + fbCombineConjointOutC, + fbCombineConjointOutReverseC, + fbCombineConjointAtopC, + fbCombineConjointAtopReverseC, + fbCombineConjointXorC, }; /* @@ -880,20 +1603,23 @@ */ CARD32 -fbFetch_a8r8g8b8 (FbBits *line, CARD32 offset) +fbFetch_a8r8g8b8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; return ((CARD32 *)line)[offset >> 5]; } CARD32 -fbFetch_x8r8g8b8 (FbBits *line, CARD32 offset) +fbFetch_x8r8g8b8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; return ((CARD32 *)line)[offset >> 5] | 0xff000000; } CARD32 -fbFetch_a8b8g8r8 (FbBits *line, CARD32 offset) +fbFetch_a8b8g8r8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; return ((pixel & 0xff000000) | @@ -903,8 +1629,9 @@ } CARD32 -fbFetch_x8b8g8r8 (FbBits *line, CARD32 offset) +fbFetch_x8b8g8r8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; return ((0xff000000) | @@ -914,8 +1641,9 @@ } CARD32 -fbFetch_r8g8b8 (FbBits *line, CARD32 offset) +fbFetch_r8g8b8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); #if IMAGE_BYTE_ORDER == MSBFirst return (0xff000000 | @@ -931,8 +1659,9 @@ } CARD32 -fbFetch_b8g8r8 (FbBits *line, CARD32 offset) +fbFetch_b8g8r8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); #if IMAGE_BYTE_ORDER == MSBFirst return (0xff000000 | @@ -948,8 +1677,9 @@ } CARD32 -fbFetch_r5g6b5 (FbBits *line, CARD32 offset) +fbFetch_r5g6b5 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -960,8 +1690,9 @@ } CARD32 -fbFetch_b5g6r5 (FbBits *line, CARD32 offset) +fbFetch_b5g6r5 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -972,8 +1703,9 @@ } CARD32 -fbFetch_a1r5g5b5 (FbBits *line, CARD32 offset) +fbFetch_a1r5g5b5 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 a,r,g,b; @@ -985,8 +1717,9 @@ } CARD32 -fbFetch_x1r5g5b5 (FbBits *line, CARD32 offset) +fbFetch_x1r5g5b5 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -997,8 +1730,9 @@ } CARD32 -fbFetch_a1b5g5r5 (FbBits *line, CARD32 offset) +fbFetch_a1b5g5r5 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 a,r,g,b; @@ -1010,8 +1744,9 @@ } CARD32 -fbFetch_x1b5g5r5 (FbBits *line, CARD32 offset) +fbFetch_x1b5g5r5 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD16 *) line)[offset >> 4]; CARD32 r,g,b; @@ -1022,16 +1757,18 @@ } CARD32 -fbFetch_a8 (FbBits *line, CARD32 offset) +fbFetch_a8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; return pixel << 24; } CARD32 -fbFetcha_a8 (FbBits *line, CARD32 offset) +fbFetcha_a8 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; pixel |= pixel << 8; @@ -1040,8 +1777,9 @@ } CARD32 -fbFetch_r3g3b2 (FbBits *line, CARD32 offset) +fbFetch_r3g3b2 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 r,g,b; @@ -1055,8 +1793,9 @@ } CARD32 -fbFetch_b2g3r3 (FbBits *line, CARD32 offset) +fbFetch_b2g3r3 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 r,g,b; @@ -1072,8 +1811,9 @@ } CARD32 -fbFetch_a2r2g2b2 (FbBits *line, CARD32 offset) +fbFetch_a2r2g2b2 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 a,r,g,b; @@ -1085,8 +1825,9 @@ } CARD32 -fbFetch_a2b2g2r2 (FbBits *line, CARD32 offset) +fbFetch_a2b2g2r2 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD8 *) line)[offset>>3]; CARD32 a,r,g,b; @@ -1097,6 +1838,15 @@ return a|r|g|b; } +CARD32 +fbFetch_c8 (FbCompositeOperand *op) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD32 pixel = ((CARD8 *) line)[offset>>3]; + + return op->indexed->rgba[pixel]; +} + #define Fetch8(l,o) (((CARD8 *) (l))[(o) >> 3]) #if IMAGE_BYTE_ORDER == MSBFirst #define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4) @@ -1105,8 +1855,9 @@ #endif CARD32 -fbFetch_a4 (FbBits *line, CARD32 offset) +fbFetch_a4 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = Fetch4(line, offset); pixel |= pixel << 4; @@ -1114,8 +1865,9 @@ } CARD32 -fbFetcha_a4 (FbBits *line, CARD32 offset) +fbFetcha_a4 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = Fetch4(line, offset); pixel |= pixel << 4; @@ -1125,8 +1877,9 @@ } CARD32 -fbFetch_r1g2b1 (FbBits *line, CARD32 offset) +fbFetch_r1g2b1 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = Fetch4(line, offset); CARD32 r,g,b; @@ -1137,8 +1890,9 @@ } CARD32 -fbFetch_b1g2r1 (FbBits *line, CARD32 offset) +fbFetch_b1g2r1 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = Fetch4(line, offset); CARD32 r,g,b; @@ -1149,8 +1903,9 @@ } CARD32 -fbFetch_a1r1g1b1 (FbBits *line, CARD32 offset) +fbFetch_a1r1g1b1 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = Fetch4(line, offset); CARD32 a,r,g,b; @@ -1162,8 +1917,9 @@ } CARD32 -fbFetch_a1b1g1r1 (FbBits *line, CARD32 offset) +fbFetch_a1b1g1r1 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = Fetch4(line, offset); CARD32 a,r,g,b; @@ -1174,13 +1930,23 @@ return a|r|g|b; } +CARD32 +fbFetch_c4 (FbCompositeOperand *op) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD32 pixel = Fetch4(line, offset); + + return op->indexed->rgba[pixel]; +} + CARD32 -fbFetcha_a1 (FbBits *line, CARD32 offset) +fbFetcha_a1 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; CARD32 a; #if BITMAP_BIT_ORDER == MSBFirst - a = pixel >> (0x1f - offset & 0x1f); + a = pixel >> (0x1f - (offset & 0x1f)); #else a = pixel >> (offset & 0x1f); #endif @@ -1194,12 +1960,13 @@ } CARD32 -fbFetch_a1 (FbBits *line, CARD32 offset) +fbFetch_a1 (FbCompositeOperand *op) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel = ((CARD32 *)line)[offset >> 5]; CARD32 a; #if BITMAP_BIT_ORDER == MSBFirst - a = pixel >> (0x1f - offset & 0x1f); + a = pixel >> (0x1f - (offset & 0x1f)); #else a = pixel >> (offset & 0x1f); #endif @@ -1210,6 +1977,21 @@ return a << 24; } +CARD32 +fbFetch_g1 (FbCompositeOperand *op) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD32 pixel = ((CARD32 *)line)[offset >> 5]; + CARD32 a; +#if BITMAP_BIT_ORDER == MSBFirst + a = pixel >> (0x1f - (offset & 0x1f)); +#else + a = pixel >> (offset & 0x1f); +#endif + a = a & 1; + return op->indexed->rgba[a]; +} + /* * All the store functions */ @@ -1218,34 +2000,39 @@ #define Split(v) CARD32 r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff void -fbStore_a8r8g8b8 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a8r8g8b8 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; ((CARD32 *)line)[offset >> 5] = value; } void -fbStore_x8r8g8b8 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_x8r8g8b8 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; ((CARD32 *)line)[offset >> 5] = value & 0xffffff; } void -fbStore_a8b8g8r8 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a8b8g8r8 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; Splita(value); ((CARD32 *)line)[offset >> 5] = a << 24 | b << 16 | g << 8 | r; } void -fbStore_x8b8g8r8 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_x8b8g8r8 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; Split(value); ((CARD32 *)line)[offset >> 5] = b << 16 | g << 8 | r; } void -fbStore_r8g8b8 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_r8g8b8 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); #if IMAGE_BYTE_ORDER == MSBFirst @@ -1260,8 +2047,9 @@ } void -fbStore_b8g8r8 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_b8g8r8 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); #if IMAGE_BYTE_ORDER == MSBFirst @@ -1276,8 +2064,9 @@ } void -fbStore_r5g6b5 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_r5g6b5 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((r << 8) & 0xf800) | @@ -1286,8 +2075,9 @@ } void -fbStore_b5g6r5 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_b5g6r5 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((b << 8) & 0xf800) | @@ -1296,8 +2086,9 @@ } void -fbStore_a1r5g5b5 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a1r5g5b5 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Splita(value); *pixel = (((a << 8) & 0x8000) | @@ -1307,8 +2098,9 @@ } void -fbStore_x1r5g5b5 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_x1r5g5b5 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((r << 7) & 0x7c00) | @@ -1317,8 +2109,9 @@ } void -fbStore_a1b5g5r5 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a1b5g5r5 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Splita(value); *pixel = (((a << 8) & 0x8000) | @@ -1328,8 +2121,9 @@ } void -fbStore_x1b5g5r5 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_x1b5g5r5 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD16 *pixel = ((CARD16 *) line) + (offset >> 4); Split(value); *pixel = (((b << 7) & 0x7c00) | @@ -1338,15 +2132,17 @@ } void -fbStore_a8 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a8 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); *pixel = value >> 24; } void -fbStore_r3g3b2 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_r3g3b2 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); *pixel = (((r ) & 0xe0) | @@ -1355,8 +2151,9 @@ } void -fbStore_b2g3r3 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_b2g3r3 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Split(value); *pixel = (((b ) & 0xe0) | @@ -1365,8 +2162,9 @@ } void -fbStore_a2r2g2b2 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a2r2g2b2 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); Splita(value); *pixel = (((a ) & 0xc0) | @@ -1375,26 +2173,44 @@ ((b >> 6) )); } +void +fbStore_c8 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); + *pixel = miIndexToEnt24(op->indexed,value); +} + +void +fbStore_g8 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD8 *pixel = ((CARD8 *) line) + (offset >> 3); + *pixel = miIndexToEntY24(op->indexed,value); +} + #define Store8(l,o,v) (((CARD8 *) l)[(o) >> 3] = (v)) #if IMAGE_BYTE_ORDER == MSBFirst -#define Store4(l,o,v) Store8(l,o,((o) & 2 ? \ - Fetch8(l,o) & 0xf0 | (v) : \ - Fetch8(l,o) & 0x0f | ((v) << 4))) +#define Store4(l,o,v) Store8(l,o,((o) & 4 ? \ + (Fetch8(l,o) & 0xf0) | (v) : \ + (Fetch8(l,o) & 0x0f) | ((v) << 4))) #else -#define Store4(l,o,v) Store8(l,o,((o) & 2 ? \ - Fetch8(l,o) & 0x0f | ((v) << 4) : \ - Fetch8(l,o) & 0xf0 | (v))) +#define Store4(l,o,v) Store8(l,o,((o) & 4 ? \ + (Fetch8(l,o) & 0x0f) | ((v) << 4) : \ + (Fetch8(l,o) & 0xf0) | (v))) #endif void -fbStore_a4 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a4 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; Store4(line,offset,value>>28); } void -fbStore_r1g2b1 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_r1g2b1 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel; Split(value); @@ -1405,8 +2221,9 @@ } void -fbStore_b1g2r1 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_b1g2r1 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel; Split(value); @@ -1417,8 +2234,9 @@ } void -fbStore_a1r1g1b1 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a1r1g1b1 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel; Splita(value); pixel = (((a >> 4) & 0x8) | @@ -1429,8 +2247,9 @@ } void -fbStore_a1b1g1r1 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a1b1g1r1 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 pixel; Splita(value); pixel = (((a >> 4) & 0x8) | @@ -1440,59 +2259,119 @@ Store4(line,offset,pixel); } +void +fbStore_c4 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD32 pixel; + + pixel = miIndexToEnt24(op->indexed,value); + Store4(line,offset,pixel); +} + +void +fbStore_g4 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD32 pixel; + + pixel = miIndexToEntY24(op->indexed,value); + Store4(line,offset,pixel); +} + void -fbStore_a1 (FbBits *line, CARD32 offset, CARD32 value) +fbStore_a1 (FbCompositeOperand *op, CARD32 value) { + FbBits *line = op->line; CARD32 offset = op->offset; CARD32 *pixel = ((CARD32 *) line) + (offset >> 5); CARD32 mask = FbStipMask(offset & 0x1f, 1); value = value & 0x80000000 ? mask : 0; - *pixel = *pixel & ~mask | value; + *pixel = (*pixel & ~mask) | value; +} + +void +fbStore_g1 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->line; CARD32 offset = op->offset; + CARD32 *pixel = ((CARD32 *) line) + (offset >> 5); + CARD32 mask = FbStipMask(offset & 0x1f, 1); + + value = miIndexToEntY24(op->indexed,value) ? mask : 0; + *pixel = (*pixel & ~mask) | value; +} + +CARD32 +fbFetch_external (FbCompositeOperand *op) +{ + CARD32 rgb = (*op[1].fetch) (&op[1]); + CARD32 a = (*op[2].fetch) (&op[2]); + + return (rgb & 0xffffff) | (a & 0xff000000); } + +CARD32 +fbFetcha_external (FbCompositeOperand *op) +{ + return (*op[2].fetch) (&op[2]); +} + +void +fbStore_external (FbCompositeOperand *op, CARD32 value) +{ + (*op[1].store) (&op[1], value | 0xff000000); + (*op[2].store) (&op[2], value & 0xff000000); +} + FbAccessMap fbAccessMap[] = { /* 32bpp formats */ - PICT_a8r8g8b8, fbFetch_a8r8g8b8, fbFetch_a8r8g8b8, fbStore_a8r8g8b8, - PICT_x8r8g8b8, fbFetch_x8r8g8b8, fbFetch_x8r8g8b8, fbStore_x8r8g8b8, - PICT_a8b8g8r8, fbFetch_a8b8g8r8, fbFetch_a8b8g8r8, fbStore_a8b8g8r8, - PICT_x8b8g8r8, fbFetch_x8b8g8r8, fbFetch_x8b8g8r8, fbStore_x8b8g8r8, + { PICT_a8r8g8b8, fbFetch_a8r8g8b8, fbFetch_a8r8g8b8, fbStore_a8r8g8b8 }, + { PICT_x8r8g8b8, fbFetch_x8r8g8b8, fbFetch_x8r8g8b8, fbStore_x8r8g8b8 }, + { PICT_a8b8g8r8, fbFetch_a8b8g8r8, fbFetch_a8b8g8r8, fbStore_a8b8g8r8 }, + { PICT_x8b8g8r8, fbFetch_x8b8g8r8, fbFetch_x8b8g8r8, fbStore_x8b8g8r8 }, /* 24bpp formats */ - PICT_r8g8b8, fbFetch_r8g8b8, fbFetch_r8g8b8, fbStore_r8g8b8, - PICT_b8g8r8, fbFetch_b8g8r8, fbFetch_b8g8r8, fbStore_b8g8r8, + { PICT_r8g8b8, fbFetch_r8g8b8, fbFetch_r8g8b8, fbStore_r8g8b8 }, + { PICT_b8g8r8, fbFetch_b8g8r8, fbFetch_b8g8r8, fbStore_b8g8r8 }, /* 16bpp formats */ - PICT_r5g6b5, fbFetch_r5g6b5, fbFetch_r5g6b5, fbStore_r5g6b5, - PICT_b5g6r5, fbFetch_b5g6r5, fbFetch_b5g6r5, fbStore_b5g6r5, + { PICT_r5g6b5, fbFetch_r5g6b5, fbFetch_r5g6b5, fbStore_r5g6b5 }, + { PICT_b5g6r5, fbFetch_b5g6r5, fbFetch_b5g6r5, fbStore_b5g6r5 }, - PICT_a1r5g5b5, fbFetch_a1r5g5b5, fbFetch_a1r5g5b5, fbStore_a1r5g5b5, - PICT_x1r5g5b5, fbFetch_x1r5g5b5, fbFetch_x1r5g5b5, fbStore_x1r5g5b5, - PICT_a1b5g5r5, fbFetch_a1b5g5r5, fbFetch_a1b5g5r5, fbStore_a1b5g5r5, - PICT_x1b5g5r5, fbFetch_x1b5g5r5, fbFetch_x1b5g5r5, fbStore_x1b5g5r5, + { PICT_a1r5g5b5, fbFetch_a1r5g5b5, fbFetch_a1r5g5b5, fbStore_a1r5g5b5 }, + { PICT_x1r5g5b5, fbFetch_x1r5g5b5, fbFetch_x1r5g5b5, fbStore_x1r5g5b5 }, + { PICT_a1b5g5r5, fbFetch_a1b5g5r5, fbFetch_a1b5g5r5, fbStore_a1b5g5r5 }, + { PICT_x1b5g5r5, fbFetch_x1b5g5r5, fbFetch_x1b5g5r5, fbStore_x1b5g5r5 }, /* 8bpp formats */ - PICT_a8, fbFetch_a8, fbFetcha_a8, fbStore_a8, - PICT_r3g3b2, fbFetch_r3g3b2, fbFetch_r3g3b2, fbStore_r3g3b2, - PICT_b2g3r3, fbFetch_b2g3r3, fbFetch_b2g3r3, fbStore_b2g3r3, - PICT_a2r2g2b2, fbFetch_a2r2g2b2, fbFetch_a2r2g2b2, fbStore_a2r2g2b2, + { PICT_a8, fbFetch_a8, fbFetcha_a8, fbStore_a8 }, + { PICT_r3g3b2, fbFetch_r3g3b2, fbFetch_r3g3b2, fbStore_r3g3b2 }, + { PICT_b2g3r3, fbFetch_b2g3r3, fbFetch_b2g3r3, fbStore_b2g3r3 }, + { PICT_a2r2g2b2, fbFetch_a2r2g2b2, fbFetch_a2r2g2b2, fbStore_a2r2g2b2 }, + { PICT_c8, fbFetch_c8, fbFetch_c8, fbStore_c8 }, + { PICT_g8, fbFetch_c8, fbFetch_c8, fbStore_g8 }, /* 4bpp formats */ - PICT_a4, fbFetch_a4, fbFetcha_a4, fbStore_a4, - PICT_r1g2b1, fbFetch_r1g2b1, fbFetch_r1g2b1, fbStore_r1g2b1, - PICT_b1g2r1, fbFetch_b1g2r1, fbFetch_b1g2r1, fbStore_b1g2r1, - PICT_a1r1g1b1, fbFetch_a1r1g1b1, fbFetch_a1r1g1b1, fbStore_a1r1g1b1, - PICT_a1b1g1r1, fbFetch_a1b1g1r1, fbFetch_a1b1g1r1, fbStore_a1b1g1r1, + { PICT_a4, fbFetch_a4, fbFetcha_a4, fbStore_a4 }, + { PICT_r1g2b1, fbFetch_r1g2b1, fbFetch_r1g2b1, fbStore_r1g2b1 }, + { PICT_b1g2r1, fbFetch_b1g2r1, fbFetch_b1g2r1, fbStore_b1g2r1 }, + { PICT_a1r1g1b1, fbFetch_a1r1g1b1, fbFetch_a1r1g1b1, fbStore_a1r1g1b1 }, + { PICT_a1b1g1r1, fbFetch_a1b1g1r1, fbFetch_a1b1g1r1, fbStore_a1b1g1r1 }, + { PICT_c4, fbFetch_c4, fbFetch_c4, fbStore_c4 }, + { PICT_g4, fbFetch_c4, fbFetch_c4, fbStore_g4 }, /* 1bpp formats */ - PICT_a1, fbFetch_a1, fbFetcha_a1, fbStore_a1, + { PICT_a1, fbFetch_a1, fbFetcha_a1, fbStore_a1 }, + { PICT_g1, fbFetch_g1, fbFetch_g1, fbStore_g1 }, }; #define NumAccessMap (sizeof fbAccessMap / sizeof fbAccessMap[0]) Bool -fbBuildCompositeOperand (PicturePtr pPict, - FbCompositeOperand *op, - INT16 x, - INT16 y) +fbBuildOneCompositeOperand (PicturePtr pPict, + FbCompositeOperand *op, + INT16 x, + INT16 y) { int i; @@ -1502,20 +2381,49 @@ op->fetch = fbAccessMap[i].fetch; op->fetcha = fbAccessMap[i].fetcha; op->store = fbAccessMap[i].store; - fbGetDrawable (pPict->pDrawable, op->line, op->stride, op->bpp); + op->indexed = (miIndexedPtr) pPict->pFormat->indexed; + fbGetDrawable (pPict->pDrawable, op->line, op->stride, op->bpp, + op->xoff, op->yoff); if (pPict->repeat && pPict->pDrawable->width == 1 && pPict->pDrawable->height == 1) { op->bpp = 0; op->stride = 0; } - op->line = op->line + y * op->stride; + op->line = op->line + (y + op->yoff) * op->stride; op->offset = 0; return TRUE; } return FALSE; } +Bool +fbBuildCompositeOperand (PicturePtr pPict, + FbCompositeOperand op[3], + INT16 x, + INT16 y) +{ + if (pPict->alphaMap) + { + if (!fbBuildOneCompositeOperand (pPict, &op[1], x, y)) + return FALSE; + if (!fbBuildOneCompositeOperand (pPict->alphaMap, &op[2], + x - pPict->alphaOrigin.x, + y - pPict->alphaOrigin.y)) + return FALSE; + op[0].fetch = fbFetch_external; + op[0].fetcha = fbFetcha_external; + op[0].store = fbStore_external; + op[2].xoff -= pPict->alphaOrigin.x; + op[2].yoff -= pPict->alphaOrigin.y; + return TRUE; + } + else + { + return fbBuildOneCompositeOperand (pPict, &op[0], x, y); + } +} + void fbCompositeGeneral (CARD8 op, PicturePtr pSrc, @@ -1530,44 +2438,104 @@ CARD16 width, CARD16 height) { - FbCompositeOperand src,msk,dst,*pmsk; + FbCompositeOperand src[3],msk[3],dst[3],*pmsk; + FbCompositeOperand *srcPict, *srcAlpha; + FbCompositeOperand *dstPict, *dstAlpha; + FbCompositeOperand *mskPict = 0, *mskAlpha = 0; FbCombineFunc f; int w; - if (!fbBuildCompositeOperand (pSrc, &src, xSrc, ySrc)) + if (!fbBuildCompositeOperand (pSrc, src, xSrc, ySrc)) return; - if (!fbBuildCompositeOperand (pDst, &dst, xDst, yDst)) + if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst)) return; + if (pSrc->alphaMap) + { + srcPict = &src[1]; + srcAlpha = &src[2]; + } + else + { + srcPict = &src[0]; + srcAlpha = 0; + } + if (pDst->alphaMap) + { + dstPict = &dst[1]; + dstAlpha = &dst[2]; + } + else + { + dstPict = &dst[0]; + dstAlpha = 0; + } f = fbCombineFuncU[op]; if (pMask) { - if (!fbBuildCompositeOperand (pMask, &msk, xMask, yMask)) + if (!fbBuildCompositeOperand (pMask, msk, xMask, yMask)) return; - pmsk = &msk; + pmsk = msk; if (pMask->componentAlpha) f = fbCombineFuncC[op]; + if (pMask->alphaMap) + { + mskPict = &msk[1]; + mskAlpha = &msk[2]; + } + else + { + mskPict = &msk[0]; + mskAlpha = 0; + } } else pmsk = 0; while (height--) { w = width; - src.offset = xSrc * src.bpp; - dst.offset = xDst * dst.bpp; + + srcPict->offset = (xSrc + srcPict->xoff) * srcPict->bpp; + if (srcAlpha) + srcAlpha->offset = (xSrc + srcAlpha->xoff) * srcAlpha->bpp; + + dstPict->offset = (xDst + dstPict->xoff) * dstPict->bpp; + if (dstAlpha) + dstAlpha->offset = (xDst + dstAlpha->xoff) * dstAlpha->bpp; + if (pmsk) - msk.offset = xMask * msk.bpp; + { + mskPict->offset = (xMask + mskPict->xoff) * mskPict->bpp; + if (mskAlpha) + mskAlpha->offset = (xMask + mskAlpha->xoff) * mskAlpha->bpp; + } while (w--) { - (*f) (&src, pmsk, &dst); - src.offset += src.bpp; - dst.offset += dst.bpp; + (*f) (src, pmsk, dst); + srcPict->offset += srcPict->bpp; + if (srcAlpha) + srcAlpha->offset += srcAlpha->bpp; + dstPict->offset += dstPict->bpp; + if (dstAlpha) + dstAlpha->offset += dstAlpha->bpp; if (pmsk) - msk.offset += msk.bpp; + { + mskPict->offset += mskPict->bpp; + if (mskAlpha) + mskAlpha->offset += mskAlpha->bpp; + } } - src.line += src.stride; - dst.line += dst.stride; + srcPict->line += srcPict->stride; + if (srcAlpha) + srcAlpha->line += srcAlpha->stride; + + dstPict->line += dstPict->stride; + if (dstAlpha) + dstAlpha->line += dstAlpha->stride; if (pmsk) - msk.line += msk.stride; + { + mskPict->line += mskPict->stride; + if (mskAlpha) + mskAlpha->line += mskAlpha->stride; + } } - } Index: xc/programs/Xserver/fb/fbcopy.c diff -u xc/programs/Xserver/fb/fbcopy.c:1.7 xc/programs/Xserver/fb/fbcopy.c:1.12 --- xc/programs/Xserver/fb/fbcopy.c:1.7 Sat May 6 17:09:32 2000 +++ xc/programs/Xserver/fb/fbcopy.c Mon Jul 16 01:04:05 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.7 2000/05/06 21:09:32 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.12 2001/07/16 05:04:05 keithp Exp $ */ #include "fb.h" #ifdef IN_MODULE @@ -41,32 +41,35 @@ Pixel bitplane, void *closure) { - FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + CARD8 alu = pGC ? pGC->alu : GXcopy; + FbBits pm = pGC ? fbGetGCPrivate(pGC)->pm : FB_ALLONES; FbBits *src; FbStride srcStride; int srcBpp; + int srcXoff, srcYoff; FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; - fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp); - fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nbox--) { - fbBlt (src + (pbox->y1 + dy) * srcStride, + fbBlt (src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, - (pbox->x1 + dx) * srcBpp, + (pbox->x1 + dx + srcXoff) * srcBpp, - dst + (pbox->y1) * dstStride, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - (pbox->x1) * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * dstBpp, (pbox->y2 - pbox->y1), - pGC->alu, - pPriv->pm, + alu, + pm, dstBpp, reverse, @@ -92,24 +95,26 @@ FbBits *src; FbStride srcStride; int srcBpp; + int srcXoff, srcYoff; FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; - fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp); - fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nbox--) { if (dstBpp == 1) { - fbBlt (src + (pbox->y1 + dy) * srcStride, + fbBlt (src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, - (pbox->x1 + dx) * srcBpp, + (pbox->x1 + dx + srcXoff) * srcBpp, - dst + (pbox->y1) * dstStride, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - (pbox->x1) * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * dstBpp, (pbox->y2 - pbox->y1), @@ -124,13 +129,13 @@ } else { - fbBltOne ((FbStip *) (src + (pbox->y1 + dy) * srcStride), + fbBltOne ((FbStip *) (src + (pbox->y1 + dy + srcYoff) * srcStride), srcStride*(FB_UNIT/FB_STIP_UNIT), - (pbox->x1 + dx), + (pbox->x1 + dx + srcXoff), - dst + (pbox->y1) * dstStride, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - (pbox->x1) * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, dstBpp, (pbox->x2 - pbox->x1) * dstBpp, @@ -162,24 +167,26 @@ { if (pDstDrawable->bitsPerPixel == 1) { - FbBits *src; + FbBits *src; FbStride srcStride; - int srcBpp; + int srcBpp; + int srcXoff, srcYoff; - FbStip *dst; + FbStip *dst; FbStride dstStride; - int dstBpp; + int dstBpp; + int dstXoff, dstYoff; - fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp); - fbGetStipDrawable (pDstDrawable, dst, dstStride, dstBpp); - fbBltPlane (src + (pbox->y1+ dy) * srcStride, + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetStipDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + fbBltPlane (src + (pbox->y1+ dy + srcYoff) * srcStride, srcStride, - (pbox->x1 + dx) * srcBpp, + (pbox->x1 + dx + srcXoff) * srcBpp, srcBpp, - dst + (pbox->y1) * dstStride, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - (pbox->x1) * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * srcBpp, (pbox->y2 - pbox->y1), @@ -190,17 +197,19 @@ } else { - FbBits *src; + FbBits *src; FbStride srcStride; - int srcBpp; - - FbBits *dst; + int srcBpp; + int srcXoff, srcYoff; + + FbBits *dst; FbStride dstStride; - int dstBpp; + int dstBpp; + int dstXoff, dstYoff; - FbStip *tmp; + FbStip *tmp; FbStride tmpStride; - int width, height; + int width, height; width = pbox->x2 - pbox->x1; height = pbox->y2 - pbox->y1; @@ -210,12 +219,12 @@ if (!tmp) return; - fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp); - fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - fbBltPlane (src + (pbox->y1+ dy) * srcStride, + fbBltPlane (src + (pbox->y1+ dy + srcYoff) * srcStride, srcStride, - (pbox->x1 + dx) * srcBpp, + (pbox->x1 + dx + srcXoff) * srcBpp, srcBpp, tmp, @@ -234,9 +243,9 @@ tmpStride, 0, - dst + (pbox->y1) * dstStride, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - (pbox->x1) * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, dstBpp, width * dstBpp, @@ -382,44 +391,39 @@ Pixel bitPlane, void *closure) { - RegionPtr prgnSrcClip; /* may be a new region, or just a copy */ - Bool freeSrcClip = FALSE; + RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ + Bool freeSrcClip = FALSE; + RegionPtr prgnExposed = NULL; + RegionRec rgnDst; + int dx; + int dy; + int numRects; + BoxRec box; + Bool fastSrc = FALSE; /* for fast clipping with pixmap source */ + Bool fastDst = FALSE; /* for fast clipping with one rect dest */ + Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ - RegionPtr prgnExposed = NULL; - RegionRec rgnDst; - register int dx; - register int dy; - xRectangle origSource; - DDXPointRec origDest; - int numRects; - BoxRec fastBox; - int fastClip = 0; /* for fast clipping with pixmap source */ - int fastExpose = 0; /* for fast exposures with pixmap source */ - - origSource.x = xIn; - origSource.y = yIn; - origSource.width = widthSrc; - origSource.height = heightSrc; - origDest.x = xOut; - origDest.y = yOut; + /* Short cut for unmapped windows */ + if (pDstDrawable->type == DRAWABLE_WINDOW && + !((WindowPtr)pDstDrawable)->realized) + { + return NULL; + } + if ((pSrcDrawable != pDstDrawable) && pSrcDrawable->pScreen->SourceValidate) { (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc); } - - xIn += pSrcDrawable->x; - yIn += pSrcDrawable->y; - /* clip the source */ - + /* Compute source clip region */ if (pSrcDrawable->type == DRAWABLE_PIXMAP) { if ((pSrcDrawable == pDstDrawable) && (pGC->clientClipType == CT_NONE)) prgnSrcClip = fbGetCompositeClip(pGC); else - fastClip = 1; + fastSrc = TRUE; } else { @@ -427,7 +431,7 @@ { /* * XFree86 DDX empties the border clip when the - * VT is inactive + * VT is inactive, make sure the region isn't empty */ if (!((WindowPtr) pSrcDrawable)->parent && REGION_NOTEMPTY (pSrcDrawable->pScreen, @@ -437,10 +441,10 @@ * special case bitblt from root window in * IncludeInferiors mode; just like from a pixmap */ - fastClip = 1; + fastSrc = TRUE; } else if ((pSrcDrawable == pDstDrawable) && - (pGC->clientClipType == CT_NONE)) + (pGC->clientClipType == CT_NONE)) { prgnSrcClip = fbGetCompositeClip(pGC); } @@ -455,76 +459,58 @@ prgnSrcClip = &((WindowPtr)pSrcDrawable)->clipList; } } + + xIn += pSrcDrawable->x; + yIn += pSrcDrawable->y; + + xOut += pDstDrawable->x; + yOut += pDstDrawable->y; - fastBox.x1 = xIn; - fastBox.y1 = yIn; - fastBox.x2 = xIn + widthSrc; - fastBox.y2 = yIn + heightSrc; + box.x1 = xIn; + box.y1 = yIn; + box.x2 = xIn + widthSrc; + box.y2 = yIn + heightSrc; + dx = xIn - xOut; + dy = yIn - yOut; + /* Don't create a source region if we are doing a fast clip */ - if (fastClip) + if (fastSrc) { - fastExpose = 1; + RegionPtr cclip; + + fastExpose = TRUE; /* * clip the source; if regions extend beyond the source size, * make sure exposure events get sent */ - if (fastBox.x1 < pSrcDrawable->x) + if (box.x1 < pSrcDrawable->x) { - fastBox.x1 = pSrcDrawable->x; - fastExpose = 0; + box.x1 = pSrcDrawable->x; + fastExpose = FALSE; } - if (fastBox.y1 < pSrcDrawable->y) + if (box.y1 < pSrcDrawable->y) { - fastBox.y1 = pSrcDrawable->y; - fastExpose = 0; + box.y1 = pSrcDrawable->y; + fastExpose = FALSE; } - if (fastBox.x2 > pSrcDrawable->x + (int) pSrcDrawable->width) + if (box.x2 > pSrcDrawable->x + (int) pSrcDrawable->width) { - fastBox.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; - fastExpose = 0; + box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; + fastExpose = FALSE; } - if (fastBox.y2 > pSrcDrawable->y + (int) pSrcDrawable->height) - { - fastBox.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; - fastExpose = 0; - } - } - else - { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); - } - - xOut += pDstDrawable->x; - yOut += pDstDrawable->y; - - if (pDstDrawable->type == DRAWABLE_WINDOW) - { - if (!((WindowPtr)pDstDrawable)->realized) + if (box.y2 > pSrcDrawable->y + (int) pSrcDrawable->height) { - if (!fastClip) - REGION_UNINIT(pGC->pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); - return NULL; + box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; + fastExpose = FALSE; } - } - - dx = xIn - xOut; - dy = yIn - yOut; + + /* Translate and clip the dst to the destination composite clip */ + box.x1 -= dx; + box.x2 -= dx; + box.y1 -= dy; + box.y2 -= dy; - /* Translate and clip the dst to the destination composite clip */ - if (fastClip) - { - RegionPtr cclip; - - /* Translate the region directly */ - fastBox.x1 -= dx; - fastBox.x2 -= dx; - fastBox.y1 -= dy; - fastBox.y2 -= dy; - /* If the destination composite clip is one rectangle we can do the clip directly. Otherwise we have to create a full blown region and call intersect */ @@ -533,40 +519,36 @@ if (REGION_NUM_RECTS(cclip) == 1) { BoxPtr pBox = REGION_RECTS(cclip); - - if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1; - if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2; - if (fastBox.y1 < pBox->y1) fastBox.y1 = pBox->y1; - if (fastBox.y2 > pBox->y2) fastBox.y2 = pBox->y2; - /* Check to see if the region is empty */ - if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) - { - REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0); - } - else - { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - } - } - else - { - /* We must turn off fastClip now, since we must create - a full blown region. It is intersected with the - composite clip below. */ - fastClip = 0; - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1); + if (box.x1 < pBox->x1) box.x1 = pBox->x1; + if (box.x2 > pBox->x2) box.x2 = pBox->x2; + if (box.y1 < pBox->y1) box.y1 = pBox->y1; + if (box.y2 > pBox->y2) box.y2 = pBox->y2; + fastDst = TRUE; } } + + /* Check to see if the region is empty */ + if (box.x1 >= box.x2 || box.y1 >= box.y2) + { + REGION_INIT(pGC->pScreen, &rgnDst, NullBox, 0); + } else { - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + REGION_INIT(pGC->pScreen, &rgnDst, &box, 1); + } + + /* Clip against complex source if needed */ + if (!fastSrc) + { + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); } - if (!fastClip) + /* Clip against complex dest if needed */ + if (!fastDst) { - REGION_INTERSECT(pGC->pScreen, &rgnDst, - &rgnDst, + REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, fbGetCompositeClip(pGC)); } @@ -577,12 +559,13 @@ &rgnDst, dx, dy, copyProc, bitPlane, closure); /* Pixmap sources generate a NoExposed (we return NULL to do this) */ - if (!fastExpose) + if (!fastExpose && pGC->fExpose) prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, - origSource.x, origSource.y, - (int)origSource.width, - (int)origSource.height, - origDest.x, origDest.y, + xIn - pSrcDrawable->x, + yIn - pSrcDrawable->y, + widthSrc, heightSrc, + xOut - pDstDrawable->x, + yOut - pDstDrawable->y, (unsigned long) bitPlane); REGION_UNINIT(pGC->pScreen, &rgnDst); if (freeSrcClip) Index: xc/programs/Xserver/fb/fbfill.c diff -u xc/programs/Xserver/fb/fbfill.c:1.3 xc/programs/Xserver/fb/fbfill.c:1.4 --- xc/programs/Xserver/fb/fbfill.c:1.3 Wed Feb 23 15:29:43 2000 +++ xc/programs/Xserver/fb/fbfill.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbfill.c,v 1.3 2000/02/23 20:29:43 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbfill.c,v 1.4 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" @@ -36,15 +36,16 @@ FbBits *dst; FbStride dstStride; int dstBpp; - FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + int dstXoff, dstYoff; + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); switch (pGC->fillStyle) { case FillSolid: - fbSolid (dst + y * dstStride, + fbSolid (dst + (y + dstYoff) * dstStride, dstStride, - x * dstBpp, + (x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height, pPriv->and, pPriv->xor); @@ -61,15 +62,16 @@ FbBits *stip; FbStride stipStride; int stipBpp; + int stipXoff, stipYoff; /* XXX assumed to be zero */ if (pGC->fillStyle == FillStippled) alu = FbStipple1Rop(pGC->alu,pGC->fgPixel); else alu = FbOpaqueStipple1Rop(pGC->alu,pGC->fgPixel,pGC->bgPixel); - fbGetDrawable (&pStip->drawable, stip, stipStride, stipBpp); - fbTile (dst + y * dstStride, + fbGetDrawable (&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); + fbTile (dst + (y + dstYoff) * dstStride, dstStride, - x, + x + dstXoff, width, height, stip, stipStride, @@ -87,6 +89,7 @@ FbStip *stip; FbStride stipStride; int stipBpp; + int stipXoff, stipYoff; /* XXX assumed to be zero */ FbBits fgand, fgxor, bgand, bgxor; fgand = pPriv->and; @@ -102,7 +105,7 @@ bgxor = pPriv->bgxor; } - fbGetStipDrawable (&pStip->drawable, stip, stipStride, stipBpp); + fbGetStipDrawable (&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); fbStipple (dst + y * dstStride, dstStride, x * dstBpp, @@ -127,13 +130,14 @@ int tileBpp; int tileWidth; int tileHeight; + int tileXoff, tileYoff; /* XXX assumed to be zero */ - fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp); + fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - fbTile (dst + y * dstStride, + fbTile (dst + (y + dstYoff) * dstStride, dstStride, - x * dstBpp, + (x + dstXoff) * dstBpp, width * dstBpp, height, tile, tileStride, @@ -163,11 +167,12 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; BoxPtr pbox; int nbox; int partX1, partX2, partY1, partY2; - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip); nbox--; @@ -195,9 +200,9 @@ if (partY2 <= partY1) continue; - fbSolid (dst + partY1 * dstStride, + fbSolid (dst + (partY1 + dstYoff) * dstStride, dstStride, - partX1 * dstBpp, + (partX1 + dstXoff) * dstBpp, dstBpp, (partX2 - partX1) * dstBpp, Index: xc/programs/Xserver/fb/fbgc.c diff -u xc/programs/Xserver/fb/fbgc.c:1.11 xc/programs/Xserver/fb/fbgc.c:1.12 --- xc/programs/Xserver/fb/fbgc.c:1.11 Thu Oct 19 14:08:22 2000 +++ xc/programs/Xserver/fb/fbgc.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbgc.c,v 1.11 2000/10/19 18:08:22 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbgc.c,v 1.12 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" #ifdef IN_MODULE @@ -165,6 +165,7 @@ FbBits *bits; int stride; int stip_bpp; + int stipXoff, stipYoff; int h; /* can't even stipple 24bpp drawables */ @@ -173,7 +174,7 @@ /* make sure the stipple width is a multiple of the even stipple width */ if (pStipple->drawable.width % len != 0) return FALSE; - fbGetDrawable (&pStipple->drawable, bits, stride, stip_bpp); + fbGetDrawable (&pStipple->drawable, bits, stride, stip_bpp, stipXoff, stipYoff); h = pStipple->drawable.height; /* check to see that the stipple repeats horizontally */ while (h--) Index: xc/programs/Xserver/fb/fbgetsp.c diff -u xc/programs/Xserver/fb/fbgetsp.c:1.5 xc/programs/Xserver/fb/fbgetsp.c:1.6 --- xc/programs/Xserver/fb/fbgetsp.c:1.5 Sat May 6 17:09:33 2000 +++ xc/programs/Xserver/fb/fbgetsp.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbgetsp.c,v 1.5 2000/05/06 21:09:33 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbgetsp.c,v 1.6 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" @@ -36,6 +36,7 @@ FbBits *src, *dst; FbStride srcStride; int srcBpp; + int srcXoff, srcYoff; int xoff; /* @@ -53,15 +54,15 @@ } #endif - fbGetDrawable (pDrawable, src, srcStride, srcBpp); + fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); while (nspans--) { xoff = (int) (((long) pchardstStart) & (FB_MASK >> 3)); dst = (FbBits *) (pchardstStart - xoff); xoff <<= 3; - fbBlt (src + ppt->y * srcStride, srcStride, - ppt->x * srcBpp, + fbBlt (src + (ppt->y + srcYoff) * srcStride, srcStride, + (ppt->x + srcXoff) * srcBpp, dst, 1, Index: xc/programs/Xserver/fb/fbglyph.c diff -u xc/programs/Xserver/fb/fbglyph.c:1.10 xc/programs/Xserver/fb/fbglyph.c:1.12 --- xc/programs/Xserver/fb/fbglyph.c:1.10 Sat Mar 3 17:14:44 2001 +++ xc/programs/Xserver/fb/fbglyph.c Fri Sep 7 11:16:00 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbglyph.c,v 1.10 2001/03/03 22:14:44 tsi Exp $ + * $XFree86: xc/programs/Xserver/fb/fbglyph.c,v 1.12 2001/09/07 15:16:00 keithp Exp $ * * Copyright © 1998 Keith Packard * @@ -34,9 +34,19 @@ int height) { BoxRec box; + BoxPtr pExtents = REGION_EXTENTS (0, pRegion); - if (x + width < 0) return FALSE; - if (y + height < 0) return FALSE; + /* + * Check extents by hand to avoid 16 bit overflows + */ + if (x < (int) pExtents->x1) + return FALSE; + if ((int) pExtents->x2 < x + width) + return FALSE; + if (y < (int) pExtents->y1) + return FALSE; + if ((int) pExtents->y2 < y + height) + return FALSE; box.x1 = x; box.x2 = x + width; box.y1 = y; @@ -261,14 +271,15 @@ FbBits, int, int); - FbBits *dst; - FbStride dstStride; - int dstBpp; + FbBits *dst = 0; + FbStride dstStride = 0; + int dstBpp = 0; + int dstXoff = 0, dstYoff = 0; glyph = 0; if (pGC->fillStyle == FillSolid && pPriv->and == 0) { - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; @@ -296,12 +307,12 @@ if (glyph && gWidth <= sizeof (FbStip) * 8 && fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { - (*glyph) (dst + gy * dstStride, + (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, (FbStip *) pglyph, pPriv->xor, - gx, + gx + dstXoff, gHeight); } else @@ -351,14 +362,15 @@ FbBits, int, int); - FbBits *dst; - FbStride dstStride; - int dstBpp; + FbBits *dst = 0; + FbStride dstStride = 0; + int dstBpp = 0; + int dstXoff = 0, dstYoff = 0; glyph = 0; if (pPriv->and == 0) { - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; @@ -426,12 +438,12 @@ if (glyph && gWidth <= sizeof (FbStip) * 8 && fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { - (*glyph) (dst + gy * dstStride, + (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, (FbStip *) pglyph, pPriv->fg, - gx, + gx + dstXoff, gHeight); } else Index: xc/programs/Xserver/fb/fbimage.c diff -u xc/programs/Xserver/fb/fbimage.c:1.6 xc/programs/Xserver/fb/fbimage.c:1.8 --- xc/programs/Xserver/fb/fbimage.c:1.6 Sat May 6 17:09:33 2000 +++ xc/programs/Xserver/fb/fbimage.c Fri Sep 7 11:15:31 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbimage.c,v 1.6 2000/05/06 21:09:33 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbimage.c,v 1.8 2001/09/07 15:15:31 keithp Exp $ */ #include "fb.h" #ifdef XFree86LOADER @@ -129,11 +129,12 @@ FbStip *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; int nbox; BoxPtr pbox; int x1, y1, x2, y2; - fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); for (nbox = REGION_NUM_RECTS (pClip), pbox = REGION_RECTS(pClip); @@ -158,9 +159,9 @@ srcStride, (x1 - x) * dstBpp, - dst + y1 * dstStride, + dst + (y1 + dstYoff) * dstStride, dstStride, - x1 * dstBpp, + (x1 + dstXoff) * dstBpp, (x2 - x1) * dstBpp, (y2 - y1), @@ -192,12 +193,13 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; int nbox; BoxPtr pbox; int x1, y1, x2, y2; - FbBits fgand, fgxor, bgand, bgxor; + FbBits fgand = 0, fgxor = 0, bgand = 0, bgxor = 0; - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); if (dstBpp == 1) { @@ -247,9 +249,9 @@ srcStride, (x1 - x) + srcX, - (FbStip *) (dst + y1 * dstStride), + (FbStip *) (dst + (y1 + dstYoff) * dstStride), FbBitsStrideToStipStride(dstStride), - x1 * dstBpp, + (x1 + dstXoff) * dstBpp, (x2 - x1) * dstBpp, (y2 - y1), @@ -264,9 +266,9 @@ srcStride, (x1 - x) + srcX, - dst + y1 * dstStride, + dst + (y1 + dstYoff) * dstStride, dstStride, - x1 * dstBpp, + (x1 + dstXoff) * dstBpp, dstBpp, (x2 - x1) * dstBpp, @@ -290,6 +292,7 @@ FbBits *src; FbStride srcStride; int srcBpp; + int srcXoff, srcYoff; FbStip *dst; FbStride dstStride; @@ -309,7 +312,7 @@ } #endif - fbGetDrawable (pDrawable, src, srcStride, srcBpp); + fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); x += pDrawable->x; y += pDrawable->y; @@ -324,9 +327,9 @@ if (pm != FB_ALLONES) memset (d, 0, dstStride * h); dstStride /= sizeof (FbStip); - fbBltStip ((FbStip *) (src + y * srcStride), + fbBltStip ((FbStip *) (src + (y + srcYoff) * srcStride), FbBitsStrideToStipStride(srcStride), - x * srcBpp, + (x + srcXoff) * srcBpp, dst, dstStride, @@ -341,9 +344,9 @@ else { dstStride = BitmapBytePad(w) / sizeof (FbStip); - fbBltPlane (src + y * srcStride, + fbBltPlane (src + (y + srcYoff) * srcStride, srcStride, - x * srcBpp, + (x + srcXoff) * srcBpp, srcBpp, dst, Index: xc/programs/Xserver/fb/fbpict.c diff -u xc/programs/Xserver/fb/fbpict.c:1.8 xc/programs/Xserver/fb/fbpict.c:1.12 --- xc/programs/Xserver/fb/fbpict.c:1.8 Thu Feb 8 21:12:17 2001 +++ xc/programs/Xserver/fb/fbpict.c Mon Jul 16 01:04:05 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.8 2001/02/09 02:12:17 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.12 2001/07/16 05:04:05 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -99,6 +99,43 @@ return m|n|o|p; } +#define fbComposeGetSolid(pict, bits) { \ + FbBits *__bits__; \ + FbStride __stride__; \ + int __bpp__; \ + int __xoff__,__yoff__; \ +\ + fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \ + switch (__bpp__) { \ + case 32: \ + (bits) = *(CARD32 *) __bits__; \ + break; \ + case 24: \ + (bits) = Fetch24 ((CARD8 *) __bits__); \ + break; \ + case 16: \ + (bits) = *(CARD16 *) __bits__; \ + (bits) = cvt0565to8888(bits); \ + break; \ + default: \ + return; \ + } \ + /* manage missing src alpha */ \ + if ((pict)->pFormat->direct.alphaMask == 0) \ + (bits) |= 0xff000000; \ +} + +#define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\ + FbBits *__bits__; \ + FbStride __stride__; \ + int __bpp__; \ + int __xoff__,__yoff__; \ +\ + fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \ + (stride) = __stride__ * sizeof (FbBits) / sizeof (type); \ + (line) = ((type *) __bits__) + (stride) * ((y) - __yoff__) + (mul) * ((x) - __xoff__); \ +} + /* * Naming convention: * @@ -122,43 +159,18 @@ CARD32 src, srca; CARD32 *dstLine, *dst, d, dstMask; CARD8 *maskLine, *mask, m; - FbBits *dstBits, *maskBits, *srcBits; - FbStride dstStride, maskStride, srcStride; - int dstBpp, maskBpp, srcBpp; + FbStride dstStride, maskStride; CARD16 w; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - switch (srcBpp) { - case 32: - src = *(CARD32 *) srcBits; - break; - case 24: - src = Fetch24 ((CARD8 *) srcBits); - break; - case 16: - src = *(CARD16 *) srcBits; - src = cvt0565to8888(src); - break; - default: - return; - } - /* manage missing src alpha */ - if (pSrc->pFormat->direct.alphaMask == 0) - src |= 0xff000000; + fbComposeGetSolid(pSrc, src); + dstMask = FbFullMask (pDst->pDrawable->depth); srca = src >> 24; if (src == 0) return; - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD32 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD32); - dstLine += dstStride * yDst + xDst; - - fbGetDrawable(pMask->pDrawable, maskBits, maskStride, maskBpp); - maskLine = (CARD8 *) maskBits; - maskStride = maskStride * sizeof (FbBits) / sizeof (CARD8); - maskLine += maskStride * yMask + xMask; + fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); + fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1); while (height--) { @@ -205,42 +217,19 @@ CARD32 src, srca; CARD32 *dstLine, *dst, d, dstMask; CARD32 *maskLine, *mask, ma; - FbBits *dstBits, *maskBits, *srcBits; - FbStride dstStride, maskStride, srcStride; - int dstBpp, maskBpp, srcBpp; + FbStride dstStride, maskStride; CARD16 w; CARD32 m, n, o, p; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - switch (srcBpp) { - case 32: - src = *(CARD32 *) srcBits; - break; - case 24: - src = Fetch24 ((CARD8 *) srcBits); - break; - case 16: - src = *(CARD16 *) srcBits; - src = cvt0565to8888(src); - break; - } - /* manage missing src alpha */ - if (pSrc->pFormat->direct.alphaMask == 0) - src |= 0xff000000; + fbComposeGetSolid(pSrc, src); + dstMask = FbFullMask (pDst->pDrawable->depth); srca = src >> 24; if (src == 0) return; - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD32 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD32); - dstLine += dstStride * yDst + xDst; - - fbGetDrawable(pMask->pDrawable, maskBits, maskStride, maskBpp); - maskLine = (CARD32 *) maskBits; - maskStride = maskStride * sizeof (FbBits) / sizeof (CARD32); - maskLine += maskStride * yMask + xMask; + fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); + fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1); while (height--) { @@ -302,40 +291,17 @@ CARD8 *dstLine, *dst; CARD32 d; CARD8 *maskLine, *mask, m; - FbBits *dstBits, *maskBits, *srcBits; - FbStride dstStride, maskStride, srcStride; - int dstBpp, maskBpp, srcBpp; + FbStride dstStride, maskStride; CARD16 w; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - switch (srcBpp) { - case 32: - src = *(CARD32 *) srcBits; - break; - case 24: - src = Fetch24 ((CARD8 *) srcBits); - break; - case 16: - src = *(CARD16 *) srcBits; - src = cvt0565to8888(src); - break; - } - /* manage missing src alpha */ - if (pSrc->pFormat->direct.alphaMask == 0) - src |= 0xff000000; + fbComposeGetSolid(pSrc, src); + srca = src >> 24; if (src == 0) return; - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD8 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD8); - dstLine += dstStride * yDst + xDst * 3; - - fbGetDrawable(pMask->pDrawable, maskBits, maskStride, maskBpp); - maskLine = (CARD8 *) maskBits; - maskStride = maskStride * sizeof (FbBits) / sizeof (CARD8); - maskLine += maskStride * yMask + xMask; + fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 3); + fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1); while (height--) { @@ -387,40 +353,17 @@ CARD16 *dstLine, *dst; CARD32 d; CARD8 *maskLine, *mask, m; - FbBits *dstBits, *maskBits, *srcBits; - FbStride dstStride, maskStride, srcStride; - int dstBpp, maskBpp, srcBpp; + FbStride dstStride, maskStride; CARD16 w; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - switch (srcBpp) { - case 32: - src = *(CARD32 *) srcBits; - break; - case 24: - src = Fetch24 ((CARD8 *) srcBits); - break; - case 16: - src = *(CARD16 *) srcBits; - src = cvt0565to8888(src); - break; - } - /* manage missing src alpha */ - if (pSrc->pFormat->direct.alphaMask == 0) - src |= 0xff000000; + fbComposeGetSolid(pSrc, src); + srca = src >> 24; if (src == 0) return; - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD16 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD16); - dstLine += dstStride * yDst + xDst; - - fbGetDrawable(pMask->pDrawable, maskBits, maskStride, maskBpp); - maskLine = (CARD8 *) maskBits; - maskStride = maskStride * sizeof (FbBits) / sizeof (CARD8); - maskLine += maskStride * yMask + xMask; + fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); + fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1); while (height--) { @@ -456,6 +399,79 @@ } void +fbCompositeSolidMask_nx8888x0565C (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + CARD32 src, srca; + CARD16 src16; + CARD16 *dstLine, *dst; + CARD32 d; + CARD32 *maskLine, *mask, ma; + FbStride dstStride, maskStride; + CARD16 w; + CARD32 m, n, o; + + fbComposeGetSolid(pSrc, src); + + srca = src >> 24; + if (src == 0) + return; + + src16 = cvt8888to0565(src); + + fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); + fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1); + + while (height--) + { + dst = dstLine; + dstLine += dstStride; + mask = maskLine; + maskLine += maskStride; + w = width; + + while (w--) + { + ma = *mask++; + if (ma == 0xffffffff) + { + if (srca == 0xff) + { + *dst = src16; + } + else + { + d = *dst; + d = fbOver24 (src, cvt0565to8888(d)); + *dst = cvt8888to0565(d); + } + } + else if (ma) + { + d = *dst; + d = cvt0565to8888(d); + FbInOverC (src, srca, ma, d, 0, m); + FbInOverC (src, srca, ma, d, 8, n); + FbInOverC (src, srca, ma, d, 16, o); + d = m|n|o; + *dst = cvt8888to0565(d); + } + dst++; + } + } +} + +void fbCompositeSrc_8888x8888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -471,22 +487,14 @@ { CARD32 *dstLine, *dst, dstMask; CARD32 *srcLine, *src, s; - CARD8 a; - FbBits *dstBits, *srcBits; FbStride dstStride, srcStride; - int dstBpp, srcBpp; + CARD8 a; CARD16 w; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - srcLine = (CARD32 *) srcBits; - srcStride = srcStride * sizeof (FbBits) / sizeof (CARD32); - srcLine += srcStride * ySrc + xSrc; - + fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); + fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1); + dstMask = FbFullMask (pDst->pDrawable->depth); - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD32 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD32); - dstLine += dstStride * yDst + xDst; while (height--) { @@ -527,21 +535,12 @@ CARD32 d; CARD32 *srcLine, *src, s; CARD8 a; - FbBits *dstBits, *srcBits; FbStride dstStride, srcStride; - int dstBpp, srcBpp; CARD16 w; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - srcLine = (CARD32 *) srcBits; - srcStride = srcStride * sizeof (FbBits) / sizeof (CARD32); - srcLine += srcStride * ySrc + xSrc; - - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD8 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD8); - dstLine += dstStride * yDst + xDst * 3; - + fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 3); + fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1); + while (height--) { dst = dstLine; @@ -585,20 +584,11 @@ CARD32 d; CARD32 *srcLine, *src, s; CARD8 a; - FbBits *dstBits, *srcBits; FbStride dstStride, srcStride; - int dstBpp, srcBpp; CARD16 w; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - srcLine = (CARD32 *) srcBits; - srcStride = srcStride * sizeof (FbBits) / sizeof (CARD32); - srcLine += srcStride * ySrc + xSrc; - - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD16 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD16); - dstLine += dstStride * yDst + xDst; + fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1); + fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); while (height--) { @@ -644,21 +634,13 @@ { CARD16 *dstLine, *dst; CARD16 *srcLine, *src; - FbBits *dstBits, *srcBits; FbStride dstStride, srcStride; - int dstBpp, srcBpp; CARD16 w; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - srcLine = (CARD16 *) srcBits; - srcStride = srcStride * sizeof (FbBits) / sizeof (CARD16); - srcLine += srcStride * ySrc + xSrc; - - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD16 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD16); - dstLine += dstStride * yDst + xDst; + fbComposeGetStart (pSrc, xSrc, ySrc, CARD16, srcStride, srcLine, 1); + fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); + while (height--) { dst = dstLine; @@ -688,22 +670,13 @@ { CARD8 *dstLine, *dst; CARD8 *srcLine, *src; - FbBits *dstBits, *srcBits; FbStride dstStride, srcStride; - int dstBpp, srcBpp; CARD8 w; CARD8 s, d; CARD16 t; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - srcLine = (CARD8 *) srcBits; - srcStride = srcStride * sizeof (FbBits) / sizeof (CARD8); - srcLine += srcStride * ySrc + xSrc; - - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); - dstLine = (CARD8 *) dstBits; - dstStride = dstStride * sizeof (FbBits) / sizeof (CARD8); - dstLine += dstStride * yDst + xDst; + fbComposeGetStart (pSrc, xSrc, ySrc, CARD8, srcStride, srcLine, 1); + fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1); while (height--) { @@ -728,6 +701,59 @@ } void +fbCompositeSrcAdd_8888x8888 (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + CARD32 *dstLine, *dst; + CARD32 *srcLine, *src; + FbStride dstStride, srcStride; + CARD16 w; + CARD32 s, d; + CARD16 t; + CARD32 m,n,o,p; + + fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1); + fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); + + while (height--) + { + dst = dstLine; + dstLine += dstStride; + src = srcLine; + srcLine += srcStride; + w = width; + + while (w--) + { + s = *src++; + if (s != 0xffffffff) + { + d = *dst; + if (d) + { + m = FbAdd(s,d,0,t); + n = FbAdd(s,d,8,t); + o = FbAdd(s,d,16,t); + p = FbAdd(s,d,24,t); + s = m|n|o|p; + } + } + *dst++ = s; + } + } +} + +void fbCompositeSrcAdd_1000x1000 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -744,18 +770,20 @@ FbBits *dstBits, *srcBits; FbStride dstStride, srcStride; int dstBpp, srcBpp; + int dstXoff, dstYoff; + int srcXoff, srcYoff; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); + fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff); - fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp); + fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); - fbBlt (srcBits + srcStride * ySrc, + fbBlt (srcBits + srcStride * (ySrc + srcYoff), srcStride, - xSrc, + xSrc + srcXoff, - dstBits + dstStride * yDst, + dstBits + dstStride * (yDst + dstYoff), dstStride, - xDst, + xDst + dstXoff, width, height, @@ -782,28 +810,18 @@ CARD16 width, CARD16 height) { - FbBits *dstBits, *srcBits; + FbBits *dstBits; FbStip *maskBits; - FbStride dstStride, maskStride, srcStride; - int dstBpp, maskBpp, srcBpp; + FbStride dstStride, maskStride; + int dstBpp, maskBpp; + int dstXoff, dstYoff; + int maskXoff, maskYoff; FbBits src; - fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp); - switch (srcBpp) { - case 32: - src = *(CARD32 *) srcBits; - break; - case 24: - src = Fetch24 ((CARD8 *) srcBits); - break; - case 16: - src = *(CARD16 *) srcBits; - src = cvt0565to8888(src); - break; - } + fbComposeGetSolid(pSrc, src); - fbGetStipDrawable (pMask->pDrawable, maskBits, maskStride, maskBpp); - fbGetDrawable (pDst->pDrawable, dstBits, dstStride, dstBpp); + fbGetStipDrawable (pMask->pDrawable, maskBits, maskStride, maskBpp, maskXoff, maskYoff); + fbGetDrawable (pDst->pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff); switch (dstBpp) { case 32: @@ -817,13 +835,13 @@ src = fbReplicatePixel (src, dstBpp); - fbBltOne (maskBits + maskStride * yMask, + fbBltOne (maskBits + maskStride * (yMask + maskYoff), maskStride, - xMask, + xMask + maskXoff, - dstBits + dstStride * yDst, + dstBits + dstStride * (yDst + dstYoff), dstStride, - xDst * dstBpp, + (xDst + dstXoff) * dstBpp, dstBpp, width * dstBpp, @@ -857,6 +875,9 @@ CompositeFunc func; Bool srcRepeat = pSrc->repeat; Bool maskRepeat = FALSE; + Bool srcAlphaMap = pSrc->alphaMap != 0; + Bool maskAlphaMap = FALSE; + Bool dstAlphaMap = pDst->alphaMap != 0; int x_msk, y_msk, x_src, y_src, x_dst, y_dst; int w, h, w_this, h_this; @@ -869,6 +890,7 @@ xMask += pMask->pDrawable->x; yMask += pMask->pDrawable->y; maskRepeat = pMask->repeat; + maskAlphaMap = pMask->alphaMap != 0; } if (!miComputeCompositeRegion (®ion, @@ -886,6 +908,7 @@ return; func = fbCompositeGeneral; + if (!maskAlphaMap && !srcAlphaMap && !dstAlphaMap) switch (op) { case PictOpOver: if (pMask) @@ -922,6 +945,9 @@ case PICT_x8r8g8b8: func = fbCompositeSolidMask_nx8888x8888C; break; + case PICT_r5g6b5: + func = fbCompositeSolidMask_nx8888x0565C; + break; } } break; @@ -932,6 +958,9 @@ case PICT_x8b8g8r8: func = fbCompositeSolidMask_nx8888x8888C; break; + case PICT_b5g6r5: + func = fbCompositeSolidMask_nx8888x0565C; + break; } } break; @@ -1006,18 +1035,34 @@ if (pMask == 0) { switch (pSrc->format) { + case PICT_a8r8g8b8: + switch (pDst->format) { + case PICT_a8r8g8b8: + func = fbCompositeSrcAdd_8888x8888; + break; + } + break; + case PICT_a8b8g8r8: + switch (pDst->format) { + case PICT_a8b8g8r8: + func = fbCompositeSrcAdd_8888x8888; + break; + } + break; case PICT_a8: switch (pDst->format) { case PICT_a8: func = fbCompositeSrcAdd_8000x8000; break; } + break; case PICT_a1: switch (pDst->format) { case PICT_a1: func = fbCompositeSrcAdd_1000x1000; break; } + break; } } break; Index: xc/programs/Xserver/fb/fbpict.h diff -u xc/programs/Xserver/fb/fbpict.h:1.3 xc/programs/Xserver/fb/fbpict.h:1.8 --- xc/programs/Xserver/fb/fbpict.h:1.3 Sun Jan 21 16:19:09 2001 +++ xc/programs/Xserver/fb/fbpict.h Thu Aug 16 04:03:25 2001 @@ -1,5 +1,5 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.3 2001/01/21 21:19:09 tsi Exp $ + * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.8 2001/08/16 08:03:25 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -26,6 +26,7 @@ #define _FBPICT_H_ #define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) ) +#define FbIntDiv(a,b) (((CARD16) (a) * 255) / (b)) #define FbGet8(v,i) ((CARD16) (CARD8) ((v) >> i)) @@ -47,9 +48,10 @@ #define FbInC(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i)) -#define FbGen(x,y,i,ax,ay,t) ((t) = (FbIntMult(FbGet8(y,i),ay,(t)) + \ - FbIntMult(FbGet8(x,i),ax,(t))),\ - (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) +#define FbGen(x,y,i,ax,ay,t,u,v) ((t) = (FbIntMult(FbGet8(y,i),ay,(u)) + \ + FbIntMult(FbGet8(x,i),ax,(v))),\ + (CARD32) ((CARD8) ((t) | \ + (0 - ((t) >> 8)))) << (i)) #define FbAdd(x,y,i,t) ((t) = FbGet8(x,i) + FbGet8(y,i), \ (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) @@ -68,18 +70,23 @@ CARD16 width, CARD16 height); -typedef CARD32 (*FbCompositeFetch)(FbBits *line, CARD32 offset); -typedef void (*FbCompositeStore) (FbBits *line, CARD32 offset, CARD32 value); +typedef struct _FbCompositeOperand FbCompositeOperand; -typedef struct _FbCompositeOperand { +typedef CARD32 (*FbCompositeFetch)(FbCompositeOperand *op); +typedef void (*FbCompositeStore) (FbCompositeOperand *op, CARD32 value); + +struct _FbCompositeOperand { FbBits *line; CARD32 offset; FbStride stride; + int xoff; + int yoff; int bpp; FbCompositeFetch fetch; FbCompositeFetch fetcha; FbCompositeStore store; -} FbCompositeOperand; + miIndexedPtr indexed; +}; typedef void (*FbCombineFunc) (FbCompositeOperand *src, FbCompositeOperand *msk, @@ -104,223 +111,336 @@ /* fbcompose.c */ +typedef struct _fbCompSrc { + CARD32 value; + CARD32 alpha; +} FbCompSrc; + /* * All compositing operators * */ CARD32 +fbCombineMaskU (FbCompositeOperand *src, + FbCompositeOperand *msk); + +FbCompSrc +fbCombineMaskC (FbCompositeOperand *src, + FbCompositeOperand *msk); + +CARD32 +fbCombineMaskValueC (FbCompositeOperand *src, + FbCompositeOperand *msk); + +CARD32 +fbCombineMaskAlphaU (FbCompositeOperand *src, + FbCompositeOperand *msk); + +CARD32 +fbCombineMaskAlphaC (FbCompositeOperand *src, + FbCompositeOperand *msk); + + +#if 0 +CARD32 FbCombineMask (FbCompositeOperand *src, FbCompositeOperand *msk); +#endif void -FbCombineClear (FbCompositeOperand *src, +fbCombineClear (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst); void -FbCombineSrc (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineSrcU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineDst (FbCompositeOperand *src, +fbCombineSrcC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineDst (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst); +void +fbCombineOverU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + void -FbCombineOver (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineOverC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineOverReverse (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineOverReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineIn (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineOverReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineInReverse (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineInU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineOut (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineInC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineOutReverse (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineInReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineAtop (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineInReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineAtopReverse (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineOutU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineXor (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineOutC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineAdd (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineOutReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); void -FbCombineSaturate (FbCompositeOperand *src, - FbCompositeOperand *msk, - FbCompositeOperand *dst); +fbCombineOutReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); +void +fbCombineAtopU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + + +void +fbCombineAtopC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineAtopReverseU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); +void +fbCombineAtopReverseC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineXorU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineXorC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + + +void +fbCombineAddU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineAddC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineSaturateU (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + +void +fbCombineSaturateC (FbCompositeOperand *src, + FbCompositeOperand *msk, + FbCompositeOperand *dst); + /* * All fetch functions */ +CARD32 +fbFetch_a8r8g8b8 (FbCompositeOperand *op); + +CARD32 +fbFetch_x8r8g8b8 (FbCompositeOperand *op); + CARD32 -fbFetch_a8r8g8b8 (FbBits *line, CARD32 offset); +fbFetch_a8b8g8r8 (FbCompositeOperand *op); CARD32 -fbFetch_x8r8g8b8 (FbBits *line, CARD32 offset); +fbFetch_x8b8g8r8 (FbCompositeOperand *op); CARD32 -fbFetch_a8b8g8r8 (FbBits *line, CARD32 offset); +fbFetch_r8g8b8 (FbCompositeOperand *op); CARD32 -fbFetch_x8b8g8r8 (FbBits *line, CARD32 offset); +fbFetch_b8g8r8 (FbCompositeOperand *op); CARD32 -fbFetch_r8g8b8 (FbBits *line, CARD32 offset); +fbFetch_r5g6b5 (FbCompositeOperand *op); CARD32 -fbFetch_b8g8r8 (FbBits *line, CARD32 offset); +fbFetch_b5g6r5 (FbCompositeOperand *op); CARD32 -fbFetch_r5g6b5 (FbBits *line, CARD32 offset); +fbFetch_a1r5g5b5 (FbCompositeOperand *op); CARD32 -fbFetch_b5g6r5 (FbBits *line, CARD32 offset); +fbFetch_x1r5g5b5 (FbCompositeOperand *op); CARD32 -fbFetch_a1r5g5b5 (FbBits *line, CARD32 offset); +fbFetch_a1b5g5r5 (FbCompositeOperand *op); CARD32 -fbFetch_x1r5g5b5 (FbBits *line, CARD32 offset); +fbFetch_x1b5g5r5 (FbCompositeOperand *op); CARD32 -fbFetch_a1b5g5r5 (FbBits *line, CARD32 offset); +fbFetch_a8 (FbCompositeOperand *op); CARD32 -fbFetch_x1b5g5r5 (FbBits *line, CARD32 offset); +fbFetcha_a8 (FbCompositeOperand *op); CARD32 -fbFetch_a8 (FbBits *line, CARD32 offset); +fbFetch_r3g3b2 (FbCompositeOperand *op); CARD32 -fbFetch_r3g3b2 (FbBits *line, CARD32 offset); +fbFetch_b2g3r3 (FbCompositeOperand *op); CARD32 -fbFetch_b2g3r3 (FbBits *line, CARD32 offset); +fbFetch_a2r2g2b2 (FbCompositeOperand *op); CARD32 -fbFetch_a2r2g2b2 (FbBits *line, CARD32 offset); +fbFetch_a2b2g2r2 (FbCompositeOperand *op); CARD32 -fbFetch_a2b2g2r2 (FbBits *line, CARD32 offset); +fbFetch_a4 (FbCompositeOperand *op); CARD32 -fbFetch_a4 (FbBits *line, CARD32 offset); +fbFetcha_a4 (FbCompositeOperand *op); CARD32 -fbFetch_r1g2b1 (FbBits *line, CARD32 offset); +fbFetch_r1g2b1 (FbCompositeOperand *op); CARD32 -fbFetch_b1g2r1 (FbBits *line, CARD32 offset); +fbFetch_b1g2r1 (FbCompositeOperand *op); CARD32 -fbFetch_a1r1g1b1 (FbBits *line, CARD32 offset); +fbFetch_a1r1g1b1 (FbCompositeOperand *op); CARD32 -fbFetch_a1b1g1r1 (FbBits *line, CARD32 offset); +fbFetch_a1b1g1r1 (FbCompositeOperand *op); CARD32 -fbFetch_a1 (FbBits *line, CARD32 offset); +fbFetch_a1 (FbCompositeOperand *op); +CARD32 +fbFetcha_a1 (FbCompositeOperand *op); + void -fbStore_a8r8g8b8 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a8r8g8b8 (FbCompositeOperand *op, CARD32 value); void -fbStore_x8r8g8b8 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_x8r8g8b8 (FbCompositeOperand *op, CARD32 value); void -fbStore_a8b8g8r8 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a8b8g8r8 (FbCompositeOperand *op, CARD32 value); void -fbStore_x8b8g8r8 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_x8b8g8r8 (FbCompositeOperand *op, CARD32 value); void -fbStore_r8g8b8 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_r8g8b8 (FbCompositeOperand *op, CARD32 value); void -fbStore_b8g8r8 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_b8g8r8 (FbCompositeOperand *op, CARD32 value); void -fbStore_r5g6b5 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_r5g6b5 (FbCompositeOperand *op, CARD32 value); void -fbStore_b5g6r5 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_b5g6r5 (FbCompositeOperand *op, CARD32 value); void -fbStore_a1r5g5b5 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a1r5g5b5 (FbCompositeOperand *op, CARD32 value); void -fbStore_x1r5g5b5 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_x1r5g5b5 (FbCompositeOperand *op, CARD32 value); void -fbStore_a1b5g5r5 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a1b5g5r5 (FbCompositeOperand *op, CARD32 value); void -fbStore_x1b5g5r5 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_x1b5g5r5 (FbCompositeOperand *op, CARD32 value); void -fbStore_a8 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a8 (FbCompositeOperand *op, CARD32 value); void -fbStore_r3g3b2 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_r3g3b2 (FbCompositeOperand *op, CARD32 value); void -fbStore_b2g3r3 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_b2g3r3 (FbCompositeOperand *op, CARD32 value); void -fbStore_a2r2g2b2 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a2r2g2b2 (FbCompositeOperand *op, CARD32 value); void -fbStore_a4 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a4 (FbCompositeOperand *op, CARD32 value); void -fbStore_r1g2b1 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_r1g2b1 (FbCompositeOperand *op, CARD32 value); void -fbStore_b1g2r1 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_b1g2r1 (FbCompositeOperand *op, CARD32 value); void -fbStore_a1r1g1b1 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a1r1g1b1 (FbCompositeOperand *op, CARD32 value); void -fbStore_a1b1g1r1 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a1b1g1r1 (FbCompositeOperand *op, CARD32 value); void -fbStore_a1 (FbBits *line, CARD32 offset, CARD32 value); +fbStore_a1 (FbCompositeOperand *op, CARD32 value); + +CARD32 +fbFetch_external (FbCompositeOperand *op); + +CARD32 +fbFetcha_external (FbCompositeOperand *op); + +void +fbStore_external (FbCompositeOperand *op, CARD32 value); + +Bool +fbBuildOneCompositeOperand (PicturePtr pPict, + FbCompositeOperand *op, + INT16 x, + INT16 y); Bool fbBuildCompositeOperand (PicturePtr pPict, @@ -347,6 +467,9 @@ fbOver (CARD32 x, CARD32 y); CARD32 +fbOver24 (CARD32 x, CARD32 y); + +CARD32 fbIn (CARD32 x, CARD8 y); void @@ -378,6 +501,20 @@ CARD16 height); void +fbCompositeSolidMask_nx8888x8888C (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +void fbCompositeSolidMask_nx8x0565 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -392,6 +529,20 @@ CARD16 height); void +fbCompositeSolidMask_nx8888x0565C (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +void fbCompositeSrc_8888x8888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -446,6 +597,62 @@ INT16 yDst, CARD16 width, CARD16 height); + +void +fbCompositeSrcAdd_8000x8000 (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +void +fbCompositeSrcAdd_8888x8888 (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +void +fbCompositeSrcAdd_1000x1000 (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); + +void +fbCompositeSolidMask_nx1xn (CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height); void fbComposite (CARD8 op, Index: xc/programs/Xserver/fb/fbpixmap.c diff -u xc/programs/Xserver/fb/fbpixmap.c:1.8 xc/programs/Xserver/fb/fbpixmap.c:1.10 --- xc/programs/Xserver/fb/fbpixmap.c:1.8 Mon Sep 18 01:43:40 2000 +++ xc/programs/Xserver/fb/fbpixmap.c Fri Sep 7 11:15:31 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbpixmap.c,v 1.8 2000/09/18 05:43:40 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbpixmap.c,v 1.10 2001/09/07 15:15:31 keithp Exp $ */ #include "fb.h" #ifdef IN_MODULE @@ -134,7 +134,7 @@ register RegionPtr pReg; FbBits *pw, w; register int ib; - int width, h, base, rx1, crects; + int width, h, base, rx1 = 0, crects; FbBits *pwLineEnd; int irectPrevStart, irectLineStart; register BoxPtr prectO, prectN; @@ -340,12 +340,13 @@ { FbStip *bits, *first, *last; int stride, bpp; + int xoff, yoff; int height; Bool failed; if (pDrawable->type != DRAWABLE_PIXMAP) pDrawable = (DrawablePtr) fbGetWindowPixmap(pDrawable); - fbGetStipDrawable(pDrawable, bits, stride, bpp); + fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); first = bits - stride; last = bits + stride * pDrawable->height; if (!fbValidateBits (first, stride, FB_HEAD_BITS) || @@ -365,8 +366,9 @@ { FbStip *bits, *first, *last; int stride, bpp; + int xoff, yoff; - fbGetStipDrawable(pDrawable, bits, stride, bpp); + fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); first = bits - stride; last = bits + stride * pDrawable->height; fbSetBits (first, stride, FB_HEAD_BITS); Index: xc/programs/Xserver/fb/fbpoint.c diff -u xc/programs/Xserver/fb/fbpoint.c:1.7 xc/programs/Xserver/fb/fbpoint.c:1.8 --- xc/programs/Xserver/fb/fbpoint.c:1.7 Fri Sep 22 01:58:01 2000 +++ xc/programs/Xserver/fb/fbpoint.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbpoint.c,v 1.7 2000/09/22 05:58:01 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbpoint.c,v 1.8 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" @@ -114,6 +114,7 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbDots dots; FbBits and, xor; xPoint *ppt; @@ -134,7 +135,7 @@ ppt->y += (ppt-1)->y; } } - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); and = pPriv->and; xor = pPriv->xor; dots = fbDots; @@ -151,5 +152,5 @@ for (nBox = REGION_NUM_RECTS (pClip), pBox = REGION_RECTS (pClip); nBox--; pBox++) (*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, - pDrawable->x, pDrawable->y, and, xor); + pDrawable->x + dstXoff, pDrawable->y + dstYoff, and, xor); } Index: xc/programs/Xserver/fb/fbpush.c diff -u xc/programs/Xserver/fb/fbpush.c:1.4 xc/programs/Xserver/fb/fbpush.c:1.5 --- xc/programs/Xserver/fb/fbpush.c:1.4 Wed Feb 23 15:29:46 2000 +++ xc/programs/Xserver/fb/fbpush.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbpush.c,v 1.4 2000/02/23 20:29:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbpush.c,v 1.5 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" @@ -119,12 +119,13 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; int dstX; int dstWidth; - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); - dst = dst + y * dstStride; - dstX = x * dstBpp; + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst = dst + (y + dstYoff) * dstStride; + dstX = (x + dstXoff) * dstBpp; dstWidth = width * dstBpp; if (dstBpp == 1) { @@ -232,8 +233,9 @@ FbStip *stip; FbStride stipStride; int stipBpp; + int stipXoff, stipYoff; /* Assumed to be zero */ - fbGetStipDrawable (&pBitmap->drawable, stip, stipStride, stipBpp); + fbGetStipDrawable (&pBitmap->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); fbPushImage (pDrawable, pGC, stip, stipStride, 0, Index: xc/programs/Xserver/fb/fbscreen.c diff -u xc/programs/Xserver/fb/fbscreen.c:1.12 xc/programs/Xserver/fb/fbscreen.c:1.13 --- xc/programs/Xserver/fb/fbscreen.c:1.12 Mon Sep 18 01:43:40 2000 +++ xc/programs/Xserver/fb/fbscreen.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbscreen.c,v 1.12 2000/09/18 05:43:40 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbscreen.c,v 1.13 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" @@ -80,6 +80,24 @@ } } +#ifndef FB_OLD_SCREEN +PixmapPtr +_fbGetWindowPixmap (WindowPtr pWindow) +{ + return fbGetWindowPixmap (pWindow); +} + +void +_fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap) +{ +#ifdef FB_NO_WINDOW_PIXMAPS + FatalError ("Attempted to set window pixmap without fb support\n"); +#else + pWindow->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap; +#endif +} +#endif + Bool fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */ @@ -123,6 +141,9 @@ pScreen->BitmapToRegion = fbPixmapToRegion; #ifndef FB_OLD_SCREEN + pScreen->GetWindowPixmap = _fbGetWindowPixmap; + pScreen->SetWindowPixmap = _fbSetWindowPixmap; + pScreen->BackingStoreFuncs.SaveAreas = fbSaveAreas; pScreen->BackingStoreFuncs.RestoreAreas = fbRestoreAreas; pScreen->BackingStoreFuncs.SetClipmaskRgn = 0; Index: xc/programs/Xserver/fb/fbseg.c diff -u xc/programs/Xserver/fb/fbseg.c:1.7 xc/programs/Xserver/fb/fbseg.c:1.8 --- xc/programs/Xserver/fb/fbseg.c:1.7 Wed Jan 17 02:40:02 2001 +++ xc/programs/Xserver/fb/fbseg.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbseg.c,v 1.7 2001/01/17 07:40:02 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbseg.c,v 1.8 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" #include "miline.h" @@ -47,15 +47,16 @@ FbStip *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); FbStip and = (FbStip) pPriv->and; FbStip xor = (FbStip) pPriv->xor; FbStip mask, mask0; FbStip bits; - fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp); - dst += (y1 * dstStride); - x1 *= dstBpp; + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * dstBpp; dst += x1 >> FB_STIP_SHIFT; x1 &= FB_STIP_MASK; mask0 = FbStipMask(0, dstBpp); @@ -128,6 +129,7 @@ FbStip *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); FbStip and = (FbStip) pPriv->and; FbStip xor = (FbStip) pPriv->xor; @@ -139,13 +141,13 @@ Bool even; Bool doOdd; - fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); doOdd = pGC->lineStyle == LineDoubleDash; FbDashInit (pGC, pPriv, dashOffset, dashlen, even); - dst += (y1 * dstStride); - x1 *= dstBpp; + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * dstBpp; dst += x1 >> FB_STIP_SHIFT; x1 &= FB_STIP_MASK; mask0 = FbStipMask(0, dstBpp); @@ -337,6 +339,7 @@ FbStip *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); FbStip and = pPriv->and; FbStip xor = pPriv->xor; @@ -347,9 +350,9 @@ int rot; FbStip andT, xorT; - fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp); - dst += (y1 * dstStride); - x1 *= 24; + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * 24; if (signdy < 0) dstStride = -dstStride; signdx *= 24; @@ -410,6 +413,7 @@ FbStip *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate (pGC); FbStip andT, xorT; FbStip fgand = pPriv->and; @@ -426,14 +430,14 @@ Bool even; Bool doOdd; - fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); doOdd = pGC->lineStyle == LineDoubleDash; /* compute current dash position */ FbDashInit(pGC, pPriv, dashOffset, dashlen, even); - dst += (y1 * dstStride); - x1 *= 24; + dst += ((y1 + dstYoff) * dstStride); + x1 = (x1 + dstXoff) * 24; if (signdy < 0) dstStride = -dstStride; signdx *= 24; Index: xc/programs/Xserver/fb/fbsetsp.c diff -u xc/programs/Xserver/fb/fbsetsp.c:1.4 xc/programs/Xserver/fb/fbsetsp.c:1.5 --- xc/programs/Xserver/fb/fbsetsp.c:1.4 Sat May 6 17:09:34 2000 +++ xc/programs/Xserver/fb/fbsetsp.c Tue May 29 00:54:09 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbsetsp.c,v 1.4 2000/05/06 21:09:34 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbsetsp.c,v 1.5 2001/05/29 04:54:09 keithp Exp $ */ #include "fb.h" @@ -39,6 +39,7 @@ FbBits *dst, *d, *s; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; BoxPtr pbox; int n; int xoff; @@ -51,10 +52,10 @@ return; } #endif - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nspans--) { - d = dst + ppt->y * dstStride; + d = dst + (ppt->y + dstYoff) * dstStride; xoff = (int) (((long) src) & (FB_MASK >> 3)); s = (FbBits *) (src - xoff); xoff <<= 3; @@ -78,7 +79,7 @@ (x1 - ppt->x) * dstBpp + xoff, d, dstStride, - x1 * dstBpp, + (x1 + dstXoff) * dstBpp, (x2 - x1) * dstBpp, 1, Index: xc/programs/Xserver/fb/fbsolid.c diff -u xc/programs/Xserver/fb/fbsolid.c:1.7 xc/programs/Xserver/fb/fbsolid.c:1.8 --- xc/programs/Xserver/fb/fbsolid.c:1.7 Fri Sep 22 01:58:01 2000 +++ xc/programs/Xserver/fb/fbsolid.c Sat Oct 27 23:33:08 2001 @@ -1,5 +1,5 @@ /* - * Id: fbsolid.c,v 1.1 1999/11/02 03:54:45 keithp Exp $ + * $XFree86: xc/programs/Xserver/fb/fbsolid.c,v 1.8 2001/10/28 03:33:08 tsi Exp $ * * Copyright © 1998 Keith Packard * @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbsolid.c,v 1.7 2000/09/22 05:58:01 keithp Exp $ */ #define FbSelectPart(xor,o,t) xor @@ -94,9 +93,9 @@ FbBits xor) { FbBits startmask, endmask; - FbBits xor0, xor1, xor2; - FbBits and0, and1, and2; - FbBits xorS, andS, xorE, andE; + FbBits xor0 = 0, xor1 = 0, xor2 = 0; + FbBits and0 = 0, and1 = 0, and2 = 0; + FbBits xorS = 0, andS = 0, xorE = 0, andE = 0; int n, nmiddle; int rotS, rot; Index: xc/programs/Xserver/fb/fbstipple.c diff -u xc/programs/Xserver/fb/fbstipple.c:1.6 xc/programs/Xserver/fb/fbstipple.c:1.7 --- xc/programs/Xserver/fb/fbstipple.c:1.6 Wed Feb 23 15:29:47 2000 +++ xc/programs/Xserver/fb/fbstipple.c Sat Oct 27 23:33:08 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbstipple.c,v 1.6 2000/02/23 20:29:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbstipple.c,v 1.7 2001/10/28 03:33:08 tsi Exp $ */ #include "fb.h" @@ -31,15 +31,17 @@ * code, the idea is to generate code for each case of a copy-mode * transparent stipple */ -#define LaneCases1(c,a) case c: while (n--) { FbLaneCase(c,a); a++; } break; -#define LaneCases2(c,a) LaneCases1(c,a) LaneCases1(c+1,a) -#define LaneCases4(c,a) LaneCases2(c,a) LaneCases2(c+2,a) -#define LaneCases8(c,a) LaneCases4(c,a) LaneCases4(c+4,a) -#define LaneCases16(c,a) LaneCases8(c,a) LaneCases8(c+8,a) -#define LaneCases32(c,a) LaneCases16(c,a) LaneCases16(c+16,a) -#define LaneCases64(c,a) LaneCases32(c,a) LaneCases32(c+32,a) -#define LaneCases128(c,a) LaneCases64(c,a) LaneCases64(c+64,a) -#define LaneCases256(c,a) LaneCases128(c,a) LaneCases128(c+128,a) +#define LaneCases1(c,a) case c: \ + while (n--) { (void)FbLaneCase(c,a); a++; } \ + break +#define LaneCases2(c,a) LaneCases1(c,a); LaneCases1(c+1,a) +#define LaneCases4(c,a) LaneCases2(c,a); LaneCases2(c+2,a) +#define LaneCases8(c,a) LaneCases4(c,a); LaneCases4(c+4,a) +#define LaneCases16(c,a) LaneCases8(c,a); LaneCases8(c+8,a) +#define LaneCases32(c,a) LaneCases16(c,a); LaneCases16(c+16,a) +#define LaneCases64(c,a) LaneCases32(c,a); LaneCases32(c+32,a) +#define LaneCases128(c,a) LaneCases64(c,a); LaneCases64(c+64,a) +#define LaneCases256(c,a) LaneCases128(c,a); LaneCases128(c+128,a) #if FB_SHIFT == 6 #define LaneCases(a) LaneCases256(0,a) Index: xc/programs/Xserver/fb/fbwindow.c diff -u xc/programs/Xserver/fb/fbwindow.c:1.7 xc/programs/Xserver/fb/fbwindow.c:1.9 --- xc/programs/Xserver/fb/fbwindow.c:1.7 Wed Aug 9 13:50:52 2000 +++ xc/programs/Xserver/fb/fbwindow.c Mon Jul 16 01:05:41 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.7 2000/08/09 17:50:52 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.9 2001/07/16 05:05:41 keithp Exp $ */ #include "fb.h" #ifdef IN_MODULE @@ -66,8 +66,6 @@ return TRUE; } -extern WindowPtr *WindowTable; - void fbCopyWindowProc (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -84,22 +82,24 @@ FbBits *src; FbStride srcStride; int srcBpp; + int srcXoff, srcYoff; FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; - fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp); - fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); + fbGetDrawable (pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nbox--) { - fbBlt (src + (pbox->y1 + dy) * srcStride, + fbBlt (src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, - (pbox->x1 + dx) * srcBpp, + (pbox->x1 + dx + srcXoff) * srcBpp, - dst + (pbox->y1) * dstStride, + dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - (pbox->x1) * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * dstBpp, (pbox->y2 - pbox->y1), @@ -203,16 +203,17 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; int n = REGION_NUM_RECTS(pRegion); BoxPtr pbox = REGION_RECTS(pRegion); - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (n--) { - fbSolid (dst + pbox->y1 * dstStride, + fbSolid (dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - pbox->x1 * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, dstBpp, (pbox->x2 - pbox->x1) * dstBpp, pbox->y2 - pbox->y1, @@ -222,6 +223,11 @@ } } +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + void fbFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, @@ -230,23 +236,38 @@ FbBits *dst; FbStride dstStride; int dstBpp; + int dstXoff, dstYoff; FbBits *tile; FbStride tileStride; - int tileBpp; - int tileWidth, tileHeight; - int n = REGION_NUM_RECTS(pRegion); - BoxPtr pbox = REGION_RECTS(pRegion); - - fbGetDrawable (pDrawable, dst, dstStride, dstBpp); - fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp); + int tileBpp; + int tileXoff, tileYoff; /* XXX assumed to be zero */ + int tileWidth, tileHeight; + int n = REGION_NUM_RECTS(pRegion); + BoxPtr pbox = REGION_RECTS(pRegion); + int xRot = pDrawable->x; + int yRot = pDrawable->y; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) + { + int index = pDrawable->pScreen->myNum; + if(&WindowTable[index]->drawable == pDrawable) + { + xRot -= panoramiXdataPtr[index].x; + yRot -= panoramiXdataPtr[index].y; + } + } +#endif + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; while (n--) { - fbTile (dst + pbox->y1 * dstStride, + fbTile (dst + (pbox->y1 + dstYoff) * dstStride, dstStride, - pbox->x1 * dstBpp, + (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * dstBpp, pbox->y2 - pbox->y1, tile, @@ -256,8 +277,8 @@ GXcopy, FB_ALLONES, dstBpp, - pDrawable->x * dstBpp, - pDrawable->y - pbox->y1); + xRot * dstBpp, + yRot - pbox->y1); pbox++; } } Index: xc/programs/Xserver/hw/darwin/Imakefile diff -u xc/programs/Xserver/hw/darwin/Imakefile:1.11 xc/programs/Xserver/hw/darwin/Imakefile:1.12 --- xc/programs/Xserver/hw/darwin/Imakefile:1.11 Fri May 18 13:48:32 2001 +++ xc/programs/Xserver/hw/darwin/Imakefile Wed Jan 9 13:07:23 2002 @@ -1,8 +1,10 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.11 2001/05/18 17:48:32 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/Imakefile,v 1.12 2002/01/09 18:07:23 torrey Exp $ #include #define IHaveSubdirs +LinkSourceFile(XFree86.man,../xfree86) + SRCS = darwin.c \ darwinKeyboard.c \ xfIOKit.c \ @@ -30,7 +32,7 @@ #endif DEFINES = $(CUSTOMVERDEF) $(QUARTZDEF) -EXTRAMANDEFS = $(QUARTZDEF) +EXTRAMANDEFS = $(QUARTZDEF) -D__logdir__=$(LOGDIRECTORY) NormalLibraryObjectRule() NormalLibraryTarget(darwin,$(OBJS)) @@ -38,6 +40,7 @@ AllTarget(xfIOKitStartup.o) InstallManPage(XDarwin,$(MANDIR)) +InstallManPage(XFree86,$(MANDIR)) DependTarget() Index: xc/programs/Xserver/hw/darwin/XDarwin.man diff -u xc/programs/Xserver/hw/darwin/XDarwin.man:1.1.2.1 xc/programs/Xserver/hw/darwin/XDarwin.man:1.4 --- xc/programs/Xserver/hw/darwin/XDarwin.man:1.1.2.1 Mon May 21 00:56:06 2001 +++ xc/programs/Xserver/hw/darwin/XDarwin.man Wed Jan 9 13:01:58 2002 @@ -1,4 +1,4 @@ -.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.1.2.1 2001/05/21 04:56:06 torrey Exp $ +.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.4 2002/01/09 18:01:58 torrey Exp $ .\" .TH XDARWIN 1 __vendorversion__ .SH NAME @@ -9,35 +9,56 @@ .SH DESCRIPTION #ifdef DARWIN_WITH_QUARTZ .I XDarwin -is the window server for Version 11 of the X window system on the Darwin -operating system. +is the X window server for Mac OS X and the Darwin operating system +provided by the XFree86 Project. .I XDarwin -can be started from the Darwin text console, or while running the Mac OS X -Aqua GUI. +can run in three different modes. On Mac OS X, +.I XDarwin +runs in parallel with Aqua in full screen or rootless modes. These modes +are called Quartz modes, named after the Quartz 2D compositing engine used +by Aqua. XDarwin can also be run from the Darwin text console in IOKit mode. .PP When running from the console, .I XDarwin -acts as the window server and uses IOKit services to accesss the display framebuffer, -mouse and keyboard and to provide a layer of hardware abstraction. In console mode, +acts as the window server and uses IOKit services to access the display +framebuffer, mouse and keyboard and to provide a layer of hardware +abstraction. In console mode, .I XDarwin will normally be started by the \fIxdm(1)\fP display manager or by a script that runs the program \fIxinit(1)\fP. .PP When running with the Mac OS X Aqua GUI, +.I XDarwin +will normally be started by launching from the Finder, but it may also be +started from the command line with the \fB\-quartz\fP, \fB\-fullscreen\fP, or +\fB\-rootless\fP options. Note that the defaults for various command line +options are set by the .I XDarwin -will normally be started by launching it from the Finder, but it may also be started from the command line with the \fB\-quartz\fP option. The +application preferences in the Quartz modes. +.PP +In full screen Quartz mode, when the X Window System is active, it takes over +the entire screen. CoreGraphics is used to capture and draw to the screen. The .I XDarwin application allows easy switching between the Mac OS X and X window -desktops. CoreGraphics is used to capture and draw to the screen. Note that the defaults for various command line options are set by the application preferences in this mode. +desktops. More information is available in the Help menu of the +.I XDarwin +application. +.PP +In rootless mode, the X window system and Aqua share your display. The root +window of the X11 display is the size of the screen and contains all the +other windows. The X11 root window is not displayed in rootless mode as Aqua +handles the desktop background. #else .I XDarwin -is the window server for Version 11 of the X window system on the Darwin -operating system. This version of +is the X window server for Mac OS X and the Darwin operating system +provided by the XFree86 Project. This version of .I XDarwin -can only be started from the Darwin text console. The Mac OS X Aqua GUI, if present, must be shut down. +can only be started from the Darwin text console. The Mac OS X Aqua GUI, if +present, must be shut down. .I XDarwin -uses IOKit services to accesss the display -framebuffer, mouse and keyboard and to provide a layer of hardware abstraction. +uses IOKit services to access the display +framebuffer, mouse and keyboard and to provide a layer of hardware +abstraction. .I XDarwin will normally be started by the \fIxdm(1)\fP display manager or by a script that runs the program \fIxinit(1)\fP. @@ -48,39 +69,68 @@ manual page, \fIXDarwin\fP accepts the following command line switches: .TP 8 .B \-fakebuttons -Emulates a 3 button mouse using the Command and Option keys. Clicking the +Emulates a 3 button mouse using modifier keys. By default, the Command modifier +is used to emulate button 2 and Option is used for button 3. Thus, clicking the first mouse button while holding down Command will act like clicking button 2. Holding down Option will simulate button 3. .TP 8 .B \-nofakebuttons Do not emulate a 3 button mouse. This is the default. .TP 8 +.B "\-fakemouse2 \fImodifiers\fP" +Change the modifier keys used to emulate the second mouse button. By default, +Command is used to emulate the second button. Any combination of the following +modifier names may be used: Shift, Option, Control, Command, Fn. For example, +.B \-fakemouse2 """Option,Shift"" +will set holding Option, Shift and clicking on button one as equivalent to +clicking the second mouse button. +.TP 8 +.B "\-fakemouse3 \fImodifiers\fP" +Change the modifier keys used to emulate the third mouse button. By default, +Option is used to emulate the third button. Any combination of the following +modifier names may be used: Shift, Option, Control, Command, Fn. For example, +.B \-fakemouse3 """Control,Shift"" +will set holding Control, Shift and clicking on button one as equivalent to +clicking the third mouse button. +.TP 8 .B "\-keymap \fIfile\fP" -On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. With this option the keymapping is read from a file instead of the kernel. If the file's path is not specified, it will be searched for in Library/Keyboards/ underneath the following directories (in order): ~, /, /Network, /System. +On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. +The default is to read this keymapping from USA.keymapping. With this option +the keymapping will be read from \fIfile\fP instead. If the file's path is +not specified, it will be searched for in Library/Keyboards/ underneath the +following directories (in order): ~, /, /Network, /System. +.TP 8 +.B \-nokeymap +On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. +With this option XDarwin queries the kernel for the current keymapping +instead of reading it from a file. This will often fail on newer kernels. #ifdef DARWIN_WITH_QUARTZ .TP 8 .B "\-size \fIwidth\fP \fIheight\fP" -Sets the screeen resolution for the X server to use. -This option is ignored if \fB\-quartz\fP is specified. +Sets the screen resolution for the X server to use. +Ignored in rootless mode. .TP 8 .B "\-depth \fIdepth\fP" Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits per pixel are supported. -This option is ignored if \fB\-quartz\fP is specified. +Ignored in rootless mode. .TP 8 .B "\-refresh \fIrate\fP" Gives the refresh rate to use in Hz. For LCD displays this should be 0. -This option is ignored if \fB\-quartz\fP is specified. +Ignored in rootless mode. +.TP 8 +.B \-fullscreen +Run full screen in parallel with Mac OS X Aqua GUI. .TP 8 -.B "\-screen \fIscreenum\fP" -Specifies which screen number the X server should run on. Screen number 0 is the default. This option is ignored if \fB\-quartz\fP is specified. +.B \-rootless +Run rootless inside Mac OS X Aqua GUI. .TP 8 .B \-quartz -Run in parallel with the Mac OS X Aqua GUI. +Run in parallel with the Mac OS X Aqua GUI using the default mode. #else .TP 8 .B "\-size \fIwidth\fP \fIheight\fP" -Sets the screeen resolution for the X server to use. +Sets the screen resolution for the X server to use. .TP 8 .B "\-depth \fIdepth\fP" Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits @@ -88,9 +138,6 @@ .TP 8 .B "\-refresh \fIrate\fP" Gives the refresh rate to use in Hz. For LCD displays this should be 0. -.TP 8 -.B "\-screen \fIscreenum\fP" -Specifies which screen number the X server should run on. Screen number 0 is the default. #endif .TP 8 .B \-showconfig @@ -100,25 +147,27 @@ Same as \fB\-showconfig\fP. .SH "SEE ALSO" .PP -X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1) +X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1) .SH BUGS .I XDarwin and this man page still have many limitations. Some of the more obvious ones are: -.br -- There is no rootless mode with Aqua. .br -- Only one display is supported. +- The display mode cannot be changed once the X server has started. .br -- The display mode can not be changed once the X server has started. -.br - A screen saver is not supported. .PP .SH AUTHORS -XFree86 was originally ported to Mac OS X Server by John Carmack. Dave Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. Torrey T. Lyons improved and integrated this code into the XFree86 Project's mainline for the 4.0.2 release. -.PP -The following members of the XonX Team contributed to the XFree86 4.1 release: -.PP +XFree86 was originally ported to Mac OS X Server by John Carmack. Dave +Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. +Torrey T. Lyons improved and integrated this code into the XFree86 +Project's mainline for the 4.0.2 release. +.PP +The following members of the XonX Team contributed to the following +releases (in alphabetical order): +.TP 4 +XFree86 4.1.0: +.br Rob Braun - Darwin x86 support .br Torrey T. Lyons - Project Lead @@ -130,3 +179,27 @@ Christoph Pfisterer - Dynamic shared X libraries .br Toshimitsu Tanaka - Japanese localization +.TP 4 +XFree86 4.2.0: +.br +Rob Braun - Darwin x86 support +.br +Pablo Di Noto - Spanish localization +.br +Paul Edens - Dutch localization +.br +Kyunghwan Kim - Korean localization +.br +Mario Klebsch - Non-US keyboard support +.br +Torrey T. Lyons - Project Lead +.br +Andreas Monitzer - German localization +.br +Patrik Montgomery - Swedish localization +.br +Greg Parker - Rootless support +.br +Toshimitsu Tanaka - Japanese localization +.br +Olivier Verdier - French localization Index: xc/programs/Xserver/hw/darwin/darwin.c diff -u xc/programs/Xserver/hw/darwin/darwin.c:1.23.2.2 xc/programs/Xserver/hw/darwin/darwin.c:1.43 --- xc/programs/Xserver/hw/darwin/darwin.c:1.23.2.2 Fri Jun 1 02:36:12 2001 +++ xc/programs/Xserver/hw/darwin/darwin.c Wed Jan 9 13:01:58 2002 @@ -4,7 +4,7 @@ * running with Quartz or the IOKit * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.23.2.2 2001/06/01 06:36:12 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.43 2002/01/09 18:01:58 torrey Exp $ */ #include "X.h" #include "Xproto.h" @@ -19,6 +19,7 @@ #include "site.h" #include "globals.h" #include "xf86Version.h" +#include "dix.h" #include #include @@ -36,31 +37,41 @@ #include "bundle/quartz.h" #include "xfIOKit.h" -// X server shared global variables -DarwinFramebufferRec dfb; -int darwinEventFD = -1; -Bool quartz = FALSE; -int quartzEventWriteFD = -1; -int quartzStartClients = 1; -int quartzUseSysBeep = 0; -int darwinFakeButtons = 0; -UInt32 darwinDesiredWidth = 0, darwinDesiredHeight = 0; -IOIndex darwinDesiredDepth = -1; -SInt32 darwinDesiredRefresh = -1; -UInt32 darwinScreenNumber = 0; -char *darwinKeymapFile = NULL; - // Quit after this many seconds if no quartz event poster is found. // Leave undefined for no safety quit. #undef QUARTZ_SAFETY_DELAY /* Fake button press/release for scroll wheel move. */ -#define SCROLLWHEELUPFAKE 4 -#define SCROLLWHEELDOWNFAKE 5 +#define SCROLLWHEELUPFAKE 4 +#define SCROLLWHEELDOWNFAKE 5 + +/* + * X server shared global variables + */ +int darwinScreensFound = 0; +int darwinScreenIndex = 0; +DarwinInputRec hid; +int darwinEventFD = -1; +Bool quartz = FALSE; +int quartzMouseAccelChange = 1; +int darwinFakeButtons = 0; + +// location of X11's (0,0) point in global screen coordinates +int darwinMainScreenX = 0; +int darwinMainScreenY = 0; + +// parameters read from the command line or user preferences +unsigned int darwinDesiredWidth = 0, darwinDesiredHeight = 0; +int darwinDesiredDepth = -1; +int darwinDesiredRefresh = -1; +char *darwinKeymapFile = "USA.keymapping"; + +// modifier masks for faking mouse buttons +int darwinFakeMouse2Mask = NX_COMMANDMASK; +int darwinFakeMouse3Mask = NX_ALTERNATEMASK; static DeviceIntPtr darwinPointer; static DeviceIntPtr darwinKeyboard; -static unsigned char darwinKeyCommandL = 0, darwinKeyOptionL = 0; // Common pixmap formats static PixmapFormatRec formats[] = { @@ -96,10 +107,16 @@ "(http://www.XFree86.Org/cvs)\n"); #endif ErrorF("\nXFree86 Version %d.%d.%d", XF86_VERSION_MAJOR, XF86_VERSION_MINOR, - XF86_VERSION_PATCH); + XF86_VERSION_PATCH); #if XF86_VERSION_SNAP > 0 ErrorF(".%d", XF86_VERSION_SNAP); #endif + +#if XF86_VERSION_SNAP >= 900 + ErrorF(" (%d.%d.0 RC %d)", XF86_VERSION_MAJOR, XF86_VERSION_MINOR + 1, + XF86_VERSION_SNAP - 900); +#endif + #ifdef XF86_CUSTOM_VERSION ErrorF(" (%s)", XF86_CUSTOM_VERSION); #endif @@ -108,8 +125,8 @@ X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE ); ErrorF("Release Date: %s\n", XF86_DATE); ErrorF("\tIf the server is older than 6-12 months, or if your hardware is\n" - "\tnewer than the above date, look for a newer version before\n" - "\treporting problems. (See http://www.XFree86.Org/FAQ)\n"); + "\tnewer than the above date, look for a newer version before\n" + "\treporting problems. (See http://www.XFree86.Org/FAQ)\n"); ErrorF("Operating System:%s%s\n", OSNAME, OSVENDOR); #if defined(BUILDERSTRING) ErrorF("%s \n",BUILDERSTRING); @@ -133,7 +150,8 @@ /* * DarwinAddScreen - * This is a callback from X during AddScreen() from InitOutput() + * This is a callback from dix during AddScreen() from InitOutput(). + * Initialize the screen and communicate information about it back to dix. */ static Bool DarwinAddScreen( int index, @@ -142,29 +160,48 @@ char **argv ) { int bitsPerRGB, i, dpi; + static int foundIndex = 0; + Bool ret; VisualPtr visual; ColormapPtr pmap; + DarwinFramebufferPtr dfb; - /* Communicate the information about our initialized screen back to X. */ - bitsPerRGB = dfb.pixelInfo.bitsPerComponent; + // reset index of found screens for each server generation + if (index == 0) foundIndex = 0; + // allocate space for private per screen storage + dfb = xalloc(sizeof(DarwinFramebufferRec)); + SCREEN_PRIV(pScreen) = dfb; + + // setup hardware/mode specific details + if (quartz) { + ret = QuartzAddScreen(foundIndex, pScreen); + } else { + ret = XFIOKitAddScreen(foundIndex, pScreen); + } + foundIndex++; + if (! ret) + return FALSE; + + bitsPerRGB = dfb->pixelInfo.bitsPerComponent; + // reset the visual list miClearVisualTypes(); // setup a single visual appropriate for our pixel type - // Note: Darwin kIORGBDirectPixels = X window TrueColor, not DirectColor - if (dfb.pixelInfo.pixelType == kIORGBDirectPixels) { - if (!miSetVisualTypes( dfb.colorBitsPerPixel, TrueColorMask, + // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor + if (dfb->pixelInfo.pixelType == kIORGBDirectPixels) { + if (!miSetVisualTypes( dfb->colorBitsPerPixel, TrueColorMask, bitsPerRGB, TrueColor )) { return FALSE; } - } else if (dfb.pixelInfo.pixelType == kIOCLUTPixels) { - if (!miSetVisualTypes( dfb.colorBitsPerPixel, PseudoColorMask, + } else if (dfb->pixelInfo.pixelType == kIOCLUTPixels) { + if (!miSetVisualTypes( dfb->colorBitsPerPixel, PseudoColorMask, bitsPerRGB, PseudoColor )) { return FALSE; } - } else if (dfb.pixelInfo.pixelType == kIOFixedCLUTPixels) { - if (!miSetVisualTypes( dfb.colorBitsPerPixel, StaticColorMask, + } else if (dfb->pixelInfo.pixelType == kIOFixedCLUTPixels) { + if (!miSetVisualTypes( dfb->colorBitsPerPixel, StaticColorMask, bitsPerRGB, StaticColor )) { return FALSE; } @@ -183,17 +220,17 @@ // initialize fb if (! fbScreenInit(pScreen, - dfb.framebuffer, // pointer to screen bitmap - dfb.width, dfb.height, // screen size in pixels - dpi, dpi, // dots per inch - dfb.pitch/(dfb.bitsPerPixel/8), // pixel width of framebuffer - dfb.bitsPerPixel)) // bits per pixel for screen + dfb->framebuffer, // pointer to screen bitmap + dfb->width, dfb->height, // screen size in pixels + dpi, dpi, // dots per inch + dfb->pitch/(dfb->bitsPerPixel/8), // pixel width of framebuffer + dfb->bitsPerPixel)) // bits per pixel for screen { return FALSE; } // set the RGB order correctly for TrueColor - if (dfb.bitsPerPixel > 8) { + if (dfb->bitsPerPixel > 8) { for (i = 0, visual = pScreen->visuals; // someday we may have more than 1 i < pScreen->numVisuals; i++, visual++) { if (visual->class == TrueColor) { @@ -205,16 +242,18 @@ visual->greenMask = ((1<offsetGreen; visual->blueMask = ((1<offsetBlue; #else - visual->redMask = dfb.pixelInfo.componentMasks[0]; - visual->greenMask = dfb.pixelInfo.componentMasks[1]; - visual->blueMask = dfb.pixelInfo.componentMasks[2]; + visual->redMask = dfb->pixelInfo.componentMasks[0]; + visual->greenMask = dfb->pixelInfo.componentMasks[1]; + visual->blueMask = dfb->pixelInfo.componentMasks[2]; #endif } } } #ifdef RENDER - fbPictureInit(pScreen, 0, 0); + if (! fbPictureInit(pScreen, 0, 0)) { + return FALSE; + } #endif #ifdef MITSHM @@ -224,13 +263,13 @@ // this must be initialized (why doesn't X have a default?) pScreen->SaveScreen = DarwinSaveScreen; - // Perform operations specific to the screen interface + // finish mode dependent screen setup including cursor support if (quartz) { - if (! QuartzAddScreen(pScreen)) { + if (! QuartzSetupScreen(index, pScreen)) { return FALSE; } } else { - if (! XFIOKitAddScreen(pScreen)) { + if (! XFIOKitSetupScreen(index, pScreen)) { return FALSE; } } @@ -245,8 +284,9 @@ * mode and we're using a fixed color map. Essentially this translates * to Darwin/x86 in 8-bit mode. */ - if( (dfb.colorBitsPerPixel == 8) && - (dfb.pixelInfo.pixelType == kIOFixedCLUTPixels) ) { + if( (dfb->colorBitsPerPixel == 8) && + (dfb->pixelInfo.pixelType == kIOFixedCLUTPixels) ) + { pmap = miInstalledMaps[pScreen->myNum]; visual = pmap->pVisual; for( i = 0; i < visual->ColormapEntries; i++ ) { @@ -256,6 +296,12 @@ } } + dixScreenOrigins[index].x = dfb->x; + dixScreenOrigins[index].y = dfb->y; + + ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); + return TRUE; } @@ -263,7 +309,7 @@ ============================================================================= mouse and keyboard callbacks - + ============================================================================= */ @@ -279,8 +325,11 @@ kern_return_t kr; double acceleration; + if (!quartzMouseAccelChange) + return; + acceleration = ctrl->num / ctrl->den; - kr = IOHIDSetMouseAcceleration( dfb.hidParam, acceleration ); + kr = IOHIDSetMouseAcceleration( hid.paramConnect, acceleration ); if (kr != KERN_SUCCESS) ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr ); } @@ -318,13 +367,13 @@ case DEVICE_ON: pPointer->public.on = TRUE; - AddEnabledDevice( darwinEventFD ); + AddEnabledDevice( darwinEventFD ); return Success; case DEVICE_CLOSE: case DEVICE_OFF: pPointer->public.on = FALSE; - RemoveEnabledDevice( darwinEventFD ); + RemoveEnabledDevice( darwinEventFD ); return Success; } @@ -340,8 +389,6 @@ switch ( onoff ) { case DEVICE_INIT: DarwinKeyboardInit( pDev ); - darwinKeyCommandL = DarwinModifierKeycode(NX_MODIFIERKEY_COMMAND, 0); - darwinKeyOptionL = DarwinModifierKeycode(NX_MODIFIERKEY_ALTERNATE, 0); break; case DEVICE_ON: pDev->public.on = TRUE; @@ -422,46 +469,34 @@ } /* - * DarwinSimulateMouseClick - * Send a mouse click to X when multiple mouse buttons are simulated - * with modifier-clicks, such as command-click for button 2. The dix - * layer is told that the previously pressed modifier key(s) are - * released, the simulated click event is sent, and the modifier keys - * are reverted to their actual (pressed) state. This is usually - * closest to what the user wants. Ie. the user typically wants to - * simulate a button 2 press instead of Command-button 2. + * DarwinPressKeycode + * Press or release the given key, specified by NX keycode. + * xe must already have event time and mouse location filled in. + * pressed is KeyPress or KeyRelease. + * keycode is NX keycode without MIN_KEYCODE adjustment. */ -static void DarwinSimulateMouseClick( - xEvent xe, // event template with time and - // mouse position filled in - int whichButton, // mouse button to be pressed - int whichEvent, // ButtonPress or ButtonRelease - int keycodesUsed[], // list of keycodes of the modifiers used - // to create the fake click + MIN_KEYCODE - int numKeycodes ) // number of keycodes in list -{ - int i; +#define DarwinPressKeycode(xe, pressed, keycode) \ + xe.u.u.type = (pressed); \ + xe.u.u.detail = (keycode) + MIN_KEYCODE; \ + (darwinKeyboard->public.processInputProc)(&(xe), darwinKeyboard, 1); - // first fool X into forgetting about the keys - for (i = 0; i < numKeycodes; i++) { - xe.u.u.type = KeyRelease; - xe.u.u.detail = keycodesUsed[i]; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); - } - // push the mouse button - xe.u.u.type = whichEvent; - xe.u.u.detail = whichButton; - (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); +/* + * DarwinPressModifierMask + * Press or release the given modifier key, specified by its mask. + */ +static void DarwinPressModifierMask( + xEvent xe, // must already have time and mouse location filled in + BYTE pressed, // KeyPress or KeyRelease + int mask) // one of NX_*MASK constants +{ + int key = DarwinModifierNXMaskToNXKey(mask); - // reset the keys - for (i = 0; i < numKeycodes; i++) { - xe.u.u.type = KeyPress; - xe.u.u.detail = keycodesUsed[i]; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); + if (key != -1) { + int keycode = DarwinModifierNXKeyToNXKeycode(key, 0); + if (keycode != 0) { + DarwinPressKeycode(xe, pressed, keycode); + } } } @@ -470,38 +505,88 @@ * Send events to update the modifier state. */ static void DarwinUpdateModifiers( - xEvent xe, // event template with time, mouse position, - // and KeyPress or KeyRelease filled in - int flags ) // modifier flags that have changed + xEvent xe, // event template with time and mouse position set + int pressed, // KeyPress or KeyRelease + int flags ) // modifier flags that have changed { if (flags & NX_ALPHASHIFTMASK) { - xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_ALPHALOCK, 0); - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); + DarwinPressModifierMask(xe, pressed, NX_ALPHASHIFTMASK); } if (flags & NX_COMMANDMASK) { - xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_COMMAND, 0); - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); + DarwinPressModifierMask(xe, pressed, NX_COMMANDMASK); } if (flags & NX_CONTROLMASK) { - xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_CONTROL, 0); - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); + DarwinPressModifierMask(xe, pressed, NX_CONTROLMASK); } if (flags & NX_ALTERNATEMASK) { - xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_ALTERNATE, 0); - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); + DarwinPressModifierMask(xe, pressed, NX_ALTERNATEMASK); } if (flags & NX_SHIFTMASK) { - xe.u.u.detail = DarwinModifierKeycode(NX_MODIFIERKEY_SHIFT, 0); - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); + DarwinPressModifierMask(xe, pressed, NX_SHIFTMASK); + } + if (flags & NX_SECONDARYFNMASK) { + DarwinPressModifierMask(xe, pressed, NX_SECONDARYFNMASK); + } +} + +/* + * DarwinParseModifierList + * Parse a list of modifier names and return a corresponding modifier mask + */ +static int DarwinParseModifierList( + const char *constmodifiers) // string containing list of modifier names +{ + int result = 0; + + if (constmodifiers) { + char *modifiers = strdup(constmodifiers); + char *modifier; + int nxkey; + char *p = modifiers; + + while (p) { + modifier = strsep(&p, " ,+&|/"); // allow lots of separators + nxkey = DarwinModifierStringToNXKey(modifier); + if (nxkey != -1) + result |= DarwinModifierNXKeyToNXMask(nxkey); + else + ErrorF("fakebuttons: Unknown modifier \"%s\"\n", modifier); + } + free(modifiers); } + return result; } /* + * DarwinSimulateMouseClick + * Send a mouse click to X when multiple mouse buttons are simulated + * with modifier-clicks, such as command-click for button 2. The dix + * layer is told that the previously pressed modifier key(s) are + * released, the simulated click event is sent. After the mouse button + * is released, the modifier keys are reverted to their actual state, + * which may or may not be pressed at that point. This is usually + * closest to what the user wants. Ie. the user typically wants to + * simulate a button 2 press instead of Command-button 2. + */ +static void DarwinSimulateMouseClick( + xEvent xe, // event template with time and + // mouse position filled in + int whichButton, // mouse button to be pressed + int whichEvent, // ButtonPress or ButtonRelease + int modifierMask) // modifiers used for the fake click +{ + // first fool X into forgetting about the keys + DarwinUpdateModifiers(xe, KeyRelease, modifierMask); + + // push the mouse button + xe.u.u.type = whichEvent; + xe.u.u.detail = whichButton; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); +} + + +/* =========================================================================== Functions needed to link against device independent X @@ -515,19 +600,24 @@ */ void ProcessInputEvents(void) { - xEvent xe; - NXEvent ev; - int r; + xEvent xe; + NXEvent ev; + int r; struct timeval tv; struct timezone tz; + + // last known modifier state static int old_state = 0; + // button number and modifier mask of currently pressed fake button + static int darwinFakeMouseButtonDown = 0; + static int darwinFakeMouseButtonMask = 0; #if defined(DARWIN_WITH_QUARTZ) && defined(QUARTZ_SAFETY_DELAY) static Bool gotread = false; static int startsec = 0; // Quartz safety quit. Bail if we don't get any events from the event pipe. - // If the event writer fails to find us, we will have captured the screen + // If the event writer fails to find us, we will have captured the screen // but not be seeing any events and be unkillable from the console. if (quartz && ! gotread) { gettimeofday(&tv, &tz); @@ -543,7 +633,7 @@ // try to read from our pipe r = read( darwinEventFD, &ev, sizeof(ev)); - + if ((r == -1) && (errno == EAGAIN)) { // no event available break; @@ -563,19 +653,23 @@ gotread = true; #endif gettimeofday(&tv, &tz); - + // translate it to an X event and post it memset(&xe, 0, sizeof(xe)); - - xe.u.keyButtonPointer.rootX = ev.location.x; - xe.u.keyButtonPointer.rootY = ev.location.y; + + // Shift from global screen coordinates to coordinates relative to + // the origin of the current screen. + xe.u.keyButtonPointer.rootX = ev.location.x - darwinMainScreenX - + dixScreenOrigins[miPointerCurrentScreen()->myNum].x; + xe.u.keyButtonPointer.rootY = ev.location.y - darwinMainScreenY - + dixScreenOrigins[miPointerCurrentScreen()->myNum].y; //xe.u.keyButtonPointer.time = ev.time; xe.u.keyButtonPointer.time = tv.tv_sec * 1000 + tv.tv_usec / 1000; - + /* A newer kernel generates multi-button events by NX_SYSDEFINED. See iokit/Families/IOHIDSystem/IOHIDSystem.cpp version 1.1.1.7, 2000/08/10 00:23:37 or later. */ - + switch( ev.type ) { case NX_MOUSEMOVED: xe.u.u.type = MotionNotify; @@ -589,55 +683,58 @@ #else case NX_LMOUSEDOWN: #endif - // Mimic multi-button mouse with Command and Option - if (darwinFakeButtons && - ev.flags & (NX_COMMANDMASK | NX_ALTERNATEMASK)) { - int button; - int keycode; - if (ev.flags & NX_COMMANDMASK) { - button = 2; - keycode = darwinKeyCommandL; - } else { - button = 3; - keycode = darwinKeyOptionL; - } - DarwinSimulateMouseClick(xe, button, ButtonPress, - &keycode, 1); - } else { + // Mimic multi-button mouse with modifier-clicks + // If both sets of modifiers are pressed, button 2 is clicked. + if (darwinFakeButtons && + (ev.flags & darwinFakeMouse2Mask) == darwinFakeMouse2Mask) + { + DarwinSimulateMouseClick(xe, 2, ButtonPress, + darwinFakeMouse2Mask); + darwinFakeMouseButtonDown = 2; + darwinFakeMouseButtonMask = darwinFakeMouse2Mask; + } + else if (darwinFakeButtons && + (ev.flags & darwinFakeMouse3Mask) == darwinFakeMouse3Mask) + { + DarwinSimulateMouseClick(xe, 3, ButtonPress, + darwinFakeMouse3Mask); + darwinFakeMouseButtonDown = 3; + darwinFakeMouseButtonMask = darwinFakeMouse3Mask; + } + else { xe.u.u.detail = 1; xe.u.u.type = ButtonPress; (darwinPointer->public.processInputProc) ( &xe, darwinPointer, 1 ); } break; - + #ifdef __i386__ case NX_LMOUSEDOWN: #else case NX_LMOUSEUP: #endif - // Mimic multi-button mouse with Command and Option - if (darwinFakeButtons && - ev.flags & (NX_COMMANDMASK | NX_ALTERNATEMASK)) { - int button; - int keycode; - if (ev.flags & NX_COMMANDMASK) { - button = 2; - keycode = darwinKeyCommandL; - } else { - button = 3; - keycode = darwinKeyOptionL; - } - DarwinSimulateMouseClick(xe, button, ButtonRelease, - &keycode, 1); + // If last mousedown was a fake click, don't check for + // mouse modifiers here. The user may have released the + // modifiers before the mouse button. + xe.u.u.type = ButtonRelease; + if (darwinFakeMouseButtonDown) { + xe.u.u.detail = darwinFakeMouseButtonDown; + darwinFakeMouseButtonDown = 0; + (darwinPointer->public.processInputProc) + ( &xe, darwinPointer, 1 ); + + // Bring modifiers back up to date + DarwinUpdateModifiers(xe, KeyPress, + darwinFakeMouseButtonMask & old_state); + darwinFakeMouseButtonMask = 0; } else { xe.u.u.detail = 1; - xe.u.u.type = ButtonRelease; (darwinPointer->public.processInputProc) ( &xe, darwinPointer, 1 ); } break; - + // Button 2 isn't handled correctly by older kernels anyway. // Just let NX_SYSDEFINED events handle these. case NX_RMOUSEDOWN: @@ -648,7 +745,7 @@ ( &xe, darwinPointer, 1 ); #endif break; - + case NX_RMOUSEUP: #if 0 xe.u.u.detail = 2; @@ -657,21 +754,15 @@ ( &xe, darwinPointer, 1 ); #endif break; - + case NX_KEYDOWN: - xe.u.u.type = KeyPress; - xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; - (darwinKeyboard->public.processInputProc) - ( &xe, darwinKeyboard, 1 ); + DarwinPressKeycode(xe, KeyPress, ev.data.key.keyCode); break; - + case NX_KEYUP: - xe.u.u.type = KeyRelease; - xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); + DarwinPressKeycode(xe, KeyRelease, ev.data.key.keyCode); break; - + case NX_FLAGSCHANGED: { // Assumes only one flag has changed. In Quartz mode, this @@ -679,39 +770,24 @@ int new_on_flags = ~old_state & ev.flags; int new_off_flags = old_state & ~ev.flags; old_state = ev.flags; - xe.u.u.detail = ev.data.key.keyCode + MIN_KEYCODE; - + // Alphalock is toggled rather than held on, - // so we have to handle it differently. - if (new_on_flags & NX_ALPHASHIFTMASK || - new_off_flags & NX_ALPHASHIFTMASK) { - xe.u.u.type = KeyPress; - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); - xe.u.u.type = KeyRelease; - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); - break; + // so we have to press and release it every time. + if (new_on_flags || new_off_flags & NX_ALPHASHIFTMASK) { + DarwinPressKeycode(xe, KeyPress, ev.data.key.keyCode); } - - if (new_on_flags) { - xe.u.u.type = KeyPress; - } else if (new_off_flags) { - xe.u.u.type = KeyRelease; - } else { - break; + if (new_off_flags || new_on_flags & NX_ALPHASHIFTMASK) { + DarwinPressKeycode(xe, KeyRelease, ev.data.key.keyCode); } - (darwinKeyboard->public.processInputProc) - (&xe, darwinKeyboard, 1); break; } - + case NX_SYSDEFINED: if (ev.data.compound.subType == 7) { long hwDelta = ev.data.compound.misc.L[0]; long hwButtons = ev.data.compound.misc.L[1]; int i; - + for (i = 1; i < 5; i++) { if (hwDelta & (1 << i)) { // IOKit and X have different numbering for the @@ -740,18 +816,18 @@ } } break; - + case NX_SCROLLWHEELMOVED: { short count = ev.data.scrollWheel.deltaAxis1; - + if (count > 0) { xe.u.u.detail = SCROLLWHEELUPFAKE; } else { xe.u.u.detail = SCROLLWHEELDOWNFAKE; count = -count; } - + for (; count; --count) { xe.u.u.type = ButtonPress; (darwinPointer->public.processInputProc) @@ -771,19 +847,20 @@ // Update modifier state. As opposed to NX_FLAGSCHANGED, // in this case any amount of modifiers may have changed. case kXDarwinUpdateModifiers: - xe.u.u.type = KeyRelease; - DarwinUpdateModifiers(xe, old_state & ~ev.flags); - xe.u.u.type = KeyPress; - DarwinUpdateModifiers(xe, ~old_state & ev.flags); + DarwinUpdateModifiers(xe, KeyRelease, + old_state & ~ev.flags); + DarwinUpdateModifiers(xe, KeyPress, + ~old_state & ev.flags); old_state = ev.flags; break; case kXDarwinShow: - QuartzShow(ev.location.x, ev.location.y); + QuartzShow(xe.u.keyButtonPointer.rootX, + xe.u.keyButtonPointer.rootY); // The mouse location will have moved; track it. xe.u.u.type = MotionNotify; (darwinPointer->public.processInputProc) - ( &xe, darwinPointer, 1 ); + ( &xe, darwinPointer, 1 ); break; case kXDarwinHide: @@ -811,22 +888,24 @@ default: ErrorF("Unknown event caught: %d\n", ev.type); ErrorF("\tev.type = %d\n", ev.type); - ErrorF("\tev.location.x,y = %d,%d\n", ev.location.x, ev.location.y); + ErrorF("\tev.location.x,y = %d,%d\n", + ev.location.x, ev.location.y); ErrorF("\tev.time = %ld\n", ev.time); ErrorF("\tev.flags = 0x%x\n", ev.flags); ErrorF("\tev.window = %d\n", ev.window); - ErrorF("\tev.data.key.origCharSet = %d\n", ev.data.key.origCharSet); + ErrorF("\tev.data.key.origCharSet = %d\n", + ev.data.key.origCharSet); ErrorF("\tev.data.key.charSet = %d\n", ev.data.key.charSet); ErrorF("\tev.data.key.charCode = %d\n", ev.data.key.charCode); ErrorF("\tev.data.key.keyCode = %d\n", ev.data.key.keyCode); - ErrorF("\tev.data.key.origCharCode = %d\n", ev.data.key.origCharCode); + ErrorF("\tev.data.key.origCharCode = %d\n", + ev.data.key.origCharCode); break; } - - // why isn't this handled automatically by X??? - //miPointerAbsoluteCursor( ev.location.x, ev.location.y, ev.time ); - miPointerAbsoluteCursor( ev.location.x, ev.location.y, - tv.tv_sec * 1000 + tv.tv_usec / 1000 ); + + miPointerAbsoluteCursor( xe.u.keyButtonPointer.rootX, + xe.u.keyButtonPointer.rootY, + xe.u.keyButtonPointer.time ); } miPointerUpdate(); @@ -837,36 +916,99 @@ * InitInput * Register the keyboard and mouse devices */ -void InitInput( int argc, char **argv ) +void InitInput( int argc, char **argv ) { - if (serverGeneration == 1) { - darwinPointer = AddInputDevice(DarwinMouseProc, TRUE); - RegisterPointerDevice( darwinPointer ); + darwinPointer = AddInputDevice(DarwinMouseProc, TRUE); + RegisterPointerDevice( darwinPointer ); - darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); - RegisterKeyboardDevice( darwinKeyboard ); - } + darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); + RegisterKeyboardDevice( darwinKeyboard ); } /* * InitOutput - * Initialize screenInfo for all actually accessible framebuffers. + * Initialize screenInfo for all actually accessible framebuffers. + * + * The display mode dependent code gets called three times. The mode + * specific InitOutput routines are expected to discover the number + * of potentially useful screens and cache routes to them internally. + * Inside DarwinAddScreen are two other mode specific calls. + * A mode specific AddScreen routine is called for each screen to + * actually initialize the screen with the ScreenPtr structure. + * After other screen setup has been done, a mode specific + * SetupScreen function can be called to finalize screen setup. */ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv ) { - int i; + int i, left, top; + static unsigned long generation = 0; pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - // list how we want common pixmap formats to be padded + // List how we want common pixmap formats to be padded pScreenInfo->numPixmapFormats = NUMFORMATS; for (i = 0; i < NUMFORMATS; i++) pScreenInfo->formats[i] = formats[i]; + + // Allocate private storage for each screen's Darwin specific info + if (generation != serverGeneration) { + darwinScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + // Discover screens and do mode specific initialization + if (quartz) { + QuartzInitOutput(argc, argv); + } else { + XFIOKitInitOutput(argc, argv); + } + + // Add screens + for (i = 0; i < darwinScreensFound; i++) { + AddScreen( DarwinAddScreen, argc, argv ); + } + + // Shift all screens so the X11 (0, 0) coordinate is at the top left + // of the global screen coordinates. + // Screens can be arranged so the top left isn't on any screen, + // so instead use the top left of the leftmost screen as (0,0). + // This may mean some screen space is in -y, but it's better + // that (0,0) be onscreen, or else default xterms disappear. + // It's better that -y be used than -x, because when popup + // menus are forced "onscreen" by dumb window managers like twm, + // they'll shift the menus down instead of left, which still looks + // funny but is an easier target to hit. + left = dixScreenOrigins[0].x; + top = dixScreenOrigins[0].y; + + // Find leftmost screen. If there's a tie, take the topmost of the two. + for (i = 1; i < pScreenInfo->numScreens; i++) { + if (dixScreenOrigins[i].x < left || + (dixScreenOrigins[i].x == left && + dixScreenOrigins[i].y < top)) + { + left = dixScreenOrigins[i].x; + top = dixScreenOrigins[i].y; + } + } + + darwinMainScreenX = left; + darwinMainScreenY = top; - AddScreen( DarwinAddScreen, argc, argv ); + // Shift all screens so that there is a screen whose top left + // is at X11 (0,0) and at global screen coordinate + // (darwinMainScreenX, darwinMainScreenY). + if (darwinMainScreenX != 0 || darwinMainScreenY != 0) { + for (i = 0; i < pScreenInfo->numScreens; i++) { + dixScreenOrigins[i].x -= darwinMainScreenX; + dixScreenOrigins[i].y -= darwinMainScreenY; + ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n", + i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); + } + } } /* @@ -879,36 +1021,41 @@ /* * OsVendorInit - * Initialization of Darwin support. - * Initialize display and event handling. + * Initialization of Darwin OS support. */ void OsVendorInit(void) { - DarwinPrintBanner(); + if (serverGeneration == 1) { + DarwinPrintBanner(); + } - if (quartz) { - QuartzOsVendorInit(); + // Find the full path to the keymapping file. + if ( darwinKeymapFile ) { + char *tempStr = DarwinFindLibraryFile(darwinKeymapFile, "Keyboards"); + if ( !tempStr ) + FatalError("Could not find keymapping file %s.\n", + darwinKeymapFile); + darwinKeymapFile = tempStr; + ErrorF("Using keymapping provided in %s.\n", darwinKeymapFile); } else { - XFIOKitOsVendorInit(); + ErrorF("Reading keymapping from the kernel.\n"); } } /* * ddxProcessArgument -- - * Process device-dependent command line args. Returns 0 if argument is - * not device dependent, otherwise Count of number of elements of argv - * that are part of a device dependent commandline option. + * Process device-dependent command line args. Returns 0 if argument is + * not device dependent, otherwise Count of number of elements of argv + * that are part of a device dependent commandline option. */ int ddxProcessArgument( int argc, char *argv[], int i ) { - if ( !strcmp( argv[i], "-screen" ) ) { - if ( i == argc-1 ) { - FatalError( "-screen must be followed by a number\n" ); - } - darwinScreenNumber = atoi( argv[i+1] ); - ErrorF( "Attempting to use screen number %i\n", darwinScreenNumber ); - return 2; - } +#ifdef DARWIN_WITH_QUARTZ + int numDone; + + if ((numDone = QuartzProcessArgument( argc, argv, i ))) + return numDone; +#endif if ( !strcmp( argv[i], "-fakebuttons" ) ) { darwinFakeButtons = TRUE; @@ -922,47 +1069,53 @@ return 1; } - if ( !strcmp( argv[i], "-keymap" ) ) { - if ( i == argc-1 ) { - FatalError( "-keymap must be followed by a filename\n" ); + if (!strcmp( argv[i], "-fakemouse2" ) ) { + if ( i == argc-1 ) { + FatalError( "-fakemouse2 must be followed by a modifer list\n" ); } - darwinKeymapFile = DarwinFindLibraryFile(argv[i+1], "Keyboards"); - if ( !darwinKeymapFile ) - FatalError( "Could not find keymapping file %s.\n", argv[i+1] ); - ErrorF( "Using keymapping provided in %s.\n", darwinKeymapFile ); + if (!strcasecmp(argv[i+1], "none") || !strcmp(argv[i+1], "")) + darwinFakeMouse2Mask = 0; + else + darwinFakeMouse2Mask = DarwinParseModifierList(argv[i+1]); + ErrorF("Modifier mask to fake mouse button 2 = 0x%x\n", + darwinFakeMouse2Mask); return 2; } -#ifdef DARWIN_WITH_QUARTZ - if ( !strcmp( argv[i], "-quartz" ) ) { - quartz = TRUE; - ErrorF( "Running in parallel with Mac OS X Quartz window server.\n" ); -#ifdef QUARTZ_SAFETY_DELAY - ErrorF( "Quitting in %d seconds if no controller is found.\n", - QUARTZ_SAFETY_DELAY ); -#endif - return 1; + if (!strcmp( argv[i], "-fakemouse3" ) ) { + if ( i == argc-1 ) { + FatalError( "-fakemouse3 must be followed by a modifer list\n" ); + } + if (!strcasecmp(argv[i+1], "none") || !strcmp(argv[i+1], "")) + darwinFakeMouse3Mask = 0; + else + darwinFakeMouse3Mask = DarwinParseModifierList(argv[i+1]); + ErrorF("Modifier mask to fake mouse button 3 = 0x%x\n", + darwinFakeMouse3Mask); + return 2; } - // The Mac OS X front end uses this argument, which we just ignore here. - if ( !strcmp( argv[i], "-nostartx" ) ) { - return 1; + if ( !strcmp( argv[i], "-keymap" ) ) { + if ( i == argc-1 ) { + FatalError( "-keymap must be followed by a filename\n" ); + } + darwinKeymapFile = argv[i+1]; + return 2; } - // This command line arg is passed when launched from the Aqua GUI. - if ( !strncmp( argv[i], "-psn_", 5 ) ) { + if ( !strcmp( argv[i], "-nokeymap" ) ) { + darwinKeymapFile = NULL; return 1; } -#endif if ( !strcmp( argv[i], "-size" ) ) { - if ( i >= argc-2 ) { + if ( i >= argc-2 ) { FatalError( "-size must be followed by two numbers\n" ); } #ifdef OLD_POWERBOOK_G3 ErrorF( "Ignoring unsupported -size option on old PowerBook G3\n" ); #else - darwinDesiredWidth = atoi( argv[i+1] ); + darwinDesiredWidth = atoi( argv[i+1] ); darwinDesiredHeight = atoi( argv[i+2] ); ErrorF( "Attempting to use width x height = %i x %i\n", darwinDesiredWidth, darwinDesiredHeight ); @@ -972,13 +1125,14 @@ if ( !strcmp( argv[i], "-depth" ) ) { int bitDepth; - if ( i == argc-1 ) { + + if ( i == argc-1 ) { FatalError( "-depth must be followed by a number\n" ); } #ifdef OLD_POWERBOOK_G3 ErrorF( "Ignoring unsupported -depth option on old PowerBook G3\n"); #else - bitDepth = atoi( argv[i+1] ); + bitDepth = atoi( argv[i+1] ); if (bitDepth == 8) darwinDesiredDepth = 0; else if (bitDepth == 15) @@ -993,13 +1147,13 @@ } if ( !strcmp( argv[i], "-refresh" ) ) { - if ( i == argc-1 ) { + if ( i == argc-1 ) { FatalError( "-refresh must be followed by a number\n" ); } #ifdef OLD_POWERBOOK_G3 ErrorF( "Ignoring unsupported -refresh option on old PowerBook G3\n"); #else - darwinDesiredRefresh = atoi( argv[i+1] ); + darwinDesiredRefresh = atoi( argv[i+1] ); ErrorF( "Attempting to use refresh rate of %i\n", darwinDesiredRefresh ); #endif return 2; @@ -1015,8 +1169,8 @@ /* * ddxUseMsg -- - * Print out correct use of device dependent commandline options. - * Maybe the user now knows what really to do ... + * Print out correct use of device dependent commandline options. + * Maybe the user now knows what really to do ... */ void ddxUseMsg( void ) { @@ -1026,14 +1180,20 @@ ErrorF("\n"); ErrorF("-fakebuttons : fake a three button mouse with Command and Option keys.\n"); ErrorF("-nofakebuttons : don't fake a three button mouse.\n"); + ErrorF("-fakemouse2 : fake middle mouse button with modifier keys.\n"); + ErrorF("-fakemouse3 : fake right mouse button with modifier keys.\n"); + ErrorF(" ex: -fakemouse2 \"option,shift\" = option-shift-click is middle button.\n"); ErrorF("-keymap : read the keymapping from a file instead of the kernel.\n"); ErrorF("-version : show the server version.\n"); + ErrorF("\n"); #ifdef DARWIN_WITH_QUARTZ - ErrorF("-quartz : run in parallel with Mac OS X Quartz window server.\n"); + ErrorF("Quartz modes:\n"); + ErrorF("-fullscreen : run full screen in parallel with Mac OS X window server.\n"); + ErrorF("-rootless : run rootless inside Mac OS X window server.\n"); + ErrorF("-quartz : use default Mac OS X window server mode\n"); ErrorF("\n"); - ErrorF("IOKit specific options (ignored with -quartz):\n"); + ErrorF("Options ignored in rootless mode:\n"); #endif - ErrorF("-screen <0,1,...> : use this screen number.\n"); ErrorF("-size : use a screen resolution of x .\n"); ErrorF("-depth <8,15,24> : use this bit depth.\n"); ErrorF("-refresh : use a monitor refresh rate of Hz.\n"); @@ -1046,7 +1206,7 @@ */ void ddxGiveUp( void ) { - ErrorF( "Quitting XDarwin...\n" ); + ErrorF( "Quitting XDarwin...\n" ); if (quartz) { QuartzGiveUp(); @@ -1063,7 +1223,7 @@ */ void AbortDDX( void ) { - ErrorF( " AbortDDX\n" ); + ErrorF( " AbortDDX\n" ); /* * This is needed for a abnormal server exit, since the normal exit stuff * MUST also be performed (i.e. the vt must be left in a defined state) @@ -1071,13 +1231,24 @@ ddxGiveUp(); } +#ifdef DPMSExtension +/* + * DPMS extension stubs + */ Bool DPMSSupported(void) -{ return 0; +{ + return FALSE; } -void DPMSSet(void) -{ return; +void DPMSSet(int level) +{ +} + +int DPMSGet(int *level) +{ + return -1; } +#endif #include "mivalidate.h" // for union _Validate used by windowstr.h @@ -1134,7 +1305,7 @@ pWin->valdata->before.resized = TRUE; } } - + /* * Use REGION_BREAK to avoid optimizations in ValidateTree * that assume the root borderClip can't change well, normally @@ -1154,9 +1325,9 @@ REGION_EMPTY(pScreen, &pWin->borderClip); REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); } - + ResizeChildrenWinSize (pWin, 0, 0, 0, 0); - + if (WasViewable) { if (pWin->backStorage) @@ -1201,7 +1372,7 @@ if (bsExposed) { RegionPtr valExposed = NullRegion; - + if (pWin->valdata) valExposed = &pWin->valdata->after.exposed; (*pScreen->WindowExposures) (pWin, valExposed, bsExposed); Index: xc/programs/Xserver/hw/darwin/darwin.h diff -u xc/programs/Xserver/hw/darwin/darwin.h:1.5 xc/programs/Xserver/hw/darwin/darwin.h:1.10 --- xc/programs/Xserver/hw/darwin/darwin.h:1.5 Mon Apr 2 01:39:36 2001 +++ xc/programs/Xserver/hw/darwin/darwin.h Sat Oct 13 23:02:18 2001 @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.5 2001/04/02 05:39:36 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.10 2001/10/14 03:02:18 torrey Exp $ */ #ifndef _DARWIN_H #define _DARWIN_H @@ -8,13 +8,13 @@ #include "inputstr.h" #include "screenint.h" #include "extensions/XKB.h" +#include "bundle/quartzShared.h" typedef struct { - pthread_t hidThread; io_connect_t fbService; - io_connect_t hidService; - io_connect_t hidParam; void *framebuffer; + int x; + int y; int width; int height; int pitch; @@ -22,28 +22,44 @@ int colorBitsPerPixel; IOPixelInformation pixelInfo; StdFBShmem_t *cursorShmem; -} DarwinFramebufferRec; +} DarwinFramebufferRec, *DarwinFramebufferPtr; -void DarwinKeyboardInit(DeviceIntPtr pDev); -int DarwinModifierKeycode(int modifier, int side); +typedef struct { + pthread_t thread; + io_connect_t connect; + io_connect_t paramConnect; +} DarwinInputRec; + + void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); +// From darwinKeyboard.c +int DarwinModifierNXKeyToNXKeycode(int key, int side); +void DarwinKeyboardInit(DeviceIntPtr pDev); +int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide); +int DarwinModifierNXKeyToNXMask(int key); +int DarwinModifierNXMaskToNXKey(int mask); +int DarwinModifierStringToNXKey(const char *string); + #undef assert #define assert(x) { if ((x) == 0) \ FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); } #define kern_assert(x) { if ((x) != KERN_SUCCESS) \ FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \ __LINE__, __FILE__, x); } +#define SCREEN_PRIV(pScreen) \ + ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr) + -#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... +#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... -// Global variables from darwin.c -extern DarwinFramebufferRec dfb; -extern int darwinEventFD; -extern Bool quartz; -extern UInt32 darwinDesiredWidth, darwinDesiredHeight; -extern IOIndex darwinDesiredDepth; -extern SInt32 darwinDesiredRefresh; -extern UInt32 darwinScreenNumber; +/* + * Global variables from darwin.c + */ +extern int darwinScreenIndex; // index into pScreen.devPrivates +extern int darwinScreensFound; +extern DarwinInputRec hid; +extern int darwinEventFD; +extern Bool quartz; #endif /* _DARWIN_H */ Index: xc/programs/Xserver/hw/darwin/darwinKeyboard.c diff -u xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.5 xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.14 --- xc/programs/Xserver/hw/darwin/darwinKeyboard.c:1.5 Tue Apr 24 22:23:47 2001 +++ xc/programs/Xserver/hw/darwin/darwinKeyboard.c Wed Dec 5 01:27:43 2001 @@ -36,7 +36,7 @@ // //============================================================================= -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.5 2001/04/25 02:23:47 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.14 2001/12/05 06:27:43 torrey Exp $ */ /* =========================================================================== @@ -51,7 +51,7 @@ The modifier map is accessed by the keyCode, but the normal map is accessed by keyCode - MIN_KEYCODE. Sigh. - + =========================================================================== */ @@ -64,27 +64,35 @@ #include #include #include +#include // For the NXSwap* #include "darwin.h" #include "xfIOKit.h" #include "bundle/quartzAudio.h" #include "bundle/quartzShared.h" #define XK_TECHNICAL // needed to get XK_Escape +#define XK_PUBLISHING #include "keysym.h" +// Each key can generate 4 glyphs. They are, in order: +// unshifted, shifted, modeswitch unshifted, modeswitch shifted #define GLYPHS_PER_KEY 4 -#define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better +#define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better #define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 + +#define AltMask Mod1Mask +#define MetaMask Mod2Mask +#define FunctionMask Mod3Mask -#define AltMask Mod1Mask -#define NumLockMask Mod2Mask -#define MetaMask Mod3Mask -#define ScrollLockMask Mod4Mask +// FIXME: It would be nice to support some of the extra keys in XF86keysym.h, +// at least the volume controls that now ship on every Apple keyboard. -static KeySym const ascii_to_x[256] = { +#define UK(a) NoSymbol // unknown symbol + +static KeySym const next_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, XK_KP_Enter, NoSymbol, NoSymbol, NoSymbol, NoSymbol, - XK_Delete, XK_Tab, XK_Linefeed, NoSymbol, + XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol, NoSymbol, XK_Return, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, @@ -115,41 +123,57 @@ XK_x, XK_y, XK_z, XK_braceleft, XK_bar, XK_braceright, XK_asciitilde, XK_BackSpace, // 128 - XK_Ccedilla, XK_udiaeresis, XK_eacute, XK_acircumflex, - XK_adiaeresis, XK_agrave, XK_aring, XK_ccedilla, - XK_ecircumflex, XK_ediaeresis, XK_egrave, XK_idiaeresis, - XK_icircumflex, XK_igrave, XK_Adiaeresis, XK_Aring, - XK_Eacute, XK_ae, XK_AE, XK_ocircumflex, - XK_odiaeresis, XK_ograve, XK_ntilde, XK_ugrave, - XK_ydiaeresis, XK_Odiaeresis, XK_Udiaeresis, XK_cent, - XK_sterling, XK_yen, XK_paragraph, XK_section, + NoSymbol, XK_Agrave, XK_Aacute, XK_Acircumflex, + XK_Atilde, XK_Adiaeresis, XK_Aring, XK_Ccedilla, + XK_Egrave, XK_Eacute, XK_Ecircumflex, XK_Ediaeresis, + XK_Igrave, XK_Iacute, XK_Icircumflex, XK_Idiaeresis, +// 144 + XK_ETH, XK_Ntilde, XK_Ograve, XK_Oacute, + XK_Ocircumflex, XK_Otilde, XK_Odiaeresis, XK_Ugrave, + XK_Uacute, XK_Ucircumflex, XK_Udiaeresis, XK_Yacute, + XK_THORN, XK_mu, XK_multiply, XK_division, // 160 - XK_aacute, XK_degree, XK_cent, XK_sterling, - XK_ntilde, XK_Ntilde, XK_paragraph, XK_Greek_BETA, - XK_questiondown,XK_hyphen, XK_notsign, XK_onehalf, - XK_onequarter, XK_exclamdown, XK_guillemotleft,XK_guillemotright, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, + XK_copyright, XK_exclamdown, XK_cent, XK_sterling, + UK(fraction), XK_yen, UK(fhook), XK_section, + XK_currency, XK_rightsinglequotemark, + XK_leftdoublequotemark, + XK_guillemotleft, + XK_leftanglebracket, + XK_rightanglebracket, + UK(filigature), UK(flligature), +// 176 + XK_registered, XK_endash, XK_dagger, XK_doubledagger, + XK_periodcentered,XK_brokenbar, XK_paragraph, UK(bullet), + XK_singlelowquotemark, + XK_doublelowquotemark, + XK_rightdoublequotemark, + XK_guillemotright, + XK_ellipsis, UK(permille), XK_notsign, XK_questiondown, // 192 - XK_questiondown,XK_exclamdown, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, XK_AE, XK_ae, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, + XK_onesuperior, XK_dead_grave, XK_dead_acute, XK_dead_circumflex, + XK_dead_tilde, XK_dead_macron, XK_dead_breve, XK_dead_abovedot, + XK_dead_diaeresis, + XK_twosuperior, XK_dead_abovering, + XK_dead_cedilla, + XK_threesuperior, + XK_dead_doubleacute, + XK_dead_ogonek, XK_dead_caron, +// 208 + XK_emdash, XK_plusminus, XK_onequarter, XK_onehalf, + XK_threequarters, + XK_agrave, XK_aacute, XK_acircumflex, + XK_atilde, XK_adiaeresis, XK_aring, XK_ccedilla, + XK_egrave, XK_eacute, XK_ecircumflex, XK_ediaeresis, // 224 - XK_Greek_alpha, XK_ssharp, XK_Greek_GAMMA, XK_Greek_pi, - XK_Greek_SIGMA, XK_Greek_sigma, XK_mu, XK_Greek_tau, - XK_Greek_PHI, XK_Greek_THETA, XK_Greek_OMEGA, XK_Greek_delta, - XK_infinity, XK_Ooblique, XK_Greek_epsilon, XK_intersection, - XK_identical, XK_plusminus, XK_greaterthanequal, XK_lessthanequal, - XK_topintegral, XK_botintegral, XK_division, XK_similarequal, - XK_degree, NoSymbol, NoSymbol, XK_radical, - XK_Greek_eta, XK_twosuperior, XK_periodcentered, NoSymbol, + XK_igrave, XK_AE, XK_iacute, XK_ordfeminine, + XK_icircumflex, XK_idiaeresis, XK_eth, XK_ntilde, + XK_Lstroke, XK_Ooblique, XK_OE, XK_masculine, + XK_ograve, XK_oacute, XK_ocircumflex, XK_otilde, +// 240 + XK_odiaeresis, XK_ae, XK_ugrave, XK_uacute, + XK_ucircumflex, XK_idotless, XK_udiaeresis, XK_ygrave, + XK_lstroke, XK_ooblique, XK_oe, XK_ssharp, + XK_thorn, XK_ydiaeresis, NoSymbol, NoSymbol, }; #define MIN_SYMBOL 0xAC @@ -195,20 +219,21 @@ }; int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]); -static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl ) { +static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl ) +{ // keyclick, bell volume / pitch, autorepead, LED's } -static CARD8 modMap[MAP_LENGTH]; -static KeySym map[256 * GLYPHS_PER_KEY]; +static CARD8 modMap[MAP_LENGTH]; +static KeySym map[MAP_LENGTH * GLYPHS_PER_KEY]; static unsigned char modifierKeycodes[NX_NUMMODIFIERS][2]; static FILE *fref = NULL; static char *inBuffer = NULL; //----------------------------------------------------------------------------- // Data Stream Object -// Can be configured to treat embedded "numbers" as being composed of -// either 1, 2, or 4 bytes, apiece. +// Can be configured to treat embedded "numbers" as being composed of +// either 1, 2, or 4 bytes, apiece. //----------------------------------------------------------------------------- typedef struct _DataStream { @@ -260,9 +285,9 @@ static int get_number( DataStream* s ) { switch (s->number_size) { - case 4: return get_dword(s); - case 2: return get_word(s); - default: return get_byte(s); + case 4: return get_dword(s); + case 2: return get_word(s); + default: return get_byte(s); } } @@ -272,22 +297,22 @@ /* * bits_set - * Calculate number of bits set in the modifier mask. + * Calculate number of bits set in the modifier mask. */ static short bits_set( short mask ) { short n = 0; for ( ; mask != 0; mask >>= 1) - if ((mask & 0x01) != 0) - n++; + if ((mask & 0x01) != 0) + n++; return n; } /* * parse_next_char_code - * Read the next character code from the Darwin keymapping - * and write it to the X keymap. + * Read the next character code from the Darwin keymapping + * and write it to the X keymap. */ static void parse_next_char_code( DataStream *s, @@ -298,7 +323,7 @@ if (charSet == 0) { // ascii character if (charCode >= 0 && charCode < 256) - *k = ascii_to_x[charCode]; + *k = next_to_x[charCode]; } else if (charSet == 0x01) { // symbol character if (charCode >= MIN_SYMBOL && charCode <= MIN_SYMBOL + NUM_SYMBOL) @@ -310,102 +335,119 @@ } } + /* * DarwinReadKeymapFile * Read the appropriate keymapping from a keymapping file. */ Bool DarwinReadKeymapFile( - NXKeyMapping *keyMap ) + NXKeyMapping *keyMap) { struct stat st; NXEventSystemDevice info[20]; int interface = 0, handler_id = 0; int map_interface, map_handler_id, map_size = 0; unsigned int i, size; - Boolean hasMatch = FALSE; + int *bufferEnd; union km_tag { int *intP; char *charP; } km; fref = fopen( darwinKeymapFile, "rb" ); - if (fref == 0) { - ErrorF("Unable to open keymapping file %s.\n", darwinKeymapFile); + if (fref == NULL) { + ErrorF("Unable to open keymapping file '%s' (errno %d).\n", + darwinKeymapFile, errno); + return FALSE; + } + if (fstat(fileno(fref), &st) == -1) { + ErrorF("Could not stat keymapping file '%s' (errno %d).\n", + darwinKeymapFile, errno); return FALSE; } - assert( !fstat(fileno(fref), &st) ); // check to make sure we don't crash later if (st.st_size <= 16*sizeof(int)) { - ErrorF("Invalid keymapping file.\n"); + ErrorF("Keymapping file '%s' is invalid (too small).\n", + darwinKeymapFile); return FALSE; } inBuffer = (char*) xalloc( st.st_size ); - assert( fread(inBuffer, st.st_size, 1, fref) ); + bufferEnd = (int *) (inBuffer + st.st_size); + if (fread(inBuffer, st.st_size, 1, fref) != 1) { + ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n", + st.st_size, darwinKeymapFile, errno); + return FALSE; + } + + if (strncmp( inBuffer, "KYM1", 4 ) == 0) { + // Magic number OK. + } else if (strncmp( inBuffer, "KYMP", 4 ) == 0) { + ErrorF("Keymapping file '%s' is intended for use with the original NeXT keyboards and cannot be used by XDarwin.\n", darwinKeymapFile); + return FALSE; + } else { + ErrorF("Keymapping file '%s' has a bad magic number and cannot be used by XDarwin.\n", darwinKeymapFile); + return FALSE; + } // find the keyboard interface and handler id size = sizeof( info ) / sizeof( int ); - if (!NXEventSystemInfo( dfb.hidParam, NX_EVS_DEVICE_INFO, + if (!NXEventSystemInfo( hid.paramConnect, NX_EVS_DEVICE_INFO, (NXEventSystemInfoType) info, &size )) { ErrorF("Error reading event status driver info.\n"); return FALSE; } + size = size * sizeof( int ) / sizeof( info[0] ); for( i = 0; i < size; i++) { if (info[i].dev_type == NX_EVS_DEVICE_TYPE_KEYBOARD) { + Bool hasInterface = FALSE; + Bool hasMatch = FALSE; + interface = info[i].interface; handler_id = info[i].id; - break; - } - } - // Find the appropriate keymapping: - // The first time through we try to match both interface and handler_id. - // If we can't match both, we take the first match for interface. - if (strncmp( inBuffer, "KYM1", 4 ) == 0) { - Bool hasInterface = FALSE; - int *bufferEnd = (int *) (inBuffer + st.st_size); - do { - km.charP = inBuffer; - km.intP++; - while (km.intP+3 < bufferEnd) { - map_interface = *(km.intP++); - map_handler_id = *(km.intP++); - map_size = *(km.intP++); - if (map_interface == interface) { - if (map_handler_id == handler_id || hasInterface) { - hasMatch = TRUE; - break; - } else { - hasInterface = TRUE; + // Find an appropriate keymapping: + // The first time we try to match both interface and handler_id. + // If we can't match both, we take the first match for interface. + + do { + km.charP = inBuffer; + km.intP++; + while (km.intP+3 < bufferEnd) { + map_interface = *(km.intP++); + map_handler_id = *(km.intP++); + map_size = *(km.intP++); + if (map_interface == interface) { + if (map_handler_id == handler_id || hasInterface) { + hasMatch = TRUE; + break; + } else { + hasInterface = TRUE; + } } + km.charP += map_size; } - km.charP += map_size; - } - if (hasMatch) break; - } while (hasInterface); - } else if (strncmp( inBuffer, "KYMP", 4 ) == 0) { - ErrorF("This old style keymapping file is intended for use with the original NeXT keyboards.\n"); - return FALSE; - } else { - ErrorF("The keymapping file has a bad magic number.\n"); - return FALSE; - } + } while (hasInterface && !hasMatch); - if (hasMatch) { - // fill in NXKeyMapping structure - keyMap->size = map_size; - keyMap->mapping = (char*) xalloc(map_size); - memcpy(keyMap->mapping, km.charP, map_size); - } else { - ErrorF("Keymapping file did not contain appropriate keyboard interface.\n"); - return FALSE; - } + if (hasMatch) { + // fill in NXKeyMapping structure + keyMap->size = map_size; + keyMap->mapping = (char*) xalloc(map_size); + memcpy(keyMap->mapping, km.charP, map_size); + return TRUE; + } + } // if dev_id == keyboard device + } // foreach info struct - return TRUE; + // The keymapping file didn't match any of the info structs + // returned by NXEventSystemInfo. + ErrorF("Keymapping file '%s' did not contain appropriate keyboard interface.\n", darwinKeymapFile); + return FALSE; } + /* * DarwinKeyboardInit * Get the Darwin keyboard map and compute an equivalent @@ -434,7 +476,7 @@ // Open a shared connection to the HID System. // Note that the Event Status Driver is really just a wrapper // for a kIOHIDParamConnectType connection. - assert( dfb.hidParam = NXOpenEventStatus() ); + assert( hid.paramConnect = NXOpenEventStatus() ); if (darwinKeymapFile) { haveKeymap = DarwinReadKeymapFile(&keyMap); @@ -449,9 +491,11 @@ if (!haveKeymap) { // get the Darwin keyboard map - keyMap.size = NXKeyMappingLength( dfb.hidParam ); + keyMap.size = NXKeyMappingLength( hid.paramConnect ); keyMap.mapping = (char*) xalloc( keyMap.size ); - assert( NXGetKeyMapping( dfb.hidParam, &keyMap )); + if (!NXGetKeyMapping( hid.paramConnect, &keyMap )) { + FatalError("Could not get kernel keymapping! Load keymapping from file instead.\n"); + } } keyMapStream = new_data_stream( (unsigned char const*)keyMap.mapping, @@ -468,101 +512,142 @@ // Store modifier keycodes in modifierKeycodes. numMods = get_number(keyMapStream); while (numMods-- > 0) { - int left = 1; // first keycode is left + int left = 1; // first keycode is left short const charCode = get_number(keyMapStream); short numKeyCodes = get_number(keyMapStream); + + // This is just a marker, not a real modifier. + // Store numeric keypad keys for later. if (charCode == NX_MODIFIERKEY_NUMERICPAD) { numPadStart = keyMapStream->data; numPadKeys = numKeyCodes; } + while (numKeyCodes-- > 0) { const short keyCode = get_number(keyMapStream); - if (charCode == NX_MODIFIERKEY_ALPHALOCK) { - modMap[keyCode + MIN_KEYCODE] = LockMask; - map[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock; - modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; - } else if (charCode == NX_MODIFIERKEY_SHIFT) { - modMap[keyCode + MIN_KEYCODE] = ShiftMask; - map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Shift_L : XK_Shift_R); - modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; - } else if (charCode == NX_MODIFIERKEY_CONTROL) { - modMap[keyCode + MIN_KEYCODE] = ControlMask; - map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Control_L : XK_Control_R); - modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; - } else if (charCode == NX_MODIFIERKEY_ALTERNATE) { - modMap[keyCode + MIN_KEYCODE] = AltMask; - map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Alt_L : XK_Alt_R); - modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; - } else if (charCode == NX_MODIFIERKEY_COMMAND) { - modMap[keyCode + MIN_KEYCODE] = MetaMask; - map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Meta_L : XK_Meta_R); - modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; - } else if (charCode == NX_MODIFIERKEY_NUMERICPAD) { - continue; - } else if (charCode == NX_MODIFIERKEY_HELP) { - map[keyCode * GLYPHS_PER_KEY] = XK_Help; - modifierKeycodes[charCode][1-left] = keyCode + MIN_KEYCODE; - } else { - break; + if (charCode != NX_MODIFIERKEY_NUMERICPAD) { + modifierKeycodes[charCode][1-left] = keyCode; + switch (charCode) { + case NX_MODIFIERKEY_ALPHALOCK: + modMap[keyCode + MIN_KEYCODE] = LockMask; + map[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock; + break; + case NX_MODIFIERKEY_SHIFT: + modMap[keyCode + MIN_KEYCODE] = ShiftMask; + map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Shift_L : XK_Shift_R); + break; + case NX_MODIFIERKEY_CONTROL: + modMap[keyCode + MIN_KEYCODE] = ControlMask; + map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Control_L : XK_Control_R); + break; + case NX_MODIFIERKEY_ALTERNATE: + modMap[keyCode + MIN_KEYCODE] = AltMask; + map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Mode_switch : XK_Alt_R); + break; + case NX_MODIFIERKEY_COMMAND: + modMap[keyCode + MIN_KEYCODE] = MetaMask; + map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Meta_L : XK_Meta_R); + break; + case NX_MODIFIERKEY_SECONDARYFN: + modMap[keyCode + MIN_KEYCODE] = FunctionMask; + map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Control_L : XK_Control_R); + break; + case NX_MODIFIERKEY_HELP: + // Help is not an X11 modifier; treat as normal key + map[keyCode * GLYPHS_PER_KEY] = XK_Help; + break; + } } left = 0; } } // Convert the Darwin keyboard map to an X keyboard map. - // A key can have shifted and unshifted character codes. - // Other modifiers are ignored although they are - // present in the Darwin keyboard map. + // A key can have a different character code for each combination of + // modifiers. We currently ignore all modifier combinations except + // those with Shift, AlphaLock, and Alt. numKeys = get_number(keyMapStream); for (i = 0, k = map; i < numKeys; i++, k += GLYPHS_PER_KEY) { short const charGenMask = get_number(keyMapStream); if (charGenMask != 0xFF) { // is key bound? short numKeyCodes = 1 << bits_set(charGenMask); - // If alphalock and shift modifiers produce different codes, - // we only need the shift case since X handles alphalock. - if (charGenMask & 0x01 && charGenMask & 0x02) { - // record unshifted case - parse_next_char_code( keyMapStream, k ); - // skip alphalock case - get_number(keyMapStream); get_number(keyMapStream); - // record shifted case + // Record unmodified case + parse_next_char_code( keyMapStream, k ); + numKeyCodes--; + + // If AlphaLock and Shift modifiers produce different codes, + // we record the Shift case since X handles AlphaLock. + if (charGenMask & 0x01) { // AlphaLock parse_next_char_code( keyMapStream, k+1 ); - if (k[1] == k[0]) k[1] = NoSymbol; - numKeyCodes -= 3; - // skip the rest - while (numKeyCodes-- > 0) { - get_number(keyMapStream); get_number(keyMapStream); - } + numKeyCodes--; + } - // If alphalock and shift modifiers produce same code, use it. - } else if (charGenMask & 0x03) { - // record unshifted case - parse_next_char_code( keyMapStream, k ); - // record shifted case + if (charGenMask & 0x02) { // Shift parse_next_char_code( keyMapStream, k+1 ); - if (k[1] == k[0]) k[1] = NoSymbol; - numKeyCodes -= 2; - // skip the rest - while (numKeyCodes-- > 0) { + numKeyCodes--; + + if (charGenMask & 0x01) { // Shift-AlphaLock get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; } + } - // If neither alphalock or shift produce characters, - // use only one character code for this key, - // but it can be a special character. - } else { - parse_next_char_code( keyMapStream, k ); + // Skip the Control cases + if (charGenMask & 0x04) { // Control + get_number(keyMapStream); get_number(keyMapStream); numKeyCodes--; - while (numKeyCodes-- > 0) { // skip the rest + + if (charGenMask & 0x01) { // Control-AlphaLock get_number(keyMapStream); get_number(keyMapStream); - + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Control-Shift + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + + if (charGenMask & 0x01) { // Shift-Control-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + } + } + + // Process Alt cases + if (charGenMask & 0x08) { // Alt + parse_next_char_code( keyMapStream, k+2 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Alt-AlphaLock + parse_next_char_code( keyMapStream, k+3 ); + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Alt-Shift + parse_next_char_code( keyMapStream, k+3 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Alt-Shift-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } } } + + while (numKeyCodes-- > 0) { + get_number(keyMapStream); get_number(keyMapStream); + } + + if (k[3] == k[2]) k[3] = NoSymbol; + if (k[2] == k[1]) k[2] = NoSymbol; + if (k[1] == k[0]) k[1] = NoSymbol; + if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol; } } @@ -615,21 +700,104 @@ DarwinChangeKeyboardControl )); } +//----------------------------------------------------------------------------- +// Modifier translation functions +// +// There are three different ways to specify a Mac modifier key: +// keycode - specifies hardware key, read from keymapping +// key - NX_MODIFIERKEY_*, really an index +// mask - NX_*MASK, mask for modifier flags in event record +// Left and right side have different keycodes but the same key and mask. +//----------------------------------------------------------------------------- + +/* + * DarwinModifierNXKeyToNXKeycode + * Return the keycode for an NX_MODIFIERKEY_* modifier. + * side = 0 for left or 1 for right. + * Returns 0 if key+side is not a known modifier. + */ +int DarwinModifierNXKeyToNXKeycode(int key, int side) +{ + return modifierKeycodes[key][side]; +} + +/* + * DarwinModifierNXKeycodeToNXKey + * Returns -1 if keycode+side is not a modifier key + * outSide may be NULL, else it gets 0 for left and 1 for right. + */ +int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) +{ + int key, side; + + keycode += MIN_KEYCODE; + // search modifierKeycodes for this keycode+side + for (key = 0; key < NX_NUMMODIFIERS; key++) { + for (side = 0; side <= 1; side++) { + if (modifierKeycodes[key][side] == keycode) break; + } + } + if (key == NX_NUMMODIFIERS) return -1; + if (outSide) *outSide = side; + return key; +} + +/* + * DarwinModifierNXMaskToNXKey + * Returns -1 if mask is not a known modifier mask. + */ +int DarwinModifierNXMaskToNXKey(int mask) +{ + switch (mask) { + case NX_ALPHASHIFTMASK: return NX_MODIFIERKEY_ALPHALOCK; + case NX_SHIFTMASK: return NX_MODIFIERKEY_SHIFT; + case NX_CONTROLMASK: return NX_MODIFIERKEY_CONTROL; + case NX_ALTERNATEMASK: return NX_MODIFIERKEY_ALTERNATE; + case NX_COMMANDMASK: return NX_MODIFIERKEY_COMMAND; + case NX_NUMERICPADMASK: return NX_MODIFIERKEY_NUMERICPAD; + case NX_HELPMASK: return NX_MODIFIERKEY_HELP; + case NX_SECONDARYFNMASK: return NX_MODIFIERKEY_SECONDARYFN; + } + return -1; +} + +/* + * DarwinModifierNXKeyToNXMask + * Returns 0 if key is not a known modifier key. + */ +int DarwinModifierNXKeyToNXMask(int key) +{ + switch (key) { + case NX_MODIFIERKEY_ALPHALOCK: return NX_ALPHASHIFTMASK; + case NX_MODIFIERKEY_SHIFT: return NX_SHIFTMASK; + case NX_MODIFIERKEY_CONTROL: return NX_CONTROLMASK; + case NX_MODIFIERKEY_ALTERNATE: return NX_ALTERNATEMASK; + case NX_MODIFIERKEY_COMMAND: return NX_COMMANDMASK; + case NX_MODIFIERKEY_NUMERICPAD: return NX_NUMERICPADMASK; + case NX_MODIFIERKEY_HELP: return NX_HELPMASK; + case NX_MODIFIERKEY_SECONDARYFN: return NX_SECONDARYFNMASK; + } + return 0; +} + /* - * DarwinModifierKeycode - * Return the keycode + MIN_KEYCODE for an NX_MODIFIERKEY_* modifier. - * side = 0 for left or 1 for right. + * DarwinModifierStringToNXKey + * Returns -1 if string is not a known modifier. */ -int DarwinModifierKeycode(int modifier, int side) +int DarwinModifierStringToNXKey(const char *str) { - return modifierKeycodes[modifier][side]; + if (!strcasecmp(str, "shift")) return NX_MODIFIERKEY_SHIFT; + else if (!strcasecmp(str, "control")) return NX_MODIFIERKEY_CONTROL; + else if (!strcasecmp(str, "option")) return NX_MODIFIERKEY_ALTERNATE; + else if (!strcasecmp(str, "command")) return NX_MODIFIERKEY_COMMAND; + else if (!strcasecmp(str, "fn")) return NX_MODIFIERKEY_SECONDARYFN; + else return -1; } /* * LegalModifier - * This allows the driver level to prevent some keys from being remapped - * as modifier keys. - * I have no idea why this is useful. + * This allows the ddx layer to prevent some keys from being remapped + * as modifier keys. */ Bool LegalModifier(unsigned int key, DevicePtr pDev) { Index: xc/programs/Xserver/hw/darwin/xfIOKit.c diff -u xc/programs/Xserver/hw/darwin/xfIOKit.c:1.8 xc/programs/Xserver/hw/darwin/xfIOKit.c:1.14 --- xc/programs/Xserver/hw/darwin/xfIOKit.c:1.8 Mon Apr 30 12:26:01 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKit.c Thu Jan 10 01:59:49 2002 @@ -8,7 +8,7 @@ * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.c,v 1.8 2001/04/30 16:26:01 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.c,v 1.14 2002/01/10 06:59:49 torrey Exp $ */ #define NDEBUG 1 @@ -50,6 +50,7 @@ static mach_port_t notificationPort; static IONotificationPortRef NotificationPortRef; static mach_port_t pmNotificationPort; +static io_iterator_t iter; /* @@ -65,6 +66,8 @@ kern_return_t kr; int i; IOColorEntry *newColors; + ScreenPtr pScreen = pmap->pScreen; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); assert( newColors = (IOColorEntry *) xalloc( numEntries*sizeof(IOColorEntry) )); @@ -79,7 +82,7 @@ newColors[i].blue = pdefs[i].blue; } - kr = IOFBSetCLUT( dfb.fbService, 0, numEntries, + kr = IOFBSetCLUT( dfb->fbService, 0, numEntries, kSetCLUTByValue, newColors ); kern_assert( kr ); @@ -88,7 +91,7 @@ /* * XFIOKitBell - * FIXME + * FIXME */ void XFIOKitBell( int loud, @@ -100,22 +103,25 @@ /* * XFIOKitGiveUp - * FIXME: Crashes kernel if used + * Closes the connections to IOKit services */ void XFIOKitGiveUp( void ) { -#if 1 + int i; + // we must close the HID System first // because it is a client of the framebuffer - NXCloseEventStatus( dfb.hidParam ); - IOServiceClose( dfb.hidService ); - IOServiceClose( dfb.fbService ); -#endif + NXCloseEventStatus( hid.paramConnect ); + IOServiceClose( hid.connect ); + for (i = 0; i < screenInfo.numScreens; i++) { + DarwinFramebufferPtr dfb = SCREEN_PRIV(screenInfo.screens[i]); + IOServiceClose( dfb->fbService ); + } } /* * ClearEvent - * Clear an event from the HID System event queue + * Clear an event from the HID System event queue */ static void ClearEvent(NXEvent * ep) { @@ -128,7 +134,7 @@ /* * XFIOKitHIDThread - * Read the HID System event queue and pass to pipe + * Read the HID System event queue and pass to pipe */ static void *XFIOKitHIDThread(void *arg) { @@ -160,11 +166,12 @@ /* * XFIOKitPMThread - * Handle power state notifications + * Handle power state notifications */ static void *XFIOKitPMThread(void *arg) { ScreenPtr pScreen = (ScreenPtr)arg; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); for (;;) { mach_msg_return_t kr; @@ -176,7 +183,7 @@ // display is powering down if (msg.header.msgh_id == 0) { - IOFBAcknowledgePM( dfb.fbService ); + IOFBAcknowledgePM( dfb->fbService ); xf86SetRootClip(pScreen, FALSE); } // display just woke up @@ -187,13 +194,17 @@ return NULL; } -static void SetupFBandHID(void) +/* + * SetupFBandHID + * Setup an IOFramebuffer service and connect the HID system to it. + */ +static Bool SetupFBandHID( + int index, + DarwinFramebufferPtr dfb) { kern_return_t kr; io_service_t service; - io_iterator_t iter; - io_name_t name; - vm_address_t shmem, vram; + vm_address_t vram; vm_size_t shmemSize; int i; UInt32 numModes; @@ -203,46 +214,29 @@ IOFramebufferInformation fbInfo; StdFBShmem_t *cshmem; - dfb.fbService = 0; - dfb.hidService = 0; - // find and open the IOFrameBuffer service - kr = IOServiceGetMatchingServices( masterPort, - IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ), - &iter ); - kern_assert( kr ); - - // find the requested screen - assert(service = IOIteratorNext(iter)); - for (i = 0; i < darwinScreenNumber; i++) { - IOObjectRelease( service ); - service = IOIteratorNext(iter); - if (service == 0) - FatalError("Could not find the requested screen number %i.\n", - darwinScreenNumber); - } + service = IOIteratorNext(iter); + if (service == 0) + return FALSE; kr = IOServiceOpen( service, mach_task_self(), - kIOFBServerConnectType, &dfb.fbService ); - if (kr != KERN_SUCCESS) -#ifdef DARWIN_WITH_QUARTZ - FatalError("Failed to connect as window server!\nQuit the Mac OS X window server or use the -quartz option.\n"); -#else - FatalError("Failed to connect as window server!\nMake sure you have quit the Mac OS X window server.\n"); -#endif - + kIOFBServerConnectType, &dfb->fbService ); IOObjectRelease( service ); - IOObjectRelease( iter ); + if (kr != KERN_SUCCESS) { + ErrorF("Failed to connect as window server to screen %i.\n", index); + return FALSE; + } // create the slice of shared memory containing cursor state data - kr = IOFBCreateSharedCursor( dfb.fbService, kIOFBCurrentShmemVersion, - 32, 32 ); - kern_assert( kr ); + kr = IOFBCreateSharedCursor( dfb->fbService, kIOFBCurrentShmemVersion, + 32, 32 ); + if (kr != KERN_SUCCESS) + return FALSE; // Register for power management events for the framebuffer's device kr = IOCreateReceivePort(kOSNotificationMessageID, &pmNotificationPort); kern_assert(kr); - kr = IOConnectSetNotificationPort( dfb.fbService, 0, + kr = IOConnectSetNotificationPort( dfb->fbService, 0, pmNotificationPort, 0 ); if (kr != KERN_SUCCESS) { ErrorF("Power management registration failed.\n"); @@ -250,16 +244,18 @@ // SET THE SCREEN PARAMETERS // get the current screen resolution, refresh rate and depth - kr = IOFBGetCurrentDisplayModeAndDepth( dfb.fbService, &displayMode, + kr = IOFBGetCurrentDisplayModeAndDepth( dfb->fbService, &displayMode, &displayDepth ); - kern_assert( kr ); + if (kr != KERN_SUCCESS) + return FALSE; // use the current screen resolution if the user // only wants to change the refresh rate if (darwinDesiredRefresh != -1 && darwinDesiredWidth == 0) { - kr = IOFBGetDisplayModeInformation( dfb.fbService, displayMode, + kr = IOFBGetDisplayModeInformation( dfb->fbService, displayMode, &modeInfo ); - kern_assert( kr ); + if (kr != KERN_SUCCESS) + return FALSE; darwinDesiredWidth = modeInfo.nominalWidth; darwinDesiredHeight = modeInfo.nominalHeight; } @@ -270,33 +266,41 @@ // change the pixel depth if desired if (darwinDesiredDepth != -1) { - kr = IOFBGetDisplayModeInformation( dfb.fbService, displayMode, + kr = IOFBGetDisplayModeInformation( dfb->fbService, displayMode, &modeInfo ); - kern_assert( kr ); - if (modeInfo.maxDepthIndex < darwinDesiredDepth) - FatalError("Current screen resolution does not support desired pixel depth!\n"); + if (kr != KERN_SUCCESS) + return FALSE; + if (modeInfo.maxDepthIndex < darwinDesiredDepth) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Current screen resolution does not support desired pixel depth.\n"); + return FALSE; + } displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth( dfb.fbService, displayMode, + kr = IOFBSetDisplayModeAndDepth( dfb->fbService, displayMode, displayDepth ); - kern_assert( kr ); + if (kr != KERN_SUCCESS) + return FALSE; } - + // look for display mode with correct resolution and refresh rate } else { // get an array of all supported display modes - kr = IOFBGetDisplayModeCount( dfb.fbService, &numModes ); - kern_assert( kr ); + kr = IOFBGetDisplayModeCount( dfb->fbService, &numModes ); + if (kr != KERN_SUCCESS) + return FALSE; assert(allModes = (IODisplayModeID *) xalloc( numModes * sizeof(IODisplayModeID) )); - kr = IOFBGetDisplayModes( dfb.fbService, numModes, allModes ); - kern_assert( kr ); + kr = IOFBGetDisplayModes( dfb->fbService, numModes, allModes ); + if (kr != KERN_SUCCESS) + return FALSE; for (i = 0; i < numModes; i++) { - kr = IOFBGetDisplayModeInformation( dfb.fbService, allModes[i], + kr = IOFBGetDisplayModeInformation( dfb->fbService, allModes[i], &modeInfo ); - kern_assert( kr ); + if (kr != KERN_SUCCESS) + return FALSE; if (modeInfo.flags & kDisplayModeValidFlag && modeInfo.nominalWidth == darwinDesiredWidth && @@ -304,128 +308,142 @@ if (darwinDesiredDepth == -1) darwinDesiredDepth = modeInfo.maxDepthIndex; - if (modeInfo.maxDepthIndex < darwinDesiredDepth) - FatalError("Desired screen resolution does not support desired pixel depth!\n"); + if (modeInfo.maxDepthIndex < darwinDesiredDepth) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Desired screen resolution does not support desired pixel depth.\n"); + return FALSE; + } + if ((darwinDesiredRefresh == -1 || (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) { displayMode = allModes[i]; displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth( dfb.fbService, displayMode, - displayDepth ); - kern_assert( kr ); + kr = IOFBSetDisplayModeAndDepth(dfb->fbService, + displayMode, + displayDepth); + if (kr != KERN_SUCCESS) + return FALSE; break; } } } xfree( allModes ); - if (i >= numModes) - FatalError("Desired screen resolution or refresh rate is not supported!\n"); + if (i >= numModes) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Desired screen resolution or refresh rate is not supported.\n"); + return FALSE; + } } - kr = IOFBGetPixelInformation( dfb.fbService, displayMode, displayDepth, - kIOFBSystemAperture, &dfb.pixelInfo ); - kern_assert( kr ); + kr = IOFBGetPixelInformation( dfb->fbService, displayMode, displayDepth, + kIOFBSystemAperture, &dfb->pixelInfo ); + if (kr != KERN_SUCCESS) + return FALSE; #ifdef __i386__ /* x86 in 8bit mode currently needs fixed color map... */ - if( dfb.pixelInfo.bitsPerComponent == 8 ) { - dfb.pixelInfo.pixelType = kIOFixedCLUTPixels; + if( dfb->pixelInfo.bitsPerComponent == 8 ) { + dfb->pixelInfo.pixelType = kIOFixedCLUTPixels; } #endif #ifdef OLD_POWERBOOK_G3 - if (dfb.pixelInfo.pixelType == kIOCLUTPixels) - dfb.pixelInfo.pixelType = kIOFixedCLUTPixels; + if (dfb->pixelInfo.pixelType == kIOCLUTPixels) + dfb->pixelInfo.pixelType = kIOFixedCLUTPixels; #endif - kr = IOFBGetFramebufferInformationForAperture( dfb.fbService, kIOFBSystemAperture, + kr = IOFBGetFramebufferInformationForAperture( dfb->fbService, + kIOFBSystemAperture, &fbInfo ); - kern_assert( kr ); + if (kr != KERN_SUCCESS) + return FALSE; - kr = IOConnectMapMemory( dfb.fbService, kIOFBCursorMemory, + // FIXME: 1x1 IOFramebuffers are sometimes used to indicate video + // outputs without a monitor connected to them. Since IOKit Xinerama + // does not really work, this often causes problems on PowerBooks. + // For now we explicitly check and ignore these screens. + if (fbInfo.activeWidth <= 1 || fbInfo.activeHeight <= 1) { + ErrorF("Discarding screen %i:\n", index); + ErrorF("Invalid width or height.\n"); + return FALSE; + } + + kr = IOConnectMapMemory( dfb->fbService, kIOFBCursorMemory, mach_task_self(), (vm_address_t *) &cshmem, &shmemSize, kIOMapAnywhere ); - kern_assert( kr ); - dfb.cursorShmem = cshmem; - - kr = IOConnectMapMemory( dfb.fbService, kIOFBSystemAperture, mach_task_self(), - &vram, &shmemSize, kIOMapAnywhere ); - kern_assert( kr ); - - dfb.framebuffer = (void*)vram; - dfb.width = fbInfo.activeWidth; - dfb.height = fbInfo.activeHeight; - dfb.pitch = fbInfo.bytesPerRow; - dfb.bitsPerPixel = fbInfo.bitsPerPixel; - dfb.colorBitsPerPixel = dfb.pixelInfo.componentCount * - dfb.pixelInfo.bitsPerComponent; - - // find and open the HID System Service - kr = IOServiceGetMatchingServices( masterPort, - IOServiceMatching( kIOHIDSystemClass ), - &iter ); - kern_assert( kr ); - - assert( service = IOIteratorNext( iter ) ); - - kr = IORegistryEntryGetName( service, name ); - kern_assert( kr ); - - kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType, - &dfb.hidService ); - kern_assert( kr ); - - IOObjectRelease( service ); - IOObjectRelease( iter ); - - kr = IOHIDCreateSharedMemory( dfb.hidService, kIOHIDCurrentShmemVersion ); - kern_assert( kr ); - - kr = IOHIDSetEventsEnable(dfb.hidService, TRUE); - kern_assert( kr ); - - // Inform the HID system that the framebuffer is also connected to it - kr = IOConnectAddClient( dfb.hidService, dfb.fbService ); - kern_assert( kr ); + if (kr != KERN_SUCCESS) + return FALSE; + dfb->cursorShmem = cshmem; - kr = IOHIDSetCursorEnable(dfb.hidService, TRUE); - kern_assert( kr ); + kr = IOConnectMapMemory( dfb->fbService, kIOFBSystemAperture, + mach_task_self(), &vram, &shmemSize, + kIOMapAnywhere ); + if (kr != KERN_SUCCESS) + return FALSE; - kr = IOConnectMapMemory( dfb.hidService, kIOHIDGlobalMemory, mach_task_self(), - &shmem, &shmemSize, kIOMapAnywhere ); + dfb->framebuffer = (void*)vram; + dfb->x = cshmem->screenBounds.minx; + dfb->y = cshmem->screenBounds.miny; + dfb->width = fbInfo.activeWidth; + dfb->height = fbInfo.activeHeight; + dfb->pitch = fbInfo.bytesPerRow; + dfb->bitsPerPixel = fbInfo.bitsPerPixel; + dfb->colorBitsPerPixel = dfb->pixelInfo.componentCount * + dfb->pixelInfo.bitsPerComponent; + + // Inform the HID system that the framebuffer is also connected to it. + kr = IOConnectAddClient( hid.connect, dfb->fbService ); + kern_assert( kr ); + + // We have to have added at least one screen + // before we can enable the cursor. + kr = IOHIDSetCursorEnable(hid.connect, TRUE); kern_assert( kr ); - evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset); - - assert(sizeof(EvGlobals) == evg->structSize); - - NotificationPortRef = IONotificationPortCreate( masterPort ); + return TRUE; +} - notificationPort = IONotificationPortGetMachPort(NotificationPortRef); +/* + * XFIOKitAddScreen + * IOKit specific initialization for each screen. + */ +Bool XFIOKitAddScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - kr = IOConnectSetNotificationPort( dfb.hidService, kIOHIDEventNotification, - notificationPort, 0 ); - kern_assert( kr ); + // setup hardware framebuffer + dfb->fbService = 0; + if (! SetupFBandHID(index, dfb)) { + if (dfb->fbService) { + IOServiceClose(dfb->fbService); + } + return FALSE; + } - evg->movedMask |= NX_MOUSEMOVEDMASK; + return TRUE; } -/* - * XFIOKitAddScreen - * IOKit specific initialization for each screen. +/* + * XFIOKitSetupScreen + * Finalize IOKit specific initialization of each screen. */ -Bool XFIOKitAddScreen(ScreenPtr pScreen) +Bool XFIOKitSetupScreen( + int index, + ScreenPtr pScreen) { + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); pthread_t pmThread; - // setup cursor support, use hardware cursor if possible + // initalize cursor support if (! XFIOKitInitCursor(pScreen)) { return FALSE; } // initialize colormap handling as needed - if (dfb.pixelInfo.pixelType == kIOCLUTPixels) { + if (dfb->pixelInfo.pixelType == kIOCLUTPixels) { pScreen->StoreColors = XFIOKitStoreColors; } @@ -437,13 +455,17 @@ } /* - * XFIOKitOsVendorInit + * XFIOKitInitOutput * One-time initialization of IOKit support. - * Connect to framebuffer and HID system. */ -void XFIOKitOsVendorInit(void) +void XFIOKitInitOutput( + int argc, + char **argv) { kern_return_t kr; + io_service_t service; + vm_address_t shmem; + vm_size_t shmemSize; int fd[2]; ErrorF("Display mode: IOKit\n"); @@ -451,10 +473,69 @@ kr = IOMasterPort(bootstrap_port, &masterPort); kern_assert( kr ); - SetupFBandHID(); + // find and open the HID System Service + kr = IOServiceGetMatchingServices( masterPort, + IOServiceMatching( kIOHIDSystemClass ), + &iter ); + kern_assert( kr ); + + assert( service = IOIteratorNext( iter ) ); + + kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType, + &hid.connect ); + if (kr != KERN_SUCCESS) { + ErrorF("Failed to connect to the HID System as the window server!\n"); +#ifdef DARWIN_WITH_QUARTZ + FatalError("Quit the Mac OS X window server or use the -quartz option.\n"); +#else + FatalError("Make sure you have quit the Mac OS X window server.\n"); +#endif + } + + IOObjectRelease( service ); + IOObjectRelease( iter ); + + kr = IOHIDCreateSharedMemory( hid.connect, kIOHIDCurrentShmemVersion ); + kern_assert( kr ); + + kr = IOHIDSetEventsEnable(hid.connect, TRUE); + kern_assert( kr ); + + kr = IOConnectMapMemory( hid.connect, kIOHIDGlobalMemory, + mach_task_self(), &shmem, &shmemSize, + kIOMapAnywhere ); + kern_assert( kr ); + + evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset); + + assert(sizeof(EvGlobals) == evg->structSize); + + NotificationPortRef = IONotificationPortCreate( masterPort ); + + notificationPort = IONotificationPortGetMachPort(NotificationPortRef); + + kr = IOConnectSetNotificationPort( hid.connect, kIOHIDEventNotification, + notificationPort, 0 ); + kern_assert( kr ); + + evg->movedMask |= NX_MOUSEMOVEDMASK; + + // find number of framebuffers + kr = IOServiceGetMatchingServices( masterPort, + IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ), + &iter ); + kern_assert( kr ); + + darwinScreensFound = 0; + while ((service = IOIteratorNext(iter))) { + IOObjectRelease( service ); + darwinScreensFound++; + } + IOIteratorReset(iter); assert( pipe(fd) == 0 ); darwinEventFD = fd[0]; fcntl(darwinEventFD, F_SETFL, O_NONBLOCK); - pthread_create(&dfb.hidThread, NULL, XFIOKitHIDThread, (void *) fd[1]); + pthread_create(&hid.thread, NULL, + XFIOKitHIDThread, (void *) fd[1]); } Index: xc/programs/Xserver/hw/darwin/xfIOKit.h diff -u xc/programs/Xserver/hw/darwin/xfIOKit.h:1.3 xc/programs/Xserver/hw/darwin/xfIOKit.h:1.6 --- xc/programs/Xserver/hw/darwin/xfIOKit.h:1.3 Sun Apr 1 03:12:13 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKit.h Sat Dec 22 00:28:34 2001 @@ -3,17 +3,19 @@ IOKit specific functions and definitions */ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.h,v 1.3 2001/04/01 07:12:13 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.h,v 1.6 2001/12/22 05:28:34 torrey Exp $ */ #ifndef _XFIOKIT_H #define _XFIOKIT_H #include "X11/Xproto.h" #include "screenint.h" +#include "darwin.h" -Bool XFIOKitAddScreen(ScreenPtr pScreen); +Bool XFIOKitAddScreen(int index, ScreenPtr pScreen); +Bool XFIOKitSetupScreen(int index, ScreenPtr pScreen); Bool XFIOKitInitCursor(ScreenPtr pScreen); -void XFIOKitOsVendorInit(void); +void XFIOKitInitOutput(int argc, char **argv); void XFIOKitGiveUp(void); void XFIOKitBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); Index: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c diff -u xc/programs/Xserver/hw/darwin/xfIOKitCursor.c:1.2 xc/programs/Xserver/hw/darwin/xfIOKitCursor.c:1.3 --- xc/programs/Xserver/hw/darwin/xfIOKitCursor.c:1.2 Fri Feb 2 16:37:59 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKitCursor.c Wed Aug 1 01:34:05 2001 @@ -32,7 +32,7 @@ * 1.0 by Torrey T. Lyons, October 30, 2000 * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c,v 1.2 2001/02/02 21:37:59 herrb Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c,v 1.3 2001/08/01 05:34:05 torrey Exp $ */ #include "scrnintstr.h" #include "cursorstr.h" @@ -45,6 +45,9 @@ #define DUMP_DARWIN_CURSOR FALSE +#define CURSOR_PRIV(pScreen) \ + ((XFIOKitCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) + // The cursors format are documented in IOFramebufferShared.h. #define RGBto34WithGamma(red, green, blue) \ ( 0x000F \ @@ -68,7 +71,6 @@ ColormapPtr pInstalledMap; } XFIOKitCursorScreenRec, *XFIOKitCursorScreenPtr; -extern DarwinFramebufferRec dfb; static int darwinCursorScreenIndex = -1; static unsigned long darwinCursorGeneration = 0; @@ -355,17 +357,17 @@ CursorPtr pCursor) { Bool result; - XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); if ((pCursor->bits->height > CURSORHEIGHT) || (pCursor->bits->width > CURSORWIDTH) || // FIXME: this condition is not needed after kernel cursor works !ScreenPriv->canHWCursor) { result = (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor); - } else if (dfb.bitsPerPixel == 8) { + } else if (dfb->bitsPerPixel == 8) { result = XFIOKitRealizeCursor8(pScreen, pCursor); - } else if (dfb.bitsPerPixel == 16) { + } else if (dfb->bitsPerPixel == 16) { result = XFIOKitRealizeCursor15(pScreen, pCursor); } else { result = XFIOKitRealizeCursor24(pScreen, pCursor); @@ -385,8 +387,7 @@ CursorPtr pCursor) { Bool result; - XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); if ((pCursor->bits->height > CURSORHEIGHT) || (pCursor->bits->width > CURSORWIDTH) || @@ -415,9 +416,9 @@ int y) { kern_return_t kr; - StdFBShmem_t *cshmem = dfb.cursorShmem; - XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + StdFBShmem_t *cshmem = dfb->cursorShmem; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); // are we supposed to remove the cursor? if (!pCursor) { @@ -427,7 +428,7 @@ if (!cshmem->cursorShow) { cshmem->cursorShow++; if (cshmem->hardwareCursorActive) { - kr = IOFBSetCursorVisible(dfb.fbService, FALSE); + kr = IOFBSetCursorVisible(dfb->fbService, FALSE); kern_assert( kr ); } } @@ -446,14 +447,14 @@ ScreenPriv->cursorMode = 1; // kernel cursor // change the cursor image in shared memory - if (dfb.bitsPerPixel == 8) { + if (dfb->bitsPerPixel == 8) { cursorPrivPtr newCursor = (cursorPrivPtr) pCursor->devPriv[pScreen->myNum]; memcpy(cshmem->cursor.bw8.image[0], newCursor->image, CURSORWIDTH*CURSORHEIGHT); memcpy(cshmem->cursor.bw8.mask[0], newCursor->mask, CURSORWIDTH*CURSORHEIGHT); - } else if (dfb.bitsPerPixel == 16) { + } else if (dfb->bitsPerPixel == 16) { unsigned short *newCursor = (unsigned short *) pCursor->devPriv[pScreen->myNum]; memcpy(cshmem->cursor.rgb.image[0], newCursor, @@ -475,7 +476,7 @@ // try to use a hardware cursor if (ScreenPriv->canHWCursor) { - kr = IOFBSetNewCursor(dfb.fbService, 0, 0, 0); + kr = IOFBSetNewCursor(dfb->fbService, 0, 0, 0); // FIXME: this is a fatal error without the kernel cursor kern_assert( kr ); #if 0 @@ -491,7 +492,7 @@ cshmem->cursorShow--; if (!cshmem->cursorShow && ScreenPriv->canHWCursor) { - kr = IOFBSetCursorVisible(dfb.fbService, TRUE); + kr = IOFBSetCursorVisible(dfb->fbService, TRUE); // FIXME: this is a fatal error without the kernel cursor kern_assert( kr ); #if 0 @@ -527,8 +528,7 @@ int x, int y) { - XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); // only the X cursor needs to be explicitly moved if (!ScreenPriv->cursorMode) @@ -579,7 +579,7 @@ { kern_return_t kr; - kr = IOHIDSetMouseLocation( dfb.hidService, x, y ); + kr = IOHIDSetMouseLocation( hid.connect, x, y ); if (kr != KERN_SUCCESS) { ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr); } @@ -612,8 +612,7 @@ unsigned short *height, ScreenPtr pScreen) { - XFIOKitCursorScreenPtr ScreenPriv = (XFIOKitCursorScreenPtr) - pScreen->devPrivates[darwinCursorScreenIndex].ptr; + XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); if (class == CursorShape) { *width = CURSORWIDTH; @@ -631,14 +630,15 @@ XFIOKitInitCursor( ScreenPtr pScreen) { - XFIOKitCursorScreenPtr ScreenPriv; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + XFIOKitCursorScreenPtr ScreenPriv; miPointerScreenPtr PointPriv; kern_return_t kr; - + // start with no cursor displayed - if (!dfb.cursorShmem->cursorShow++) { - if (dfb.cursorShmem->hardwareCursorActive) { - kr = IOFBSetCursorVisible(dfb.fbService, FALSE); + if (!dfb->cursorShmem->cursorShow++) { + if (dfb->cursorShmem->hardwareCursorActive) { + kr = IOFBSetCursorVisible(dfb->fbService, FALSE); kern_assert( kr ); } } @@ -661,23 +661,23 @@ pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv; // check if a hardware cursor is supported - if (!dfb.cursorShmem->hardwareCursorCapable) { + if (!dfb->cursorShmem->hardwareCursorCapable) { ScreenPriv->canHWCursor = FALSE; ErrorF("Hardware cursor not supported.\n"); } else { // we need to make sure that the hardware cursor really works ScreenPriv->canHWCursor = TRUE; - kr = IOFBSetNewCursor(dfb.fbService, 0, 0, 0); + kr = IOFBSetNewCursor(dfb->fbService, 0, 0, 0); if (kr != KERN_SUCCESS) { ErrorF("Could not set hardware cursor with kernel return 0x%x.\n", kr); ScreenPriv->canHWCursor = FALSE; } - kr = IOFBSetCursorVisible(dfb.fbService, TRUE); + kr = IOFBSetCursorVisible(dfb->fbService, TRUE); if (kr != KERN_SUCCESS) { ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); ScreenPriv->canHWCursor = FALSE; } - IOFBSetCursorVisible(dfb.fbService, FALSE); + IOFBSetCursorVisible(dfb->fbService, FALSE); } ScreenPriv->cursorMode = 0; Index: xc/programs/Xserver/hw/darwin/xfIOKitStartup.c diff -u xc/programs/Xserver/hw/darwin/xfIOKitStartup.c:1.3 xc/programs/Xserver/hw/darwin/xfIOKitStartup.c:1.7 --- xc/programs/Xserver/hw/darwin/xfIOKitStartup.c:1.3 Wed Apr 11 04:34:18 2001 +++ xc/programs/Xserver/hw/darwin/xfIOKitStartup.c Sat Dec 22 00:28:34 2001 @@ -3,11 +3,9 @@ * Startup code for the IOKit Darwin X Server * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitStartup.c,v 1.3 2001/04/11 08:34:18 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitStartup.c,v 1.7 2001/12/22 05:28:34 torrey Exp $ */ -#include "mi.h" -#include "mipointer.h" -#include "scrnintstr.h" +#include "bundle/quartz.h" /* * DarwinHandleGUI @@ -21,18 +19,37 @@ { } +// The IOKit X server does not accept any Quartz command line options. +int QuartzProcessArgument( int argc, char *argv[], int i ) +{ + if (!strcmp( argv[i], "-fullscreen" ) || + !strcmp( argv[i], "-rootless" ) || + !strcmp( argv[i], "-quartz" )) + { + FatalError("Command line option %s is not available without Quartz " + "support.\nInstall the optional Xquartz.tgz tarball for " + "Quartz support.\n", argv[i]); + } + + return 0; +} + // No Quartz support. All Quartz functions are no-ops. -BOOL QuartzAddScreen(ScreenPtr pScreen) { +Bool QuartzAddScreen(int index, ScreenPtr pScreen) { FatalError("QuartzAddScreen called without Quartz support.\n"); } + +Bool QuartzSetupScreen(int index, ScreenPtr pScreen) { + FatalError("QuartzInitCursor called without Quartz support.\n"); +} -void QuartzOsVendorInit(void) { - FatalError("QuartzOsVendorInit called without Quartz support.\n"); +void QuartzInitOutput(int argc, char **argv) { + FatalError("QuartzInitOutput called without Quartz support.\n"); } void QuartzGiveUp(void) { - FatalError("QuartzGiveUp called without Quartz support.\n"); + return; // no message, we are quitting anyway } void QuartzHide(void) { Index: xc/programs/Xserver/hw/darwin/bundle/Imakefile diff -u xc/programs/Xserver/hw/darwin/bundle/Imakefile:1.10.2.1 xc/programs/Xserver/hw/darwin/bundle/Imakefile:1.21 --- xc/programs/Xserver/hw/darwin/bundle/Imakefile:1.10.2.1 Mon May 21 00:56:06 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Imakefile Sat Dec 22 00:28:34 2001 @@ -1,29 +1,50 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Imakefile,v 1.10.2.1 2001/05/21 04:56:06 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Imakefile,v 1.21 2001/12/22 05:28:34 torrey Exp $ #include #define IHaveSubdirs -SRCS = Preferences.m \ +SRCS = Preferences.m \ XApplication.m \ Xserver.m \ + XView.m \ + XWindow.m \ quartz.c \ quartzAudio.c \ quartzCocoa.m \ quartzCursor.c \ - quartzPasteboard.c + quartzPasteboard.c \ + rootlessAquaGlue.c \ + rootlessAquaImp.m \ + rootlessCommon.c \ + rootlessGC.c \ + rootlessScreen.c \ + rootlessValTree.c \ + rootlessWindow.c \ + pseudoramiX.c -OBJS = Preferences.o \ +OBJS = Preferences.o \ XApplication.o \ Xserver.o \ + XView.o \ + XWindow.o \ quartz.o \ quartzAudio.o \ quartzCocoa.o \ quartzCursor.o \ - quartzPasteboard.o + quartzPasteboard.o \ + rootlessAquaGlue.o \ + rootlessAquaImp.o \ + rootlessCommon.o \ + rootlessGC.o \ + rootlessScreen.o \ + rootlessValTree.o \ + rootlessWindow.o \ + pseudoramiX.o + +INCLUDES = -I. -I$(SERVERSRC)/fb -I$(SERVERSRC)/mi -I$(SERVERSRC)/include \ + -I$(XINCLUDESRC) -I$(FONTINCSRC) -I$(SERVERSRC)/render \ + -I$(EXTINCSRC) -I.. -I$(SERVERSRC)/Xext -INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ - -I$(FONTINCSRC) - #if defined(XFree86CustomVersion) CUSTOMVERSION = XFree86CustomVersion CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' @@ -42,7 +63,8 @@ PBXBUILDSTYLE = -buildstyle Deployment #endif -SUBDIRS = English.lproj Japanese.lproj +SUBDIRS = Dutch.lproj English.lproj French.lproj German.lproj Japanese.lproj \ + ko.lproj Spanish.lproj Swedish.lproj MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) @@ -58,6 +80,9 @@ InstallProgram(XDarwinStartup,$(BINDIR)) install:: -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) XDarwinStartup X) + +AllTarget(startXClients) +MakeScriptFromCpp(startXClients, -DXINITDIR=$(XINITDIR) -DXBINDIR=$(BINDIR)) AllTarget(XDarwin) XDarwin: Index: xc/programs/Xserver/hw/darwin/bundle/Preferences.h diff -u xc/programs/Xserver/hw/darwin/bundle/Preferences.h:1.5 xc/programs/Xserver/hw/darwin/bundle/Preferences.h:1.10 --- xc/programs/Xserver/hw/darwin/bundle/Preferences.h:1.5 Wed May 9 03:16:19 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Preferences.h Sat Oct 13 23:02:18 2001 @@ -1,26 +1,35 @@ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.h,v 1.5 2001/05/09 07:16:19 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.h,v 1.10 2001/10/14 03:02:18 torrey Exp $ */ #import @interface Preferences : NSObject { IBOutlet NSPanel *window; - IBOutlet id displayNumber; + IBOutlet id displayField; IBOutlet id dockSwitchButton; IBOutlet id fakeButton; - IBOutlet id keyField; + IBOutlet id button2ModifiersMatrix; + IBOutlet id button3ModifiersMatrix; + IBOutlet id switchKeyButton; IBOutlet id keymapFileField; - IBOutlet id loadKeymapFileButton; - IBOutlet id pickKeymapFileButton; - IBOutlet id splashStartupHelpButton; + IBOutlet id modeMatrix; + IBOutlet id modeWindowButton; IBOutlet id startupHelpButton; IBOutlet id systemBeepButton; + IBOutlet id mouseAccelChangeButton; + IBOutlet id useXineramaButton; + IBOutlet id addToPathButton; + IBOutlet id addToPathField; + IBOutlet id useDefaultShellMatrix; + IBOutlet id useOtherShellField; + IBOutlet id depthButton; BOOL isGettingKeyCode; int keyCode; int modifiers; NSMutableString *switchString; } + - (IBAction)close:(id)sender; - (IBAction)pickFile:(id)sender; - (IBAction)saveChanges:(id)sender; @@ -29,6 +38,7 @@ - (BOOL)sendEvent:(NSEvent*)anEvent; - (void)awakeFromNib; +- (void)windowWillClose:(NSNotification *)aNotification; + (void)setUseKeymapFile:(BOOL)newUseKeymapFile; + (void)setKeymapFile:(NSString*)newFile; @@ -38,8 +48,20 @@ + (void)setDisplay:(int)newDisplay; + (void)setDockSwitch:(BOOL)newDockSwitch; + (void)setFakeButtons:(BOOL)newFakeButtons; ++ (void)setButton2Mask:(int)newFakeMask; ++ (void)setButton3Mask:(int)newFakeMask; ++ (void)setMouseAccelChange:(BOOL)newMouseAccelChange; ++ (void)setUseQDCursor:(int)newUseQDCursor; ++ (void)setRootless:(BOOL)newRootless; ++ (void)setModeWindow:(BOOL)newModeWindow; + (void)setStartupHelp:(BOOL)newStartupHelp; + (void)setSystemBeep:(BOOL)newSystemBeep; ++ (void)setXinerama:(BOOL)newXinerama; ++ (void)setAddToPath:(BOOL)newAddToPath; ++ (void)setAddToPathString:(NSString*)newAddToPathString; ++ (void)setUseDefaultShell:(BOOL)newUseDefaultShell; ++ (void)setShellString:(NSString*)newShellString; ++ (void)setDepth:(int)newDepth; + (void)saveToDisk; + (BOOL)useKeymapFile; @@ -50,7 +72,34 @@ + (int)display; + (BOOL)dockSwitch; + (BOOL)fakeButtons; ++ (int)button2Mask; ++ (int)button3Mask; ++ (BOOL)mouseAccelChange; ++ (int)useQDCursor; ++ (BOOL)rootless; ++ (BOOL)modeWindow; + (BOOL)startupHelp; + (BOOL)systemBeep; ++ (BOOL)xinerama; ++ (BOOL)addToPath; ++ (NSString*)addToPathString; ++ (BOOL)useDefaultShell; ++ (NSString*)shellString; ++ (int)depth; @end + +// Possible settings for useQDCursor +enum { + qdCursor_Never, // never use QuickDraw cursor + qdCursor_Not8Bit, // don't try to use QuickDraw with 8-bit depth + qdCursor_Always // always try to use QuickDraw cursor +}; + +// Possible settings for depth +enum { + depth_Current, + depth_8Bit, + depth_15Bit, + depth_24Bit +}; Index: xc/programs/Xserver/hw/darwin/bundle/Preferences.m diff -u xc/programs/Xserver/hw/darwin/bundle/Preferences.m:1.6 xc/programs/Xserver/hw/darwin/bundle/Preferences.m:1.13 --- xc/programs/Xserver/hw/darwin/bundle/Preferences.m:1.6 Wed May 9 03:16:19 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Preferences.m Sat Oct 13 23:02:18 2001 @@ -3,39 +3,63 @@ // // This class keeps track of the user preferences. // -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.m,v 1.6 2001/05/09 07:16:19 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Preferences.m,v 1.13 2001/10/14 03:02:18 torrey Exp $ */ #import "Preferences.h" -#import "quartzShared.h" +#import "quartzCommon.h" +#include // for modifier masks +// Macros to build the path name +#ifndef XBINDIR +#define XBINDIR /usr/X11R6/bin +#endif +#define STR(s) #s +#define XSTRPATH(s) STR(s) + + @implementation Preferences -+ (void)initialize { ++ (void)initialize +{ // Provide user defaults if needed NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt:0], @"Display", - @"YES", @"FakeButtons", - @"/System/Library/Keyboards/USA.keymapping", @"KeymappingFile", - @"NO", @"UseKeymappingFile", - @"Cmd-Opt-a", @"SwitchString", - @"YES", @"ShowStartupHelp", - [NSNumber numberWithInt:0], @"SwitchKeyCode", - [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)], - @"SwitchModifiers", @"NO", @"UseSystemBeep", - @"NO", @"DockSwitch", nil]; + [NSNumber numberWithInt:0], @"Display", + @"YES", @"FakeButtons", + [NSNumber numberWithInt:NX_COMMANDMASK], @"Button2Mask", + [NSNumber numberWithInt:NX_ALTERNATEMASK], @"Button3Mask", + @"USA.keymapping", @"KeymappingFile", + @"YES", @"UseKeymappingFile", + @"Cmd-Opt-a", @"SwitchString", + @"NO", @"UseRootlessMode", + @"YES", @"ShowModePickWindow", + @"YES", @"ShowStartupHelp", + [NSNumber numberWithInt:0], @"SwitchKeyCode", + [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)], + @"SwitchModifiers", @"NO", @"UseSystemBeep", + @"YES", @"DockSwitch", + @"NO", @"AllowMouseAccelChange", + [NSNumber numberWithInt:qdCursor_Not8Bit], @"UseQDCursor", + @"YES", @"Xinerama", + @"YES", @"AddToPath", + [NSString stringWithCString:XSTRPATH(XBINDIR)], @"AddToPathString", + @"YES", @"UseDefaultShell", + @"/bin/tcsh", @"Shell", + [NSNumber numberWithInt:depth_Current], @"Depth", nil]; [super initialize]; [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; } // Initialize internal state info of switch key button -- (void)initSwitchKey { +- (void)initSwitchKey +{ keyCode = [Preferences keyCode]; modifiers = [Preferences modifiers]; [switchString setString:[Preferences switchString]]; } -- (id)init { +- (id)init +{ self = [super init]; isGettingKeyCode=NO; @@ -45,30 +69,79 @@ return self; } -// Set the window controls to the state in user defaults -- (void)resetWindow { - [loadKeymapFileButton setIntValue:[Preferences useKeymapFile]]; +// Set a modifiers checkbox matrix to match a modifier mask +- (void)resetMatrix:(NSMatrix *)aMatrix withMask:(int)aMask +{ + [aMatrix setState:(aMask & NX_SHIFTMASK) atRow:0 column:0]; + [aMatrix setState:(aMask & NX_CONTROLMASK) atRow:1 column:0]; + [aMatrix setState:(aMask & NX_COMMANDMASK) atRow:2 column:0]; + [aMatrix setState:(aMask & NX_ALTERNATEMASK) atRow:3 column:0]; + [aMatrix setState:(aMask & NX_SECONDARYFNMASK) atRow:4 column:0]; +} +// Generate a modifiers mask from a modifiers checkbox matrix +- (int)getMaskFromMatrix:(NSMatrix *)aMatrix +{ + int theMask = 0; + + if ([[aMatrix cellAtRow:0 column:0] state]) + theMask |= NX_SHIFTMASK; + if ([[aMatrix cellAtRow:1 column:0] state]) + theMask |= NX_CONTROLMASK; + if ([[aMatrix cellAtRow:2 column:0] state]) + theMask |= NX_COMMANDMASK; + if ([[aMatrix cellAtRow:3 column:0] state]) + theMask |= NX_ALTERNATEMASK; + if ([[aMatrix cellAtRow:4 column:0] state]) + theMask |= NX_SECONDARYFNMASK; + + return theMask; +} + +// Set the window controls to the state in user defaults +- (void)resetWindow +{ if ([Preferences keymapFile] == nil) [keymapFileField setStringValue:@" "]; else [keymapFileField setStringValue:[Preferences keymapFile]]; if ([Preferences switchString] == nil) - [keyField setTitle:@"--"]; + [switchKeyButton setTitle:@"--"]; else - [keyField setTitle:[Preferences switchString]]; + [switchKeyButton setTitle:[Preferences switchString]]; - [displayNumber setIntValue:[Preferences display]]; + [displayField setIntValue:[Preferences display]]; [dockSwitchButton setIntValue:[Preferences dockSwitch]]; [fakeButton setIntValue:[Preferences fakeButtons]]; + [self resetMatrix:button2ModifiersMatrix + withMask:[Preferences button2Mask]]; + [self resetMatrix:button3ModifiersMatrix + withMask:[Preferences button3Mask]]; + [modeMatrix setState:[Preferences rootless] atRow:0 column:1]; [startupHelpButton setIntValue:[Preferences startupHelp]]; + [modeWindowButton setIntValue:[Preferences modeWindow]]; [systemBeepButton setIntValue:[Preferences systemBeep]]; + [mouseAccelChangeButton setIntValue:[Preferences mouseAccelChange]]; + [useXineramaButton setIntValue:[Preferences xinerama]]; + [addToPathButton setIntValue:[Preferences addToPath]]; + [addToPathField setStringValue:[Preferences addToPathString]]; + [useDefaultShellMatrix setState:![Preferences useDefaultShell] + atRow:1 column:0]; + [useOtherShellField setStringValue:[Preferences shellString]]; + [depthButton selectItemAtIndex:[Preferences depth]]; } -- (void)awakeFromNib { +- (void)awakeFromNib +{ + [self resetWindow]; +} + +// Preference window delegate +- (void)windowWillClose:(NSNotification *)aNotification +{ [self resetWindow]; - [splashStartupHelpButton setIntValue:[Preferences startupHelp]]; + [self initSwitchKey]; } // User cancelled the changes @@ -87,7 +160,8 @@ NSOpenPanel *oPanel = [NSOpenPanel openPanel]; [oPanel setAllowsMultipleSelection:NO]; - result = [oPanel runModalForDirectory:@"/System/Library/Keyboards" file:nil types:fileTypes]; + result = [oPanel runModalForDirectory:@"/System/Library/Keyboards" + file:nil types:fileTypes]; if (result == NSOKButton) { [keymapFileField setStringValue:[oPanel filename]]; } @@ -100,12 +174,26 @@ [Preferences setModifiers:modifiers]; [Preferences setSwitchString:switchString]; [Preferences setKeymapFile:[keymapFileField stringValue]]; - [Preferences setUseKeymapFile:[loadKeymapFileButton intValue]]; - [Preferences setDisplay:[displayNumber intValue]]; + [Preferences setUseKeymapFile:YES]; + [Preferences setDisplay:[displayField intValue]]; [Preferences setDockSwitch:[dockSwitchButton intValue]]; [Preferences setFakeButtons:[fakeButton intValue]]; + [Preferences setButton2Mask: + [self getMaskFromMatrix:button2ModifiersMatrix]]; + [Preferences setButton3Mask: + [self getMaskFromMatrix:button3ModifiersMatrix]]; + [Preferences setRootless:[[modeMatrix cellAtRow:0 column:1] state]]; + [Preferences setModeWindow:[modeWindowButton intValue]]; [Preferences setStartupHelp:[startupHelpButton intValue]]; [Preferences setSystemBeep:[systemBeepButton intValue]]; + [Preferences setMouseAccelChange:[mouseAccelChangeButton intValue]]; + [Preferences setXinerama:[useXineramaButton intValue]]; + [Preferences setAddToPath:[addToPathButton intValue]]; + [Preferences setAddToPathString:[addToPathField stringValue]]; + [Preferences setUseDefaultShell: + [[useDefaultShellMatrix cellAtRow:0 column:0] state]]; + [Preferences setShellString:[useOtherShellField stringValue]]; + [Preferences setDepth:[depthButton indexOfSelectedItem]]; [Preferences saveToDisk]; [window orderOut:nil]; @@ -113,12 +201,13 @@ - (IBAction)setKey:(id)sender { - [keyField setTitle:@"Press key"]; + [switchKeyButton setTitle:@"Press key"]; isGettingKeyCode=YES; [switchString setString:@""]; } -- (BOOL)sendEvent:(NSEvent*)anEvent { +- (BOOL)sendEvent:(NSEvent*)anEvent +{ if(isGettingKeyCode) { if([anEvent type]==NSKeyDown) //wait for keyup return YES; @@ -139,7 +228,7 @@ [switchString appendString:@"Fn-"]; [switchString appendString:[anEvent charactersIgnoringModifiers]]; - [keyField setTitle:switchString]; + [switchKeyButton setTitle:switchString]; keyCode = [anEvent keyCode]; modifiers = [anEvent modifierFlags]; @@ -150,92 +239,279 @@ return NO; } -+ (void)setKeymapFile:(NSString*)newFile { - [[NSUserDefaults standardUserDefaults] setObject:newFile forKey:@"KeymappingFile"]; ++ (void)setKeymapFile:(NSString*)newFile +{ + [[NSUserDefaults standardUserDefaults] setObject:newFile + forKey:@"KeymappingFile"]; } -+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile { - [[NSUserDefaults standardUserDefaults] setBool:newUseKeymapFile forKey:@"UseKeymappingFile"]; ++ (void)setUseKeymapFile:(BOOL)newUseKeymapFile +{ + [[NSUserDefaults standardUserDefaults] setBool:newUseKeymapFile + forKey:@"UseKeymappingFile"]; } -+ (void)setSwitchString:(NSString*)newString { - [[NSUserDefaults standardUserDefaults] setObject:newString forKey:@"SwitchString"]; ++ (void)setSwitchString:(NSString*)newString +{ + [[NSUserDefaults standardUserDefaults] setObject:newString + forKey:@"SwitchString"]; } -+ (void)setKeyCode:(int)newKeyCode { - [[NSUserDefaults standardUserDefaults] setInteger:newKeyCode forKey:@"SwitchKeyCode"]; ++ (void)setKeyCode:(int)newKeyCode +{ + [[NSUserDefaults standardUserDefaults] setInteger:newKeyCode + forKey:@"SwitchKeyCode"]; } -+ (void)setModifiers:(int)newModifiers { - [[NSUserDefaults standardUserDefaults] setInteger:newModifiers forKey:@"SwitchModifiers"]; ++ (void)setModifiers:(int)newModifiers +{ + [[NSUserDefaults standardUserDefaults] setInteger:newModifiers + forKey:@"SwitchModifiers"]; } -+ (void)setDisplay:(int)newDisplay { - [[NSUserDefaults standardUserDefaults] setInteger:newDisplay forKey:@"Display"]; ++ (void)setDisplay:(int)newDisplay +{ + [[NSUserDefaults standardUserDefaults] setInteger:newDisplay + forKey:@"Display"]; } -+ (void)setDockSwitch:(BOOL)newDockSwitch { - [[NSUserDefaults standardUserDefaults] setBool:newDockSwitch forKey:@"DockSwitch"]; ++ (void)setDockSwitch:(BOOL)newDockSwitch +{ + [[NSUserDefaults standardUserDefaults] setBool:newDockSwitch + forKey:@"DockSwitch"]; } -+ (void)setFakeButtons:(BOOL)newFakeButtons { - [[NSUserDefaults standardUserDefaults] setBool:newFakeButtons forKey:@"FakeButtons"]; ++ (void)setFakeButtons:(BOOL)newFakeButtons +{ + [[NSUserDefaults standardUserDefaults] setBool:newFakeButtons + forKey:@"FakeButtons"]; // Update the setting used by the X server thread darwinFakeButtons = newFakeButtons; } -+ (void)setStartupHelp:(BOOL)newStartupHelp { - [[NSUserDefaults standardUserDefaults] setBool:newStartupHelp forKey:@"ShowStartupHelp"]; ++ (void)setButton2Mask:(int)newFakeMask +{ + [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask + forKey:@"Button2Mask"]; + // Update the setting used by the X server thread + darwinFakeMouse2Mask = newFakeMask; +} + ++ (void)setButton3Mask:(int)newFakeMask +{ + [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask + forKey:@"Button3Mask"]; + // Update the setting used by the X server thread + darwinFakeMouse3Mask = newFakeMask; +} + ++ (void)setMouseAccelChange:(BOOL)newMouseAccelChange +{ + [[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange + forKey:@"AllowMouseAccelChange"]; + // Update the setting used by the X server thread + quartzMouseAccelChange = newMouseAccelChange; +} + ++ (void)setUseQDCursor:(int)newUseQDCursor +{ + [[NSUserDefaults standardUserDefaults] setInteger:newUseQDCursor + forKey:@"UseQDCursor"]; +} + ++ (void)setModeWindow:(BOOL)newModeWindow +{ + [[NSUserDefaults standardUserDefaults] setBool:newModeWindow + forKey:@"ShowModePickWindow"]; +} + ++ (void)setRootless:(BOOL)newRootless +{ + [[NSUserDefaults standardUserDefaults] setBool:newRootless + forKey:@"UseRootlessMode"]; } -+ (void)setSystemBeep:(BOOL)newSystemBeep { - [[NSUserDefaults standardUserDefaults] setBool:newSystemBeep forKey:@"UseSystemBeep"]; ++ (void)setStartupHelp:(BOOL)newStartupHelp +{ + [[NSUserDefaults standardUserDefaults] setBool:newStartupHelp + forKey:@"ShowStartupHelp"]; +} + ++ (void)setSystemBeep:(BOOL)newSystemBeep +{ + [[NSUserDefaults standardUserDefaults] setBool:newSystemBeep + forKey:@"UseSystemBeep"]; // Update the setting used by the X server thread quartzUseSysBeep = newSystemBeep; } -+ (void)saveToDisk { ++ (void)setXinerama:(BOOL)newXinerama +{ + [[NSUserDefaults standardUserDefaults] setBool:newXinerama + forKey:@"Xinerama"]; +} + ++ (void)setAddToPath:(BOOL)newAddToPath +{ + [[NSUserDefaults standardUserDefaults] setBool:newAddToPath + forKey:@"AddToPath"]; +} + ++ (void)setAddToPathString:(NSString*)newAddToPathString +{ + [[NSUserDefaults standardUserDefaults] setObject:newAddToPathString + forKey:@"AddToPathString"]; +} + ++ (void)setUseDefaultShell:(BOOL)newUseDefaultShell +{ + [[NSUserDefaults standardUserDefaults] setBool:newUseDefaultShell + forKey:@"UseDefaultShell"]; +} + ++ (void)setShellString:(NSString*)newShellString +{ + [[NSUserDefaults standardUserDefaults] setObject:newShellString + forKey:@"Shell"]; +} + ++ (void)setDepth:(int)newDepth +{ + [[NSUserDefaults standardUserDefaults] setInteger:newDepth + forKey:@"Depth"]; +} + ++ (void)saveToDisk +{ [[NSUserDefaults standardUserDefaults] synchronize]; } -+ (BOOL)useKeymapFile { - return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseKeymappingFile"]; ++ (BOOL)useKeymapFile +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseKeymappingFile"]; } -+ (NSString*)keymapFile { - return [[NSUserDefaults standardUserDefaults] stringForKey:@"KeymappingFile"]; ++ (NSString*)keymapFile +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"KeymappingFile"]; } -+ (NSString*)switchString { - return [[NSUserDefaults standardUserDefaults] stringForKey:@"SwitchString"]; ++ (NSString*)switchString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"SwitchString"]; } -+ (unsigned int)keyCode { - return [[NSUserDefaults standardUserDefaults] integerForKey:@"SwitchKeyCode"]; ++ (unsigned int)keyCode +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"SwitchKeyCode"]; } -+ (unsigned int)modifiers { - return [[NSUserDefaults standardUserDefaults] integerForKey:@"SwitchModifiers"]; ++ (unsigned int)modifiers +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"SwitchModifiers"]; } -+ (int)display { - return [[NSUserDefaults standardUserDefaults] integerForKey:@"Display"]; ++ (int)display +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Display"]; } -+ (BOOL)dockSwitch { ++ (BOOL)dockSwitch +{ return [[NSUserDefaults standardUserDefaults] boolForKey:@"DockSwitch"]; } -+ (BOOL)fakeButtons { ++ (BOOL)fakeButtons +{ return [[NSUserDefaults standardUserDefaults] boolForKey:@"FakeButtons"]; } + ++ (int)button2Mask +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Button2Mask"]; +} -+ (BOOL)startupHelp { - return [[NSUserDefaults standardUserDefaults] boolForKey:@"ShowStartupHelp"]; ++ (int)button3Mask +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Button3Mask"]; +} + ++ (BOOL)mouseAccelChange +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"AllowMouseAccelChange"]; +} + ++ (int)useQDCursor +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"UseQDCursor"]; } -+ (BOOL)systemBeep { ++ (BOOL)rootless +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseRootlessMode"]; +} + ++ (BOOL)modeWindow +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"ShowModePickWindow"]; +} + ++ (BOOL)startupHelp +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"ShowStartupHelp"]; +} + ++ (BOOL)systemBeep +{ return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSystemBeep"]; } + ++ (BOOL)xinerama +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"Xinerama"]; +} + ++ (BOOL)addToPath +{ + return [[NSUserDefaults standardUserDefaults] boolForKey:@"AddToPath"]; +} + ++ (NSString*)addToPathString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"AddToPathString"]; +} + ++ (BOOL)useDefaultShell +{ + return [[NSUserDefaults standardUserDefaults] + boolForKey:@"UseDefaultShell"]; +} + ++ (NSString*)shellString +{ + return [[NSUserDefaults standardUserDefaults] + stringForKey:@"Shell"]; +} + ++ (int)depth +{ + return [[NSUserDefaults standardUserDefaults] + integerForKey:@"Depth"]; +} + @end Index: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c diff -u xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c:1.3 xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c:1.5 --- xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c:1.3 Mon Apr 16 02:51:48 2001 +++ xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c Sat Dec 29 22:50:15 2001 @@ -12,7 +12,7 @@ * run by XDarwin.app. * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c,v 1.3 2001/04/16 06:51:48 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/XDarwinStartup.c,v 1.5 2001/12/30 03:50:15 torrey Exp $ */ #include #include @@ -44,13 +44,16 @@ pause(); return 0; - } else if (!strcmp(argv[i], "-quartz")) { + } else if (!strcmp(argv[i], "-quartz") || + !strcmp(argv[i], "-rootless") || + !strcmp(argv[i], "-fullscreen")) + { char quartzPath[PATH_MAX+1]; int pathLength; // Find the path to the Quartz executable pathLength = readlink(XPATH(XDarwinQuartz), quartzPath, PATH_MAX); - if (!pathLength) { + if (pathLength == -1) { fprintf(stderr, "The symbolic link " XPATH(XDarwinQuartz) " is not valid.\n"); return errno; @@ -66,7 +69,9 @@ newargv[argc+1] = NULL; execv(newargv[0], newargv); - fprintf(stderr, "Could not start XDarwin Quartz X server.\n"); + fprintf(stderr, + "Could not start XDarwin Quartz X server at %s.\n", + quartzPath); return errno; } } Index: xc/programs/Xserver/hw/darwin/bundle/XView.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XView.h:1.3 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/XView.h Mon Nov 5 00:12:16 2001 @@ -0,0 +1,50 @@ +/* + * NSView subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/XView.h,v 1.3 2001/11/05 05:12:16 torrey Exp $ */ + +#import + +#include +#include "fakeBoxRec.h" + +@interface XView : NSView +{ + char *mBits; + int mBytesPerRow; + int mBitsPerSample; + int mSamplesPerPixel; + int mBitsPerPixel; + int mDepth; + BOOL mShaped; +} + +- (id)initWithFrame:(NSRect)aRect; +- (void)dealloc; + +- (void)drawRect:(NSRect)aRect; +- (BOOL)isFlipped; +- (BOOL)acceptsFirstResponder; +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent; +- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent; + +- (void)mouseDown:(NSEvent *)anEvent; + +- (void)setFrameSize:(NSSize)newSize; + +- (void)allocBitsForSize:(NSSize)newSize; +- (char *)bits; +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp; + +- (void)refreshRects:(fakeBoxRec *)rectList count:(int)count; +- (void)reshapeRects:(fakeBoxRec *)eraseRects count:(int)count; + +- (void)copyToScreen:(fakeBoxRec *)rectList count:(int)count + fromTemp:(BOOL)copyFromTemp; +- (void)copyToShapeBits:(fakeBoxRec *)rectList count:(int)count; +- (void)eraseFromShapeBits:(fakeBoxRec *)rectList count:(int)count; + +@end Index: xc/programs/Xserver/hw/darwin/bundle/XView.m diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XView.m:1.5 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/XView.m Thu Nov 8 19:12:38 2001 @@ -0,0 +1,330 @@ +/* + * NSView subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/XView.m,v 1.5 2001/11/09 00:12:38 torrey Exp $ */ + +#include + +#import "XView.h" +#include "fakeBoxRec.h" + +static const void *infobytes(void *info) +{ + return info; +} + + +static unsigned long *shapeBits = NULL; +static int shapeWidth = 0; +static int shapeHeight = 0; + +static void reallocShapeBits(NSSize minSize) +{ + if (shapeWidth < minSize.width || shapeHeight < minSize.height) { + shapeWidth = minSize.width; + shapeHeight = minSize.height; + if (shapeBits) free(shapeBits); + shapeBits = (unsigned long *) malloc(4 * shapeWidth * shapeHeight); + } +} + + +@implementation XView + +- (id)initWithFrame:(NSRect)aRect +{ + self = [super initWithFrame:aRect]; + if (!self) return nil; + + mShaped = NO; + mBitsPerSample = 8; + mSamplesPerPixel = 3; + mDepth = mBitsPerSample * mSamplesPerPixel; + mBitsPerPixel = 32; + mBits = nil; + [self allocBitsForSize:aRect.size]; + + return self; +} + +- (void)dealloc +{ + if (mBits) free(mBits); + [super dealloc]; +} + +- (void)drawRect:(NSRect)aRect +{ + // Never draw here. +} + +- (BOOL)isFlipped +{ + return NO; +} + +- (BOOL)isOpaque +{ + return !mShaped; +} + +- (BOOL)acceptsFirstResponder +{ + return YES; +} + +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent +{ + return YES; +} + +- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent +{ + return YES; +} + + +- (void)mouseDown:(NSEvent *)anEvent +{ + // Only X is allowed to restack windows. + [NSApp preventWindowOrdering]; + [[self nextResponder] mouseDown:anEvent]; +} + +- (void)mouseUp:(NSEvent *)anEvent +{ + // Bring app to front if necessary + // Don't bring app to front in mouseDown; mousedown-mouseup is too + // long and X gets what looks like a mouse drag. + if (! [NSApp isActive]) { + [NSApp activateIgnoringOtherApps:YES]; + [NSApp arrangeInFront:nil]; // fixme only bring some windows forward? + } + + [[self nextResponder] mouseDown:anEvent]; +} + + +// Reallocate bits. +// setFrame goes through here too. +- (void)setFrameSize:(NSSize)newSize +{ + [self allocBitsForSize:newSize]; + [super setFrameSize:newSize]; +} + +- (void)allocBitsForSize:(NSSize)newSize +{ + if (mBits) free(mBits); + mBytesPerRow = newSize.width * mBitsPerPixel / 8; + mBits = calloc(mBytesPerRow * newSize.height, 1); +} + +- (char *)bits +{ + return mBits; +} + +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp +{ + *bits = mBits; + *rowBytes = mBytesPerRow; + *depth = mDepth; + *bpp = mBitsPerPixel; +} + +- (void)refreshRects:(fakeBoxRec *)rectList count:(int)count +{ + if (!mShaped) { + [self lockFocus]; + [self copyToScreen:rectList count:count fromTemp:NO]; + } else { + [self copyToShapeBits:rectList count:count]; + [self lockFocus]; + [self copyToScreen:rectList count:count fromTemp:YES]; + } + [[NSGraphicsContext currentContext] flushGraphics]; + [self unlockFocus]; +} + +// eraseRects are OUTSIDE the new shape +- (void)reshapeRects:(fakeBoxRec *)eraseRects count:(int)count +{ + fakeBoxRec bounds = {0, 0, [self frame].size.width, + [self frame].size.height}; + + if (count == 0 && !mShaped) { + [self refreshRects:&bounds count:1]; + } else { + // View is shaped, or used to be shaped. + // Shaped windows never become unshaped. + // (Mac OS X 10.0.4 does not allow transparent windows + // to become opaque.) + + mShaped = YES; + + // Magic. 10.0.4 and 10.1 both require the alpha channel to be + // cleared explicitly. 10.0.4 additionally requires the view to + // be unlocked between this and the drawing code below. + [self lockFocus]; + [[NSColor clearColor] set]; + NSRectFill([self frame]); + [self unlockFocus]; + + // copy everything from X11 to temp + // erase eraseRects from temp + // copy everything from temp to screen + [self lockFocus]; + [self copyToShapeBits:&bounds count:1]; + [self eraseFromShapeBits:eraseRects count:count]; + [self copyToScreen:&bounds count:1 fromTemp:YES]; + [[NSGraphicsContext currentContext] flushGraphics]; + [self unlockFocus]; + } +} + + +- (void)eraseFromShapeBits:(fakeBoxRec *)rectList count:(int)count +{ + unsigned long *dst = NULL; // don't assign yet + int dstWidth = 0; // don't assign yet + fakeBoxRec *r; + fakeBoxRec *end; + + assert(mBitsPerPixel == 32); + reallocShapeBits([self frame].size); + dst = shapeBits; + dstWidth = shapeWidth; + + for (r = rectList, end = rectList + count; r < end; r++) { + unsigned long *dstline = dst + dstWidth*r->y1 + r->x1; + int h = r->y2 - r->y1; + + while (h--) { + unsigned long *dstp = dstline; + int w = r->x2 - r->x1; + + while (w--) { + *dstp++ = 0x00000000; + } + dstline += dstWidth; + } + } +} + +// assumes X11 bits and temp bits are 32-bit +- (void)copyToShapeBits:(fakeBoxRec *)rectList count:(int)count +{ + unsigned long *src = (unsigned long *) mBits; + unsigned long *dst = NULL; // don't assign yet + int srcWidth = mBytesPerRow / 4; + int dstWidth = 0; // don't assign yet + fakeBoxRec *r; + fakeBoxRec *end; + + assert(mBitsPerPixel == 32); + reallocShapeBits([self frame].size); + dst = shapeBits; + dstWidth = shapeWidth; + + for (r = rectList, end = rectList + count; r < end; r++) { + unsigned long *srcline = src + srcWidth*r->y1 + r->x1; + unsigned long *dstline = dst + dstWidth*r->y1 + r->x1; + int h = r->y2 - r->y1; + + while (h--) { + unsigned long *srcp = srcline; + unsigned long *dstp = dstline; + int w = r->x2 - r->x1; + + while (w--) { + *dstp++ = *srcp++ | 0xff000000; + } + srcline += srcWidth; + dstline += dstWidth; + } + } +} + + +// Copy boxes to the screen from the per-window pixmaps where X draws. +// rectList is in local, X-flipped coordinates. +- (void)copyToScreen:(fakeBoxRec *)rectList count:(int)count + fromTemp:(BOOL)copyFromTemp +{ + unsigned char *offsetbits; + fakeBoxRec *r; + fakeBoxRec *end; + NSRect bounds; + char *srcBits; + int bytesPerRow; + int bitsPerPixel; + int bitsPerSample; + CGImageAlphaInfo alpha; + CGContextRef destCtx = (CGContextRef)[[NSGraphicsContext currentContext] + graphicsPort]; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + // fixme colorspace leaks? + const CGDataProviderDirectAccessCallbacks cb = { + infobytes, NULL, NULL, NULL + }; + + if (copyFromTemp) { + // shapeBits assumed to be 32-bit + srcBits = (char *)shapeBits; + bytesPerRow = 4 * shapeWidth; + bitsPerPixel = 32; + bitsPerSample = 8; + alpha = kCGImageAlphaPremultipliedFirst; // premultiplied ARGB + } else { + srcBits = mBits; + bytesPerRow = mBytesPerRow; + bitsPerPixel = mBitsPerPixel; + bitsPerSample = mBitsPerSample; + alpha = kCGImageAlphaNoneSkipFirst; // xRGB + } + + bounds = [self frame]; + bounds.origin.x = bounds.origin.y = 0; + + for (r = rectList, end = rectList + count; r < end; r++) { + NSRect nsr = {{r->x1, r->y1}, {r->x2-r->x1, r->y2-r->y1}}; + CGRect destRect; + CGDataProviderRef dataProviderRef; + CGImageRef imageRef; + + // Clip to window + // (bounds origin is (0,0) so it can be used in either flip) + // fixme is this necessary with pixmap-per-window? + nsr = NSIntersectionRect(nsr, bounds); + + // Disallow empty rects + if (nsr.size.width <= 0 || nsr.size.height <= 0) continue; + + offsetbits = srcBits + (int)(nsr.origin.y * bytesPerRow + + nsr.origin.x * bitsPerPixel/8); + + // Flip r to Cocoa-flipped + nsr.origin.y = bounds.size.height - nsr.origin.y - nsr.size.height; + destRect = CGRectMake(nsr.origin.x, nsr.origin.y, + nsr.size.width, nsr.size.height); + + dataProviderRef = CGDataProviderCreateDirectAccess(offsetbits, + destRect.size.height * bytesPerRow, &cb); + + imageRef = CGImageCreate(destRect.size.width, destRect.size.height, + bitsPerSample, bitsPerPixel, bytesPerRow, + colorSpace, alpha, dataProviderRef, NULL, + 1, kCGRenderingIntentDefault); + + CGContextDrawImage(destCtx, destRect, imageRef); + CGImageRelease(imageRef); + CGDataProviderRelease(dataProviderRef); + } +} + + +@end Index: xc/programs/Xserver/hw/darwin/bundle/XWindow.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XWindow.h:1.2 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/XWindow.h Sun Sep 16 23:08:40 2001 @@ -0,0 +1,36 @@ +/* + * NSWindow subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/XWindow.h,v 1.2 2001/09/17 03:08:40 torrey Exp $ */ + +#import +#import "XView.h" + +#include "fakeBoxRec.h" + +@interface XWindow : NSWindow +{ + XView *mView; +} + +- (id)initWithContentRect:(NSRect)aRect + isRoot:(BOOL)isRoot; +- (void)dealloc; + +- (char *)bits; +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp; + +- (void)refreshRects:(fakeBoxRec *)rectList + count:(int)count; + +- (void)orderWindow:(NSWindowOrderingMode)place + relativeTo:(int)otherWindowNumber; + +- (void)sendEvent:(NSEvent *)anEvent; +- (BOOL)canBecomeMainWindow; +- (BOOL)canBecomeKeyWindow; + +@end Index: xc/programs/Xserver/hw/darwin/bundle/XWindow.m diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/XWindow.m:1.5 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/XWindow.m Tue Nov 6 18:18:14 2001 @@ -0,0 +1,104 @@ +/* + * NSWindow subclass for Mac OS X rootless X server + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/XWindow.m,v 1.5 2001/11/06 23:18:14 torrey Exp $ */ + +#import "XWindow.h" + + +@implementation XWindow + +// XWindow MUST NOT autodisplay! Autodisplay can cause a deadlock. +// event thread - autodisplay: locks view hierarchy, then window +// X Server thread - window resize: locks window, then view hierarchy +// Deadlock occurs if each thread gets one lock and waits for the other. + +// XWindow MUST defer! Otherwise an assertion fails in +// NSViewHierarchyLock sometimes. + +- (id)initWithContentRect:(NSRect)aRect + isRoot:(BOOL)isRoot +{ + int style; + NSRect viewRect = {{0, 0}, {aRect.size.width, aRect.size.height}}; + style = NSBorderlessWindowMask; + + self = [super initWithContentRect: aRect + styleMask: style + backing: NSBackingStoreBuffered + defer: YES]; + if (! self) return NULL; + + [self setBackgroundColor:[NSColor clearColor]]; // erase transparent + [self setAlphaValue:1.0]; // draw opaque + [self setOpaque:YES]; // changed when window is shaped + + [self useOptimizedDrawing:YES]; // Has no overlapping sub-views + [self setAutodisplay:NO]; // MUST NOT autodisplay! See comment above + [self disableFlushWindow]; // We do all the flushing manually + [self setHasShadow: !isRoot]; // All windows have shadows except root + + // [self setAcceptsMouseMovedEvents:YES]; // MUST be AFTER orderFront? + + mView = [[XView alloc] initWithFrame: viewRect]; + [self setContentView:mView]; + [self setInitialFirstResponder:mView]; + + return self; +} + +- (void)dealloc +{ + [mView release]; + [super dealloc]; +} + +- (char *)bits +{ + return [mView bits]; +} + +- (void)getBits:(char **)bits + rowBytes:(int *)rowBytes + depth:(int *)depth + bitsPerPixel:(int *)bpp +{ + [mView getBits:bits rowBytes:rowBytes depth:depth bitsPerPixel:bpp]; +} + + +// rects are X-flip and LOCAL coords +- (void)refreshRects:(fakeBoxRec *)rectList count:(int)count; +{ + [mView refreshRects:rectList count:count]; +} + + +// Deferred windows don't handle mouse moved events very well. +- (void)orderWindow:(NSWindowOrderingMode)place + relativeTo:(int)otherWindowNumber +{ + [super orderWindow:place relativeTo:otherWindowNumber]; + [self setAcceptsMouseMovedEvents:YES]; +} + +- (void)sendEvent:(NSEvent *)anEvent +{ + [super sendEvent:anEvent]; + [self setAcceptsMouseMovedEvents:YES]; +} + +// XWindow may be frameless, and frameless windows default to +// NO key and NO main. +// update: we *don't* want main or key status after all +- (BOOL)canBecomeMainWindow +{ + return NO; +} + +- (BOOL)canBecomeKeyWindow +{ + return NO; +} + +@end Index: xc/programs/Xserver/hw/darwin/bundle/Xserver.h diff -u xc/programs/Xserver/hw/darwin/bundle/Xserver.h:1.8 xc/programs/Xserver/hw/darwin/bundle/Xserver.h:1.13 --- xc/programs/Xserver/hw/darwin/bundle/Xserver.h:1.8 Wed May 16 02:10:08 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Xserver.h Tue Jan 1 18:09:00 2002 @@ -3,29 +3,30 @@ // // Created by Andreas Monitzer on January 6, 2001. // -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.h,v 1.8 2001/05/16 06:10:08 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.h,v 1.13 2002/01/01 23:09:00 torrey Exp $ */ #import #include // for NXEvent -#include -#include -#include @interface Xserver : NSObject { // server state - NSLock *serverLock; - NSTask *clientTask; + NSRecursiveLock *serverLock; NSPort *signalPort; BOOL serverVisible; + BOOL rootlessMenuBarVisible; BOOL appQuitting; UInt32 mouseState; + Class windowClass; // server event queue + BOOL sendServerEvents; int eventWriteFD; // Aqua interface - IBOutlet NSPanel *helpWindow; + IBOutlet NSWindow *modeWindow; + IBOutlet id startupModeButton; + IBOutlet NSWindow *helpWindow; IBOutlet id startupHelpButton; IBOutlet NSPanel *switchWindow; } @@ -33,10 +34,12 @@ - (id)init; - (BOOL)translateEvent:(NSEvent *)anEvent; +- (BOOL)getNXMouse:(NXEvent*)ev; -- (void)getNXMouse:(NXEvent*)ev; + (void)append:(NSString*)value toEnv:(NSString*)name; +- (void)startX; +- (BOOL)startXClients; - (void)run; - (void)toggle; - (void)show; @@ -44,11 +47,12 @@ - (void)killServer; - (void)readPasteboard; - (void)writePasteboard; -- (void)clientTaskDone:(NSNotification *)aNotification; - (void)sendNXEvent:(NXEvent*)ev; - (void)sendShowHide:(BOOL)show; // Aqua interface actions +- (IBAction)startFullScreen:(id)sender; +- (IBAction)startRootless:(id)sender; - (IBAction)closeHelpAndShow:(id)sender; - (IBAction)showAction:(id)sender; Index: xc/programs/Xserver/hw/darwin/bundle/Xserver.m diff -u xc/programs/Xserver/hw/darwin/bundle/Xserver.m:1.18 xc/programs/Xserver/hw/darwin/bundle/Xserver.m:1.37 --- xc/programs/Xserver/hw/darwin/bundle/Xserver.m:1.18 Wed May 16 02:10:08 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Xserver.m Tue Jan 1 18:09:00 2002 @@ -6,19 +6,42 @@ // // Created by Andreas Monitzer on January 6, 2001. // -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.m,v 1.18 2001/05/16 06:10:08 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Xserver.m,v 1.37 2002/01/01 23:09:00 torrey Exp $ */ #import "Xserver.h" #import "Preferences.h" -#import "quartzShared.h" +#import "XWindow.h" +#include "quartzCommon.h" -// Macros to build the path name -#ifndef XBINDIR -#define XBINDIR /usr/X11R6/bin -#endif -#define STR(s) #s -#define XSTRPATH(s) STR(s) -#define XPATH(file) XSTRPATH(XBINDIR) "/" STR(file) +#include +#include +#include +#include +#include +#include +#include +#include + +// Types of shells +enum { + shell_Unknown, + shell_Bourne, + shell_C +}; + +typedef struct { + char *name; + int type; +} shellList_t; + +static shellList_t const shellList[] = { + { "csh", shell_C }, // standard C shell + { "tcsh", shell_C }, // ... needs no introduction + { "sh", shell_Bourne }, // standard Bourne shell + { "zsh", shell_Bourne }, // Z shell + { "bash", shell_Bourne }, // GNU Bourne again shell + { NULL, shell_Unknown } +}; extern int argcGlobal; extern char **argvGlobal; @@ -26,44 +49,66 @@ extern int main(int argc, char *argv[], char *envp[]); extern void HideMenuBar(void); extern void ShowMenuBar(void); +static void childDone(int sig); static NSPortMessage *signalMessage; +static pid_t clientPID; +static Xserver *oneXserver; +static NSRect aquaMenuBarBox; + @implementation Xserver -- (id)init { - self=[super init]; +- (id)init +{ + self = [super init]; + oneXserver = self; - serverLock = [[NSLock alloc] init]; - clientTask = nil; + serverLock = [[NSRecursiveLock alloc] init]; + clientPID = 0; + sendServerEvents = NO; serverVisible = NO; + rootlessMenuBarVisible = YES; appQuitting = NO; mouseState = 0; eventWriteFD = quartzEventWriteFD; + windowClass = [XWindow class]; // set up a port to safely send messages to main thread from server thread signalPort = [[NSPort port] retain]; - signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort receivePort:signalPort components:nil]; + signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort + receivePort:signalPort components:nil]; // set up receiving end [signalPort setDelegate:self]; - [[NSRunLoop currentRunLoop] addPort:signalPort forMode:NSDefaultRunLoopMode]; - [[NSRunLoop currentRunLoop] addPort:signalPort forMode:NSModalPanelRunLoopMode]; + [[NSRunLoop currentRunLoop] addPort:signalPort + forMode:NSDefaultRunLoopMode]; + [[NSRunLoop currentRunLoop] addPort:signalPort + forMode:NSModalPanelRunLoopMode]; return self; } -- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { +- (NSApplicationTerminateReply) + applicationShouldTerminate:(NSApplication *)sender +{ // Quit if the X server is not running - if ([serverLock tryLock]) + if ([serverLock tryLock]) { + appQuitting = YES; + if (clientPID != 0) + kill(clientPID, SIGINT); return NSTerminateNow; + } - if ([clientTask isRunning] || !quartzStartClients) { + if (clientPID != 0 || !quartzStartClients) { int but; + // Hide the X server and stop sending it events [self hide]; + sendServerEvents = NO; + but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""), - NSLocalizedString(@"Quitting the X server will terminate any running X Window programs.",@""), + NSLocalizedString(@"Quitting the X server will terminate any running X Window System programs.",@""), NSLocalizedString(@"Quit",@""), NSLocalizedString(@"Cancel",@""), nil); @@ -72,37 +117,94 @@ case NSAlertDefaultReturn: // quit break; case NSAlertAlternateReturn: // cancel + sendServerEvents = YES; return NSTerminateCancel; } } appQuitting = YES; + if (clientPID != 0) + kill(clientPID, SIGINT); [self killServer]; + return NSTerminateNow; +} + +// Ensure that everything has quit cleanly +- (void)applicationWillTerminate:(NSNotification *)aNotification +{ + // Make sure the client process has finished + if (clientPID != 0) { + NSLog(@"Waiting on client process..."); + sleep(2); + + // If the client process hasn't finished yet, kill it off + if (clientPID != 0) { + int clientStatus; + NSLog(@"Killing client process..."); + killpg(clientPID, SIGKILL); + waitpid(clientPID, &clientStatus, 0); + } + } - // Wait until the X server shuts down - return NSTerminateLater; + // Wait until the X server thread quits + [serverLock lock]; } // returns YES when event was handled -- (BOOL)translateEvent:(NSEvent *)anEvent { +- (BOOL)translateEvent:(NSEvent *)anEvent +{ NXEvent ev; + static BOOL mouse1Pressed = NO; + BOOL onScreen; - if(([anEvent type]==NSKeyDown) && (![anEvent isARepeat]) && - ([anEvent keyCode]==[Preferences keyCode]) && - ([anEvent modifierFlags]==[Preferences modifiers])) { - [self toggle]; - return YES; + if (!sendServerEvents) { + return NO; } - if(!serverVisible) - return NO; + ev.type = [anEvent type]; + ev.flags = [anEvent modifierFlags]; - [self getNXMouse:&ev]; - ev.type=[anEvent type]; - ev.flags=[anEvent modifierFlags]; - switch(ev.type) { - case NSLeftMouseDown: + if (!quartzRootless) { + // Check for switch keypress + if ((ev.type == NSKeyDown) && (![anEvent isARepeat]) && + ([anEvent keyCode] == [Preferences keyCode])) + { + unsigned int switchFlags = [Preferences modifiers]; + + // Switch if all the switch modifiers are pressed, while none are + // pressed that should not be, except for caps lock. + if (((ev.flags & switchFlags) == switchFlags) && + ((ev.flags & ~(switchFlags | NSAlphaShiftKeyMask)) == 0)) + { + [self toggle]; + return YES; + } + } + + if (!serverVisible) + return NO; + } + + // If the mouse is not on the valid X display area, + // we don't send the X server key events. + onScreen = [self getNXMouse:&ev]; + + switch (ev.type) { case NSLeftMouseUp: + if (quartzRootless && !mouse1Pressed) { + // MouseUp after MouseDown in menu - ignore + return NO; + } + mouse1Pressed = NO; + break; + case NSLeftMouseDown: + if (quartzRootless && + ! ([anEvent window] && + [[anEvent window] isKindOfClass:windowClass])) { + // Click in non X window - ignore + return NO; + } + mouse1Pressed = YES; case NSMouseMoved: break; case NSLeftMouseDragged: @@ -126,6 +228,8 @@ break; case NSKeyDown: case NSKeyUp: + if (!onScreen) + return NO; ev.data.key.keyCode = [anEvent keyCode]; ev.data.key.repeat = [anEvent isARepeat]; break; @@ -142,118 +246,328 @@ [self sendNXEvent:&ev]; + // Rootless: Send first NSLeftMouseDown to windows and views so window + // ordering can be suppressed. + // Don't pass further events - they (incorrectly?) bring the window + // forward no matter what. + if (quartzRootless && + (ev.type == NSLeftMouseDown || ev.type == NSLeftMouseUp) && + [anEvent clickCount] == 1 && + [[anEvent window] isKindOfClass:windowClass]) + { + return NO; + } + return YES; } -- (void)getNXMouse:(NXEvent*)ev { - NSPoint pt=[NSEvent mouseLocation]; - ev->location.x=(int)(pt.x); - ev->location.y=[[NSScreen mainScreen] frame].size.height-(int)(pt.y); // invert mouse +// Fill in NXEvent with mouse coordinates, inverting y coordinate. +// For rootless mode, the menu bar is treated as not part of the usable +// X display area and the cursor position is adjusted accordingly. +// Returns YES if the cursor is not in the menu bar. +- (BOOL)getNXMouse:(NXEvent*)ev +{ + NSPoint pt = [NSEvent mouseLocation]; + + ev->location.x = (int)(pt.x); + + if (quartzRootless && NSMouseInRect(pt, aquaMenuBarBox, NO)) { + // mouse in menu bar - tell X11 that it's just below instead + ev->location.y = aquaMenuBarHeight; + return NO; + } else { + ev->location.y = NSHeight([[NSScreen mainScreen] frame]) - (int)(pt.y); + return YES; + } } // Append a string to the given enviroment variable -+ (void)append:(NSString*)value toEnv:(NSString*)name { ++ (void)append:(NSString*)value toEnv:(NSString*)name +{ setenv([name cString], [[[NSString stringWithCString:getenv([name cString])] stringByAppendingString:value] cString],1); } -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - // Start the X server thread - [NSThread detachNewThreadSelector:@selector(run) toTarget:self withObject:nil]; +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + // Block SIGPIPE + // SIGPIPE repeatably killed the (rootless) server when closing a + // dozen xterms in rapid succession. Those SIGPIPEs should have been + // sent to the X server thread, which ignores them, but somehow they + // ended up in this thread instead. + { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGPIPE); + // pthread_sigmask not implemented yet + // pthread_sigmask(SIG_BLOCK, &set, NULL); + sigprocmask(SIG_BLOCK, &set, NULL); + } + + if (quartzRootless == -1) { + // The display mode was not set from the command line. + // Show mode pick panel? + if ([Preferences modeWindow]) { + [modeWindow makeKeyAndOrderFront:nil]; + } else { + // Otherwise use default mode + quartzRootless = [Preferences rootless]; + [self startX]; + } + } else { + [self startX]; + } +} - // If we are going to display a splash screen, hide the X11 screen immediately - if ([Preferences startupHelp]) - [self sendShowHide:NO]; +// Start the X server thread and the client process +- (void)startX +{ + NSDictionary *appDictionary; + NSString *appVersion; + + [modeWindow close]; + + // Calculate the height of the menu bar so rootless mode can avoid it + if (quartzRootless) { + aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - + NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1; + aquaMenuBarBox = + NSMakeRect(0, NSMaxY([[NSScreen mainScreen] visibleFrame]) + 1, + NSWidth([[NSScreen mainScreen] frame]), + aquaMenuBarHeight); + } + + // Write the XDarwin version to the console log + appDictionary = [[NSBundle mainBundle] infoDictionary]; + appVersion = [appDictionary objectForKey:@"CFBundleShortVersionString"]; + if (appVersion) + NSLog(@"\n%@", appVersion); + else + NSLog(@"No version"); + + // Start the X server thread + [NSThread detachNewThreadSelector:@selector(run) toTarget:self + withObject:nil]; + sendServerEvents = YES; // Start the X clients if started from GUI if (quartzStartClients) { - char *home; - char xinitrcbuf[PATH_MAX]; - NSString *path = [NSString stringWithCString:XPATH(xinit)]; - NSString *server = [NSString stringWithCString:XPATH(XDarwinStartup)]; - NSString *client, *displayName; - BOOL hasClient = YES; - NSArray *args; - - // Register to receive notification when the client task finishes - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(clientTaskDone:) - name:NSTaskDidTerminateNotification - object:nil]; - - // Change to user's home directory (so xterms etc. start there) - home = getenv("HOME"); - if (home) - chdir(home); + [self startXClients]; + } + + if (quartzRootless) { + // There is no help window for rootless; just start + [helpWindow close]; + helpWindow = nil; + if ([NSApp isActive]) + [self sendShowHide:YES]; else - home = ""; + [self sendShowHide:NO]; + } else { + // Show the X switch window if not using dock icon switching + if (![Preferences dockSwitch]) + [switchWindow orderFront:nil]; + + if ([Preferences startupHelp]) { + // display the full screen mode help + [self sendShowHide:NO]; + [helpWindow makeKeyAndOrderFront:nil]; + } else { + // start running full screen and make sure X is visible + ShowMenuBar(); + [self closeHelpAndShow:nil]; + } + } +} - // Add X binary directory to path - [Xserver append:@":" toEnv:@"PATH"]; - [Xserver append:@XSTRPATH(XBINDIR) toEnv:@"PATH"]; - - displayName = [NSString localizedStringWithFormat:@":%d", - [Preferences display]]; - - // Find the client init file to use - snprintf(xinitrcbuf, PATH_MAX, "%s/.xinitrc", home); - if (access(xinitrcbuf, F_OK)) { - snprintf(xinitrcbuf, PATH_MAX, XSTRPATH(XINITDIR) "/xinitrc"); - if (access(xinitrcbuf, F_OK)) { - hasClient = NO; - } +// Start the first X clients in a separate process +- (BOOL)startXClients +{ + struct passwd *passwdUser; + NSString *shellPath, *dashShellName, *commandStr, *startXPath; + NSMutableString *safeStartXPath; + NSRange aRange; + NSBundle *thisBundle; + const char *shellPathStr, *newargv[3], *shellNameStr; + int fd[2], outFD, length, shellType, i; + + // Register to catch the signal when the client processs finishes + signal(SIGCHLD, childDone); + + // Get user's password database entry + passwdUser = getpwuid(getuid()); + + // Find the shell to use + if ([Preferences useDefaultShell]) + shellPath = [NSString stringWithCString:passwdUser->pw_shell]; + else + shellPath = [Preferences shellString]; + + dashShellName = [NSString stringWithFormat:@"-%@", + [shellPath lastPathComponent]]; + shellPathStr = [shellPath cString]; + shellNameStr = [[shellPath lastPathComponent] cString]; + + if (access(shellPathStr, X_OK)) { + NSLog(@"Shell %s is not valid!", shellPathStr); + return NO; + } + + // Find the type of shell + for (i = 0; shellList[i].name; i++) { + if (!strcmp(shellNameStr, shellList[i].name)) + break; + } + shellType = shellList[i].type; + + newargv[0] = [dashShellName cString]; + if (shellType == shell_Bourne) { + // Bourne shells need to be told they are interactive to make + // sure they read all their initialization files. + newargv[1] = "-i"; + newargv[2] = NULL; + } else { + newargv[1] = NULL; + } + + // Create a pipe to communicate with the X client process + NSAssert(pipe(fd) == 0, @"Could not create new pipe."); + + // Open a file descriptor for writing to stdout and stderr + outFD = open("/dev/console", O_WRONLY, 0); + if (outFD == -1) { + outFD = open("/dev/null", O_WRONLY, 0); + NSAssert(outFD != -1, @"Could not open shell output."); + } + + // Fork process to start X clients in user's default shell + // Sadly we can't use NSTask because we need to start a login shell. + // Login shells are started by passing "-" as the first character of + // argument 0. NSTask forces argument 0 to be the shell's name. + clientPID = vfork(); + if (clientPID == 0) { + + // Inside the new process: + if (fd[0] != STDIN_FILENO) { + dup2(fd[0], STDIN_FILENO); // Take stdin from pipe + close(fd[0]); } - if (hasClient) { - client = [NSString stringWithCString:xinitrcbuf]; - args = [NSArray arrayWithObjects:client, @"--", server, - displayName, @"-idle", nil]; + close(fd[1]); // Close write end of pipe + if (outFD == STDOUT_FILENO) { // Setup stdout and stderr + dup2(outFD, STDERR_FILENO); + } else if (outFD == STDERR_FILENO) { + dup2(outFD, STDOUT_FILENO); } else { - args = [NSArray arrayWithObjects:@"--", server, displayName, - @"-idle", nil]; + dup2(outFD, STDERR_FILENO); + dup2(outFD, STDOUT_FILENO); + close(outFD); } - // Launch a new task to run start X clients - clientTask = [NSTask launchedTaskWithLaunchPath:path arguments:args]; + // Setup environment + setenv("HOME", passwdUser->pw_dir, 1); + setenv("SHELL", shellPathStr, 1); + setenv("LOGNAME", passwdUser->pw_name, 1); + setenv("USER", passwdUser->pw_name, 1); + setenv("TERM", "unknown", 1); + if (chdir(passwdUser->pw_dir)) // Change to user's home dir + NSLog(@"Could not change to user's home directory."); + + execv(shellPathStr, newargv); // Start user's shell + + NSLog(@"Could not start X client process with errno = %i.", errno); + _exit(127); + } + + // In parent process: + close(fd[0]); // Close read end of pipe + close(outFD); // Close output file descriptor + + thisBundle = [NSBundle bundleForClass:[self class]]; + startXPath = [thisBundle pathForResource:@"startXClients" ofType:nil]; + if (!startXPath) { + NSLog(@"Could not find startXClients in application bundle!"); + return NO; } - // Make sure the menu bar gets drawn - [NSApp setWindowsNeedUpdate:YES]; - - // Show the X switch window if not using dock icon switching - if (![Preferences dockSwitch]) - [switchWindow orderFront:nil]; + // We will run the startXClients script with the path in single quotes + // in case there are problematic characters in the path. We still have + // to worry about there being single quotes in the path. So, replace + // all instances of the ' character in startXPath with '\''. + safeStartXPath = [NSMutableString stringWithString:startXPath]; + aRange = NSMakeRange(0, [safeStartXPath length]); + while (aRange.length) { + aRange = [safeStartXPath rangeOfString:@"'" options:0 range:aRange]; + if (!aRange.length) + break; + [safeStartXPath replaceCharactersInRange:aRange + withString:@"\'\\'\'"]; + aRange.location += 4; + aRange.length = [safeStartXPath length] - aRange.location; + } - // Display the help splash screen or show the X server - if ([Preferences startupHelp]) { - [helpWindow makeKeyAndOrderFront:nil]; + if ([Preferences addToPath]) { + commandStr = [NSString stringWithFormat:@"'%@' :%d %@\n", + safeStartXPath, [Preferences display], + [Preferences addToPathString]]; } else { - ShowMenuBar(); - [self closeHelpAndShow:nil]; + commandStr = [NSString stringWithFormat:@"'%@' :%d\n", + safeStartXPath, [Preferences display]]; + } + + length = [commandStr cStringLength]; + if (write(fd[1], [commandStr cString], length) != length) { + NSLog(@"Write to X client process failed."); + return NO; } + + // Close the pipe so that shell will terminate when xinit quits + close(fd[1]); + + return YES; } // Run the X server thread -- (void)run { +- (void)run +{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [serverLock lock]; main(argcGlobal, argvGlobal, envpGlobal); serverVisible = NO; - [serverLock unlock]; [pool release]; + [serverLock unlock]; QuartzMessageMainThread(kQuartzServerDied); } -// Close the help splash screen and show the X server -- (IBAction)closeHelpAndShow:(id)sender { - int helpVal; +// Full screen mode was picked in the mode pick panel +- (IBAction)startFullScreen:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; + [Preferences saveToDisk]; + quartzRootless = FALSE; + [self startX]; +} - helpVal = [startupHelpButton intValue]; - [Preferences setStartupHelp:helpVal]; +// Rootless mode was picked in the mode pick panel +- (IBAction)startRootless:(id)sender +{ + [Preferences setModeWindow:[startupModeButton intValue]]; [Preferences saveToDisk]; + quartzRootless = TRUE; + [self startX]; +} +// Close the help splash screen and show the X server +- (IBAction)closeHelpAndShow:(id)sender +{ + if (sender) { + int helpVal = [startupHelpButton intValue]; + [Preferences setStartupHelp:helpVal]; + [Preferences saveToDisk]; + } [helpWindow close]; + helpWindow = nil; serverVisible = YES; [self sendShowHide:YES]; @@ -261,34 +575,51 @@ } // Show the X server when sent message from GUI -- (IBAction)showAction:(id)sender { - [self sendShowHide:YES]; +- (IBAction)showAction:(id)sender +{ + if (sendServerEvents) + [self sendShowHide:YES]; } -// Show or hide the X server -- (void)toggle { - if (serverVisible) - [self hide]; - else - [self show]; +// Show or hide the X server or menu bar in rootless mode +- (void)toggle +{ + if (quartzRootless) { +#if 0 + // FIXME: Remove or add option to not dodge menubar + if (rootlessMenuBarVisible) + HideMenuBar(); + else + ShowMenuBar(); + rootlessMenuBarVisible = !rootlessMenuBarVisible; +#endif + } else { + if (serverVisible) + [self hide]; + else + [self show]; + } } // Show the X server on screen -- (void)show { - if (!serverVisible) { +- (void)show +{ + if (!serverVisible && sendServerEvents) { [self sendShowHide:YES]; } } // Hide the X server from the screen -- (void)hide { - if (serverVisible) { +- (void)hide +{ + if (serverVisible && sendServerEvents) { [self sendShowHide:NO]; } } -// Kill the Xserver thread -- (void)killServer { +// Kill the X server thread +- (void)killServer +{ NXEvent ev; if (serverVisible) @@ -301,15 +632,39 @@ // Tell the X server to show or hide itself. // This ignores the current X server visible state. -- (void)sendShowHide:(BOOL)show { +// +// In full screen mode, the order we do things is important and must be +// preserved between the threads. X drawing operations have to be performed +// in the X server thread. It appears that we have the additional +// constraint that we must hide and show the menu bar in the main thread. +// +// To show the X server: +// 1. Capture the displays. (Main thread) +// 2. Hide the menu bar. (Must be in main thread) +// 3. Send event to X server thread to redraw X screen. +// 4. Redraw the X screen. (Must be in X server thread) +// +// To hide the X server: +// 1. Send event to X server thread to stop drawing. +// 2. Stop drawing to the X screen. (Must be in X server thread) +// 3. Message main thread that drawing is stopped. +// 4. If main thread still wants X server hidden: +// a. Release the displays. (Main thread) +// b. Unhide the menu bar. (Must be in main thread) +// Otherwise we have already queued an event to start drawing again. +// +- (void)sendShowHide:(BOOL)show +{ NXEvent ev; [self getNXMouse:&ev]; ev.type = NX_APPDEFINED; if (show) { - QuartzCapture(); - HideMenuBar(); + if (!quartzRootless) { + QuartzCapture(); + HideMenuBar(); + } ev.data.compound.subType = kXDarwinShow; [self sendNXEvent:&ev]; @@ -326,14 +681,13 @@ ev.data.compound.subType = kXDarwinHide; [self sendNXEvent:&ev]; - ShowMenuBar(); } serverVisible = show; } // Tell the X server to read from the pasteboard into the X cut buffer -- (void)readPasteboard +- (void)readPasteboard { NXEvent ev; @@ -343,7 +697,7 @@ } // Tell the X server to write the X cut buffer into the pasteboard -- (void)writePasteboard +- (void)writePasteboard { NXEvent ev; @@ -351,68 +705,98 @@ ev.data.compound.subType = kXDarwinWritePasteboard; [self sendNXEvent:&ev]; } + +- (void)sendNXEvent:(NXEvent*)ev +{ + int bytesWritten; + + if (quartzRootless && + (ev->type == NSLeftMouseDown || ev->type == NSLeftMouseUp || + (ev->type == NSSystemDefined && ev->data.compound.subType == 7))) + { + // mouse button event - send mouseMoved to this position too + // X gets confused if it gets a click that isn't at the last + // reported mouse position. + NXEvent moveEvent = *ev; + moveEvent.type = NSMouseMoved; + [self sendNXEvent:&moveEvent]; + } -- (void)sendNXEvent:(NXEvent*)ev { - if (write(eventWriteFD, ev, sizeof(*ev)) == sizeof(*ev)) + bytesWritten = write(eventWriteFD, ev, sizeof(*ev)); + if (bytesWritten == sizeof(*ev)) return; NSLog(@"Bad write to event pipe."); // FIXME: handle bad writes better? } // Handle messages from the X server thread -- (void)handlePortMessage:(NSPortMessage *)portMessage { +- (void)handlePortMessage:(NSPortMessage *)portMessage +{ unsigned msg = [portMessage msgid]; switch(msg) { case kQuartzServerHidden: + // Make sure the X server wasn't queued to be shown again while + // the hide was pending. + if (!quartzRootless && !serverVisible) { + QuartzRelease(); + ShowMenuBar(); + } + // FIXME: This hack is necessary (but not completely effective) // since Mac OS X 10.0.2 [NSCursor unhide]; break; + case kQuartzServerDied: - if (appQuitting) { - // If we quit before the clients start, they may sit and wait - // for the X server to start. Kill them instead. - if ([clientTask isRunning]) - [clientTask terminate]; - [NSApp replyToApplicationShouldTerminate:YES]; - } else { + sendServerEvents = NO; + if (!appQuitting) { [NSApp terminate:nil]; // quit if we aren't already } break; + default: NSLog(@"Unknown message from server thread."); } } -// Quit the X server when the X client task finishes -- (void)clientTaskDone:(NSNotification *)aNotification { - // Make sure it was the client task that finished - if (![clientTask isRunning]) { - int status = [[aNotification object] terminationStatus]; - - if (status != 0) - NSLog(@"X client task terminated abnormally."); +// Quit the X server when the X client process finishes +- (void)clientProcessDone:(int)clientStatus +{ + if (WIFEXITED(clientStatus)) { + int exitStatus = WEXITSTATUS(clientStatus); + if (exitStatus != 0) + NSLog(@"X client process terminated with status %i.", exitStatus); + } else { + NSLog(@"X client process terminated abnormally."); + } - if (!appQuitting) - [NSApp terminate:nil]; // quit if we aren't already + if (!appQuitting) { + [NSApp terminate:nil]; // quit if we aren't already } } -// Called when the user clicks the application icon, but not when Cmd-Tab is used -- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag { - if ([Preferences dockSwitch]) { +// Called when the user clicks the application icon, +// but not when Cmd-Tab is used. +// Rootless: Don't switch until applicationWillBecomeActive. +- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication + hasVisibleWindows:(BOOL)flag +{ + if ([Preferences dockSwitch] && !quartzRootless) { [self show]; } return NO; } -- (void)applicationWillResignActive:(NSNotification *)aNotification { +- (void)applicationWillResignActive:(NSNotification *)aNotification +{ [self hide]; } -- (void)applicationWillBecomeActive:(NSNotification *)aNotification { - [self readPasteboard]; +- (void)applicationWillBecomeActive:(NSNotification *)aNotification +{ + if (quartzRootless) + [self show]; } @end @@ -420,7 +804,25 @@ // Send a message to the main thread, which calls handlePortMessage in // response. Must only be called from the X server thread because // NSPort is not thread safe. -void QuartzMessageMainThread(unsigned msg) { +void QuartzMessageMainThread(unsigned msg) +{ [signalMessage setMsgid:msg]; [signalMessage sendBeforeDate:[NSDate distantPast]]; +} + +// Handle SIGCHLD signals +static void childDone(int sig) +{ + int clientStatus; + + if (clientPID == 0) + return; + + // Make sure it was the client task that finished + if (waitpid(clientPID, &clientStatus, WNOHANG) == clientPID) { + if (WIFSTOPPED(clientStatus)) + return; + clientPID = 0; + [oneXserver clientProcessDone:clientStatus]; + } } Index: xc/programs/Xserver/hw/darwin/bundle/fakeBoxRec.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/fakeBoxRec.h:1.1 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/fakeBoxRec.h Sat Jun 30 22:13:41 2001 @@ -0,0 +1,15 @@ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/fakeBoxRec.h,v 1.1 2001/07/01 02:13:41 torrey Exp $ */ + +#ifndef FAKEBOXREC_H +#define FAKEBOXREC_H + +// This struct is byte-compatible with X11's BoxRec, for use in +// code that can't include X headers. +typedef struct _fakeBox { + short x1; + short y1; + short x2; + short y2; +} fakeBoxRec; + +#endif Index: xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.c:1.3 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.c Wed Jan 16 21:44:26 2002 @@ -0,0 +1,420 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + * + * This is used in rootless mode where the underlying window server + * already provides an abstracted view of multiple screens as one + * large screen area. + * + * This code is largely based on panoramiX.c, which contains the + * following copyright notice: + */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.c,v 1.3 2002/01/17 02:44:26 torrey Exp $ */ + +#include "pseudoramiX.h" + +#include "extnsionst.h" +#include "dixstruct.h" +#include "window.h" +#include "panoramiXproto.h" +#include "globals.h" + +extern int ProcPanoramiXQueryVersion (ClientPtr client); + +static void PseudoramiXResetProc(ExtensionEntry *extEntry); + +static int ProcPseudoramiXQueryVersion(ClientPtr client); +static int ProcPseudoramiXGetState(ClientPtr client); +static int ProcPseudoramiXGetScreenCount(ClientPtr client); +static int ProcPseudoramiXGetScreenSize(ClientPtr client); +static int ProcPseudoramiXIsActive(ClientPtr client); +static int ProcPseudoramiXQueryScreens(ClientPtr client); +static int ProcPseudoramiXDispatch(ClientPtr client); + +static int SProcPseudoramiXQueryVersion(ClientPtr client); +static int SProcPseudoramiXGetState(ClientPtr client); +static int SProcPseudoramiXGetScreenCount(ClientPtr client); +static int SProcPseudoramiXGetScreenSize(ClientPtr client); +static int SProcPseudoramiXIsActive(ClientPtr client); +static int SProcPseudoramiXQueryScreens(ClientPtr client); +static int SProcPseudoramiXDispatch(ClientPtr client); + + +typedef struct { + int x; + int y; + int w; + int h; +} PseudoramiXScreenRec; + +static PseudoramiXScreenRec *pseudoramiXScreens = NULL; +static int pseudoramiXScreensAllocated = 0; +static int pseudoramiXNumScreens = 0; +static int pseudoramiXGeneration = -1; + + +// Add a PseudoramiX screen. +// The rest of the X server will know nothing about this screen. +// Can be called before or after extension init. +// Screens must be re-added once per generation. +void +PseudoramiXAddScreen(int x, int y, int w, int h) +{ + PseudoramiXScreenRec *s; + + if (noPseudoramiXExtension) return; + + if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) { + pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1; + pseudoramiXScreens = xrealloc(pseudoramiXScreens, + pseudoramiXScreensAllocated * + sizeof(PseudoramiXScreenRec)); + } + + s = &pseudoramiXScreens[pseudoramiXNumScreens++]; + s->x = x; + s->y = y; + s->w = w; + s->h = h; +} + + +// Initialize PseudoramiX. +// Copied from PanoramiXExtensionInit +void PseudoramiXExtensionInit(int argc, char *argv[]) +{ + Bool success = FALSE; + ExtensionEntry *extEntry; + + if (noPseudoramiXExtension) return; + + if (pseudoramiXNumScreens == 1 || aquaNumScreens == 1) { + // Only one screen - disable Xinerama extension. + noPseudoramiXExtension = TRUE; + return; + } + + // The server must not run the PanoramiX operations. + noPanoramiXExtension = TRUE; + + if (pseudoramiXGeneration != serverGeneration) { + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, + ProcPseudoramiXDispatch, + SProcPseudoramiXDispatch, + PseudoramiXResetProc, + StandardMinorOpcode); + if (!extEntry) { + ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n"); + } else { + pseudoramiXGeneration = serverGeneration; + success = TRUE; + } + } + + if (!success) { + ErrorF("%s Extension (PseudoramiX) failed to initialize\n", + PANORAMIX_PROTOCOL_NAME); + return; + } +} + + +static void PseudoramiXResetProc(ExtensionEntry *extEntry) +{ + pseudoramiXNumScreens = 0; +} + + +// was PanoramiX +static int ProcPseudoramiXQueryVersion(ClientPtr client) +{ + return ProcPanoramiXQueryVersion(client); +} + + +// was PanoramiX +static int ProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + WindowPtr pWin; + xPanoramiXGetStateReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.state, n); + } + WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + WindowPtr pWin; + xPanoramiXGetScreenCountReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.ScreenCount = pseudoramiXNumScreens; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.ScreenCount, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + WindowPtr pWin; + xPanoramiXGetScreenSizeReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + /* screen dimensions */ + rep.width = pseudoramiXScreens[stuff->screen].w; + // was panoramiXdataPtr[stuff->screen].width; + rep.height = pseudoramiXScreens[stuff->screen].h; + // was panoramiXdataPtr[stuff->screen].height; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.width, n); + swaps (&rep.height, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXIsActive(ClientPtr client) +{ + /* REQUEST(xXineramaIsActiveReq); */ + xXineramaIsActiveReply rep; + + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.state, n); + } + WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXQueryScreens(ClientPtr client) +{ + /* REQUEST(xXineramaQueryScreensReq); */ + xXineramaQueryScreensReply rep; + + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens; + rep.length = rep.number * sz_XineramaScreenInfo >> 2; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.number, n); + } + WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); + + if (!noPseudoramiXExtension) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < pseudoramiXNumScreens; i++) { + scratch.x_org = pseudoramiXScreens[i].x; + scratch.y_org = pseudoramiXScreens[i].y; + scratch.width = pseudoramiXScreens[i].w; + scratch.height = pseudoramiXScreens[i].h; + + if(client->swapped) { + register int n; + swaps (&scratch.x_org, n); + swaps (&scratch.y_org, n); + swaps (&scratch.width, n); + swaps (&scratch.height, n); + } + WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); + } + } + + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return ProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return ProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return ProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return ProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return ProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return ProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} + + + +static int +SProcPseudoramiXQueryVersion (ClientPtr client) +{ + REQUEST(xPanoramiXQueryVersionReq); + register int n; + + swaps(&stuff->length,n); + REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); + return ProcPseudoramiXQueryVersion(client); +} + +static int +SProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + return ProcPseudoramiXGetState(client); +} + +static int +SProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + return ProcPseudoramiXGetScreenCount(client); +} + +static int +SProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + return ProcPseudoramiXGetScreenSize(client); +} + + +static int +SProcPseudoramiXIsActive(ClientPtr client) +{ + REQUEST(xXineramaIsActiveReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + return ProcPseudoramiXIsActive(client); +} + + +static int +SProcPseudoramiXQueryScreens(ClientPtr client) +{ + REQUEST(xXineramaQueryScreensReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + return ProcPseudoramiXQueryScreens(client); +} + + +static int +SProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return SProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return SProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return SProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return SProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return SProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return SProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} Index: xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.h:1.3 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.h Wed Jan 16 21:44:26 2002 @@ -0,0 +1,10 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/pseudoramiX.h,v 1.3 2002/01/17 02:44:26 torrey Exp $ */ + +extern int noPseudoramiXExtension; +extern int aquaNumScreens; + +void PseudoramiXAddScreen(int x, int y, int w, int h); +void PseudoramiXExtensionInit(int argc, char *argv[]); Index: xc/programs/Xserver/hw/darwin/bundle/quartz.c diff -u xc/programs/Xserver/hw/darwin/bundle/quartz.c:1.9 xc/programs/Xserver/hw/darwin/bundle/quartz.c:1.24 --- xc/programs/Xserver/hw/darwin/bundle/quartz.c:1.9 Wed May 16 02:10:08 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartz.c Wed Jan 16 21:44:26 2002 @@ -5,10 +5,19 @@ * By Gregory Robert Parker * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.c,v 1.9 2001/05/16 06:10:08 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.c,v 1.24 2002/01/17 02:44:26 torrey Exp $ */ +#include "quartzCommon.h" +#include "quartz.h" +#include "darwin.h" +#include "quartzAudio.h" +#include "quartzCursor.h" +#include "rootlessAqua.h" +#include "pseudoramiX.h" + // X headers #include "scrnintstr.h" +#include "colormapst.h" // System headers #include @@ -16,32 +25,62 @@ #include #include -// We need CoreGraphics in ApplicationServices, but we leave out -// QuickDraw, which has symbol conflicts with the basic X includes. -#define __QD__ -#define __PRINTCORE__ -#include +// Shared global variables for Quartz modes +int quartzEventWriteFD = -1; +int quartzStartClients = 1; +int quartzRootless = -1; +int quartzUseSysBeep = 0; +int quartzServerVisible = TRUE; +int quartzScreenIndex = 0; +int aquaMenuBarHeight = 0; +int noPseudoramiXExtension = TRUE; +int aquaNumScreens = 0; + +// Full screen specific per screen storage structure +typedef struct { + CGDirectDisplayID displayID; + CFDictionaryRef xDisplayMode; + CFDictionaryRef aquaDisplayMode; + CGDirectPaletteRef xPalette; + CGDirectPaletteRef aquaPalette; +} QuartzFSScreenRec, *QuartzFSScreenPtr; + +#define FULLSCREEN_PRIV(pScreen) \ + ((QuartzFSScreenPtr)pScreen->devPrivates[quartzFSScreenIndex].ptr) + +static int quartzFSScreenIndex; +static CGDisplayCount quartzDisplayCount = 0; +static CGDirectDisplayID *quartzDisplayList = NULL; -#include "../darwin.h" -#include "quartz.h" -#include "quartzAudio.h" -#include "quartzCursor.h" - -#define kDarwinMaxScreens 100 -static ScreenPtr darwinScreens[kDarwinMaxScreens]; -static int darwinNumScreens = 0; -static BOOL xhidden = FALSE; - /* - * QuartzStoreColors - * FIXME: need to implement if Quartz supports PsuedoColor + * QuartzFSStoreColors + * This is a callback from X to change the hardware colormap + * when using PsuedoColor in full screen mode. */ -static void QuartzStoreColors( - ColormapPtr pmap, - int numEntries, - xColorItem *pdefs) +static void QuartzFSStoreColors( + ColormapPtr pmap, + int numEntries, + xColorItem *pdefs) { + ScreenPtr pScreen = pmap->pScreen; + QuartzFSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + CGDirectPaletteRef palette = fsDisplayInfo->xPalette; + CGDeviceColor color; + int i; + + if (! palette) + return; + + for (i = 0; i < numEntries; i++) { + color.red = pdefs[i].red / 65535.0; + color.green = pdefs[i].green / 65535.0; + color.blue = pdefs[i].blue / 65535.0; + CGPaletteSetColorAtIndex(palette, color, pdefs[i].pixel); + } + + if (quartzServerVisible) + CGDisplaySetPalette(fsDisplayInfo->displayID, palette); } /* @@ -69,12 +108,12 @@ // computer just woke up if (msg.header.msgh_id == 1) { - if (!xhidden) { + if (quartzServerVisible) { int i; - for (i = 0; i < darwinNumScreens; i++) { - if (darwinScreens[i]) - xf86SetRootClip(darwinScreens[i], true); + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) + xf86SetRootClip(screenInfo.screens[i], true); } } } @@ -84,103 +123,331 @@ #endif -/* - * QuartzAddScreen - * Quartz keeps a list of all screens for QuartzShow and QuartzHide. - * FIXME: So does ddx, use that instead. +/* + * QuartzFSFindDisplayMode + * Find the appropriate display mode to use in full screen mode. + * If display mode is not the same as the current Aqua mode, switch + * to the new mode. */ -Bool QuartzAddScreen(ScreenPtr pScreen) +static Bool QuartzFSFindDisplayMode( + QuartzFSScreenPtr fsDisplayInfo) { - if (darwinNumScreens == kDarwinMaxScreens) { + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + size_t height, width, bpp; + boolean_t exactMatch; + + fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); + + // If no user options, use current display mode + if (darwinDesiredWidth == 0 && darwinDesiredDepth == -1 && + darwinDesiredRefresh == -1) + { + fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; + return TRUE; + } + + // If the user has no choice for size, use current + if (darwinDesiredWidth == 0) { + width = CGDisplayPixelsWide(cgID); + height = CGDisplayPixelsHigh(cgID); + } else { + width = darwinDesiredWidth; + height = darwinDesiredHeight; + } + + switch (darwinDesiredDepth) { + case 0: + bpp = 8; + break; + case 1: + bpp = 16; + break; + case 2: + bpp = 32; + break; + default: + bpp = CGDisplayBitsPerPixel(cgID); + } + + if (darwinDesiredRefresh == -1) { + fsDisplayInfo->xDisplayMode = + CGDisplayBestModeForParameters(cgID, bpp, width, height, + &exactMatch); + } else { + fsDisplayInfo->xDisplayMode = + CGDisplayBestModeForParametersAndRefreshRate(cgID, bpp, + width, height, darwinDesiredRefresh, &exactMatch); + } + if (!exactMatch) { + fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; return FALSE; } - darwinScreens[darwinNumScreens++] = pScreen; + // Switch to the new display mode + CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); + return TRUE; +} - // setup cursor support - if (! QuartzInitCursor(pScreen)) { + +/* + * QuartzFSAddScreen + * Do initialization of each screen for Quartz in full screen mode. + */ +static Bool QuartzFSAddScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); + CGDirectDisplayID cgID = quartzDisplayList[index]; + CGRect bounds; + QuartzFSScreenPtr fsDisplayInfo; + + // Allocate space for private per screen fullscreen specific storage. + fsDisplayInfo = xalloc(sizeof(QuartzFSScreenRec)); + FULLSCREEN_PRIV(pScreen) = fsDisplayInfo; + + displayInfo->displayCount = 1; + displayInfo->displayIDs = xrealloc(displayInfo->displayIDs, + 1 * sizeof(CGDirectDisplayID)); + displayInfo->displayIDs[0] = cgID; + + fsDisplayInfo->displayID = cgID; + fsDisplayInfo->xDisplayMode = 0; + fsDisplayInfo->aquaDisplayMode = 0; + fsDisplayInfo->xPalette = 0; + fsDisplayInfo->aquaPalette = 0; + + // Capture full screen because X doesn't like read-only framebuffer. + // We need to do this before we (potentially) switch the display mode. + CGDisplayCapture(cgID); + + if (! QuartzFSFindDisplayMode(fsDisplayInfo)) { + ErrorF("Could not support specified display mode on screen %i.\n", + index); + xfree(fsDisplayInfo); return FALSE; } + + // Don't need to flip y-coordinate as CoreGraphics treats (0, 0) + // as the top left of main screen. + bounds = CGDisplayBounds(cgID); + dfb->x = bounds.origin.x; + dfb->y = bounds.origin.y; + dfb->width = bounds.size.width; + dfb->height = bounds.size.height; + dfb->pitch = CGDisplayBytesPerRow(cgID); + dfb->bitsPerPixel = CGDisplayBitsPerPixel(cgID); + dfb->pixelInfo.componentCount = CGDisplaySamplesPerPixel(cgID); + + if (dfb->bitsPerPixel == 8) { + if (CGDisplayCanSetPalette(cgID)) { + dfb->pixelInfo.pixelType = kIOCLUTPixels; + } else { + dfb->pixelInfo.pixelType = kIOFixedCLUTPixels; + } + dfb->pixelInfo.bitsPerComponent = 8; + dfb->colorBitsPerPixel = 8; + } else { + dfb->pixelInfo.pixelType = kIORGBDirectPixels; + dfb->pixelInfo.bitsPerComponent = CGDisplayBitsPerSample(cgID); + dfb->colorBitsPerPixel = (dfb->pixelInfo.componentCount * + dfb->pixelInfo.bitsPerComponent); + } + + dfb->framebuffer = CGDisplayBaseAddress(cgID); + + return TRUE; +} + + +/* + * QuartzAddScreen + * Do mode dependent initialization of each screen for Quartz. + */ +Bool QuartzAddScreen( + int index, + ScreenPtr pScreen) +{ + // allocate space for private per screen Quartz specific storage + QuartzScreenPtr displayInfo = xcalloc(sizeof(QuartzScreenRec), 1); + QUARTZ_PRIV(pScreen) = displayInfo; + + // do full screen or rootless specific initialization + if (quartzRootless) { + return AquaAddScreen(index, pScreen); + } else { + return QuartzFSAddScreen(index, pScreen); + } +} + - // initialize colormap handling as needed - if (dfb.pixelInfo.pixelType == kIOCLUTPixels) { - pScreen->StoreColors = QuartzStoreColors; +/* + * QuartzFSSetupScreen + * Finalize full screen specific setup of each screen. + */ +static Bool QuartzFSSetupScreen( + int index, + ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzFSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + if (dfb->pixelInfo.pixelType == kIOCLUTPixels) { + // initialize colormap handling + size_t aquaBpp; + + CFNumberGetValue(CFDictionaryGetValue(fsDisplayInfo->aquaDisplayMode, + kCGDisplayBitsPerPixel), kCFNumberLongType, &aquaBpp); + if (aquaBpp <= 8) + fsDisplayInfo->aquaPalette = CGPaletteCreateWithDisplay(cgID); + fsDisplayInfo->xPalette = CGPaletteCreateDefaultColorPalette(); + pScreen->StoreColors = QuartzFSStoreColors; } return TRUE; } + +/* + * QuartzSetupScreen + * Finalize mode specific setup of each screen. + */ +Bool QuartzSetupScreen( + int index, + ScreenPtr pScreen) +{ + // setup cursor support + if (! QuartzInitCursor(pScreen)) + return FALSE; -/* + // do full screen or rootless specific setup + if (quartzRootless) { + if (! AquaSetupScreen(index, pScreen)) + return FALSE; + } else { + if (! QuartzFSSetupScreen(index, pScreen)) + return FALSE; + } + + return TRUE; +} + + +/* * QuartzCapture - * Capture the screen so we can draw. + * Capture the screen so we can draw. Called directly from the main thread + * to synchronize with hiding the menubar. */ void QuartzCapture(void) { - if (! CGDisplayIsCaptured(kCGDirectMainDisplay)) { - CGDisplayCapture(kCGDirectMainDisplay); + int i; + + for (i = 0; i < screenInfo.numScreens; i++) { + QuartzFSScreenPtr fsDisplayInfo = + FULLSCREEN_PRIV(screenInfo.screens[i]); + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + if (!CGDisplayIsCaptured(cgID) && !quartzRootless) { + CGDisplayCapture(cgID); + fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); + if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) + CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); + if (fsDisplayInfo->xPalette) + CGDisplaySetPalette(cgID, fsDisplayInfo->xPalette); + } } } -/* +/* * QuartzRelease * Release the screen so others can draw. */ -static void QuartzRelease(void) +void QuartzRelease(void) { - if (CGDisplayIsCaptured(kCGDirectMainDisplay)) { - CGDisplayRelease(kCGDirectMainDisplay); + int i; + + for (i = 0; i < screenInfo.numScreens; i++) { + QuartzFSScreenPtr fsDisplayInfo = + FULLSCREEN_PRIV(screenInfo.screens[i]); + CGDirectDisplayID cgID = fsDisplayInfo->displayID; + + if (CGDisplayIsCaptured(cgID) && !quartzRootless) { + if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) + CGDisplaySwitchToMode(cgID, fsDisplayInfo->aquaDisplayMode); + if (fsDisplayInfo->aquaPalette) + CGDisplaySetPalette(cgID, fsDisplayInfo->aquaPalette); + CGDisplayRelease(cgID); + } } - QuartzMessageMainThread(kQuartzServerHidden); } /* - * QuartzDisplayInit - * Init the framebuffer and claim the display from CoreGraphics. + * QuartzFSDisplayInit + * Full screen specific initialization called from InitOutput. */ -static void QuartzDisplayInit(void) +static void QuartzFSDisplayInit(void) { - dfb.pixelInfo.pixelType = kIORGBDirectPixels; - dfb.pixelInfo.bitsPerComponent=CGDisplayBitsPerSample(kCGDirectMainDisplay); - dfb.pixelInfo.componentCount=CGDisplaySamplesPerPixel(kCGDirectMainDisplay); -#if FALSE - // FIXME: endian and 24 bit color specific - dfb.pixelInfo.componentMasks[0] = 0x00ff0000; - dfb.pixelInfo.componentMasks[1] = 0x0000ff00; - dfb.pixelInfo.componentMasks[2] = 0x000000ff; -#endif + static unsigned long generation = 0; - dfb.width = CGDisplayPixelsWide(kCGDirectMainDisplay); - dfb.height = CGDisplayPixelsHigh(kCGDirectMainDisplay); - dfb.pitch = CGDisplayBytesPerRow(kCGDirectMainDisplay); - dfb.bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); - dfb.colorBitsPerPixel = (dfb.pixelInfo.componentCount * - dfb.pixelInfo.bitsPerComponent); + // Allocate private storage for each screen's mode specific info + if (generation != serverGeneration) { + quartzFSScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } - dfb.framebuffer = CGDisplayBaseAddress(kCGDirectMainDisplay); + // Find all the CoreGraphics displays + CGGetActiveDisplayList(0, NULL, &quartzDisplayCount); + quartzDisplayList = xalloc(quartzDisplayCount * sizeof(CGDirectDisplayID)); + CGGetActiveDisplayList(quartzDisplayCount, quartzDisplayList, + &quartzDisplayCount); - // need to capture because X doesn't like read-only framebuffer... - QuartzCapture(); + darwinScreensFound = quartzDisplayCount; atexit(QuartzRelease); } /* - * QuartzOsVendorInit + * QuartzInitOutput * Quartz display initialization. */ -void QuartzOsVendorInit(void) +void QuartzInitOutput( + int argc, + char **argv ) { - ErrorF("Display mode: Quartz\n"); + static unsigned long generation = 0; + + // Allocate private storage for each screen's Quartz specific info + if (generation != serverGeneration) { + quartzScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + if (serverGeneration == 0) { + QuartzAudioInit(); + } + + if (quartzRootless) { + ErrorF("Display mode: Rootless Quartz\n"); + AquaDisplayInit(); + } else { + ErrorF("Display mode: Full screen Quartz\n"); + QuartzFSDisplayInit(); + } - QuartzAudioInit(); - QuartzDisplayInit(); + // Init PseudoramiX implementation of Xinerama. + // This should be in InitExtensions, but that causes link errors + // for servers that don't link in pseudoramiX.c. + if (!noPseudoramiXExtension) { + PseudoramiXExtensionInit(argc, argv); + } } -/* +/* * QuartzShow * Show the X server on screen. Does nothing if already shown. * Restore the X clip regions the X server cursor state. @@ -191,38 +458,40 @@ { int i; - if (xhidden) { - for (i = 0; i < darwinNumScreens; i++) { - if (darwinScreens[i]) { - xf86SetRootClip(darwinScreens[i], true); - QuartzResumeXCursor(darwinScreens[i], x, y); + if (!quartzServerVisible) { + quartzServerVisible = TRUE; + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzResumeXCursor(screenInfo.screens[i], x, y); + if (!quartzRootless) + xf86SetRootClip(screenInfo.screens[i], TRUE); } } } - xhidden = FALSE; } -/* +/* * QuartzHide - * Remove the X server display from the screen. Does nothing if already hidden. - * Release the screen, set X clip regions to prevent drawing, and restore the - * Aqua cursor. + * Remove the X server display from the screen. Does nothing if already + * hidden. Set X clip regions to prevent drawing, and restore the Aqua + * cursor. */ void QuartzHide(void) { int i; - if (!xhidden) { - for (i = 0; i < darwinNumScreens; i++) { - if (darwinScreens[i]) { - QuartzSuspendXCursor(darwinScreens[i]); - xf86SetRootClip(darwinScreens[i], false); + if (quartzServerVisible) { + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzSuspendXCursor(screenInfo.screens[i]); + if (!quartzRootless) + xf86SetRootClip(screenInfo.screens[i], FALSE); } } - } - QuartzRelease(); - xhidden = TRUE; + } + quartzServerVisible = FALSE; + QuartzMessageMainThread(kQuartzServerHidden); } @@ -235,11 +504,10 @@ { int i; - for (i = 0; i < darwinNumScreens; i++) { - if (darwinScreens[i]) { - QuartzSuspendXCursor(darwinScreens[i]); + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzSuspendXCursor(screenInfo.screens[i]); } } QuartzRelease(); } - Index: xc/programs/Xserver/hw/darwin/bundle/quartz.h diff -u xc/programs/Xserver/hw/darwin/bundle/quartz.h:1.3 xc/programs/Xserver/hw/darwin/bundle/quartz.h:1.8 --- xc/programs/Xserver/hw/darwin/bundle/quartz.h:1.3 Wed Apr 11 04:34:18 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartz.h Sat Dec 22 00:28:35 2001 @@ -1,20 +1,21 @@ /* - quartz.h + * quartz.h + * + * External interface of the Quartz modes seen by the generic, mode + * independent parts of the Darwin X server. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.h,v 1.8 2001/12/22 05:28:35 torrey Exp $ */ - Quartz-specific functions and definitions -*/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartz.h,v 1.3 2001/04/11 08:34:18 torrey Exp $ */ - #ifndef _QUARTZ_H #define _QUARTZ_H -#include "X11/Xproto.h" #include "screenint.h" -#include "quartzShared.h" #include "quartzPasteboard.h" -void QuartzOsVendorInit(void); -Bool QuartzAddScreen(ScreenPtr screen); +int QuartzProcessArgument(int argc, char *argv[], int i); +void QuartzInitOutput(int argc, char **argv); +Bool QuartzAddScreen(int index, ScreenPtr pScreen); +Bool QuartzSetupScreen(int index, ScreenPtr pScreen); void QuartzGiveUp(void); void QuartzHide(void); void QuartzShow(int x, int y); Index: xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c diff -u xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c:1.3 xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c:1.5 --- xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c:1.3 Sat Apr 7 14:01:29 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c Sun Sep 23 00:04:49 2001 @@ -10,16 +10,18 @@ // Smoothing transitions between sounds // http://www.wam.umd.edu/~mphoenix/dss/dss.html // -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c,v 1.3 2001/04/07 18:01:29 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzAudio.c,v 1.5 2001/09/23 04:04:49 torrey Exp $ */ -#include +#include "quartzCommon.h" +#include "quartzAudio.h" + +#include #include #include "inputstr.h" #include "extensions/XI.h" -#include "quartzAudio.h" -#include "quartzShared.h" +void NSBeep(); typedef struct QuartzAudioRec { double frequency; Index: xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m diff -u xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m:1.5 xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m:1.11 --- xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m:1.5 Sat Apr 28 16:42:19 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m Sat Dec 22 00:28:35 2001 @@ -7,15 +7,17 @@ * that use X include files to avoid symbol collisions. * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m,v 1.5 2001/04/28 20:42:19 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCocoa.m,v 1.11 2001/12/22 05:28:35 torrey Exp $ */ #include #import "Preferences.h" -#include "quartzShared.h" +#include "quartzCommon.h" +#include "pseudoramiX.h" extern void FatalError(const char *, ...); extern char *display; +extern int noPanoramiXExtension; // Read the user preferences from the Cocoa front end void QuartzReadPreferences(void) @@ -23,8 +25,20 @@ char *fileString; darwinFakeButtons = [Preferences fakeButtons]; + darwinFakeMouse2Mask = [Preferences button2Mask]; + darwinFakeMouse3Mask = [Preferences button3Mask]; + quartzMouseAccelChange = [Preferences mouseAccelChange]; quartzUseSysBeep = [Preferences systemBeep]; + // Rootless: use PseudoramiX not Xinerama (quartzRootless already set) + if (quartzRootless) { + noPanoramiXExtension = TRUE; + noPseudoramiXExtension = ![Preferences xinerama]; + } else { + noPanoramiXExtension = ![Preferences xinerama]; + noPseudoramiXExtension = TRUE; + } + if ([Preferences useKeymapFile]) { fileString = (char *) [[Preferences keymapFile] lossyCString]; darwinKeymapFile = (char *) malloc(strlen(fileString)+1); @@ -37,10 +51,13 @@ if (! display) FatalError("malloc failed in QuartzReadPreferences()!\n"); snprintf(display, 8, "%i", [Preferences display]); + + darwinDesiredDepth = [Preferences depth] - 1; } // Write text to the Mac OS X pasteboard. -void QuartzWriteCocoaPasteboard(char *text) +void QuartzWriteCocoaPasteboard( + char *text) { NSPasteboard *pasteboard; NSArray *pasteboardTypes; @@ -66,8 +83,8 @@ NSArray *pasteboardTypes; NSString *existingType; char *text = NULL; - - pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; + + pasteboardTypes = [NSArray arrayWithObject:NSStringPboardType]; pasteboard = [NSPasteboard generalPasteboard]; if (! pasteboard) return NULL; @@ -84,4 +101,22 @@ } return text; +} + +// Return whether the screen should use a QuickDraw cursor +int QuartzFSUseQDCursor( + int depth) // screen depth +{ + switch ([Preferences useQDCursor]) { + case qdCursor_Always: + return TRUE; + case qdCursor_Never: + return FALSE; + case qdCursor_Not8Bit: + if (depth > 8) + return TRUE; + else + return FALSE; + } + return TRUE; } Index: xc/programs/Xserver/hw/darwin/bundle/quartzCommon.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/quartzCommon.h:1.4 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/quartzCommon.h Sat Dec 22 00:28:35 2001 @@ -0,0 +1,68 @@ +/* + * quartzCommon.h + * + * Common definitions used internally by all Quartz modes + * + * This file should be included before any X11 or IOKit headers + * so that it can avoid symbol conflicts. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCommon.h,v 1.4 2001/12/22 05:28:35 torrey Exp $ */ + +#ifndef _QUARTZCOMMON_H +#define _QUARTZCOMMON_H + +// QuickDraw in ApplicationServices has the following conflicts with +// the basic X server headers. Use QD_ to use the QuickDraw +// definition of any of these symbols, or the normal name for the +// X11 definition. +#define AllocCursor QD_AllocCursor +#define InitFonts QD_InitFonts +#define Cursor QD_Cursor +#define WindowPtr QD_WindowPtr +#include +#undef AllocCursor +#undef InitFonts +#undef Cursor +#undef WindowPtr + +#include "quartzShared.h" + +// Quartz specific per screen storage structure +typedef struct { + // List of CoreGraphics displays that this X11 screen covers. + // This is more than one CG display for video mirroring and + // rootless PseudoramiX mode. + // No CG display will be covered by more than one X11 screen. + int displayCount; + CGDirectDisplayID *displayIDs; +} QuartzScreenRec, *QuartzScreenPtr; + +#define QUARTZ_PRIV(pScreen) \ + ((QuartzScreenPtr)pScreen->devPrivates[quartzScreenIndex].ptr) + +// Data stored at startup for Cocoa front end +extern int quartzEventWriteFD; +extern int quartzStartClients; + +// User preferences used by Quartz modes +extern int quartzRootless; +extern int quartzUseSysBeep; + +// Other shared data +extern int quartzServerVisible; +extern int quartzScreenIndex; +extern int aquaMenuBarHeight; + +void QuartzCapture(void); +void QuartzRelease(void); +void QuartzReadPreferences(void); +void QuartzMessageMainThread(unsigned msg); +int QuartzFSUseQDCursor(int depth); + +// Messages that can be sent to the main thread. +enum { + kQuartzServerHidden, + kQuartzServerDied +}; + +#endif /* _QUARTZCOMMON_H */ Index: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c diff -u xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c:1.4 xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c:1.15 --- xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c:1.4 Wed May 9 03:16:19 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c Sat Dec 22 00:28:35 2001 @@ -3,19 +3,17 @@ * Support for using the Quartz Window Manager cursor * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c,v 1.4 2001/05/09 07:16:19 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.c,v 1.15 2001/12/22 05:28:35 torrey Exp $ */ +#include "quartzCommon.h" +#include "quartzCursor.h" +#include "darwin.h" + #include "mi.h" #include "scrnintstr.h" #include "cursorstr.h" #include "mipointrst.h" - -#include "quartzCursor.h" - -#undef AllocCursor -#define Cursor QD_Cursor -#define WindowPtr QD_WindowPtr -#include +#include "globals.h" // Size of the QuickDraw cursor #define CURSORWIDTH 16 @@ -24,24 +22,38 @@ typedef struct { int qdCursorMode; int qdCursorVisible; - int serverVisible; - CursorPtr latentCursor; + int useQDCursor; QueryBestSizeProcPtr QueryBestSize; miPointerSpriteFuncPtr spriteFuncs; } QuartzCursorScreenRec, *QuartzCursorScreenPtr; static int darwinCursorScreenIndex = -1; static unsigned long darwinCursorGeneration = 0; +static CursorPtr quartzLatentCursor = NULL; static QD_Cursor gQDArrow; // QuickDraw arrow cursor #define CURSOR_PRIV(pScreen) \ ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) -#define HIDE_QD_CURSOR(display, visible) \ - if (visible) { CGDisplayHideCursor(display); visible = FALSE; } -#define SHOW_QD_CURSOR(display, visible) \ - CGDisplayShowCursor(display); visible = TRUE; +#define HIDE_QD_CURSOR(pScreen, visible) \ + if (visible) { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayHideCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = FALSE; \ + } ((void)0) + +#define SHOW_QD_CURSOR(pScreen, visible) \ + { \ + int ix; \ + for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ + CGDisplayShowCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ + } \ + visible = TRUE; \ + } ((void)0) + /* * MakeQDCursor helpers: CTAB_ENTER, interleave */ @@ -58,28 +70,28 @@ static unsigned short interleave( unsigned char c1, - unsigned char c2 ) + unsigned char c2 ) { return - ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) | - ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) | - ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) | - ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) | - ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) | - ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) | - ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) | + ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) | + ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) | + ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) | + ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) | + ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) | + ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) | + ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) | ((c1 & 0x01) << 1) | ((c2 & 0x01) << 0) ; } /* * MakeQDCursor * Make a QuickDraw color cursor from the given X11 cursor. - * Warning: This code is nasty. Color cursors were meant to be read + * Warning: This code is nasty. Color cursors were meant to be read * from resources; constructing the structures programmatically is messy. */ /* - QuickDraw cursor representation: - Our color cursor is a 2 bit per pixel pixmap. + QuickDraw cursor representation: + Our color cursor is a 2 bit per pixel pixmap. Each pixel's bits are (source<<1 | mask) from the original X cursor pixel. The cursor's color table maps the colors like this: (2-bit value | X result | colortable | Mac result) @@ -90,7 +102,7 @@ */ static CCrsrHandle MakeQDCursor( - CursorPtr pCursor ) + CursorPtr pCursor ) { CCrsrHandle result; CCrsrPtr curs; @@ -120,7 +132,7 @@ curs->crsrHotSpot.h = min(CURSORWIDTH, pCursor->bits->xhot); // hot spot curs->crsrHotSpot.v = min(CURSORHEIGHT, pCursor->bits->yhot); // hot spot curs->crsrXTable = 0; // reserved - curs->crsrID = GetCTSeed(); // unique ID from Color Manager + curs->crsrID = GetCTSeed(); // unique ID from Color Manager // Set the b&w data and mask w = min(pCursor->bits->width, CURSORWIDTH); @@ -132,7 +144,7 @@ curs->crsrMask[i] = rowMask & ((pCursor->bits->mask[i*4]<<8) | pCursor->bits->mask[i*4+1]); } - + // Set the color data and mask // crsrMap: defines bit depth and size and colortable only pix->rowBytes = (CURSORWIDTH * 2 / 8) | 0x8000; // last bit on means PixMap @@ -197,6 +209,29 @@ /* + * FreeQDCursor + * Destroy a QuickDraw color cursor created with MakeQDCursor(). + * The cursor must not currently be on screen. + */ +static void FreeQDCursor(CCrsrHandle cursHandle) +{ + CCrsrPtr curs; + PixMap *pix; + + HLock((Handle)cursHandle); + curs = *cursHandle; + HLock((Handle)curs->crsrMap); + pix = *curs->crsrMap; + DisposeHandle((Handle)pix->pmTable); + HUnlock((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrMap); + DisposeHandle((Handle)curs->crsrData); + HUnlock((Handle)cursHandle); + DisposeHandle((Handle)cursHandle); +} + + +/* =========================================================================== Pointer sprite functions @@ -221,11 +256,19 @@ // if the cursor is too big we use a software cursor if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH)) - return (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor); + (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + // rootless can't use a software cursor + return TRUE; + } else { + return (*ScreenPriv->spriteFuncs->RealizeCursor) + (pScreen, pCursor); + } + } // make new cursor image - qdCursor = MakeQDCursor(pCursor); + qdCursor = MakeQDCursor(pCursor); if (!qdCursor) return FALSE; // save the result @@ -247,10 +290,17 @@ QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH)) { - return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor); + (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) + { + if (quartzRootless) { + return TRUE; + } else { + return (*ScreenPriv->spriteFuncs->UnrealizeCursor) + (pScreen, pCursor); + } } else { - DisposeCCursor((CCrsrHandle) pCursor->devPriv[pScreen->myNum]); + FreeQDCursor((CCrsrHandle) pCursor->devPriv[pScreen->myNum]); + pCursor->devPriv[pScreen->myNum] = NULL; return TRUE; } } @@ -270,20 +320,20 @@ { QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - ScreenPriv->latentCursor = pCursor; + quartzLatentCursor = pCursor; // Don't touch Mac OS cursor if X is hidden! - if (! ScreenPriv->serverVisible) + if (!quartzServerVisible) return; if (!pCursor) { // Remove the cursor completely. - HIDE_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); if (! ScreenPriv->qdCursorMode) (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); } else if ((pCursor->bits->height <= CURSORHEIGHT) && - (pCursor->bits->width <= CURSORWIDTH)) + (pCursor->bits->width <= CURSORWIDTH) && ScreenPriv->useQDCursor) { // Cursor is small enough to use QuickDraw directly. CCrsrHandle curs; @@ -294,11 +344,16 @@ curs = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; SetCCursor(curs); - SHOW_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); + } + else if (quartzRootless) { + // Rootless can't use a software cursor, so we just use Mac OS arrow. + SetCursor(&gQDArrow); + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); } else { // Cursor is too big for QuickDraw. Use X software cursor. - HIDE_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); + HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); ScreenPriv->qdCursorMode = FALSE; (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); } @@ -358,7 +413,9 @@ /* * QuartzWarpCursor - * Change the cursor position without generating an event or motion history + * Change the cursor position without generating an event or motion history. + * The input coordinates (x,y) are in pScreen-local X11 coordinates. + * */ static void QuartzWarpCursor( @@ -366,20 +423,37 @@ int x, int y) { - CGDisplayErr cgErr; - CGPoint cgPoint; - int neverMoved = TRUE; + static int neverMoved = TRUE; if (neverMoved) { - // Don't move the cursor the first time. This is the jump-to-center + // Don't move the cursor the first time. This is the jump-to-center // initialization, and it's annoying because we may still be in MacOS. neverMoved = FALSE; return; } - if (CURSOR_PRIV(pScreen)->serverVisible) { - cgPoint = CGPointMake(x, y); - cgErr = CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cgPoint); + if (quartzServerVisible) { + CGDisplayErr cgErr; + CGPoint cgPoint; + // Only need to do this for one display. Any display will do. + CGDirectDisplayID cgID = QUARTZ_PRIV(pScreen)->displayIDs[0]; + CGRect cgRect = CGDisplayBounds(cgID); + + // Convert (x,y) to CoreGraphics screen-local CG coordinates. + // This is necessary because the X11 screen and CG screen may not + // coincide. (e.g. X11 screen may be moved to dodge the menu bar) + + // Make point in X11 global coordinates + cgPoint = CGPointMake(x + dixScreenOrigins[pScreen->myNum].x, + y + dixScreenOrigins[pScreen->myNum].y); + // Shift to CoreGraphics global screen coordinates + cgPoint.x += darwinMainScreenX; + cgPoint.y += darwinMainScreenY; + // Shift to CoreGraphics screen-local coordinates + cgPoint.x -= cgRect.origin.x; + cgPoint.y -= cgRect.origin.y; + + cgErr = CGDisplayMoveCursorToPoint(cgID, cgPoint); if (cgErr != CGDisplayNoErr) { ErrorF("Could not set cursor position with error code 0x%x.\n", cgErr); @@ -410,7 +484,7 @@ */ static void QuartzCursorQueryBestSize( - int class, + int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen) @@ -430,12 +504,13 @@ * QuartzInitCursor * Initialize cursor support */ -Bool +Bool QuartzInitCursor( ScreenPtr pScreen ) { QuartzCursorScreenPtr ScreenPriv; miPointerScreenPtr PointPriv; + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); // initialize software cursor handling (always needed as backup) if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) { @@ -464,12 +539,14 @@ pScreen->devPrivates[miPointerScreenIndex].ptr; ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; - PointPriv->spriteFuncs = &quartzSpriteFuncsRec; + PointPriv->spriteFuncs = &quartzSpriteFuncsRec; + if (!quartzRootless) + ScreenPriv->useQDCursor = QuartzFSUseQDCursor(dfb->colorBitsPerPixel); + else + ScreenPriv->useQDCursor = TRUE; ScreenPriv->qdCursorMode = TRUE; ScreenPriv->qdCursorVisible = TRUE; - ScreenPriv->latentCursor = NULL; - ScreenPriv->serverVisible = FALSE; return TRUE; } @@ -481,9 +558,7 @@ QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); SetCursor(&gQDArrow); - SHOW_QD_CURSOR(kCGDirectMainDisplay, ScreenPriv->qdCursorVisible); - - ScreenPriv->serverVisible = FALSE; + SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); } @@ -493,9 +568,5 @@ int x, int y ) { - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - ScreenPriv->serverVisible = TRUE; - - QuartzSetCursor(pScreen, ScreenPriv->latentCursor, x, y); + QuartzSetCursor(pScreen, quartzLatentCursor, x, y); } Index: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h diff -u xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h:1.1 xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h:1.2 --- xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h:1.1 Wed Apr 11 04:34:18 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h Sun Sep 23 00:04:49 2001 @@ -1,12 +1,14 @@ /* * quartzCursor.h * - * Quartz hardware cursor + * External interface for Quartz hardware cursor */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h,v 1.1 2001/04/11 08:34:18 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h,v 1.2 2001/09/23 04:04:49 torrey Exp $ */ #ifndef QUARTZCURSOR_H #define QUARTZCURSOR_H + +#include "screenint.h" Bool QuartzInitCursor(ScreenPtr pScreen); void QuartzSuspendXCursor(ScreenPtr pScreen); Index: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c diff -u xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c:1.2 xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c:1.3 --- xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c:1.2 Tue May 1 21:03:40 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c Sun Sep 23 00:04:49 2001 @@ -4,7 +4,7 @@ * Aqua pasteboard <-> X cut buffer * Greg Parker gparker@cs.stanford.edu March 8, 2001 **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c,v 1.2 2001/05/02 01:03:40 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c,v 1.3 2001/09/23 04:04:49 torrey Exp $ */ #include "quartzPasteboard.h" @@ -13,8 +13,8 @@ #include "propertyst.h" #include "scrnintstr.h" #include "selection.h" +#include "globals.h" -extern WindowPtr *WindowTable; extern Selection *CurrentSelections; extern int NumCurrentSelections; Index: xc/programs/Xserver/hw/darwin/bundle/quartzShared.h diff -u xc/programs/Xserver/hw/darwin/bundle/quartzShared.h:1.5 xc/programs/Xserver/hw/darwin/bundle/quartzShared.h:1.11 --- xc/programs/Xserver/hw/darwin/bundle/quartzShared.h:1.5 Wed May 16 02:10:08 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzShared.h Sat Oct 13 23:02:18 2001 @@ -1,46 +1,42 @@ /* - * Shared definitions between the Darwin X Server - * and the Cocoa front end. + * quartzShared.h + * + * Shared definitions between the Darwin X Server and the Cocoa front end + * + * This file is included in all parts of the Darwin X Server and must not + * include any types defined in X11 or Mac OS X specific headers. + * Definitions that are internal to the Quartz modes or use Mac OS X + * specific types should be in quartzCommon.h instead of here. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzShared.h,v 1.5 2001/05/16 06:10:08 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzShared.h,v 1.11 2001/10/14 03:02:18 torrey Exp $ */ #ifndef _QUARTZSHARED_H #define _QUARTZSHARED_H -// Data stored at startup for Cocoa front end -extern int quartzEventWriteFD; -extern int quartzStartClients; - -// User preferences used by X server -extern int quartzUseSysBeep; +// User preferences used by generic Darwin X server code +extern int quartzMouseAccelChange; extern int darwinFakeButtons; +extern int darwinFakeMouse2Mask; +extern int darwinFakeMouse3Mask; extern char *darwinKeymapFile; - -void QuartzCapture(void); -void QuartzReadPreferences(void); -void QuartzMessageMainThread(unsigned msg); +extern unsigned int darwinDesiredWidth, darwinDesiredHeight; +extern int darwinDesiredDepth; +extern int darwinDesiredRefresh; + +// location of X11's (0,0) point in global screen coordinates +extern int darwinMainScreenX; +extern int darwinMainScreenY; // NX_APPDEFINED event subtypes for special commands to the X server -// update modifiers: update all modifier keys -// show: vt switch to X server; recapture screen and restore X drawing -// hide: vt switch away from X server; release screen and clip X drawing -// quit: kill the X server and release the display -// read pasteboard: copy Mac OS X pasteboard into X cut buffer -// write pasteboard: copy X cut buffer onto Mac OS X pasteboard - -enum { - kXDarwinUpdateModifiers, - kXDarwinShow, - kXDarwinHide, - kXDarwinQuit, - kXDarwinReadPasteboard, - kXDarwinWritePasteboard -}; - -// Messages that can be sent to the main thread. enum { - kQuartzServerHidden, - kQuartzServerDied + kXDarwinUpdateModifiers, // update all modifier keys + kXDarwinShow, // vt switch to X server; + // recapture screen and restore X drawing + kXDarwinHide, // vt switch away from X server; + // release screen and clip X drawing + kXDarwinQuit, // kill the X server and release the display + kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer + kXDarwinWritePasteboard // copy X cut buffer onto Mac OS X pasteboard }; #endif /* _QUARTZSHARED_H */ Index: xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c diff -u xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c:1.3 xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c:1.7 --- xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c:1.3 Thu Apr 5 02:08:46 2001 +++ xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c Sun Sep 23 00:04:49 2001 @@ -3,13 +3,15 @@ * Startup code for the Quartz Darwin X Server * **************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c,v 1.3 2001/04/05 06:08:46 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzStartup.c,v 1.7 2001/09/23 04:04:49 torrey Exp $ */ #include +#include "quartzCommon.h" +#include "darwin.h" #include "opaque.h" -#include "../darwin.h" -#include "quartzShared.h" +int NSApplicationMain(int argc, char *argv[]); + char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c @@ -47,11 +49,16 @@ argvGlobal = argv; envpGlobal = envp; - // Determine if we need to start X clients + // Determine if we need to start X clients + // and what display mode to use quartzStartClients = 1; - for (i = argc-1; i; i--) { + for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-nostartx")) { - quartzStartClients = 0; + quartzStartClients = 0; + } else if (!strcmp( argv[i], "-fullscreen")) { + quartzRootless = 0; + } else if (!strcmp( argv[i], "-rootless")) { + quartzRootless = 1; } } @@ -59,3 +66,49 @@ main_exit = NSApplicationMain(argc, argv); exit(main_exit); } + +int QuartzProcessArgument( int argc, char *argv[], int i ) +{ + // fullscreen: CoreGraphics full-screen mode + // rootless: Cocoa rootless mode + // quartz: Default, either fullscreen or rootless + + if ( !strcmp( argv[i], "-fullscreen" ) ) { + ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" ); +#ifdef QUARTZ_SAFETY_DELAY + ErrorF( "Quitting in %d seconds if no controller is found.\n", + QUARTZ_SAFETY_DELAY ); +#endif + return 1; + } + + if ( !strcmp( argv[i], "-rootless" ) ) { + ErrorF( "Running rootless inside Mac OS X window server.\n" ); +#ifdef QUARTZ_SAFETY_DELAY + ErrorF( "Quitting in %d seconds if no controller is found.\n", + QUARTZ_SAFETY_DELAY ); +#endif + return 1; + } + + if ( !strcmp( argv[i], "-quartz" ) ) { + ErrorF( "Running in parallel with Mac OS X Quartz window server.\n" ); +#ifdef QUARTZ_SAFETY_DELAY + ErrorF( "Quitting in %d seconds if no controller is found.\n", + QUARTZ_SAFETY_DELAY ); +#endif + return 1; + } + + // The Mac OS X front end uses this argument, which we just ignore here. + if ( !strcmp( argv[i], "-nostartx" ) ) { + return 1; + } + + // This command line arg is passed when launched from the Aqua GUI. + if ( !strncmp( argv[i], "-psn_", 5 ) ) { + return 1; + } + + return 0; +} \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/bundle/rootless.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootless.h:1.3 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootless.h Wed Aug 1 01:34:06 2001 @@ -0,0 +1,127 @@ +/* + * External interface to generic rootless mode + * + * Greg Parker gparker@cs.stanford.edu March 3, 2001 + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootless.h,v 1.3 2001/08/01 05:34:06 torrey Exp $ */ + +#ifndef _ROOTLESS_H +#define _ROOTLESS_H + +#include "mi.h" +#include "gcstruct.h" + +// RootlessFrameRec +// Describes a single rootless window (aka frame). +// The rootless mode keeps track of window position, and the +// rootless implementation is responsible for the pixmap. +// Multiple screens: all coordinates are SCREEN-LOCAL, not global. + + +typedef struct RootlessFrameRec { + /* Data maintained by rootless mode */ + /* position and size, including window border, in screen coordinates */ + int x; + int y; + unsigned int w; + unsigned int h; + WindowPtr win; /* the top-level window drawn in this frame */ + int isRoot; /* TRUE if this is the root window */ + + /* Data maintained by rootless implementation */ + char *pixelData; + int depth; // color bits per pixel; depth <= bitsPerPixel + int bitsPerPixel; + int bytesPerRow; + + void *devPrivate; /* for caller's use */ +} RootlessFrameRec, *RootlessFramePtr; + + +// Create a new frame. +// pUpper is the window above the new frame, or NULL if the new +// frame will be on top. +// pFrame is completely initialized. devPrivate is NULL +// The pixmap must be valid when this is done. +typedef void (*RootlessCreateFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RootlessFramePtr pUpper); + +// Destroy a frame. Caller must free any private data and the pixmap. +// All drawing is stopped and all updates are flushed before this is called. +typedef void (*RootlessDestroyFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame); + +// Move a frame on screen. +// The frame changes position and nothing else. +// pFrame and pFrame->win already contain the information about the +// new position. oldX and oldY are the old position. +// All updates are flushed before this is called. +// The pixmap may change during this function. +typedef void (*RootlessMoveFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, int oldX, int oldY); + +// Change frame ordering (aka stacking, layering) +// pFrame->win already has its new siblings. +// pOldNext is the window that was below this one, or NULL if this was +// at the bottom. +// pNewNext is the window that is now below this one, or NULL if this is +// now at the bottom. +typedef void (*RootlessRestackFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pOldNext, RootlessFramePtr pNewNext); + +// Flush drawing updates to the screen. +// pDamage contains all changed pixels. +// pDamage is in frame-local coordinates. +// pDamage is clipped to the frame bounds and the frame shape. +typedef void (*RootlessUpdateRegionProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RegionPtr pDamage); + +// Change the frame's shape. +// pNewShape is in frame-local coordinates. +// Everything outside pNewShape is no longer part of the frame. +// pNewShape is {0, 0, width, height} for a plain-shaped frame. +// fixme can the pixmap change here? +// fixme reimplement shape +typedef void (*RootlessReshapeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, RegionPtr pNewShape); + +// Frame is about to resize. +// The frame has its new position and size already. +// postconditions: +// The pixmap MUST point to a pixmap with the new size. +// The pixmap data is undefined. +// The old pixmap may be destroyed here. +typedef void (*RootlessStartResizeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, unsigned int oldW, unsigned int oldH); + +// Frame is done resizing. +// Destroy the old pixmap if you haven't already. +typedef void (*RootlessFinishResizeFrameProc) + (ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, unsigned int oldW, unsigned int oldH); + + +// The callback function list. +// Any of these may be NULL. +typedef struct RootlessFrameProcs { + RootlessCreateFrameProc CreateFrame; + RootlessDestroyFrameProc DestroyFrame; + + RootlessMoveFrameProc MoveFrame; + RootlessStartResizeFrameProc StartResizeFrame; + RootlessFinishResizeFrameProc FinishResizeFrame; + RootlessRestackFrameProc RestackFrame; + RootlessReshapeFrameProc ReshapeFrame; + + RootlessUpdateRegionProc UpdateRegion; + + // RootlessStartDrawingProc StartDrawing; + // RootlessStopDrawingProc StopDrawing; +} RootlessFrameProcs; + +// Initialize rootless mode on the given screen. +Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcs *procs); + +#endif /* _ROOTLESS_H */ Index: xc/programs/Xserver/hw/darwin/bundle/rootlessAqua.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessAqua.h:1.2 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessAqua.h Wed Aug 1 01:34:06 2001 @@ -0,0 +1,15 @@ +/* + * Rootless setup for Aqua + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessAqua.h,v 1.2 2001/08/01 05:34:06 torrey Exp $ */ + +#ifndef _ROOTLESSAQUA_H +#define _ROOTLESSAQUA_H + +Bool AquaAddScreen(int index, ScreenPtr pScreen); +Bool AquaSetupScreen(int index, ScreenPtr pScreen); +void AquaDisplayInit(void); + +#endif /* _ROOTLESSAQUA_H */ Index: xc/programs/Xserver/hw/darwin/bundle/rootlessAquaGlue.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessAquaGlue.c:1.7 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessAquaGlue.c Sat Dec 22 00:28:35 2001 @@ -0,0 +1,226 @@ +/* + * Generic rootless to Aqua specific glue code + * + * This code acts as a glue between the generic rootless X server code + * and the Aqua specific implementation, which includes definitions that + * conflict with stardard X types. + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessAquaGlue.c,v 1.7 2001/12/22 05:28:35 torrey Exp $ */ + +#include "quartzCommon.h" +#include "darwin.h" +#include "rootlessAqua.h" +#include "rootlessAquaImp.h" +#include "rootless.h" + +#include "regionstr.h" +#include "scrnintstr.h" +#include "globals.h" // dixScreenOrigins[] + + +///////////////////////////////////////// +// Rootless mode callback glue + +static void +AquaGlueCreateFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pUpper) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + pFrame->devPrivate = AquaNewWindow(pUpper ? pUpper->devPrivate : NULL, + pFrame->x + sx, pFrame->y + sy, + pFrame->w, pFrame->h, + pFrame->isRoot); + AquaGetPixmap(pFrame->devPrivate, &pFrame->pixelData, + &pFrame->bytesPerRow, &pFrame->depth, + &pFrame->bitsPerPixel); +} + + +static void +AquaGlueDestroyFrame(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaDestroyWindow(pFrame->devPrivate); +} + +static void +AquaGlueMoveFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaMoveWindow(pFrame->devPrivate, pFrame->x + sx, pFrame->y + sy); +} + + +static void +AquaGlueStartResizeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaStartResizeWindow(pFrame->devPrivate, + pFrame->x + sx, pFrame->y + sy, pFrame->w, pFrame->h); + AquaGetPixmap(pFrame->devPrivate, &pFrame->pixelData, + &pFrame->bytesPerRow, &pFrame->depth, + &pFrame->bitsPerPixel); +} + +static void +AquaGlueFinishResizeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH) +{ + int sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + int sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + AquaFinishResizeWindow(pFrame->devPrivate, + pFrame->x + sx, pFrame->y + sy, + pFrame->w, pFrame->h); +} + + +static void +AquaGlueRestackFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RootlessFramePtr pOldPrev, + RootlessFramePtr pNewPrev) +{ + AquaRestackWindow(pFrame->devPrivate, + pNewPrev ? pNewPrev->devPrivate : NULL); +} + +static void +AquaGlueReshapeFrame(ScreenPtr pScreen, RootlessFramePtr pFrame, + RegionPtr pNewShape) +{ + // Don't correct for dixScreenOrigins here. + // pNewShape is in window-local coordinates. + BoxRec shapeBox = {0, 0, pFrame->w, pFrame->h}; + if (pFrame->isRoot) return; // shouldn't happen; mi or dix covers this + + REGION_INVERSE(pScreen, pNewShape, pNewShape, &shapeBox); + AquaReshapeWindow(pFrame->devPrivate, + (fakeBoxRec *) REGION_RECTS(pNewShape), + REGION_NUM_RECTS(pNewShape)); +} + +static void +AquaGlueUpdateRegion(ScreenPtr pScreen, RootlessFramePtr pFrame, + RegionPtr pDamage) +{ + AquaUpdateRects(pFrame->devPrivate, + (fakeBoxRec *) REGION_RECTS(pDamage), + REGION_NUM_RECTS(pDamage)); +} + +#if 0 +static void +AquaGlueStartDrawing(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaStartDrawing(pFrame->devPrivate, &pFrame->pixelData, + &pFrame->bytesPerRow, &pFrame->depth, + &pFrame->bitsPerPixel); +} + +static void +AquaGlueStopDrawing(ScreenPtr pScreen, RootlessFramePtr pFrame) +{ + AquaStopDrawing(pFrame->devPrivate); +} +#endif + +static RootlessFrameProcs aquaRootlessProcs = { + AquaGlueCreateFrame, + AquaGlueDestroyFrame, + AquaGlueMoveFrame, + AquaGlueStartResizeFrame, + AquaGlueFinishResizeFrame, + AquaGlueRestackFrame, + AquaGlueReshapeFrame, + AquaGlueUpdateRegion +}; + + +/////////////////////////////////////// +// Rootless mode initialization. +// Exported by rootlessAqua.h + +/* + * AquaDisplayInit + * Find all Aqua screens. + */ +void +AquaDisplayInit(void) +{ + darwinScreensFound = AquaDisplayCount(); +} + + +/* + * AquaAddScreen + * Init the framebuffer and record pixmap parameters for the screen. + */ +Bool +AquaAddScreen(int index, ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); + CGRect cgRect; + CGDisplayCount numDisplays; + CGDisplayCount allocatedDisplays = 0; + CGDirectDisplayID *displays = NULL; + CGDisplayErr cgErr; + + dfb->pixelInfo.pixelType = kIORGBDirectPixels; + AquaScreenInit(index, &dfb->x, &dfb->y, &dfb->width, &dfb->height, + &dfb->pitch, &dfb->pixelInfo.bitsPerComponent, + &dfb->pixelInfo.componentCount, &dfb->bitsPerPixel); + dfb->colorBitsPerPixel = dfb->pixelInfo.bitsPerComponent * + dfb->pixelInfo.componentCount; + + // No frame buffer - it's all in window pixmaps. + dfb->framebuffer = NULL; // malloc(dfb.pitch * dfb.height); + + // Get all CoreGraphics displays covered by this X11 display. + cgRect = CGRectMake(dfb->x, dfb->y, dfb->width, dfb->height); + do { + cgErr = CGGetDisplaysWithRect(cgRect, 0, NULL, &numDisplays); + if (cgErr) break; + allocatedDisplays = numDisplays; + displays = xrealloc(displays, + numDisplays * sizeof(CGDirectDisplayID)); + cgErr = CGGetDisplaysWithRect(cgRect, allocatedDisplays, displays, + &numDisplays); + if (cgErr != CGDisplayNoErr) break; + } while (numDisplays > allocatedDisplays); + + if (cgErr != CGDisplayNoErr || numDisplays == 0) { + ErrorF("Could not find CGDirectDisplayID(s) for X11 screen %d: %dx%d @ %d,%d.\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); + return FALSE; + } + + // This X11 screen covers all CoreGraphics displays we just found. + // If there's more than one CG display, then video mirroring is on + // or PseudoramiX is on. + displayInfo->displayCount = allocatedDisplays; + displayInfo->displayIDs = displays; + + return TRUE; +} + +/* + * AquaSetupScreen + * Setup the screen for rootless access. + */ +Bool +AquaSetupScreen(int index, ScreenPtr pScreen) +{ + return RootlessInit(pScreen, &aquaRootlessProcs); +} Index: xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.h:1.3 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.h Wed Aug 1 01:34:06 2001 @@ -0,0 +1,38 @@ +/* + * Rootless implementation for Mac OS X Aqua environment + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.h,v 1.3 2001/08/01 05:34:06 torrey Exp $ */ + +#ifndef _ROOTLESSAQUAIMP_H +#define _ROOTLESSAQUAIMP_H + +#include "fakeBoxRec.h" + +int AquaDisplayCount(); + +void AquaScreenInit(int index, int *x, int *y, int *width, int *height, + int *rowBytes, unsigned long *bps, unsigned long *spp, + int *bpp); + +void *AquaNewWindow(void *upperw, int x, int y, int w, int h, int isRoot); + +void AquaDestroyWindow(void *rw); + +void AquaMoveWindow(void *rw, int x, int y); + +void AquaStartResizeWindow(void *rw, int x, int y, int w, int h); + +void AquaFinishResizeWindow(void *rw, int x, int y, int w, int h); + +void AquaUpdateRects(void *rw, fakeBoxRec *rects, int count); + +void AquaRestackWindow(void *rw, void *lowerw); + +void AquaReshapeWindow(void *rw, fakeBoxRec *rects, int count); + +void AquaGetPixmap(void *rw, char **bits, + int *rowBytes, int *depth, int *bpp); + +#endif /* _ROOTLESSAQUAIMP_H */ Index: xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.m diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.m:1.11 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.m Wed Jan 16 21:44:27 2002 @@ -0,0 +1,237 @@ +/* + * Rootless implementation for Mac OS X Aqua environment + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessAquaImp.m,v 1.11 2002/01/17 02:44:27 torrey Exp $ */ + +#include "rootlessAquaImp.h" +#include "XWindow.h" +#include "fakeBoxRec.h" +#include "quartzCommon.h" +#include "pseudoramiX.h" + +extern void ErrorF(const char *, ...); + +typedef struct { + XWindow *window; +} AquaWindowRec; + + +#define WINREC(rw) ((AquaWindowRec *)rw) + + +// Multihead note: When rootless mode uses PseudoramiX, the +// X server only sees one screen; only PseudoramiX itself knows +// about all of the screens. + +int AquaDisplayCount() +{ + aquaNumScreens = [[NSScreen screens] count]; + + if (noPseudoramiXExtension) { + return aquaNumScreens; + } else { + return 1; // only PseudoramiX knows about the rest + } +} + +void AquaScreenInit(int index, int *x, int *y, int *width, int *height, + int *rowBytes, unsigned long *bps, unsigned long *spp, + int *bpp) +{ + *bps = 8; + *spp = 3; + *bpp = 32; + + if (noPseudoramiXExtension) { + NSScreen *screen = [[NSScreen screens] objectAtIndex:index]; + NSRect frame = [screen frame]; + + // set x, y so (0,0) is top left of main screen + *x = NSMinX(frame); + *y = NSHeight([[NSScreen mainScreen] frame]) - NSHeight(frame) - + NSMinY(frame); + + *width = NSWidth(frame); + *height = NSHeight(frame); + *rowBytes = (*width) * (*bpp) / 8; + + // Shift the usable part of main screen down to avoid the menu bar. + if (NSEqualRects(frame, [[NSScreen mainScreen] frame])) { + *y += aquaMenuBarHeight; + *height -= aquaMenuBarHeight; + } + + } else { + int i; + NSRect unionRect = NSMakeRect(0, 0, 0, 0); + NSArray *screens = [NSScreen screens]; + + // Get the union of all screens (minus the menu bar on main screen) + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + unionRect = NSUnionRect(unionRect, frame); + } + + // Use unionRect as the screen size for the X server. + *x = unionRect.origin.x; + *y = unionRect.origin.y; + *width = unionRect.size.width; + *height = unionRect.size.height; + *rowBytes = (*width) * (*bpp) / 8; + + // Tell PseudoramiX about the real screens. + // InitOutput() will move the big screen to (0,0), + // so compensate for that here. + for (i = 0; i < [screens count]; i++) { + NSScreen *screen = [screens objectAtIndex:i]; + NSRect frame = [screen frame]; + int j; + + // Skip this screen if it's a mirrored copy of an earlier screen. + for (j = 0; j < i; j++) { + if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) { + ErrorF("PseudoramiX screen %d is a mirror of screen %d.\n", + i, j); + break; + } + } + if (j < i) continue; // this screen is a mirrored copy + + frame.origin.y = [[NSScreen mainScreen] frame].size.height - + frame.size.height - frame.origin.y; + + if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { + frame.origin.y += aquaMenuBarHeight; + frame.size.height -= aquaMenuBarHeight; + } + + ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + (int)frame.size.width, (int)frame.size.height, + (int)frame.origin.x, (int)frame.origin.y); + + frame.origin.x -= unionRect.origin.x; + frame.origin.y -= unionRect.origin.y; + + ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); + + PseudoramiXAddScreen(frame.origin.x, frame.origin.y, + frame.size.width, frame.size.height); + } + } +} + +void *AquaNewWindow(void *upperw, int x, int y, int w, int h, int isRoot) +{ + AquaWindowRec *winRec = (AquaWindowRec *)malloc(sizeof(AquaWindowRec)); + NSRect frame = NSMakeRect(x, NSHeight([[NSScreen mainScreen] frame]) - + y - h, w, h); + + winRec->window = [[XWindow alloc] initWithContentRect:frame isRoot:isRoot]; + + if (upperw) { + AquaWindowRec *upperRec = WINREC(upperw); + int uppernum = [upperRec->window windowNumber]; + [winRec->window orderWindow:NSWindowBelow relativeTo:uppernum]; + } else { + [winRec->window orderFront:nil]; + } + + // fixme hide root for now + if (isRoot) [winRec->window orderOut:nil]; + + return winRec; +} + +void AquaDestroyWindow(void *rw) +{ + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window release]; +} + +void AquaMoveWindow(void *rw, int x, int y) +{ + AquaWindowRec *winRec = WINREC(rw); + NSPoint topLeft = NSMakePoint(x, NSHeight([[NSScreen mainScreen] frame]) - + y); + + [winRec->window setFrameTopLeftPoint:topLeft]; +} + +void AquaStartResizeWindow(void *rw, int x, int y, int w, int h) +{ + AquaWindowRec *winRec = WINREC(rw); + NSRect frame = NSMakeRect(x, NSHeight([[NSScreen mainScreen] frame]) - + y - h, w, h); + + [winRec->window setFrame:frame display:NO]; +} + +void AquaFinishResizeWindow(void *rw, int x, int y, int w, int h) +{ + // refresh everything? fixme yes for testing + fakeBoxRec box = {0, 0, w, h}; + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window refreshRects:&box count:1]; +} + +void AquaUpdateRects(void *rw, fakeBoxRec *rects, int count) +{ + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window refreshRects:rects count:count]; +} + +// fixme is this upperw or lowerw? +void AquaRestackWindow(void *rw, void *upperw) +{ + AquaWindowRec *winRec = WINREC(rw); + + if (upperw) { + AquaWindowRec *upperRec = WINREC(upperw); + int uppernum = [upperRec->window windowNumber]; + [winRec->window orderWindow:NSWindowBelow relativeTo:uppernum]; + } else { + [winRec->window orderFront:nil]; + } + // [winRec->window setAcceptsMouseMovedEvents:YES]; + // fixme prefer to orderFront whenever possible - pass upperw, not lowerw +} + +// rects are the areas not part of the new shape +void AquaReshapeWindow(void *rw, fakeBoxRec *rects, int count) +{ + AquaWindowRec *winRec = WINREC(rw); + + // make transparent if window is now shaped + // transparent windows never go back to opaque + if (count > 0) { + [winRec->window setOpaque:NO]; + } + + [[winRec->window contentView] reshapeRects:rects count:count]; + + if (! [winRec->window isOpaque]) { + // force update of window shadow + [winRec->window setHasShadow:NO]; + [winRec->window setHasShadow:YES]; + } +} + +void AquaGetPixmap(void *rw, char **bits, + int *rowBytes, int *depth, int *bpp) +{ + AquaWindowRec *winRec = WINREC(rw); + + [winRec->window getBits:bits rowBytes:rowBytes depth:depth + bitsPerPixel:bpp]; +} Index: xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.c:1.3 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.c Mon Nov 5 00:12:16 2001 @@ -0,0 +1,262 @@ +/* + * Common rootless definitions and code + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.c,v 1.3 2001/11/05 05:12:16 torrey Exp $ */ + +#include "rootlessCommon.h" + + +RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL}; + + +// Returns the top-level parent of pWindow. +// The root is the top-level parent of itself, even though the root is +// not otherwise considered to be a top-level window. +WindowPtr TopLevelParent(WindowPtr pWindow) +{ + WindowPtr top = pWindow; + + if (IsRoot(pWindow)) return pWindow; // root is top-level parent of itself + while (top && ! IsTopLevel(top)) top = top->parent; + return top; +} + + +// Returns TRUE if this window is visible inside a frame +// (e.g. it is visible and has a top-level or root parent) +Bool IsFramedWindow(WindowPtr pWin) +{ + WindowPtr top; + + if (! pWin->realized) return FALSE; + top = TopLevelParent(pWin); + return (top && WINREC(top)); +} + + +// Move the given pixmap's base address to where pixel (0, 0) +// would be if the pixmap's actual data started at (x, y) +void SetPixmapBaseToScreen(PixmapPtr pix, int x, int y) +{ + pix->devPrivate.ptr = (char *)(pix->devPrivate.ptr) - + (pix->drawable.bitsPerPixel/8 * x + y*pix->devKind); +} + + +// Update pWindow's pixmap. +// This needs to be called every time a window moves relative to +// its top-level parent, or the parent's pixmap data is reallocated. +// Three cases: +// * window is top-level with no existing pixmap: make one +// * window is top-level with existing pixmap: update it in place +// * window is descendant of top-level: point to top-level's pixmap +void UpdatePixmap(WindowPtr pWindow) +{ + WindowPtr top = TopLevelParent(pWindow); + RootlessWindowRec *winRec; + ScreenPtr pScreen = pWindow->drawable.pScreen; + PixmapPtr pix; + + RL_DEBUG_MSG("update pixmap (win 0x%x)", pWindow); + + // Don't use IsFramedWindow(); window is unrealized during RealizeWindow(). + + if (! top) { + RL_DEBUG_MSG("no parent\n"); + return; + } + winRec = WINREC(top); + if (!winRec) { + RL_DEBUG_MSG("not framed\n"); + return; + } + + if (pWindow == top) { + // This is the top window. Update its pixmap. + if (winRec->pixmap == NULL) { + // Allocate a new pixmap. + pix = GetScratchPixmapHeader(pScreen, + winRec->frame.w, winRec->frame.h, + winRec->frame.depth, + winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, + winRec->frame.pixelData); + SetPixmapBaseToScreen(pix, winRec->frame.x, winRec->frame.y); + pScreen->SetWindowPixmap(pWindow, pix); + winRec->pixmap = pix; + } else { + // Update existing pixmap. Update in place so we don't have to + // change the children's pixmaps. + pix = winRec->pixmap; + pScreen->ModifyPixmapHeader(pix, + winRec->frame.w, winRec->frame.h, + winRec->frame.depth, + winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, + winRec->frame.pixelData); + SetPixmapBaseToScreen(pix, winRec->frame.x, winRec->frame.y); + } + } else { + // This is not the top window. Point to the parent's pixmap. + pix = winRec->pixmap; + pScreen->SetWindowPixmap(pWindow, pix); + } + + RL_DEBUG_MSG("done\n"); +} + + +#ifdef SHAPE + +// boundingShape = outside border (like borderClip) +// clipShape = inside border (like clipList) +// Both are in window-local coordinates +// We only care about boundingShape (fixme true?) + +// RootlessReallySetShape is used in several places other than SetShape. +// Most importantly, SetShape is often called on unmapped windows, so we +// have to wait until the window is mapped to reshape the frame. +static void RootlessReallySetShape(WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + RegionRec newShape; + + if (IsRoot(pWin)) return; + if (!IsTopLevel(pWin)) return; + if (!winRec) return; + + if (wBoundingShape(pWin)) { + // wBoundingShape is relative to *inner* origin of window. + // Translate by borderWidth to get the outside-relative position. + REGION_INIT(pScreen, &newShape, NullBox, 0); + REGION_COPY(pScreen, &newShape, wBoundingShape(pWin)); + REGION_TRANSLATE(pScreen, &newShape, pWin->borderWidth, + pWin->borderWidth); + } else { + newShape.data = NULL; + newShape.extents.x1 = 0; + newShape.extents.y1 = 0; + newShape.extents.x2 = winRec->frame.w; + newShape.extents.y2 = winRec->frame.h; + } + RL_DEBUG_MSG("reshaping..."); + RL_DEBUG_MSG("numrects %d, extents %d %d %d %d ", + REGION_NUM_RECTS(&newShape), + newShape.extents.x1, newShape.extents.y1, + newShape.extents.x2, newShape.extents.y2); + CallFrameProc(pScreen, ReshapeFrame,(pScreen, &winRec->frame, &newShape)); + REGION_UNINIT(pScreen, &newShape); +} + +#endif // SHAPE + + +// pRegion is GLOBAL +void +RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) +{ + pWindow = TopLevelParent(pWindow); + if (!pWindow) { + RL_DEBUG_MSG("RootlessDamageRegion: window is not framed\n"); + } else if (!WINREC(pWindow)) { + RL_DEBUG_MSG("RootlessDamageRegion: top-level window not a frame\n"); + } else { + REGION_UNION((pWindow)->drawable.pScreen, &WINREC(pWindow)->damage, + &WINREC(pWindow)->damage, (pRegion)); + } +} + + +// pBox is GLOBAL +void +RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) +{ + RegionRec region; + + REGION_INIT(pWindow->drawable.pScreen, ®ion, pBox, 1); + RootlessDamageRegion(pWindow, ®ion); +} + + +// (x, y, w, h) is in window-local coordinates. +void +RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) +{ + BoxRec box; + RegionRec region; + + x += pWindow->drawable.x; + y += pWindow->drawable.y; + box.x1 = x; + box.x2 = x + w; + box.y1 = y; + box.y2 = y + h; + REGION_INIT(pWindow->drawable.pScreen, ®ion, &box, 1); + RootlessDamageRegion(pWindow, ®ion); +} + +#ifdef SHAPE + +void +RootlessDamageShape(WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC(pWin); + + // We only care about the shape of top-level framed windows. + if (IsRoot(pWin)) return; + if (!IsTopLevel(pWin)) return; + if (!winRec) return; + + winRec->shapeDamage = TRUE; +} + +#endif // SHAPE + +void +RootlessRedisplay(WindowPtr pWindow) +{ + RootlessWindowRec *winRec = WINREC(pWindow); + ScreenPtr pScreen = pWindow->drawable.pScreen; + +#ifdef SHAPE + if (winRec->shapeDamage) { + // Reshape the window. This will also update the entire window. + RootlessReallySetShape(pWindow); + REGION_EMPTY(pScreen, &winRec->damage); + winRec->shapeDamage = FALSE; + } + else +#endif // SHAPE + if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { + REGION_INTERSECT(pScreen, &winRec->damage, &winRec->damage, + &pWindow->borderSize); + + // move region to window local coords + REGION_TRANSLATE(pScreen, &winRec->damage, + -winRec->frame.x, -winRec->frame.y); + CallFrameProc(pScreen, UpdateRegion, + (pScreen, &winRec->frame, &winRec->damage)); + REGION_EMPTY(pScreen, &winRec->damage); + } +} + + +void +RootlessRedisplayScreen(ScreenPtr pScreen) +{ + WindowPtr root = WindowTable[pScreen->myNum]; + + if (root) { + WindowPtr win; + + RootlessRedisplay(root); + for (win = root->firstChild; win; win = win->nextSib) { + if (WINREC(win)) { + RootlessRedisplay(win); + } + } + } +} Index: xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.h:1.5 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.h Sat Dec 22 00:28:35 2001 @@ -0,0 +1,214 @@ +/* + * Common internal rootless definitions and code + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessCommon.h,v 1.5 2001/12/22 05:28:35 torrey Exp $ */ + +#ifndef _ROOTLESSCOMMON_H +#define _ROOTLESSCOMMON_H + +#include "rootless.h" + +#include "pixmapstr.h" +#include "windowstr.h" + +#ifdef RENDER +#include "picturestr.h" +#endif + + +// Debug output, or not. +#ifdef ROOTLESSDEBUG +#define RL_DEBUG_MSG ErrorF +#else +#define RL_DEBUG_MSG(a, ...) +#endif + + +// Global variables +extern int rootlessGCPrivateIndex; +extern int rootlessScreenPrivateIndex; +extern int rootlessWindowPrivateIndex; + + +// RootlessGCRec: private per-gc data +typedef struct { + GCFuncs *originalFuncs; + GCOps *originalOps; +} RootlessGCRec; + + +// RootlessWindowRec: private per-window data +typedef struct RootlessWindowRec { + RootlessFrameRec frame; + RegionRec damage; + unsigned int borderWidth; // needed for MoveWindow(VTOther) (%$#@!!!) + PixmapPtr pixmap; +#ifdef SHAPE + BOOL shapeDamage; // TRUE if shape has changed +#endif +} RootlessWindowRec; + + +// RootlessScreenRec: per-screen private data +typedef struct { + ScreenPtr pScreen; + RootlessFrameProcs frameProcs; + + CloseScreenProcPtr CloseScreen; + + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + MoveWindowProcPtr MoveWindow; + ResizeWindowProcPtr ResizeWindow; + RestackWindowProcPtr RestackWindow; + ChangeBorderWidthProcPtr ChangeBorderWidth; + PositionWindowProcPtr PositionWindow; + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + + CreateGCProcPtr CreateGC; + PaintWindowBackgroundProcPtr PaintWindowBackground; + PaintWindowBorderProcPtr PaintWindowBorder; + CopyWindowProcPtr CopyWindow; + GetImageProcPtr GetImage; + + MarkOverlappedWindowsProcPtr MarkOverlappedWindows; + ValidateTreeProcPtr ValidateTree; + +#ifdef SHAPE + SetShapeProcPtr SetShape; +#endif + +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; +#endif + +} RootlessScreenRec; + + +// "Definition of the Porting Layer for the X11 Sample Server" says +// unwrap and rewrap of screen functions is unnecessary, but +// screen->CreateGC changes after a call to cfbCreateGC. + +#define SCREEN_UNWRAP(screen, fn) \ + screen->fn = SCREENREC(screen)->fn; + +#define SCREEN_WRAP(screen, fn) \ + SCREENREC(screen)->fn = screen->fn; \ + screen->fn = Rootless##fn + + +// Accessors for screen and window privates + +#define SCREENREC(pScreen) \ + ((RootlessScreenRec*)(pScreen)->devPrivates[rootlessScreenPrivateIndex].ptr) + +#define WINREC(pWin) \ + ((RootlessWindowRec *)(pWin)->devPrivates[rootlessWindowPrivateIndex].ptr) + + +// Call a rootless implementation function. +// Many rootless implementation functions are allowed to be NULL. +#define CallFrameProc(pScreen, proc, params) \ + if (SCREENREC(pScreen)->frameProcs.proc) { \ + RL_DEBUG_MSG("calling frame proc " #proc " "); \ + SCREENREC(pScreen)->frameProcs.proc params; \ + } + + +// BoxRec manipulators +// Copied from shadowfb + +#define TRIM_BOX(box, pGC) { \ + BoxPtr extents = &pGC->pCompositeClip->extents;\ + if(box.x1 < extents->x1) box.x1 = extents->x1; \ + if(box.x2 > extents->x2) box.x2 = extents->x2; \ + if(box.y1 < extents->y1) box.y1 = extents->y1; \ + if(box.y2 > extents->y2) box.y2 = extents->y2; \ +} + +#define TRANSLATE_BOX(box, pDraw) { \ + box.x1 += pDraw->x; \ + box.x2 += pDraw->x; \ + box.y1 += pDraw->y; \ + box.y2 += pDraw->y; \ +} + +#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \ + TRANSLATE_BOX(box, pDraw); \ + TRIM_BOX(box, pGC); \ +} + +#define BOX_NOT_EMPTY(box) \ + (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) + + +// HUGE_ROOT and NORMAL_ROOT +// We don't want to clip windows to the edge of the screen. +// HUGE_ROOT temporarily makes the root window really big. +// This is needed as a wrapper around any function that calls +// SetWinSize or SetBorderSize which clip a window against its +// parents, including the root. + +extern RegionRec rootlessHugeRoot; + +#define HUGE_ROOT(pWin) \ + { \ + WindowPtr w = pWin; \ + while (w->parent) w = w->parent; \ + saveRoot = w->winSize; \ + w->winSize = rootlessHugeRoot; \ + } + +#define NORMAL_ROOT(pWin) \ + { \ + WindowPtr w = pWin; \ + while (w->parent) w = w->parent; \ + w->winSize = saveRoot; \ + } + + +// Returns TRUE if this window is a top-level window (i.e. child of the root) +// The root is not a top-level window. +#define IsTopLevel(pWin) \ + ((pWin) && (pWin)->parent && !(pWin)->parent->parent) + +// Returns TRUE if this window is a root window +#define IsRoot(pWin) \ + ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum]) + +// Returns the top-level parent of pWindow. +// The root is the top-level parent of itself, even though the root is +// not otherwise considered to be a top-level window. +WindowPtr TopLevelParent(WindowPtr pWindow); + +// Returns TRUE if this window is visible inside a frame +// (e.g. it is visible and has a top-level or root parent) +Bool IsFramedWindow(WindowPtr pWin); + +// Move the given pixmap's base address to where pixel (0, 0) +// would be if the pixmap's actual data started at (x, y). +void SetPixmapBaseToScreen(PixmapPtr pix, int x, int y); + +// Update pWindow's pixmap. +// This needs to be called every time a window moves relative to +// its top-level parent, or the parent's pixmap data is reallocated. +void UpdatePixmap(WindowPtr pWindow); + +// Routines that cause regions to get redrawn. +// DamageRegion and DamageRect are in global coordinates. +// DamageBox is in window-local coordinates. +void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion); +void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h); +void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox); +void RootlessRedisplay(WindowPtr pWindow); +void RootlessRedisplayScreen(ScreenPtr pScreen); + +// Window reshape needs to be updated. The reshape also forces complete redraw. +void RootlessDamageShape(WindowPtr pWin); + +#endif // _ROOTLESSCOMMON_H Index: xc/programs/Xserver/hw/darwin/bundle/rootlessGC.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessGC.c:1.3 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessGC.c Sat Jun 30 23:24:57 2001 @@ -0,0 +1,1170 @@ +/* + * Graphics Context support for Mac OS X rootless X server + * + * Greg Parker gparker@cs.stanford.edu + * + * February 2001 Created + * March 3, 2001 Restructured as generic rootless mode + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessGC.c,v 1.3 2001/07/01 03:24:57 torrey Exp $ */ + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "dixfontstr.h" +#include "mivalidate.h" + +#include +#include +#include + +#include "rootlessCommon.h" + + +// GC functions +static void RootlessValidateGC(GCPtr pGC, unsigned long changes, + DrawablePtr pDrawable); +static void RootlessChangeGC(GCPtr pGC, unsigned long mask); +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void RootlessDestroyGC(GCPtr pGC); +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, + int nrects); +static void RootlessDestroyClip(GCPtr pGC); +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc); + +GCFuncs rootlessGCFuncs = { + RootlessValidateGC, + RootlessChangeGC, + RootlessCopyGC, + RootlessDestroyGC, + RootlessChangeClip, + RootlessDestroyClip, + RootlessCopyClip, +}; + +// GC operations +static void RootlessFillSpans(); +static void RootlessSetSpans(); +static void RootlessPutImage(); +static RegionPtr RootlessCopyArea(); +static RegionPtr RootlessCopyPlane(); +static void RootlessPolyPoint(); +static void RootlessPolylines(); +static void RootlessPolySegment(); +static void RootlessPolyRectangle(); +static void RootlessPolyArc(); +static void RootlessFillPolygon(); +static void RootlessPolyFillRect(); +static void RootlessPolyFillArc(); +static int RootlessPolyText8(); +static int RootlessPolyText16(); +static void RootlessImageText8(); +static void RootlessImageText16(); +static void RootlessImageGlyphBlt(); +static void RootlessPolyGlyphBlt(); +static void RootlessPushPixels(); + +static GCOps rootlessGCOps = { + RootlessFillSpans, + RootlessSetSpans, + RootlessPutImage, + RootlessCopyArea, + RootlessCopyPlane, + RootlessPolyPoint, + RootlessPolylines, + RootlessPolySegment, + RootlessPolyRectangle, + RootlessPolyArc, + RootlessFillPolygon, + RootlessPolyFillRect, + RootlessPolyFillArc, + RootlessPolyText8, + RootlessPolyText16, + RootlessImageText8, + RootlessImageText16, + RootlessImageGlyphBlt, + RootlessPolyGlyphBlt, + RootlessPushPixels +#ifdef NEED_LINEHELPER + , NULL +#endif +}; + + +Bool +RootlessCreateGC(GCPtr pGC) +{ + RootlessGCRec *gcrec; + RootlessScreenRec *s; + Bool result; + + SCREEN_UNWRAP(pGC->pScreen, CreateGC); + s = (RootlessScreenRec *) pGC->pScreen-> + devPrivates[rootlessScreenPrivateIndex].ptr; + result = s->CreateGC(pGC); + gcrec = (RootlessGCRec *) pGC->devPrivates[rootlessGCPrivateIndex].ptr; + gcrec->originalOps = NULL; // don't wrap ops yet + gcrec->originalFuncs = pGC->funcs; + pGC->funcs = &rootlessGCFuncs; + + SCREEN_WRAP(pGC->pScreen, CreateGC); + return result; +} + + +// GC func wrapping +// ValidateGC wraps gcOps iff dest is viewable. All others just unwrap&call. + +// GCFUN_UNRAP assumes funcs have been wrapped and +// does not assume ops have been wrapped +#define GCFUNC_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + (pGC)->funcs = gcrec->originalFuncs; \ + if (gcrec->originalOps) { \ + (pGC)->ops = gcrec->originalOps; \ +} + +#define GCFUNC_WRAP(pGC) \ + gcrec->originalFuncs = (pGC)->funcs; \ + (pGC)->funcs = &rootlessGCFuncs; \ + if (gcrec->originalOps) { \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->ops = &rootlessGCOps; \ +} + + +static void +RootlessValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + GCFUNC_UNWRAP(pGC); + + pGC->funcs->ValidateGC(pGC, changes, pDrawable); + + gcrec->originalOps = NULL; + + if (pDrawable->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDrawable; + + if (pWin->viewable) { + gcrec->originalOps = pGC->ops; + } + } + + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeGC(GCPtr pGC, unsigned long mask) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeGC(pGC, mask); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) +{ + GCFUNC_UNWRAP(pGCDst); + pGCDst->funcs->CopyGC(pGCSrc, mask, pGCDst); + GCFUNC_WRAP(pGCDst); +} + +static void RootlessDestroyGC(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyGC(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); + GCFUNC_WRAP(pGC); +} + +static void RootlessDestroyClip(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyClip(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + GCFUNC_UNWRAP(pgcDst); + pgcDst->funcs->CopyClip(pgcDst, pgcSrc); + GCFUNC_WRAP(pgcDst); +} + + +// GC ops +// We can't use shadowfb because shadowfb assumes one pixmap +// and our root window is a special case. +// So much of this code is copied from shadowfb. + +// assumes both funcs and ops are wrapped +#define GCOP_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + GCFuncs *saveFuncs = pGC->funcs; \ + (pGC)->funcs = gcrec->originalFuncs; \ + (pGC)->ops = gcrec->originalOps; + +#define GCOP_WRAP(pGC) \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->funcs = saveFuncs; \ + (pGC)->ops = &rootlessGCOps; + + +static void +RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int sorted) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("fill spans start "); + + if (nInit <= 0) { + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nInit; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidthInit++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill spans end\n"); +} + +static void +RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, + DDXPointPtr pptInit, int *pwidthInit, + int nspans, int sorted) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("set spans start "); + + if (nspans <= 0) { + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nspans; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidth++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + GCOP_WRAP(pGC); + RL_DEBUG_MSG("set spans end\n"); +} + +static void +RootlessPutImage(DrawablePtr dst, GCPtr pGC, + int depth, int x, int y, int w, int h, + int leftPad, int format, char *pBits) +{ + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("put image start "); + + pGC->ops->PutImage(dst, pGC, depth, x,y,w,h, leftPad, format, pBits); + + box.x1 = x + dst->x; + box.x2 = box.x1 + w; + box.y1 = y + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("put image end\n"); +} + +/* changed area is *dest* rect */ +/* If this code ever goes back go StartDrawing/StopDrawing: + * start and stop dst always + * start and stop src if src->type is DRAWABLE_WINDOW and src is framed + */ +static RegionPtr +RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, + int srcx, int srcy, int w, int h, + int dstx, int dsty) +{ + RegionPtr result; + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst); + + result = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy area end\n"); + return result; +} + +/* changed area is *dest* rect */ +/* If this code ever goes back go StartDrawing/StopDrawing: + * start and stop dst always + * start and stop src if src->type is DRAWABLE_WINDOW and src is framed + */ +static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, + GCPtr pGC, int srcx, int srcy, + int w, int h, int dstx, int dsty, + unsigned long plane) +{ + RegionPtr result; + BoxRec box; + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy plane start "); + + result = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, + dstx, dsty, plane); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy plane end\n"); + return result; +} + +// Options for size of changed area: +// 0 = box per point +// 1 = big box around all points +// 2 = accumulate point in 20 pixel radius +#define ROOTLESS_CHANGED_AREA 1 +#define abs(a) ((a) > 0 ? (a) : -(a)) + +/* changed area is box around all points */ +static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("polypoint start "); + + pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { +#if ROOTLESS_CHANGED_AREA==0 + // box per point + BoxRec box; + + while (npt) { + box.x1 = pptInit->x; + box.y1 = pptInit->y; + box.x2 = box.x1 + 1; + box.y2 = box.y1 + 1; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + npt--; + pptInit++; + } + +#elif ROOTLESS_CHANGED_AREA==1 + // one big box + BoxRec box; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + +#elif ROOTLESS_CHANGED_AREA==2 + // clever(?) method: accumulate point in 20-pixel radius + BoxRec box; + int firstx, firsty; + + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + while(--npt) { + pptInit++; + if (abs(pptInit->x - firstx) > 20 || + abs(pptInit->y - firsty) > 20) { + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + } else { + if (box.x1 > pptInit->x) box.x1 = pptInit->x; + else if (box.x2 < pptInit->x) box.x2 = pptInit->x; + if (box.y1 > pptInit->y) box.y1 = pptInit->y; + else if (box.y2 < pptInit->y) box.y2 = pptInit->y; + } + } + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); +#endif /* ROOTLESS_CHANGED_AREA */ + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polypoint end\n"); +} + +#undef ROOTLESS_CHANGED_AREA + +/* changed area is box around each line */ +static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly lines start "); + + pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { + BoxRec box; + int extra = pGC->lineWidth >> 1; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + + if(npt > 1) { + if(pGC->joinStyle == JoinMiter) + extra = 6 * pGC->lineWidth; + else if(pGC->capStyle == CapProjecting) + extra = pGC->lineWidth; + } + + if(mode == CoordModePrevious) { + int x = box.x1; + int y = box.y1; + + while(--npt) { + pptInit++; + x += pptInit->x; + y += pptInit->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly lines end\n"); +} + +/* changed area is box around each line segment */ +static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, + int nseg, xSegment *pSeg) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly segment start (win 0x%x)", dst); + + pGC->ops->PolySegment(dst, pGC, nseg, pSeg); + + if (nseg > 0) { + BoxRec box; + int extra = pGC->lineWidth; + + if(pGC->capStyle != CapProjecting) + extra >>= 1; + + if(pSeg->x2 > pSeg->x1) { + box.x1 = pSeg->x1; + box.x2 = pSeg->x2; + } else { + box.x2 = pSeg->x1; + box.x1 = pSeg->x2; + } + + if(pSeg->y2 > pSeg->y1) { + box.y1 = pSeg->y1; + box.y2 = pSeg->y2; + } else { + box.y2 = pSeg->y1; + box.y1 = pSeg->y2; + } + + while(--nseg) { + pSeg++; + if(pSeg->x2 > pSeg->x1) { + if(pSeg->x1 < box.x1) box.x1 = pSeg->x1; + if(pSeg->x2 > box.x2) box.x2 = pSeg->x2; + } else { + if(pSeg->x2 < box.x1) box.x1 = pSeg->x2; + if(pSeg->x1 > box.x2) box.x2 = pSeg->x1; + } + if(pSeg->y2 > pSeg->y1) { + if(pSeg->y1 < box.y1) box.y1 = pSeg->y1; + if(pSeg->y2 > box.y2) box.y2 = pSeg->y2; + } else { + if(pSeg->y2 < box.y1) box.y1 = pSeg->y2; + if(pSeg->y1 > box.y2) box.y2 = pSeg->y1; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly segment end\n"); +} + +/* changed area is box around each line (not entire rects) */ +static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, + int nRects, xRectangle *pRects) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly rectangle start "); + + pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); + + if (nRects > 0) { + BoxRec box; + int offset1, offset2, offset3; + + offset2 = pGC->lineWidth; + if(!offset2) offset2 = 1; + offset1 = offset2 >> 1; + offset3 = offset2 - offset1; + + while(nRects--) { + box.x1 = pRects->x - offset1; + box.y1 = pRects->y - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x + pRects->width - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + pRects->height - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + pRects++; + } + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly rectangle end\n"); +} + + +/* changed area is box around each arc (assumes all arcs are 360 degrees) */ +static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("poly arc start "); + + pGC->ops->PolyArc(dst, pGC, narcs, parcs); + + if (narcs > 0) { + int extra = pGC->lineWidth >> 1; + BoxRec box; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) + box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) + box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly arc end\n"); +} + + +/* changed area is box around each poly */ +static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, + int shape, int mode, int count, + DDXPointPtr pptInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill poly start "); + + if (count <= 2) { + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + } else { + DDXPointPtr ppt = pptInit; + int i = count; + BoxRec box; + + box.x2 = box.x1 = ppt->x; + box.y2 = box.y1 = ppt->y; + + if(mode != CoordModeOrigin) { + int x = box.x1; + int y = box.y1; + + while(--i) { + ppt++; + x += ppt->x; + y += ppt->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--i) { + ppt++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + else if(box.x2 < ppt->x) + box.x2 = ppt->x; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + } + + box.x2++; + box.y2++; + + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill poly end\n"); +} + +/* changed area is the rects */ +static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, + int nRectsInit, xRectangle *pRectsInit) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill rect start (win 0x%x)", dst); + + if (nRectsInit <= 0) { + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + } else { + BoxRec box; + xRectangle *pRects = pRectsInit; + int nRects = nRectsInit; + + box.x1 = pRects->x; + box.x2 = box.x1 + pRects->width; + box.y1 = pRects->y; + box.y2 = box.y1 + pRects->height; + + while(--nRects) { + pRects++; + if(box.x1 > pRects->x) + box.x1 = pRects->x; + if(box.x2 < (pRects->x + pRects->width)) + box.x2 = pRects->x + pRects->width; + if(box.y1 > pRects->y) + box.y1 = pRects->y; + if(box.y2 < (pRects->y + pRects->height)) + box.y2 = pRects->y + pRects->height; + } + + /* cfb messes with the pRectsInit so we have to do our + calculations first */ + + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill rect end\n"); +} + + +/* changed area is box around each arc (assuming arcs are all 360 degrees) */ +static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, + int narcs, xArc *parcs) +{ + GCOP_UNWRAP(pGC); + + RL_DEBUG_MSG("fill arc start "); + + pGC->ops->PolyFillArc(dst, pGC, narcs, parcs); + + if (narcs > 0) { + BoxRec box; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) + box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) + box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill arc end"); +} + + +static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext8 start "); + + pGC->ops->ImageText8(dst, pGC, x, y, count, chars); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext8 end\n"); +} + +static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + int width; // the result, sorta + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext8 start "); + + width = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); + width -= x; + + if(width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext8 end\n"); + return (width + x); +} + +static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext16 start "); + + pGC->ops->ImageText16(dst, pGC, x, y, count, chars); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext16 end\n"); +} + +static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + int width; // the result, sorta + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext16 start "); + + width = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); + width -= x; + + if (width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext16 end\n"); + return width + x; +} + +static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer unused) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imageglyph start "); + + pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyph, ppci, unused); + + if (nglyph > 0) { + int top, bot, width = 0; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + box.x1 = ppci[0]->metrics.leftSideBearing; + if(box.x1 > 0) box.x1 = 0; + box.x2 = ppci[nglyph - 1]->metrics.rightSideBearing - + ppci[nglyph - 1]->metrics.characterWidth; + if(box.x2 < 0) box.x2 = 0; + + box.x2 += dst->x + x; + box.x1 += dst->x + x; + + while(nglyph--) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) + box.x2 += width; + else + box.x1 += width; + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imageglyph end\n"); +} + +static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase) +{ + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polyglyph start "); + + pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); + + if (nglyph > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + ppci[0]->metrics.leftSideBearing; + box.x2 = dst->x + x + ppci[nglyph - 1]->metrics.rightSideBearing; + + if(nglyph > 1) { + int width = 0; + + while(--nglyph) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polyglyph end\n"); +} + + +/* changed area is in dest */ +static void +RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, + int dx, int dy, int xOrg, int yOrg) +{ + BoxRec box; + GCOP_UNWRAP(pGC); + + pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); + + box.x1 = xOrg + dst->x; + box.x2 = box.x1 + dx; + box.y1 = yOrg + dst->y; + box.y2 = box.y1 + dy; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("push pixels end\n"); +} Index: xc/programs/Xserver/hw/darwin/bundle/rootlessScreen.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessScreen.c:1.5 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessScreen.c Sat Dec 22 00:28:35 2001 @@ -0,0 +1,426 @@ +/* + * Screen routines for Mac OS X rootless X server + * + * Greg Parker gparker@cs.stanford.edu + * + * February 2001 Created + * March 3, 2001 Restructured as generic rootless mode + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessScreen.c,v 1.5 2001/12/22 05:28:35 torrey Exp $ */ + + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "propertyst.h" +#include "mivalidate.h" +#include "picturestr.h" + +#include +#include +#include + +#include "rootlessCommon.h" +#include "rootlessWindow.h" + +extern int +rootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); +extern Bool +RootlessCreateGC(GCPtr pGC); + +// Initialize globals +int rootlessGCPrivateIndex = -1; +int rootlessScreenPrivateIndex = -1; +int rootlessWindowPrivateIndex = -1; + + +static Bool +RootlessCloseScreen(int i, ScreenPtr pScreen) +{ + RootlessScreenRec *s; + + s = SCREENREC(pScreen); + + // fixme unwrap everything that was wrapped? + pScreen->CloseScreen = s->CloseScreen; + + xfree(s); + return pScreen->CloseScreen(i, pScreen); +} + + +static void +RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, + unsigned int format, unsigned long planeMask, char *pdstLine) +{ + ScreenPtr pScreen = pDrawable->pScreen; + SCREEN_UNWRAP(pScreen, GetImage); + + if (pDrawable->type == DRAWABLE_WINDOW) { + /* Many apps use GetImage to sync with the visible frame buffer */ + // fixme entire screen or just window or all screens? + RootlessRedisplayScreen(pScreen); + } + + pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + + SCREEN_WRAP(pScreen, GetImage); +} + + +#ifdef RENDER + +static void +RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + WindowPtr dstWin; + + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + // SCREEN_UNWRAP(ps, Composite); + ps->Composite = SCREENREC(pScreen)->Composite; + + ps->Composite(op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + if (dstWin && IsFramedWindow(dstWin)) { + RootlessDamageRect(dstWin, xDst, yDst, width, height); + } + + ps->Composite = RootlessComposite; + // SCREEN_WRAP(ps, Composite); +} + + +static void +RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int nlist, GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + int x, y; + int n; + GlyphPtr glyph; + WindowPtr dstWin; + + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + //SCREEN_UNWRAP(ps, Glyphs); + ps->Glyphs = SCREENREC(pScreen)->Glyphs; + ps->Glyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + ps->Glyphs = RootlessGlyphs; + //SCREEN_WRAP(ps, Glyphs); + + if (dstWin && IsFramedWindow(dstWin)) { + x = xSrc; + y = ySrc; + while (nlist--) { + x += list->xOff; + y += list->yOff; + n = list->len; + while (n--) { + glyph = *glyphs++; + RootlessDamageRect(dstWin, + x - glyph->info.x, y - glyph->info.y, + glyph->info.width, glyph->info.height); + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; + } + } +} + +#endif // RENDER + + +// RootlessValidateTree +// ValidateTree is modified in two ways: +// * top-level windows don't clip each other +// * windows aren't clipped against root. +// These only matter when validating from the root. +static int +RootlessValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + int result; + RegionRec saveRoot; + ScreenPtr pScreen = pParent->drawable.pScreen; + + SCREEN_UNWRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE start "); + + // Use our custom version to validate from root + if (IsRoot(pParent)) { + RL_DEBUG_MSG("custom "); + result = rootlessMiValidateTree(pParent, pChild, kind); + } else { + HUGE_ROOT(pParent); + result = pScreen->ValidateTree(pParent, pChild, kind); + NORMAL_ROOT(pParent); + } + + SCREEN_WRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE end\n"); + + return result; +} + + +// RootlessMarkOverlappedWindows +// MarkOverlappedWindows is modified to ignore overlapping +// top-level windows. +static Bool +RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, + WindowPtr *ppLayerWin) +{ + RegionRec saveRoot; + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS start "); + + HUGE_ROOT(pWin); + if (IsRoot(pWin)) { + // root - mark nothing + RL_DEBUG_MSG("is root not marking "); + result = FALSE; + } + else if (! IsTopLevel(pWin)) { + // not top-level window - mark normally + result = pScreen->MarkOverlappedWindows(pWin, pFirst, ppLayerWin); + } + else { + //top-level window - mark children ONLY - NO overlaps with sibs (?) + // This code copied from miMarkOverlappedWindows() + + register WindowPtr pChild; + Bool anyMarked = FALSE; + void (* MarkWindow)() = pScreen->MarkWindow; + + RL_DEBUG_MSG("is top level! "); + /* single layered systems are easy */ + if (ppLayerWin) *ppLayerWin = pWin; + + if (pWin == pFirst) { + /* Blindly mark pWin and all of its inferiors. This is a slight + * overkill if there are mapped windows that outside pWin's border, + * but it's better than wasting time on RectIn checks. + */ + pChild = pWin; + while (1) { + if (pChild->viewable) { + if (REGION_BROKEN (pScreen, &pChild->winSize)) + SetWinSize (pChild); + if (REGION_BROKEN (pScreen, &pChild->borderSize)) + SetBorderSize (pChild); + (* MarkWindow)(pChild); + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } + anyMarked = TRUE; + pFirst = pFirst->nextSib; + } + if (anyMarked) + (* MarkWindow)(pWin->parent); + result = anyMarked; + } + NORMAL_ROOT(pWin); + SCREEN_WRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS end\n"); + return result; +} + + +static void +RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) +{ + int oldBackgroundState = 0; + PixUnion oldBackground; + ScreenPtr pScreen = pWin->drawable.pScreen; + + SCREEN_UNWRAP(pScreen, PaintWindowBackground); + RL_DEBUG_MSG("paintwindowbackground start (win 0x%x) ", pWin); + if (IsFramedWindow(pWin)) { + if (IsRoot(pWin)) { + // set root background to magic transparent color + oldBackgroundState = pWin->backgroundState; + oldBackground = pWin->background; + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = 0x00fffffe; + } + } + + pScreen->PaintWindowBackground(pWin, pRegion, what); + + if (IsFramedWindow(pWin)) { + RootlessDamageRegion(pWin, pRegion); + if (IsRoot(pWin)) { + pWin->backgroundState = oldBackgroundState; + pWin->background = oldBackground; + } + } + SCREEN_WRAP(pScreen, PaintWindowBackground); + RL_DEBUG_MSG("paintwindowbackground end\n"); +} + + +static void +RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) +{ + SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); + RL_DEBUG_MSG("paintwindowborder start (win 0x%x) ", pWin); + pWin->drawable.pScreen->PaintWindowBorder(pWin, pRegion, what); + if (IsFramedWindow(pWin)) { + RootlessDamageRegion(pWin, pRegion); + } + SCREEN_WRAP(pWin->drawable.pScreen, PaintWindowBorder); + RL_DEBUG_MSG("paintwindowborder end\n"); +} + + +// Flush drawing before blocking on select(). +static void +RootlessBlockHandler(pointer pbdata, OSTimePtr pTimeout, pointer pReadmask) +{ + RootlessRedisplayScreen((ScreenPtr) pbdata); +} + + +static void +RootlessWakeupHandler(pointer data, int i, pointer LastSelectMask) +{ + // nothing here +} + + +static Bool +RootlessAllocatePrivates(ScreenPtr pScreen) +{ + RootlessScreenRec *s; + static int rootlessGeneration = -1; + + if (rootlessGeneration != serverGeneration) { + rootlessScreenPrivateIndex = AllocateScreenPrivateIndex(); + if (rootlessScreenPrivateIndex == -1) return FALSE; + rootlessGCPrivateIndex = AllocateGCPrivateIndex(); + if (rootlessGCPrivateIndex == -1) return FALSE; + rootlessWindowPrivateIndex = AllocateWindowPrivateIndex(); + if (rootlessWindowPrivateIndex == -1) return FALSE; + rootlessGeneration = serverGeneration; + } + + // no allocation needed for screen privates + if (!AllocateGCPrivate(pScreen, rootlessGCPrivateIndex, + sizeof(RootlessGCRec))) + return FALSE; + if (!AllocateWindowPrivate(pScreen, rootlessWindowPrivateIndex, 0)) + return FALSE; + + s = xalloc(sizeof(RootlessScreenRec)); + if (! s) return FALSE; + SCREENREC(pScreen) = s; + + return TRUE; +} + + +static void +RootlessWrap(ScreenPtr pScreen) +{ + RootlessScreenRec *s = (RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + +#define WRAP(a) \ + if (pScreen->a) { \ + s->a = pScreen->a; \ + } else { \ + RL_DEBUG_MSG("null screen fn " #a "\n"); \ + s->a = NULL; \ + } \ + pScreen->a = Rootless##a + + WRAP(CloseScreen); + WRAP(CreateGC); + WRAP(PaintWindowBackground); + WRAP(PaintWindowBorder); + WRAP(CopyWindow); + WRAP(GetImage); + WRAP(CreateWindow); + WRAP(DestroyWindow); + WRAP(RealizeWindow); + WRAP(UnrealizeWindow); + WRAP(MoveWindow); + WRAP(PositionWindow); + WRAP(ResizeWindow); + WRAP(RestackWindow); + WRAP(ChangeBorderWidth); + WRAP(MarkOverlappedWindows); + WRAP(ValidateTree); + WRAP(ChangeWindowAttributes); + +#ifdef SHAPE + WRAP(SetShape); +#endif + +#ifdef RENDER + { + // Composite and Glyphs don't use normal screen wrapping + PictureScreenPtr ps = GetPictureScreen(pScreen); + s->Composite = ps->Composite; + ps->Composite = RootlessComposite; + s->Glyphs = ps->Glyphs; + ps->Glyphs = RootlessGlyphs; + } +#endif + + // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? + // WRAP(RestoreAreas); fixme put this back? + +#undef WRAP +} + + +/* + * RootlessInit + * Rootless wraps lots of stuff and needs a bunch of devPrivates. + */ +Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcs *procs) +{ + RootlessScreenRec *s; + + if (! RootlessAllocatePrivates(pScreen)) return FALSE; + s = (RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + + s->pScreen = pScreen; + s->frameProcs = *procs; + + RootlessWrap(pScreen); + + if (!RegisterBlockAndWakeupHandlers (RootlessBlockHandler, + RootlessWakeupHandler, + (pointer) pScreen)) + { + return FALSE; + } + + return TRUE; +} Index: xc/programs/Xserver/hw/darwin/bundle/rootlessValTree.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessValTree.c:1.1 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessValTree.c Tue Jun 26 19:29:13 2001 @@ -0,0 +1,744 @@ +/* + * Calculate window clip lists for rootless mode + * + * This file is very closely based on mivaltree.c. + */ + /* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessValTree.c,v 1.1 2001/06/26 23:29:13 torrey Exp $ */ + +/* + * mivaltree.c -- + * Functions for recalculating window clip lists. Main function + * is miValidateTree. + * + +Copyright 1987, 1988, 1989, 1998 The Open Group + +All Rights Reserved. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + * + * Copyright 1987, 1988, 1989 by + * Digital Equipment Corporation, Maynard, Massachusetts, + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of Digital not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * + ******************************************************************/ + +/* The panoramix components contained the following notice */ +/**************************************************************** +* * +* Copyright (c) Digital Equipment Corporation, 1991, 1997 * +* * +* All Rights Reserved. Unpublished rights reserved under * +* the copyright laws of the United States. * +* * +* The software contained on this media is proprietary to * +* and embodies the confidential technology of Digital * +* Equipment Corporation. Possession, use, duplication or * +* dissemination of the software and media is authorized only * +* pursuant to a valid written license from Digital Equipment * +* Corporation. * +* * +* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * +* by the U.S. Government is subject to restrictions as set * +* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * +* or in FAR 52.227-19, as applicable. * +* * +*****************************************************************/ + + /* + * Aug '86: Susan Angebranndt -- original code + * July '87: Adam de Boor -- substantially modified and commented + * Summer '89: Joel McCormack -- so fast you wouldn't believe it possible. + * In particular, much improved code for window mapping and + * circulating. + * Bob Scheifler -- avoid miComputeClips for unmapped windows, + * valdata changes + */ +#include "X.h" +#include "scrnintstr.h" +#include "validate.h" +#include "windowstr.h" +#include "mi.h" +#include "regionstr.h" +#include "mivalidate.h" + +#include "globals.h" + +#ifdef SHAPE +/* + * Compute the visibility of a shaped window + */ +int +rootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y) + ScreenPtr pScreen; + RegionPtr universe, bounding; + BoxPtr rect; + register int x, y; +{ + BoxRec box; + register BoxPtr boundBox; + int nbox; + Bool someIn, someOut; + register int t, x1, y1, x2, y2; + + nbox = REGION_NUM_RECTS (bounding); + boundBox = REGION_RECTS (bounding); + someIn = someOut = FALSE; + x1 = rect->x1; + y1 = rect->y1; + x2 = rect->x2; + y2 = rect->y2; + while (nbox--) + { + if ((t = boundBox->x1 + x) < x1) + t = x1; + box.x1 = t; + if ((t = boundBox->y1 + y) < y1) + t = y1; + box.y1 = t; + if ((t = boundBox->x2 + x) > x2) + t = x2; + box.x2 = t; + if ((t = boundBox->y2 + y) > y2) + t = y2; + box.y2 = t; + if (box.x1 > box.x2) + box.x2 = box.x1; + if (box.y1 > box.y2) + box.y2 = box.y1; + switch (RECT_IN_REGION(pScreen, universe, &box)) + { + case rgnIN: + if (someOut) + return rgnPART; + someIn = TRUE; + break; + case rgnOUT: + if (someIn) + return rgnPART; + someOut = TRUE; + break; + default: + return rgnPART; + } + boundBox++; + } + if (someIn) + return rgnIN; + return rgnOUT; +} +#endif + +#define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ + HasBorder(w) && \ + (w)->backgroundState == ParentRelative) + + +/* + *----------------------------------------------------------------------- + * miComputeClips -- + * Recompute the clipList, borderClip, exposed and borderExposed + * regions for pParent and its children. Only viewable windows are + * taken into account. + * + * Results: + * None. + * + * Side Effects: + * clipList, borderClip, exposed and borderExposed are altered. + * A VisibilityNotify event may be generated on the parent window. + * + *----------------------------------------------------------------------- + */ +static void +rootlessComputeClips (pParent, pScreen, universe, kind, exposed) + register WindowPtr pParent; + register ScreenPtr pScreen; + register RegionPtr universe; + VTKind kind; + RegionPtr exposed; /* for intermediate calculations */ +{ + int dx, + dy; + RegionRec childUniverse; + register WindowPtr pChild; + int oldVis, newVis; + BoxRec borderSize; + RegionRec childUnion; + Bool overlap; + RegionPtr borderVisible; + Bool resized; + /* + * Figure out the new visibility of this window. + * The extent of the universe should be the same as the extent of + * the borderSize region. If the window is unobscured, this rectangle + * will be completely inside the universe (the universe will cover it + * completely). If the window is completely obscured, none of the + * universe will cover the rectangle. + */ + borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); + borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); + dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); + if (dx > 32767) + dx = 32767; + borderSize.x2 = dx; + dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); + if (dy > 32767) + dy = 32767; + borderSize.y2 = dy; + + oldVis = pParent->visibility; + switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnPART: + newVis = VisibilityPartiallyObscured; +#ifdef SHAPE + { + RegionPtr pBounding; + + if ((pBounding = wBoundingShape (pParent))) + { + switch (rootlessShapedWindowIn (pScreen, universe, + pBounding, &borderSize, + pParent->drawable.x, + pParent->drawable.y)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnOUT: + newVis = VisibilityFullyObscured; + break; + } + } + } +#endif + break; + default: + newVis = VisibilityFullyObscured; + break; + } + + pParent->visibility = newVis; + if (oldVis != newVis && + ((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) + SendVisibilityNotify(pParent); + + dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; + dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; + + /* + * avoid computations when dealing with simple operations + */ + + switch (kind) { + case VTMap: + case VTStack: + case VTUnmap: + break; + case VTMove: + if ((oldVis == newVis) && + ((oldVis == VisibilityFullyObscured) || + (oldVis == VisibilityUnobscured))) + { + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + if (pChild->visibility != VisibilityFullyObscured) + { + REGION_TRANSLATE( pScreen, &pChild->borderClip, + dx, dy); + REGION_TRANSLATE( pScreen, &pChild->clipList, + dx, dy); + pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pChild, dx, dy); + + } + if (pChild->valdata) + { + REGION_INIT(pScreen, + &pChild->valdata->after.borderExposed, + NullBox, 0); + if (HasParentRelativeBorder(pChild)) + { + REGION_SUBTRACT(pScreen, + &pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); + } + REGION_INIT( pScreen, &pChild->valdata->after.exposed, + NullBox, 0); + } + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } + return; + } + /* fall through */ + default: + /* + * To calculate exposures correctly, we have to translate the old + * borderClip and clipList regions to the window's new location so there + * is a correspondence between pieces of the new and old clipping regions. + */ + if (dx || dy) + { + /* + * We translate the old clipList because that will be exposed or copied + * if gravity is right. + */ + REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); + REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + } + break; + case VTBroken: + REGION_EMPTY (pScreen, &pParent->borderClip); + REGION_EMPTY (pScreen, &pParent->clipList); + break; + } + + borderVisible = pParent->valdata->before.borderVisible; + resized = pParent->valdata->before.resized; + REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0); + REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0); + + /* + * Since the borderClip must not be clipped by the children, we do + * the border exposure first... + * + * 'universe' is the window's borderClip. To figure the exposures, remove + * the area that used to be exposed from the new. + * This leaves a region of pieces that weren't exposed before. + */ + + if (HasBorder (pParent)) + { + if (borderVisible) + { + /* + * when the border changes shape, the old visible portions + * of the border will be saved by DIX in borderVisible -- + * use that region and destroy it + */ + REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); + REGION_DESTROY( pScreen, borderVisible); + } + else + { + REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + } + if (HasParentRelativeBorder(pParent) && (dx || dy)) { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + universe, + &pParent->winSize); + } else { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + exposed, &pParent->winSize); + } + + REGION_COPY( pScreen, &pParent->borderClip, universe); + + /* + * To get the right clipList for the parent, and to make doubly sure + * that no child overlaps the parent's border, we remove the parent's + * border from the universe before proceeding. + */ + + REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + } + else + REGION_COPY( pScreen, &pParent->borderClip, universe); + + if ((pChild = pParent->firstChild) && pParent->mapped) + { + REGION_INIT(pScreen, &childUniverse, NullBox, 0); + REGION_INIT(pScreen, &childUnion, NullBox, 0); + if ((pChild->drawable.y < pParent->lastChild->drawable.y) || + ((pChild->drawable.y == pParent->lastChild->drawable.y) && + (pChild->drawable.x < pParent->lastChild->drawable.x))) + { + for (; pChild; pChild = pChild->nextSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + else + { + for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + REGION_VALIDATE( pScreen, &childUnion, &overlap); + + for (pChild = pParent->firstChild; + pChild; + pChild = pChild->nextSib) + { + if (pChild->viewable) { + /* + * If the child is viewable, we want to remove its extents + * from the current universe, but we only re-clip it if + * it's been marked. + */ + if (pChild->valdata) { + /* + * Figure out the new universe from the child's + * perspective and recurse. + */ + REGION_INTERSECT( pScreen, &childUniverse, + universe, + &pChild->borderSize); + rootlessComputeClips (pChild, pScreen, &childUniverse, + kind, exposed); + } + /* + * Once the child has been processed, we remove its extents + * from the current universe, thus denying its space to any + * other sibling. + */ + if (overlap) + REGION_SUBTRACT( pScreen, universe, universe, + &pChild->borderSize); + } + } + if (!overlap) + REGION_SUBTRACT( pScreen, universe, universe, &childUnion); + REGION_UNINIT( pScreen, &childUnion); + REGION_UNINIT( pScreen, &childUniverse); + } /* if any children */ + + /* + * 'universe' now contains the new clipList for the parent window. + * + * To figure the exposure of the window we subtract the old clip from the + * new, just as for the border. + */ + + if (oldVis == VisibilityFullyObscured || + oldVis == VisibilityNotViewable) + { + REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + } + else if (newVis != VisibilityFullyObscured && + newVis != VisibilityNotViewable) + { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + universe, &pParent->clipList); + } + + /* + * One last thing: backing storage. We have to try to save what parts of + * the window are about to be obscured. We can just subtract the universe + * from the old clipList and get the areas that were in the old but aren't + * in the new and, hence, are about to be obscured. + */ + if (pParent->backStorage && !resized) + { + REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); + } + + /* HACK ALERT - copying contents of regions, instead of regions */ + { + RegionRec tmp; + + tmp = pParent->clipList; + pParent->clipList = *universe; + *universe = tmp; + } + +#ifdef NOTDEF + REGION_COPY( pScreen, &pParent->clipList, universe); +#endif + + pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pParent, dx, dy); +} + +static void +rootlessTreeObscured(pParent) + register WindowPtr pParent; +{ + register WindowPtr pChild; + register int oldVis; + + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + oldVis = pChild->visibility; + if (oldVis != (pChild->visibility = VisibilityFullyObscured) && + ((pChild->eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) + SendVisibilityNotify(pChild); + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } +} + +/* + *----------------------------------------------------------------------- + * miValidateTree -- + * Recomputes the clip list for pParent and all its inferiors. + * + * Results: + * Always returns 1. + * + * Side Effects: + * The clipList, borderClip, exposed, and borderExposed regions for + * each marked window are altered. + * + * Notes: + * This routine assumes that all affected windows have been marked + * (valdata created) and their winSize and borderSize regions + * adjusted to correspond to their new positions. The borderClip and + * clipList regions should not have been touched. + * + * The top-most level is treated differently from all lower levels + * because pParent is unchanged. For the top level, we merge the + * regions taken up by the marked children back into the clipList + * for pParent, thus forming a region from which the marked children + * can claim their areas. For lower levels, where the old clipList + * and borderClip are invalid, we can't do this and have to do the + * extra operations done in miComputeClips, but this is much faster + * e.g. when only one child has moved... + * + *----------------------------------------------------------------------- + */ +/* + Quartz version: used for validate from root in rootless mode. + We need to make sure top-level windows don't clip each other, + and that top-level windows aren't clipped to the root window. +*/ +/*ARGSUSED*/ +// fixme this is ugly +// Xprint/ValTree.c doesn't work, but maybe that method can? +int +rootlessMiValidateTree (pRoot, pChild, kind) + WindowPtr pRoot; /* Parent to validate */ + WindowPtr pChild; /* First child of pRoot that was + * affected */ + VTKind kind; /* What kind of configuration caused call */ +{ + RegionRec totalClip; /* Total clipping region available to + * the marked children. pRoot's clipList + * merged with the borderClips of all + * the marked children. */ + RegionRec childClip; /* The new borderClip for the current + * child */ + RegionRec childUnion; /* the space covered by borderSize for + * all marked children */ + RegionRec exposed; /* For intermediate calculations */ + register ScreenPtr pScreen; + register WindowPtr pWin; + Bool overlap; + int viewvals; + Bool forward; + + pScreen = pRoot->drawable.pScreen; + if (pChild == NullWindow) + pChild = pRoot->firstChild; + + REGION_INIT(pScreen, &childClip, NullBox, 0); + REGION_INIT(pScreen, &exposed, NullBox, 0); + + /* + * compute the area of the parent window occupied + * by the marked children + the parent itself. This + * is the area which can be divied up among the marked + * children in their new configuration. + */ + REGION_INIT(pScreen, &totalClip, NullBox, 0); + viewvals = 0; + if (REGION_BROKEN (pScreen, &pRoot->clipList) && + !REGION_BROKEN (pScreen, &pRoot->borderClip)) + { + kind = VTBroken; + /* + * When rebuilding clip lists after out of memory, + * assume everything is busted. + */ + forward = TRUE; + REGION_COPY (pScreen, &totalClip, &pRoot->borderClip); + REGION_INTERSECT (pScreen, &totalClip, &totalClip, &pRoot->winSize); + + for (pWin = pRoot->firstChild; pWin != pChild; pWin = pWin->nextSib) + { + if (pWin->viewable) + REGION_SUBTRACT (pScreen, &totalClip, &totalClip, &pWin->borderSize); + } + for (pWin = pChild; pWin; pWin = pWin->nextSib) + if (pWin->valdata && pWin->viewable) + viewvals++; + + REGION_EMPTY (pScreen, &pRoot->clipList); + ErrorF("ValidateTree: BUSTED!\n"); + } + else + { + if ((pChild->drawable.y < pRoot->lastChild->drawable.y) || + ((pChild->drawable.y == pRoot->lastChild->drawable.y) && + (pChild->drawable.x < pRoot->lastChild->drawable.x))) + { + forward = TRUE; + for (pWin = pChild; pWin; pWin = pWin->nextSib) + { + if (pWin->valdata) + { + REGION_APPEND( pScreen, &totalClip, &pWin->borderClip); + if (pWin->viewable) + viewvals++; + } + } + } + else + { + forward = FALSE; + pWin = pRoot->lastChild; + while (1) + { + if (pWin->valdata) + { + REGION_APPEND( pScreen, &totalClip, &pWin->borderClip); + if (pWin->viewable) + viewvals++; + } + if (pWin == pChild) + break; + pWin = pWin->prevSib; + } + } + REGION_VALIDATE( pScreen, &totalClip, &overlap); + } + + + // calculate childUnion so we can subtract it from totalClip later + REGION_INIT(pScreen, &childUnion, NullBox, 0); + if (kind != VTStack) { + if (forward) + { + for (pWin = pChild; pWin; pWin = pWin->nextSib) + if (pWin->valdata && pWin->viewable) + REGION_APPEND( pScreen, &childUnion, + &pWin->borderSize); + } + else + { + pWin = pRoot->lastChild; + while (1) + { + if (pWin->valdata && pWin->viewable) + REGION_APPEND( pScreen, &childUnion, + &pWin->borderSize); + if (pWin == pChild) + break; + pWin = pWin->prevSib; + } + } + REGION_VALIDATE(pScreen, &childUnion, &overlap); + } + + + /* + * Now go through the children of the root and figure their new + * borderClips from the totalClip, passing that off to miComputeClips + * to handle recursively. Once that's done, we remove the child + * from the totalClip to clip any siblings below it. + */ + + for (pWin = pChild; + pWin != NullWindow; + pWin = pWin->nextSib) + { + if (pWin->viewable) { + if (pWin->valdata) { + REGION_COPY( pScreen, &childClip, &pWin->borderSize); + rootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed); + } else if (pWin->visibility == VisibilityNotViewable) { + rootlessTreeObscured(pWin); + } + } else { + if (pWin->valdata) { + REGION_EMPTY( pScreen, &pWin->clipList); + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pWin, 0, 0); + REGION_EMPTY( pScreen, &pWin->borderClip); + pWin->valdata = (ValidatePtr)NULL; + } + } + } + + REGION_UNINIT( pScreen, &childClip); + + // REGION_SUBTRACT(pScreen, &totalClip, &totalClip, &childUnion); + REGION_UNINIT(pScreen, &childUnion); + + REGION_INIT( pScreen, &pRoot->valdata->after.exposed, NullBox, 0); + REGION_INIT( pScreen, &pRoot->valdata->after.borderExposed, NullBox, 0); + + + REGION_UNINIT( pScreen, &totalClip); + REGION_UNINIT( pScreen, &exposed); + //if (pScreen->ClipNotify) + //(*pScreen->ClipNotify) (pRoot, 0, 0); + return (1); +} Index: xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.c diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.c:1.9 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.c Sat Dec 22 00:28:35 2001 @@ -0,0 +1,674 @@ +/* + * Rootless window management + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.c,v 1.9 2001/12/22 05:28:35 torrey Exp $ */ + +#include "rootlessCommon.h" +#include "rootlessWindow.h" + +#include "fb.h" + + +// RootlessCreateWindow +// For now, don't create a frame until the window is realized. +// Do reset the window size so it's not clipped by the root window. +Bool +RootlessCreateWindow(WindowPtr pWin) +{ + Bool result; + RegionRec saveRoot; + + WINREC(pWin) = NULL; + SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow); + if (!IsRoot(pWin)) { + // win/border size set by DIX, not by wrapped CreateWindow, so + // correct it here. + // Don't HUGE_ROOT when pWin is the root! + HUGE_ROOT(pWin); + SetWinSize(pWin); + SetBorderSize(pWin); + } + result = pWin->drawable.pScreen->CreateWindow(pWin); + if (pWin->parent) { + NORMAL_ROOT(pWin); + } + SCREEN_WRAP(pWin->drawable.pScreen, CreateWindow); + return result; +} + + +// RootlessDestroyWindow +// For now, all window destruction takes place in UnrealizeWindow +Bool +RootlessDestroyWindow(WindowPtr pWin) +{ + Bool result; + + SCREEN_UNWRAP(pWin->drawable.pScreen, DestroyWindow); + result = pWin->drawable.pScreen->DestroyWindow(pWin); + SCREEN_WRAP(pWin->drawable.pScreen, DestroyWindow); + return result; +} + + +#ifdef SHAPE + +// RootlessSetShape +// Shape is usually set before the window is mapped, but (for now) we +// don't keep track of frames before they're mapped. So we just record +// that the shape needs to updated later. +void +RootlessSetShape(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + RootlessDamageShape(pWin); + SCREEN_UNWRAP(pScreen, SetShape); + pScreen->SetShape(pWin); + SCREEN_WRAP(pScreen, SetShape); +} + +#endif // SHAPE + + +// Disallow ParentRelative background on top-level windows +// because the root window doesn't really have the right background +// and cfb will try to draw on the root instead of on the window. +// fixme what about fb? +// fixme implement ParentRelative with real transparency? +// ParentRelative prevention is also in RealizeWindow() +Bool +RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("change window attributes start "); + + SCREEN_UNWRAP(pScreen, ChangeWindowAttributes); + result = pScreen->ChangeWindowAttributes(pWin, vmask); + SCREEN_WRAP(pScreen, ChangeWindowAttributes); + + if (WINREC(pWin)) { + // disallow ParentRelative background state + if (pWin->backgroundState == ParentRelative) { + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + } + } + + RL_DEBUG_MSG("change window attributes end\n"); + return result; +} + + +// Update the frame position now. +// (x, y) are *inside* position! +// After this, mi and fb are expecting the pixmap to be at the new location. +Bool +RootlessPositionWindow(WindowPtr pWin, int x, int y) +{ + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + Bool result; + + RL_DEBUG_MSG("positionwindow start\n"); + if (winRec) { + winRec->frame.x = x - pWin->borderWidth; + winRec->frame.y = y - pWin->borderWidth; + } + + UpdatePixmap(pWin); + + SCREEN_UNWRAP(pScreen, PositionWindow); + result = pScreen->PositionWindow(pWin, x, y); + SCREEN_WRAP(pScreen, PositionWindow); + + RL_DEBUG_MSG("positionwindow end\n"); + return result; +} + + +// RootlessRealizeWindow +// The frame is created here and not in CreateWindow. +// fixme change this? probably not - would be faster, but eat more memory +Bool +RootlessRealizeWindow(WindowPtr pWin) +{ + Bool result = FALSE; + RegionRec saveRoot; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("realizewindow start "); + + if (IsTopLevel(pWin) || IsRoot(pWin)) { + DrawablePtr d = &pWin->drawable; + RootlessWindowRec *winRec = xalloc(sizeof(RootlessWindowRec)); + + if (! winRec) goto windowcreatebad; + + winRec->frame.isRoot = (pWin == WindowTable[pScreen->myNum]); + winRec->frame.x = d->x - pWin->borderWidth; + winRec->frame.y = d->y - pWin->borderWidth; + winRec->frame.w = d->width + 2*pWin->borderWidth; + winRec->frame.h = d->height + 2*pWin->borderWidth; + winRec->frame.win = pWin; + winRec->frame.devPrivate = NULL; + + REGION_INIT(pScreen, &winRec->damage, NullBox, 0); + winRec->borderWidth = pWin->borderWidth; + + winRec->pixmap = NULL; + // UpdatePixmap() called below + + WINREC(pWin) = winRec; + + RL_DEBUG_MSG("creating frame "); + CallFrameProc(pScreen, CreateFrame, + (pScreen, &WINREC(pWin)->frame, + pWin->prevSib ? &WINREC(pWin->prevSib)->frame : NULL)); + + // fixme implement ParentRelative with transparency? + // need non-interfering fb first + // Disallow ParentRelative background state + // This might have been set before the window was mapped + if (pWin->backgroundState == ParentRelative) { + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + } + +#ifdef SHAPE + // Shape is usually set before the window is mapped, but + // (for now) we don't keep track of frames before they're mapped. + winRec->shapeDamage = TRUE; +#endif + } + + UpdatePixmap(pWin); + + if (!IsRoot(pWin)) HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, RealizeWindow); + result = pScreen->RealizeWindow(pWin); + SCREEN_WRAP(pScreen, RealizeWindow); + if (!IsRoot(pWin)) NORMAL_ROOT(pWin); + + RL_DEBUG_MSG("realizewindow end\n"); + return result; + +windowcreatebad: + RL_DEBUG_MSG("window create bad! "); + RL_DEBUG_MSG("realizewindow end\n"); + return NULL; +} + + +Bool +RootlessUnrealizeWindow(WindowPtr pWin) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("unrealizewindow start "); + + if (IsTopLevel(pWin) || IsRoot(pWin)) { + RootlessWindowRec *winRec = WINREC(pWin); + + RootlessRedisplay(pWin); + CallFrameProc(pScreen, DestroyFrame, (pScreen, &winRec->frame)); + + REGION_UNINIT(pScreen, &winRec->damage); + + xfree(winRec); + WINREC(pWin) = NULL; + } + + SCREEN_UNWRAP(pScreen, UnrealizeWindow); + result = pScreen->UnrealizeWindow(pWin); + SCREEN_WRAP(pScreen, UnrealizeWindow); + RL_DEBUG_MSG("unrealizewindow end\n"); + return result; +} + + +void +RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) +{ + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("restackwindow start "); + if (winRec) RL_DEBUG_MSG("restack top level \n"); + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, RestackWindow); + if (pScreen->RestackWindow) pScreen->RestackWindow(pWin, pOldNextSib); + SCREEN_WRAP(pScreen, RestackWindow); + NORMAL_ROOT(pWin); + + if (winRec) { + // fixme simplify the following + + WindowPtr oldNextW, newNextW, oldPrevW, newPrevW; + RootlessFramePtr oldNext, newNext, oldPrev, newPrev; + + oldNextW = pOldNextSib; + while (oldNextW && ! WINREC(oldNextW)) oldNextW = oldNextW->nextSib; + oldNext = oldNextW ? &WINREC(oldNextW)->frame : NULL; + + newNextW = pWin->nextSib; + while (newNextW && ! WINREC(newNextW)) newNextW = newNextW->nextSib; + newNext = newNextW ? &WINREC(newNextW)->frame : NULL; + + oldPrevW= pOldNextSib ? pOldNextSib->prevSib : pWin->parent->lastChild; + while (oldPrevW && ! WINREC(oldPrevW)) oldPrevW = oldPrevW->prevSib; + oldPrev = oldPrevW ? &WINREC(oldPrevW)->frame : NULL; + + newPrevW = pWin->prevSib; + while (newPrevW && ! WINREC(newPrevW)) newPrevW = newPrevW->prevSib; + newPrev = newPrevW ? &WINREC(newPrevW)->frame : NULL; + + if (pWin->prevSib) { + WindowPtr w = pWin->prevSib; + while (w) { + RL_DEBUG_MSG("w 0x%x\n", w); + w = w->parent; + } + } + + CallFrameProc(pScreen, RestackFrame, + (pScreen, &winRec->frame, oldPrev, newPrev)); + } + + RL_DEBUG_MSG("restackwindow end\n"); +} + + +/* + * Specialized window copy procedures + */ + +// Globals needed during window resize and move. +static PixmapPtr gResizeDeathPix = NULL; +static pointer gResizeDeathBits = NULL; +static PixmapPtr gResizeCopyWindowSource = NULL; +static CopyWindowProcPtr gResizeOldCopyWindowProc = NULL; + +// CopyWindow() that doesn't do anything. +// For MoveWindow() of top-level windows. +static void +RootlessNoCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + // some code expects the region to be translated + int dx = ptOldOrg.x - pWin->drawable.x; + int dy = ptOldOrg.y - pWin->drawable.y; + RL_DEBUG_MSG("ROOTLESSNOCOPYWINDOW "); + + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); +} + + +// CopyWindow used during ResizeWindow for gravity moves. +// Cloned from fbCopyWindow +// The original always draws on the root pixmap (which we don't have). +// Instead, draw on the parent window's pixmap. +// Resize version: the old location's pixels are in gResizeCopyWindowSource +static void +RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("resizecopywindowFB start (win 0x%x) ", pWin); + + { + RegionRec rgnDst; + int dx, dy; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + REGION_INIT (pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + fbCopyRegion (&gResizeCopyWindowSource->drawable, + &pScreen->GetWindowPixmap(pWin)->drawable, + 0, + &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + // don't update - resize will update everything + // fixme DO update? + REGION_UNINIT(pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); + } + + SCREEN_WRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("resizecopywindowFB end\n"); +} + + +/* Update *new* location of window. Old location is redrawn with + * PaintWindowBackground/Border. + * Cloned from fbCopyWindow + * The original always draws on the root pixmap (which we don't have). + * Instead, draw on the parent window's pixmap. + */ +void +RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("copywindowFB start (win 0x%x) ", pWin); + + { + RegionRec rgnDst; + int dx, dy; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + + REGION_INIT(pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + fbCopyRegion ((DrawablePtr)pWin, (DrawablePtr)pWin, + 0, + &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + // prgnSrc has been translated to dst position + RootlessDamageRegion(pWin, prgnSrc); + REGION_UNINIT(pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); + } + + SCREEN_WRAP(pScreen, CopyWindow); + RL_DEBUG_MSG("copywindowFB end\n"); +} + + +/* + * Window resize procedures + */ + +// Prepare to resize a window. +// The old window's pixels are saved and the implementation is told +// to change the window size. +// (x,y,w,h) is outer frame of window (outside border) +static void +StartFrameResize(WindowPtr pWin, Bool gravity, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH, unsigned int oldBW, + int newX, int newY, + unsigned int newW, unsigned int newH, unsigned int newBW) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + + RL_DEBUG_MSG("RESIZE TOPLEVEL WINDOW "); + RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d ", + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + + RootlessRedisplay(pWin); + + // Make a copy of the current pixmap and all its data. + // The original will go away when we ask the frame manager to + // allocate the new pixmap. + + gResizeDeathBits = xalloc(winRec->frame.bytesPerRow * winRec->frame.h); + memcpy(gResizeDeathBits, winRec->frame.pixelData, + winRec->frame.bytesPerRow * winRec->frame.h); + gResizeDeathPix = + GetScratchPixmapHeader(pScreen, winRec->frame.w, winRec->frame.h, + winRec->frame.depth, winRec->frame.bitsPerPixel, + winRec->frame.bytesPerRow, gResizeDeathBits); + SetPixmapBaseToScreen(gResizeDeathPix, winRec->frame.x, winRec->frame.y); + + winRec->frame.x = newX; + winRec->frame.y = newY; + winRec->frame.w = newW; + winRec->frame.h = newH; + winRec->borderWidth = newBW; + + CallFrameProc(pScreen, StartResizeFrame, + (pScreen, &winRec->frame, oldX, oldY, oldW, oldH)); + UpdatePixmap(pWin); + + // Use custom CopyWindow when moving gravity bits around + // ResizeWindow assumes the old window contents are in the same + // pixmap, but here they're in deathPix instead. + if (gravity) { + gResizeCopyWindowSource = gResizeDeathPix; + gResizeOldCopyWindowProc = pScreen->CopyWindow; + pScreen->CopyWindow = RootlessResizeCopyWindow; + } + + // Copy pixels in intersection from src to dst. + // ResizeWindow assumes these pixels are already present when + // making gravity adjustments. + // pWin currently has new-sized pixmap but is in old position + // fixme border width change! + { + RegionRec r; + DrawablePtr src = &gResizeDeathPix->drawable; + DrawablePtr dst = &pScreen->GetWindowPixmap(pWin)->drawable; + // These vars are needed because implicit unsigned->signed fails + int oldX2 = (int)(oldX + oldW), newX2 = (int)(newX + newW); + int oldY2 = (int)(oldY + oldH), newY2 = (int)(newY + newH); + + r.data = NULL; + r.extents.x1 = max(oldX, newX); + r.extents.y1 = max(oldY, newY); + r.extents.x2 = min(oldX2, newX2); + r.extents.y2 = min(oldY2, newY2); + + // r is now intersection of of old location and new location + if (r.extents.x2 > r.extents.x1 && r.extents.y2 > r.extents.y1) { +#if 0 + DDXPointRec srcPt = {r.extents.x1, r.extents.y1}; + // Correct for border width change + // fixme need to correct for border width change + int dx = newX - oldX; + int dy = newY - oldY; + REGION_TRANSLATE(pScreen, &r, dx, dy); +#endif + fbCopyRegion(src, dst, NULL, &r, 0, 0, fbCopyWindowProc, 0, 0); + } + REGION_UNINIT(pScreen, &r); + } +} + + +static void +FinishFrameResize(WindowPtr pWin, Bool gravity, + int oldX, int oldY, + unsigned int oldW, unsigned int oldH, unsigned int oldBW, + int newX, int newY, + unsigned int newW, unsigned int newH, unsigned int newBW) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + + CallFrameProc(pScreen, FinishResizeFrame, + (pScreen, &winRec->frame, oldX, oldY, oldW, oldH)); + if (wBoundingShape(pWin)) { + RootlessDamageShape(pWin); + } + + // Destroy temp pixmap + FreeScratchPixmapHeader(gResizeDeathPix); + xfree(gResizeDeathBits); + gResizeDeathPix = gResizeDeathBits = NULL; + + if (gravity) { + pScreen->CopyWindow = gResizeOldCopyWindowProc; + gResizeCopyWindowSource = NULL; + } +} + + +// If kind==VTOther, window border is resizing (and borderWidth is +// already changed!!@#$) This case works like window resize, not move. +void +RootlessMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +{ + CopyWindowProcPtr oldCopyWindowProc = NULL; + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0, newW = 0, newH = 0, newBW = 0; + + RL_DEBUG_MSG("movewindow start \n"); + + if (winRec) { + if (kind == VTMove) { + oldX = winRec->frame.x; + oldY = winRec->frame.y; + RootlessRedisplay(pWin); + } else { + RL_DEBUG_MSG("movewindow border resizing "); + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + newBW = pWin->borderWidth; + newX = x; + newY = y; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, MoveWindow); + if (winRec) { + oldCopyWindowProc = pScreen->CopyWindow; + pScreen->CopyWindow = RootlessNoCopyWindow; + } + pScreen->MoveWindow(pWin, x, y, pSib, kind); + if (winRec) { + pScreen->CopyWindow = oldCopyWindowProc; + } + NORMAL_ROOT(pWin); + SCREEN_WRAP(pScreen, MoveWindow); + + if (winRec) { + if (kind == VTMove) { + // PositionWindow has already set the new frame position. + CallFrameProc(pScreen, MoveFrame, + (pScreen, &winRec->frame, oldX, oldY)); + } else { + FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + + RL_DEBUG_MSG("movewindow end\n"); +} + + +// Note: (x, y, w, h) as passed to this procedure don't match +// the frame definition. +// (x,y) is corner of very outer edge, *outside* border +// w,h is width and height *inside8 border, *ignoring* border width +// The rect (x, y, w, h) doesn't mean anything. +// (x, y, w+2*bw, h+2*bw) is total rect +// (x+bw, y+bw, w, h) is inner rect + +void +RootlessResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib) +{ + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0, newW = 0, newH = 0, newBW = 0; + + RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin); + + if (winRec) { + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + + newBW = oldBW; + newX = x; + newY = y; + newW = w + 2*newBW; + newH = h + 2*newBW; + + StartFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, ResizeWindow); + pScreen->ResizeWindow(pWin, x, y, w, h, pSib); + SCREEN_WRAP(pScreen, ResizeWindow); + NORMAL_ROOT(pWin); + + if (winRec) { + FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + RL_DEBUG_MSG("resizewindow end\n"); +} + + +// fixme untested! +// pWin inside corner stays the same +// pWin->drawable.[xy] stays the same +// frame moves and resizes +void +RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) +{ + RegionRec saveRoot; + + RL_DEBUG_MSG("change border width "); + if (width != pWin->borderWidth) { + RootlessWindowRec *winRec = WINREC(pWin); + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0; + unsigned int newW = 0, newH = 0, newBW = 0; + + if (winRec) { + oldBW = winRec->borderWidth; + oldX = winRec->frame.x; + oldY = winRec->frame.y; + oldW = winRec->frame.w; + oldH = winRec->frame.h; + + newBW = width; + newX = pWin->drawable.x - newBW; + newY = pWin->drawable.y - newBW; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + + StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pWin->drawable.pScreen, ChangeBorderWidth); + pWin->drawable.pScreen->ChangeBorderWidth(pWin, width); + SCREEN_WRAP(pWin->drawable.pScreen, ChangeBorderWidth); + NORMAL_ROOT(pWin); + + if (winRec) { + FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + RL_DEBUG_MSG("change border width end\n"); +} Index: xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.h diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.h:1.1 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.h Sat Jun 30 22:13:41 2001 @@ -0,0 +1,32 @@ +/* + * Rootless window management + * + * Greg Parker gparker@cs.stanford.edu + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/rootlessWindow.h,v 1.1 2001/07/01 02:13:41 torrey Exp $ */ + +#ifndef _ROOTLESSWINDOW_H +#define _ROOTLESSWINDOW_H + +#include "rootlessCommon.h" + + +Bool RootlessCreateWindow(WindowPtr pWin); +Bool RootlessDestroyWindow(WindowPtr pWin); + +#ifdef SHAPE +void RootlessSetShape(WindowPtr pWin); +#endif // SHAPE + +Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); +Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); +Bool RootlessRealizeWindow(WindowPtr pWin); +Bool RootlessUnrealizeWindow(WindowPtr pWin); +void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib); +void RootlessCopyWindow(WindowPtr pWin,DDXPointRec ptOldOrg,RegionPtr prgnSrc); +void RootlessMoveWindow(WindowPtr pWin,int x,int y,WindowPtr pSib,VTKind kind); +void RootlessResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib); +void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); + +#endif Index: xc/programs/Xserver/hw/darwin/bundle/startXClients.cpp diff -u /dev/null xc/programs/Xserver/hw/darwin/bundle/startXClients.cpp:1.1 --- /dev/null Fri Jan 18 15:24:34 2002 +++ xc/programs/Xserver/hw/darwin/bundle/startXClients.cpp Thu Oct 18 01:03:42 2001 @@ -0,0 +1,24 @@ +XCOMM!/bin/sh + +XCOMM This script is used by XDarwin to start X clients when XDarwin is +XCOMM launched from the Finder. +XCOMM +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/startXClients.cpp,v 1.1 2001/10/18 05:03:42 torrey Exp $ + +userclientrc=$HOME/.xinitrc +sysclientrc=XINITDIR/xinitrc +clientargs="" + +if [ -f $userclientrc ]; then + clientargs=$userclientrc +else if [ -f $sysclientrc ]; then + clientargs=$sysclientrc +fi +fi + +if [ "x$2" != "x" ]; then + PATH="$PATH:$2" + export PATH +fi + +exec xinit $clientargs -- XBINDIR/XDarwinStartup "$1" -idle Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf diff -u xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf:1.1.2.2 xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf:1.6 --- xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf:1.1.2.2 Wed May 30 01:52:32 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/Credits.rtf Thu Jan 10 00:25:36 2002 @@ -5,7 +5,69 @@ \vieww5160\viewh4480\viewkind0 \pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\f0\b\fs24 \cf0 XonX Team Members\ +\f0\b\fs24 \cf0 XonX Contributors to XFree86 4.2: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f1\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f1\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f1\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f1\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f1\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f1\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f1\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f1\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f1\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f1\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f1\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ Contributing to XFree86 4.1: \f1\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural @@ -21,7 +83,7 @@ \f2\i Cocoa version of XDarwin front end \f1\i0 \ -Gregory Robert Parker\ +Greg Parker\ \f2\i Original Quartz implementation \f1\i0 \ @@ -59,4 +121,4 @@ \f1\i0 \ Torrey T. Lyons\ -\f2\i Integration into XFree86 Project for 4.0.2} +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile diff -u xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile:1.1.2.1 xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile:1.2 --- xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile:1.1.2.1 Mon May 21 00:56:07 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile Sun Nov 4 02:09:47 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Imakefile,v 1.2 2001/11/04 07:09:47 torrey Exp $ #include @@ -6,14 +6,18 @@ VERS = XFree86VersionString DATE = XFree86DateString -XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) \ - -DXF86_COPYRIGHT='"XFree86 $(VERS)\nCopyright 2001 XFree86 Project, Inc."' +XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) AllTarget(XDarwinHelp.html) CppFileTarget(XDarwinHelp.html,XDarwinHelp.html.cpp,$(XF86_DEFS), \ NullParameter) AllTarget(InfoPlist.strings) -CppFileTarget(InfoPlist.strings,InfoPlist.strings.cpp,$(XF86_DEFS), \ - NullParameter) +InfoPlist.strings: InfoPlist.strings.cpp + RemoveFile($@) + ClearmakeOSName \ + $(CPP) CppNoLineInfoOption $(XF86_DEFS) $@ +clean:: + RemoveFiles(InfoPlist.strings) Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp diff -u xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp:1.1.2.1 xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp:1.2 --- xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp:1.1.2.1 Mon May 21 00:56:07 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp Sun Nov 4 02:09:47 2001 @@ -1,5 +1,5 @@ /* English localized versions of Info.plist keys. */ /* Most of these are set in the target application settings. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp,v 1.2 2001/11/04 07:09:47 torrey Exp $ */ -NSHumanReadableCopyright = XF86_COPYRIGHT +NSHumanReadableCopyright = __quote__XFree86 XF86_VERSION\nCopyright 2001 XFree86 Project, Inc.__quote__ Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings diff -u xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings:1.1 xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings:1.2 --- xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings:1.1 Tue Mar 27 15:42:39 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings Tue Nov 27 02:07:33 2001 @@ -1,11 +1,11 @@ /* English localized versions of strings used by the Mac OS X front end. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings,v 1.1 2001/03/27 20:42:39 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/English.lproj/Localizable.strings,v 1.2 2001/11/27 07:07:33 torrey Exp $ */ /* Title of alert panel */ "Quit X server?" = "Quit X server?"; /* Text of alert panel */ -"Quitting the X server will terminate any running X Window programs." = "Quitting the X server will terminate any running X Window programs."; +"Quitting the X server will terminate any running X Window System programs." = "Quitting the X server will terminate any running X Window System programs."; /* Quit */ "Quit" = "Quit"; Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp diff -u xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp:1.1.2.1 xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp:1.2 --- xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp:1.1.2.1 Mon May 21 00:56:07 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp Sun Nov 4 02:02:28 2001 @@ -1,4 +1,4 @@ - + #include "xf86Version.h" #ifndef PRE_RELEASE @@ -35,34 +35,47 @@

This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
+

Usage

XFree86 is a freely redistributable open-source implementation of the X Window System produced by the XFree86 Project, Inc. XFree86 runs on Mac OS X in full screen mode. When the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, just click on the XDarwin icon in the floating switch window to switch back to the X window system. You can change this behavior in the user preferences so that clicking on the XDarwin icon in the Dock switches as well.

+="http://www.x.org/">X Window System produced by the XFree86 Project, Inc. The X window server for Darwin and Mac OS X provided by XFree86 is called XDarwin. XDarwin runs on Mac OS X in full screen or rootless modes.

+

In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)

+

In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.

Multi-Button Mouse Emulation

-

Many X11 applications rely on the use of a 3-button mouse. To emulate a 3-button mouse with a single button, select "Enable emulation of multiple mouse buttons" in the Preferences. When emulating a 3-button mouse, holding down the left command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the left option key and clicking will simulate the third button.

-

Notes:

-
    -
  • With most keyboards the left and right command and option keys are not differentiated so either will work. -
  • Even with command and/or option keys mapped to some other key with xmodmap, you still must use the original command and option keys for multibutton mouse emulation. -
  • The only way to simulate holding down the left command key and clicking the second mouse button is to map some other key to be the left command key. The same is true for simulating holding down the left option key and clicking the third mouse button. -
+

Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.

+

Setting Your Path

-

The X11 binaries are located in /usr/X11R6/bin, which you may need to add to your path. Your path is the list of directories to be searched for executable commands. The way to do this depends on the shell you are using. The following directions are for tcsh, which is the default shell on Darwin and Mac OS X.

-

You can check your path by typing "printenv PATH". You should see /usr/X11R6/bin listed as one of the directories. If not, you should add it to your default path. To do so, you can add the following line to the file ~/Library/init/tcsh/path: (You may need to create this file and directory path if it does not exist already.)

-
setenv PATH "${PATH}:/usr/X11R6/bin"
-

Note that if you have created a .cshrc or .tcshrc file, these files will override your settings in ~/Library/init/tcsh/ and you will need to change one of these files instead. These changes will not take effect until you open a new Terminal window. You may also want to add the man pages from XFree86 to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

+

Your path is the list of directories to be searched for executable commands. The X11 commands are located in /usr/X11R6/bin, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.

+

More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.

+

In addition you may also want to add the man pages from XFree86 to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

+

User Preferences

-

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed under Startup Options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

+

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

+

General

    -
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • -
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as X11 bell. When disabled (default) a simple tone is used.
  • -
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • -
  • Show help on startup: This will show the introductory splash screen when XDarwin is launched.
  • -
  • Display number: This sets what X display number XDarwin should assign to the display. Note that XDarwin always takes over the main display when showing X11.
  • -
  • Keymapping: By default, XDarwin loads the keymapping from the Darwin kernel on startup. On portables, this keymapping is sometimes empty so that the keyboard will appear to be dead in X11. If "Load from file" is selected, XDarwin will load the keymapping from the specified file instead.
  • +
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.
  • +
  • Allow X11 to change mouse acceleration: In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.
  • +
  • Multi-Button Mouse Emulation: This is described above under Usage. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.
+

Start Up

+
    +
  • Default Mode: If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.
  • +
  • Show mode pick panel on startup: By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.
  • +
  • X11 Display number: X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.
  • +
  • Allow Xinerama multiple monitor support: XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.
  • +
  • Keymapping File: A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in /System/Library/Keyboards.
  • +
  • Starting First X11 Clients: When XDarwin is started from the Finder, it will run xinit to launch the X window manager and other X clients. (See "man xinit" for more information.) Before XDarwin runs xinit it will add the specified directories to the user's path. By default only /usr/X11R6/bin is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.
  • +
+

Full Screen

+
    +
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • +
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • +
  • Show help on startup: This will show an introductory splash screen when XDarwin is started in full screen mode.
  • +
  • Color bit depth: In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.
  • +
+

License

-The XFree86 Project is committed to providing freely redistributable binary and source releases. The main license we use is one based on the traditional MIT X11 / X Consortium License, which doesn't impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please see the XFree86 +The XFree86 Project is committed to providing freely redistributable binary and source releases. The main license we use is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please see the XFree86 License page.

X Consortium License

Copyright (C) 1996 X Consortium

Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib diff -u xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib:1.5 xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib:1.9 --- xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib:1.5 Wed May 9 03:16:20 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib Sat Oct 27 23:33:09 2001 @@ -11,16 +11,24 @@ CLASS = Preferences; LANGUAGE = ObjC; OUTLETS = { - displayNumber = id; + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; dockSwitchButton = id; fakeButton = id; - keyField = id; keymapFileField = id; - loadKeymapFileButton = id; - pickKeymapFileButton = id; - splashStartupHelpButton = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; startupHelpButton = id; + switchKeyButton = id; systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; window = id; }; SUPERCLASS = NSObject; @@ -32,12 +40,23 @@ SUPERCLASS = NSApplication; }, { - ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; showAction = id; }; + ACTIONS = { + closeHelpAndShow = id; + showAction = id; + startFullScreen = id; + startRootless = id; + }; CLASS = Xserver; LANGUAGE = ObjC; - OUTLETS = {helpWindow = id; startupHelpButton = id; switchWindow = id; }; + OUTLETS = { + helpWindow = id; + modeWindow = id; + startupHelpButton = id; + startupModeButton = id; + switchWindow = id; + }; SUPERCLASS = NSObject; } ); IBVersion = 1; -} \ No newline at end of file +} Index: xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib diff -u xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib:1.4 xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib:removed --- xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib:1.4 Wed May 9 03:16:20 2001 +++ xc/programs/Xserver/hw/darwin/bundle/English.lproj/MainMenu.nib/info.nib Fri Jan 18 15:24:35 2002 @@ -1,34 +0,0 @@ - - - - - IBDocumentLocation - 20 11 367 304 0 4 800 574 - IBMainMenuLocation - 20 320 285 44 0 4 800 574 - IBUserGuides - - Help Window - - guideLocations - - guidesLocked - NO - - Pref Window - - guideLocations - - guidesLocked - NO - - X Panel - - guideLocations - - guidesLocked - NO - - - - Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf diff -u xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf:1.2.2.2 xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf:1.7 --- xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf:1.2.2.2 Wed May 30 01:52:32 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Credits.rtf Thu Jan 10 00:25:37 2002 @@ -5,7 +5,69 @@ \vieww5160\viewh4480\viewkind0 \pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\f0\b\fs24 \cf0 XonX Team Members\ +\f0\b\fs24 \cf0 XonX Contributors to XFree86 4.2: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Rob Braun\ + +\f2\i Darwin x86 support +\f1\i0 \ +Pablo Di Noto\ + +\f2\i Spanish localization +\f1\i0 \ +Paul Edens\ + +\f2\i Dutch localization +\f1\i0 \ +Kyunghwan Kim\ + +\f2\i Korean localization +\f1\i0 \ +Mario Klebsch\ + +\f2\i Non-US keyboard support +\f1\i0 \ +Torrey T. Lyons\ + +\f2\i Project Lead +\f1\i0 \ +Andreas Monitzer\ + +\f2\i German localization +\f1\i0 \ +Patrik Montgomery\ + +\f2\i Swedish localization +\f1\i0 \ +Greg Parker\ + +\f2\i Rootless support +\f1\i0 \ +Toshimitsu Tanaka\ + +\f2\i Japanese localization +\f1\i0 \ +Olivier Verdier\ + +\f2\i French localization +\f1\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 Special Thanks: +\f1\b0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 Devin Poolman and Zero G Software, Inc.\ + +\f2\i Installer +\f1\i0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0\b \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc +\cf0 XonX Team Members\ Contributing to XFree86 4.1: \f1\b0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural @@ -21,7 +83,7 @@ \f2\i Cocoa version of XDarwin front end \f1\i0 \ -Gregory Robert Parker\ +Greg Parker\ \f2\i Original Quartz implementation \f1\i0 \ @@ -59,4 +121,4 @@ \f1\i0 \ Torrey T. Lyons\ -\f2\i Integration into XFree86 Project for 4.0.2} +\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile diff -u xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile:1.1.2.1 xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile:1.2 --- xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile:1.1.2.1 Mon May 21 00:56:07 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile Sun Nov 4 02:09:48 2001 @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/Imakefile,v 1.2 2001/11/04 07:09:48 torrey Exp $ #include @@ -6,14 +6,18 @@ VERS = XFree86VersionString DATE = XFree86DateString -XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) \ - -DXF86_COPYRIGHT='"XFree86 $(VERS)\nCopyright 2001 XFree86 Project, Inc."' +XF86_DEFS = $(INCLUDES) -DXF86_VERSION=$(VERS) -DXF86_REL_DATE=$(DATE) AllTarget(XDarwinHelp.html) CppFileTarget(XDarwinHelp.html,XDarwinHelp.html.cpp,$(XF86_DEFS), \ NullParameter) AllTarget(InfoPlist.strings) -CppFileTarget(InfoPlist.strings,InfoPlist.strings.cpp,$(XF86_DEFS), \ - NullParameter) +InfoPlist.strings: InfoPlist.strings.cpp + RemoveFile($@) + ClearmakeOSName \ + $(CPP) CppNoLineInfoOption $(XF86_DEFS) $@ +clean:: + RemoveFiles(InfoPlist.strings) Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp diff -u xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp:1.1.2.1 xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp:1.2 --- xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp:1.1.2.1 Mon May 21 00:56:07 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp Sun Nov 4 02:09:48 2001 @@ -1,5 +1,5 @@ /* Japanese localized versions of Info.plist keys. */ /* Most of these are set in the target application settings. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp,v 1.1.2.1 2001/05/21 04:56:07 torrey Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/InfoPlist.strings.cpp,v 1.2 2001/11/04 07:09:48 torrey Exp $ */ -NSHumanReadableCopyright = XF86_COPYRIGHT +NSHumanReadableCopyright = __quote__XFree86 XF86_VERSION\nCopyright 2001 XFree86 Project, Inc.__quote__ Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp diff -u xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp:1.1.2.2 xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp:1.4 --- xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp:1.1.2.2 Mon May 21 23:36:53 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp Tue Nov 27 02:27:46 2001 @@ -1,4 +1,4 @@ - + #include "xf86Version.h" #ifndef PRE_RELEASE @@ -32,7 +32,6 @@ ¤³¤ì¤Ï¡¤XFree86 ¤Î¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ê¡¤¤¤¤«¤Ê¤ë¾ì¹ç¤Ë¤ª¤¤¤Æ¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£ ¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ ¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Î¥Ð¥°¤òÊó¹ð¤¹¤ëÁ°¤Ë¡¤XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤Þ¤¿¤Ï XFree86 CVS ¥ê¥Ý¥¸¥È¥ê¤ÇºÇ¿·ÈǤΥÁ¥§¥Ã¥¯¤ò¤·¤Æ²¼¤µ¤¤¡£ - #else ¤â¤·¡¤¥µ¡¼¥Ð¡¼¤¬ 6 -12 ¥ö·î°Ê¾åÁ°¤Î¤â¤Î¤«¡¤¤Þ¤¿¤Ï¤¢¤Ê¤¿¤Î¥Ï¡¼¥É¥¦¥§¥¢¤¬¾åµ­¤ÎÆüÉÕ¤è¤ê¤â¿·¤·¤¤¤â¤Î¤Ê¤é¤Ð¡¤ÌäÂê¤òÊó¹ð¤¹¤ëÁ°¤Ë¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤òõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ ¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ @@ -44,69 +43,75 @@

»ÈÍÑË¡

-

-XFree86 ¤Ï¡¤XFree86 Project, Inc.¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤¿¡¤ºÆÇÛÉÛ²Äǽ¤Ê¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î X Window System ¤Î¼ÂÁõ¤Ç¤¹¡£ -Mac OS X ¾å¤Ç¡¤XFree86 ¤Ï¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤ÇÆ°ºî¤·¤Þ¤¹¡£X Window System ¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ¡¤¤½¤ì¤ÏÁ´²èÌ̤òÀêÍ­¤·¤Þ¤¹¡£ +

XFree86 ¤Ï¡¤XFree86 Project, Inc.¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤¿¡¤ºÆÇÛÉÛ²Äǽ¤Ê¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î X Window System ¤Î¼ÂÁõ¤Ç¤¹¡£ +XFree86 ¤Ë¤è¤Ã¤ÆÄ󶡤µ¤ì¤ë Darwin ¤È Mac OS X ¤Î¤¿¤á¤Î X Window ¥µ¡¼¥Ð¡¼¤ò XDarwin ¤È¸Æ¤Ó¤Þ¤¹¡£ +XDarwin ¤Ï¡¤Mac OS X ¾å¤Ç¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤ÇÆ°ºî¤·¤Þ¤¹¡£

+ +

¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ¡¤¤½¤ì¤ÏÁ´²èÌ̤òÀêÍ­¤·¤Þ¤¹¡£ ¤¢¤Ê¤¿¤Ï¡¤Command-Option-A ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤ØÀÚ¤êÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤Ï¡¤´Ä¶­ÀßÄê¤ÇÊѹ¹²Äǽ¤Ç¤¹¡£ -Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤«¤éX Window System ¤ØÀÚ¤êÂؤ¨¤ë¾ì¹ç¤Ï¡¤¥Õ¥í¡¼¥Æ¥£¥ó¥°¡¦¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤¯¤À¤µ¤¤¡£ -¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X Window System ¤ØÀÚ¤êÂؤï¤ë¤è¤¦¤Ë¡¤´Ä¶­ÀßÄê¤ÇÆ°ºî¤òÊѹ¹¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ -

+Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤«¤é X Window System ¤ØÀÚ¤êÂؤ¨¤ë¾ì¹ç¤Ï¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ²¼¤µ¤¤¡£ +¡Ê´Ä¶­ÀßÄê¤Ç¡¤¥Õ¥í¡¼¥Æ¥£¥ó¥°¡¦¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤è¤¦¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë

+

¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤È Aqua ¤Ï²èÌ̤ò¶¦Í­¤·¤Þ¤¹¡£ +X11 ¤¬É½¼¨¤¹¤ë¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï²èÌ̤Υµ¥¤¥º¤Ç¤¢¤ê¡¤Â¾¤ÎÁ´¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£ +Aqua ¤¬¥Ç¥¹¥¯¥È¥Ã¥×¤ÎÇطʤòÀ©¸æ¤¹¤ë¤Î¤Ç¡¤X11 ¤Î¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£

+

Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó

-

-¿¤¯¤Î X11 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¤3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤òɬÍפȤ·¤Þ¤¹¡£ -1 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤Ç 3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë¤Ë¤Ï¡¤´Ä¶­ÀßÄê¤Ç¡ÖÊ£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤Ë¤¹¤ë¡×¤òÁªÂò¤·¤Þ¤¹¡£ -¤³¤ì¤Ï¡¤¼¡²ó¤Î X ¥µ¡¼¥Ð¡¼¤Îµ¯Æ°»þ¤è¤êÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£ - -3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë»þ¡¤º¸¤Î¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£º¸¤Î¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ -

-

Ãí¡§

-
    -
  • ¿¤¯¤Î¥­¡¼¥Ü¡¼¥É¤Ç¤Ï¡¤º¸±¦¤Î¥³¥Þ¥ó¥É¥­¡¼¤È¥ª¥×¥·¥ç¥ó¥­¡¼¤Ï¶èÊ̤µ¤ì¤º¡¤Æ±¤¸Æ°ºî¤ò¤·¤Þ¤¹¡£ -
  • xmodmap ¤Ç¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¡¤Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤ÏËÜÍè¤Î¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ -
  • º¸¤Î¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤éÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ò¼Â¸½¤¹¤ë¤Ë¤Ï¡¤º¸¤Î¥³¥Þ¥ó¥É¥­¡¼¤ò¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£º¸¤Î¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤éÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¾ì¹ç¤âƱÍͤǤ¹¡£ -
-

-¥Ñ¥¹¤ÎÀßÄê -

-

-X11 ¥Ð¥¤¥Ê¥ê¤Ï¡¤/usr/X11R6/bin ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ñ¥¹¤Ë²Ã¤¨¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ -¥Ñ¥¹¤Ï¡¤ ¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤ò¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£ -¤³¤ì¤ò³Îǧ¤¹¤ëÊýË¡¤Ï¡¤»ÈÍѤ·¤Æ¤¤¤ë¥·¥§¥ë¤Ë°Í¸¤·¤Þ¤¹¡£ -tcsh ¤Ç¤Ï¡¤¡Öprintenv PATH¡×¤È¥¿¥¤¥×¤¹¤ë¤³¤È¤Ç¥Ñ¥¹¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ -¥Ñ¥¹¤ò¥Á¥§¥Ã¥¯¤·¤¿»þ¡¤/usr/X11R6/bin ¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Î¤Ò¤È¤Ä¤È¤·¤Æɽ¼¨¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ -¤â¤·¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¤¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ç¥Õ¥©¥ë¥È¤Î¥Ñ¥¹¤ËÄɲ乤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ -¤½¤Î¤¿¤á¤Ë¡¤~/Library/init/tcsh/path ¥Õ¥¡¥¤¥ë¤Ë¼¡¤Î¹Ô¤òÄɲ䷤Ʋ¼¤µ¤¤¡£ -¡Ê¤â¤·¤³¤Î¥Õ¥¡¥¤¥ë¤¬Ìµ¤±¤ì¤ÐºîÀ®¤·¤Æ²¼¤µ¤¤¡Ë -

-
-setenv PATH "${PATH}:/usr/X11R6/bin" -
-

-¤â¤·¡¤¤¢¤Ê¤¿¤¬ .cshrc ¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï .tcshrc ¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤Ê¤é¤Ð¡¤¤½¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï ~/Library/init/tcsh/path ¥Õ¥¡¥¤¥ë¤ÎÀßÄêÃͤò¾å½ñ¤­¤·¤Þ¤¹¡£ -¤½¤·¤Æ¡¤¤¢¤Ê¤¿¤Ï¤½¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î¤¦¤Á¤Î°ì¤Ä¤À¤±¤òÊѹ¹¤¹¤ëɬÍפ¬¤¢¤ë¤³¤È¤ËÃí°Õ¤·¤Æ²¼¤µ¤¤¡£ -¤³¤ì¤é¤ÎÊѹ¹¤Ï¡¤¤¢¤Ê¤¿¤¬¿·¤¿¤Ê Terminal ¥¦¥£¥ó¥É¥¦¤ò³«»Ï¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£ -¤Þ¤¿¡¤¤¢¤Ê¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤òõ¤·¤Æ¤¤¤ë»þ¡¤XFree86 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¸¡º÷¤µ¤ì¤ë¥Ú¡¼¥¸¤Î¥ê¥¹¥È¤ËÄɲä·¤¿¤¤¤È»×¤¦¤«¤â¤·¤ì¤Þ¤»¤ó¡£ -X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ï /usr/X11R6/man ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤½¤·¤Æ MANPATH ´Ä¶­ÊÑ¿ô¤Ï¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£ -

+

¿¤¯¤Î X11 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¤3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤òɬÍפȤ·¤Þ¤¹¡£ +¤¢¤Ê¤¿¤Ï¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ÈƱ»þ¤Ë¤¤¤¯¤Ä¤«¤Î½¤¾þ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ¡¤°ì¤Ä¤Î¥Ü¥¿¥ó¤Ç 3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¤³¤ì¤Ï¡¤´Ä¶­ÀßÄê¤Î¡Ö°ìÈÌÀßÄê¡×¤Î¡ÖÊ£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¡×¥»¥¯¥·¥ç¥ó¤ÇÀßÄꤷ¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤ÏÍ­¸ú¤Ç¡¤¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ +¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ +¤¢¤Ê¤¿¤Ï¡¤´Ä¶­ÀßÄê¤Ç¥Ü¥¿¥ó 2 ¤È 3 ¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë½¤¾þ¥­¡¼¤ÎÁȹ礻¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +Ãí¡§½¤¾þ¥­¡¼¤ò xmodmap ¤Ç¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¡¤Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤ÏËÜÍè¤Î¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

+ +

¥Ñ¥¹¤ÎÀßÄê

+

¥Ñ¥¹¤Ï¡¤ ¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤ò¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£ +X11 ¥Ð¥¤¥Ê¥ê¤Ï¡¤/usr/X11R6/bin ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ñ¥¹¤Ë²Ã¤¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +XDarwin ¤Ï¡¤¤³¤ì¤ò¥Ç¥Õ¥©¥ë¥È¤Ç¹Ô¤¤¤Þ¤¹¡£¤Þ¤¿¡¤¤¢¤Ê¤¿¤¬¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿ÄɲäΥǥ£¥ì¥¯¥È¥ê¤ò²Ã¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

+ +

·Ð¸³Ë­¤«¤Ê¥æ¡¼¥¶¡¼¤Ï¡¤¤¹¤Ç¤Ë¼«¤é¤Î¥·¥§¥ë¤Î¤¿¤á¤Ë½é´ü²½¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Æ¥Ñ¥¹¤òÀßÄꤷ¤Æ¤¤¤ë¤Ç¤·¤ç¤¦¡£ +¤³¤Î¾ì¹ç¡¤¤¢¤Ê¤¿¤Ï´Ä¶­ÀßÄê¤Ç XDarwin ¤¬¤¢¤Ê¤¿¤Î¥Ñ¥¹¤òÊѹ¹¤·¤Ê¤¤¤è¤¦¤ËÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +XDarwin ¤Ï¡¤¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤ÇºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤ò³«»Ï¤·¤Þ¤¹¡£ +¡Ê´Ä¶­ÀßÄê¤ÇÂå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë +¥Ñ¥¹¤òÀßÄꤹ¤ëÊýË¡¤Ï¡¤¤¢¤Ê¤¿¤¬»ÈÍѤ·¤Æ¤¤¤ë¥·¥§¥ë¤Ë°Í¸¤·¤Þ¤¹¡£ +¤³¤ì¤Ï¡¤¥·¥§¥ë¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¥É¥­¥å¥á¥ó¥È¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ + +

¤Þ¤¿¡¤¤¢¤Ê¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤òõ¤·¤Æ¤¤¤ë»þ¡¤XFree86 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¸¡º÷¤µ¤ì¤ë¥Ú¡¼¥¸¤Î¥ê¥¹¥È¤ËÄɲä·¤¿¤¤¤È»×¤¦¤«¤â¤·¤ì¤Þ¤»¤ó¡£ +X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ï /usr/X11R6/man ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤½¤·¤Æ MANPATH ´Ä¶­ÊÑ¿ô¤Ï¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£

´Ä¶­ÀßÄê

-

¡ÖXDarwin¡×¥á¥Ë¥å¡¼¤Î¡Ö´Ä¶­ÀßÄê...¡×¥á¥Ë¥å¡¼¹àÌܤ«¤é¡¤¤¤¤¯¤Ä¤«¤ÎÀßÄê¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +

¡ÖXDarwin¡×¥á¥Ë¥å¡¼¤Î¡Ö´Ä¶­ÀßÄê...¡×¥á¥Ë¥å¡¼¹àÌܤ«¤é¥¢¥¯¥»¥¹¤Ç¤­¤ë´Ä¶­ÀßÄê¥Ñ¥Í¥ë¤Ç¡¤¤¤¤¯¤Ä¤«¤Î¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¡Öµ¯Æ°¥ª¥×¥·¥ç¥ó¡×¤ÎÆâÍƤϡ¤XDarwin ¤òºÆµ¯Æ°¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£ ¾¤ÎÁ´¤Æ¤Î¥ª¥×¥·¥ç¥ó¤ÎÆâÍƤϡ¤Ä¾¤Á¤ËÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£ °Ê²¼¡¤¤½¤ì¤¾¤ì¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹:

+ +

°ìÈÌÀßÄê

+
    +
  • X11 ¤Ç¥·¥¹¥Æ¥à¤Î¥Ó¡¼¥×²»¤ò»ÈÍѤ¹¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤Mac OS X ¤Î¥Ó¡¼¥×²»¤¬ X11 ¤Î¥Ù¥ë¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥ª¥Õ¤Î¾ì¹ç¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¤¥·¥ó¥×¥ë ¥È¡¼¥ó¤¬»È¤ï¤ì¤Þ¤¹¡£
  • +
  • X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤Ë¤¹¤ë: ɸ½àŪ¤Ê X Window System ¤Î¼ÂÁõ¤Ç¤Ï¡¤¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤Ï¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ + ¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤Ë Mac OS X ¤Î¥·¥¹¥Æ¥à´Ä¶­ÀßÄê¤È X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤¬°Û¤Ê¤ëÃͤòÀßÄꤷ¤¿¾ì¹ç¡¤¤³¤ì¤Ïº®Íð¤ò¾·¤­¤Þ¤¹¡£ + ¤³¤ÎÌäÂê¤òÈò¤±¤ë¤¿¤á¡¤¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤È¤·¤Þ¤»¤ó¡£
  • +
  • Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó: »ÈÍÑË¡¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¥ª¥ó¤Î¾ì¹ç¡¤¥Þ¥¦¥¹¥Ü¥¿¥ó¤¬Âè 2 ¤Þ¤¿¤ÏÂè 3 ¤Î¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë»þ¤Ë¡¤ÁªÂò¤·¤¿½¤¾þ¥­¡¼¤òƱ»þ¤Ë²¡¤·¤Þ¤¹¡£
  • +
+ +

µ¯Æ°¥ª¥×¥·¥ç¥ó

+
    +
  • ²èÌ̥⡼¥É: ¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¤¤³¤³¤Ç»ØÄꤵ¤ì¤¿¥â¡¼¥É¤¬»È¤ï¤ì¤Þ¤¹¡£
  • +
  • µ¯Æ°»þ¤Ë¥â¡¼¥ÉÁªÂò¥Ñ¥Í¥ë¤òɽ¼¨¤¹¤ë: ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤XDarwin ¤Îµ¯Æ°»þ¤Ë¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤òÁªÂò¤¹¤ë¥Ñ¥Í¥ë¤òɽ¼¨¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤¬¥ª¥Õ¤Î¾ì¹ç¡¤²èÌ̥⡼¥É¤Ç»ØÄꤷ¤¿¥â¡¼¥É¤Çµ¯Æ°¤·¤Þ¤¹¡£
  • +
  • X11 ¥Ç¥£¥¹¥×¥ì¥¤ÈÖ¹æ: X11¤Ï¡¤°ì¤Ä¤Î¥³¥ó¥Ô¥å¡¼¥¿¾å¤ÇÊÌ¡¹¤Î X ¥µ¡¼¥Ð¡¼¤¬´ÉÍý¤¹¤ëÊ£¿ô¤Î¥Ç¥£¥¹¥×¥ì¥¤¤¬Â¸ºß¤¹¤ë¤³¤È¤òµö¤·¤Þ¤¹¡£Ê£¿ô¤Î X ¥µ¡¼¥Ð¡¼¤¬Æ±»þ¤Ë¼Â¹Ô¤·¤Æ¤¤¤ë»þ¡¤XDarwin ¤¬»ÈÍѤ¹¤ë¥Ç¥£¥¹¥×¥ì¥¤¤ÎÈÖ¹æ¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • +
  • Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¥µ¥Ý¡¼¥È¤òÍ­¸ú¤Ë¤¹¤ë: XDarwin ¤Ï¡¤Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¤½¤ì¤ÏÁ´¤Æ¤Î¥â¥Ë¥¿¤ò°ì¤Ä¤ÎÂ礭¤Ê²èÌ̤ΰìÉô¤È¤ß¤Ê¤·¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤³¤Î¥ª¥×¥·¥ç¥ó¤Ç Xinerama ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤À¤·¡¤¸½ºß XDarwin ¤Ï¤½¤ì̵¤·¤ÇÀµ¤·¤¯Ê£¿ô¤Î¥â¥Ë¥¿¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤â¤·¡¤¤¢¤Ê¤¿¤¬°ì¤Ä¤Î¥â¥Ë¥¿¤ò»È¤¦¤À¤±¤Ê¤é¤Ð¡¤Xinerama ¤Ï¼«Æ°Åª¤Ë̵¸ú¤È¤Ê¤ê¤Þ¤¹¡£
  • +
  • ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë: ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ïµ¯Æ°»þ¤ËÆɤ߹þ¤Þ¤ì¡¤X11 ¥­¡¼¥Þ¥Ã¥×¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¡£Â¾¸À¸ì¤ËÂбþ¤·¤¿¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ï /System/Library/Keyboards ¤Ë¤¢¤ê¤Þ¤¹¡£¡ÊÌõÃí¡§¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤Ç Japanese ¤òÁªÂò¤¹¤ë¤È¡¤ÉÔ¶ñ¹ç¤¬À¸¤¸¤Þ¤¹¡£USA ¤òÁªÂò¤·¤¿¾å¤Ç ~/.Xmodmap ¤òŬÍѤ·¤Æ²¼¤µ¤¤¡£¡Ë
  • +
  • ºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°: XDarwin ¤¬ Finder¤«¤éµ¯Æ°¤¹¤ë»þ¡¤X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤È X ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°¤Ï xinit ¤ò¼Â¹Ô¤·¤Þ¤¹¡£¡Ê¾ÜºÙ¤Ï "man xinit" ¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¡ËXDarwin ¤Ï xinit ¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¤»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤ò¥æ¡¼¥¶¡¼¤Î¥Ñ¥¹¤ËÄɲä·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï /usr/X11R6/bin ¤À¤±¤òÄɲä·¤Þ¤¹¡£Â¾¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òÄɲä·¤¿¤¤¾ì¹ç¤Ï¡¤¥³¥í¥ó¤Ç¶èÀڤäƻØÄꤷ¤Þ¤¹¡£¥æ¡¼¥¶¡¼¤Î¥·¥§¥ë½é´ü²½¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤à¤¿¤á¤Ë¡¤X ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¥í¥°¥¤¥ó¥·¥§¥ë¤Çµ¯Æ°¤µ¤ì¤Þ¤¹¡£É¬ÍפǤ¢¤ì¤Ð¡¤Âå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • +
+ +

¥Õ¥ë¥¹¥¯¥ê¡¼¥ó

    -
  • ¥­¡¼ÀßÄê¥Ü¥¿¥ó: X11 ¤È Aqua ¤òÀÚ¤êÂؤ¨¤ë¤¿¤á¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤òÊѹ¹¤¹¤ë¤¿¤á¤Ë¡¤¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡¤¤¤¤¯¤Ä¤«¤Î½¤¾þ¥­¡¼¤Ë³¤¤¤ÆÄ̾ï¤Î¥­¡¼¤ò²¡¤·¤Þ¤¹¡£
  • -
  • X11 ¤Ç¥·¥¹¥Æ¥à¤Î¥Ó¡¼¥×²»¤ò»ÈÍѤ¹¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤Mac OS X ¤Î¥Ó¡¼¥×²»¤¬ X11 ¤Î¥Ù¥ë¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥ª¥Õ¤Î¾ì¹ç¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¤¥·¥ó¥×¥ë ¥È¡¼¥ó¤¬»È¤ï¤ì¤Þ¤¹¡£
  • -
  • ¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤ËÌá¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤Ø¤ÎÀÚ¤êÂؤ¨¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£ - Mac OS X ¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤Ã¤Æ¤Ï¡¤¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç²èÌ̤òÀÚ¤êÂؤ¨¤ë¤È¡¤Aqua ¤ËÌá¤Ã¤¿»þ¤Ë¥«¡¼¥½¥ë¤¬¾Ã¼º¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
  • -
  • µ¯Æ°»þ¤Ë¥Ø¥ë¥×¤òɽ¼¨¤¹¤ë: XDarwin ¤Îµ¯Æ°»þ¤Ë¡¤¥¹¥×¥é¥Ã¥·¥å ¥¹¥¯¥ê¡¼¥ó¤òɽ¼¨¤·¤Þ¤¹¡£
  • -
  • ¥Ç¥£¥¹¥×¥ì¥¤ÈÖ¹æ: XDarwin ¤¬¥Ç¥£¥¹¥×¥ì¥¤¤Ë³ä¤êÅö¤Æ¤ë X ¤Î Display Number ¤ò»ØÄꤷ¤Þ¤¹¡£ - X11 ¤òɽ¼¨¤¹¤ë¤È¤­¡¤XDarwin ¤Ï¾ï¤Ë¥á¥¤¥ó¥Ç¥£¥¹¥×¥ì¥¤¤ò°ú¤­·Ñ¤°¤³¤È¤ËÃí°Õ¤·¤Æ²¼¤µ¤¤¡£
  • -
  • ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°: ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤XDarwin ¤Ï Darwin ¥«¡¼¥Í¥ë¤«¤é¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤ò¥í¡¼¥É¤·¤Þ¤¹¡£ - ¥Ý¡¼¥¿¥Ö¥ëµ¡¼ï¤Ç¤Ï¡¤»þ¡¹¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤¬¶õ¤È¤Ê¤ê¡¤X11 ¤Ç¥­¡¼¥Ü¡¼¥É¤¬Æ°ºî¤·¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£ - ¡Ö¥Õ¥¡¥¤¥ë¤«¤é¥í¡¼¥É¤¹¤ë¡×¤òÁªÂò¤¹¤ë¤È¡¤XDarwin ¤Ï»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤«¤é¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤ò¥í¡¼¥É¤·¤Þ¤¹¡£
    - ¡ÊÌõÃí¡§¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤Ç Japanese ¤òÁªÂò¤¹¤ë¤È¡¤ÉÔ¶ñ¹ç¤¬À¸¤¸¤Þ¤¹¡£USA ¤òÁªÂò¤·¤¿¾å¤Ç ~/.Xmodmap ¤òŬÍѤ·¤Æ²¼¤µ¤¤¡£¡Ë
  • +
  • ¥­¡¼ÀßÄê¥Ü¥¿¥ó: X11 ¤È Aqua ¤òÀÚ¤êÂؤ¨¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¥Ü¥¿¥ó¤ÎÁȤ߹ç¤ï¤»¤ò»ØÄꤷ¤Þ¤¹¡£ + ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡¤Ç¤°Õ¤Î¿ô¤Î½¤¾þ¥­¡¼¤Ë³¤¤¤ÆÄ̾ï¤Î¥­¡¼¤ò²¡¤·¤Þ¤¹¡£
  • +
  • ¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤ËÌá¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤Ø¤ÎÀڤ괹¤¨¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£Mac OS X ¤Î¤¤¤¯¤Ä¤«¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¤¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç Aqua ¤ËÌá¤Ã¤¿»þ¡¤¥«¡¼¥½¥ë¤¬¾Ã¼º¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
  • +
  • µ¯Æ°»þ¤Ë¥Ø¥ë¥×¤òɽ¼¨¤¹¤ë: XDarwin ¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Çµ¯Æ°¤¹¤ë»þ¡¤¥¹¥×¥é¥Ã¥·¥å¥¹¥¯¥ê¡¼¥ó¤òɽ¼¨¤·¤Þ¤¹¡£
  • +
  • ¿§¿¼ÅÙ: ¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X11 ¥Ç¥£¥¹¥×¥ì¥¤¤¬ Aqua ¤È°Û¤Ê¤ë¿§¿¼ÅÙ¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡ÖÊѹ¹¤Ê¤·¡×¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¤XDarwin ¤Ï Aqua ¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤ë¿§¿¼ÅÙ¤ò»È¤¤¤Þ¤¹¡£¤³¤ì°Ê³°¤Ë 8¡¤15 ¤Þ¤¿¤Ï24 ¥Ó¥Ã¥È¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib diff -u xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib:1.4 xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib:1.8 --- xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib:1.4 Thu May 10 03:49:39 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib Sat Oct 27 23:33:09 2001 @@ -11,16 +11,24 @@ CLASS = Preferences; LANGUAGE = ObjC; OUTLETS = { - displayNumber = id; + addToPathButton = id; + addToPathField = id; + button2ModifiersMatrix = id; + button3ModifiersMatrix = id; + depthButton = id; + displayField = id; dockSwitchButton = id; fakeButton = id; - keyField = id; keymapFileField = id; - loadKeymapFileButton = id; - pickKeymapFileButton = id; - splashStartupHelpButton = id; + modeMatrix = id; + modeWindowButton = id; + mouseAccelChangeButton = id; startupHelpButton = id; + switchKeyButton = id; systemBeepButton = id; + useDefaultShellMatrix = id; + useOtherShellField = id; + useXineramaButton = id; window = id; }; SUPERCLASS = NSObject; @@ -32,12 +40,23 @@ SUPERCLASS = NSApplication; }, { - ACTIONS = {applicationWillResignActive = id; closeHelpAndShow = id; showAction = id; }; + ACTIONS = { + closeHelpAndShow = id; + showAction = id; + startFullScreen = id; + startRootless = id; + }; CLASS = Xserver; LANGUAGE = ObjC; - OUTLETS = {helpWindow = id; startupHelpButton = id; switchWindow = id; }; + OUTLETS = { + helpWindow = id; + modeWindow = id; + startupHelpButton = id; + startupModeButton = id; + switchWindow = id; + }; SUPERCLASS = NSObject; } ); IBVersion = 1; -} \ No newline at end of file +} Index: xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib diff -u xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib:1.5 xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib:removed --- xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib:1.5 Thu May 10 03:49:39 2001 +++ xc/programs/Xserver/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/info.nib Fri Jan 18 15:24:36 2002 @@ -1,34 +0,0 @@ - - - - - IBDocumentLocation - 29 444 369 278 0 64 1024 682 - IBMainMenuLocation - 44 386 343 44 0 71 1024 675 - IBUserGuides - - Help Window - - guideLocations - - guidesLocked - NO - - Pref Window - - guideLocations - - guidesLocked - NO - - X Panel - - guideLocations - - guidesLocked - NO - - - - Index: xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj diff -u xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj:1.12.2.1 xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj:1.30 --- xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj:1.12.2.1 Mon May 21 00:56:07 2001 +++ xc/programs/Xserver/hw/darwin/bundle/XDarwin.pbproj/project.pbxproj Mon Jan 14 02:12:22 2002 @@ -20,159 +20,94 @@ path = XApplication.h; refType = 4; }; - 015698ED003DF345CE6F79C2 = { - isa = PBXFileReference; - path = XDarwin.icns; - refType = 4; - }; - 0157A37D002CF6D7CE6F79C2 = { - children = ( - 0157A37E002CF6D7CE6F79C2, - 43B962E200617B93416877C2, - ); - isa = PBXVariantGroup; - name = Credits.rtf; - path = ""; - refType = 4; - }; - 0157A37E002CF6D7CE6F79C2 = { - isa = PBXFileReference; - name = English; - path = English.lproj/Credits.rtf; - refType = 4; - }; - 015EDCC000420083CE6F79C2 = { - isa = PBXFileReference; - name = libdix.a; - path = dix/libdix.a; - refType = 4; - }; - 015EDCC20042012ACE6F79C2 = { - isa = PBXFileReference; - name = libos.a; - path = os/libos.a; - refType = 4; - }; - 015EDCC400420160CE6F79C2 = { - isa = PBXFileReference; - name = libXau.a; - path = ../../lib/Xau/libXau.a; - refType = 4; - }; - 015EDCC60042017CCE6F79C2 = { - isa = PBXFileReference; - name = libXdmcp.a; - path = ../../lib/Xdmcp/libXdmcp.a; - refType = 4; - }; - 015EDCC8004201A8CE6F79C2 = { - isa = PBXFileReference; - name = libdarwin.a; - path = hw/darwin/libdarwin.a; - refType = 4; - }; - 015EDCCA004201C1CE6F79C2 = { + 014C68ED00ED6A9D7F000001 = { isa = PBXFileReference; - name = libcfb.a; - path = cfb/libcfb.a; + path = XView.h; refType = 4; }; - 015EDCCC004201E4CE6F79C2 = { + 014C68EE00ED6A9D7F000001 = { isa = PBXFileReference; - name = libcfb16.a; - path = cfb16/libcfb16.a; + path = XView.m; refType = 4; }; - 015EDCCE004201F2CE6F79C2 = { + 014C68EF00ED6A9D7F000001 = { isa = PBXFileReference; - name = libcfb.a; - path = cfb/libcfb.a; + path = XWindow.h; refType = 4; }; - 015EDCD0004201FCCE6F79C2 = { + 014C68F000ED6A9D7F000001 = { isa = PBXFileReference; - name = libcfb32.a; - path = cfb32/libcfb32.a; + path = XWindow.m; refType = 4; }; - 015EDCD20042020BCE6F79C2 = { + 014C68F200ED7AD67F000001 = { isa = PBXFileReference; - name = libcfb.a; - path = cfb/libcfb.a; + path = fakeBoxRec.h; refType = 4; }; - 015EDCD400420227CE6F79C2 = { + 014C68F300EE5AB97F000001 = { isa = PBXFileReference; - name = libmfb.a; - path = mfb/libmfb.a; + path = rootlessCommon.c; refType = 4; }; - 015EDCD60042023DCE6F79C2 = { + 014C68F400EE5AB97F000001 = { isa = PBXFileReference; - name = libxpstubs.a; - path = dix/libxpstubs.a; + path = rootlessCommon.h; refType = 4; }; - 015EDCD80042024ECE6F79C2 = { + 014C68F700EE678F7F000001 = { isa = PBXFileReference; - name = libmi.a; - path = mi/libmi.a; + path = rootlessWindow.c; refType = 4; }; - 015EDCDA00420266CE6F79C2 = { + 014C68F800EE678F7F000001 = { isa = PBXFileReference; - name = libext.a; - path = Xext/libext.a; + path = rootlessWindow.h; refType = 4; }; - 015EDCDC00420279CE6F79C2 = { - isa = PBXFileReference; - name = libxkb.a; - path = xkb/libxkb.a; - refType = 4; - }; - 015EDCDE00420295CE6F79C2 = { + 015698ED003DF345CE6F79C2 = { isa = PBXFileReference; - name = liblbx.a; - path = lbx/liblbx.a; + path = XDarwin.icns; refType = 4; }; - 015EDCE0004202BACE6F79C2 = { - isa = PBXFileReference; - name = liblbxutil.a; - path = ../../lib/lbxutil/liblbxutil.a; + 0157A37D002CF6D7CE6F79C2 = { + children = ( + F533214601A4B45401000001, + 0157A37E002CF6D7CE6F79C2, + F58D65DF018F79B101000001, + F533213D0193CBE001000001, + 43B962E200617B93416877C2, + F5ACD263C5BE031F01000001, + F5ACD25CC5B5E96601000001, + F587E16401924C6901000001, + ); + isa = PBXVariantGroup; + name = Credits.rtf; + path = ""; refType = 4; }; - 015EDCE2004202DECE6F79C2 = { + 0157A37E002CF6D7CE6F79C2 = { isa = PBXFileReference; - name = libdbe.a; - path = dbe/libdbe.a; + name = English; + path = English.lproj/Credits.rtf; refType = 4; }; - 015EDCE4004202F2CE6F79C2 = { - isa = PBXFileReference; - name = librecord.a; - path = record/librecord.a; - refType = 4; + 015EDCEA004203A8CE6F79C2 = { + isa = PBXFrameworkReference; + name = IOKit.framework; + path = /System/Library/Frameworks/IOKit.framework; + refType = 0; }; - 015EDCE600420319CE6F79C2 = { + 017D6F4400E861FB7F000001 = { isa = PBXFileReference; - name = libXfont.a; - path = ../../lib/font/libXfont.a; + path = rootlessGC.c; refType = 4; }; - 015EDCE800420346CE6F79C2 = { + 017D6F4500E861FB7F000001 = { isa = PBXFileReference; - name = libxpstubs.a; - path = dix/libxpstubs.a; + path = rootlessScreen.c; refType = 4; }; - 015EDCEA004203A8CE6F79C2 = { - isa = PBXFrameworkReference; - name = IOKit.framework; - path = /System/Library/Frameworks/IOKit.framework; - refType = 0; - }; 018F40F2003E1902CE6F79C2 = { children = ( 018F40F3003E1916CE6F79C2, @@ -220,6 +155,16 @@ path = xfIOKitCursor.c; refType = 4; }; +//010 +//011 +//012 +//013 +//014 +//020 +//021 +//022 +//023 +//024 021D6BA9003E1BACCE6F79C2 = { isa = PBXFileReference; path = darwin.h; @@ -237,8 +182,14 @@ }; 02E03CA000348209CE6F79C2 = { children = ( + F533214701A4B48301000001, 02E03CA100348209CE6F79C2, + F58D65E0018F79C001000001, + F533213E0193CBF401000001, 43B962E300617B93416877C2, + F5ACD268C5BE046401000001, + F5ACD261C5B5EA2001000001, + F587E16501924C7401000001, ); isa = PBXVariantGroup; name = XDarwinHelp.html; @@ -251,11 +202,31 @@ path = English.lproj/XDarwinHelp.html; refType = 4; }; +//020 +//021 +//022 +//023 +//024 +//030 +//031 +//032 +//033 +//034 0338412F0083BFE57F000001 = { isa = PBXFileReference; path = quartzCursor.h; refType = 4; }; +//030 +//031 +//032 +//033 +//034 +//040 +//041 +//042 +//043 +//044 04329610000763920A000002 = { isa = PBXFileReference; path = Preferences.m; @@ -266,19 +237,43 @@ path = Preferences.h; refType = 4; }; +//040 +//041 +//042 +//043 +//044 +//060 +//061 +//062 +//063 +//064 06EB6C3B004099E7CE6F79C2 = { isa = PBXFileReference; path = quartzShared.h; refType = 4; }; +//060 +//061 +//062 +//063 +//064 +//080 +//081 +//082 +//083 +//084 080E96DDFE201D6D7F000001 = { children = ( - 01279092000747AA0A000002, - 1C4A3109004D8F24CE6F79C2, - 0127909600074AF60A000002, - 0127909800074B1A0A000002, 04329610000763920A000002, 04329611000763920A000002, + 0127909600074AF60A000002, + 0127909800074B1A0A000002, + 01279092000747AA0A000002, + 1C4A3109004D8F24CE6F79C2, + 014C68EE00ED6A9D7F000001, + 014C68ED00ED6A9D7F000001, + 014C68F000ED6A9D7F000001, + 014C68EF00ED6A9D7F000001, ); isa = PBXGroup; name = Classes; @@ -286,8 +281,14 @@ }; 089C165CFE840E0CC02AAC07 = { children = ( + F533214301A4B3F001000001, 089C165DFE840E0CC02AAC07, + F58D65DD018F798F01000001, + F533213A0193CBA201000001, 43B962E100617B49416877C2, + F5ACD269C5BE049301000001, + F5ACD262C5B5EA4D01000001, + F587E16101924C2F01000001, ); isa = PBXVariantGroup; name = InfoPlist.strings; @@ -299,6 +300,16 @@ path = English.lproj/InfoPlist.strings; refType = 4; }; +//080 +//081 +//082 +//083 +//084 +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 0A79E19E004499A1CE6F79C2 = { isa = PBXApplicationReference; path = XDarwin.app; @@ -323,8 +334,6 @@ WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; WRAPPER_EXTENSION = app; }; - conditionalBuildSettings = { - }; dependencies = ( ); isa = PBXApplicationTarget; @@ -341,7 +350,7 @@ CFBundleExecutable XDarwin CFBundleGetInfoString - XDarwin 1.0, ©2001 XFree86 Project, Inc. + XDarwin 1.1, ©2001-2002 XFree86 Project, Inc. CFBundleIconFile XDarwin.icns CFBundleIdentifier @@ -353,7 +362,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - XDarwin 1.0 + XDarwin 1.1 CFBundleSignature ???? CFBundleVersion @@ -385,6 +394,7 @@ 0A79E1A900449EB2CE6F79C2, 0A79E1AA00449EB2CE6F79C2, 1220774500712D2D416877C2, + F54BF6ED017D506E01000001, ); isa = PBXResourcesBuildPhase; name = "Bundle Resources"; @@ -440,10 +450,22 @@ settings = { }; }; +//0A0 +//0A1 +//0A2 +//0A3 +//0A4 +//100 +//101 +//102 +//103 +//104 1058C7A0FEA54F0111CA2CBB = { children = ( - 1058C7A1FEA54F0111CA2CBB, + F53321400193CCF001000001, 1BE4F84D0006C9890A000002, + 1058C7A1FEA54F0111CA2CBB, + F53321410193CCF001000001, 015EDCEA004203A8CE6F79C2, ); isa = PBXGroup; @@ -465,10 +487,26 @@ name = "Other Frameworks"; refType = 4; }; +//100 +//101 +//102 +//103 +//104 +//120 +//121 +//122 +//123 +//124 1220774300712D2D416877C2 = { children = ( + F533214501A4B42501000001, 1220774400712D2D416877C2, + F58D65DE018F79A001000001, + F533213C0193CBC901000001, 1220774600712D75416877C2, + F5ACD266C5BE03C501000001, + F5ACD25FC5B5E9AA01000001, + F587E16301924C5E01000001, ); isa = PBXVariantGroup; name = Localizable.strings; @@ -493,6 +531,16 @@ path = Japanese.lproj/Localizable.strings; refType = 4; }; +//120 +//121 +//122 +//123 +//124 +//170 +//171 +//172 +//173 +//174 170DFAFF00729A35416877C2 = { isa = PBXFileReference; path = XDarwinStartup.c; @@ -506,10 +554,20 @@ 02A1FEA6006D34BE416877C2, ); isa = PBXGroup; - name = "IOKit Support"; + name = IOKit; path = ..; refType = 2; }; +//170 +//171 +//172 +//173 +//174 +//190 +//191 +//192 +//193 +//194 19C28FACFE9D520D11CA2CBB = { children = ( 0A79E19E004499A1CE6F79C2, @@ -518,10 +576,26 @@ name = Products; refType = 4; }; +//190 +//191 +//192 +//193 +//194 +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 1BD8DE4200B8A3567F000001 = { children = ( + F533214401A4B40F01000001, 1BD8DE4300B8A3567F000001, + F58D65DC018F794D01000001, + F533213B0193CBB401000001, 1BD8DE4700B8A3C77F000001, + F5ACD264C5BE035B01000001, + F5ACD25DC5B5E97701000001, + F587E16201924C5301000001, ); isa = PBXVariantGroup; name = InfoPlist.strings.cpp; @@ -536,8 +610,14 @@ }; 1BD8DE4400B8A38E7F000001 = { children = ( + F533214801A4B4D701000001, 1BD8DE4500B8A38E7F000001, + F58D65E1018F79E001000001, + F533213F0193CC2501000001, 1BD8DE4800B8A4167F000001, + F5ACD267C5BE03FC01000001, + F5ACD260C5B5E9DF01000001, + F587E16601924C9D01000001, ); isa = PBXVariantGroup; name = XDarwinHelp.html.cpp; @@ -568,11 +648,31 @@ path = /System/Library/Frameworks/Carbon.framework; refType = 0; }; +//1B0 +//1B1 +//1B2 +//1B3 +//1B4 +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 1C4A3109004D8F24CE6F79C2 = { isa = PBXFileReference; path = Xserver.h; refType = 4; }; +//1C0 +//1C1 +//1C2 +//1C3 +//1C4 +//230 +//231 +//232 +//233 +//234 237A34C10076E37E7F000001 = { isa = PBXFileReference; path = quartzAudio.c; @@ -601,13 +701,34 @@ path = quartzAudio.h; refType = 4; }; +//230 +//231 +//232 +//233 +//234 +//290 +//291 +//292 +//293 +//294 29B97313FDCFA39411CA2CEA = { buildStyles = ( 237A34C20076E37E7F000001, 237A34C30076E37E7F000001, ); isa = PBXProject; + knownRegions = ( + English, + Japanese, + French, + German, + Swedish, + Dutch, + Spanish, + ko, + ); mainGroup = 29B97314FDCFA39411CA2CEA; + projectDirPath = ""; targets = ( 0A79E19F004499A1CE6F79C2, ); @@ -632,6 +753,7 @@ 018F40F2003E1902CE6F79C2, 170DFB0000729C86416877C2, 43B962CE00617089416877C2, + 32FEE13C00E07C3E7F000001, ); isa = PBXGroup; name = "Other Sources"; @@ -648,6 +770,8 @@ 02E03CA000348209CE6F79C2, 1BD8DE4400B8A38E7F000001, 015698ED003DF345CE6F79C2, + F54BF6EA017D500901000001, + F54BF6EC017D506E01000001, ); isa = PBXGroup; name = Resources; @@ -656,8 +780,14 @@ }; 29B97318FDCFA39411CA2CEA = { children = ( + F533214201A4B3CE01000001, 29B97319FDCFA39411CA2CEA, + F58D65DB018F793801000001, + F53321390193CB6A01000001, 43B962E000617B49416877C2, + F5ACD265C5BE038601000001, + F5ACD25EC5B5E98D01000001, + F587E16001924C1D01000001, ); isa = PBXVariantGroup; name = MainMenu.nib; @@ -692,16 +822,108 @@ path = /System/Library/Frameworks/Foundation.framework; refType = 0; }; +//290 +//291 +//292 +//293 +//294 +//320 +//321 +//322 +//323 +//324 + 32FEE13C00E07C3E7F000001 = { + children = ( + 014C68F200ED7AD67F000001, + F5269C2D01D5BC3501000001, + F5269C2E01D5BC3501000001, + 32FEE13E00E07CBE7F000001, + 32FEE13F00E07CBE7F000001, + 32FEE14000E07CBE7F000001, + 32FEE14100E07CBE7F000001, + 32FEE14200E07CBE7F000001, + 014C68F300EE5AB97F000001, + 014C68F400EE5AB97F000001, + 017D6F4400E861FB7F000001, + 017D6F4500E861FB7F000001, + 014C68F700EE678F7F000001, + 014C68F800EE678F7F000001, + 32FEE14900E07D317F000001, + ); + isa = PBXGroup; + name = Rootless; + refType = 4; + }; + 32FEE13E00E07CBE7F000001 = { + isa = PBXFileReference; + path = rootless.h; + refType = 4; + }; + 32FEE13F00E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAqua.h; + refType = 4; + }; + 32FEE14000E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAquaGlue.c; + refType = 4; + }; + 32FEE14100E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAquaImp.h; + refType = 4; + }; + 32FEE14200E07CBE7F000001 = { + isa = PBXFileReference; + path = rootlessAquaImp.m; + refType = 4; + }; + 32FEE14900E07D317F000001 = { + isa = PBXFileReference; + path = rootlessValTree.c; + refType = 4; + }; +//320 +//321 +//322 +//323 +//324 +//350 +//351 +//352 +//353 +//354 3576829A0077B8F17F000001 = { isa = PBXFileReference; path = quartzCursor.c; refType = 4; }; +//350 +//351 +//352 +//353 +//354 +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 3E74E03600863F047F000001 = { isa = PBXFileReference; path = darwinClut8.h; refType = 4; }; +//3E0 +//3E1 +//3E2 +//3E3 +//3E4 +//430 +//431 +//432 +//433 +//434 43B962CE00617089416877C2 = { children = ( 018F40F8003E1979CE6F79C2, @@ -711,13 +933,14 @@ 3576829A0077B8F17F000001, 0338412F0083BFE57F000001, 43B962D000617089416877C2, - 43B962CF00617089416877C2, 43B962D100617089416877C2, + 43B962CF00617089416877C2, + F5582948015DAD3B01000001, 06EB6C3B004099E7CE6F79C2, 02A1FEA8006D38F0416877C2, ); isa = PBXGroup; - name = "Quartz Support"; + name = Quartz; refType = 4; }; 43B962CF00617089416877C2 = { @@ -759,34 +982,328 @@ path = Japanese.lproj/XDarwinHelp.html; refType = 4; }; +//430 +//431 +//432 +//433 +//434 +//610 +//611 +//612 +//613 +//614 618092480041B0E4CE6F79C2 = { children = ( - 015EDCC000420083CE6F79C2, - 015EDCC20042012ACE6F79C2, - 015EDCC400420160CE6F79C2, - 015EDCC60042017CCE6F79C2, - 015EDCC8004201A8CE6F79C2, - 015EDCCA004201C1CE6F79C2, - 015EDCCC004201E4CE6F79C2, - 015EDCCE004201F2CE6F79C2, - 015EDCD0004201FCCE6F79C2, - 015EDCD20042020BCE6F79C2, - 015EDCD400420227CE6F79C2, - 015EDCD60042023DCE6F79C2, - 015EDCD80042024ECE6F79C2, - 015EDCDA00420266CE6F79C2, - 015EDCDC00420279CE6F79C2, - 015EDCDE00420295CE6F79C2, - 015EDCE0004202BACE6F79C2, - 015EDCE2004202DECE6F79C2, - 015EDCE4004202F2CE6F79C2, - 015EDCE600420319CE6F79C2, - 015EDCE800420346CE6F79C2, ); isa = PBXGroup; name = Libraries; path = ../../..; refType = 2; + }; +//610 +//611 +//612 +//613 +//614 +//F50 +//F51 +//F52 +//F53 +//F54 + F5269C2D01D5BC3501000001 = { + isa = PBXFileReference; + path = pseudoramiX.c; + refType = 4; + }; + F5269C2E01D5BC3501000001 = { + isa = PBXFileReference; + path = pseudoramiX.h; + refType = 4; + }; + F53321390193CB6A01000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/MainMenu.nib; + refType = 4; + }; + F533213A0193CBA201000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/InfoPlist.strings; + refType = 4; + }; + F533213B0193CBB401000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F533213C0193CBC901000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/Localizable.strings; + refType = 4; + }; + F533213D0193CBE001000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/Credits.rtf; + refType = 4; + }; + F533213E0193CBF401000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/XDarwinHelp.html; + refType = 4; + }; + F533213F0193CC2501000001 = { + isa = PBXFileReference; + name = German; + path = German.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F53321400193CCF001000001 = { + isa = PBXFrameworkReference; + name = ApplicationServices.framework; + path = /System/Library/Frameworks/ApplicationServices.framework; + refType = 0; + }; + F53321410193CCF001000001 = { + isa = PBXFrameworkReference; + name = CoreAudio.framework; + path = /System/Library/Frameworks/CoreAudio.framework; + refType = 0; + }; + F533214201A4B3CE01000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/MainMenu.nib; + refType = 4; + }; + F533214301A4B3F001000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings; + refType = 4; + }; + F533214401A4B40F01000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F533214501A4B42501000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/Localizable.strings; + refType = 4; + }; + F533214601A4B45401000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/Credits.rtf; + refType = 4; + }; + F533214701A4B48301000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html; + refType = 4; + }; + F533214801A4B4D701000001 = { + isa = PBXFileReference; + name = Dutch; + path = Dutch.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F54BF6EA017D500901000001 = { + isa = PBXFileReference; + path = startXClients.cpp; + refType = 4; + }; + F54BF6EC017D506E01000001 = { + isa = PBXFileReference; + path = startXClients; + refType = 4; + }; + F54BF6ED017D506E01000001 = { + fileRef = F54BF6EC017D506E01000001; + isa = PBXBuildFile; + settings = { + }; + }; + F5582948015DAD3B01000001 = { + isa = PBXFileReference; + path = quartzCommon.h; + refType = 4; + }; + F587E16001924C1D01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/MainMenu.nib; + refType = 4; + }; + F587E16101924C2F01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings; + refType = 4; + }; + F587E16201924C5301000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F587E16301924C5E01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/Localizable.strings; + refType = 4; + }; + F587E16401924C6901000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/Credits.rtf; + refType = 4; + }; + F587E16501924C7401000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html; + refType = 4; + }; + F587E16601924C9D01000001 = { + isa = PBXFileReference; + name = Swedish; + path = Swedish.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F58D65DB018F793801000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/MainMenu.nib; + refType = 4; + }; + F58D65DC018F794D01000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F58D65DD018F798F01000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/InfoPlist.strings; + refType = 4; + }; + F58D65DE018F79A001000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/Localizable.strings; + refType = 4; + }; + F58D65DF018F79B101000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/Credits.rtf; + refType = 4; + }; + F58D65E0018F79C001000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/XDarwinHelp.html; + refType = 4; + }; + F58D65E1018F79E001000001 = { + isa = PBXFileReference; + name = French; + path = French.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD25CC5B5E96601000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/Credits.rtf; + refType = 4; + }; + F5ACD25DC5B5E97701000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F5ACD25EC5B5E98D01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/MainMenu.nib; + refType = 4; + }; + F5ACD25FC5B5E9AA01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/Localizable.strings; + refType = 4; + }; + F5ACD260C5B5E9DF01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD261C5B5EA2001000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/XDarwinHelp.html; + refType = 4; + }; + F5ACD262C5B5EA4D01000001 = { + isa = PBXFileReference; + name = Spanish; + path = Spanish.lproj/InfoPlist.strings; + refType = 4; + }; + F5ACD263C5BE031F01000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/Credits.rtf; + refType = 4; + }; + F5ACD264C5BE035B01000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/InfoPlist.strings.cpp; + refType = 4; + }; + F5ACD265C5BE038601000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/MainMenu.nib; + refType = 4; + }; + F5ACD266C5BE03C501000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/Localizable.strings; + refType = 4; + }; + F5ACD267C5BE03FC01000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/XDarwinHelp.html.cpp; + refType = 4; + }; + F5ACD268C5BE046401000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/XDarwinHelp.html; + refType = 4; + }; + F5ACD269C5BE049301000001 = { + isa = PBXFileReference; + name = ko; + path = ko.lproj/InfoPlist.strings; + refType = 4; }; }; rootObject = 29B97313FDCFA39411CA2CEA; Index: xc/programs/Xserver/hw/dec/ws/Xdec.man diff -u xc/programs/Xserver/hw/dec/ws/Xdec.man:1.6 xc/programs/Xserver/hw/dec/ws/Xdec.man:1.7 --- xc/programs/Xserver/hw/dec/ws/Xdec.man:1.6 Sat Jan 27 13:20:39 2001 +++ xc/programs/Xserver/hw/dec/ws/Xdec.man Fri Dec 14 14:59:36 2001 @@ -1,8 +1,12 @@ -.\" $Xorg: Xdec.man,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ +.\" $Xorg: Xdec.man,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ .\" Copyright 1991 Digital Equipment Corporation .\" Copyright 1993, 1998 The Open Group .\" -.\" All Rights Reserved. +.\" Permission to use, copy, modify, distribute, and sell this software and its +.\" documentation for any purpose is hereby granted without fee, provided that +.\" the above copyright notice appear in all copies and that both that +.\" copyright notice and this permission notice appear in supporting +.\" documentation. .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. @@ -19,7 +23,7 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" -.\" $XFree86: xc/programs/Xserver/hw/dec/ws/Xdec.man,v 1.6 2001/01/27 18:20:39 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/hw/dec/ws/Xdec.man,v 1.7 2001/12/14 19:59:36 dawes Exp $ .\" .\" from The Open Group. .TH XDEC 1 __xorgversion__ Index: xc/programs/Xserver/hw/dec/ws/acc_2da.c diff -u xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.1.1.3 xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.2 --- xc/programs/Xserver/hw/dec/ws/acc_2da.c:1.1.1.3 Tue Jan 16 17:42:52 2001 +++ xc/programs/Xserver/hw/dec/ws/acc_2da.c Fri Dec 14 14:59:36 2001 @@ -1,9 +1,13 @@ -/* $Xorg: acc_2da.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: acc_2da.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/dec/ws/acc_3d.c diff -u xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.1.1.3 xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.2 --- xc/programs/Xserver/hw/dec/ws/acc_3d.c:1.1.1.3 Tue Jan 16 17:42:52 2001 +++ xc/programs/Xserver/hw/dec/ws/acc_3d.c Fri Dec 14 14:59:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: acc_3d.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: acc_3d.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/dec/ws/acc_none.c diff -u xc/programs/Xserver/hw/dec/ws/acc_none.c:1.1.1.3 xc/programs/Xserver/hw/dec/ws/acc_none.c:1.2 --- xc/programs/Xserver/hw/dec/ws/acc_none.c:1.1.1.3 Tue Jan 16 17:42:52 2001 +++ xc/programs/Xserver/hw/dec/ws/acc_none.c Fri Dec 14 14:59:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: acc_none.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: acc_none.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/dec/ws/cfbinit.c diff -u xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.5 xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.6 --- xc/programs/Xserver/hw/dec/ws/cfbinit.c:1.5 Wed Jan 17 17:36:45 2001 +++ xc/programs/Xserver/hw/dec/ws/cfbinit.c Fri Dec 14 14:59:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: cfbinit.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: cfbinit.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/dec/ws/ext_device.c diff -u xc/programs/Xserver/hw/dec/ws/ext_device.c:1.1.1.3 xc/programs/Xserver/hw/dec/ws/ext_device.c:1.2 --- xc/programs/Xserver/hw/dec/ws/ext_device.c:1.1.1.3 Tue Jan 16 17:42:53 2001 +++ xc/programs/Xserver/hw/dec/ws/ext_device.c Fri Dec 14 14:59:37 2001 @@ -2,7 +2,11 @@ Copyright 1990, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -48,7 +52,7 @@ * */ -/* $Xorg: ext_device.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: ext_device.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #ifdef XINPUT Index: xc/programs/Xserver/hw/dec/ws/init.c diff -u xc/programs/Xserver/hw/dec/ws/init.c:1.1.1.6 xc/programs/Xserver/hw/dec/ws/init.c:1.2 --- xc/programs/Xserver/hw/dec/ws/init.c:1.1.1.6 Tue Jan 16 17:42:53 2001 +++ xc/programs/Xserver/hw/dec/ws/init.c Fri Dec 14 14:59:37 2001 @@ -2,7 +2,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ ******************************************************************/ -/* $Xorg: init.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: init.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #include #include Index: xc/programs/Xserver/hw/dec/ws/keynames.h diff -u xc/programs/Xserver/hw/dec/ws/keynames.h:1.1.1.3 xc/programs/Xserver/hw/dec/ws/keynames.h:1.2 --- xc/programs/Xserver/hw/dec/ws/keynames.h:1.1.1.3 Tue Jan 16 17:42:54 2001 +++ xc/programs/Xserver/hw/dec/ws/keynames.h Fri Dec 14 14:59:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: keynames.h,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: keynames.h,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /*********************************************************** Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/dec/ws/mdepthinit.c diff -u xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.6 xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.7 --- xc/programs/Xserver/hw/dec/ws/mdepthinit.c:1.6 Wed Jan 17 17:36:46 2001 +++ xc/programs/Xserver/hw/dec/ws/mdepthinit.c Fri Dec 14 14:59:37 2001 @@ -1,9 +1,13 @@ -/* $Xorg: mdepthinit.c,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: mdepthinit.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -23,7 +27,7 @@ */ -/* $XFree86: xc/programs/Xserver/hw/dec/ws/mdepthinit.c,v 1.6 2001/01/17 22:36:46 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/dec/ws/mdepthinit.c,v 1.7 2001/12/14 19:59:37 dawes Exp $ */ #include "X.h" #include "Xmd.h" Index: xc/programs/Xserver/hw/dec/ws/ws.h diff -u xc/programs/Xserver/hw/dec/ws/ws.h:1.4 xc/programs/Xserver/hw/dec/ws/ws.h:1.5 --- xc/programs/Xserver/hw/dec/ws/ws.h:1.4 Wed Jan 17 17:36:46 2001 +++ xc/programs/Xserver/hw/dec/ws/ws.h Fri Dec 14 14:59:37 2001 @@ -1,7 +1,11 @@ /************************************************************************ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -39,7 +43,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: ws.h,v 1.3 2000/08/17 19:48:20 cpqbld Exp $ */ +/* $Xorg: ws.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ #ifndef NO_DEC_VALUE_ADDED #define SCREENW6 640 Index: xc/programs/Xserver/hw/dec/ws/ws_color.c diff -u xc/programs/Xserver/hw/dec/ws/ws_color.c:1.4 xc/programs/Xserver/hw/dec/ws/ws_color.c:1.5 --- xc/programs/Xserver/hw/dec/ws/ws_color.c:1.4 Wed Jan 17 17:36:46 2001 +++ xc/programs/Xserver/hw/dec/ws/ws_color.c Fri Dec 14 14:59:37 2001 @@ -2,7 +2,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -40,7 +44,7 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: ws_color.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ +/* $Xorg: ws_color.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* * ws_color.c - device specific color routines, stored in screen Index: xc/programs/Xserver/hw/dec/ws/ws_io.c diff -u xc/programs/Xserver/hw/dec/ws/ws_io.c:1.4 xc/programs/Xserver/hw/dec/ws/ws_io.c:1.5 --- xc/programs/Xserver/hw/dec/ws/ws_io.c:1.4 Wed Jan 17 17:36:46 2001 +++ xc/programs/Xserver/hw/dec/ws/ws_io.c Fri Dec 14 14:59:38 2001 @@ -2,7 +2,11 @@ Copyright 1991, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -41,7 +45,7 @@ ******************************************************************/ -/* $Xorg: ws_io.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ +/* $Xorg: ws_io.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ #include #include Index: xc/programs/Xserver/hw/hp/Xhp.man diff -u xc/programs/Xserver/hw/hp/Xhp.man:1.6 xc/programs/Xserver/hw/hp/Xhp.man:1.7 --- xc/programs/Xserver/hw/hp/Xhp.man:1.6 Sat Jan 27 13:20:40 2001 +++ xc/programs/Xserver/hw/hp/Xhp.man Fri Dec 14 14:59:39 2001 @@ -1,8 +1,12 @@ -.\" $Xorg: Xhp.man,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ +.\" $Xorg: Xhp.man,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ .\" Copyright 1994 Hewlett-Packard Company .\" Copyright 1994, 1998 The Open Group .\" -.\" All Rights Reserved. +.\" Permission to use, copy, modify, distribute, and sell this software and its +.\" documentation for any purpose is hereby granted without fee, provided that +.\" the above copyright notice appear in all copies and that both that +.\" copyright notice and this permission notice appear in supporting +.\" documentation. .\" .\" The above copyright notice and this permission notice shall be included in .\" all copies or substantial portions of the Software. @@ -27,7 +31,7 @@ .\" consequential damages in connection with the furnishing, performance, or .\" use of this material. .\" -.\" $XFree86: xc/programs/Xserver/hw/hp/Xhp.man,v 1.6 2001/01/27 18:20:40 dawes Exp $ +.\" $XFree86: xc/programs/Xserver/hw/hp/Xhp.man,v 1.7 2001/12/14 19:59:39 dawes Exp $ .\" .TH Xhp 1 __xorgversion__ .SH NAME Index: xc/programs/Xserver/hw/hp/hpCursorUtils.c diff -u xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.1.1.4 xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.2 --- xc/programs/Xserver/hw/hp/hpCursorUtils.c:1.1.1.4 Tue Jan 16 17:42:56 2001 +++ xc/programs/Xserver/hw/hp/hpCursorUtils.c Fri Dec 14 14:59:39 2001 @@ -1,4 +1,4 @@ -/* $Xorg: hpCursorUtils.c,v 1.3 2000/08/17 19:48:21 cpqbld Exp $ */ +/* $Xorg: hpCursorUtils.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. @@ -42,7 +42,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/include/hppriv.h diff -u xc/programs/Xserver/hw/hp/include/hppriv.h:1.1.1.3 xc/programs/Xserver/hw/hp/include/hppriv.h:1.2 --- xc/programs/Xserver/hw/hp/include/hppriv.h:1.1.1.3 Tue Jan 16 17:42:58 2001 +++ xc/programs/Xserver/hw/hp/include/hppriv.h Fri Dec 14 14:59:39 2001 @@ -1,4 +1,4 @@ -/* $Xorg: hppriv.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ +/* $Xorg: hppriv.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /************************************************************************* * * (c)Copyright 1992 Hewlett-Packard Co., All Rights Reserved. @@ -21,7 +21,11 @@ Copyright 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/hildef.h diff -u xc/programs/Xserver/hw/hp/input/hildef.h:1.1.1.4 xc/programs/Xserver/hw/hp/input/hildef.h:1.2 --- xc/programs/Xserver/hw/hp/input/hildef.h:1.1.1.4 Tue Jan 16 17:43:00 2001 +++ xc/programs/Xserver/hw/hp/input/hildef.h Fri Dec 14 14:59:40 2001 @@ -1,11 +1,15 @@ #ifndef HILDEF_H #define HILDEF_H -/* $Xorg: hildef.h,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ +/* $Xorg: hildef.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/hpKeyMap.c diff -u xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.3 xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.4 --- xc/programs/Xserver/hw/hp/input/hpKeyMap.c:3.3 Wed Jan 17 17:36:47 2001 +++ xc/programs/Xserver/hw/hp/input/hpKeyMap.c Fri Dec 14 14:59:40 2001 @@ -1,9 +1,13 @@ -/* $Xorg: hpKeyMap.c,v 1.3 2000/08/17 19:48:22 cpqbld Exp $ */ +/* $Xorg: hpKeyMap.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/hpkeys.h diff -u xc/programs/Xserver/hw/hp/input/hpkeys.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/hpkeys.h:1.2 --- xc/programs/Xserver/hw/hp/input/hpkeys.h:1.1.1.3 Tue Jan 16 17:43:02 2001 +++ xc/programs/Xserver/hw/hp/input/hpkeys.h Fri Dec 14 14:59:40 2001 @@ -1,11 +1,15 @@ #ifndef HPKEYS_H #define HPKEYS_H -/* $Xorg: hpkeys.h,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ +/* $Xorg: hpkeys.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/screentab.h diff -u xc/programs/Xserver/hw/hp/input/screentab.h:1.1.1.4 xc/programs/Xserver/hw/hp/input/screentab.h:1.2 --- xc/programs/Xserver/hw/hp/input/screentab.h:1.1.1.4 Tue Jan 16 17:43:02 2001 +++ xc/programs/Xserver/hw/hp/input/screentab.h Fri Dec 14 14:59:40 2001 @@ -1,9 +1,13 @@ -/* $Xorg: screentab.h,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ +/* $Xorg: screentab.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/x_hil.c diff -u xc/programs/Xserver/hw/hp/input/x_hil.c:3.2 xc/programs/Xserver/hw/hp/input/x_hil.c:3.3 --- xc/programs/Xserver/hw/hp/input/x_hil.c:3.2 Wed Jan 17 17:36:47 2001 +++ xc/programs/Xserver/hw/hp/input/x_hil.c Fri Dec 14 14:59:40 2001 @@ -1,4 +1,4 @@ -/* $Xorg: x_hil.c,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ +/* $Xorg: x_hil.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /******************************************************************* ** @@ -24,13 +24,17 @@ ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hil.c,v 3.2 2001/01/17 22:36:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hil.c,v 3.3 2001/12/14 19:59:40 dawes Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/x_hil.h diff -u xc/programs/Xserver/hw/hp/input/x_hil.h:1.1.1.4 xc/programs/Xserver/hw/hp/input/x_hil.h:1.2 --- xc/programs/Xserver/hw/hp/input/x_hil.h:1.1.1.4 Tue Jan 16 17:43:04 2001 +++ xc/programs/Xserver/hw/hp/input/x_hil.h Fri Dec 14 14:59:41 2001 @@ -1,11 +1,15 @@ #ifndef X_HIL_H #define X_HIL_H -/* $Xorg: x_hil.h,v 1.3 2000/08/17 19:48:23 cpqbld Exp $ */ +/* $Xorg: x_hil.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/x_hilinit.c diff -u xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.4 xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.5 --- xc/programs/Xserver/hw/hp/input/x_hilinit.c:3.4 Wed Jan 17 17:36:47 2001 +++ xc/programs/Xserver/hw/hp/input/x_hilinit.c Fri Dec 14 14:59:41 2001 @@ -1,9 +1,13 @@ -/* $Xorg: x_hilinit.c,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ +/* $Xorg: x_hilinit.c,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* Copyright 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -46,7 +50,7 @@ University of California. */ -/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hilinit.c,v 3.4 2001/01/17 22:36:47 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/hp/input/x_hilinit.c,v 3.5 2001/12/14 19:59:41 dawes Exp $ */ #define NEED_EVENTS #define NITEMS(array) (sizeof(array)/sizeof(array[0])) Index: xc/programs/Xserver/hw/hp/input/x_hilinit.h diff -u xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.1.1.3 xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.2 --- xc/programs/Xserver/hw/hp/input/x_hilinit.h:1.1.1.3 Tue Jan 16 17:43:06 2001 +++ xc/programs/Xserver/hw/hp/input/x_hilinit.h Fri Dec 14 14:59:41 2001 @@ -1,11 +1,15 @@ #ifndef X_HILINIT_H #define X_HILINIT_H -/* $Xorg: x_hilinit.h,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ +/* $Xorg: x_hilinit.h,v 1.4 2001/02/09 02:04:42 xorgcvs Exp $ */ /* Copyright 1986, 1987, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/hp/input/xtest1imp.c diff -u xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.1.1.4 xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.2 --- xc/programs/Xserver/hw/hp/input/xtest1imp.c:1.1.1.4 Tue Jan 16 17:43:07 2001 +++ xc/programs/Xserver/hw/hp/input/xtest1imp.c Fri Dec 14 14:59:41 2001 @@ -1,4 +1,4 @@ -/* $Xorg: xtest1imp.c,v 1.3 2000/08/17 19:48:24 cpqbld Exp $ */ +/* $Xorg: xtest1imp.c,v 1.4 2001/02/09 02:04:43 xorgcvs Exp $ */ /* * File: xtest1dd.c * @@ -11,7 +11,11 @@ Copyright 1986, 1987, 1988, 1998 The Open Group -All Rights Reserved. +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Index: xc/programs/Xserver/hw/kdrive/Imakefile diff -u xc/programs/Xserver/hw/kdrive/Imakefile:1.6 xc/programs/Xserver/hw/kdrive/Imakefile:1.8 --- xc/programs/Xserver/hw/kdrive/Imakefile:1.6 Thu Mar 29 21:15:19 2001 +++ xc/programs/Xserver/hw/kdrive/Imakefile Tue May 29 00:54:10 2001 @@ -1,5 +1,5 @@ XCOMM $XConsortium: Imakefile /main/10 1996/12/02 10:20:33 lehors $ -XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Imakefile,v 1.6 2001/03/30 02:15:19 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Imakefile,v 1.8 2001/05/29 04:54:10 keithp Exp $ KDRIVE=. #include "Kdrive.tmpl" @@ -13,10 +13,14 @@ XVOBJS=kxv.o #endif -SRCS = kcmap.c kcolor.c kdrive.c kinfo.c kinput.c kmap.c knoop.c ktest.c \ +#if XipaqServer +DEFINES = -DXIPAQ +#endif + +SRCS = kaa.c kcmap.c kcolor.c kdrive.c kinfo.c kinput.c kmap.c knoop.c ktest.c \ vga.c kasync.c kmode.c kcurscol.c kshadow.c $(RENDERSRCS) $(XVSRCS) -OBJS = kcmap.o kcolor.o kdrive.o kinfo.o kinput.o kmap.o knoop.o ktest.o \ +OBJS = kaa.o kcmap.o kcolor.o kdrive.o kinfo.o kinput.o kmap.o knoop.o ktest.o \ vga.o kasync.o kmode.o kcurscol.o kshadow.o $(RENDEROBJS) $(XVOBJS) INCLUDES = $(KDINCS) Index: xc/programs/Xserver/hw/kdrive/Kdrive.tmpl diff -u xc/programs/Xserver/hw/kdrive/Kdrive.tmpl:1.1 xc/programs/Xserver/hw/kdrive/Kdrive.tmpl:1.4 --- xc/programs/Xserver/hw/kdrive/Kdrive.tmpl:1.1 Sun Sep 3 01:11:46 2000 +++ xc/programs/Xserver/hw/kdrive/Kdrive.tmpl Mon Oct 29 11:34:56 2001 @@ -1,13 +1,17 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Kdrive.tmpl,v 1.1 2000/09/03 05:11:46 keithp Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/kdrive/Kdrive.tmpl,v 1.4 2001/10/29 16:34:56 tsi Exp $ #include #if BuildRender -RENDERINCS=-I$(KDRIVE)/../../render -I$(EXTINCSRC) +RENDERINCS=-I$(KDRIVE)/../../render #endif +#if BuildRandR +RANDRINCS=-I$(KDRIVE)/../../randr +#endif + KDINCS = -I$(KDRIVE) -I$(XBUILDINCDIR) -I$(FONTINCSRC) \ - -I$(KDRIVE)/../../fb -I$(KDRIVE)/../../mi \ - -I$(KDRIVE)/../../miext/shadow \ + -I$(KDRIVE)/../../fb -I$(KDRIVE)/../../mi -I$(KDRIVE)/../../Xext \ + -I$(KDRIVE)/../../miext/shadow -I$(KDRIVE)/../../miext/layer \ -I$(KDRIVE)/../../include -I$(KDRIVE)/../../os \ - -I$(EXTINCSRC) -I$(XINCLUDESRC) $(RENDERINCS) + -I$(EXTINCSRC) -I$(XINCLUDESRC) $(RENDERINCS) $(RANDRINCS) Index: xc/programs/Xserver/hw/kdrive/kaa.c diff -u /dev/null xc/programs/Xserver/hw/kdrive/kaa.c:1.5 --- /dev/null Fri Jan 18 15:24:42 2002 +++ xc/programs/Xserver/hw/kdrive/kaa.c Fri Jun 29 09:55:53 2001 @@ -0,0 +1,636 @@ +/* + * $XFree86: xc/programs/Xserver/hw/kdrive/kaa.c,v 1.5 2001/06/29 13:55:53 keithp Exp $ + * + * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include "kdrive.h" +#include "fontstruct.h" +#include "dixfontstr.h" + +int kaaGeneration; +int kaaScreenPrivateIndex; + +#define KaaScreenPriv(s) KaaScreenPrivPtr pKaaScr = (KaaScreenPrivPtr) (s)->devPrivates[kaaScreenPrivateIndex].ptr + +void +kaaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, + DDXPointPtr ppt, int *pwidth, int fSorted) +{ + ScreenPtr pScreen = pDrawable->pScreen; + KdScreenPriv (pScreen); + KaaScreenPriv (pScreen); + RegionPtr pClip = fbGetCompositeClip(pGC); + BoxPtr pextent, pbox; + int nbox; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1; + int partX1, partX2; + + if (!pScreenPriv->enabled || + pGC->fillStyle != FillSolid || + !(*pKaaScr->PrepareSolid) (pDrawable, + pGC->alu, + pGC->planemask, + pGC->fgPixel)) + { + KdCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); + return; + } + + pextent = REGION_EXTENTS(pGC->pScreen, pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (n--) + { + fullX1 = ppt->x; + fullY1 = ppt->y; + fullX2 = fullX1 + (int) *pwidth; + ppt++; + pwidth++; + + if (fullY1 < extentY1 || extentY2 <= fullY1) + continue; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullX1 >= fullX2) + continue; + + nbox = REGION_NUM_RECTS (pClip); + if (nbox == 1) + { + (*pKaaScr->Solid) (fullX1, fullY1, fullX2, fullY1 + 1); + } + else + { + pbox = REGION_RECTS(pClip); + while(nbox--) + { + if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) + { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + if (partX2 > partX1) + (*pKaaScr->Solid) (partX1, fullY1, partX2, fullY1 + 1); + } + pbox++; + } + } + } + (*pKaaScr->DoneSolid) (); + KdMarkSync(pDrawable->pScreen); +} + +void +kaaCopyNtoN (DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + BoxPtr pbox, + int nbox, + int dx, + int dy, + Bool reverse, + Bool upsidedown, + Pixel bitplane, + void *closure) +{ + KdScreenPriv (pDstDrawable->pScreen); + KaaScreenPriv (pDstDrawable->pScreen); + int srcX, srcY, dstX, dstY; + int w, h; + CARD32 flags; + CARD32 cmd; + CARD8 alu; + + if (pScreenPriv->enabled && + pSrcDrawable->type == DRAWABLE_WINDOW && + (*pKaaScr->PrepareCopy) (pSrcDrawable, + pDstDrawable, + dx, + dy, + pGC ? pGC->alu : GXcopy, + pGC ? pGC->planemask : FB_ALLONES)) + { + while (nbox--) + { + (*pKaaScr->Copy) (pbox->x1 + dx, pbox->y1 + dy, + pbox->x1, pbox->y1, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + pbox++; + } + (*pKaaScr->DoneCopy) (); + KdMarkSync(pDstDrawable->pScreen); + } + else + { + KdCheckSync (pDstDrawable->pScreen); + fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, + pbox, nbox, dx, dy, reverse, upsidedown, + bitplane, closure); + } +} + +RegionPtr +kaaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, + int srcx, int srcy, int width, int height, int dstx, int dsty) +{ + return fbDoCopy (pSrcDrawable, pDstDrawable, pGC, + srcx, srcy, width, height, + dstx, dsty, kaaCopyNtoN, 0, 0); +} + +void +kaaPolyFillRect(DrawablePtr pDrawable, + GCPtr pGC, + int nrect, + xRectangle *prect) +{ + KdScreenPriv (pDrawable->pScreen); + KaaScreenPriv (pDrawable->pScreen); + RegionPtr pClip = fbGetCompositeClip(pGC); + register BoxPtr pbox; + BoxPtr pextent; + int extentX1, extentX2, extentY1, extentY2; + int fullX1, fullX2, fullY1, fullY2; + int partX1, partX2, partY1, partY2; + int xorg, yorg; + int n; + + if (!pScreenPriv->enabled || + pGC->fillStyle != FillSolid || + !(*pKaaScr->PrepareSolid) (pDrawable, + pGC->alu, + pGC->planemask, + pGC->fgPixel)) + { + KdCheckPolyFillRect (pDrawable, pGC, nrect, prect); + return; + } + + xorg = pDrawable->x; + yorg = pDrawable->y; + + pextent = REGION_EXTENTS(pGC->pScreen, pClip); + extentX1 = pextent->x1; + extentY1 = pextent->y1; + extentX2 = pextent->x2; + extentY2 = pextent->y2; + while (nrect--) + { + fullX1 = prect->x + xorg; + fullY1 = prect->y + yorg; + fullX2 = fullX1 + (int) prect->width; + fullY2 = fullY1 + (int) prect->height; + prect++; + + if (fullX1 < extentX1) + fullX1 = extentX1; + + if (fullY1 < extentY1) + fullY1 = extentY1; + + if (fullX2 > extentX2) + fullX2 = extentX2; + + if (fullY2 > extentY2) + fullY2 = extentY2; + + if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) + continue; + n = REGION_NUM_RECTS (pClip); + if (n == 1) + { + (*pKaaScr->Solid) (fullX1, fullY1, fullX2, fullY2); + } + else + { + pbox = REGION_RECTS(pClip); + /* + * clip the rectangle to each box in the clip region + * this is logically equivalent to calling Intersect() + */ + while(n--) + { + partX1 = pbox->x1; + if (partX1 < fullX1) + partX1 = fullX1; + partY1 = pbox->y1; + if (partY1 < fullY1) + partY1 = fullY1; + partX2 = pbox->x2; + if (partX2 > fullX2) + partX2 = fullX2; + partY2 = pbox->y2; + if (partY2 > fullY2) + partY2 = fullY2; + + pbox++; + + if (partX1 < partX2 && partY1 < partY2) + (*pKaaScr->Solid) (partX1, partY1, + partX2, partY2); + } + } + } + (*pKaaScr->DoneSolid) (); + KdMarkSync(pDrawable->pScreen); +} + +void +kaaSolidBoxClipped (DrawablePtr pDrawable, + RegionPtr pClip, + FbBits pm, + FbBits fg, + int x1, + int y1, + int x2, + int y2) +{ + KdScreenPriv (pDrawable->pScreen); + KaaScreenPriv (pDrawable->pScreen); + BoxPtr pbox; + int nbox; + int partX1, partX2, partY1, partY2; + CARD32 cmd; + + if (!pScreenPriv->enabled || + !(*pKaaScr->PrepareSolid) (pDrawable, GXcopy, pm, fg)) + { + KdCheckSync (pDrawable->pScreen); + fg = fbReplicatePixel (fg, pDrawable->bitsPerPixel); + fbSolidBoxClipped (pDrawable, pClip, x1, y1, x2, y2, + fbAnd (GXcopy, fg, pm), + fbXor (GXcopy, fg, pm)); + return; + } + for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip); + nbox--; + pbox++) + { + partX1 = pbox->x1; + if (partX1 < x1) + partX1 = x1; + + partX2 = pbox->x2; + if (partX2 > x2) + partX2 = x2; + + if (partX2 <= partX1) + continue; + + partY1 = pbox->y1; + if (partY1 < y1) + partY1 = y1; + + partY2 = pbox->y2; + if (partY2 > y2) + partY2 = y2; + + if (partY2 <= partY1) + continue; + + (*pKaaScr->Solid) (partX1, partY1, partX2, partY2); + } + (*pKaaScr->DoneSolid) (); + KdMarkSync(pDrawable->pScreen); +} + +void +kaaImageGlyphBlt (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppciInit, + pointer pglyphBase) +{ + KaaScreenPriv (pDrawable->pScreen); + FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); + CharInfoPtr *ppci; + CharInfoPtr pci; + unsigned char *pglyph; /* pointer bits in glyph */ + int gWidth, gHeight; /* width and height of glyph */ + FbStride gStride; /* stride of glyph */ + Bool opaque; + int n; + int gx, gy; + void (*glyph) (FbBits *, + FbStride, + int, + FbStip *, + FbBits, + int, + int); + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbBits depthMask; + + depthMask = FbFullMask(pDrawable->depth); + if ((pGC->planemask & depthMask) != depthMask) + { + KdCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); + return; + } + glyph = 0; + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + switch (dstBpp) { + case 8: glyph = fbGlyph8; break; + case 16: glyph = fbGlyph16; break; + case 24: glyph = fbGlyph24; break; + case 32: glyph = fbGlyph32; break; + } + + x += pDrawable->x; + y += pDrawable->y; + + if (TERMINALFONT (pGC->font) && !glyph) + { + opaque = TRUE; + } + else + { + int xBack, widthBack; + int yBack, heightBack; + + ppci = ppciInit; + n = nglyph; + widthBack = 0; + while (n--) + widthBack += (*ppci++)->metrics.characterWidth; + + xBack = x; + if (widthBack < 0) + { + xBack += widthBack; + widthBack = -widthBack; + } + yBack = y - FONTASCENT(pGC->font); + heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); + kaaSolidBoxClipped (pDrawable, + fbGetCompositeClip(pGC), + pGC->planemask, + pGC->bgPixel, + xBack, + yBack, + xBack + widthBack, + yBack + heightBack); + opaque = FALSE; + } + + KdCheckSync (pDrawable->pScreen); + + ppci = ppciInit; + while (nglyph--) + { + pci = *ppci++; + pglyph = FONTGLYPHBITS(pglyphBase, pci); + gWidth = GLYPHWIDTHPIXELS(pci); + gHeight = GLYPHHEIGHTPIXELS(pci); + if (gWidth && gHeight) + { + gx = x + pci->metrics.leftSideBearing; + gy = y - pci->metrics.ascent; + if (glyph && gWidth <= sizeof (FbStip) * 8 && + fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) + { + (*glyph) (dst + (gy - dstYoff) * dstStride, + dstStride, + dstBpp, + (FbStip *) pglyph, + pPriv->fg, + gx - dstXoff, + gHeight); + } + else + { + gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip); + fbPutXYImage (pDrawable, + fbGetCompositeClip(pGC), + pPriv->fg, + pPriv->bg, + pPriv->pm, + GXcopy, + opaque, + + gx, + gy, + gWidth, gHeight, + + (FbStip *) pglyph, + gStride, + 0); + } + } + x += pci->metrics.characterWidth; + } +} + +static const GCOps kaaOps = { + kaaFillSpans, + KdCheckSetSpans, + KdCheckPutImage, + kaaCopyArea, + KdCheckCopyPlane, + KdCheckPolyPoint, + KdCheckPolylines, + KdCheckPolySegment, + miPolyRectangle, + KdCheckPolyArc, + miFillPolygon, + kaaPolyFillRect, + miPolyFillArc, + miPolyText8, + miPolyText16, + miImageText8, + miImageText16, + kaaImageGlyphBlt, + KdCheckPolyGlyphBlt, + KdCheckPushPixels, +#ifdef NEED_LINEHELPER + ,NULL +#endif +}; + +void +kaaValidateGC (GCPtr pGC, Mask changes, DrawablePtr pDrawable) +{ + FbGCPrivPtr fbPriv = fbGetGCPrivate(pGC); + + fbValidateGC (pGC, changes, pDrawable); + + if (pDrawable->type == DRAWABLE_WINDOW) + pGC->ops = (GCOps *) &kaaOps; + else + pGC->ops = (GCOps *) &kdAsyncPixmapGCOps; +} + +GCFuncs kaaGCFuncs = { + kaaValidateGC, + miChangeGC, + miCopyGC, + miDestroyGC, + miChangeClip, + miDestroyClip, + miCopyClip +}; + +int +kaaCreateGC (GCPtr pGC) +{ + if (!fbCreateGC (pGC)) + return FALSE; + + pGC->funcs = &kaaGCFuncs; + + return TRUE; +} + +void +kaaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + KaaScreenPriv (pScreen); + RegionRec rgnDst; + int dx, dy; + WindowPtr pwinRoot; + + pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + + REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0); + + REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + fbCopyRegion ((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, + 0, + &rgnDst, dx, dy, kaaCopyNtoN, 0, 0); + + REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); +} + +void +kaaFillRegionSolid (DrawablePtr pDrawable, + RegionPtr pRegion, + Pixel pixel) +{ + KdScreenPriv(pDrawable->pScreen); + KaaScreenPriv(pDrawable->pScreen); + + if (pScreenPriv->enabled && + (*pKaaScr->PrepareSolid) (pDrawable, GXcopy, FB_ALLONES, pixel)) + { + int nbox = REGION_NUM_RECTS (pRegion); + BoxPtr pBox = REGION_RECTS (pRegion); + + while (nbox--) + { + (*pKaaScr->Solid) (pBox->x1, pBox->y1, pBox->x2, pBox->y2); + pBox++; + } + (*pKaaScr->DoneSolid) (); + KdMarkSync(pDrawable->pScreen); + } + else + { + KdCheckSync (pDrawable->pScreen); + fbFillRegionSolid (pDrawable, pRegion, 0, + fbReplicatePixel (pixel, pDrawable->bitsPerPixel)); + } +} + +void +kaaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) +{ + PixmapPtr pTile; + + if (!REGION_NUM_RECTS(pRegion)) + return; + switch (what) { + case PW_BACKGROUND: + switch (pWin->backgroundState) { + case None: + return; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + return; + case BackgroundPixel: + kaaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel); + return; + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) + { + kaaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel); + return; + } + break; + } + KdCheckPaintWindow (pWin, pRegion, what); +} + +Bool +kaaDrawInit (ScreenPtr pScreen, + KaaScreenPrivPtr pScreenPriv) +{ + if (kaaGeneration != serverGeneration) + { + kaaScreenPrivateIndex = AllocateScreenPrivateIndex(); + kaaGeneration = serverGeneration; + } + pScreen->devPrivates[kaaScreenPrivateIndex].ptr = (pointer) pScreenPriv; + + /* + * Hook up asynchronous drawing + */ + KdScreenInitAsync (pScreen); + /* + * Replace various fb screen functions + */ + pScreen->CreateGC = kaaCreateGC; + pScreen->CopyWindow = kaaCopyWindow; + pScreen->PaintWindowBackground = kaaPaintWindow; + pScreen->PaintWindowBorder = kaaPaintWindow; + + return TRUE; +} + Index: xc/programs/Xserver/hw/kdrive/kasync.c diff -u xc/programs/Xserver/hw/kdrive/kasync.c:1.8 xc/programs/Xserver/hw/kdrive/kasync.c:1.9 --- xc/programs/Xserver/hw/kdrive/kasync.c:1.8 Thu Mar 29 21:15:19 2001 +++ xc/programs/Xserver/hw/kdrive/kasync.c Mon Jun 4 05:45:41 2001 @@ -21,7 +21,7 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kasync.c,v 1.8 2001/03/30 02:15:19 keithp Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/kdrive/kasync.c,v 1.9 2001/06/04 09:45:41 keithp Exp $ */ #include "kdrive.h" @@ -60,7 +60,8 @@ KdCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty) { - KdCheckSync (pSrc->pScreen); + if (pSrc->type == DRAWABLE_WINDOW || pDst->type == DRAWABLE_WINDOW) + KdCheckSync (pSrc->pScreen); return fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); } @@ -69,7 +70,8 @@ int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane) { - KdCheckSync (pSrc->pScreen); + if (pSrc->type == DRAWABLE_WINDOW || pDst->type == DRAWABLE_WINDOW) + KdCheckSync (pSrc->pScreen); return fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); } Index: xc/programs/Xserver/hw/kdrive/kdrive.c diff -u xc/programs/Xserver/hw/kdrive/kdrive.c:1.12 xc/programs/Xserver/hw/kdrive/kdrive.c:1.22 --- xc/programs/Xserver/hw/kdrive/kdrive.c:1.12 Thu Mar 29 21:15:20 2001 +++ xc/programs/Xserver/hw/kdrive/kdrive.c Mon Oct 29 11:34:56 2001 @@ -1,5 +1,5 @@ /* - * Id: kdrive.c,v 1.1 1999/11/02 03:54:46 keithp Exp $ + * $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.22 2001/10/29 16:34:56 tsi Exp $ * * Copyright © 1999 Keith Packard * @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/kdrive.c,v 1.12 2001/03/30 02:15:20 keithp Exp $ */ #include "kdrive.h" #ifdef PSEUDO8 @@ -34,6 +33,10 @@ #include "kxv.h" #endif +#ifdef DPMSExtension +#include "dpmsproc.h" +#endif + CARD8 kdBpp[] = { 1, 4, 8, 16, 24, 32 }; #define NUM_KD_BPP (sizeof (kdBpp) / sizeof (kdBpp[0])) @@ -47,6 +50,7 @@ Bool kdDisableZaphod; Bool kdEnabled; Bool kdSwitchPending; +DDXPointRec kdOrigin; /* * Carry arguments from InitOutput through driver initialization @@ -105,6 +109,10 @@ box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; + pWin->drawable.width = pScreen->width; + pWin->drawable.height = pScreen->height; + REGION_INIT (pScreen, &pWin->winSize, &box, 1); + REGION_INIT (pScreen, &pWin->borderSize, &box, 1); REGION_RESET(pScreen, &pWin->borderClip, &box); REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); } @@ -207,14 +215,13 @@ } void -KdDisableScreens (void) +KdSuspend (void) { KdCardInfo *card; KdScreenInfo *screen; if (kdEnabled) { - kdEnabled = FALSE; for (card = kdCardInfo; card; card = card->next) { for (screen = card->screenList; screen; screen = screen->next) @@ -223,11 +230,21 @@ if (card->driver) (*card->cfuncs->restore) (card); } - (*kdOsFuncs->Disable) (); KdDisableInput (); } } +void +KdDisableScreens (void) +{ + KdSuspend (); + if (kdEnabled) + { + (*kdOsFuncs->Disable) (); + kdEnabled = FALSE; + } +} + Bool KdEnableScreen (ScreenPtr pScreen) { @@ -251,15 +268,13 @@ } void -KdEnableScreens (void) +KdResume (void) { KdCardInfo *card; KdScreenInfo *screen; - if (!kdEnabled) + if (kdEnabled) { - kdEnabled = TRUE; - (*kdOsFuncs->Enable) (); for (card = kdCardInfo; card; card = card->next) { (*card->cfuncs->preserve) (card); @@ -268,7 +283,22 @@ KdEnableScreen (screen->pScreen); } KdEnableInput (); + KdReleaseAllKeys (); + } +} + +void +KdEnableScreens (void) +{ + KdCardInfo *card; + KdScreenInfo *screen; + + if (!kdEnabled) + { + kdEnabled = TRUE; + (*kdOsFuncs->Enable) (); } + KdResume (); } void @@ -278,7 +308,6 @@ KdDisableScreens (); else { - KdReleaseAllKeys (); KdEnableScreens (); } } @@ -336,8 +365,8 @@ screen->dumb = kdDumbDriver; screen->softCursor = kdSoftCursor; - kdDumbDriver = FALSE; - kdSoftCursor = FALSE; + screen->origin = kdOrigin; + screen->rotation = 0; screen->width = 0; screen->height = 0; screen->width_mm = 0; @@ -347,12 +376,12 @@ screen->fb[fb].depth = 0; if (!arg) return; - if (strlen (arg) > sizeof (save)) + if (strlen (arg) >= sizeof (save)) return; for (i = 0; i < 2; i++) { - arg = KdParseFindNext (arg, "x/", save, &delim); + arg = KdParseFindNext (arg, "x/@", save, &delim); if (!save[0]) return; @@ -361,7 +390,7 @@ if (delim == '/') { - arg = KdParseFindNext (arg, "x", save, &delim); + arg = KdParseFindNext (arg, "x@", save, &delim); if (!save[0]) return; mm = atoi(save); @@ -377,10 +406,34 @@ screen->height = pixels; screen->height_mm = mm; } - if (delim != 'x') + if (delim != 'x' && delim != '@') return; } + + kdOrigin.x += screen->width; + kdOrigin.y = 0; + kdDumbDriver = FALSE; + kdSoftCursor = FALSE; + if (delim == '@') + { + arg = KdParseFindNext (arg, "x", save, &delim); + if (save[0]) + { + screen->rotation = atoi (save); + if (screen->rotation < 45) + screen->rotation = 0; + else if (screen->rotation < 135) + screen->rotation = 90; + else if (screen->rotation < 225) + screen->rotation = 180; + else if (screen->rotation < 315) + screen->rotation = 270; + else + screen->rotation = 0; + } + } + fb = 0; while (fb < KD_MAX_FB) { @@ -410,6 +463,114 @@ } } +/* + * Mouse argument syntax: + * + * device,protocol,options... + * + * Options are any of: + * 1-5 n button mouse + * 2button emulate middle button + * {NMO} Reorder buttons + */ + +char * +KdSaveString (char *str) +{ + char *n = (char *) xalloc (strlen (str) + 1); + + if (!n) + return 0; + strcpy (n, str); + return n; +} + +/* + * Parse mouse information. Syntax: + * + * ,,{,