dtudcfonted, dtudcexch: delete from repository
This commit is contained in:
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: font.h /main/1 1995/09/14 20:54:34 cde-fuj2 $ */
|
||||
/***********************************************************
|
||||
Copyright 1987 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.
|
||||
|
||||
(c) Copyright 1995 FUJITSU LIMITED
|
||||
This is source code modified by FUJITSU LIMITED under the Joint
|
||||
Development Agreement for the CDEnext PST.
|
||||
This is unpublished proprietary source code of FUJITSU LIMITED
|
||||
|
||||
******************************************************************/
|
||||
#ifndef FONT_H
|
||||
#define FONT_H 1
|
||||
|
||||
#include "servermd.h"
|
||||
|
||||
#define NullCharInfo ((CharInfoPtr)0)
|
||||
#define NullFontInfo ((FontInfoPtr)0)
|
||||
#define LeftToRight 0
|
||||
#define RightToLeft 1
|
||||
/*
|
||||
* for linear char sets
|
||||
*/
|
||||
#define n1dChars(pfi) ((pfi)->lastCol - (pfi)->firstCol + 1)
|
||||
#define chFirst firstCol /* usage: pfi->chFirst */
|
||||
#define chLast lastCol /* usage: pfi->chLast */
|
||||
|
||||
/*
|
||||
* for 2D char sets
|
||||
*/
|
||||
#define n2dChars(pfi) (((pfi)->lastCol - (pfi)->firstCol + 1) * \
|
||||
((pfi)->lastRow - (pfi)->firstRow + 1))
|
||||
|
||||
#define ADDRXTHISCHARINFO( pf, ch ) \
|
||||
((CharInfoRec *) &((pf)->pCI[(ch) - (pf)->pFI->chFirst]))
|
||||
|
||||
#define GLWIDTHPIXELS(pci) \
|
||||
((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing)
|
||||
#define GLHEIGHTPIXELS(pci) \
|
||||
((pci)->metrics.ascent + (pci)->metrics.descent)
|
||||
|
||||
|
||||
#define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3)
|
||||
#define GLYPHHEIGHTPIXELS(pci) (pci->metrics.ascent + pci->metrics.descent)
|
||||
#define GLYPHWIDTHPIXELS(pci) (pci->metrics.rightSideBearing \
|
||||
- pci->metrics.leftSideBearing)
|
||||
#define GLWIDTHPADDED( bc) ((bc+7) & ~0x7)
|
||||
|
||||
#if GLYPHPADBYTES == 0 || GLYPHPADBYTES == 1
|
||||
#define GLYPHWIDTHBYTESPADDED(pci) (GLYPHWIDTHBYTES(pci))
|
||||
#define PADGLYPHWIDTHBYTES(w) (((w)+7)>>3)
|
||||
#endif
|
||||
|
||||
#if GLYPHPADBYTES == 2
|
||||
#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+1) & ~0x1)
|
||||
#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+1) & ~0x1)
|
||||
#endif
|
||||
|
||||
#if GLYPHPADBYTES == 4
|
||||
#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+3) & ~0x3)
|
||||
#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+3) & ~0x3)
|
||||
#endif
|
||||
|
||||
#if GLYPHPADBYTES == 8 /* for a cray? */
|
||||
#define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+7) & ~0x7)
|
||||
#define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+7) & ~0x7)
|
||||
#endif
|
||||
|
||||
typedef struct _FontProp *FontPropPtr;
|
||||
typedef struct _CharInfo *CharInfoPtr;
|
||||
typedef struct _FontInfo *FontInfoPtr;
|
||||
typedef unsigned int DrawDirection;
|
||||
typedef struct _ExtentInfo *ExtentInfoPtr;
|
||||
|
||||
|
||||
#endif /* FONT_H */
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: fontstruct.h /main/3 1996/04/08 15:58:01 cde-fuj $ */
|
||||
/***********************************************************
|
||||
Copyright 1987 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.
|
||||
|
||||
(c) Copyright 1995 FUJITSU LIMITED
|
||||
This is source code modified by FUJITSU LIMITED under the Joint
|
||||
Development Agreement for the CDEnext PST.
|
||||
This is unpublished proprietary source code of FUJITSU LIMITED
|
||||
|
||||
******************************************************************/
|
||||
#ifndef FONTSTRUCT_H
|
||||
#define FONTSTRUCT_H 1
|
||||
#include "font.h"
|
||||
#include "misc.h"
|
||||
|
||||
typedef struct _CharInfo {
|
||||
xCharInfo metrics; /* info preformatted for Queries */
|
||||
unsigned byteOffset:24; /* byte offset of the raster from pGlyphs */
|
||||
Bool exists:1; /* true iff glyph exists for this char */
|
||||
unsigned pad:7; /* must be zero for now */
|
||||
} CharInfoRec;
|
||||
|
||||
typedef struct _FontInfo {
|
||||
unsigned int version1; /* version stamp */
|
||||
unsigned int allExist;
|
||||
unsigned int drawDirection;
|
||||
unsigned int noOverlap; /* true if:
|
||||
* max(rightSideBearing-characterWidth)
|
||||
* <= minbounds->metrics.leftSideBearing
|
||||
*/
|
||||
unsigned int constantMetrics;
|
||||
unsigned int terminalFont; /* Should be deprecated! true if:
|
||||
constant metrics &&
|
||||
leftSideBearing == 0 &&
|
||||
rightSideBearing == characterWidth &&
|
||||
ascent == fontAscent &&
|
||||
descent == fontDescent
|
||||
*/
|
||||
unsigned int linear:1; /* true if firstRow == lastRow */
|
||||
unsigned int constantWidth:1; /* true if minbounds->metrics.characterWidth
|
||||
* == maxbounds->metrics.characterWidth
|
||||
*/
|
||||
unsigned int inkInside:1; /* true if for all defined glyphs:
|
||||
* leftSideBearing >= 0 &&
|
||||
* rightSideBearing <= characterWidth &&
|
||||
* -fontDescent <= ascent <= fontAscent &&
|
||||
* -fontAscent <= descent <= fontDescent
|
||||
*/
|
||||
unsigned int inkMetrics:1; /* ink metrics != bitmap metrics */
|
||||
/* used with terminalFont */
|
||||
/* see font's pInk{CI,Min,Max} */
|
||||
unsigned int padding:28;
|
||||
unsigned int firstCol;
|
||||
unsigned int lastCol;
|
||||
unsigned int firstRow;
|
||||
unsigned int lastRow;
|
||||
unsigned int nProps;
|
||||
unsigned int lenStrings; /* length in bytes of string table */
|
||||
unsigned int chDefault; /* default character */
|
||||
int fontDescent; /* minimum for quality typography */
|
||||
int fontAscent; /* minimum for quality typography */
|
||||
CharInfoRec minbounds; /* MIN of glyph metrics over all chars */
|
||||
CharInfoRec maxbounds; /* MAX of glyph metrics over all chars */
|
||||
unsigned int pixDepth; /* intensity bits per pixel */
|
||||
unsigned int glyphSets; /* number of sets of glyphs, for
|
||||
sub-pixel positioning */
|
||||
unsigned int version2; /* version stamp double-check */
|
||||
} FontInfoRec;
|
||||
|
||||
typedef struct _ExtentInfo {
|
||||
DrawDirection drawDirection;
|
||||
int fontAscent;
|
||||
int fontDescent;
|
||||
int overallAscent;
|
||||
int overallDescent;
|
||||
int overallWidth;
|
||||
int overallLeft;
|
||||
int overallRight;
|
||||
} ExtentInfoRec;
|
||||
|
||||
#endif /* FONTSTRUCT_H */
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: misc.h /main/7 1996/04/08 15:58:10 cde-fuj $ */
|
||||
/***********************************************************
|
||||
Copyright 1987 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.
|
||||
|
||||
(c) Copyright 1995 FUJITSU LIMITED
|
||||
This is source code modified by FUJITSU LIMITED under the Joint
|
||||
Development Agreement for the CDEnext PST.
|
||||
This is unpublished proprietary source code of FUJITSU LIMITED
|
||||
|
||||
******************************************************************/
|
||||
#ifndef MISC_H
|
||||
#define MISC_H 1
|
||||
/*
|
||||
* X internal definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
extern unsigned long globalSerialNumber;
|
||||
extern unsigned long serverGeneration;
|
||||
|
||||
#ifndef NULL
|
||||
#if __STDC__ && !NOSTDHDRS
|
||||
#include <stddef.h>
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MAXSCREENS 3
|
||||
#define MAXCLIENTS 128
|
||||
#define MAXFORMATS 8
|
||||
#define MAXVISUALS_PER_SCREEN 50
|
||||
|
||||
typedef unsigned char *pointer;
|
||||
typedef int Bool;
|
||||
typedef unsigned long PIXEL;
|
||||
typedef unsigned long ATOM;
|
||||
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
|
||||
|
||||
#define NullBox ((BoxPtr)0)
|
||||
#define MILLI_PER_MIN (1000 * 60)
|
||||
#define MILLI_PER_SECOND (1000)
|
||||
|
||||
/* this next is used with None and ParentRelative to tell
|
||||
PaintWin() what to use to paint the background. Also used
|
||||
in the macro IS_VALID_PIXMAP */
|
||||
|
||||
#define USE_BACKGROUND_PIXEL 3
|
||||
#define USE_BORDER_PIXEL 3
|
||||
|
||||
|
||||
/* byte swap a long literal */
|
||||
#define lswapl(x) ((((x) & 0xff) << 24) |\
|
||||
(((x) & 0xff00) << 8) |\
|
||||
(((x) & 0xff0000) >> 8) |\
|
||||
(((x) >> 24) & 0xff))
|
||||
|
||||
/* byte swap a short literal */
|
||||
#define lswaps(x) ((((x) & 0xff) << 8) | (((x) >> 8) & 0xff))
|
||||
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#ifndef abs
|
||||
#define abs(a) ((a) > 0 ? (a) : -(a))
|
||||
#endif
|
||||
#ifndef fabs
|
||||
#define fabs(a) ((a) > 0.0 ? (a) : -(a)) /* floating absolute value */
|
||||
#endif
|
||||
#define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
|
||||
/* this assumes b > 0 */
|
||||
#define modulus(a, b, d) if (((d) = (a) % (b)) < 0) (d) += (b)
|
||||
/*
|
||||
* return the least significant bit in x which is set
|
||||
*
|
||||
* This works on 1's complement and 2's complement machines.
|
||||
* If you care about the extra instruction on 2's complement
|
||||
* machines, change to ((x) & (-(x)))
|
||||
*/
|
||||
#define lowbit(x) ((x) & (~(x) + 1))
|
||||
|
||||
#define MAXSHORT 32767
|
||||
#define MINSHORT -MAXSHORT
|
||||
|
||||
|
||||
/* some macros to help swap requests, replies, and events */
|
||||
|
||||
#define LengthRestB(stuff) \
|
||||
(((unsigned long)stuff->length << 2) - sizeof(*stuff))
|
||||
|
||||
#define LengthRestS(stuff) \
|
||||
(((unsigned long)stuff->length << 1) - (sizeof(*stuff) >> 1))
|
||||
|
||||
#define LengthRestL(stuff) \
|
||||
((unsigned long)stuff->length - (sizeof(*stuff) >> 2))
|
||||
|
||||
#define SwapRestS(stuff) \
|
||||
SwapShorts((short *)(stuff + 1), LengthRestS(stuff))
|
||||
|
||||
#define SwapRestL(stuff) \
|
||||
SwapLongs((long *)(stuff + 1), LengthRestL(stuff))
|
||||
|
||||
/* byte swap a long */
|
||||
#define swapl(x, n) n = ((char *) (x))[0];\
|
||||
((char *) (x))[0] = ((char *) (x))[3];\
|
||||
((char *) (x))[3] = n;\
|
||||
n = ((char *) (x))[1];\
|
||||
((char *) (x))[1] = ((char *) (x))[2];\
|
||||
((char *) (x))[2] = n;
|
||||
|
||||
/* byte swap a short */
|
||||
#define swaps(x, n) n = ((char *) (x))[0];\
|
||||
((char *) (x))[0] = ((char *) (x))[1];\
|
||||
((char *) (x))[1] = n
|
||||
|
||||
/* copy long from src to dst byteswapping on the way */
|
||||
#define cpswapl(src, dst) \
|
||||
((char *)&(dst))[0] = ((char *) &(src))[3];\
|
||||
((char *)&(dst))[1] = ((char *) &(src))[2];\
|
||||
((char *)&(dst))[2] = ((char *) &(src))[1];\
|
||||
((char *)&(dst))[3] = ((char *) &(src))[0];
|
||||
|
||||
/* copy short from src to dst byteswapping on the way */
|
||||
#define cpswaps(src, dst)\
|
||||
((char *) &(dst))[0] = ((char *) &(src))[1];\
|
||||
((char *) &(dst))[1] = ((char *) &(src))[0];
|
||||
|
||||
extern void SwapLongs();
|
||||
extern void SwapShorts();
|
||||
|
||||
typedef struct _DDXPoint *DDXPointPtr;
|
||||
typedef struct _Box *BoxPtr;
|
||||
|
||||
#endif /* MISC_H */
|
||||
@@ -1,169 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: os.h /main/6 1996/05/28 15:33:04 ageorge $ */
|
||||
/***********************************************************
|
||||
Copyright 1987 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.
|
||||
|
||||
(c) Copyright 1995 FUJITSU LIMITED
|
||||
This is source code modified by FUJITSU LIMITED under the Joint
|
||||
Development Agreement for the CDEnext PST.
|
||||
This is unpublished proprietary source code of FUJITSU LIMITED
|
||||
|
||||
******************************************************************/
|
||||
|
||||
|
||||
#ifndef OS_H
|
||||
#define OS_H
|
||||
#include "misc.h"
|
||||
|
||||
#ifdef INCLUDE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
#define NullFID ((FID) 0)
|
||||
|
||||
#define SCREEN_SAVER_ON 0
|
||||
#define SCREEN_SAVER_OFF 1
|
||||
#define SCREEN_SAVER_FORCER 2
|
||||
|
||||
#if defined(stellar)
|
||||
#define MAX_REQUEST_SIZE 65535
|
||||
#else
|
||||
#define MAX_REQUEST_SIZE 16384
|
||||
#endif
|
||||
|
||||
typedef pointer FID;
|
||||
typedef struct _FontPathRec *FontPathPtr;
|
||||
typedef struct _NewClientRec *NewClientPtr;
|
||||
|
||||
#ifndef NO_ALLOCA
|
||||
/*
|
||||
* os-dependent definition of local allocation and deallocation
|
||||
* If you want something other than Xalloc/Xfree for ALLOCATE/DEALLOCATE
|
||||
* LOCAL then you add that in here.
|
||||
*/
|
||||
#if defined(__HIGHC__)
|
||||
|
||||
extern char *alloca();
|
||||
|
||||
#if HCVERSION < 21003
|
||||
#define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
pragma on(alloca);
|
||||
#else /* HCVERSION >= 21003 */
|
||||
#define ALLOCATE_LOCAL(size) _Alloca((int)(size))
|
||||
#endif /* HCVERSION < 21003 */
|
||||
|
||||
#define DEALLOCATE_LOCAL(ptr) /* as nothing */
|
||||
|
||||
#endif /* defined(__HIGHC__) */
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if !defined(__linux__)
|
||||
#ifdef alloca
|
||||
#undef alloca
|
||||
#endif
|
||||
#define alloca ___builtin_alloca
|
||||
#endif
|
||||
#define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
#define DEALLOCATE_LOCAL(ptr) /* as nothing */
|
||||
#else /* ! __GNUC__ */
|
||||
/*
|
||||
* warning: mips alloca is unsuitable in the server, do not use.
|
||||
*/
|
||||
#if defined(vax) || defined(sun) || defined(stellar)
|
||||
/*
|
||||
* Some System V boxes extract alloca.o from /lib/libPW.a; if you
|
||||
* decide that you don't want to use alloca, you might want to fix
|
||||
* ../os/4.2bsd/Imakefile
|
||||
*/
|
||||
char *alloca();
|
||||
#define ALLOCATE_LOCAL(size) alloca((int)(size))
|
||||
#define DEALLOCATE_LOCAL(ptr) /* as nothing */
|
||||
#endif /* who does alloca */
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#endif /* NO_ALLOCA */
|
||||
|
||||
#ifndef ALLOCATE_LOCAL
|
||||
#define ALLOCATE_LOCAL(size) Xalloc((unsigned long)(size))
|
||||
#define DEALLOCATE_LOCAL(ptr) Xfree((pointer)(ptr))
|
||||
#endif /* ALLOCATE_LOCAL */
|
||||
|
||||
|
||||
#define xalloc(size) Xalloc((unsigned long)(size))
|
||||
#define xrealloc(ptr, size) Xrealloc((pointer)(ptr), (unsigned long)(size))
|
||||
#define xfree(ptr) Xfree((pointer)(ptr))
|
||||
|
||||
int ReadRequestFromClient();
|
||||
#ifndef strcat
|
||||
char *strcat();
|
||||
#endif
|
||||
#ifndef strncat
|
||||
char *strncat();
|
||||
#endif
|
||||
#ifndef strcpy
|
||||
char *strcpy();
|
||||
#endif
|
||||
#ifndef strncpy
|
||||
char *strncpy();
|
||||
#endif
|
||||
Bool CloseDownConnection();
|
||||
FontPathPtr GetFontPath();
|
||||
FontPathPtr ExpandFontNamePattern();
|
||||
FID FiOpenForRead();
|
||||
void CreateWellKnownSockets();
|
||||
int SetDefaultFontPath();
|
||||
void FreeFontRecord();
|
||||
int SetFontPath();
|
||||
void ErrorF();
|
||||
void Error();
|
||||
void FatalError();
|
||||
void ProcessCommandLine();
|
||||
void Xfree();
|
||||
void FlushAllOutput();
|
||||
void FlushIfCriticalOutputPending();
|
||||
unsigned long *Xalloc();
|
||||
unsigned long *Xrealloc();
|
||||
long GetTimeInMillis();
|
||||
|
||||
#endif /* OS_H */
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: pcf.h /main/2 1996/02/10 16:25:46 cde-fuj $ */
|
||||
/*
|
||||
*
|
||||
* Copyright 1990 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.
|
||||
*
|
||||
* M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 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.
|
||||
*
|
||||
(c) Copyright 1995 FUJITSU LIMITED
|
||||
This is source code modified by FUJITSU LIMITED under the Joint
|
||||
Development Agreement for the CDEnext PST.
|
||||
This is unpublished proprietary source code of FUJITSU LIMITED
|
||||
*/
|
||||
|
||||
#ifndef _PCF_H_
|
||||
#define _PCF_H_
|
||||
|
||||
/*
|
||||
* Information used to read/write PCF fonts
|
||||
*/
|
||||
|
||||
typedef struct _PCFTable {
|
||||
CARD32 type;
|
||||
CARD32 format;
|
||||
CARD32 size;
|
||||
CARD32 offset;
|
||||
} PCFTableRec, *PCFTablePtr;
|
||||
|
||||
#define PCF_FILE_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1)
|
||||
#define PCF_FORMAT_MASK 0xffffff00
|
||||
|
||||
#define PCF_DEFAULT_FORMAT 0x00000000
|
||||
#define PCF_INKBOUNDS 0x00000200
|
||||
#define PCF_ACCEL_W_INKBOUNDS 0x00000100
|
||||
#define PCF_COMPRESSED_METRICS 0x00000100
|
||||
|
||||
#define PCF_FORMAT_MATCH(a,b) (((a)&PCF_FORMAT_MASK) == ((b)&PCF_FORMAT_MASK))
|
||||
|
||||
#define PCF_GLYPH_PAD_MASK (3<<0)
|
||||
#define PCF_BYTE_MASK (1<<2)
|
||||
#define PCF_BIT_MASK (1<<3)
|
||||
#define PCF_SCAN_UNIT_MASK (3<<4)
|
||||
|
||||
#define PCF_BYTE_ORDER(f) (((f) & PCF_BYTE_MASK)?MSBFirst:LSBFirst)
|
||||
#define PCF_BIT_ORDER(f) (((f) & PCF_BIT_MASK)?MSBFirst:LSBFirst)
|
||||
#define PCF_GLYPH_PAD_INDEX(f) ((f) & PCF_GLYPH_PAD_MASK)
|
||||
#define PCF_GLYPH_PAD(f) (1<<PCF_GLYPH_PAD_INDEX(f))
|
||||
#define PCF_SCAN_UNIT_INDEX(f) (((f) & PCF_SCAN_UNIT_MASK) >> 4)
|
||||
#define PCF_SCAN_UNIT(f) (1<<PCF_SCAN_UNIT_INDEX(f))
|
||||
#define PCF_FORMAT_BITS(f) ((f) & (PCF_GLYPH_PAD_MASK|PCF_BYTE_MASK|PCF_BIT_MASK|PCF_SCAN_UNIT_MASK))
|
||||
|
||||
#define PCF_SIZE_TO_INDEX(s) ((s) == 4 ? 2 : (s) == 2 ? 1 : 0)
|
||||
#define PCF_INDEX_TO_SIZE(b) (1<<b)
|
||||
|
||||
#define PCF_FORMAT(bit,byte,glyph,scan) (\
|
||||
(PCF_SIZE_TO_INDEX(scan) << 4) | \
|
||||
(((bit) == MSBFirst ? 1 : 0) << 3) | \
|
||||
(((byte) == MSBFirst ? 1 : 0) << 2) | \
|
||||
(PCF_SIZE_TO_INDEX(glyph) << 0))
|
||||
|
||||
#define PCF_PROPERTIES (1<<0)
|
||||
#define PCF_ACCELERATORS (1<<1)
|
||||
#define PCF_METRICS (1<<2)
|
||||
#define PCF_BITMAPS (1<<3)
|
||||
#define PCF_INK_METRICS (1<<4)
|
||||
#define PCF_BDF_ENCODINGS (1<<5)
|
||||
#define PCF_SWIDTHS (1<<6)
|
||||
#define PCF_GLYPH_NAMES (1<<7)
|
||||
#define PCF_BDF_ACCELERATORS (1<<8)
|
||||
|
||||
#endif /* _PCF_H_ */
|
||||
@@ -1,294 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: servermd.h /main/2 1996/04/08 15:58:29 cde-fuj $ */
|
||||
/***********************************************************
|
||||
Copyright 1987 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.
|
||||
|
||||
(c) Copyright 1995 FUJITSU LIMITED
|
||||
This is source code modified by FUJITSU LIMITED under the Joint
|
||||
Development Agreement for the CDEnext PST.
|
||||
This is unpublished proprietary source code of FUJITSU LIMITED
|
||||
|
||||
******************************************************************/
|
||||
#ifndef SERVERMD_H
|
||||
#define SERVERMD_H 1
|
||||
|
||||
/*
|
||||
* The vendor string identifies the vendor responsible for the
|
||||
* server executable.
|
||||
*/
|
||||
#ifndef VENDOR_STRING
|
||||
#define VENDOR_STRING "MIT X Consortium"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The vendor release number identifies, for the purpose of submitting
|
||||
* traceable bug reports, the release number of software produced
|
||||
* by the vendor.
|
||||
*/
|
||||
#ifndef VENDOR_RELEASE
|
||||
#define VENDOR_RELEASE 4
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Machine dependent values:
|
||||
* GLYPHPADBYTES should be chosen with consideration for the space-time
|
||||
* trade-off. Padding to 0 bytes means that there is no wasted space
|
||||
* in the font bitmaps (both on disk and in memory), but that access of
|
||||
* the bitmaps will cause odd-address memory references. Padding to
|
||||
* 2 bytes would ensure even address memory references and would
|
||||
* be suitable for a 68010-class machine, but at the expense of wasted
|
||||
* space in the font bitmaps. Padding to 4 bytes would be good
|
||||
* for real 32 bit machines, etc. Be sure that you tell the font
|
||||
* compiler what kind of padding you want because its defines are
|
||||
* kept separate from this. See server/include/font.h for how
|
||||
* GLYPHPADBYTES is used.
|
||||
*
|
||||
* Along with this, you should choose an appropriate value for
|
||||
* GETLEFTBITS_ALIGNMENT, which is used in ddx/mfb/maskbits.h. This
|
||||
* constant choses what kind of memory references are guarenteed during
|
||||
* font access; either 1, 2 or 4, for byte, word or longword access,
|
||||
* respectively. For instance, if you have decided to to have
|
||||
* GLYPHPADBYTES == 4, then it is pointless for you to have a
|
||||
* GETLEFTBITS_ALIGNMENT > 1, because the padding of the fonts has already
|
||||
* guarenteed you that your fonts are longword aligned. On the other
|
||||
* hand, even if you have chosen GLYPHPADBYTES == 1 to save space, you may
|
||||
* also decide that the computing involved in aligning the pointer is more
|
||||
* costly than an odd-address access; you choose GETLEFTBITS_ALIGNMENT == 1.
|
||||
*
|
||||
* Next, choose the tuning parameters which are appropriate for your
|
||||
* hardware; these modify the behaviour of the raw frame buffer code
|
||||
* in ddx/mfb and ddx/cfb. Defining these incorrectly will not cause
|
||||
* the server to run incorrectly, but defining these correctly will
|
||||
* cause some noticeable speed improvements:
|
||||
*
|
||||
* AVOID_MEMORY_READ - (8-bit cfb only)
|
||||
* When stippling pixels on the screen (polytext and pushpixels),
|
||||
* don't read long words from the display and mask in the
|
||||
* appropriate values. Rather, perform multiple byte/short/long
|
||||
* writes as appropriate. This option uses many more instructions
|
||||
* but runs much faster when the destination is much slower than
|
||||
* the CPU and at least 1 level of write buffer is availible (2
|
||||
* is much better). Defined currently for SPARC and MIPS.
|
||||
*
|
||||
* FAST_CONSTANT_OFFSET_MODE - (cfb and mfb)
|
||||
* This define is used on machines which have no auto-increment
|
||||
* addressing mode, but do have an effectively free constant-offset
|
||||
* addressing mode. Currently defined for MIPS and SPARC, even though
|
||||
* I remember the cg6 as performing better without it (cg3 definitely
|
||||
* performs better with it).
|
||||
*
|
||||
* LARGE_INSTRUCTION_CACHE -
|
||||
* This define increases the number of times some loops are
|
||||
* unrolled. On 68020 machines (with 256 bytes of i-cache),
|
||||
* this define will slow execution down as instructions miss
|
||||
* the cache frequently. On machines with real i-caches, this
|
||||
* reduces loop overhead, causing a slight performance improvement.
|
||||
* Currently defined for MIPS and SPARC
|
||||
*
|
||||
* FAST_UNALIGNED_READS -
|
||||
* For machines with more memory bandwidth than CPU, this
|
||||
* define uses unaligned reads for 8-bit BitBLT instead of doing
|
||||
* aligned reads and combining the results with shifts and
|
||||
* logical-ors. Currently defined for 68020 and vax.
|
||||
* PLENTIFUL_REGISTERS -
|
||||
* For machines with > 20 registers. Currently used for
|
||||
* unrolling the text painting code a bit more. Currently
|
||||
* defined for MIPS.
|
||||
*/
|
||||
|
||||
#ifdef vax
|
||||
|
||||
#define IMAGE_BYTE_ORDER LSBFirst /* Values for the VAX only */
|
||||
#define BITMAP_BIT_ORDER LSBFirst
|
||||
#define GLYPHPADBYTES 1
|
||||
#define GETLEFTBITS_ALIGNMENT 4
|
||||
#define FAST_UNALIGNED_READS
|
||||
|
||||
#endif /* vax */
|
||||
|
||||
#ifdef sun
|
||||
|
||||
#if defined(sun386) || defined(sun5)
|
||||
# define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */
|
||||
# define BITMAP_BIT_ORDER LSBFirst
|
||||
#else
|
||||
# define IMAGE_BYTE_ORDER MSBFirst /* Values for the SUN only */
|
||||
# define BITMAP_BIT_ORDER MSBFirst
|
||||
#endif
|
||||
|
||||
#ifdef sparc
|
||||
# define AVOID_MEMORY_READ
|
||||
# define LARGE_INSTRUCTION_CACHE
|
||||
# define FAST_CONSTANT_OFFSET_MODE
|
||||
#endif
|
||||
|
||||
#ifdef mc68020
|
||||
#define FAST_UNALIGNED_READS
|
||||
#endif
|
||||
|
||||
#define GLYPHPADBYTES 4
|
||||
#define GETLEFTBITS_ALIGNMENT 1
|
||||
|
||||
#endif /* sun */
|
||||
|
||||
#if defined(ibm032) || defined (ibm)
|
||||
|
||||
#ifdef i386
|
||||
# define IMAGE_BYTE_ORDER LSBFirst /* Value for PS/2 only */
|
||||
#else
|
||||
# define IMAGE_BYTE_ORDER MSBFirst /* Values for the RT only*/
|
||||
#endif
|
||||
#define BITMAP_BIT_ORDER MSBFirst
|
||||
#define GLYPHPADBYTES 1
|
||||
#define GETLEFTBITS_ALIGNMENT 4
|
||||
/* ibm pcc doesn't understand pragmas. */
|
||||
|
||||
#endif /* ibm */
|
||||
|
||||
#ifdef hpux
|
||||
|
||||
#define IMAGE_BYTE_ORDER MSBFirst /* Values for the HP only */
|
||||
#define BITMAP_BIT_ORDER MSBFirst
|
||||
#define GLYPHPADBYTES 2 /* to match product server */
|
||||
#define GETLEFTBITS_ALIGNMENT 1
|
||||
|
||||
#endif /* hpux */
|
||||
|
||||
#if defined(M4315) || defined(M4317) || defined(M4319) || defined(M4330)
|
||||
|
||||
#define IMAGE_BYTE_ORDER MSBFirst /* Values for Pegasus only */
|
||||
#define BITMAP_BIT_ORDER MSBFirst
|
||||
#define GLYPHPADBYTES 4
|
||||
#define GETLEFTBITS_ALIGNMENT 1
|
||||
|
||||
#define FAST_UNALIGNED_READS
|
||||
|
||||
#endif /* tektronix */
|
||||
|
||||
#ifdef mips
|
||||
|
||||
#ifdef MIPSEL
|
||||
# define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
|
||||
# define BITMAP_BIT_ORDER LSBFirst
|
||||
# define GLYPHPADBYTES 4
|
||||
# define GETLEFTBITS_ALIGNMENT 1
|
||||
#else
|
||||
# define IMAGE_BYTE_ORDER MSBFirst /* Values for the MIPS only */
|
||||
# define BITMAP_BIT_ORDER MSBFirst
|
||||
# define GLYPHPADBYTES 4
|
||||
# define GETLEFTBITS_ALIGNMENT 1
|
||||
#endif
|
||||
|
||||
#define AVOID_MEMORY_READ
|
||||
#define FAST_CONSTANT_OFFSET_MODE
|
||||
#define LARGE_INSTRUCTION_CACHE
|
||||
#define PLENTIFUL_REGISTERS
|
||||
|
||||
#endif /* mips */
|
||||
|
||||
#ifdef stellar
|
||||
|
||||
#define IMAGE_BYTE_ORDER MSBFirst /* Values for the stellar only*/
|
||||
#define BITMAP_BIT_ORDER MSBFirst
|
||||
#define GLYPHPADBYTES 4
|
||||
#define GETLEFTBITS_ALIGNMENT 4
|
||||
/*
|
||||
* Use SysV random number generator.
|
||||
*/
|
||||
#define random rand
|
||||
|
||||
#endif /* stellar */
|
||||
|
||||
/* size of buffer to use with GetImage, measured in bytes. There's obviously
|
||||
* a trade-off between the amount of stack (or whatever ALLOCATE_LOCAL gives
|
||||
* you) used and the number of times the ddx routine has to be called.
|
||||
*
|
||||
* for a 1024 x 864 bit monochrome screen with a 32 bit word we get
|
||||
* 8192/4 words per buffer
|
||||
* (1024/32) = 32 words per scanline
|
||||
* 2048 words per buffer / 32 words per scanline = 64 scanlines per buffer
|
||||
* 864 scanlines / 64 scanlines = 14 buffers to draw a full screen
|
||||
*/
|
||||
#if defined(stellar)
|
||||
#define IMAGE_BUFSIZE (64*1024)
|
||||
#else
|
||||
#define IMAGE_BUFSIZE 8192
|
||||
#endif
|
||||
|
||||
/* pad scanline to a longword */
|
||||
#if defined(ibm) && defined(i386)
|
||||
#define BITMAP_SCANLINE_UNIT 8
|
||||
#else
|
||||
#define BITMAP_SCANLINE_UNIT 32
|
||||
#endif
|
||||
#define BITMAP_SCANLINE_PAD 32
|
||||
|
||||
#define LOG2_BITMAP_PAD 5
|
||||
#define LOG2_BYTES_PER_SCANLINE_PAD 2
|
||||
|
||||
/*
|
||||
* This returns the number of padding units, for depth d and width w.
|
||||
* For bitmaps this can be calculated with the macros above.
|
||||
* Other depths require either grovelling over the formats field of the
|
||||
* screenInfo or hardwired constants.
|
||||
*/
|
||||
|
||||
typedef struct _PaddingInfo {
|
||||
int padRoundUp; /* pixels per pad unit - 1 */
|
||||
int padPixelsLog2; /* log 2 (pixels per pad unit) */
|
||||
int padBytesLog2; /* log 2 (bytes per pad unit) */
|
||||
} PaddingInfo;
|
||||
extern PaddingInfo PixmapWidthPaddingInfo[];
|
||||
|
||||
#define PixmapWidthInPadUnits(w, d) \
|
||||
(((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \
|
||||
PixmapWidthPaddingInfo[d].padPixelsLog2)
|
||||
|
||||
/*
|
||||
* Return the number of bytes to which a scanline of the given
|
||||
* depth and width will be padded.
|
||||
*/
|
||||
#define PixmapBytePad(w, d) \
|
||||
(PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2)
|
||||
|
||||
#endif /* SERVERMD_H */
|
||||
Reference in New Issue
Block a user