mcneill@UUNET.UU.NET (Keith McNeill) (12/03/88)
Hello,
I tried compiling X.V11R3 with GCC V 1.31 on a Sun4/260 running
SunOS Sys4-3.2. In the entire make of X.V11R3 I got 7
gcc: Program cc1 got fatal signal 4.
Which is:
4 EINTR Interrupted system call
-------------------------------------------------------------------------------
5 of the fatal signals were caused by -O (i.e. I took out the -O and it
compilied without a fatal signal.
EXP:
--------------------------------------------------
In X.V11R3/server/dix
gcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../include -I../.././X11 colormap.c
colormap.c: In function TellNoMap:
colormap.c:273: warning: `TellNoMap' was declared `extern' and later `static'
../include/colormap.h:71: warning: previous declaration of `TellNoMap'
gcc: Program cc1 got fatal signal 4.
--------------------------------------------------
In X.V11R3/server/ddx/mi
gcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../../include -I../../.././X11 -DPURDUE milines.c
gcc: Program cc1 got fatal signal 4.
*** Error code 1
--------------------------------------------------
In X.V11R3/server/ddx/mi
gcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../../include -I../../.././X11 -DPURDUE miarc.c
gcc: Program cc1 got fatal signal 4.
*** Error code 1
--------------------------------------------------
In X.V11R3/clients/xfd
gcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -I../../. -c xfd.c
gcc: Program cc1 got fatal signal 4.
--------------------------------------------------
In. X.V11R3/clients/xrdb
gcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -I../../. -DCPP="\"/usr/local/lib/gcc-cpp\"" -c xrdb.c
gcc: Program cc1 got fatal signal 4.
--------------------------------------------------
1 of the fatal signals were caused by -traditional
--------------------------------------------------
In X.V11R3/server/ddx/sun
gcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../../include -I../mfb -I../../dix -I../../.././X11 sunInit.c
gcc: Program cc1 got fatal signal 4.
--------------------------------------------------
1 of the fatal signals did not go away with removal of all the
options (i.e. still got the fatal signal with removal of
-O -traditional -fcombine-regs -finline-functions -fwritable-strings).
--------------------------------------------------
In X.V11R3/fonts/fonts/bdftosnf
gcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -I. -I../../. -I../.././server/include -c bdftosnf.c
gcc: Program cc1 got fatal signal 4.
-------------------------------------------------------------------------------
I'm not quite sure what to do now. With the complexity of the X11 build I
don't see how I could just send you the source files and the include files
without using up a huge amount of network bandwidth. I see 2 possible
options for you to reproduce these errors:
1) I could send you the X.V11R3 config files that I used and you could
build X11 on your Sun4 machine.
2) I could send you the output of gcc -E. Then hopefully all you would have
to do is gcc -all-the-options-that-I-used file.i to reproduce the
fatal error.
Let me know what you want me to send....or do you have a better idea?
-------------------------------------------------------------------------------
I configured gcc with
config.gcc sun4
which produced this output
Linked `config.h' to `xm-sparc.h'.
Linked `tm.h' to `tm-sun4os3.h'.
Linked `md' to `sparc.md'.
Linked `aux-output.c' to `output-sparc.c'.
Links are now set up for use with a sun4.
I did a make stage1 & a make stage2. The 2 sets of the .o's
were the same (using cmp).
Thanks,
Keith D. McNeill | E.I. du Pont de Nemours & Co.
eplrx7!mcneill@uunet.uu.net | Experimental Station
(302) 695-7395 | P.O. Box 80357
| Wilmington, Delaware 19880-0357
mcneill@UUNET.UU.NET (Keith McNeill) (12/06/88)
Hello,
Enclosed is a shell archive with these files:
"gcc_bug" is the original bug report that I sent to gcc_bugs.
"rms" is rms' response to my bug report
The next 7 messages from me contain shell archives of the 7 files that
caused gcc 1.31 to abort. I ran them through the
preprocessor and included only those functions needed to
recreate the bug (per rms' request).
Thanks,
Keith D. McNeill | E.I. du Pont de Nemours & Co.
uunet!eplrx7!mcneill | Experimental Station
(302) 695-7395 | P.O. Box 80357
| Wilmington, Delaware 19880-0357
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: gcc_bug rms
# Wrapped by mcneill@eplrx7 on Mon Dec 5 11:40:59 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'gcc_bug' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'gcc_bug'\"
else
echo shar: Extracting \"'gcc_bug'\" \(4055 characters\)
sed "s/^X//" >'gcc_bug' <<'END_OF_FILE'
XHello,
X
XI tried compiling X.V11R3 with GCC V 1.31 on a Sun4/260 running
XSunOS Sys4-3.2. In the entire make of X.V11R3 I got 7
X
Xgcc: Program cc1 got fatal signal 4.
X
XWhich is:
X
X 4 EINTR Interrupted system call
X
X-------------------------------------------------------------------------------
X
X5 of the fatal signals were caused by -O (i.e. I took out the -O and it
X compilied without a fatal signal.
X
XEXP:
X--------------------------------------------------
XIn X.V11R3/server/dix
X
Xgcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../include -I../.././X11 colormap.c
Xcolormap.c: In function TellNoMap:
Xcolormap.c:273: warning: `TellNoMap' was declared `extern' and later `static'
X../include/colormap.h:71: warning: previous declaration of `TellNoMap'
Xgcc: Program cc1 got fatal signal 4.
X
X--------------------------------------------------
XIn X.V11R3/server/ddx/mi
X
Xgcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../../include -I../../.././X11 -DPURDUE milines.c
Xgcc: Program cc1 got fatal signal 4.
X*** Error code 1
X
X--------------------------------------------------
XIn X.V11R3/server/ddx/mi
X
Xgcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../../include -I../../.././X11 -DPURDUE miarc.c
Xgcc: Program cc1 got fatal signal 4.
X*** Error code 1
X
X--------------------------------------------------
XIn X.V11R3/clients/xfd
X
Xgcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -I../../. -c xfd.c
Xgcc: Program cc1 got fatal signal 4.
X
X--------------------------------------------------
XIn. X.V11R3/clients/xrdb
X
Xgcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -I../../. -DCPP="\"/usr/local/lib/gcc-cpp\"" -c xrdb.c
Xgcc: Program cc1 got fatal signal 4.
X
X--------------------------------------------------
X
X1 of the fatal signals were caused by -traditional
X
X--------------------------------------------------
XIn X.V11R3/server/ddx/sun
X
Xgcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -c -I. -I../../include -I../mfb -I../../dix -I../../.././X11 sunInit.c
Xgcc: Program cc1 got fatal signal 4.
X
X--------------------------------------------------
X
X1 of the fatal signals did not go away with removal of all the
X options (i.e. still got the fatal signal with removal of
X -O -traditional -fcombine-regs -finline-functions -fwritable-strings).
X
X--------------------------------------------------
XIn X.V11R3/fonts/fonts/bdftosnf
X
Xgcc -O -traditional -fcombine-regs -finline-functions -fwritable-strings -I. -I../../. -I../.././server/include -c bdftosnf.c
Xgcc: Program cc1 got fatal signal 4.
X
X-------------------------------------------------------------------------------
X
XI'm not quite sure what to do now. With the complexity of the X11 build I
Xdon't see how I could just send you the source files and the include files
Xwithout using up a huge amount of network bandwidth. I see 2 possible
Xoptions for you to reproduce these errors:
X
X1) I could send you the X.V11R3 config files that I used and you could
X build X11 on your Sun4 machine.
X
X2) I could send you the output of gcc -E. Then hopefully all you would have
X to do is gcc -all-the-options-that-I-used file.i to reproduce the
X fatal error.
X
XLet me know what you want me to send....or do you have a better idea?
X
X-------------------------------------------------------------------------------
X
XI configured gcc with
X
Xconfig.gcc sun4
X
Xwhich produced this output
X
XLinked `config.h' to `xm-sparc.h'.
XLinked `tm.h' to `tm-sun4os3.h'.
XLinked `md' to `sparc.md'.
XLinked `aux-output.c' to `output-sparc.c'.
XLinks are now set up for use with a sun4.
X
XI did a make stage1 & a make stage2. The 2 sets of the .o's
Xwere the same (using cmp).
X
XThanks,
X
X Keith D. McNeill | E.I. du Pont de Nemours & Co.
X eplrx7!mcneill@uunet.uu.net | Experimental Station
X (302) 695-7395 | P.O. Box 80357
X | Wilmington, Delaware 19880-0357
END_OF_FILE
if test 4055 -ne `wc -c <'gcc_bug'`; then
echo shar: \"'gcc_bug'\" unpacked with wrong size!
fi
# end of 'gcc_bug'
fi
if test -f 'rms' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'rms'\"
else
echo shar: Extracting \"'rms'\" \(1128 characters\)
sed "s/^X//" >'rms' <<'END_OF_FILE'
XFrom uunet!wheaties.ai.mit.edu!rms Fri Dec 2 21:18:13 1988
XReturn-Path: <uunet!wheaties.ai.mit.edu!rms>
XReceived: by chip_and_dips.com (3.2/SMI-3.2)
X id AA29113; Fri, 2 Dec 88 21:18:12 EST
XReceived: from sugar-bombs.ai.mit.edu by uunet.UU.NET (5.59/1.14)
X id AA06850; Fri, 2 Dec 88 21:10:55 EST
XReceived: by sugar-bombs.ai.mit.edu; Fri, 2 Dec 88 21:11:12 EST
XDate: Fri, 2 Dec 88 21:11:12 EST
XFrom: uunet!wheaties.ai.mit.edu!rms (Richard Stallman)
XMessage-Id: <8812030211.AA01105@sugar-bombs.ai.mit.edu>
XTo: eplrx7!mcneill
XIn-Reply-To: <8812021918.AA26913@chip_and_dips.com> (eplrx7!mcneill's message of Fri, 2 Dec 88 14:18:48 EST)
XSubject: GCC 1.31 Sun4, Sys4-3.2 & X.V11R3
XStatus: R
X
XIt is a lot of work to get set up to compile X11R3 just to work on
Xthese bugs. Can you please send actual testable test cases? Turn
Xeach source file into CPP output, then delete all functions except the
Xone in which the crash happens. Use the -Q switch to tell GCC to
Xprint each function name as it begins compiling that function.
XSend these reports to bug-gcc@prep.ai.mit.edu, not just to me,
Xsince probably Tiemann will work on them.
X
X
END_OF_FILE
if test 1128 -ne `wc -c <'rms'`; then
echo shar: \"'rms'\" unpacked with wrong size!
fi
# end of 'rms'
fi
echo shar: End of shell archive.
exit 0
mcneill@UUNET.UU.NET (Keith McNeill) (12/06/88)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: bdftosnf.part.i # Wrapped by mcneill@eplrx7 on Mon Dec 5 11:42:29 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'bdftosnf.part.i' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'bdftosnf.part.i'\" else echo shar: Extracting \"'bdftosnf.part.i'\" \(39316 characters\) sed "s/^X//" >'bdftosnf.part.i' <<'END_OF_FILE' X# 1 "bdftosnf.c" X X X# 1 "/usr/include/stdio.h" X X X X X Xextern struct _iobuf { X int _cnt; X unsigned char *_ptr; X unsigned char *_base; X int _bufsiz; X short _flag; X char _file; X} _iob[]; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern struct _iobuf *fopen(); Xextern struct _iobuf *fdopen(); Xextern struct _iobuf *freopen(); Xextern struct _iobuf *popen(); Xextern struct _iobuf *tmpfile(); Xextern long ftell(); Xextern char *fgets(); Xextern char *gets(); X X X Xextern char *ctermid(); Xextern char *cuserid(); Xextern char *tempnam(); Xextern char *tmpnam(); X X X X X X X# 3 "bdftosnf.c" X X# 1 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/types.h" X X X X X X X X X X X X X X Xextern int setjmp(); X#pragma unknown_control_flow(setjmp) X X# 1 "/usr/include/sys/sysmacros.h" X X X X X X X X X X X X X X X X X X X# 18 "/usr/include/sys/types.h" X X Xtypedef unsigned char u_char; Xtypedef unsigned short u_short; Xtypedef unsigned int u_int; Xtypedef unsigned long u_long; Xtypedef unsigned short ushort; Xtypedef unsigned int uint; X X X X X X X X X X X X X X Xtypedef struct _physadr { int r[1]; } *physadr; Xtypedef struct label_t { X int val[2]; X} label_t; X Xtypedef struct _quad { long val[2]; } quad; Xtypedef long daddr_t; Xtypedef char * caddr_t; Xtypedef u_long ino_t; Xtypedef long swblk_t; Xtypedef int size_t; Xtypedef long time_t; Xtypedef short dev_t; Xtypedef int off_t; Xtypedef long key_t; X Xtypedef struct fd_set { int fds_bits[1]; } fd_set; X X X# 37 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/strings.h" X X X X X X Xchar *strcat(); Xchar *strncat(); Xint strcmp(); Xint strncmp(); Xchar *strcpy(); Xchar *strncpy(); Xint strlen(); Xchar *index(); Xchar *rindex(); X# 68 "../.././X11/Xos.h" X X X X X X X X X X X X# 1 "/usr/include/sys/file.h" X X X X X X# 1 "/usr/include/sys/fcntl.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xstruct flock { X short l_type; X short l_whence; X long l_start; X long l_len; X short l_pid; X short l_xxx; X}; X X X# 6 "/usr/include/sys/file.h" X X X# 33 "/usr/include/sys/file.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 80 "/usr/include/sys/file.h" X X X X# 79 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/time.h" X X X X X X X X X X X X X X X Xstruct timeval { X long tv_sec; X long tv_usec; X}; X Xstruct timezone { X int tz_minuteswest; X int tz_dsttime; X}; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xstruct itimerval { X struct timeval it_interval; X struct timeval it_value; X}; X X X# 1 "/usr/include/time.h" X X X X X Xstruct tm { X int tm_sec; X int tm_min; X int tm_hour; X int tm_mday; X int tm_mon; X int tm_year; X int tm_wday; X int tm_yday; X int tm_isdst; X}; X Xextern struct tm *gmtime(), *localtime(); Xextern char *asctime(), *ctime(); X# 62 "/usr/include/sys/time.h" X X X X X# 96 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 4 "bdftosnf.c" X X# 1 "/usr/include/errno.h" X X X X X X X# 1 "/usr/include/sys/errno.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 7 "/usr/include/errno.h" X Xextern int errno; X# 5 "bdftosnf.c" X X# 1 "/usr/include/ctype.h" X X X X X X X X X X X Xextern char _ctype_[]; X X X X X X X X X X X X X X X X X# 6 "bdftosnf.c" X X extern char *malloc(), *realloc(); X X# 1 "../.././server/include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern unsigned long globalSerialNumber; X X X X X X X X X X X X X X Xtypedef unsigned char *pointer; Xtypedef int Bool; Xtypedef unsigned long PIXEL; Xtypedef unsigned long ATOM; X X X X X X X# 1 "../.././server/include/os.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././server/include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../.././server/include/misc.h" X X# 29 "../.././server/include/os.h" X X X X X X X X X X X X X X Xtypedef pointer FID; Xtypedef struct _FontPathRec *FontPathPtr; Xtypedef struct _NewClientRec *NewClientPtr; X X X X X X X X X X X# 69 "../.././server/include/os.h" X X X X X X X X X Xchar *alloca(); X X X X X X# 92 "../.././server/include/os.h" X X X X X X X X X X X X X X Xchar *ReadRequestFromClient(); Xchar *strcat(); Xchar *strncat(); Xchar *strcpy(); Xchar *strncpy(); XBool CloseDownConnection(); XFontPathPtr GetFontPath(); XFontPathPtr ExpandFontNamePattern(); XFID FiOpenForRead(); Xvoid CreateWellKnownSockets(); Xvoid SetDefaultFontPath(); Xvoid FreeFontRecord(); Xvoid SetFontPath(); Xvoid ErrorF(); Xvoid Error(); Xvoid FatalError(); Xvoid ProcessCommandLine(); Xvoid Xfree(); Xvoid FlushAllOutput(); Xvoid FlushIfCriticalOutputPending(); Xunsigned long *Xalloc(); Xunsigned long *Xrealloc(); Xlong GetTimeInMillis(); X X X# 58 "../.././server/include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DDXPoint *DDXPointPtr; Xtypedef struct _Box *BoxPtr; X X X# 9 "bdftosnf.c" X X# 1 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef unsigned long XID; X Xtypedef XID Window; Xtypedef XID Drawable; Xtypedef XID Font; Xtypedef XID Pixmap; Xtypedef XID Cursor; Xtypedef XID Colormap; Xtypedef XID GContext; Xtypedef XID KeySym; X Xtypedef unsigned long Mask; X Xtypedef unsigned long Atom; X Xtypedef unsigned long VisualID; X Xtypedef unsigned long Time; X Xtypedef unsigned char KeyCode; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 311 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 10 "bdftosnf.c" X X# 1 "../.././X11/Xproto.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././X11/Xmd.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef long INT32; Xtypedef short INT16; Xtypedef char INT8; X Xtypedef unsigned long CARD32; Xtypedef unsigned short CARD16; Xtypedef unsigned char CARD8; X Xtypedef unsigned long BITS32; Xtypedef unsigned short BITS16; Xtypedef unsigned char BYTE; X Xtypedef unsigned char BOOL; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 53 "../.././X11/Xproto.h" X X# 1 "../.././X11/Xprotostr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././X11/Xmd.h" X X X X X X X X X X X X X X X X X X X X X X X X# 139 "../.././X11/Xmd.h" X X# 28 "../.././X11/Xprotostr.h" X X X X Xtypedef struct _xSegment { X INT16 x1 , y1 , x2 , y2 ; X} xSegment; X X X Xtypedef struct _xPoint { X INT16 x , y ; X} xPoint; X Xtypedef struct _xRectangle { X INT16 x , y ; X CARD16 width , height ; X} xRectangle; X X X Xtypedef struct _xArc { X INT16 x , y ; X CARD16 width , height ; X INT16 angle1 , angle2 ; X} xArc; X X X# 54 "../.././X11/Xproto.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef CARD16 KeyButMask; X X X X X X Xtypedef struct { X CARD8 byteOrder; X BYTE pad; X CARD16 majorVersion , minorVersion ; X CARD16 nbytesAuthProto ; X CARD16 nbytesAuthString ; X CARD16 pad2; X} xConnClientPrefix; X Xtypedef struct { X BOOL success; X BYTE lengthReason; X CARD16 majorVersion , X minorVersion ; X CARD16 length ; X} xConnSetupPrefix; X X Xtypedef struct { X CARD32 release ; X CARD32 ridBase , X ridMask ; X CARD32 motionBufferSize ; X CARD16 nbytesVendor ; X CARD16 maxRequestSize ; X CARD8 numRoots; X CARD8 numFormats; X CARD8 imageByteOrder; X CARD8 bitmapBitOrder; X CARD8 bitmapScanlineUnit, X bitmapScanlinePad; X CARD8 minKeyCode, maxKeyCode; X CARD32 pad2 ; X} xConnSetup; X Xtypedef struct { X CARD8 depth; X CARD8 bitsPerPixel; X CARD8 scanLinePad; X CARD8 pad1; X CARD32 pad2 ; X} xPixmapFormat; X X X Xtypedef struct { X CARD8 depth; X CARD8 pad1; X CARD16 nVisuals ; X CARD32 pad2 ; X } xDepth; X Xtypedef struct { X CARD32 visualID ; X CARD8 class; X CARD8 bitsPerRGB; X CARD16 colormapEntries ; X CARD32 redMask , greenMask , blueMask ; X CARD32 pad ; X } xVisualType; X Xtypedef struct { X CARD32 windowId ; X CARD32 defaultColormap ; X CARD32 whitePixel , blackPixel ; X CARD32 currentInputMask ; X CARD16 pixWidth , pixHeight ; X CARD16 mmWidth , mmHeight ; X CARD16 minInstalledMaps , maxInstalledMaps ; X CARD32 rootVisualID ; X CARD8 backingStore; X BOOL saveUnders; X CARD8 rootDepth; X CARD8 nDepths; X} xWindowRoot; X X X X X X X X X Xtypedef struct { X CARD32 time ; X INT16 x , y ; X} xTimecoord; X Xtypedef struct { X CARD8 family; X BYTE pad; X CARD16 length ; X} xHostEntry; X Xtypedef struct { X INT16 leftSideBearing , X rightSideBearing , X characterWidth , X ascent , X descent ; X CARD16 attributes ; X} xCharInfo; X Xtypedef struct { X CARD32 name ; X CARD32 value ; X} xFontProp; X X X X Xtypedef struct { X CARD8 len; X X INT8 delta; X} xTextElt; X X Xtypedef struct { X CARD32 pixel ; X CARD16 red , green , blue ; X CARD8 flags; X CARD8 pad; X} xColorItem; X X Xtypedef struct { X CARD16 red , green , blue , pad ; X} xrgb; X Xtypedef CARD8 KEYCODE; X X X X X X X X# 937 "../.././X11/Xproto.h" X X X X X X X X X X Xtypedef struct { X BYTE type; X BYTE errorCode; X CARD16 sequenceNumber ; X CARD32 resourceID ; X CARD16 minorCode ; X CARD8 majorCode; X BYTE pad1; X CARD32 pad3 ; X CARD32 pad4 ; X CARD32 pad5 ; X CARD32 pad6 ; X CARD32 pad7 ; X} xError; X X X X X X X# 1196 "../.././X11/Xproto.h" X X X X X X X X X X# 1250 "../.././X11/Xproto.h" X X X X X X X X X X X Xtypedef struct { X CARD8 reqType; X CARD8 data; X CARD16 length ; X X} xReq; X X X X X X X X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 id ; X } xResourceReq; X Xtypedef struct { X CARD8 reqType; X CARD8 depth; X CARD16 length ; X CARD32 wid , parent ; X INT16 x , y ; X CARD16 width , height , borderWidth ; X CARD16 class ; X CARD32 visual ; X CARD32 mask ; X} xCreateWindowReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 valueMask ; X} xChangeWindowAttributesReq; X Xtypedef struct { X CARD8 reqType; X BYTE mode; X CARD16 length ; X CARD32 window ; X} xChangeSaveSetReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window , parent ; X INT16 x , y ; X} xReparentWindowReq; X Xtypedef struct { X CARD8 reqType; X CARD8 pad; X CARD16 length ; X CARD32 window ; X CARD16 mask ; X CARD16 pad2 ; X} xConfigureWindowReq; X Xtypedef struct { X CARD8 reqType; X CARD8 direction; X CARD16 length ; X CARD32 window ; X} xCirculateWindowReq; X Xtypedef struct { X CARD8 reqType; X BOOL onlyIfExists; X CARD16 length ; X CARD16 nbytes ; X CARD16 pad ; X} xInternAtomReq; X Xtypedef struct { X CARD8 reqType; X CARD8 mode; X CARD16 length ; X CARD32 window ; X CARD32 property , type ; X CARD8 format; X BYTE pad[3]; X CARD32 nUnits ; X} xChangePropertyReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 property ; X} xDeletePropertyReq; X Xtypedef struct { X CARD8 reqType; X BOOL delete; X CARD16 length ; X CARD32 window ; X CARD32 property , type ; X CARD32 longOffset ; X CARD32 longLength ; X} xGetPropertyReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 selection ; X CARD32 time ; X} xSetSelectionOwnerReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 requestor ; X CARD32 selection , target , property ; X CARD32 time ; X } xConvertSelectionReq; X X# 1404 "../.././X11/Xproto.h" X X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD16 eventMask ; X BYTE pointerMode, keyboardMode; X CARD32 confineTo ; X CARD32 cursor ; X CARD32 time ; X} xGrabPointerReq; X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD16 eventMask ; X BYTE pointerMode, keyboardMode; X CARD32 confineTo ; X CARD32 cursor ; X CARD8 button; X BYTE pad; X CARD16 modifiers ; X} xGrabButtonReq; X Xtypedef struct { X CARD8 reqType; X CARD8 button; X CARD16 length ; X CARD32 grabWindow ; X CARD16 modifiers ; X CARD16 pad ; X} xUngrabButtonReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cursor ; X CARD32 time ; X CARD16 eventMask ; X CARD16 pad2 ; X} xChangeActivePointerGrabReq; X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD32 time ; X BYTE pointerMode, keyboardMode; X CARD16 pad ; X} xGrabKeyboardReq; X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD16 modifiers ; X CARD8 key; X BYTE pointerMode, keyboardMode; X BYTE pad1, pad2, pad3; X} xGrabKeyReq; X Xtypedef struct { X CARD8 reqType; X CARD8 key; X CARD16 length ; X CARD32 grabWindow ; X CARD16 modifiers ; X CARD16 pad ; X} xUngrabKeyReq; X Xtypedef struct { X CARD8 reqType; X CARD8 mode; X CARD16 length ; X CARD32 time ; X} xAllowEventsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 start , stop ; X} xGetMotionEventsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcWid , dstWid ; X INT16 srcX , srcY ; X} xTranslateCoordsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcWid , dstWid ; X INT16 srcX , srcY ; X CARD16 srcWidth , srcHeight ; X INT16 dstX , dstY ; X} xWarpPointerReq; X Xtypedef struct { X CARD8 reqType; X CARD8 revertTo; X CARD16 length ; X CARD32 focus ; X CARD32 time ; X} xSetInputFocusReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 fid ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xOpenFontReq; X Xtypedef struct { X CARD8 reqType; X BOOL oddLength; X CARD16 length ; X CARD32 fid ; X } xQueryTextExtentsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD16 maxNames ; X CARD16 nbytes ; X} xListFontsReq; X Xtypedef xListFontsReq xListFontsWithInfoReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD16 nFonts ; X BYTE pad1, pad2; X} xSetFontPathReq; X Xtypedef struct { X CARD8 reqType; X CARD8 depth; X CARD16 length ; X CARD32 pid ; X CARD32 drawable ; X CARD16 width , height ; X} xCreatePixmapReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 gc ; X CARD32 drawable ; X CARD32 mask ; X} xCreateGCReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 gc ; X CARD32 mask ; X} xChangeGCReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcGC , dstGC ; X CARD32 mask ; X} xCopyGCReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 gc ; X CARD16 dashOffset ; X CARD16 nDashes ; X} xSetDashesReq; X Xtypedef struct { X CARD8 reqType; X BYTE ordering; X CARD16 length ; X CARD32 gc ; X INT16 xOrigin , yOrigin ; X} xSetClipRectanglesReq; X Xtypedef struct { X CARD8 reqType; X BOOL exposures; X CARD16 length ; X CARD32 window ; X INT16 x , y ; X CARD16 width , height ; X} xClearAreaReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcDrawable , dstDrawable ; X CARD32 gc ; X INT16 srcX , srcY , dstX , dstY ; X CARD16 width , height ; X} xCopyAreaReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcDrawable , dstDrawable ; X CARD32 gc ; X INT16 srcX , srcY , dstX , dstY ; X CARD16 width , height ; X CARD32 bitPlane ; X} xCopyPlaneReq; X Xtypedef struct { X CARD8 reqType; X BYTE coordMode; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X} xPolyPointReq; X Xtypedef xPolyPointReq xPolyLineReq; X X X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X} xPolySegmentReq; X Xtypedef xPolySegmentReq xPolyArcReq; Xtypedef xPolySegmentReq xPolyRectangleReq; Xtypedef xPolySegmentReq xPolyFillRectangleReq; Xtypedef xPolySegmentReq xPolyFillArcReq; X Xtypedef struct _FillPolyReq { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X BYTE shape; X BYTE coordMode; X CARD16 pad1 ; X} xFillPolyReq; X X Xtypedef struct _PutImageReq { X CARD8 reqType; X CARD8 format; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X CARD16 width , height ; X INT16 dstX , dstY ; X CARD8 leftPad; X CARD8 depth; X CARD16 pad ; X} xPutImageReq; X Xtypedef struct { X CARD8 reqType; X CARD8 format; X CARD16 length ; X CARD32 drawable ; X INT16 x , y ; X CARD16 width , height ; X CARD32 planeMask ; X} xGetImageReq; X X X Xtypedef struct { X CARD8 reqType; X CARD8 pad; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X INT16 x , y ; X} xPolyTextReq; X Xtypedef xPolyTextReq xPolyText8Req; Xtypedef xPolyTextReq xPolyText16Req; X Xtypedef struct { X CARD8 reqType; X BYTE nChars; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X INT16 x , y ; X} xImageTextReq; X Xtypedef xImageTextReq xImageText8Req; Xtypedef xImageTextReq xImageText16Req; X Xtypedef struct { X CARD8 reqType; X BYTE alloc; X CARD16 length ; X CARD32 mid ; X CARD32 window ; X CARD32 visual ; X} xCreateColormapReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 mid ; X CARD32 srcCmap ; X} xCopyColormapAndFreeReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD16 red , green , blue ; X CARD16 pad2 ; X} xAllocColorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xAllocNamedColorReq; X Xtypedef struct { X CARD8 reqType; X BOOL contiguous; X CARD16 length ; X CARD32 cmap ; X CARD16 colors , planes ; X} xAllocColorCellsReq; X Xtypedef struct { X CARD8 reqType; X BOOL contiguous; X CARD16 length ; X CARD32 cmap ; X CARD16 colors , red , green , blue ; X} xAllocColorPlanesReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD32 planeMask ; X} xFreeColorsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X} xStoreColorsReq; X Xtypedef struct { X CARD8 reqType; X CARD8 flags; X CARD16 length ; X CARD32 cmap ; X CARD32 pixel ; X CARD16 nbytes ; X BYTE pad1, pad2; X } xStoreNamedColorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X} xQueryColorsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xLookupColorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cid ; X CARD32 source , mask ; X CARD16 foreRed , foreGreen , foreBlue ; X CARD16 backRed , backGreen , backBlue ; X CARD16 x , y ; X} xCreateCursorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cid ; X CARD32 source , mask ; X CARD16 sourceChar , maskChar ; X CARD16 foreRed , foreGreen , foreBlue ; X CARD16 backRed , backGreen , backBlue ; X} xCreateGlyphCursorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cursor ; X CARD16 foreRed , foreGreen , foreBlue ; X CARD16 backRed , backGreen , backBlue ; X} xRecolorCursorReq; X Xtypedef struct { X CARD8 reqType; X CARD8 class; X CARD16 length ; X CARD32 drawable ; X CARD16 width , height ; X} xQueryBestSizeReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xQueryExtensionReq; X Xtypedef struct { X CARD8 reqType; X CARD8 numKeyPerModifier; X CARD16 length ; X} xSetModifierMappingReq; X Xtypedef struct { X CARD8 reqType; X CARD8 nElts; X CARD16 length ; X} xSetPointerMappingReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD8 firstKeyCode; X CARD8 count; X CARD16 pad1 ; X} xGetKeyboardMappingReq; X Xtypedef struct { X CARD8 reqType; X CARD8 keyCodes; X CARD16 length ; X CARD8 firstKeyCode; X CARD8 keySymsPerKeyCode; X CARD16 pad1 ; X} xChangeKeyboardMappingReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 mask ; X} xChangeKeyboardControlReq; X Xtypedef struct { X CARD8 reqType; X INT8 percent; X CARD16 length ; X} xBellReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X INT16 accelNum , accelDenum ; X INT16 threshold ; X BOOL doAccel, doThresh; X} xChangePointerControlReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X INT16 timeout , interval ; X BYTE preferBlank, allowExpose; X CARD16 pad2 ; X} xSetScreenSaverReq; X Xtypedef struct { X CARD8 reqType; X BYTE mode; X CARD16 length ; X CARD8 hostFamily; X BYTE pad; X CARD16 hostLength ; X} xChangeHostsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X } xListHostsReq; X Xtypedef struct { X CARD8 reqType; X BYTE mode; X CARD16 length ; X } xChangeModeReq; X Xtypedef xChangeModeReq xSetAccessControlReq; Xtypedef xChangeModeReq xSetCloseDownModeReq; Xtypedef xChangeModeReq xForceScreenSaverReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD16 nAtoms ; X INT16 nPositions ; X } xRotatePropertiesReq; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 11 "bdftosnf.c" X X# 1 "../.././server/include/fontstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././server/include/font.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././server/include/servermd.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 143 "../.././server/include/servermd.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _PaddingInfo { X int padRoundUp; X int padPixelsLog2; X int padBytesLog2; X} PaddingInfo; Xextern PaddingInfo PixmapWidthPaddingInfo[]; X X X X X X X X X X X X X X# 27 "../.././server/include/font.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _FontProp *FontPropPtr; Xtypedef struct _CharInfo *CharInfoPtr; Xtypedef struct _FontInfo *FontInfoPtr; Xtypedef unsigned int DrawDirection; Xtypedef struct _ExtentInfo *ExtentInfoPtr; X X X X# 26 "../.././server/include/fontstruct.h" X X# 1 "../.././server/include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../.././server/include/misc.h" X X# 27 "../.././server/include/fontstruct.h" X X Xtypedef struct _CharInfo { X xCharInfo metrics; X unsigned byteOffset:24; X Bool exists:1; X unsigned pad:7; X} CharInfoRec; X Xtypedef struct _FontInfo { X unsigned int version1; X unsigned int allExist; X unsigned int drawDirection; X unsigned int noOverlap; X X X X unsigned int constantMetrics; X unsigned int terminalFont; X X X X X X X unsigned int linear:1; X unsigned int constantWidth:1; X X X unsigned int inkInside:1; X X X X X X unsigned int inkMetrics:1; X X X unsigned int padding:28; X unsigned int firstCol; X unsigned int lastCol; X unsigned int firstRow; X unsigned int lastRow; X unsigned int nProps; X unsigned int lenStrings; X unsigned int chDefault; X int fontDescent; X int fontAscent; X CharInfoRec minbounds; X CharInfoRec maxbounds; X unsigned int pixDepth; X unsigned int glyphSets; X X unsigned int version2; X} FontInfoRec; X Xtypedef struct _ExtentInfo { X DrawDirection drawDirection; X int fontAscent; X int fontDescent; X int overallAscent; X int overallDescent; X int overallWidth; X int overallLeft; X int overallRight; X} ExtentInfoRec; X X X X# 12 "bdftosnf.c" X X# 1 "../.././server/include/snfstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././server/include/font.h" X X X X X X X X X X X X X X X X X X X X X X X X# 90 "../.././server/include/font.h" X X# 26 "../.././server/include/snfstruct.h" X X# 1 "../.././server/include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../.././server/include/misc.h" X X# 27 "../.././server/include/snfstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _FontProp { X CARD32 name; X INT32 value; X Bool indirect; X} FontPropRec; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 13 "bdftosnf.c" X X# 1 "../.././server/include/font.h" X X X X X X X X X X X X X X X X X X X X X X X X# 90 "../.././server/include/font.h" X X# 14 "bdftosnf.c" X X X# 1 "bdftosnf.h" X X X X X X X X X X X X X X Xtypedef struct _GlyphMap { X char *bits; X int h; X int w; X int widthBytes; X} GlyphMap; X X X X X X Xtypedef struct _TempFont { X FontInfoPtr pFI; X CharInfoPtr pCI; X unsigned char *pGlyphs; X FontPropPtr pFP; X CharInfoPtr pInkCI; X CharInfoPtr pInkMin; X CharInfoPtr pInkMax; X} TempFont; X X X X X X X X X X X X X X X X X X X X X X X# 109 "bdftosnf.h" X X X X X X X X X X X# 16 "bdftosnf.c" X X X X X Xextern char *gets(), *index(); Xextern void bitorderinvert(), twobyteinvert(), fourbyteinvert(); X Xstatic char *myname; Xstatic char *currentFile = 0; X Xint linenum = 0; Xint badbitswarn = 0; Xint ignoredcharwarn = 0; Xint makeTEfonts = 0; Xint inhibitInk = 0; X Xint glyphPad = 4 ; Xint bitorder = 1 ; Xint scanunit = 1 ; Xint byteorder = 1 ; X X X X X X X XFontPropPtr fontProp = (FontPropPtr)0; XFontPropPtr pointSizeProp = (FontPropPtr)0; XFontPropPtr resolutionProp = (FontPropPtr)0; XFontPropPtr xHeightProp = (FontPropPtr)0; XFontPropPtr weightProp = (FontPropPtr)0; XFontPropPtr quadWidthProp = (FontPropPtr)0; X X XBOOL haveFontAscent = 0; XBOOL haveFontDescent = 0; X X Xstatic char **strings = 0; X Xchar * Xpname(i) X unsigned i; X{ X return strings[i]; X} X X Xmain(argc, argv) X int argc; X char * argv[]; X{ X TempFont font; X FontInfoRec fi; X CharInfoPtr cinfos[256]; X int bytesGlAlloced = 1024; X X unsigned char *pGl = (unsigned char *)malloc((unsigned)bytesGlAlloced); X int bytesGlUsed = 0; X int nGl = 0; X int nchars; X float pointSize; X int xRes, yRes; X char linebuf[1024]; X char namebuf[100]; X char secondbuf[1024]; X char thirdbuf[1024]; X char fontName[100]; X unsigned int attributes; X int digitWidths = 0, digitCount = 0, ex = 0; X int char_row, char_col; X int i; X CharInfoRec emptyCharInfo; X X myname = argv[0]; X argc--, argv++; X while (argc--) { X if (argv[0][0] == '-') { X switch (argv[0][1]) { X case 'p': X switch (argv[0][2]) { X case '1': X case '2': X case '4': X case '8': X if (argv[0][3] != '\0') X goto usage; X glyphPad = argv[0][2] - '0'; X break; X default: X goto usage; X } X break; X X case 'u': X switch (argv[0][2]) { X case '1': X case '2': X case '4': X if (argv[0][3] != '\0') X goto usage; X scanunit = argv[0][2] - '0'; X break; X default: X goto usage; X } X break; X X case 'm': X if (argv[0][2] != '\0') X goto usage; X bitorder = 1; X break; X X case 'l': X if (argv[0][2] != '\0') X goto usage; X bitorder = 0; X break; X X case 'M': X if (argv[0][2] != '\0') X goto usage; X byteorder = 1; X break; X X case 'L': X if (argv[0][2] != '\0') X goto usage; X byteorder = 0; X break; X X case 'w': X if (argv[0][2] != '\0') X goto usage; X badbitswarn = 1; X break; X X case 'W': X if (argv[0][2] != '\0') X goto usage; X ignoredcharwarn = 1; X break; X X case 't': X if (argv[0][2] != '\0') X goto usage; X makeTEfonts = 1; X break; X X case 'i': X if (argv[0][2] != '\0') X goto usage; X inhibitInk = 1; X break; X X default: X goto usage; X break; X } X } else { X if (currentFile) X { X usage: X fprintf((&_iob[2]), X "usage: %s [-p#] [-u#] [-m] [-l] [-M] [-L] [-w] [-W] [-t] [-i] [bdf file]\n", X myname); X fprintf((&_iob[2]), X " where # for -p is 1, 2, 4, or 8\n"); X fprintf((&_iob[2]), X " and # for -s is 1, 2, or 4\n"); X exit(1); X } X currentFile = argv[0]; X } X argv++; X } X if (currentFile) { X if (freopen(currentFile, "r", (&_iob[0])) == 0) X fatal("could not open file\n"); X } else { X currentFile = "(stdin)"; X } X X emptyCharInfo.metrics.leftSideBearing = 0; X emptyCharInfo.metrics.rightSideBearing = 0; X emptyCharInfo.metrics.ascent = 0; X emptyCharInfo.metrics.descent = 0; X emptyCharInfo.metrics.characterWidth = 0; X emptyCharInfo.byteOffset = 0; X emptyCharInfo.exists = 0; X emptyCharInfo.metrics.attributes = 0; X X for (i = 0; i < 256; i++) X cinfos[i] = (CharInfoPtr)0; X X font.pFI = &fi; X fi.firstRow = 256; X fi.lastRow = 0; X fi.firstCol = 256; X fi.lastCol = 0; X fi.pixDepth = 1; X fi.glyphSets = 1; X fi.chDefault = 0; X X getline(linebuf); X X if ((sscanf(linebuf, "STARTFONT %s", namebuf) != 1) || X !streq(namebuf, "2.1")) X fatal("bad 'STARTFONT'"); X getline(linebuf); X X if (sscanf(linebuf, "FONT %[^\n]", fontName) != 1) X fatal("bad 'FONT'"); X getline(linebuf); X X if (!prefix(linebuf, "SIZE")) X fatal("missing 'SIZE'"); X if ((sscanf(linebuf, "SIZE %f%d%d", &pointSize, &xRes, &yRes) != 3)) X fatal("bad 'SIZE'"); X if ((pointSize < 1) || (xRes < 1) || (yRes < 1)) X fatal("SIZE values must be > 0"); X if (xRes != yRes) X fatal("x and y resolution must be equal"); X getline(linebuf); X X if (!prefix(linebuf, "FONTBOUNDINGBOX")) X fatal("missing 'FONTBOUNDINGBOX'"); X getline(linebuf); X X if (prefix(linebuf, "STARTPROPERTIES")) { X int nprops; X FontPropPtr pfp; X X if (sscanf(linebuf, "STARTPROPERTIES %d", &nprops) != 1) X fatal("bad 'STARTPROPERTIES'"); X fi.nProps = nprops; X pfp = (FontPropPtr)malloc((unsigned)(nprops+6) * X sizeof(FontPropRec)); X font.pFP = pfp; X getline(linebuf); X while((nprops-- > 0) && !prefix(linebuf, "ENDPROPERTIES")) { X X switch (sscanf(linebuf, "%s%s%s", namebuf, secondbuf, thirdbuf) ) { X X case 1: X fatal("missing '%s' parameter value",namebuf); X break; X X case 2: X X X X X X X if( secondbuf[0] == '"'){ X pfp->indirect = 1; X pfp->value = (INT32)remember(linebuf+strlen(namebuf)); X break; X } else if( isinteger(secondbuf) ){ X pfp->indirect = 0; X pfp->value = atoi(secondbuf); X break; X } else { X fatal("invalid '%s' parameter value",namebuf); X break; X } X X case 3: X X X X X X if( secondbuf[0] == '"'){ X pfp->indirect = 1; X pfp->value = (INT32)remember(linebuf+strlen(namebuf)); X break; X } else { X fatal("invalid '%s' parameter value",namebuf); X break; X } X } X pfp->name = (CARD32)remember(namebuf); X if (specialproperty(pfp, &fi)) X pfp++; X else X fi.nProps--; X getline(linebuf); X } X if (!prefix(linebuf, "ENDPROPERTIES")) X fatal("missing 'ENDPROPERTIES'"); X if (!haveFontAscent || !haveFontDescent) X fatal("must have 'FONT_ASCENT' and 'FONT_DESCENT' properties"); X if (nprops != -1) X fatal("%d too few properties", nprops+1); X if (!fontProp) { X fi.nProps++; X pfp->name = (CARD32)intern("FONT"); X pfp->value = (INT32)intern(fontName); X pfp->indirect = 1; X fontProp = pfp++; X } X if (!pointSizeProp) { X fi.nProps++; X pfp->name = (CARD32)intern("POINT_SIZE"); X pfp->value = (INT32)(pointSize*10.0); X pfp->indirect = 0; X pointSizeProp = pfp++; X } X if (!weightProp) { X fi.nProps++; X pfp->name = (CARD32)intern("WEIGHT"); X pfp->value = -1; X pfp->indirect = 0; X weightProp = pfp++; X } X if (!resolutionProp) { X fi.nProps++; X pfp->name = (CARD32)intern("RESOLUTION"); X pfp->value = (INT32)((xRes*100.0)/72.27); X pfp->indirect = 0; X resolutionProp = pfp++; X } X if (!xHeightProp) { X fi.nProps++; X pfp->name = (CARD32)intern("X_HEIGHT"); X pfp->value = -1; X pfp->indirect = 0; X xHeightProp = pfp++; X } X if (!quadWidthProp) { X fi.nProps++; X pfp->name = (CARD32)intern("QUAD_WIDTH"); X pfp->value = -1; X pfp->indirect = 0; X quadWidthProp = pfp++; X } X } else { X fatal("missing 'STARTPROPERTIES'"); X } X getline(linebuf); X X if (sscanf(linebuf, "CHARS %d", &nchars) != 1) X fatal("bad 'CHARS'"); X if (nchars < 1) X fatal("invalid number of CHARS"); X getline(linebuf); X X while ((nchars-- > 0) && prefix(linebuf, "STARTCHAR")) { X int t; X int ix; X int wx; X int wy; X int bw; X int bh; X int bl; X int bb; X int enc, enc2; X char *p; X int bytesperrow, row, hexperrow, perrow, badbits; X char charName[100]; X X if (sscanf(linebuf, "STARTCHAR %s", charName) != 1) X fatal("bad character name"); X X getline( linebuf); X if ((t=sscanf(linebuf, "ENCODING %d %d", &enc, &enc2)) < 1) X fatal("bad 'ENCODING'"); X if ((enc < -1) || ((t == 2) && (enc2 < -1))) X fatal("bad ENCODING value"); X if (t == 2 && enc == -1) X enc = enc2; X if (enc == -1) { X if (ignoredcharwarn) warning("character '%s' ignored\n", charName); X do { X char *s = getline(linebuf); X if (!s) X fatal("Unexpected EOF"); X } while (!prefix(linebuf, "ENDCHAR")); X getline(linebuf); X continue; X } X if (enc > 0xFFFF) X fatal("character '%s' has encoding(=%d) too large", charName, enc); X char_row = (enc >> 8) & 0xFF; X char_col = enc & 0xFF; X fi.firstRow = ((fi.firstRow)>( char_row)?( char_row):(fi.firstRow)); X fi.lastRow = ((fi.lastRow)>( char_row)?(fi.lastRow):( char_row)); X fi.firstCol = ((fi.firstCol )>( char_col)?( char_col):(fi.firstCol )); X fi.lastCol = ((fi.lastCol )>( char_col)?(fi.lastCol ):( char_col)); X if (!cinfos[char_row]) X { X cinfos[char_row] = X (CharInfoPtr)malloc(sizeof(CharInfoRec)*256); X bzero((char *)cinfos[char_row], sizeof(CharInfoRec)*256); X } X X getline( linebuf); X if (sscanf( linebuf, "SWIDTH %d %d", &wx, &wy) != 2) X fatal("bad 'SWIDTH'"); X if (wy != 0) X fatal("SWIDTH y value must be zero"); X X getline( linebuf); X if (sscanf( linebuf, "DWIDTH %d %d", &wx, &wy) != 2) X fatal("bad 'DWIDTH'"); X if (wy != 0) X fatal("DWIDTH y value must be zero"); X X getline( linebuf); X if (sscanf( linebuf, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4) X fatal("bad 'BBX'"); X if ((bh < 0) || (bw < 0)) X fatal("character '%s' has a negative sized bitmap, %dx%d", X charName, bw, bh); X X getline( linebuf); X if (prefix(linebuf, "ATTRIBUTES")) X { X for (p = linebuf + strlen("ATTRIBUTES "); X (*p == ' ') || (*p == '\t'); X p ++) X ; X attributes = hexbyte(p)<< 8 + hexbyte(p+2); X getline( linebuf); X } X else X attributes = 0; X if (!prefix(linebuf, "BITMAP")) X fatal("missing 'BITMAP'"); X X X if ((strlen(charName) == 1)){ X if ((charName[0] >='0') && (charName[0] <= '9')) { X digitWidths += wx; X digitCount++; X } else if (charName[0] == 'x') { X ex = (bh+bb)<=0? bh : bh+bb ; X } X } X X cinfos[char_row][char_col].metrics.leftSideBearing = bl; X cinfos[char_row][char_col].metrics.rightSideBearing = bl+bw; X cinfos[char_row][char_col].metrics.ascent = bh+bb; X cinfos[char_row][char_col].metrics.descent = -bb; X cinfos[char_row][char_col].metrics.characterWidth = wx; X cinfos[char_row][char_col].byteOffset = bytesGlUsed; X cinfos[char_row][char_col].exists = 0; X cinfos[char_row][char_col].metrics.attributes = attributes; X X badbits = 0; X bytesperrow = ((glyphPad) == 1 ? (((bw)+7)>>3) :(glyphPad) == 2 ? ((((bw)+15)>>3)&~1) :(glyphPad) == 4 ? ((((bw)+31)>>3)&~3) :(glyphPad) == 8 ? ((((bw)+63)>>3)&~7) : 0); X hexperrow = (bw + 7) >> 3; X if (hexperrow == 0) hexperrow = 1; X for (row=0; row < bh; row++) { X getline(linebuf); X p = linebuf; X t = strlen(p); X if (t & 1) X fatal("odd number of characters in hex encoding"); X t >>= 1; X if ((bytesGlUsed + bytesperrow) >= bytesGlAlloced) { X bytesGlAlloced = (bytesGlUsed + bytesperrow) * 2; X pGl = (unsigned char *)realloc((char *)pGl, X (unsigned)bytesGlAlloced); X } X perrow = ((hexperrow)>( t)?( t):(hexperrow)); X for ( ix=0; ix < perrow; ix++, p+=2, bytesGlUsed++) X { X pGl[bytesGlUsed] = hexbyte(p); X } X if (perrow && (hexperrow <= t) && (bw & 7) && X (ix = (pGl[bytesGlUsed-1] & (0xff >> (bw & 7))))) { X pGl[bytesGlUsed-1] &= ~ix; X if (badbitswarn) X badbits = 1; X } X if (badbitswarn) { X for ( ix = perrow; ix < t; ix++, p+= 2) { X if (hexbyte(p) != 0) { X badbits = 1; X break; X } X } X } X for ( ix=perrow; ix < bytesperrow; ix++, bytesGlUsed++) X { X pGl[bytesGlUsed] = 0; X } X X X X bytesGlUsed = ((glyphPad) == 1 ? (((bytesGlUsed<<3)+7)>>3) :(glyphPad) == 2 ? ((((bytesGlUsed<<3)+15)>>3)&~1) :(glyphPad) == 4 ? ((((bytesGlUsed<<3)+31)>>3)&~3) :(glyphPad) == 8 ? ((((bytesGlUsed<<3)+63)>>3)&~7) : 0); X } X if (badbits) X warning("character '%s' has bits outside bounding box ignored", X charName); X getline( linebuf); X if (!prefix(linebuf, "ENDCHAR")) X fatal("missing 'ENDCHAR'"); X nGl++; X getline( linebuf); X } X X if (nchars != -1) X fatal("%d too few characters", nchars+1); X if (prefix(linebuf, "STARTCHAR")) X fatal("more characters than specified"); X if (!prefix(linebuf, "ENDFONT")) X fatal("missing 'ENDFONT'"); X if (nchars != -1) X fatal("%d too few characters", nchars+1); X if (nGl == 0) X fatal("No characters with valid encodings"); X X fi.maxbounds.byteOffset = bytesGlUsed; X font.pGlyphs = pGl; X X font.pCI = (CharInfoPtr)malloc(sizeof(CharInfoRec)*(((font.pFI)->lastCol - (font.pFI)->firstCol + 1) * ((font.pFI)->lastRow - (font.pFI)->firstRow + 1))); X i = 0; X for (char_row = fi.firstRow; char_row <= fi.lastRow; char_row++) X { X if (!cinfos[char_row]) X for (char_col = fi.firstCol ; char_col <= fi.lastCol ; char_col++) X { X font.pCI[i] = emptyCharInfo; X i++; X } X else X for (char_col = fi.firstCol ; char_col <= fi.lastCol ; char_col++) X { X font.pCI[i] = cinfos[char_row][char_col]; X i++; X } X } X computeNaccelerators(&font, makeTEfonts, inhibitInk, glyphPad); X X X if (xHeightProp && (xHeightProp->value == -1)) X xHeightProp->value = ex? ex : fi.minbounds.metrics.ascent; X if (quadWidthProp && (quadWidthProp->value == -1)) X quadWidthProp->value = digitCount? X (INT32)((float)digitWidths/(float)digitCount) : X (fi.minbounds.metrics.characterWidth+fi.maxbounds.metrics.characterWidth)/2; X if (weightProp && (weightProp->value == -1)) X weightProp->value = computeweight(&font); X X if (bitorder == 0) X bitorderinvert(pGl, bytesGlUsed); X if (bitorder != byteorder) { X if (scanunit == 2) X twobyteinvert(pGl, bytesGlUsed); X else if (scanunit == 4) X fourbyteinvert(pGl, bytesGlUsed); X } X X WriteNFont((&_iob[1]), &font, pname); X exit(0); X} X END_OF_FILE if test 39316 -ne `wc -c <'bdftosnf.part.i'`; then echo shar: \"'bdftosnf.part.i'\" unpacked with wrong size! fi # end of 'bdftosnf.part.i' fi echo shar: End of shell archive. exit 0
mcneill@UUNET.UU.NET (Keith McNeill) (12/06/88)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: colormap.part.i # Wrapped by mcneill@eplrx7 on Mon Dec 5 11:42:30 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'colormap.part.i' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'colormap.part.i'\" else echo shar: Extracting \"'colormap.part.i'\" \(40952 characters\) sed "s/^X//" >'colormap.part.i' <<'END_OF_FILE' X# 1 "colormap.c" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef unsigned long XID; X Xtypedef XID Window; Xtypedef XID Drawable; Xtypedef XID Font; Xtypedef XID Pixmap; Xtypedef XID Cursor; Xtypedef XID Colormap; Xtypedef XID GContext; Xtypedef XID KeySym; X Xtypedef unsigned long Mask; X Xtypedef unsigned long Atom; X Xtypedef unsigned long VisualID; X Xtypedef unsigned long Time; X Xtypedef unsigned char KeyCode; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 311 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 27 "colormap.c" X X X# 1 "../.././X11/Xproto.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././X11/Xmd.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef long INT32; Xtypedef short INT16; Xtypedef char INT8; X Xtypedef unsigned long CARD32; Xtypedef unsigned short CARD16; Xtypedef unsigned char CARD8; X Xtypedef unsigned long BITS32; Xtypedef unsigned short BITS16; Xtypedef unsigned char BYTE; X Xtypedef unsigned char BOOL; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 53 "../.././X11/Xproto.h" X X# 1 "../.././X11/Xprotostr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../.././X11/Xmd.h" X X X X X X X X X X X X X X X X X X X X X X X X# 139 "../.././X11/Xmd.h" X X# 28 "../.././X11/Xprotostr.h" X X X X Xtypedef struct _xSegment { X INT16 x1 , y1 , x2 , y2 ; X} xSegment; X X X Xtypedef struct _xPoint { X INT16 x , y ; X} xPoint; X Xtypedef struct _xRectangle { X INT16 x , y ; X CARD16 width , height ; X} xRectangle; X X X Xtypedef struct _xArc { X INT16 x , y ; X CARD16 width , height ; X INT16 angle1 , angle2 ; X} xArc; X X X# 54 "../.././X11/Xproto.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef CARD16 KeyButMask; X X X X X X Xtypedef struct { X CARD8 byteOrder; X BYTE pad; X CARD16 majorVersion , minorVersion ; X CARD16 nbytesAuthProto ; X CARD16 nbytesAuthString ; X CARD16 pad2; X} xConnClientPrefix; X Xtypedef struct { X BOOL success; X BYTE lengthReason; X CARD16 majorVersion , X minorVersion ; X CARD16 length ; X} xConnSetupPrefix; X X Xtypedef struct { X CARD32 release ; X CARD32 ridBase , X ridMask ; X CARD32 motionBufferSize ; X CARD16 nbytesVendor ; X CARD16 maxRequestSize ; X CARD8 numRoots; X CARD8 numFormats; X CARD8 imageByteOrder; X CARD8 bitmapBitOrder; X CARD8 bitmapScanlineUnit, X bitmapScanlinePad; X CARD8 minKeyCode, maxKeyCode; X CARD32 pad2 ; X} xConnSetup; X Xtypedef struct { X CARD8 depth; X CARD8 bitsPerPixel; X CARD8 scanLinePad; X CARD8 pad1; X CARD32 pad2 ; X} xPixmapFormat; X X X Xtypedef struct { X CARD8 depth; X CARD8 pad1; X CARD16 nVisuals ; X CARD32 pad2 ; X } xDepth; X Xtypedef struct { X CARD32 visualID ; X CARD8 class; X CARD8 bitsPerRGB; X CARD16 colormapEntries ; X CARD32 redMask , greenMask , blueMask ; X CARD32 pad ; X } xVisualType; X Xtypedef struct { X CARD32 windowId ; X CARD32 defaultColormap ; X CARD32 whitePixel , blackPixel ; X CARD32 currentInputMask ; X CARD16 pixWidth , pixHeight ; X CARD16 mmWidth , mmHeight ; X CARD16 minInstalledMaps , maxInstalledMaps ; X CARD32 rootVisualID ; X CARD8 backingStore; X BOOL saveUnders; X CARD8 rootDepth; X CARD8 nDepths; X} xWindowRoot; X X X X X X X X X Xtypedef struct { X CARD32 time ; X INT16 x , y ; X} xTimecoord; X Xtypedef struct { X CARD8 family; X BYTE pad; X CARD16 length ; X} xHostEntry; X Xtypedef struct { X INT16 leftSideBearing , X rightSideBearing , X characterWidth , X ascent , X descent ; X CARD16 attributes ; X} xCharInfo; X Xtypedef struct { X CARD32 name ; X CARD32 value ; X} xFontProp; X X X X Xtypedef struct { X CARD8 len; X X INT8 delta; X} xTextElt; X X Xtypedef struct { X CARD32 pixel ; X CARD16 red , green , blue ; X CARD8 flags; X CARD8 pad; X} xColorItem; X X Xtypedef struct { X CARD16 red , green , blue , pad ; X} xrgb; X Xtypedef CARD8 KEYCODE; X X X X X X X X# 937 "../.././X11/Xproto.h" X X X X X X X X X X Xtypedef struct { X BYTE type; X BYTE errorCode; X CARD16 sequenceNumber ; X CARD32 resourceID ; X CARD16 minorCode ; X CARD8 majorCode; X BYTE pad1; X CARD32 pad3 ; X CARD32 pad4 ; X CARD32 pad5 ; X CARD32 pad6 ; X CARD32 pad7 ; X} xError; X X X X X X X X X X Xtypedef struct { X union { X struct { X BYTE type; X BYTE detail; X CARD16 sequenceNumber ; X } u; X struct { X CARD32 pad00 ; X CARD32 time ; X CARD32 root , event , child ; X INT16 rootX , rootY , eventX , eventY ; X KeyButMask state ; X BOOL sameScreen; X BYTE pad1; X } keyButtonPointer; X struct { X CARD32 pad00 ; X CARD32 time ; X CARD32 root , event , child ; X INT16 rootX , rootY , eventX , eventY ; X KeyButMask state ; X BYTE mode; X BYTE flags; X X X } enterLeave; X struct { X CARD32 pad00 ; X CARD32 window ; X BYTE mode; X BYTE pad1, pad2, pad3; X } focus; X struct { X CARD32 pad00 ; X CARD32 window ; X CARD16 x , y , width , height ; X CARD16 count ; X CARD16 pad2 ; X } expose; X struct { X CARD32 pad00 ; X CARD32 drawable ; X CARD16 x , y , width , height ; X CARD16 minorEvent ; X CARD16 count ; X BYTE majorEvent; X BYTE pad1, pad2, pad3; X } graphicsExposure; X struct { X CARD32 pad00 ; X CARD32 drawable ; X CARD16 minorEvent ; X BYTE majorEvent; X BYTE bpad; X } noExposure; X struct { X CARD32 pad00 ; X CARD32 window ; X CARD8 state; X BYTE pad1, pad2, pad3; X } visibility; X struct { X CARD32 pad00 ; X CARD32 parent , window ; X INT16 x , y ; X CARD16 width , height , borderWidth ; X BOOL override; X BYTE bpad; X } createNotify; X X X X X X X X X struct { X CARD32 pad00 ; X CARD32 event , window ; X } destroyNotify; X struct { X CARD32 pad00 ; X CARD32 event , window ; X BOOL fromConfigure; X BYTE pad1, pad2, pad3; X } unmapNotify; X struct { X CARD32 pad00 ; X CARD32 event , window ; X BOOL override; X BYTE pad1, pad2, pad3; X } mapNotify; X struct { X CARD32 pad00 ; X CARD32 parent , window ; X } mapRequest; X struct { X CARD32 pad00 ; X CARD32 event , window , parent ; X INT16 x , y ; X BOOL override; X BYTE pad1, pad2, pad3; X } reparent; X struct { X CARD32 pad00 ; X CARD32 event , window , aboveSibling ; X INT16 x , y ; X CARD16 width , height , borderWidth ; X BOOL override; X BYTE bpad; X } configureNotify; X struct { X CARD32 pad00 ; X CARD32 parent , window , sibling ; X INT16 x , y ; X CARD16 width , height , borderWidth ; X CARD16 valueMask ; X CARD32 pad1 ; X } configureRequest; X struct { X CARD32 pad00 ; X CARD32 event , window ; X INT16 x , y ; X CARD32 pad1, pad2, pad3, pad4; X } gravity; X struct { X CARD32 pad00 ; X CARD32 window ; X CARD16 width , height ; X } resizeRequest; X struct { X X X CARD32 pad00 ; X CARD32 event , window , parent ; X BYTE place; X BYTE pad1, pad2, pad3; X } circulate; X struct { X CARD32 pad00 ; X CARD32 window ; X CARD32 atom ; X CARD32 time ; X BYTE state; X BYTE pad1; X CARD16 pad2 ; X } property; X struct { X CARD32 pad00 ; X CARD32 time ; X CARD32 window ; X CARD32 atom ; X } selectionClear; X struct { X CARD32 pad00 ; X CARD32 time ; X CARD32 owner , requestor ; X CARD32 selection , target , property ; X } selectionRequest; X struct { X CARD32 pad00 ; X CARD32 time ; X CARD32 requestor ; X CARD32 selection , target , property ; X } selectionNotify; X struct { X CARD32 pad00 ; X CARD32 window ; X CARD32 colormap ; X BOOL new; X BYTE state; X BYTE pad1, pad2; X } colormap; X struct { X CARD32 pad00 ; X CARD8 request; X CARD8 firstKeyCode; X CARD8 count; X BYTE pad1; X } mappingNotify; X struct { X CARD32 pad00 ; X CARD32 window ; X union { X struct { X CARD32 type ; X INT32 longs0 ; X INT32 longs1 ; X INT32 longs2 ; X INT32 longs3 ; X INT32 longs4 ; X } l; X struct { X CARD32 type ; X INT16 shorts0 ; X INT16 shorts1 ; X INT16 shorts2 ; X INT16 shorts3 ; X INT16 shorts4 ; X INT16 shorts5 ; X INT16 shorts6 ; X INT16 shorts7 ; X INT16 shorts8 ; X INT16 shorts9 ; X } s; X struct { X CARD32 type ; X INT8 bytes[20]; X } b; X } u; X } clientMessage; X } u; X} xEvent; X X X X X Xtypedef struct { X BYTE type; X BYTE map[31]; X } xKeymapEvent; X X X X X X X X X X X# 1250 "../.././X11/Xproto.h" X X X X X X X X X X X Xtypedef struct { X CARD8 reqType; X CARD8 data; X CARD16 length ; X X} xReq; X X X X X X X X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 id ; X } xResourceReq; X Xtypedef struct { X CARD8 reqType; X CARD8 depth; X CARD16 length ; X CARD32 wid , parent ; X INT16 x , y ; X CARD16 width , height , borderWidth ; X CARD16 class ; X CARD32 visual ; X CARD32 mask ; X} xCreateWindowReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 valueMask ; X} xChangeWindowAttributesReq; X Xtypedef struct { X CARD8 reqType; X BYTE mode; X CARD16 length ; X CARD32 window ; X} xChangeSaveSetReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window , parent ; X INT16 x , y ; X} xReparentWindowReq; X Xtypedef struct { X CARD8 reqType; X CARD8 pad; X CARD16 length ; X CARD32 window ; X CARD16 mask ; X CARD16 pad2 ; X} xConfigureWindowReq; X Xtypedef struct { X CARD8 reqType; X CARD8 direction; X CARD16 length ; X CARD32 window ; X} xCirculateWindowReq; X Xtypedef struct { X CARD8 reqType; X BOOL onlyIfExists; X CARD16 length ; X CARD16 nbytes ; X CARD16 pad ; X} xInternAtomReq; X Xtypedef struct { X CARD8 reqType; X CARD8 mode; X CARD16 length ; X CARD32 window ; X CARD32 property , type ; X CARD8 format; X BYTE pad[3]; X CARD32 nUnits ; X} xChangePropertyReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 property ; X} xDeletePropertyReq; X Xtypedef struct { X CARD8 reqType; X BOOL delete; X CARD16 length ; X CARD32 window ; X CARD32 property , type ; X CARD32 longOffset ; X CARD32 longLength ; X} xGetPropertyReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 selection ; X CARD32 time ; X} xSetSelectionOwnerReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 requestor ; X CARD32 selection , target , property ; X CARD32 time ; X } xConvertSelectionReq; X X X Xtypedef struct { X CARD8 reqType; X BOOL propagate; X CARD16 length ; X CARD32 destination ; X CARD32 eventMask ; X X X X X xEvent event; X X} xSendEventReq; X X X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD16 eventMask ; X BYTE pointerMode, keyboardMode; X CARD32 confineTo ; X CARD32 cursor ; X CARD32 time ; X} xGrabPointerReq; X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD16 eventMask ; X BYTE pointerMode, keyboardMode; X CARD32 confineTo ; X CARD32 cursor ; X CARD8 button; X BYTE pad; X CARD16 modifiers ; X} xGrabButtonReq; X Xtypedef struct { X CARD8 reqType; X CARD8 button; X CARD16 length ; X CARD32 grabWindow ; X CARD16 modifiers ; X CARD16 pad ; X} xUngrabButtonReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cursor ; X CARD32 time ; X CARD16 eventMask ; X CARD16 pad2 ; X} xChangeActivePointerGrabReq; X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD32 time ; X BYTE pointerMode, keyboardMode; X CARD16 pad ; X} xGrabKeyboardReq; X Xtypedef struct { X CARD8 reqType; X BOOL ownerEvents; X CARD16 length ; X CARD32 grabWindow ; X CARD16 modifiers ; X CARD8 key; X BYTE pointerMode, keyboardMode; X BYTE pad1, pad2, pad3; X} xGrabKeyReq; X Xtypedef struct { X CARD8 reqType; X CARD8 key; X CARD16 length ; X CARD32 grabWindow ; X CARD16 modifiers ; X CARD16 pad ; X} xUngrabKeyReq; X Xtypedef struct { X CARD8 reqType; X CARD8 mode; X CARD16 length ; X CARD32 time ; X} xAllowEventsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD32 start , stop ; X} xGetMotionEventsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcWid , dstWid ; X INT16 srcX , srcY ; X} xTranslateCoordsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcWid , dstWid ; X INT16 srcX , srcY ; X CARD16 srcWidth , srcHeight ; X INT16 dstX , dstY ; X} xWarpPointerReq; X Xtypedef struct { X CARD8 reqType; X CARD8 revertTo; X CARD16 length ; X CARD32 focus ; X CARD32 time ; X} xSetInputFocusReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 fid ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xOpenFontReq; X Xtypedef struct { X CARD8 reqType; X BOOL oddLength; X CARD16 length ; X CARD32 fid ; X } xQueryTextExtentsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD16 maxNames ; X CARD16 nbytes ; X} xListFontsReq; X Xtypedef xListFontsReq xListFontsWithInfoReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD16 nFonts ; X BYTE pad1, pad2; X} xSetFontPathReq; X Xtypedef struct { X CARD8 reqType; X CARD8 depth; X CARD16 length ; X CARD32 pid ; X CARD32 drawable ; X CARD16 width , height ; X} xCreatePixmapReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 gc ; X CARD32 drawable ; X CARD32 mask ; X} xCreateGCReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 gc ; X CARD32 mask ; X} xChangeGCReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcGC , dstGC ; X CARD32 mask ; X} xCopyGCReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 gc ; X CARD16 dashOffset ; X CARD16 nDashes ; X} xSetDashesReq; X Xtypedef struct { X CARD8 reqType; X BYTE ordering; X CARD16 length ; X CARD32 gc ; X INT16 xOrigin , yOrigin ; X} xSetClipRectanglesReq; X Xtypedef struct { X CARD8 reqType; X BOOL exposures; X CARD16 length ; X CARD32 window ; X INT16 x , y ; X CARD16 width , height ; X} xClearAreaReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcDrawable , dstDrawable ; X CARD32 gc ; X INT16 srcX , srcY , dstX , dstY ; X CARD16 width , height ; X} xCopyAreaReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 srcDrawable , dstDrawable ; X CARD32 gc ; X INT16 srcX , srcY , dstX , dstY ; X CARD16 width , height ; X CARD32 bitPlane ; X} xCopyPlaneReq; X Xtypedef struct { X CARD8 reqType; X BYTE coordMode; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X} xPolyPointReq; X Xtypedef xPolyPointReq xPolyLineReq; X X X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X} xPolySegmentReq; X Xtypedef xPolySegmentReq xPolyArcReq; Xtypedef xPolySegmentReq xPolyRectangleReq; Xtypedef xPolySegmentReq xPolyFillRectangleReq; Xtypedef xPolySegmentReq xPolyFillArcReq; X Xtypedef struct _FillPolyReq { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X BYTE shape; X BYTE coordMode; X CARD16 pad1 ; X} xFillPolyReq; X X Xtypedef struct _PutImageReq { X CARD8 reqType; X CARD8 format; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X CARD16 width , height ; X INT16 dstX , dstY ; X CARD8 leftPad; X CARD8 depth; X CARD16 pad ; X} xPutImageReq; X Xtypedef struct { X CARD8 reqType; X CARD8 format; X CARD16 length ; X CARD32 drawable ; X INT16 x , y ; X CARD16 width , height ; X CARD32 planeMask ; X} xGetImageReq; X X X Xtypedef struct { X CARD8 reqType; X CARD8 pad; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X INT16 x , y ; X} xPolyTextReq; X Xtypedef xPolyTextReq xPolyText8Req; Xtypedef xPolyTextReq xPolyText16Req; X Xtypedef struct { X CARD8 reqType; X BYTE nChars; X CARD16 length ; X CARD32 drawable ; X CARD32 gc ; X INT16 x , y ; X} xImageTextReq; X Xtypedef xImageTextReq xImageText8Req; Xtypedef xImageTextReq xImageText16Req; X Xtypedef struct { X CARD8 reqType; X BYTE alloc; X CARD16 length ; X CARD32 mid ; X CARD32 window ; X CARD32 visual ; X} xCreateColormapReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 mid ; X CARD32 srcCmap ; X} xCopyColormapAndFreeReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD16 red , green , blue ; X CARD16 pad2 ; X} xAllocColorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xAllocNamedColorReq; X Xtypedef struct { X CARD8 reqType; X BOOL contiguous; X CARD16 length ; X CARD32 cmap ; X CARD16 colors , planes ; X} xAllocColorCellsReq; X Xtypedef struct { X CARD8 reqType; X BOOL contiguous; X CARD16 length ; X CARD32 cmap ; X CARD16 colors , red , green , blue ; X} xAllocColorPlanesReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD32 planeMask ; X} xFreeColorsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X} xStoreColorsReq; X Xtypedef struct { X CARD8 reqType; X CARD8 flags; X CARD16 length ; X CARD32 cmap ; X CARD32 pixel ; X CARD16 nbytes ; X BYTE pad1, pad2; X } xStoreNamedColorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X} xQueryColorsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cmap ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xLookupColorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cid ; X CARD32 source , mask ; X CARD16 foreRed , foreGreen , foreBlue ; X CARD16 backRed , backGreen , backBlue ; X CARD16 x , y ; X} xCreateCursorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cid ; X CARD32 source , mask ; X CARD16 sourceChar , maskChar ; X CARD16 foreRed , foreGreen , foreBlue ; X CARD16 backRed , backGreen , backBlue ; X} xCreateGlyphCursorReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 cursor ; X CARD16 foreRed , foreGreen , foreBlue ; X CARD16 backRed , backGreen , backBlue ; X} xRecolorCursorReq; X Xtypedef struct { X CARD8 reqType; X CARD8 class; X CARD16 length ; X CARD32 drawable ; X CARD16 width , height ; X} xQueryBestSizeReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD16 nbytes ; X BYTE pad1, pad2; X} xQueryExtensionReq; X Xtypedef struct { X CARD8 reqType; X CARD8 numKeyPerModifier; X CARD16 length ; X} xSetModifierMappingReq; X Xtypedef struct { X CARD8 reqType; X CARD8 nElts; X CARD16 length ; X} xSetPointerMappingReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD8 firstKeyCode; X CARD8 count; X CARD16 pad1 ; X} xGetKeyboardMappingReq; X Xtypedef struct { X CARD8 reqType; X CARD8 keyCodes; X CARD16 length ; X CARD8 firstKeyCode; X CARD8 keySymsPerKeyCode; X CARD16 pad1 ; X} xChangeKeyboardMappingReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 mask ; X} xChangeKeyboardControlReq; X Xtypedef struct { X CARD8 reqType; X INT8 percent; X CARD16 length ; X} xBellReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X INT16 accelNum , accelDenum ; X INT16 threshold ; X BOOL doAccel, doThresh; X} xChangePointerControlReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X INT16 timeout , interval ; X BYTE preferBlank, allowExpose; X CARD16 pad2 ; X} xSetScreenSaverReq; X Xtypedef struct { X CARD8 reqType; X BYTE mode; X CARD16 length ; X CARD8 hostFamily; X BYTE pad; X CARD16 hostLength ; X} xChangeHostsReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X } xListHostsReq; X Xtypedef struct { X CARD8 reqType; X BYTE mode; X CARD16 length ; X } xChangeModeReq; X Xtypedef xChangeModeReq xSetAccessControlReq; Xtypedef xChangeModeReq xSetCloseDownModeReq; Xtypedef xChangeModeReq xForceScreenSaverReq; X Xtypedef struct { X CARD8 reqType; X BYTE pad; X CARD16 length ; X CARD32 window ; X CARD16 nAtoms ; X INT16 nPositions ; X } xRotatePropertiesReq; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 29 "colormap.c" X X# 1 "../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern unsigned long globalSerialNumber; X X X X X X X X X X X X X X Xtypedef unsigned char *pointer; Xtypedef int Bool; Xtypedef unsigned long PIXEL; Xtypedef unsigned long ATOM; X X X X X X X# 1 "../include/os.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../include/misc.h" X X# 29 "../include/os.h" X X X X X X X X X X X X X X Xtypedef pointer FID; Xtypedef struct _FontPathRec *FontPathPtr; Xtypedef struct _NewClientRec *NewClientPtr; X X X X X X X X X X X# 69 "../include/os.h" X X X X X X X X X Xchar *alloca(); X X X X X X# 92 "../include/os.h" X X X X X X X X X X X X X X Xchar *ReadRequestFromClient(); Xchar *strcat(); Xchar *strncat(); Xchar *strcpy(); Xchar *strncpy(); XBool CloseDownConnection(); XFontPathPtr GetFontPath(); XFontPathPtr ExpandFontNamePattern(); XFID FiOpenForRead(); Xvoid CreateWellKnownSockets(); Xvoid SetDefaultFontPath(); Xvoid FreeFontRecord(); Xvoid SetFontPath(); Xvoid ErrorF(); Xvoid Error(); Xvoid FatalError(); Xvoid ProcessCommandLine(); Xvoid Xfree(); Xvoid FlushAllOutput(); Xvoid FlushIfCriticalOutputPending(); Xunsigned long *Xalloc(); Xunsigned long *Xrealloc(); Xlong GetTimeInMillis(); X X X# 58 "../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DDXPoint *DDXPointPtr; Xtypedef struct _Box *BoxPtr; X X X# 30 "colormap.c" X X# 1 "../include/dix.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _GCInterest *GCInterestPtr; Xtypedef struct _GC *GCPtr; Xextern void ValidateGC(); Xextern int ChangeGC(); Xextern GCPtr CreateGC(); Xextern int CopyGC(); Xextern int FreeGC(); Xextern void SetGCMask(); Xextern GCPtr GetScratchGC(); Xextern void FreeScratchGC(); X X# 29 "../include/dix.h" X X# 1 "../include/window.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _BackingStore *BackingStorePtr; Xtypedef struct _Window *WindowPtr; X X X# 30 "../include/dix.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _TimeStamp *TimeStampPtr; Xtypedef struct _Client *ClientPtr; Xextern ClientPtr requestingClient; Xextern ClientPtr *clients; Xextern ClientPtr serverClient; Xextern int currentMaxClients; X Xextern int ProcAllowEvents(); Xextern int ProcBell(); Xextern int ProcChangeActivePointerGrab(); Xextern int ProcChangeKeyboardControl(); Xextern int ProcChangePointerControl(); Xextern int ProcGetKeyboardMapping(); Xextern int ProcGetPointerMapping(); Xextern int ProcGetInputFocus(); Xextern int ProcGetKeyboardControl(); Xextern int ProcGetMotionEvents(); Xextern int ProcGetPointerControl(); Xextern int ProcGrabButton(); Xextern int ProcGrabKey(); Xextern int ProcGrabKeyboard(); Xextern int ProcGrabPointer(); Xextern int ProcQueryKeymap(); Xextern int ProcQueryPointer(); Xextern int ProcSetInputFocus(); Xextern int ProcSetKeyboardMapping(); Xextern int ProcSetPointerMapping(); Xextern int ProcSendEvent(); Xextern int ProcUngrabButton(); Xextern int ProcUngrabKey(); Xextern int ProcUngrabKeyboard(); Xextern int ProcUngrabPointer(); Xextern int ProcWarpPointer(); Xextern int ProcRecolorCursor(); X Xextern WindowPtr LookupWindow(); Xextern pointer LookupDrawable(); X Xextern void NoopDDA(); X X X# 31 "colormap.c" X X# 1 "../include/colormapst.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/colormap.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 55 "../include/colormap.h" X X X X X X X X X Xtypedef unsigned long Pixel; Xtypedef struct _CMEntry *EntryPtr; Xtypedef struct _ColormapRec *ColormapPtr; X Xextern int CreateColormap(); Xextern Pixel FindColor(); Xextern int FreeColormap(); Xextern int TellNoMap(); Xextern int TellLostMap(); Xextern int TellGainedMap(); Xextern int IsMapInstalled(); Xextern void UninstallColormap(); X X X# 28 "../include/colormapst.h" X X# 1 "../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _PixmapFormat *PixmapFormatPtr; Xtypedef struct _Visual *VisualPtr; Xtypedef struct _Depth *DepthPtr; Xtypedef struct _Screen *ScreenPtr; X X X# 29 "../include/colormapst.h" X X X Xtypedef struct X{ X unsigned short color; X short refcnt; X} SHAREDCOLOR; X X X X Xtypedef struct X{ X unsigned short red, green, blue; X} LOCO; X X X X X Xtypedef struct X{ X SHAREDCOLOR *red, *green, *blue; X} SHCO; X X X Xtypedef struct _CMEntry X{ X union X { X LOCO local; X SHCO shco; X } co; X short refcnt; X Bool fShared; X} Entry; X X X X X Xtypedef struct _ColormapRec X{ X VisualPtr pVisual; X short class; X long mid; X ScreenPtr pScreen; X short flags; X X int freeRed; X int freeGreen; X int freeBlue; X int *numPixelsRed; X int *numPixelsGreen; X int *numPixelsBlue; X Pixel **clientPixelsRed; X Pixel **clientPixelsGreen; X Pixel **clientPixelsBlue; X Entry *red; X Entry *green; X Entry *blue; X pointer devPriv; X} ColormapRec; X X X# 32 "colormap.c" X X# 1 "../include/os.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 130 "../include/os.h" X X# 33 "colormap.c" X X# 1 "../include/scrnintstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 33 "../include/screenint.h" X X# 28 "../include/scrnintstr.h" X X# 1 "../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../include/misc.h" X X# 29 "../include/scrnintstr.h" X X# 1 "../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Region *RegionPtr; X Xextern int SingleRectRegionEqual(); X X X X X X X# 30 "../include/scrnintstr.h" X X# 1 "../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DrawInfo *DrawablePtr; Xtypedef struct _Pixmap *PixmapPtr; X X# 31 "../include/scrnintstr.h" X X# 1 "../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 65 "../include/gc.h" X X# 32 "../include/scrnintstr.h" X X# 1 "../include/colormap.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 77 "../include/colormap.h" X X# 33 "../include/scrnintstr.h" X X X Xtypedef struct _PixmapFormat { X unsigned char depth; X unsigned char bitsPerPixel; X unsigned char scanlinePad; X } PixmapFormatRec; X Xtypedef struct _Visual { X unsigned long vid; X short screen; X short class; X unsigned long redMask, greenMask, blueMask; X int offsetRed, offsetGreen, offsetBlue; X short bitsPerRGBValue; X short ColormapEntries; X short nplanes; X X X } VisualRec; X Xtypedef struct _Depth { X int depth; X int numVids; X unsigned long *vids; X } DepthRec; X Xtypedef struct _Screen { X int myNum; X ATOM id; X short width, height; X short mmWidth, mmHeight; X short numDepths; X DepthPtr allowedDepths; X short rootDepth; X unsigned long rootVisual; X unsigned long defColormap; X short minInstalledCmaps, maxInstalledCmaps; X char backingStoreSupport, saveUnderSupport; X unsigned long whitePixel, blackPixel; X unsigned long rgf; X GCPtr GCperDepth[8+1]; X X X X X X X X PixmapPtr PixmapPerDepth[1]; X pointer devPrivate; X short numVisuals; X VisualPtr visuals; X X X X Bool (* CloseScreen)(); X void (* QueryBestSize)(); X Bool (* SaveScreen)(); X void (* GetImage)(); X X unsigned int *(* GetSpans)(); X X void (* PointerNonInterestBox)(); X X X X Bool (* CreateWindow)(); X Bool (* DestroyWindow)(); X Bool (* PositionWindow)(); X Bool (* ChangeWindowAttributes)(); X Bool (* RealizeWindow)(); X Bool (* UnrealizeWindow)(); X int (* ValidateTree)(); X void (* WindowExposures)(); X X X X PixmapPtr (* CreatePixmap)(); X Bool (* DestroyPixmap)(); X X X X Bool (* RealizeFont)(); X Bool (* UnrealizeFont)(); X X X void (* ConstrainCursor)(); X void (* CursorLimits)(); X Bool (* DisplayCursor)(); X Bool (* RealizeCursor)(); X Bool (* UnrealizeCursor)(); X void (* RecolorCursor)(); X Bool (* SetCursorPosition)(); X X X X Bool (* CreateGC)(); X X X X void (* CreateColormap)(); X void (* DestroyColormap)(); X void (* InstallColormap)(); X void (* UninstallColormap)(); X int (* ListInstalledColormaps) (); X void (* StoreColors)(); X void (* ResolveColor)(); X X X X RegionPtr (* RegionCreate)(); X void (* RegionCopy)(); X void (* RegionDestroy)(); X int (* Intersect)(); X int (* Union)(); X int (* Subtract)(); X int (* Inverse)(); X void (* RegionReset)(); X void (* TranslateRegion)(); X int (* RectIn)(); X Bool (* PointInRegion)(); X Bool (* RegionNotEmpty)(); X void (* RegionEmpty)(); X BoxPtr (*RegionExtents)(); X void (* SendGraphicsExpose)(); X X X void (* BlockHandler)(); X void (* WakeupHandler)(); X pointer blockData; X pointer wakeupData; X} ScreenRec; X Xtypedef struct _ScreenInfo { X int imageByteOrder; X int bitmapScanlineUnit; X int bitmapScanlinePad; X int bitmapBitOrder; X int numPixmapFormats; X PixmapFormatRec X formats[8]; X int arraySize; X int numScreens; X ScreenPtr screen; X} ScreenInfo; X Xextern ScreenInfo screenInfo; X X# 34 "colormap.c" X X# 1 "../include/resource.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../include/misc.h" X X# 27 "../include/resource.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xunsigned short CreateNewResourceType(); Xshort CreateNewResourceClass(); Xunsigned long FakeClientID(); Xvoid AddResource(); Xvoid FreeResource(); Xvoid FreeClientResources(); Xpointer LookupID(); X X X# 35 "colormap.c" X X# 1 "../include/windowstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/window.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 53 "../include/window.h" X X# 29 "../include/windowstr.h" X X# 1 "../include/pixmapstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 45 "../include/pixmap.h" X X# 28 "../include/pixmapstr.h" X X# 1 "../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 33 "../include/screenint.h" X X# 29 "../include/pixmapstr.h" X X# 1 "../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../include/misc.h" X X# 30 "../include/pixmapstr.h" X X X Xtypedef struct _DrawInfo { X short type; X ScreenPtr pScreen; X int depth; X unsigned long serialNumber; X} DrawableRec; X X X X Xtypedef struct _Pixmap { X DrawableRec drawable; X int width, height; X int refcnt; X int devKind; X pointer devPrivate; X } PixmapRec; X X# 30 "../include/windowstr.h" X X# 1 "../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "../include/region.h" X X X X X X# 31 "../include/windowstr.h" X X# 1 "../include/cursor.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Cursor *CursorPtr; Xtypedef struct _CursorMetric *CursorMetricPtr; X Xextern CursorPtr rootCursor; X X# 32 "../include/windowstr.h" X X# 1 "../include/property.h" X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Property *PropertyPtr; X X# 33 "../include/windowstr.h" X X# 1 "../include/resource.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 74 "../include/resource.h" X X# 34 "../include/windowstr.h" X X# 1 "../include/dix.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 100 "../include/dix.h" X X# 35 "../include/windowstr.h" X X# 1 "../include/miscstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../include/misc.h" X X# 28 "../include/miscstruct.h" X X Xextern unsigned long globalSerialNumber; Xtypedef struct _DDXPoint { X short x, y; X} DDXPointRec; X Xtypedef struct _Box { X short x1, y1, x2, y2; X} BoxRec; X X# 36 "../include/windowstr.h" X X# 1 "../.././X11/Xprotostr.h" X X# 55 "../.././X11/Xprotostr.h" X X# 37 "../include/windowstr.h" X X X X X Xtypedef struct _BackingStore { X RegionPtr obscured; X DDXPointRec oldAbsCorner; X void (* SaveDoomedAreas)(); X RegionPtr (* RestoreAreas)(); X void (* ExposeCopy)(); X void (* TranslateBackingStore)(); X X void (* ClearToBackground)(); X void (* DrawGuarantee)(); X} BackingStoreRec; X X X X X X Xtypedef struct _Window { X X DrawableRec drawable; X X VisualID visual; X X struct _Window *parent; X struct _Window *nextSib; X struct _Window *prevSib; X struct _Window *firstChild; X struct _Window *lastChild; X X CursorPtr cursor; X X ClientPtr client; X Window wid; X X RegionPtr clipList; X RegionPtr winSize; X X RegionPtr borderClip; X RegionPtr borderSize; X RegionPtr exposed; X X X X X RegionPtr borderExposed; X xRectangle clientWinSize; X X DDXPointRec absCorner; X DDXPointRec oldAbsCorner; X int class; X Mask eventMask; X Mask dontPropagateMask; X Mask allEventMasks; X Mask deliverableEvents; X pointer otherClients; X pointer passiveGrabs; X X PropertyPtr userProps; X X XID nolongerused; X PixmapPtr backgroundTile; X unsigned long backgroundPixel; X PixmapPtr borderTile; X unsigned long borderPixel; X int borderWidth; X void (* PaintWindowBackground)(); X void (* PaintWindowBorder)(); X void (* CopyWindow)(); X void (* ClearToBackground)(); X X unsigned long backingBitPlanes; X unsigned long backingPixel; X int backingStore; X BackingStorePtr backStorage; X X char bitGravity; X char winGravity; X Colormap colormap; X X X X Bool saveUnder:1; X unsigned visibility:2; X unsigned mapped:1; X unsigned realized:1; X unsigned viewable:1; X unsigned overrideRedirect:1; X unsigned marked:1; X X pointer devBackingStore; X pointer devPrivate; X} WindowRec; X Xextern int DeleteWindow(); Xextern int ChangeWindowAttributes(); Xextern int WalkTree(); Xextern CreateRootWindow(); Xextern WindowPtr CreateWindow(); Xextern int DeleteWindow(); Xextern int DestroySubwindows(); Xextern int ChangeWindowAttributes(); Xextern int GetWindowAttributes(); Xextern int ConfigureWindow(); Xextern int ReparentWindow(); Xextern int MapWindow(); Xextern int MapSubwindow(); Xextern int UnmapWindow(); Xextern int UnmapSubwindow(); Xextern RegionPtr NotClippedByChildren(); X X X X# 36 "colormap.c" X X Xextern XID clientErrorValue; X Xstatic Pixel FindBestPixel(); Xstatic void CopyFree(), FreeCell(), AllocShared(); Xstatic int AllComp(), RedComp(), GreenComp(), BlueComp(), FreeClientPixels(); Xstatic int AllocDirect(), AllocPseudo(), AllocCP(), FreeCo(); X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct X{ X Colormap mid; X int client; X } colorResource; X X X Xint XStoreColors (pmap, count, defs) X ColormapPtr pmap; X int count; X xColorItem *defs; X{ X register Pixel pix; X register xColorItem *pdef; X register EntryPtr pent, pentT, pentLast; X register VisualPtr pVisual; X SHAREDCOLOR *pred, *pgreen, *pblue; X int n, ChgRed, ChgGreen, ChgBlue, idef; X int class, errVal = 0 ; X int ok; X X X class = pmap->class; X if(!(class & 1) && !(pmap->flags & 4)) X { X return( 10 ); X } X pVisual = pmap->pVisual; X X idef = 0; X if((class | 1) == 5) X { X for (pdef = defs, n = 0; n < count; pdef++, n++) X { X ok = 1; X (*pmap->pScreen->ResolveColor) X (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); X X pix = (pdef->pixel & pVisual->redMask) >> pVisual->offsetRed; X if (pix >= pVisual->ColormapEntries ) X { X clientErrorValue = pdef->pixel; X errVal = 2 ; X ok = 0; X } X else if (pmap->red[pix].refcnt != (-1)) X { X errVal = 10 ; X ok = 0; X } X else if (pdef->flags & (1<<0)) X { X pmap->red[pix].co.local.red = pdef->red; X } X X pix = (pdef->pixel & pVisual->greenMask) >> pVisual->offsetGreen; X if (pix >= pVisual->ColormapEntries ) X { X clientErrorValue = pdef->pixel; X errVal = 2 ; X ok = 0; X } X else if (pmap->green[pix].refcnt != (-1)) X { X errVal = 10 ; X ok = 0; X } X else if (pdef->flags & (1<<1)) X { X pmap->green[pix].co.local.green = pdef->green; X } X X pix = (pdef->pixel & pVisual->blueMask) >> pVisual->offsetBlue; X if (pix >= pVisual->ColormapEntries ) X { X clientErrorValue = pdef->pixel; X errVal = 2 ; X ok = 0; X } X else if (pmap->blue[pix].refcnt != (-1)) X { X errVal = 10 ; X ok = 0; X } X else if (pdef->flags & (1<<2)) X { X pmap->blue[pix].co.local.blue = pdef->blue; X } X X X X X if(ok) X { X if(idef != n) X defs[idef] = defs[n]; X idef++; X } X } X } X else X { X for (pdef = defs, n = 0; n < count; pdef++, n++) X { X X ok = 1; X if (pdef->pixel >= pVisual->ColormapEntries) X { X clientErrorValue = pdef->pixel; X errVal = 2 ; X ok = 0; X } X else if (pmap->red[pdef->pixel].refcnt != (-1)) X { X errVal = 10 ; X ok = 0; X } X X X X X X if(ok) X { X if(idef != n) X defs[idef] = defs[n]; X idef++; X } X else X continue; X X (*pmap->pScreen->ResolveColor) X (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); X X pent = &pmap->red[pdef->pixel]; X X if(pdef->flags & (1<<0)) X { X if(pent->fShared) X { X pent->co.shco.red->color = pdef->red; X if (pent->co.shco.red->refcnt > 1) X ok = 0; X } X else X pent->co.local.red = pdef->red; X } X if(pdef->flags & (1<<1)) X { X if(pent->fShared) X { X pent->co.shco.green->color = pdef->green; X if (pent->co.shco.green->refcnt > 1) X ok = 0; X } X else X pent->co.local.green = pdef->green; X } X if(pdef->flags & (1<<2)) X { X if(pent->fShared) X { X pent->co.shco.blue->color = pdef->blue; X if (pent->co.shco.blue->refcnt > 1) X ok = 0; X } X else X pent->co.local.blue = pdef->blue; X } X X if(!ok) X { X X X pred = pent->co.shco.red; X pgreen = pent->co.shco.green; X pblue = pent->co.shco.blue; X ChgRed = pdef->flags & (1<<0); X ChgGreen = pdef->flags & (1<<1); X ChgBlue = pdef->flags & (1<<2); X pentLast = pmap->red + pVisual->ColormapEntries; X X for(pentT = pmap->red; pentT < pentLast; pentT++) X { X if(pentT->fShared && (pentT != pent)) X { X xColorItem defChg; X X X X X X X X X X X X defChg.flags = 0; X if(ChgRed && pentT->co.shco.red == pred) X { X defChg.flags |= (1<<0); X } X if(ChgGreen && pentT->co.shco.green == pgreen) X { X defChg.flags |= (1<<1); X } X if(ChgBlue && pentT->co.shco.blue == pblue) X { X defChg.flags |= (1<<2); X } X if(defChg.flags != 0) X { X defChg.pixel = pentT - pmap->red; X defChg.red = pentT->co.shco.red->color; X defChg.green = pentT->co.shco.green->color; X defChg.blue = pentT->co.shco.blue->color; X (*(pmap->pScreen->StoreColors)) (pmap, 1, &defChg); X } X } X } X X } X } X } X X X if (idef != 0) X ( *(pmap->pScreen->StoreColors)) (pmap, idef, defs); X return (errVal); X} END_OF_FILE if test 40952 -ne `wc -c <'colormap.part.i'`; then echo shar: \"'colormap.part.i'\" unpacked with wrong size! fi # end of 'colormap.part.i' fi echo shar: End of shell archive. exit 0
mcneill@UUNET.UU.NET (Keith McNeill) (12/06/88)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: miarc.part.i # Wrapped by mcneill@eplrx7 on Mon Dec 5 11:42:31 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'miarc.part.i' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'miarc.part.i'\" else echo shar: Extracting \"'miarc.part.i'\" \(27753 characters\) sed "s/^X//" >'miarc.part.i' <<'END_OF_FILE' X# 1 "miarc.c" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef unsigned long XID; X Xtypedef XID Window; Xtypedef XID Drawable; Xtypedef XID Font; Xtypedef XID Pixmap; Xtypedef XID Cursor; Xtypedef XID Colormap; Xtypedef XID GContext; Xtypedef XID KeySym; X Xtypedef unsigned long Mask; X Xtypedef unsigned long Atom; X Xtypedef unsigned long VisualID; X Xtypedef unsigned long Time; X Xtypedef unsigned char KeyCode; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 311 "../../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 27 "miarc.c" X X# 1 "../../.././X11/Xprotostr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../.././X11/Xmd.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef long INT32; Xtypedef short INT16; Xtypedef char INT8; X Xtypedef unsigned long CARD32; Xtypedef unsigned short CARD16; Xtypedef unsigned char CARD8; X Xtypedef unsigned long BITS32; Xtypedef unsigned short BITS16; Xtypedef unsigned char BYTE; X Xtypedef unsigned char BOOL; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 28 "../../.././X11/Xprotostr.h" X X X X Xtypedef struct _xSegment { X INT16 x1 , y1 , x2 , y2 ; X} xSegment; X X X Xtypedef struct _xPoint { X INT16 x , y ; X} xPoint; X Xtypedef struct _xRectangle { X INT16 x , y ; X CARD16 width , height ; X} xRectangle; X X X Xtypedef struct _xArc { X INT16 x , y ; X CARD16 width , height ; X INT16 angle1 , angle2 ; X} xArc; X X X# 28 "miarc.c" X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern unsigned long globalSerialNumber; X X X X X X X X X X X X X X Xtypedef unsigned char *pointer; Xtypedef int Bool; Xtypedef unsigned long PIXEL; Xtypedef unsigned long ATOM; X X X X X X X# 1 "../../include/os.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 29 "../../include/os.h" X X X X X X X X X X X X X X Xtypedef pointer FID; Xtypedef struct _FontPathRec *FontPathPtr; Xtypedef struct _NewClientRec *NewClientPtr; X X X X X X X X X X X# 69 "../../include/os.h" X X X X X X X X X Xchar *alloca(); X X X X X X# 92 "../../include/os.h" X X X X X X X X X X X X X X Xchar *ReadRequestFromClient(); Xchar *strcat(); Xchar *strncat(); Xchar *strcpy(); Xchar *strncpy(); XBool CloseDownConnection(); XFontPathPtr GetFontPath(); XFontPathPtr ExpandFontNamePattern(); XFID FiOpenForRead(); Xvoid CreateWellKnownSockets(); Xvoid SetDefaultFontPath(); Xvoid FreeFontRecord(); Xvoid SetFontPath(); Xvoid ErrorF(); Xvoid Error(); Xvoid FatalError(); Xvoid ProcessCommandLine(); Xvoid Xfree(); Xvoid FlushAllOutput(); Xvoid FlushIfCriticalOutputPending(); Xunsigned long *Xalloc(); Xunsigned long *Xrealloc(); Xlong GetTimeInMillis(); X X X# 58 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DDXPoint *DDXPointPtr; Xtypedef struct _Box *BoxPtr; X X X# 29 "miarc.c" X X# 1 "../../include/gcstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _GCInterest *GCInterestPtr; Xtypedef struct _GC *GCPtr; Xextern void ValidateGC(); Xextern int ChangeGC(); Xextern GCPtr CreateGC(); Xextern int CopyGC(); Xextern int FreeGC(); Xextern void SetGCMask(); Xextern GCPtr GetScratchGC(); Xextern void FreeScratchGC(); X X# 29 "../../include/gcstruct.h" X X X# 1 "../../include/miscstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 28 "../../include/miscstruct.h" X X Xextern unsigned long globalSerialNumber; Xtypedef struct _DDXPoint { X short x, y; X} DDXPointRec; X Xtypedef struct _Box { X short x1, y1, x2, y2; X} BoxRec; X X# 31 "../../include/gcstruct.h" X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Region *RegionPtr; X Xextern int SingleRectRegionEqual(); X X X X X X X# 32 "../../include/gcstruct.h" X X# 1 "../../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DrawInfo *DrawablePtr; Xtypedef struct _Pixmap *PixmapPtr; X X# 33 "../../include/gcstruct.h" X X# 1 "../../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _PixmapFormat *PixmapFormatPtr; Xtypedef struct _Visual *VisualPtr; Xtypedef struct _Depth *DepthPtr; Xtypedef struct _Screen *ScreenPtr; X X X# 34 "../../include/gcstruct.h" X X# 1 "../../include/dixfont.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DIXFontProp *DIXFontPropPtr; Xtypedef struct _Font *FontPtr; X X X X Xtypedef enum {Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit} FontEncoding; Xtypedef struct _FontData *FontDataPtr; X Xextern FontPtr OpenFont(); X X# 35 "../../include/gcstruct.h" X X Xtypedef struct _GCInterest { X struct _GCInterest *pNextGCInterest; X struct _GCInterest *pLastGCInterest; X int length; X ATOM owner; X unsigned long ValInterestMask; X void (* ValidateGC) (); X unsigned long ChangeInterestMask; X int (* ChangeGC) (); X void (* CopyGCSource) (); X void (* CopyGCDest) (); X void (* DestroyGC) (); X pointer extPriv; X} GCInterestRec; X Xtypedef struct _GC{ X ScreenPtr pScreen; X pointer devPriv; X pointer devBackingStore; X int depth; X unsigned long serialNumber; X GCInterestPtr pNextGCInterest; X GCInterestPtr pLastGCInterest; X int alu; X unsigned long planemask; X unsigned long fgPixel, bgPixel; X int lineWidth; X int lineStyle; X int capStyle; X int joinStyle; X int fillStyle; X int fillRule; X int arcMode; X PixmapPtr tile; X PixmapPtr stipple; X DDXPointRec patOrg; X FontPtr font; X int subWindowMode; X Bool graphicsExposures; X DDXPointRec clipOrg; X pointer clientClip; X int clientClipType; X int dashOffset; X int numInDashList; X unsigned char *dash; X X unsigned long stateChanges; X DDXPointRec lastWinOrg; X int miTranslate:1; X X void (* FillSpans)(); X void (* SetSpans)(); X X void (* PutImage)(); X RegionPtr (* CopyArea)(); X RegionPtr (* CopyPlane)(); X void (* PolyPoint)(); X void (* Polylines)(); X void (* PolySegment)(); X void (* PolyRectangle)(); X void (* PolyArc)(); X void (* FillPolygon)(); X void (* PolyFillRect)(); X void (* PolyFillArc)(); X int (* PolyText8)(); X int (* PolyText16)(); X void (* ImageText8)(); X void (* ImageText16)(); X void (* ImageGlyphBlt)(); X void (* PolyGlyphBlt)(); X void (* PushPixels)(); X void (* LineHelper)(); X void (* ChangeClip) (); X void (* DestroyClip) (); X void (* CopyClip)(); X} GC; X X X# 30 "miarc.c" X X# 1 "../../include/scrnintstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 33 "../../include/screenint.h" X X# 28 "../../include/scrnintstr.h" X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 29 "../../include/scrnintstr.h" X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "../../include/region.h" X X X X X X# 30 "../../include/scrnintstr.h" X X# 1 "../../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 45 "../../include/pixmap.h" X X# 31 "../../include/scrnintstr.h" X X# 1 "../../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 65 "../../include/gc.h" X X# 32 "../../include/scrnintstr.h" X X# 1 "../../include/colormap.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 55 "../../include/colormap.h" X X X X X X X X X Xtypedef unsigned long Pixel; Xtypedef struct _CMEntry *EntryPtr; Xtypedef struct _ColormapRec *ColormapPtr; X Xextern int CreateColormap(); Xextern Pixel FindColor(); Xextern int FreeColormap(); Xextern int TellNoMap(); Xextern int TellLostMap(); Xextern int TellGainedMap(); Xextern int IsMapInstalled(); Xextern void UninstallColormap(); X X X# 33 "../../include/scrnintstr.h" X X X Xtypedef struct _PixmapFormat { X unsigned char depth; X unsigned char bitsPerPixel; X unsigned char scanlinePad; X } PixmapFormatRec; X Xtypedef struct _Visual { X unsigned long vid; X short screen; X short class; X unsigned long redMask, greenMask, blueMask; X int offsetRed, offsetGreen, offsetBlue; X short bitsPerRGBValue; X short ColormapEntries; X short nplanes; X X X } VisualRec; X Xtypedef struct _Depth { X int depth; X int numVids; X unsigned long *vids; X } DepthRec; X Xtypedef struct _Screen { X int myNum; X ATOM id; X short width, height; X short mmWidth, mmHeight; X short numDepths; X DepthPtr allowedDepths; X short rootDepth; X unsigned long rootVisual; X unsigned long defColormap; X short minInstalledCmaps, maxInstalledCmaps; X char backingStoreSupport, saveUnderSupport; X unsigned long whitePixel, blackPixel; X unsigned long rgf; X GCPtr GCperDepth[8+1]; X X X X X X X X PixmapPtr PixmapPerDepth[1]; X pointer devPrivate; X short numVisuals; X VisualPtr visuals; X X X X Bool (* CloseScreen)(); X void (* QueryBestSize)(); X Bool (* SaveScreen)(); X void (* GetImage)(); X X unsigned int *(* GetSpans)(); X X void (* PointerNonInterestBox)(); X X X X Bool (* CreateWindow)(); X Bool (* DestroyWindow)(); X Bool (* PositionWindow)(); X Bool (* ChangeWindowAttributes)(); X Bool (* RealizeWindow)(); X Bool (* UnrealizeWindow)(); X int (* ValidateTree)(); X void (* WindowExposures)(); X X X X PixmapPtr (* CreatePixmap)(); X Bool (* DestroyPixmap)(); X X X X Bool (* RealizeFont)(); X Bool (* UnrealizeFont)(); X X X void (* ConstrainCursor)(); X void (* CursorLimits)(); X Bool (* DisplayCursor)(); X Bool (* RealizeCursor)(); X Bool (* UnrealizeCursor)(); X void (* RecolorCursor)(); X Bool (* SetCursorPosition)(); X X X X Bool (* CreateGC)(); X X X X void (* CreateColormap)(); X void (* DestroyColormap)(); X void (* InstallColormap)(); X void (* UninstallColormap)(); X int (* ListInstalledColormaps) (); X void (* StoreColors)(); X void (* ResolveColor)(); X X X X RegionPtr (* RegionCreate)(); X void (* RegionCopy)(); X void (* RegionDestroy)(); X int (* Intersect)(); X int (* Union)(); X int (* Subtract)(); X int (* Inverse)(); X void (* RegionReset)(); X void (* TranslateRegion)(); X int (* RectIn)(); X Bool (* PointInRegion)(); X Bool (* RegionNotEmpty)(); X void (* RegionEmpty)(); X BoxPtr (*RegionExtents)(); X void (* SendGraphicsExpose)(); X X X void (* BlockHandler)(); X void (* WakeupHandler)(); X pointer blockData; X pointer wakeupData; X} ScreenRec; X Xtypedef struct _ScreenInfo { X int imageByteOrder; X int bitmapScanlineUnit; X int bitmapScanlinePad; X int bitmapBitOrder; X int numPixmapFormats; X PixmapFormatRec X formats[8]; X int arraySize; X int numScreens; X ScreenPtr screen; X} ScreenInfo; X Xextern ScreenInfo screenInfo; X X# 31 "miarc.c" X X# 1 "../../include/pixmapstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 45 "../../include/pixmap.h" X X# 28 "../../include/pixmapstr.h" X X# 1 "../../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 33 "../../include/screenint.h" X X# 29 "../../include/pixmapstr.h" X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 30 "../../include/pixmapstr.h" X X X Xtypedef struct _DrawInfo { X short type; X ScreenPtr pScreen; X int depth; X unsigned long serialNumber; X} DrawableRec; X X X X Xtypedef struct _Pixmap { X DrawableRec drawable; X int width, height; X int refcnt; X int devKind; X pointer devPrivate; X } PixmapRec; X X# 32 "miarc.c" X X# 1 "../../include/windowstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/window.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _BackingStore *BackingStorePtr; Xtypedef struct _Window *WindowPtr; X X X# 29 "../../include/windowstr.h" X X# 1 "../../include/pixmapstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 50 "../../include/pixmapstr.h" X X# 30 "../../include/windowstr.h" X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "../../include/region.h" X X X X X X# 31 "../../include/windowstr.h" X X# 1 "../../include/cursor.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Cursor *CursorPtr; Xtypedef struct _CursorMetric *CursorMetricPtr; X Xextern CursorPtr rootCursor; X X# 32 "../../include/windowstr.h" X X# 1 "../../include/property.h" X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Property *PropertyPtr; X X# 33 "../../include/windowstr.h" X X# 1 "../../include/resource.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 27 "../../include/resource.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xunsigned short CreateNewResourceType(); Xshort CreateNewResourceClass(); Xunsigned long FakeClientID(); Xvoid AddResource(); Xvoid FreeResource(); Xvoid FreeClientResources(); Xpointer LookupID(); X X X# 34 "../../include/windowstr.h" X X# 1 "../../include/dix.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 65 "../../include/gc.h" X X# 29 "../../include/dix.h" X X# 1 "../../include/window.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 53 "../../include/window.h" X X# 30 "../../include/dix.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _TimeStamp *TimeStampPtr; Xtypedef struct _Client *ClientPtr; Xextern ClientPtr requestingClient; Xextern ClientPtr *clients; Xextern ClientPtr serverClient; Xextern int currentMaxClients; X Xextern int ProcAllowEvents(); Xextern int ProcBell(); Xextern int ProcChangeActivePointerGrab(); Xextern int ProcChangeKeyboardControl(); Xextern int ProcChangePointerControl(); Xextern int ProcGetKeyboardMapping(); Xextern int ProcGetPointerMapping(); Xextern int ProcGetInputFocus(); Xextern int ProcGetKeyboardControl(); Xextern int ProcGetMotionEvents(); Xextern int ProcGetPointerControl(); Xextern int ProcGrabButton(); Xextern int ProcGrabKey(); Xextern int ProcGrabKeyboard(); Xextern int ProcGrabPointer(); Xextern int ProcQueryKeymap(); Xextern int ProcQueryPointer(); Xextern int ProcSetInputFocus(); Xextern int ProcSetKeyboardMapping(); Xextern int ProcSetPointerMapping(); Xextern int ProcSendEvent(); Xextern int ProcUngrabButton(); Xextern int ProcUngrabKey(); Xextern int ProcUngrabKeyboard(); Xextern int ProcUngrabPointer(); Xextern int ProcWarpPointer(); Xextern int ProcRecolorCursor(); X Xextern WindowPtr LookupWindow(); Xextern pointer LookupDrawable(); X Xextern void NoopDDA(); X X X# 35 "../../include/windowstr.h" X X# 1 "../../include/miscstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 38 "../../include/miscstruct.h" X X# 36 "../../include/windowstr.h" X X# 1 "../../.././X11/Xprotostr.h" X X# 55 "../../.././X11/Xprotostr.h" X X# 37 "../../include/windowstr.h" X X X X X Xtypedef struct _BackingStore { X RegionPtr obscured; X DDXPointRec oldAbsCorner; X void (* SaveDoomedAreas)(); X RegionPtr (* RestoreAreas)(); X void (* ExposeCopy)(); X void (* TranslateBackingStore)(); X X void (* ClearToBackground)(); X void (* DrawGuarantee)(); X} BackingStoreRec; X X X X X X Xtypedef struct _Window { X X DrawableRec drawable; X X VisualID visual; X X struct _Window *parent; X struct _Window *nextSib; X struct _Window *prevSib; X struct _Window *firstChild; X struct _Window *lastChild; X X CursorPtr cursor; X X ClientPtr client; X Window wid; X X RegionPtr clipList; X RegionPtr winSize; X X RegionPtr borderClip; X RegionPtr borderSize; X RegionPtr exposed; X X X X X RegionPtr borderExposed; X xRectangle clientWinSize; X X DDXPointRec absCorner; X DDXPointRec oldAbsCorner; X int class; X Mask eventMask; X Mask dontPropagateMask; X Mask allEventMasks; X Mask deliverableEvents; X pointer otherClients; X pointer passiveGrabs; X X PropertyPtr userProps; X X XID nolongerused; X PixmapPtr backgroundTile; X unsigned long backgroundPixel; X PixmapPtr borderTile; X unsigned long borderPixel; X int borderWidth; X void (* PaintWindowBackground)(); X void (* PaintWindowBorder)(); X void (* CopyWindow)(); X void (* ClearToBackground)(); X X unsigned long backingBitPlanes; X unsigned long backingPixel; X int backingStore; X BackingStorePtr backStorage; X X char bitGravity; X char winGravity; X Colormap colormap; X X X X Bool saveUnder:1; X unsigned visibility:2; X unsigned mapped:1; X unsigned realized:1; X unsigned viewable:1; X unsigned overrideRedirect:1; X unsigned marked:1; X X pointer devBackingStore; X pointer devPrivate; X} WindowRec; X Xextern int DeleteWindow(); Xextern int ChangeWindowAttributes(); Xextern int WalkTree(); Xextern CreateRootWindow(); Xextern WindowPtr CreateWindow(); Xextern int DeleteWindow(); Xextern int DestroySubwindows(); Xextern int ChangeWindowAttributes(); Xextern int GetWindowAttributes(); Xextern int ConfigureWindow(); Xextern int ReparentWindow(); Xextern int MapWindow(); Xextern int MapSubwindow(); Xextern int UnmapWindow(); Xextern int UnmapSubwindow(); Xextern RegionPtr NotClippedByChildren(); X X X X# 33 "miarc.c" X X# 1 "mifpoly.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _SppPoint { X double x, y; X} SppPointRec, *SppPointPtr; X Xtypedef struct _SppArc { X double x, y, width, height; X double angle1, angle2; X} SppArcRec, *SppArcPtr; X Xextern SppPointRec miExtendSegment(); X# 34 "miarc.c" X X# 1 "../../include/mi.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "../../include/region.h" X X X X X X# 27 "../../include/mi.h" X X Xtypedef struct _miDash *miDashPtr; X X X Xextern void miPutImage(); Xextern void miGetImage(); Xextern RegionPtr miCopyArea(); Xextern RegionPtr miCopyPlane(); Xextern void miClearToBackground(); Xextern int miValidateTree(); Xextern void miPolySegment(); Xextern void miPolyRectangle(); Xextern void miFillPolygon(); Xextern int miPolyText8(); Xextern int miPolyText16(); Xextern void miImageText8(); Xextern void miImageText16(); Xextern int miFillConvexPoly(); Xextern int miFillGeneralPoly(); Xextern void miNotMiter(); Xextern void miMiter(); Xextern void miWideLine(); Xextern void miWideDash(); Xextern void miPolyArc(); Xextern void miPolyFillRect(); Xextern void miPolyFillArc(); Xextern void miPolyGlyphBlt(); Xextern void miImageGlyphBlt(); Xextern void miZeroLine(); Xextern void miPaintWindow(); Xextern miDashPtr miDashLine(); Xextern void miPushPixels(); Xextern void miGetPts(), miRoundCap(), miOneSegWide(); Xextern int miPtToAngle(); Xextern RegionPtr miRegionCreate(); Xextern void miRegionCopy(); Xextern void miRegionDestroy(); Xextern int miIntersect(); Xextern int miInverse(); Xextern int miUnion(); Xextern int miSubtract(); Xextern void miRegionReset(); Xextern void miTranslateRegion(); Xextern int miRectIn(); Xextern RegionPtr miRectsToRegion(); Xextern Bool miPointInRegion(); Xextern Bool miRegionNotEmpty(); Xextern void miRegionEmpty(); Xextern int miNumberRectsInRegion(); Xextern void miWindowExposures(); Xextern BoxPtr miRegionExtents(); Xextern void miSendGraphicsExpose(); Xextern RegionPtr miHandleExposures(); X X X# 35 "miarc.c" X X Xextern double sqrt(), cos(), sin(), atan(); X X X X X X X X X X X X X X X X X X X X Xtypedef struct _miArcJoin { X int arcIndex0, arcIndex1; X int phase0, phase1; X int end0, end1; X} miArcJoinRec, *miArcJoinPtr; X Xtypedef struct _miArcCap { X int arcIndex; X int end; X} miArcCapRec, *miArcCapPtr; X Xtypedef struct _miArcFace { X SppPointRec clock; X SppPointRec center; X SppPointRec counterClock; X} miArcFaceRec, *miArcFacePtr; X X X X X X Xtypedef struct _miArcData { X xArc arc; X int render; X int join; X int cap; X miArcFaceRec bounds[2]; X double x0, y0, x1, y1; X} miArcDataRec, *miArcDataPtr; X Xtypedef struct _miPolyArc { X int narcs; X miArcDataPtr arcs; X int ncaps; X miArcCapPtr caps; X int njoins; X miArcJoinPtr joins; X} miPolyArcRec, *miPolyArcPtr; X Xstatic miPolyArcPtr miComputeArcs (); X X X X X X X X X Xstatic CARD32 gcvals[6]; X X X X X Xstruct arcData { X double x0, y0, x1, y1; X int selfJoin; X}; X X Xstatic miPolyArcPtr XmiComputeArcs (parcs, narcs, isDashed, isDoubleDash, pDash, nDashes, dashOffset) X xArc *parcs; X int narcs; X int isDashed, isDoubleDash; X unsigned char *pDash; X int nDashes, dashOffset; X{ X miPolyArcPtr arcs; X int start, i, j, k, nexti, nextk; X int joinSize[2]; X int capSize[2]; X int arcSize[2]; X int angle2; X double x0, y0, x1, y1, a0, a1, xc, yc; X struct arcData *data; X miArcDataPtr arc; X xArc xarc; X int iphase, prevphase, joinphase; X int arcsJoin; X X int iDash, dashRemaining; X int iDashStart, dashRemainingStart, iphaseStart; X int startAngle, spanAngle, endAngle, backwards; X int prevDashAngle, dashAngle; X static int computeAngleFromPath (); X X arcs = (miPolyArcPtr) Xalloc (sizeof (*arcs) * (isDoubleDash ? 2 : 1)); X data = (struct arcData *) alloca((int)(narcs * sizeof (struct arcData))); X X for (i = 0; i < narcs; i++) { X a0 = (((double) (parcs[i].angle1)) / 64.0 * 3.14159265358979323846/180.0); X angle2 = parcs[i].angle2; X if (angle2 > (64 * 360)) X angle2 = (64 * 360); X else if (angle2 < -(64 * 360)) X angle2 = -(64 * 360); X data[i].selfJoin = angle2 == (64 * 360) || angle2 == -(64 * 360); X a1 = (((double) (parcs[i].angle1 + angle2)) / 64.0 * 3.14159265358979323846/180.0); X data[i].x0 = parcs[i].x + (double) parcs[i].width / 2 * (1 + cos (a0)); X data[i].y0 = parcs[i].y + (double) parcs[i].height / 2 * (1 - sin (a0)); X data[i].x1 = parcs[i].x + (double) parcs[i].width / 2 * (1 + cos (a1)); X data[i].y1 = parcs[i].y + (double) parcs[i].height / 2 * (1 - sin (a1)); X } X X for (iphase = 0; iphase < (isDoubleDash ? 2 : 1); iphase++) { X arcs[iphase].njoins = 0; X arcs[iphase].joins = 0; X joinSize[iphase] = 0; X X arcs[iphase].ncaps = 0; X arcs[iphase].caps = 0; X capSize[iphase] = 0; X X arcs[iphase].narcs = 0; X arcs[iphase].arcs = 0; X arcSize[iphase] = 0; X } X X iphase = 0; X if (isDashed) { X iDash = 0; X dashRemaining = pDash[0]; X while (dashOffset > 0) { X if (dashOffset >= dashRemaining) { X dashOffset -= dashRemaining; X iphase = iphase ? 0 : 1; X iDash++; X dashRemaining = pDash[iDash]; X } else { X dashRemaining -= dashOffset; X dashOffset = 0; X } X } X iDashStart = iDash; X dashRemainingStart = dashRemaining; X } X iphaseStart = iphase; X X for (i = narcs - 1; i >= 0; i--) { X j = i + 1; X if (j == narcs) X j = 0; X if (!data[i].selfJoin && X (((((data[i].x1) - ( data[j].x0)) > 0.0 ? ((data[i].x1) - ( data[j].x0)) : -((data[i].x1) - ( data[j].x0))) > 0.000001) || X ((((data[i].y1) - ( data[j].y0)) > 0.0 ? ((data[i].y1) - ( data[j].y0)) : -((data[i].y1) - ( data[j].y0))) > 0.000001))) X { X if (iphase == 0 || isDoubleDash) X addCap (&arcs[iphase].caps, &arcs[iphase].ncaps, X &capSize[iphase], 0, 0); X break; X } X } X start = i + 1; X if (start == narcs) X start = 0; X i = start; X for (;;) { X j = i + 1; X if (j == narcs) X j = 0; X nexti = i+1; X if (nexti == narcs) X nexti = 0; X if (isDashed) { X startAngle = parcs[i].angle1; X spanAngle = parcs[i].angle2; X if (spanAngle > (64 * 360)) X spanAngle = (64 * 360); X else if (spanAngle < -(64 * 360)) X spanAngle = -(64 * 360); X if (startAngle < 0) X startAngle = (64 * 360) - (-startAngle) % (64 * 360); X if (startAngle >= (64 * 360)) X startAngle = startAngle % (64 * 360); X endAngle = startAngle + spanAngle; X backwards = spanAngle < 0; X prevDashAngle = startAngle; X while (prevDashAngle != endAngle) { X dashAngle = computeAngleFromPath X (prevDashAngle, endAngle, X parcs[i].width, parcs[i].height, X &dashRemaining, backwards); X if (iphase == 0 || isDoubleDash) { X xarc = parcs[i]; X xarc.angle1 = prevDashAngle; X if (backwards) { X spanAngle = dashAngle - prevDashAngle; X if (dashAngle > prevDashAngle) X spanAngle = - 360 * 64 + spanAngle; X } else { X spanAngle = dashAngle - prevDashAngle; X if (dashAngle < prevDashAngle) X spanAngle = 360 * 64 + spanAngle; X } X xarc.angle2 = spanAngle; X arc = addArc (&arcs[iphase].arcs, &arcs[iphase].narcs, X &arcSize[iphase], xarc); X if (!isDoubleDash) { X if (prevDashAngle != startAngle) { X addCap (&arcs[iphase].caps, X &arcs[iphase].ncaps, X &capSize[iphase], 0, X arc - arcs[iphase].arcs); X X } X if (dashAngle != endAngle) { X addCap (&arcs[iphase].caps, X &arcs[iphase].ncaps, X &capSize[iphase], 1, X arc - arcs[iphase].arcs); X } X } X arc->cap = arcs[iphase].ncaps; X arc->join = arcs[iphase].njoins; X arc->render = 0; X } X prevphase = iphase; X if (dashRemaining <= 0) { X ++iDash; X if (iDash == nDashes) X iDash = 0; X iphase = iphase ? 0:1; X dashRemaining = pDash[iDash]; X } X prevDashAngle = dashAngle; X } X } else { X arc = addArc (&arcs[iphase].arcs, &arcs[iphase].narcs, X &arcSize[iphase], parcs[i]); X arc->join = arcs[iphase].njoins; X arc->cap = arcs[iphase].ncaps; X prevphase = iphase; X } X if (prevphase == 0 || isDoubleDash) X k = arcs[prevphase].narcs - 1; X if (iphase == 0 || isDoubleDash) X nextk = arcs[iphase].narcs; X if (nexti == start) { X nextk = 0; X if (isDashed) { X iDash = iDashStart; X iphase = iphaseStart; X dashRemaining = dashRemainingStart; X } X } X arcsJoin = narcs > 1 && X ((((data[i].x1) - ( data[j].x0)) > 0.0 ? ((data[i].x1) - ( data[j].x0)) : -((data[i].x1) - ( data[j].x0))) <= 0.000001) && X ((((data[i].y1) - ( data[j].y0)) > 0.0 ? ((data[i].y1) - ( data[j].y0)) : -((data[i].y1) - ( data[j].y0))) <= 0.000001); X if (arcsJoin) X arc->render = 0; X else X arc->render = 1; X if (arcsJoin && X (prevphase == 0 || isDoubleDash) && X (iphase == 0 || isDoubleDash)) X { X joinphase = iphase; X if (isDoubleDash) { X if (nexti == start) X joinphase = iphaseStart; X X X X X X X X if (joinphase != prevphase) X joinphase = 0; X } X if (joinphase == 0 || isDoubleDash) { X addJoin (&arcs[joinphase].joins, X &arcs[joinphase].njoins, X &joinSize[joinphase], X 1, k, prevphase, X 0, nextk, iphase); X arc->join = arcs[prevphase].njoins; X } X } else { X if ((prevphase == 0 || isDoubleDash) && X !data[i].selfJoin) X { X addCap (&arcs[prevphase].caps, &arcs[prevphase].ncaps, X &capSize[prevphase], 1, k); X arc->cap = arcs[prevphase].ncaps; X } X if (isDashed && !arcsJoin) { X iDash = iDashStart; X iphase = iphaseStart; X dashRemaining = dashRemainingStart; X } X nextk = arcs[iphase].narcs; X if (nexti == start) { X nextk = 0; X iDash = iDashStart; X iphase = iphaseStart; X dashRemaining = dashRemainingStart; X } X X X X X X X X X X if ((iphase == 0 || isDoubleDash) && X (nexti != start || arcsJoin && isDashed) && X !data[j].selfJoin) X addCap (&arcs[iphase].caps, &arcs[iphase].ncaps, X &capSize[iphase], 0, nextk); X } X i = nexti; X if (i == start) X break; X } X X X X for (iphase = 0; iphase < (isDoubleDash ? 2 : 1); iphase++) X if (arcs[iphase].narcs > 0) { X arcs[iphase].arcs[arcs[iphase].narcs-1].render = 1; X arcs[iphase].arcs[arcs[iphase].narcs-1].join = X arcs[iphase].njoins; X arcs[iphase].arcs[arcs[iphase].narcs-1].cap = X arcs[iphase].ncaps; X } X return arcs; X} X END_OF_FILE if test 27753 -ne `wc -c <'miarc.part.i'`; then echo shar: \"'miarc.part.i'\" unpacked with wrong size! fi # end of 'miarc.part.i' fi echo shar: End of shell archive. exit 0
mcneill@UUNET.UU.NET (Keith McNeill) (12/06/88)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: milines.part.i # Wrapped by mcneill@eplrx7 on Mon Dec 5 11:42:32 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'milines.part.i' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'milines.part.i'\" else echo shar: Extracting \"'milines.part.i'\" \(28474 characters\) sed "s/^X//" >'milines.part.i' <<'END_OF_FILE' X# 1 "milines.c" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/stdio.h" X X X X X Xextern struct _iobuf { X int _cnt; X unsigned char *_ptr; X unsigned char *_base; X int _bufsiz; X short _flag; X char _file; X} _iob[]; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern struct _iobuf *fopen(); Xextern struct _iobuf *fdopen(); Xextern struct _iobuf *freopen(); Xextern struct _iobuf *popen(); Xextern struct _iobuf *tmpfile(); Xextern long ftell(); Xextern char *fgets(); Xextern char *gets(); X X X Xextern char *ctermid(); Xextern char *cuserid(); Xextern char *tempnam(); Xextern char *tmpnam(); X X X X X X X# 35 "milines.c" X Xextern double hypot(); X# 1 "../../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef unsigned long XID; X Xtypedef XID Window; Xtypedef XID Drawable; Xtypedef XID Font; Xtypedef XID Pixmap; Xtypedef XID Cursor; Xtypedef XID Colormap; Xtypedef XID GContext; Xtypedef XID KeySym; X Xtypedef unsigned long Mask; X Xtypedef unsigned long Atom; X Xtypedef unsigned long VisualID; X Xtypedef unsigned long Time; X Xtypedef unsigned char KeyCode; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 311 "../../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 37 "milines.c" X X# 1 "../../include/windowstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/window.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _BackingStore *BackingStorePtr; Xtypedef struct _Window *WindowPtr; X X X# 29 "../../include/windowstr.h" X X# 1 "../../include/pixmapstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DrawInfo *DrawablePtr; Xtypedef struct _Pixmap *PixmapPtr; X X# 28 "../../include/pixmapstr.h" X X# 1 "../../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _PixmapFormat *PixmapFormatPtr; Xtypedef struct _Visual *VisualPtr; Xtypedef struct _Depth *DepthPtr; Xtypedef struct _Screen *ScreenPtr; X X X# 29 "../../include/pixmapstr.h" X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern unsigned long globalSerialNumber; X X X X X X X X X X X X X X Xtypedef unsigned char *pointer; Xtypedef int Bool; Xtypedef unsigned long PIXEL; Xtypedef unsigned long ATOM; X X X X X X X# 1 "../../include/os.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 29 "../../include/os.h" X X X X X X X X X X X X X X Xtypedef pointer FID; Xtypedef struct _FontPathRec *FontPathPtr; Xtypedef struct _NewClientRec *NewClientPtr; X X X X X X X X X X X# 69 "../../include/os.h" X X X X X X X X X Xchar *alloca(); X X X X X X# 92 "../../include/os.h" X X X X X X X X X X X X X X Xchar *ReadRequestFromClient(); Xchar *strcat(); Xchar *strncat(); Xchar *strcpy(); Xchar *strncpy(); XBool CloseDownConnection(); XFontPathPtr GetFontPath(); XFontPathPtr ExpandFontNamePattern(); XFID FiOpenForRead(); Xvoid CreateWellKnownSockets(); Xvoid SetDefaultFontPath(); Xvoid FreeFontRecord(); Xvoid SetFontPath(); Xvoid ErrorF(); Xvoid Error(); Xvoid FatalError(); Xvoid ProcessCommandLine(); Xvoid Xfree(); Xvoid FlushAllOutput(); Xvoid FlushIfCriticalOutputPending(); Xunsigned long *Xalloc(); Xunsigned long *Xrealloc(); Xlong GetTimeInMillis(); X X X# 58 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DDXPoint *DDXPointPtr; Xtypedef struct _Box *BoxPtr; X X X# 30 "../../include/pixmapstr.h" X X X Xtypedef struct _DrawInfo { X short type; X ScreenPtr pScreen; X int depth; X unsigned long serialNumber; X} DrawableRec; X X X X Xtypedef struct _Pixmap { X DrawableRec drawable; X int width, height; X int refcnt; X int devKind; X pointer devPrivate; X } PixmapRec; X X# 30 "../../include/windowstr.h" X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Region *RegionPtr; X Xextern int SingleRectRegionEqual(); X X X X X X X# 31 "../../include/windowstr.h" X X# 1 "../../include/cursor.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Cursor *CursorPtr; Xtypedef struct _CursorMetric *CursorMetricPtr; X Xextern CursorPtr rootCursor; X X# 32 "../../include/windowstr.h" X X# 1 "../../include/property.h" X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _Property *PropertyPtr; X X# 33 "../../include/windowstr.h" X X# 1 "../../include/resource.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 27 "../../include/resource.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xunsigned short CreateNewResourceType(); Xshort CreateNewResourceClass(); Xunsigned long FakeClientID(); Xvoid AddResource(); Xvoid FreeResource(); Xvoid FreeClientResources(); Xpointer LookupID(); X X X# 34 "../../include/windowstr.h" X X# 1 "../../include/dix.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _GCInterest *GCInterestPtr; Xtypedef struct _GC *GCPtr; Xextern void ValidateGC(); Xextern int ChangeGC(); Xextern GCPtr CreateGC(); Xextern int CopyGC(); Xextern int FreeGC(); Xextern void SetGCMask(); Xextern GCPtr GetScratchGC(); Xextern void FreeScratchGC(); X X# 29 "../../include/dix.h" X X# 1 "../../include/window.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 53 "../../include/window.h" X X# 30 "../../include/dix.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _TimeStamp *TimeStampPtr; Xtypedef struct _Client *ClientPtr; Xextern ClientPtr requestingClient; Xextern ClientPtr *clients; Xextern ClientPtr serverClient; Xextern int currentMaxClients; X Xextern int ProcAllowEvents(); Xextern int ProcBell(); Xextern int ProcChangeActivePointerGrab(); Xextern int ProcChangeKeyboardControl(); Xextern int ProcChangePointerControl(); Xextern int ProcGetKeyboardMapping(); Xextern int ProcGetPointerMapping(); Xextern int ProcGetInputFocus(); Xextern int ProcGetKeyboardControl(); Xextern int ProcGetMotionEvents(); Xextern int ProcGetPointerControl(); Xextern int ProcGrabButton(); Xextern int ProcGrabKey(); Xextern int ProcGrabKeyboard(); Xextern int ProcGrabPointer(); Xextern int ProcQueryKeymap(); Xextern int ProcQueryPointer(); Xextern int ProcSetInputFocus(); Xextern int ProcSetKeyboardMapping(); Xextern int ProcSetPointerMapping(); Xextern int ProcSendEvent(); Xextern int ProcUngrabButton(); Xextern int ProcUngrabKey(); Xextern int ProcUngrabKeyboard(); Xextern int ProcUngrabPointer(); Xextern int ProcWarpPointer(); Xextern int ProcRecolorCursor(); X Xextern WindowPtr LookupWindow(); Xextern pointer LookupDrawable(); X Xextern void NoopDDA(); X X X# 35 "../../include/windowstr.h" X X# 1 "../../include/miscstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 28 "../../include/miscstruct.h" X X Xextern unsigned long globalSerialNumber; Xtypedef struct _DDXPoint { X short x, y; X} DDXPointRec; X Xtypedef struct _Box { X short x1, y1, x2, y2; X} BoxRec; X X# 36 "../../include/windowstr.h" X X# 1 "../../.././X11/Xprotostr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../.././X11/Xmd.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef long INT32; Xtypedef short INT16; Xtypedef char INT8; X Xtypedef unsigned long CARD32; Xtypedef unsigned short CARD16; Xtypedef unsigned char CARD8; X Xtypedef unsigned long BITS32; Xtypedef unsigned short BITS16; Xtypedef unsigned char BYTE; X Xtypedef unsigned char BOOL; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 28 "../../.././X11/Xprotostr.h" X X X X Xtypedef struct _xSegment { X INT16 x1 , y1 , x2 , y2 ; X} xSegment; X X X Xtypedef struct _xPoint { X INT16 x , y ; X} xPoint; X Xtypedef struct _xRectangle { X INT16 x , y ; X CARD16 width , height ; X} xRectangle; X X X Xtypedef struct _xArc { X INT16 x , y ; X CARD16 width , height ; X INT16 angle1 , angle2 ; X} xArc; X X X# 37 "../../include/windowstr.h" X X X X X Xtypedef struct _BackingStore { X RegionPtr obscured; X DDXPointRec oldAbsCorner; X void (* SaveDoomedAreas)(); X RegionPtr (* RestoreAreas)(); X void (* ExposeCopy)(); X void (* TranslateBackingStore)(); X X void (* ClearToBackground)(); X void (* DrawGuarantee)(); X} BackingStoreRec; X X X X X X Xtypedef struct _Window { X X DrawableRec drawable; X X VisualID visual; X X struct _Window *parent; X struct _Window *nextSib; X struct _Window *prevSib; X struct _Window *firstChild; X struct _Window *lastChild; X X CursorPtr cursor; X X ClientPtr client; X Window wid; X X RegionPtr clipList; X RegionPtr winSize; X X RegionPtr borderClip; X RegionPtr borderSize; X RegionPtr exposed; X X X X X RegionPtr borderExposed; X xRectangle clientWinSize; X X DDXPointRec absCorner; X DDXPointRec oldAbsCorner; X int class; X Mask eventMask; X Mask dontPropagateMask; X Mask allEventMasks; X Mask deliverableEvents; X pointer otherClients; X pointer passiveGrabs; X X PropertyPtr userProps; X X XID nolongerused; X PixmapPtr backgroundTile; X unsigned long backgroundPixel; X PixmapPtr borderTile; X unsigned long borderPixel; X int borderWidth; X void (* PaintWindowBackground)(); X void (* PaintWindowBorder)(); X void (* CopyWindow)(); X void (* ClearToBackground)(); X X unsigned long backingBitPlanes; X unsigned long backingPixel; X int backingStore; X BackingStorePtr backStorage; X X char bitGravity; X char winGravity; X Colormap colormap; X X X X Bool saveUnder:1; X unsigned visibility:2; X unsigned mapped:1; X unsigned realized:1; X unsigned viewable:1; X unsigned overrideRedirect:1; X unsigned marked:1; X X pointer devBackingStore; X pointer devPrivate; X} WindowRec; X Xextern int DeleteWindow(); Xextern int ChangeWindowAttributes(); Xextern int WalkTree(); Xextern CreateRootWindow(); Xextern WindowPtr CreateWindow(); Xextern int DeleteWindow(); Xextern int DestroySubwindows(); Xextern int ChangeWindowAttributes(); Xextern int GetWindowAttributes(); Xextern int ConfigureWindow(); Xextern int ReparentWindow(); Xextern int MapWindow(); Xextern int MapSubwindow(); Xextern int UnmapWindow(); Xextern int UnmapSubwindow(); Xextern RegionPtr NotClippedByChildren(); X X X X# 38 "milines.c" X X# 1 "../../.././X11/Xprotostr.h" X X# 55 "../../.././X11/Xprotostr.h" X X# 39 "milines.c" X X# 1 "../../include/gcstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 65 "../../include/gc.h" X X# 29 "../../include/gcstruct.h" X X X# 1 "../../include/miscstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 38 "../../include/miscstruct.h" X X# 31 "../../include/gcstruct.h" X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "../../include/region.h" X X X X X X# 32 "../../include/gcstruct.h" X X# 1 "../../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 45 "../../include/pixmap.h" X X# 33 "../../include/gcstruct.h" X X# 1 "../../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 33 "../../include/screenint.h" X X# 34 "../../include/gcstruct.h" X X# 1 "../../include/dixfont.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _DIXFontProp *DIXFontPropPtr; Xtypedef struct _Font *FontPtr; X X X X Xtypedef enum {Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit} FontEncoding; Xtypedef struct _FontData *FontDataPtr; X Xextern FontPtr OpenFont(); X X# 35 "../../include/gcstruct.h" X X Xtypedef struct _GCInterest { X struct _GCInterest *pNextGCInterest; X struct _GCInterest *pLastGCInterest; X int length; X ATOM owner; X unsigned long ValInterestMask; X void (* ValidateGC) (); X unsigned long ChangeInterestMask; X int (* ChangeGC) (); X void (* CopyGCSource) (); X void (* CopyGCDest) (); X void (* DestroyGC) (); X pointer extPriv; X} GCInterestRec; X Xtypedef struct _GC{ X ScreenPtr pScreen; X pointer devPriv; X pointer devBackingStore; X int depth; X unsigned long serialNumber; X GCInterestPtr pNextGCInterest; X GCInterestPtr pLastGCInterest; X int alu; X unsigned long planemask; X unsigned long fgPixel, bgPixel; X int lineWidth; X int lineStyle; X int capStyle; X int joinStyle; X int fillStyle; X int fillRule; X int arcMode; X PixmapPtr tile; X PixmapPtr stipple; X DDXPointRec patOrg; X FontPtr font; X int subWindowMode; X Bool graphicsExposures; X DDXPointRec clipOrg; X pointer clientClip; X int clientClipType; X int dashOffset; X int numInDashList; X unsigned char *dash; X X unsigned long stateChanges; X DDXPointRec lastWinOrg; X int miTranslate:1; X X void (* FillSpans)(); X void (* SetSpans)(); X X void (* PutImage)(); X RegionPtr (* CopyArea)(); X RegionPtr (* CopyPlane)(); X void (* PolyPoint)(); X void (* Polylines)(); X void (* PolySegment)(); X void (* PolyRectangle)(); X void (* PolyArc)(); X void (* FillPolygon)(); X void (* PolyFillRect)(); X void (* PolyFillArc)(); X int (* PolyText8)(); X int (* PolyText16)(); X void (* ImageText8)(); X void (* ImageText16)(); X void (* ImageGlyphBlt)(); X void (* PolyGlyphBlt)(); X void (* PushPixels)(); X void (* LineHelper)(); X void (* ChangeClip) (); X void (* DestroyClip) (); X void (* CopyClip)(); X} GC; X X X# 40 "milines.c" X X# 1 "../../include/scrnintstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/screenint.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 33 "../../include/screenint.h" X X# 28 "../../include/scrnintstr.h" X X# 1 "../../include/misc.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 117 "../../include/misc.h" X X# 29 "../../include/scrnintstr.h" X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "../../include/region.h" X X X X X X# 30 "../../include/scrnintstr.h" X X# 1 "../../include/pixmap.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 45 "../../include/pixmap.h" X X# 31 "../../include/scrnintstr.h" X X# 1 "../../include/gc.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 65 "../../include/gc.h" X X# 32 "../../include/scrnintstr.h" X X# 1 "../../include/colormap.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 55 "../../include/colormap.h" X X X X X X X X X Xtypedef unsigned long Pixel; Xtypedef struct _CMEntry *EntryPtr; Xtypedef struct _ColormapRec *ColormapPtr; X Xextern int CreateColormap(); Xextern Pixel FindColor(); Xextern int FreeColormap(); Xextern int TellNoMap(); Xextern int TellLostMap(); Xextern int TellGainedMap(); Xextern int IsMapInstalled(); Xextern void UninstallColormap(); X X X# 33 "../../include/scrnintstr.h" X X X Xtypedef struct _PixmapFormat { X unsigned char depth; X unsigned char bitsPerPixel; X unsigned char scanlinePad; X } PixmapFormatRec; X Xtypedef struct _Visual { X unsigned long vid; X short screen; X short class; X unsigned long redMask, greenMask, blueMask; X int offsetRed, offsetGreen, offsetBlue; X short bitsPerRGBValue; X short ColormapEntries; X short nplanes; X X X } VisualRec; X Xtypedef struct _Depth { X int depth; X int numVids; X unsigned long *vids; X } DepthRec; X Xtypedef struct _Screen { X int myNum; X ATOM id; X short width, height; X short mmWidth, mmHeight; X short numDepths; X DepthPtr allowedDepths; X short rootDepth; X unsigned long rootVisual; X unsigned long defColormap; X short minInstalledCmaps, maxInstalledCmaps; X char backingStoreSupport, saveUnderSupport; X unsigned long whitePixel, blackPixel; X unsigned long rgf; X GCPtr GCperDepth[8+1]; X X X X X X X X PixmapPtr PixmapPerDepth[1]; X pointer devPrivate; X short numVisuals; X VisualPtr visuals; X X X X Bool (* CloseScreen)(); X void (* QueryBestSize)(); X Bool (* SaveScreen)(); X void (* GetImage)(); X X unsigned int *(* GetSpans)(); X X void (* PointerNonInterestBox)(); X X X X Bool (* CreateWindow)(); X Bool (* DestroyWindow)(); X Bool (* PositionWindow)(); X Bool (* ChangeWindowAttributes)(); X Bool (* RealizeWindow)(); X Bool (* UnrealizeWindow)(); X int (* ValidateTree)(); X void (* WindowExposures)(); X X X X PixmapPtr (* CreatePixmap)(); X Bool (* DestroyPixmap)(); X X X X Bool (* RealizeFont)(); X Bool (* UnrealizeFont)(); X X X void (* ConstrainCursor)(); X void (* CursorLimits)(); X Bool (* DisplayCursor)(); X Bool (* RealizeCursor)(); X Bool (* UnrealizeCursor)(); X void (* RecolorCursor)(); X Bool (* SetCursorPosition)(); X X X X Bool (* CreateGC)(); X X X X void (* CreateColormap)(); X void (* DestroyColormap)(); X void (* InstallColormap)(); X void (* UninstallColormap)(); X int (* ListInstalledColormaps) (); X void (* StoreColors)(); X void (* ResolveColor)(); X X X X RegionPtr (* RegionCreate)(); X void (* RegionCopy)(); X void (* RegionDestroy)(); X int (* Intersect)(); X int (* Union)(); X int (* Subtract)(); X int (* Inverse)(); X void (* RegionReset)(); X void (* TranslateRegion)(); X int (* RectIn)(); X Bool (* PointInRegion)(); X Bool (* RegionNotEmpty)(); X void (* RegionEmpty)(); X BoxPtr (*RegionExtents)(); X void (* SendGraphicsExpose)(); X X X void (* BlockHandler)(); X void (* WakeupHandler)(); X pointer blockData; X pointer wakeupData; X} ScreenRec; X Xtypedef struct _ScreenInfo { X int imageByteOrder; X int bitmapScanlineUnit; X int bitmapScanlinePad; X int bitmapBitOrder; X int numPixmapFormats; X PixmapFormatRec X formats[8]; X int arraySize; X int numScreens; X ScreenPtr screen; X} ScreenInfo; X Xextern ScreenInfo screenInfo; X X# 41 "milines.c" X X# 1 "../../include/miscstruct.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 38 "../../include/miscstruct.h" X X# 42 "milines.c" X X# 1 "../../include/pixmapstr.h" X X X X X X X X X X X X X X X X X X X X X X X X X X# 50 "../../include/pixmapstr.h" X X# 43 "milines.c" X X# 1 "mifpoly.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _SppPoint { X double x, y; X} SppPointRec, *SppPointPtr; X Xtypedef struct _SppArc { X double x, y, width, height; X double angle1, angle2; X} SppArcRec, *SppArcPtr; X Xextern SppPointRec miExtendSegment(); X# 44 "milines.c" X X# 1 "../../include/mi.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "../../include/region.h" X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "../../include/region.h" X X X X X X# 27 "../../include/mi.h" X X Xtypedef struct _miDash *miDashPtr; X X X Xextern void miPutImage(); Xextern void miGetImage(); Xextern RegionPtr miCopyArea(); Xextern RegionPtr miCopyPlane(); Xextern void miClearToBackground(); Xextern int miValidateTree(); Xextern void miPolySegment(); Xextern void miPolyRectangle(); Xextern void miFillPolygon(); Xextern int miPolyText8(); Xextern int miPolyText16(); Xextern void miImageText8(); Xextern void miImageText16(); Xextern int miFillConvexPoly(); Xextern int miFillGeneralPoly(); Xextern void miNotMiter(); Xextern void miMiter(); Xextern void miWideLine(); Xextern void miWideDash(); Xextern void miPolyArc(); Xextern void miPolyFillRect(); Xextern void miPolyFillArc(); Xextern void miPolyGlyphBlt(); Xextern void miImageGlyphBlt(); Xextern void miZeroLine(); Xextern void miPaintWindow(); Xextern miDashPtr miDashLine(); Xextern void miPushPixels(); Xextern void miGetPts(), miRoundCap(), miOneSegWide(); Xextern int miPtToAngle(); Xextern RegionPtr miRegionCreate(); Xextern void miRegionCopy(); Xextern void miRegionDestroy(); Xextern int miIntersect(); Xextern int miInverse(); Xextern int miUnion(); Xextern int miSubtract(); Xextern void miRegionReset(); Xextern void miTranslateRegion(); Xextern int miRectIn(); Xextern RegionPtr miRectsToRegion(); Xextern Bool miPointInRegion(); Xextern Bool miRegionNotEmpty(); Xextern void miRegionEmpty(); Xextern int miNumberRectsInRegion(); Xextern void miWindowExposures(); Xextern BoxPtr miRegionExtents(); Xextern void miSendGraphicsExpose(); Xextern RegionPtr miHandleExposures(); X X X# 45 "milines.c" X X X X X X X X X X Xstatic int gcvals[] = { 0x3 , 1, 0, 0, 0, 0}; X Xstatic SppPointRec IntersectLines(); Xstatic int PtToAngle(); X X X Xvoid XmiMiter (pDraw, pGC, caps, npt, pPts, xOrg, yOrg) X DrawablePtr pDraw; X GCPtr pGC; X int caps; X int npt; X SppPointPtr pPts; X int xOrg, yOrg; X{ X int width = (pGC->lineWidth ? pGC->lineWidth : 1); X SppPointRec PolyPoints[4], FirstEdge[3], Wedge[4]; X SppPointRec p1, p2, p3, p4, p5, p6, p7, p8; X int edges_match, i, X capStyle = pGC->capStyle; X X X X X if(npt <= 2) X { X miOneSegWide(pDraw, pGC, npt, pPts, caps, xOrg, yOrg); X return; X } X miGetPts(pPts[0], pPts[1], &p1, &p2, &p3, &p4, width); X X X X X if ((((((pPts[0].x) - ( pPts[npt-1].x)) > 0.0 ? ((pPts[0].x) - ( pPts[npt-1].x)) : -((pPts[0].x) - ( pPts[npt-1].x))) <= 0.000001) && ((((pPts[0].y) - ( pPts[npt-1].y)) > 0.0 ? ((pPts[0].y) - ( pPts[npt-1].y)) : -((pPts[0].y) - ( pPts[npt-1].y))) < = 0.000001))) X { X X X X edges_match = 1; X miGetPts(pPts[npt-2], pPts[npt-1], &p5, &p6, &p7, &p8, width); X X PolyPoints[2] = IntersectLines(p3, p4, p7, p8); X PolyPoints[3] = IntersectLines(p6, p5, p1, p2); X X if ((((PolyPoints[2]).x-( PolyPoints[3]).x)*((PolyPoints[2]).x-( PolyPoints[3]).x)+((PolyPoints[2]).y-( PolyPoints[3]).y)*((PolyPoints[2]).y-( PolyPoints[3]).y)) > X 108.856472512142 * width * width) X { X if ((((p5).x-( pPts[0]).x)*((p5).x-( pPts[0]).x)+((p5).y-( pPts[0]).y)*((p5).y-( pPts[0]).y)) - (((PolyPoints[3]).x-( pPts[0]).x)*((PolyPoints[3]).x-( pPts[0]).x)+((PolyPoints[3]).y-( pPts[0]).y)*((PolyPoints[3]).y-( pPts[0]).y)) X < 0.000001) X { X FirstEdge[2] = pPts[0]; X if ((((( pPts[0]).x - ( pPts[npt-2]).x) * (( pPts[1] ).y - ( pPts[0]).y) - (( pPts[1] ).x - ( pPts[0]).x) * (( pPts[0]).y - ( pPts[npt-2]).y)) > 0)) X { X FirstEdge[0] = p4; X FirstEdge[1] = p7; X miFillSppPoly(pDraw, pGC, 3, FirstEdge, -xOrg, -yOrg, 0.0, 0.0); X FirstEdge[0] = p6; X } else { X FirstEdge[0] = p6; X FirstEdge[1] = p1; X miFillSppPoly(pDraw, pGC, 3, FirstEdge, -xOrg, -yOrg, 0.0, 0.0); X FirstEdge[1] = p7; X } X PolyPoints[2] = p4; X PolyPoints[3] = p1; X } else { X if ((((( pPts[0]).x - ( pPts[npt-2]).x) * (( pPts[1] ).y - ( pPts[0]).y) - (( pPts[1] ).x - ( pPts[0]).x) * (( pPts[0]).y - ( pPts[npt-2]).y)) > 0)) X { X FirstEdge[0] = PolyPoints[3]; X FirstEdge[1] = p7; X FirstEdge[2] = p4; X PolyPoints[2] = p4; X } else { X FirstEdge[0] = p6; X FirstEdge[1] = PolyPoints[2]; X FirstEdge[2] = p1; X PolyPoints[3] = p1; X } X miFillSppPoly(pDraw, pGC, 3, FirstEdge, -xOrg, -yOrg, 0.0, 0.0); X } X } else { X if ((((p5).x-( pPts[0]).x)*((p5).x-( pPts[0]).x)+((p5).y-( pPts[0]).y)*((p5).y-( pPts[0]).y)) - (((PolyPoints[3]).x-( pPts[0]).x)*((PolyPoints[3]).x-( pPts[0]).x)+((PolyPoints[3]).y-( pPts[0]).y)*((PolyPoints[3]).y-( pPts[0]).y)) X < 0.000001) X { X if ((((((PolyPoints[3].x) - ( p5.x)) > 0.0 ? ((PolyPoints[3].x) - ( p5.x)) : -((PolyPoints[3].x) - ( p5.x))) <= 0.000001) && ((((PolyPoints[3].y) - ( p5.y)) > 0.0 ? ((PolyPoints[3].y) - ( p5.y)) : -((PolyPoints[3].y) - ( p5.y))) <= 0.000001))) X { X FirstEdge[0] = p6; X FirstEdge[1] = p7; X PolyPoints[3] = p1; X } else { X if ((((( pPts[0]).x - ( pPts[npt-2]).x) * (( pPts[1] ).y - ( pPts[0]).y) - (( pPts[1] ).x - ( pPts[0]).x) * (( pPts[0]).y - ( pPts[npt-2]).y)) > 0)) X { X Wedge[0] = p4; X Wedge[2] = p7; X Wedge[3] = PolyPoints[2]; X } else { X Wedge[0] = p6; X Wedge[2] = p1; X Wedge[3] = PolyPoints[3]; X } X Wedge[1] = pPts[0]; X miFillSppPoly(pDraw, pGC, 4, Wedge, -xOrg, -yOrg, 0.0, 0.0); X FirstEdge[1] = p7; X FirstEdge[0] = p6; X PolyPoints[3] = p1; X PolyPoints[2] = p4; X } X } else { X FirstEdge[0] = PolyPoints[3]; X FirstEdge[1] = PolyPoints[2]; X } X } X } X else X { X edges_match = 0; X if (caps && capStyle == 3) X { X pPts[0] = miExtendSegment(pPts[0], pPts[1], width/2); X miGetPts(pPts[0], pPts[1], &p1, &p2, &p3, &p4, width); X pPts[npt-1] = miExtendSegment(pPts[npt-1], pPts[npt-2], width/2); X } X else if (caps && capStyle == 2) X { X miRoundCap(pDraw, pGC, pPts[0], pPts[1], p4, p1, 1, X xOrg, yOrg, 0.0, 0.0); X miGetPts(pPts[npt-1], pPts[npt-2], &p5, &p6, &p7, &p8, width); X miRoundCap(pDraw, pGC, pPts[npt-1], pPts[npt-2], p8, p5, 1, X xOrg, yOrg, 0.0, 0.0); X } X PolyPoints[3] = p1; X PolyPoints[2] = p4; X } X X for (i = 1; i < (npt - 1); i++) X { X X X X X X X miGetPts(pPts[i], pPts[i+1], &p5, &p6, &p7, &p8, width); X X PolyPoints[0] = PolyPoints[3]; X PolyPoints[1] = PolyPoints[2]; X PolyPoints[2] = IntersectLines(p4, p3, p7, p8); X PolyPoints[3] = IntersectLines(p2, p1, p5, p6); X X if ((((PolyPoints[2]).x-( PolyPoints[3]).x)*((PolyPoints[2]).x-( PolyPoints[3]).x)+((PolyPoints[2]).y-( PolyPoints[3]).y)*((PolyPoints[2]).y-( PolyPoints[3]).y)) > X 108.856472512142 * width * width) X { X if ((((p1).x-( pPts[i]).x)*((p1).x-( pPts[i]).x)+((p1).y-( pPts[i]).y)*((p1).y-( pPts[i]).y)) - (((PolyPoints[3]).x-( pPts[i]).x)*((PolyPoints[3]).x-( pPts[i]).x)+((PolyPoints[3]).y-( pPts[i]).y)*((PolyPoints[3]).y-( pPts[i]).y)) X < 0.000001) X { X PolyPoints[2] = p3; X PolyPoints[3] = p2; X miFillSppPoly(pDraw, pGC, 4, PolyPoints, -xOrg, -yOrg, 0.0, 0.0); X if ((((( pPts[i]).x - ( pPts[i-1]).x) * (( pPts[i+1] ).y - ( pPts[i]).y) - (( pPts[i+1] ).x - ( pPts[i]).x) * (( pPts[i]).y - ( pPts[i-1]).y)) > 0)) X { X PolyPoints[1] = p8; X PolyPoints[3] = pPts[i]; X miFillSppPoly(pDraw, pGC, 3, &PolyPoints[1], -xOrg, -yOrg, 0.0, 0.0); X } else { X PolyPoints[1] = p5; X PolyPoints[2] = pPts[i]; X miFillSppPoly(pDraw, pGC, 3, &PolyPoints[1], -xOrg, -yOrg, 0.0, 0.0); X } X PolyPoints[2] = p8; X PolyPoints[3] = p5; X } else { X if ((((( pPts[i]).x - ( pPts[i-1]).x) * (( pPts[i+1] ).y - ( pPts[i]).y) - (( pPts[i+1] ).x - ( pPts[i]).x) * (( pPts[i]).y - ( pPts[i-1]).y)) > 0)) X { X PolyPoints[2] = p3; X miFillSppPoly(pDraw, pGC, 4, PolyPoints, -xOrg, -yOrg, 0.0, 0.0); X PolyPoints[1] = p8; X miFillSppPoly(pDraw, pGC, 3, &PolyPoints[1], -xOrg, -yOrg, 0.0, 0.0); X PolyPoints[2] = p8; X } else { X PolyPoints[3] = p2; X miFillSppPoly(pDraw, pGC, 4, PolyPoints, -xOrg, -yOrg, 0.0, 0.0); X PolyPoints[1] = p5; X miFillSppPoly(pDraw, pGC, 3, &PolyPoints[1], -xOrg, -yOrg, 0.0, 0.0); X PolyPoints[3] = p5; X } X } X } else { X if ((((p1).x-( pPts[i]).x)*((p1).x-( pPts[i]).x)+((p1).y-( pPts[i]).y)*((p1).y-( pPts[i]).y)) - (((PolyPoints[3]).x-( pPts[i]).x)*((PolyPoints[3]).x-( pPts[i]).x)+((PolyPoints[3]).y-( pPts[i]).y)*((PolyPoints[3]).y-( pPts[i]).y)) X < 0.000001) X { X if ((((((PolyPoints[3].x) - ( p1.x)) > 0.0 ? ((PolyPoints[3].x) - ( p1.x)) : -((PolyPoints[3].x) - ( p1.x))) <= 0.000001) && ((((PolyPoints[3].y) - ( p1.y)) > 0.0 ? ((PolyPoints[3].y) - ( p1.y)) : -((PolyPoints[3].y) - ( p1.y))) <= 0.000001))) X { X PolyPoints[3] = p2; X miFillSppPoly(pDraw, pGC, 4, PolyPoints, -xOrg, -yOrg, 0.0, 0.0); X PolyPoints[3] = p5; X PolyPoints[2] = p8; X } else { X if ((((( pPts[i]).x - ( pPts[i-1]).x) * (( pPts[i+1] ).y - ( pPts[i]).y) - (( pPts[i+1] ).x - ( pPts[i]).x) * (( pPts[i]).y - ( pPts[i-1]).y)) > 0)) X { X Wedge[0] = p8; X Wedge[2] = p3; X Wedge[3] = PolyPoints[2]; X } else { X Wedge[0] = p2; X Wedge[2] = p5; X Wedge[3] = PolyPoints[3]; X } X Wedge[1] = pPts[i]; X miFillSppPoly(pDraw, pGC, 4, Wedge, -xOrg, -yOrg, 0.0, 0.0); X PolyPoints[2] = p3; X PolyPoints[3] = p2; X miFillSppPoly(pDraw, pGC, 4, PolyPoints, -xOrg, -yOrg, 0.0, 0.0); X PolyPoints[3] = p5; X PolyPoints[2] = p8; X } X } else X miFillSppPoly(pDraw, pGC, 4, PolyPoints, -xOrg, -yOrg, 0.0, 0.0); X } X X p1 = p5; p2 = p6; p3 = p7; p4 = p8; X X } X X PolyPoints[0] = PolyPoints[3]; X PolyPoints[1] = PolyPoints[2]; X X if (edges_match) X { X PolyPoints[2] = FirstEdge[1]; X PolyPoints[3] = FirstEdge[0]; X X } X else X { X miGetPts(pPts[npt-2], pPts[npt-1], &p5, &p6, &p7, &p8, width); X PolyPoints[2] = p7; X PolyPoints[3] = p6; X } X miFillSppPoly(pDraw, pGC, 4, PolyPoints, -xOrg, -yOrg, 0.0, 0.0); X} X END_OF_FILE if test 28474 -ne `wc -c <'milines.part.i'`; then echo shar: \"'milines.part.i'\" unpacked with wrong size! fi # end of 'milines.part.i' fi echo shar: End of shell archive. exit 0
mcneill@UUNET.UU.NET (Keith McNeill) (12/06/88)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: xrdb.part.i # Wrapped by mcneill@eplrx7 on Mon Dec 5 11:42:34 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'xrdb.part.i' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xrdb.part.i'\" else echo shar: Extracting \"'xrdb.part.i'\" \(21703 characters\) sed "s/^X//" >'xrdb.part.i' <<'END_OF_FILE' X# 1 "xrdb.c" X Xstatic char rcs_id[] = "$XConsortium: xrdb.c,v 11.22 88/09/06 14:36:10 jim Exp $"; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/stdio.h" X X X X X Xextern struct _iobuf { X int _cnt; X unsigned char *_ptr; X unsigned char *_base; X int _bufsiz; X short _flag; X char _file; X} _iob[]; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern struct _iobuf *fopen(); Xextern struct _iobuf *fdopen(); Xextern struct _iobuf *freopen(); Xextern struct _iobuf *popen(); Xextern struct _iobuf *tmpfile(); Xextern long ftell(); Xextern char *fgets(); Xextern char *gets(); X X X Xextern char *ctermid(); Xextern char *cuserid(); Xextern char *tempnam(); Xextern char *tmpnam(); X X X X X X X# 38 "xrdb.c" X X# 1 "../.././X11/Xlib.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/types.h" X X X X X X X X X X X X X X Xextern int setjmp(); X#pragma unknown_control_flow(setjmp) X X# 1 "/usr/include/sys/sysmacros.h" X X X X X X X X X X X X X X X X X X X# 18 "/usr/include/sys/types.h" X X Xtypedef unsigned char u_char; Xtypedef unsigned short u_short; Xtypedef unsigned int u_int; Xtypedef unsigned long u_long; Xtypedef unsigned short ushort; Xtypedef unsigned int uint; X X X X X X X X X X X X X X Xtypedef struct _physadr { int r[1]; } *physadr; Xtypedef struct label_t { X int val[2]; X} label_t; X Xtypedef struct _quad { long val[2]; } quad; Xtypedef long daddr_t; Xtypedef char * caddr_t; Xtypedef u_long ino_t; Xtypedef long swblk_t; Xtypedef int size_t; Xtypedef long time_t; Xtypedef short dev_t; Xtypedef int off_t; Xtypedef long key_t; X Xtypedef struct fd_set { int fds_bits[1]; } fd_set; X X X# 34 "../.././X11/Xlib.h" X X X X# 1 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef unsigned long XID; X Xtypedef XID Window; Xtypedef XID Drawable; Xtypedef XID Font; Xtypedef XID Pixmap; Xtypedef XID Cursor; Xtypedef XID Colormap; Xtypedef XID GContext; Xtypedef XID KeySym; X Xtypedef unsigned long Mask; X Xtypedef unsigned long Atom; X Xtypedef unsigned long VisualID; X Xtypedef unsigned long Time; X Xtypedef unsigned char KeyCode; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 311 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 37 "../.././X11/Xlib.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _XExtData { X int number; X struct _XExtData *next; X int (*free_private)(); X char *private_data; X} XExtData; X X X X Xtypedef struct { X int extension; X int major_opcode; X int first_event; X int first_error; X} XExtCodes; X X X X Xtypedef struct _XExten { X struct _XExten *next; X XExtCodes codes; X int (*create_GC)(); X int (*copy_GC)(); X int (*flush_GC)(); X int (*free_GC)(); X int (*create_Font)(); X int (*free_Font)(); X int (*close_display)(); X int (*error)(); X int (*error_string)(); X} _XExtension; X X X X Xtypedef struct { X int function; X unsigned long plane_mask; X unsigned long foreground; X unsigned long background; X int line_width; X int line_style; X int cap_style; X X int join_style; X int fill_style; X X int fill_rule; X int arc_mode; X Pixmap tile; X Pixmap stipple; X int ts_x_origin; X int ts_y_origin; X Font font; X int subwindow_mode; X int graphics_exposures; X int clip_x_origin; X int clip_y_origin; X Pixmap clip_mask; X int dash_offset; X char dashes; X} XGCValues; X X X X X X X X Xtypedef struct _XGC { X XExtData *ext_data; X GContext gid; X int rects; X int dashes; X unsigned long dirty; X XGCValues values; X} *GC; X X X X X Xtypedef struct { X XExtData *ext_data; X VisualID visualid; X int class; X unsigned long red_mask, green_mask, blue_mask; X int bits_per_rgb; X int map_entries; X} Visual; X X X X Xtypedef struct { X int depth; X int nvisuals; X Visual *visuals; X} Depth; X X X X Xtypedef struct { X XExtData *ext_data; X struct _XDisplay *display; X Window root; X int width, height; X int mwidth, mheight; X int ndepths; X Depth *depths; X int root_depth; X Visual *root_visual; X GC default_gc; X Colormap cmap; X unsigned long white_pixel; X unsigned long black_pixel; X int max_maps, min_maps; X int backing_store; X int save_unders; X long root_input_mask; X} Screen; X X X X Xtypedef struct { X XExtData *ext_data; X int depth; X int bits_per_pixel; X int scanline_pad; X} ScreenFormat; X X X X X Xtypedef struct { X Pixmap background_pixmap; X unsigned long background_pixel; X Pixmap border_pixmap; X unsigned long border_pixel; X int bit_gravity; X int win_gravity; X int backing_store; X unsigned long backing_planes; X unsigned long backing_pixel; X int save_under; X long event_mask; X long do_not_propagate_mask; X int override_redirect; X Colormap colormap; X Cursor cursor; X} XSetWindowAttributes; X Xtypedef struct { X int x, y; X int width, height; X int border_width; X int depth; X Visual *visual; X Window root; X int class; X int bit_gravity; X int win_gravity; X int backing_store; X unsigned long backing_planes; X unsigned long backing_pixel; X int save_under; X Colormap colormap; X int map_installed; X int map_state; X long all_event_masks; X long your_event_mask; X long do_not_propagate_mask; X int override_redirect; X Screen *screen; X} XWindowAttributes; X X X X X X Xtypedef struct { X int family; X int length; X char *address; X} XHostAddress; X X X X Xtypedef struct _XImage { X int width, height; X int xoffset; X int format; X char *data; X int byte_order; X int bitmap_unit; X int bitmap_bit_order; X int bitmap_pad; X int depth; X int bytes_per_line; X int bits_per_pixel; X unsigned long red_mask; X unsigned long green_mask; X unsigned long blue_mask; X char *obdata; X struct funcs { X struct _XImage *(*create_image)(); X int (*destroy_image)(); X unsigned long (*get_pixel)(); X int (*put_pixel)(); X struct _XImage *(*sub_image)(); X int (*add_pixel)(); X } f; X} XImage; X X X X Xtypedef struct { X int x, y; X int width, height; X int border_width; X Window sibling; X int stack_mode; X} XWindowChanges; X X X X Xtypedef struct { X unsigned long pixel; X unsigned short red, green, blue; X char flags; X char pad; X} XColor; X X X X X X Xtypedef struct { X short x1, y1, x2, y2; X} XSegment; X Xtypedef struct { X short x, y; X} XPoint; X Xtypedef struct { X short x, y; X unsigned short width, height; X} XRectangle; X Xtypedef struct { X short x, y; X unsigned short width, height; X short angle1, angle2; X} XArc; X X X X Xtypedef struct { X int key_click_percent; X int bell_percent; X int bell_pitch; X int bell_duration; X int led; X int led_mode; X int key; X int auto_repeat_mode; X} XKeyboardControl; X X X Xtypedef struct { X int key_click_percent; X int bell_percent; X unsigned int bell_pitch, bell_duration; X unsigned long led_mask; X int global_auto_repeat; X char auto_repeats[32]; X} XKeyboardState; X X X Xtypedef struct { X Time time; X short x, y; X} XTimeCoord; X X X Xtypedef struct { X int max_keypermod; X KeyCode *modifiermap; X} XModifierKeymap; X XXModifierKeymap *XNewModifiermap(), X *XGetModifierMapping(), X *XDeleteModifiermapEntry(), X *XInsertModifiermapEntry(); X X X X X Xtypedef struct _XDisplay { X XExtData *ext_data; X struct _XDisplay *next; X int fd; X int lock; X int proto_major_version; X int proto_minor_version; X char *vendor; X long resource_base; X long resource_mask; X long resource_id; X int resource_shift; X XID (*resource_alloc)(); X int byte_order; X int bitmap_unit; X int bitmap_pad; X int bitmap_bit_order; X int nformats; X ScreenFormat *pixmap_format; X int vnumber; X int release; X struct _XSQEvent *head, *tail; X int qlen; X unsigned long last_request_read; X unsigned long request; X char *last_req; X char *buffer; X char *bufptr; X char *bufmax; X unsigned max_request_size; X struct _XrmHashBucketRec *db; X int (*synchandler)(); X char *display_name; X int default_screen; X int nscreens; X Screen *screens; X unsigned long motion_buffer; X Window current; X int min_keycode; X int max_keycode; X KeySym *keysyms; X XModifierKeymap *modifiermap; X int keysyms_per_keycode; X char *xdefaults; X char *scratch_buffer; X unsigned long scratch_length; X int ext_number; X _XExtension *ext_procs; X X X X X X X X X int (*event_vec[128])(); X int (*wire_vec[128])(); X KeySym lock_meaning; X struct XKeytrans *key_bindings; X Font cursor_font; X} Display; X X X X X X X X X X X X X X X X X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X unsigned int state; X unsigned int keycode; X int same_screen; X} XKeyEvent; Xtypedef XKeyEvent XKeyPressedEvent; Xtypedef XKeyEvent XKeyReleasedEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X unsigned int state; X unsigned int button; X int same_screen; X} XButtonEvent; Xtypedef XButtonEvent XButtonPressedEvent; Xtypedef XButtonEvent XButtonReleasedEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X unsigned int state; X char is_hint; X int same_screen; X} XMotionEvent; Xtypedef XMotionEvent XPointerMovedEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X int mode; X int detail; X X X X X int same_screen; X int focus; X unsigned int state; X} XCrossingEvent; Xtypedef XCrossingEvent XEnterWindowEvent; Xtypedef XCrossingEvent XLeaveWindowEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int mode; X int detail; X X X X X X} XFocusChangeEvent; Xtypedef XFocusChangeEvent XFocusInEvent; Xtypedef XFocusChangeEvent XFocusOutEvent; X X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X char key_vector[32]; X} XKeymapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int x, y; X int width, height; X int count; X} XExposeEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Drawable drawable; X int x, y; X int width, height; X int count; X int major_code; X int minor_code; X} XGraphicsExposeEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Drawable drawable; X int major_code; X int minor_code; X} XNoExposeEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int state; X} XVisibilityEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X int x, y; X int width, height; X int border_width; X int override_redirect; X} XCreateWindowEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X} XDestroyWindowEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int from_configure; X} XUnmapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int override_redirect; X} XMapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X} XMapRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X Window parent; X int x, y; X int override_redirect; X} XReparentEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int x, y; X int width, height; X int border_width; X Window above; X int override_redirect; X} XConfigureEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int x, y; X} XGravityEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int width, height; X} XResizeRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X int x, y; X int width, height; X int border_width; X Window above; X int detail; X unsigned long value_mask; X} XConfigureRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int place; X} XCirculateEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X int place; X} XCirculateRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Atom atom; X Time time; X int state; X} XPropertyEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Atom selection; X Time time; X} XSelectionClearEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window owner; X Window requestor; X Atom selection; X Atom target; X Atom property; X Time time; X} XSelectionRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window requestor; X Atom selection; X Atom target; X Atom property; X Time time; X} XSelectionEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Colormap colormap; X int new; X int state; X} XColormapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Atom message_type; X int format; X union { X char b[20]; X short s[10]; X long l[5]; X } data; X} XClientMessageEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int request; X X int first_keycode; X int count; X} XMappingEvent; X Xtypedef struct { X int type; X Display *display; X XID resourceid; X unsigned long serial; X unsigned char error_code; X unsigned char request_code; X unsigned char minor_code; X} XErrorEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X} XAnyEvent; X X X X X Xtypedef union _XEvent { X int type; X XAnyEvent xany; X XKeyEvent xkey; X XButtonEvent xbutton; X XMotionEvent xmotion; X XCrossingEvent xcrossing; X XFocusChangeEvent xfocus; X XExposeEvent xexpose; X XGraphicsExposeEvent xgraphicsexpose; X XNoExposeEvent xnoexpose; X XVisibilityEvent xvisibility; X XCreateWindowEvent xcreatewindow; X XDestroyWindowEvent xdestroywindow; X XUnmapEvent xunmap; X XMapEvent xmap; X XMapRequestEvent xmaprequest; X XReparentEvent xreparent; X XConfigureEvent xconfigure; X XGravityEvent xgravity; X XResizeRequestEvent xresizerequest; X XConfigureRequestEvent xconfigurerequest; X XCirculateEvent xcirculate; X XCirculateRequestEvent xcirculaterequest; X XPropertyEvent xproperty; X XSelectionClearEvent xselectionclear; X XSelectionRequestEvent xselectionrequest; X XSelectionEvent xselection; X XColormapEvent xcolormap; X XClientMessageEvent xclient; X XMappingEvent xmapping; X XErrorEvent xerror; X XKeymapEvent xkeymap; X long pad[24]; X} XEvent; X X X Xtypedef struct _XSQEvent { X struct _XSQEvent *next; X XEvent event; X} _XQEvent; X X X X X X X Xtypedef struct { X short lbearing; X short rbearing; X short width; X short ascent; X short descent; X unsigned short attributes; X} XCharStruct; X X X X X Xtypedef struct { X Atom name; X unsigned long card32; X} XFontProp; X Xtypedef struct { X XExtData *ext_data; X Font fid; X unsigned direction; X unsigned min_char_or_byte2; X unsigned max_char_or_byte2; X unsigned min_byte1; X unsigned max_byte1; X int all_chars_exist; X unsigned default_char; X int n_properties; X XFontProp *properties; X XCharStruct min_bounds; X XCharStruct max_bounds; X XCharStruct *per_char; X int ascent; X int descent; X} XFontStruct; X X X X Xtypedef struct { X char *chars; X int nchars; X int delta; X Font font; X} XTextItem; X Xtypedef struct { X unsigned char byte1; X unsigned char byte2; X} XChar2b; X Xtypedef struct { X XChar2b *chars; X int nchars; X int delta; X Font font; X} XTextItem16; X X XXFontStruct *XLoadQueryFont(), *XQueryFont(); X XXTimeCoord *XGetMotionEvents(); X Xtypedef union { Display *display; X GC gc; X Visual *visual; X Screen *screen; X ScreenFormat *pixmap_format; X XFontStruct *font; } XEDataObject; X X X X XDisplay *XOpenDisplay(); X Xchar *XFetchBytes(); Xchar *XFetchBuffer(); Xchar *XGetAtomName(); Xchar *XGetDefault(); Xchar *XDisplayName(); Xchar *XKeysymToString(); X Xint (*XSynchronize())(); Xint (*XSetAfterFunction())(); XAtom XInternAtom(); XColormap XCopyColormapAndFree(), XCreateColormap(); XCursor XCreatePixmapCursor(), XCreateGlyphCursor(), XCreateFontCursor(); XFont XLoadFont(); XGC XCreateGC(); XGContext XGContextFromGC(); XPixmap XCreatePixmap(); XPixmap XCreateBitmapFromData(), XCreatePixmapFromBitmapData(); XWindow XCreateSimpleWindow(), XGetSelectionOwner(); XWindow XCreateWindow(); XColormap *XListInstalledColormaps(); Xchar **XListFonts(), **XListFontsWithInfo(), **XGetFontPath(); Xchar **XListExtensions(); XAtom *XListProperties(); XXImage *XCreateImage(), *XGetImage(), *XGetSubImage(); XXHostAddress *XListHosts(); XKeySym XKeycodeToKeysym(), XLookupKeysym(), *XGetKeyboardMapping(); XKeySym XStringToKeysym(); Xlong XMaxRequestSize(); Xchar *XResourceManagerString(); Xunsigned long XDisplayMotionBufferSize(); XVisualID XVisualIDFromVisual(); X X XXExtCodes *XInitExtension(); Xint (*XESetCreateGC())(), (*XESetCopyGC())(), (*XESetFlushGC())(), X (*XESetFreeGC())(), (*XESetCreateFont())(), (*XESetFreeFont())(), X (*XESetCloseDisplay())(), X (*XESetError())(), (*XESetErrorString())(); Xint (*XESetWireToEvent())(); Xint (*XESetEventToWire())(); XXExtCodes *XAddExtension(); XXExtData *XFindOnExtensionList(); XXExtData **XEHeadOfExtensionList(); X X XWindow XRootWindow(), XDefaultRootWindow(), XRootWindowOfScreen(); XVisual *XDefaultVisual(), *XDefaultVisualOfScreen(); XGC XDefaultGC(), XDefaultGCOfScreen(); Xunsigned long XBlackPixel(), XWhitePixel(), XAllPlanes(); Xunsigned long XBlackPixelOfScreen(), XWhitePixelOfScreen(); Xunsigned long XNextRequest(), XLastKnownRequestProcessed(); Xchar *XServerVendor(), *XDisplayString(); XColormap XDefaultColormap(), XDefaultColormapOfScreen(); XDisplay *XDisplayOfScreen(); XScreen *XScreenOfDisplay(), *XDefaultScreenOfDisplay(); Xlong XEventMaskOfScreen(); X X# 39 "xrdb.c" X X# 1 "../.././X11/Xatom.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 40 "xrdb.c" X X# 1 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/types.h" X X X X X X# 58 "/usr/include/sys/types.h" X X# 37 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/strings.h" X X X X X X Xchar *strcat(); Xchar *strncat(); Xint strcmp(); Xint strncmp(); Xchar *strcpy(); Xchar *strncpy(); Xint strlen(); Xchar *index(); Xchar *rindex(); X# 68 "../.././X11/Xos.h" X X X X X X X X X X X X# 1 "/usr/include/sys/file.h" X X X X X X# 1 "/usr/include/sys/fcntl.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xstruct flock { X short l_type; X short l_whence; X long l_start; X long l_len; X short l_pid; X short l_xxx; X}; X X X# 6 "/usr/include/sys/file.h" X X X# 33 "/usr/include/sys/file.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 80 "/usr/include/sys/file.h" X X X X# 79 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/time.h" X X X X X X X X X X X X X X X Xstruct timeval { X long tv_sec; X long tv_usec; X}; X Xstruct timezone { X int tz_minuteswest; X int tz_dsttime; X}; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xstruct itimerval { X struct timeval it_interval; X struct timeval it_value; X}; X X X# 1 "/usr/include/time.h" X X X X X Xstruct tm { X int tm_sec; X int tm_min; X int tm_hour; X int tm_mday; X int tm_mon; X int tm_year; X int tm_wday; X int tm_yday; X int tm_isdst; X}; X Xextern struct tm *gmtime(), *localtime(); Xextern char *asctime(), *ctime(); X# 62 "/usr/include/sys/time.h" X X X X X# 96 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 41 "xrdb.c" X X# 1 "/usr/include/ctype.h" X X X X X X X X X X X Xextern char _ctype_[]; X X X X X X X X X X X X X X X X X# 42 "xrdb.c" X X X X X X Xchar *ProgramName; X X X X X Xextern struct _iobuf *popen(); X Xtypedef struct _Entry { X char *tag, *value; X int usable; X} Entry; Xtypedef struct _Buffer { X char *buff; X int room, used; X} Buffer; Xtypedef struct _Entries { X Entry *entry; X int room, used; X} Entries; X X Xvoid AddEntry(e, entry) X register Entries *e; X Entry entry; X{ X if (e->used == e->room) { X e->entry = (Entry *)realloc(e->entry, 2*e->room*(sizeof(Entry))); X e->room *= 2; X } X entry.usable = 1; X e->entry[e->used++] = entry; X} X END_OF_FILE if test 21703 -ne `wc -c <'xrdb.part.i'`; then echo shar: \"'xrdb.part.i'\" unpacked with wrong size! fi # end of 'xrdb.part.i' fi echo shar: End of shell archive. exit 0
mcneill@UUNET.UU.NET (Keith McNeill) (12/06/88)
#! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: xfd.part.i # Wrapped by mcneill@eplrx7 on Mon Dec 5 11:42:33 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'xfd.part.i' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xfd.part.i'\" else echo shar: Extracting \"'xfd.part.i'\" \(26925 characters\) sed "s/^X//" >'xfd.part.i' <<'END_OF_FILE' X# 1 "xfd.c" X X X X X X X X X X# 1 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/types.h" X X X X X X X X X X X X X X Xextern int setjmp(); X#pragma unknown_control_flow(setjmp) X X# 1 "/usr/include/sys/sysmacros.h" X X X X X X X X X X X X X X X X X X X# 18 "/usr/include/sys/types.h" X X Xtypedef unsigned char u_char; Xtypedef unsigned short u_short; Xtypedef unsigned int u_int; Xtypedef unsigned long u_long; Xtypedef unsigned short ushort; Xtypedef unsigned int uint; X X X X X X X X X X X X X X Xtypedef struct _physadr { int r[1]; } *physadr; Xtypedef struct label_t { X int val[2]; X} label_t; X Xtypedef struct _quad { long val[2]; } quad; Xtypedef long daddr_t; Xtypedef char * caddr_t; Xtypedef u_long ino_t; Xtypedef long swblk_t; Xtypedef int size_t; Xtypedef long time_t; Xtypedef short dev_t; Xtypedef int off_t; Xtypedef long key_t; X Xtypedef struct fd_set { int fds_bits[1]; } fd_set; X X X# 37 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/strings.h" X X X X X X Xchar *strcat(); Xchar *strncat(); Xint strcmp(); Xint strncmp(); Xchar *strcpy(); Xchar *strncpy(); Xint strlen(); Xchar *index(); Xchar *rindex(); X# 68 "../.././X11/Xos.h" X X X X X X X X X X X X# 1 "/usr/include/sys/file.h" X X X X X X# 1 "/usr/include/sys/fcntl.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xstruct flock { X short l_type; X short l_whence; X long l_start; X long l_len; X short l_pid; X short l_xxx; X}; X X X# 6 "/usr/include/sys/file.h" X X X# 33 "/usr/include/sys/file.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 80 "/usr/include/sys/file.h" X X X X# 79 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/time.h" X X X X X X X X X X X X X X X Xstruct timeval { X long tv_sec; X long tv_usec; X}; X Xstruct timezone { X int tz_minuteswest; X int tz_dsttime; X}; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xstruct itimerval { X struct timeval it_interval; X struct timeval it_value; X}; X X X# 1 "/usr/include/time.h" X X X X X Xstruct tm { X int tm_sec; X int tm_min; X int tm_hour; X int tm_mday; X int tm_mon; X int tm_year; X int tm_wday; X int tm_yday; X int tm_isdst; X}; X Xextern struct tm *gmtime(), *localtime(); Xextern char *asctime(), *ctime(); X# 62 "/usr/include/sys/time.h" X X X X X# 96 "../.././X11/Xos.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 10 "xfd.c" X X# 1 "../.././X11/Xlib.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 1 "/usr/include/sys/types.h" X X X X X X# 58 "/usr/include/sys/types.h" X X# 34 "../.././X11/Xlib.h" X X X X# 1 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef unsigned long XID; X Xtypedef XID Window; Xtypedef XID Drawable; Xtypedef XID Font; Xtypedef XID Pixmap; Xtypedef XID Cursor; Xtypedef XID Colormap; Xtypedef XID GContext; Xtypedef XID KeySym; X Xtypedef unsigned long Mask; X Xtypedef unsigned long Atom; X Xtypedef unsigned long VisualID; X Xtypedef unsigned long Time; X Xtypedef unsigned char KeyCode; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 311 "../.././X11/X.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 37 "../.././X11/Xlib.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _XExtData { X int number; X struct _XExtData *next; X int (*free_private)(); X char *private_data; X} XExtData; X X X X Xtypedef struct { X int extension; X int major_opcode; X int first_event; X int first_error; X} XExtCodes; X X X X Xtypedef struct _XExten { X struct _XExten *next; X XExtCodes codes; X int (*create_GC)(); X int (*copy_GC)(); X int (*flush_GC)(); X int (*free_GC)(); X int (*create_Font)(); X int (*free_Font)(); X int (*close_display)(); X int (*error)(); X int (*error_string)(); X} _XExtension; X X X X Xtypedef struct { X int function; X unsigned long plane_mask; X unsigned long foreground; X unsigned long background; X int line_width; X int line_style; X int cap_style; X X int join_style; X int fill_style; X X int fill_rule; X int arc_mode; X Pixmap tile; X Pixmap stipple; X int ts_x_origin; X int ts_y_origin; X Font font; X int subwindow_mode; X int graphics_exposures; X int clip_x_origin; X int clip_y_origin; X Pixmap clip_mask; X int dash_offset; X char dashes; X} XGCValues; X X X X X X X X Xtypedef struct _XGC { X XExtData *ext_data; X GContext gid; X int rects; X int dashes; X unsigned long dirty; X XGCValues values; X} *GC; X X X X X Xtypedef struct { X XExtData *ext_data; X VisualID visualid; X int class; X unsigned long red_mask, green_mask, blue_mask; X int bits_per_rgb; X int map_entries; X} Visual; X X X X Xtypedef struct { X int depth; X int nvisuals; X Visual *visuals; X} Depth; X X X X Xtypedef struct { X XExtData *ext_data; X struct _XDisplay *display; X Window root; X int width, height; X int mwidth, mheight; X int ndepths; X Depth *depths; X int root_depth; X Visual *root_visual; X GC default_gc; X Colormap cmap; X unsigned long white_pixel; X unsigned long black_pixel; X int max_maps, min_maps; X int backing_store; X int save_unders; X long root_input_mask; X} Screen; X X X X Xtypedef struct { X XExtData *ext_data; X int depth; X int bits_per_pixel; X int scanline_pad; X} ScreenFormat; X X X X X Xtypedef struct { X Pixmap background_pixmap; X unsigned long background_pixel; X Pixmap border_pixmap; X unsigned long border_pixel; X int bit_gravity; X int win_gravity; X int backing_store; X unsigned long backing_planes; X unsigned long backing_pixel; X int save_under; X long event_mask; X long do_not_propagate_mask; X int override_redirect; X Colormap colormap; X Cursor cursor; X} XSetWindowAttributes; X Xtypedef struct { X int x, y; X int width, height; X int border_width; X int depth; X Visual *visual; X Window root; X int class; X int bit_gravity; X int win_gravity; X int backing_store; X unsigned long backing_planes; X unsigned long backing_pixel; X int save_under; X Colormap colormap; X int map_installed; X int map_state; X long all_event_masks; X long your_event_mask; X long do_not_propagate_mask; X int override_redirect; X Screen *screen; X} XWindowAttributes; X X X X X X Xtypedef struct { X int family; X int length; X char *address; X} XHostAddress; X X X X Xtypedef struct _XImage { X int width, height; X int xoffset; X int format; X char *data; X int byte_order; X int bitmap_unit; X int bitmap_bit_order; X int bitmap_pad; X int depth; X int bytes_per_line; X int bits_per_pixel; X unsigned long red_mask; X unsigned long green_mask; X unsigned long blue_mask; X char *obdata; X struct funcs { X struct _XImage *(*create_image)(); X int (*destroy_image)(); X unsigned long (*get_pixel)(); X int (*put_pixel)(); X struct _XImage *(*sub_image)(); X int (*add_pixel)(); X } f; X} XImage; X X X X Xtypedef struct { X int x, y; X int width, height; X int border_width; X Window sibling; X int stack_mode; X} XWindowChanges; X X X X Xtypedef struct { X unsigned long pixel; X unsigned short red, green, blue; X char flags; X char pad; X} XColor; X X X X X X Xtypedef struct { X short x1, y1, x2, y2; X} XSegment; X Xtypedef struct { X short x, y; X} XPoint; X Xtypedef struct { X short x, y; X unsigned short width, height; X} XRectangle; X Xtypedef struct { X short x, y; X unsigned short width, height; X short angle1, angle2; X} XArc; X X X X Xtypedef struct { X int key_click_percent; X int bell_percent; X int bell_pitch; X int bell_duration; X int led; X int led_mode; X int key; X int auto_repeat_mode; X} XKeyboardControl; X X X Xtypedef struct { X int key_click_percent; X int bell_percent; X unsigned int bell_pitch, bell_duration; X unsigned long led_mask; X int global_auto_repeat; X char auto_repeats[32]; X} XKeyboardState; X X X Xtypedef struct { X Time time; X short x, y; X} XTimeCoord; X X X Xtypedef struct { X int max_keypermod; X KeyCode *modifiermap; X} XModifierKeymap; X XXModifierKeymap *XNewModifiermap(), X *XGetModifierMapping(), X *XDeleteModifiermapEntry(), X *XInsertModifiermapEntry(); X X X X X Xtypedef struct _XDisplay { X XExtData *ext_data; X struct _XDisplay *next; X int fd; X int lock; X int proto_major_version; X int proto_minor_version; X char *vendor; X long resource_base; X long resource_mask; X long resource_id; X int resource_shift; X XID (*resource_alloc)(); X int byte_order; X int bitmap_unit; X int bitmap_pad; X int bitmap_bit_order; X int nformats; X ScreenFormat *pixmap_format; X int vnumber; X int release; X struct _XSQEvent *head, *tail; X int qlen; X unsigned long last_request_read; X unsigned long request; X char *last_req; X char *buffer; X char *bufptr; X char *bufmax; X unsigned max_request_size; X struct _XrmHashBucketRec *db; X int (*synchandler)(); X char *display_name; X int default_screen; X int nscreens; X Screen *screens; X unsigned long motion_buffer; X Window current; X int min_keycode; X int max_keycode; X KeySym *keysyms; X XModifierKeymap *modifiermap; X int keysyms_per_keycode; X char *xdefaults; X char *scratch_buffer; X unsigned long scratch_length; X int ext_number; X _XExtension *ext_procs; X X X X X X X X X int (*event_vec[128])(); X int (*wire_vec[128])(); X KeySym lock_meaning; X struct XKeytrans *key_bindings; X Font cursor_font; X} Display; X X X X X X X X X X X X X X X X X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X unsigned int state; X unsigned int keycode; X int same_screen; X} XKeyEvent; Xtypedef XKeyEvent XKeyPressedEvent; Xtypedef XKeyEvent XKeyReleasedEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X unsigned int state; X unsigned int button; X int same_screen; X} XButtonEvent; Xtypedef XButtonEvent XButtonPressedEvent; Xtypedef XButtonEvent XButtonReleasedEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X unsigned int state; X char is_hint; X int same_screen; X} XMotionEvent; Xtypedef XMotionEvent XPointerMovedEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Window root; X Window subwindow; X Time time; X int x, y; X int x_root, y_root; X int mode; X int detail; X X X X X int same_screen; X int focus; X unsigned int state; X} XCrossingEvent; Xtypedef XCrossingEvent XEnterWindowEvent; Xtypedef XCrossingEvent XLeaveWindowEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int mode; X int detail; X X X X X X} XFocusChangeEvent; Xtypedef XFocusChangeEvent XFocusInEvent; Xtypedef XFocusChangeEvent XFocusOutEvent; X X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X char key_vector[32]; X} XKeymapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int x, y; X int width, height; X int count; X} XExposeEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Drawable drawable; X int x, y; X int width, height; X int count; X int major_code; X int minor_code; X} XGraphicsExposeEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Drawable drawable; X int major_code; X int minor_code; X} XNoExposeEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int state; X} XVisibilityEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X int x, y; X int width, height; X int border_width; X int override_redirect; X} XCreateWindowEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X} XDestroyWindowEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int from_configure; X} XUnmapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int override_redirect; X} XMapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X} XMapRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X Window parent; X int x, y; X int override_redirect; X} XReparentEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int x, y; X int width, height; X int border_width; X Window above; X int override_redirect; X} XConfigureEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int x, y; X} XGravityEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int width, height; X} XResizeRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X int x, y; X int width, height; X int border_width; X Window above; X int detail; X unsigned long value_mask; X} XConfigureRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window event; X Window window; X int place; X} XCirculateEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window parent; X Window window; X int place; X} XCirculateRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Atom atom; X Time time; X int state; X} XPropertyEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Atom selection; X Time time; X} XSelectionClearEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window owner; X Window requestor; X Atom selection; X Atom target; X Atom property; X Time time; X} XSelectionRequestEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window requestor; X Atom selection; X Atom target; X Atom property; X Time time; X} XSelectionEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Colormap colormap; X int new; X int state; X} XColormapEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X Atom message_type; X int format; X union { X char b[20]; X short s[10]; X long l[5]; X } data; X} XClientMessageEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X int request; X X int first_keycode; X int count; X} XMappingEvent; X Xtypedef struct { X int type; X Display *display; X XID resourceid; X unsigned long serial; X unsigned char error_code; X unsigned char request_code; X unsigned char minor_code; X} XErrorEvent; X Xtypedef struct { X int type; X unsigned long serial; X int send_event; X Display *display; X Window window; X} XAnyEvent; X X X X X Xtypedef union _XEvent { X int type; X XAnyEvent xany; X XKeyEvent xkey; X XButtonEvent xbutton; X XMotionEvent xmotion; X XCrossingEvent xcrossing; X XFocusChangeEvent xfocus; X XExposeEvent xexpose; X XGraphicsExposeEvent xgraphicsexpose; X XNoExposeEvent xnoexpose; X XVisibilityEvent xvisibility; X XCreateWindowEvent xcreatewindow; X XDestroyWindowEvent xdestroywindow; X XUnmapEvent xunmap; X XMapEvent xmap; X XMapRequestEvent xmaprequest; X XReparentEvent xreparent; X XConfigureEvent xconfigure; X XGravityEvent xgravity; X XResizeRequestEvent xresizerequest; X XConfigureRequestEvent xconfigurerequest; X XCirculateEvent xcirculate; X XCirculateRequestEvent xcirculaterequest; X XPropertyEvent xproperty; X XSelectionClearEvent xselectionclear; X XSelectionRequestEvent xselectionrequest; X XSelectionEvent xselection; X XColormapEvent xcolormap; X XClientMessageEvent xclient; X XMappingEvent xmapping; X XErrorEvent xerror; X XKeymapEvent xkeymap; X long pad[24]; X} XEvent; X X X Xtypedef struct _XSQEvent { X struct _XSQEvent *next; X XEvent event; X} _XQEvent; X X X X X X X Xtypedef struct { X short lbearing; X short rbearing; X short width; X short ascent; X short descent; X unsigned short attributes; X} XCharStruct; X X X X X Xtypedef struct { X Atom name; X unsigned long card32; X} XFontProp; X Xtypedef struct { X XExtData *ext_data; X Font fid; X unsigned direction; X unsigned min_char_or_byte2; X unsigned max_char_or_byte2; X unsigned min_byte1; X unsigned max_byte1; X int all_chars_exist; X unsigned default_char; X int n_properties; X XFontProp *properties; X XCharStruct min_bounds; X XCharStruct max_bounds; X XCharStruct *per_char; X int ascent; X int descent; X} XFontStruct; X X X X Xtypedef struct { X char *chars; X int nchars; X int delta; X Font font; X} XTextItem; X Xtypedef struct { X unsigned char byte1; X unsigned char byte2; X} XChar2b; X Xtypedef struct { X XChar2b *chars; X int nchars; X int delta; X Font font; X} XTextItem16; X X XXFontStruct *XLoadQueryFont(), *XQueryFont(); X XXTimeCoord *XGetMotionEvents(); X Xtypedef union { Display *display; X GC gc; X Visual *visual; X Screen *screen; X ScreenFormat *pixmap_format; X XFontStruct *font; } XEDataObject; X X X X XDisplay *XOpenDisplay(); X Xchar *XFetchBytes(); Xchar *XFetchBuffer(); Xchar *XGetAtomName(); Xchar *XGetDefault(); Xchar *XDisplayName(); Xchar *XKeysymToString(); X Xint (*XSynchronize())(); Xint (*XSetAfterFunction())(); XAtom XInternAtom(); XColormap XCopyColormapAndFree(), XCreateColormap(); XCursor XCreatePixmapCursor(), XCreateGlyphCursor(), XCreateFontCursor(); XFont XLoadFont(); XGC XCreateGC(); XGContext XGContextFromGC(); XPixmap XCreatePixmap(); XPixmap XCreateBitmapFromData(), XCreatePixmapFromBitmapData(); XWindow XCreateSimpleWindow(), XGetSelectionOwner(); XWindow XCreateWindow(); XColormap *XListInstalledColormaps(); Xchar **XListFonts(), **XListFontsWithInfo(), **XGetFontPath(); Xchar **XListExtensions(); XAtom *XListProperties(); XXImage *XCreateImage(), *XGetImage(), *XGetSubImage(); XXHostAddress *XListHosts(); XKeySym XKeycodeToKeysym(), XLookupKeysym(), *XGetKeyboardMapping(); XKeySym XStringToKeysym(); Xlong XMaxRequestSize(); Xchar *XResourceManagerString(); Xunsigned long XDisplayMotionBufferSize(); XVisualID XVisualIDFromVisual(); X X XXExtCodes *XInitExtension(); Xint (*XESetCreateGC())(), (*XESetCopyGC())(), (*XESetFlushGC())(), X (*XESetFreeGC())(), (*XESetCreateFont())(), (*XESetFreeFont())(), X (*XESetCloseDisplay())(), X (*XESetError())(), (*XESetErrorString())(); Xint (*XESetWireToEvent())(); Xint (*XESetEventToWire())(); XXExtCodes *XAddExtension(); XXExtData *XFindOnExtensionList(); XXExtData **XEHeadOfExtensionList(); X X XWindow XRootWindow(), XDefaultRootWindow(), XRootWindowOfScreen(); XVisual *XDefaultVisual(), *XDefaultVisualOfScreen(); XGC XDefaultGC(), XDefaultGCOfScreen(); Xunsigned long XBlackPixel(), XWhitePixel(), XAllPlanes(); Xunsigned long XBlackPixelOfScreen(), XWhitePixelOfScreen(); Xunsigned long XNextRequest(), XLastKnownRequestProcessed(); Xchar *XServerVendor(), *XDisplayString(); XColormap XDefaultColormap(), XDefaultColormapOfScreen(); XDisplay *XDisplayOfScreen(); XScreen *XScreenOfDisplay(), *XDefaultScreenOfDisplay(); Xlong XEventMaskOfScreen(); X X# 11 "xfd.c" X X# 1 "../.././X11/Xutil.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct { X long flags; X int x, y; X int width, height; X int min_width, min_height; X int max_width, max_height; X int width_inc, height_inc; X struct { X int x; X int y; X } min_aspect, max_aspect; X} XSizeHints; X X X X X X X X X X X X X X X X X X Xtypedef struct { X long flags; X int input; X X int initial_state; X Pixmap icon_pixmap; X Window icon_window; X int icon_x, icon_y; X Pixmap icon_mask; X XID window_group; X X} XWMHints; X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct { X int min_width, min_height; X int max_width, max_height; X int width_inc, height_inc; X} XIconSize; X Xtypedef struct { X char *res_name; X char *res_class; X} XClassHint; X X X X X X X X X X X X X X X X X X X Xtypedef struct _XComposeStatus { X char *compose_ptr; X int chars_matched; X} XComposeStatus; X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef struct _XRegion *Region; X X X X X X X X X X X X X Xtypedef struct { X Visual *visual; X VisualID visualid; X int screen; X int depth; X int class; X unsigned long red_mask; X unsigned long green_mask; X unsigned long blue_mask; X int colormap_size; X int bits_per_rgb; X} XVisualInfo; X X X X X X X X X X X X X X X X X X Xtypedef struct { X Colormap colormap; X unsigned long red_max; X unsigned long red_mult; X unsigned long green_max; X unsigned long green_mult; X unsigned long blue_max; X unsigned long blue_mult; X unsigned long base_pixel; X} XStandardColormap; X X X X X X X X X X X X X X X X X X X X X X X X X Xtypedef int XContext; X X X X Xextern int XSaveContext(); X X X X Xextern int XFindContext(); X X X X X Xextern int XDeleteContext(); X X X X XXWMHints *XGetWMHints(); XRegion XCreateRegion(), XPolygonRegion(); XXImage *XCreateImage(); X XXVisualInfo *XGetVisualInfo(); X X# 12 "xfd.c" X X# 1 "../.././X11/Xatom.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 13 "xfd.c" X X# 1 "../.././X11/cursorfont.h" X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X# 14 "xfd.c" X X# 1 "/usr/include/stdio.h" X X X X X Xextern struct _iobuf { X int _cnt; X unsigned char *_ptr; X unsigned char *_base; X int _bufsiz; X short _flag; X char _file; X} _iob[]; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xextern struct _iobuf *fopen(); Xextern struct _iobuf *fdopen(); Xextern struct _iobuf *freopen(); Xextern struct _iobuf *popen(); Xextern struct _iobuf *tmpfile(); Xextern long ftell(); Xextern char *fgets(); Xextern char *gets(); X X X Xextern char *ctermid(); Xextern char *cuserid(); Xextern char *tempnam(); Xextern char *tmpnam(); X X X X X X X# 15 "xfd.c" X X X X X X X X X Xint space_per_line; Xint line_offset; Xint number_of_lines=1; Xint verbose = 0; Xint box_x = 0; Xint box_y = 0; Xint x_offset = 0; Xint y_offset = 0; Xint x_boxes = 0; Xint y_boxes = 0; Xint bottom = 0; Xint right = 0; Xint first_char = 0; X Xint gray = 0; XGC body_gc, real_gc; XXFontStruct *real_font; X X X# 1 "../.././X11/bitmaps/light_gray" X X Xstatic char light_gray_bits[] = { X 0x08, 0x02, 0x08, 0x02}; X# 43 "xfd.c" X X X X X X X X X X X X# 1 "wsimple.h" X X X X X X X X X X X X X X Xchar *program_name = "unknown_program"; XDisplay *dpy; Xint screen; X X X X X X Xvoid Fatal_Error(); Xchar *Malloc(); Xchar *Realloc(); Xchar *Get_Display_Name(); XDisplay *Open_Display(); Xvoid Setup_Display_And_Screen(); XXFontStruct *Open_Font(); Xvoid Beep(); XPixmap ReadBitmapFile(); Xvoid WriteBitmapFile(); XWindow Select_Window_Args(); X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xvoid Get_X_Defaults(); Xvoid Get_X_Arguments(); Xvoid Get_X_Options(); Xvoid Resolve_X_Options(); Xvoid Resolve_X_Colors(); Xvoid Create_Default_Window(); XGC Get_Default_GC(); X X X X XWindow wind; Xchar **_commands; Xint _number_of_commands; Xint geom_status; X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xchar *geometry = 0; Xchar *border_color = "black"; Xchar *back_color = "white"; Xchar *fore_color = "black"; Xchar *body_font_name = "fixed"; Xchar *icon_bitmap_file = 0; X X Xchar *title = "xfd" ; Xchar *icon_name = 0 ; Xint border_width = 2; Xint reverse = 0; Xunsigned long border; Xunsigned long background; Xunsigned long foreground; XXFontStruct *body_font; XPixmap icon_pixmap = 0; X X XXSizeHints size_hints = { (1L << 2) | (1L << 3) | X X (1L << 4) | X X X X X X (1L << 6) | X X 0, 300 , 300, X 300, 300, X X 1 , 1, X X X X X X X 0, 0, X X X 1 , 1, X X X X { 0, 0 }, { 0, 0 } }; X X X X X X X X Xunsigned long Resolve_Color(); XPixmap Bitmap_To_Pixmap(); XWindow Select_Window(); Xvoid out(); Xvoid blip(); XWindow Window_With_Name(); X# 54 "xfd.c" X X Xchar short_format[] = "%d (0x%x)"; Xchar line1_alt[] = "%s bounds:"; Xchar line1_format[] = "character # = %d (0x%x):"; Xchar line2_format[] = "left bearing = %d, right bearing = %d"; Xchar line3_format[] = "ascent = %d, descent = %d"; Xchar line4_format[] = "width = %d"; Xchar buf[80*2]; X X XIdentify_character(x, y) Xint x,y; X{ X int xbox, ybox; X int char_number; X XCharStruct char_info; X int index, byte1, byte2; X char *msg; X X X if (x>=right | y>=bottom) { X Beep(); X return; X } X X X xbox = x / box_x; X ybox = y / box_y; X X X char_number = first_char + xbox + ybox * x_boxes; X X char_info = real_font->max_bounds; X index = char_number; X if (real_font->per_char) { X if (!real_font->min_byte1 && !real_font->max_byte1) { X if (char_number < real_font->min_char_or_byte2 || X char_number > real_font->max_char_or_byte2) X index = real_font->default_char; X index -= real_font->min_char_or_byte2; X } else { X byte2 = index & 0xff; X byte1 = (index>>8) & 0xff; X if (byte1 < real_font->min_byte1 || X byte1 > real_font->max_byte1 || X byte2 < real_font->min_char_or_byte2 || X byte2 > real_font->max_char_or_byte2) { X byte2 = real_font->default_char & 0xff; X byte1 = (real_font->default_char>>8)&0xff; X } X byte1 -= real_font->min_byte1; X byte2 -= real_font->min_char_or_byte2; X index = byte1 * (real_font->max_char_or_byte2 - X real_font->min_char_or_byte2 + 1) + X byte2; X } X char_info = real_font->per_char[index]; X } X X if (!verbose) { X sprintf(buf, short_format, char_number, char_number); X put_line(buf, 0); X } else { X sprintf(buf, line1_format, char_number, char_number); X put_line(buf, 0); X X display_char_info(char_info); X } X} X END_OF_FILE if test 26925 -ne `wc -c <'xfd.part.i'`; then echo shar: \"'xfd.part.i'\" unpacked with wrong size! fi # end of 'xfd.part.i' fi echo shar: End of shell archive. exit 0