v02i017: Purdue speedups to Release 3 mfb code, Part01/02

Mike Wexler mikew at wyse.wyse.com
Thu Nov 24 04:07:15 AEST 1988


Submitted-by: spaf at purdue.edu
Posting-number: Volume 2, Issue 17
Archive-name: pspeedups/part01

#! /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 archive 1 (of 2)."
# Contents:  README maskbits.c.patch maskbits.h.patch mfbfillsp.c.patch
#   mfbline.c.patch mfbpntwin.c.patch
# Wrapped by mikew at wyse on Tue Nov 22 17:49:26 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(5827 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
XIntro
X-----
XThese are the Purdue speedups for X11, Release 3.  These apply only to
XB/W servers (for the most part); similar patches for the color code
Xshould be released sometime in the next few weeks.
X
XInstallation
X------------
XThe patches in this archive should all be applied to the files in the
Xserver/ddx/mfb directory.  You need to set the symbol PURDUE in your
Xmacros or site.def file (e.g.,
X#define OptimizedCDebugFlags -O -DPURDUE") to use them.
XYou can also patch your server/ddx/mfb/Imakefile as follows:
X
X*** server/ddx/mfb/Imakefile.orig	Thu Nov 17 15:52:45 1988
X--- server/ddx/mfb/Imakefile		Thu Nov 17 15:52:45 1988
X***************
X*** 19,24 ****
X--- 19,25 ----
X  	 mfbpawhite.o mfbpablack.o mfbpainv.o mfbtile.o \
X           mfbtewhite.o mfbteblack.o mfbmisc.o mfbbstore.o
X  
X+ DEFINES = -DPURDUE
X  STD_DEFINES = ServerDefines
X  CDEBUGFLAGS = ServerCDebugFlags
X  INCLUDES = -I. -I../../include -I$(INCLUDESRC)
X
XSimilar patches must be made to ddx/mi/Imakefile and ddx/cfb/Imakefile
Xsince ddx/mfb/maskbits.h is included in files in those directories.
X
XWhichever change you make, you will need to cd to the server directory, then:
Xmake Makefile; make Makefiles depend; make
X
X
XDescription
X-----------
XThe changes in these patches fall into a few, similar categories:
X    * Optimized or added bitmasking functions, taking advantage of
X      properties known to exist for certain arithmetic operators
X      and domains of input;
X    * Replacing calculated bitmasks with table lookups
X    * Use of Duff's device in some places where it looks beneficial
X    * Reordering of code to share variables or move invariants out of
X      loops.
X
XThe changes seem to make some significant (but sometimes difficult to
Xmeasure objectively) impact on the speed of most operations.  This
Xspeedup will differ based on your job mix and machine configuration.
XSome operations appear to take up to 35% less cpu time to complete.
XIncremental measurements with gprof, time, and other tools show each
Xchange to have a positive overall effect on the server efficiency.  In
Xparticular, painting windows and drawing lines appears to be much
Xfaster.  An "ico -r" is obviously faster and smoother, as is tiling the
Xroot window (on my Sun 3/60).  Note that my measurements have not been
Xdone with any formal benchmarking, so they might still benefit from
Xsome tuning.  In particular, making the "Duff" macro unroll more or
Xless items might be beneficial.  On the MacII, for instance, a Duff's
XDevice of only 4 is better than the 8 used in the patches enclosed.
X
XInterestingly enough, the binary after installing these patches also
Xseems *smaller*.
X
XThe changes have been generated in a machine-independent way and should
Xwork on any other machine, although I have not yet been able to try
Xthem on any other kind of cpu.  I have thoroughly tested them on
Xvarious Sun 3 machines, and all my changes have been to optimize for
Xthat architecture (68020).  If I blew it, or if you have more
Xportable/better versions of these changes, please share them with me
Xand I'll use them in further releases.
X
X[I think this code is used in the Apollo servers, and since they also
X use a 68xxx chip, these changes should work there too.  They have been
X tested on a Mac II and work there (and act as speedups). I would love
X to see how these work on a Vaxstation, but DEC wouldn't even sell one
X to me at retail!  If anyone at DEC can explain what DEC has against
X us/me here at Purdue, I'd love to talk with you. We're all mystified. ]
X
XFuture Work
X-----------
XSome optimizations could still be done on this code.  Other than
Xchanges to the cfb code, these include:
X    * putting in some hacks to enhance speed for certain compilers.
X      In particular, gcc can produce incredibly good code, and some
X      small tuning of the mfb/cfb code could result in significant
X      improvements.
X    * putting in custom assembler macros for commonly used instructions,
X      such as the bits routines, abs, round, etc.
X    * algorithmic changes that radically change the nature of how
X      some things are done in the server; this amounts to a rewrite
X      of portions of the server.
X
XI may get around to doing some of these in the next few months.  If
Xnot, I hope others will and then share their results with the rest of
Xus.
X
XPlease share your comments on this package with me -- I'd like to know
Xwhat else *we* can do to make this server a more efficient piece of
Xcode.
X
XThanks to:
X----------
XAcknowledgments Sam Kimery of PURDUE ECN helped me develop some of the
Xoptimizations in the first release of these fixes (for X11R2).  Terry
XDonahue of Project Athena contributed some server fixes with the X11R3
Xrelease that helped focus my attention on some sections of code,
Xalthough I did not use any of his changes in these patches.  The
XPurdue/Florida Software Engineering Research Center provided the
Xmachines and funding that allowed me to do this tinkering.
XThanks to Jim Fulton for testing the changes on a Mac II, and for
Xrecommending some format changes (including the "SmallDuff").
X
XGene Spafford
Xspaf at cs.purdue.edu		11/17/88
X
X
X
XPS.  Late breaking numbers from someone (who wishes to remain
Xanonymous) who has applied these changes to the X11.R3 code on a Vax
Xwith an Xqvss display:
X
X>Date: Thu, 17 Nov 88 15:24:53 EST
X>To: spaf
X>Subject: Xqvss numbers
X>
X>Okay, quicky results:
X>
X>	filled rectangles:  25% faster
X>	lines:  no real change
X>	image text 8:  slightly slower
X>	text 8:  slightly slower
X>	rectangles:  slightly faster
X>	copy area:  20% faster
X>
X>It seems like it would be interesting to figure out what helps where and
X>set up appropriate #ifdefs after people have had a chance to poke at it.
X
XSo, these changes also work on a Vax, but should be tuned a little
Xdifferently.  Let me encourage people who can access Vaxen to contribute
Xsuch fixes.
END_OF_FILE
if test 5827 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'maskbits.c.patch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'maskbits.c.patch'\"
else
echo shar: Extracting \"'maskbits.c.patch'\" \(29909 characters\)
sed "s/^X//" >'maskbits.c.patch' <<'END_OF_FILE'
X*** ./ddx/mfb/maskbits.c.orig	Tue Sep  6 13:53:30 1988
X--- ./ddx/mfb/maskbits.c	Thu Nov 17 15:21:24 1988
X***************
X*** 116,121 ****
X--- 116,122 ----
X  	0xFFFFFFFE
X      };
X  
X+ #ifndef PURDUE
X  /* a hack, for now, since the entries for 0 need to be all
X     1 bits, not all zeros.
X     this means the code DOES NOT WORK for segments of length
X***************
X*** 192,197 ****
X--- 193,458 ----
X  	0xFFFFFFFC,
X  	0xFFFFFFFE
X      };
X+ #else  /* PURDUE */
X+ unsigned int partmasks[32][32] = {
X+      {0xFFFFFFFF, 0x80000000, 0xC0000000, 0xE0000000,
X+       0xF0000000, 0xF8000000, 0xFC000000, 0xFE000000,
X+       0xFF000000, 0xFF800000, 0xFFC00000, 0xFFE00000,
X+       0xFFF00000, 0xFFF80000, 0xFFFC0000, 0xFFFE0000,
X+       0xFFFF0000, 0xFFFF8000, 0xFFFFC000, 0xFFFFE000,
X+       0xFFFFF000, 0xFFFFF800, 0xFFFFFC00, 0xFFFFFE00,
X+       0xFFFFFF00, 0xFFFFFF80, 0xFFFFFFC0, 0xFFFFFFE0,
X+       0xFFFFFFF0, 0xFFFFFFF8, 0xFFFFFFFC, 0xFFFFFFFE},
X+      {0x00000000, 0x40000000, 0x60000000, 0x70000000,
X+       0x78000000, 0x7C000000, 0x7E000000, 0x7F000000,
X+       0x7F800000, 0x7FC00000, 0x7FE00000, 0x7FF00000,
X+       0x7FF80000, 0x7FFC0000, 0x7FFE0000, 0x7FFF0000,
X+       0x7FFF8000, 0x7FFFC000, 0x7FFFE000, 0x7FFFF000,
X+       0x7FFFF800, 0x7FFFFC00, 0x7FFFFE00, 0x7FFFFF00,
X+       0x7FFFFF80, 0x7FFFFFC0, 0x7FFFFFE0, 0x7FFFFFF0,
X+       0x7FFFFFF8, 0x7FFFFFFC, 0x7FFFFFFE, 0x7FFFFFFF},
X+      {0x00000000, 0x20000000, 0x30000000, 0x38000000,
X+       0x3C000000, 0x3E000000, 0x3F000000, 0x3F800000,
X+       0x3FC00000, 0x3FE00000, 0x3FF00000, 0x3FF80000,
X+       0x3FFC0000, 0x3FFE0000, 0x3FFF0000, 0x3FFF8000,
X+       0x3FFFC000, 0x3FFFE000, 0x3FFFF000, 0x3FFFF800,
X+       0x3FFFFC00, 0x3FFFFE00, 0x3FFFFF00, 0x3FFFFF80,
X+       0x3FFFFFC0, 0x3FFFFFE0, 0x3FFFFFF0, 0x3FFFFFF8,
X+       0x3FFFFFFC, 0x3FFFFFFE, 0x3FFFFFFF, 0x00000000},
X+      {0x00000000, 0x10000000, 0x18000000, 0x1C000000,
X+       0x1E000000, 0x1F000000, 0x1F800000, 0x1FC00000,
X+       0x1FE00000, 0x1FF00000, 0x1FF80000, 0x1FFC0000,
X+       0x1FFE0000, 0x1FFF0000, 0x1FFF8000, 0x1FFFC000,
X+       0x1FFFE000, 0x1FFFF000, 0x1FFFF800, 0x1FFFFC00,
X+       0x1FFFFE00, 0x1FFFFF00, 0x1FFFFF80, 0x1FFFFFC0,
X+       0x1FFFFFE0, 0x1FFFFFF0, 0x1FFFFFF8, 0x1FFFFFFC,
X+       0x1FFFFFFE, 0x1FFFFFFF, 0x00000000, 0x00000000},
X+      {0x00000000, 0x08000000, 0x0C000000, 0x0E000000,
X+       0x0F000000, 0x0F800000, 0x0FC00000, 0x0FE00000,
X+       0x0FF00000, 0x0FF80000, 0x0FFC0000, 0x0FFE0000,
X+       0x0FFF0000, 0x0FFF8000, 0x0FFFC000, 0x0FFFE000,
X+       0x0FFFF000, 0x0FFFF800, 0x0FFFFC00, 0x0FFFFE00,
X+       0x0FFFFF00, 0x0FFFFF80, 0x0FFFFFC0, 0x0FFFFFE0,
X+       0x0FFFFFF0, 0x0FFFFFF8, 0x0FFFFFFC, 0x0FFFFFFE,
X+       0x0FFFFFFF, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x04000000, 0x06000000, 0x07000000,
X+       0x07800000, 0x07C00000, 0x07E00000, 0x07F00000,
X+       0x07F80000, 0x07FC0000, 0x07FE0000, 0x07FF0000,
X+       0x07FF8000, 0x07FFC000, 0x07FFE000, 0x07FFF000,
X+       0x07FFF800, 0x07FFFC00, 0x07FFFE00, 0x07FFFF00,
X+       0x07FFFF80, 0x07FFFFC0, 0x07FFFFE0, 0x07FFFFF0,
X+       0x07FFFFF8, 0x07FFFFFC, 0x07FFFFFE, 0x07FFFFFF,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x02000000, 0x03000000, 0x03800000,
X+       0x03C00000, 0x03E00000, 0x03F00000, 0x03F80000,
X+       0x03FC0000, 0x03FE0000, 0x03FF0000, 0x03FF8000,
X+       0x03FFC000, 0x03FFE000, 0x03FFF000, 0x03FFF800,
X+       0x03FFFC00, 0x03FFFE00, 0x03FFFF00, 0x03FFFF80,
X+       0x03FFFFC0, 0x03FFFFE0, 0x03FFFFF0, 0x03FFFFF8,
X+       0x03FFFFFC, 0x03FFFFFE, 0x03FFFFFF, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x01000000, 0x01800000, 0x01C00000,
X+       0x01E00000, 0x01F00000, 0x01F80000, 0x01FC0000,
X+       0x01FE0000, 0x01FF0000, 0x01FF8000, 0x01FFC000,
X+       0x01FFE000, 0x01FFF000, 0x01FFF800, 0x01FFFC00,
X+       0x01FFFE00, 0x01FFFF00, 0x01FFFF80, 0x01FFFFC0,
X+       0x01FFFFE0, 0x01FFFFF0, 0x01FFFFF8, 0x01FFFFFC,
X+       0x01FFFFFE, 0x01FFFFFF, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00800000, 0x00C00000, 0x00E00000,
X+       0x00F00000, 0x00F80000, 0x00FC0000, 0x00FE0000,
X+       0x00FF0000, 0x00FF8000, 0x00FFC000, 0x00FFE000,
X+       0x00FFF000, 0x00FFF800, 0x00FFFC00, 0x00FFFE00,
X+       0x00FFFF00, 0x00FFFF80, 0x00FFFFC0, 0x00FFFFE0,
X+       0x00FFFFF0, 0x00FFFFF8, 0x00FFFFFC, 0x00FFFFFE,
X+       0x00FFFFFF, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00400000, 0x00600000, 0x00700000,
X+       0x00780000, 0x007C0000, 0x007E0000, 0x007F0000,
X+       0x007F8000, 0x007FC000, 0x007FE000, 0x007FF000,
X+       0x007FF800, 0x007FFC00, 0x007FFE00, 0x007FFF00,
X+       0x007FFF80, 0x007FFFC0, 0x007FFFE0, 0x007FFFF0,
X+       0x007FFFF8, 0x007FFFFC, 0x007FFFFE, 0x007FFFFF,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00200000, 0x00300000, 0x00380000,
X+       0x003C0000, 0x003E0000, 0x003F0000, 0x003F8000,
X+       0x003FC000, 0x003FE000, 0x003FF000, 0x003FF800,
X+       0x003FFC00, 0x003FFE00, 0x003FFF00, 0x003FFF80,
X+       0x003FFFC0, 0x003FFFE0, 0x003FFFF0, 0x003FFFF8,
X+       0x003FFFFC, 0x003FFFFE, 0x003FFFFF, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00100000, 0x00180000, 0x001C0000,
X+       0x001E0000, 0x001F0000, 0x001F8000, 0x001FC000,
X+       0x001FE000, 0x001FF000, 0x001FF800, 0x001FFC00,
X+       0x001FFE00, 0x001FFF00, 0x001FFF80, 0x001FFFC0,
X+       0x001FFFE0, 0x001FFFF0, 0x001FFFF8, 0x001FFFFC,
X+       0x001FFFFE, 0x001FFFFF, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00080000, 0x000C0000, 0x000E0000,
X+       0x000F0000, 0x000F8000, 0x000FC000, 0x000FE000,
X+       0x000FF000, 0x000FF800, 0x000FFC00, 0x000FFE00,
X+       0x000FFF00, 0x000FFF80, 0x000FFFC0, 0x000FFFE0,
X+       0x000FFFF0, 0x000FFFF8, 0x000FFFFC, 0x000FFFFE,
X+       0x000FFFFF, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00040000, 0x00060000, 0x00070000,
X+       0x00078000, 0x0007C000, 0x0007E000, 0x0007F000,
X+       0x0007F800, 0x0007FC00, 0x0007FE00, 0x0007FF00,
X+       0x0007FF80, 0x0007FFC0, 0x0007FFE0, 0x0007FFF0,
X+       0x0007FFF8, 0x0007FFFC, 0x0007FFFE, 0x0007FFFF,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00020000, 0x00030000, 0x00038000,
X+       0x0003C000, 0x0003E000, 0x0003F000, 0x0003F800,
X+       0x0003FC00, 0x0003FE00, 0x0003FF00, 0x0003FF80,
X+       0x0003FFC0, 0x0003FFE0, 0x0003FFF0, 0x0003FFF8,
X+       0x0003FFFC, 0x0003FFFE, 0x0003FFFF, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00010000, 0x00018000, 0x0001C000,
X+       0x0001E000, 0x0001F000, 0x0001F800, 0x0001FC00,
X+       0x0001FE00, 0x0001FF00, 0x0001FF80, 0x0001FFC0,
X+       0x0001FFE0, 0x0001FFF0, 0x0001FFF8, 0x0001FFFC,
X+       0x0001FFFE, 0x0001FFFF, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00008000, 0x0000C000, 0x0000E000,
X+       0x0000F000, 0x0000F800, 0x0000FC00, 0x0000FE00,
X+       0x0000FF00, 0x0000FF80, 0x0000FFC0, 0x0000FFE0,
X+       0x0000FFF0, 0x0000FFF8, 0x0000FFFC, 0x0000FFFE,
X+       0x0000FFFF, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00004000, 0x00006000, 0x00007000,
X+       0x00007800, 0x00007C00, 0x00007E00, 0x00007F00,
X+       0x00007F80, 0x00007FC0, 0x00007FE0, 0x00007FF0,
X+       0x00007FF8, 0x00007FFC, 0x00007FFE, 0x00007FFF,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00002000, 0x00003000, 0x00003800,
X+       0x00003C00, 0x00003E00, 0x00003F00, 0x00003F80,
X+       0x00003FC0, 0x00003FE0, 0x00003FF0, 0x00003FF8,
X+       0x00003FFC, 0x00003FFE, 0x00003FFF, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00001000, 0x00001800, 0x00001C00,
X+       0x00001E00, 0x00001F00, 0x00001F80, 0x00001FC0,
X+       0x00001FE0, 0x00001FF0, 0x00001FF8, 0x00001FFC,
X+       0x00001FFE, 0x00001FFF, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000800, 0x00000C00, 0x00000E00,
X+       0x00000F00, 0x00000F80, 0x00000FC0, 0x00000FE0,
X+       0x00000FF0, 0x00000FF8, 0x00000FFC, 0x00000FFE,
X+       0x00000FFF, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000400, 0x00000600, 0x00000700,
X+       0x00000780, 0x000007C0, 0x000007E0, 0x000007F0,
X+       0x000007F8, 0x000007FC, 0x000007FE, 0x000007FF,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000200, 0x00000300, 0x00000380,
X+       0x000003C0, 0x000003E0, 0x000003F0, 0x000003F8,
X+       0x000003FC, 0x000003FE, 0x000003FF, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000100, 0x00000180, 0x000001C0,
X+       0x000001E0, 0x000001F0, 0x000001F8, 0x000001FC,
X+       0x000001FE, 0x000001FF, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000080, 0x000000C0, 0x000000E0,
X+       0x000000F0, 0x000000F8, 0x000000FC, 0x000000FE,
X+       0x000000FF, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000040, 0x00000060, 0x00000070,
X+       0x00000078, 0x0000007C, 0x0000007E, 0x0000007F,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000020, 0x00000030, 0x00000038,
X+       0x0000003C, 0x0000003E, 0x0000003F, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000010, 0x00000018, 0x0000001C,
X+       0x0000001E, 0x0000001F, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000008, 0x0000000C, 0x0000000E,
X+       0x0000000F, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000004, 0x00000006, 0x00000007,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000002, 0x00000003, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000001, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+ };
X+ #endif  /* PURDUE */
X  #else		/* LSBFirst */
X  /* NOTE:
X  the first element in starttab could be 0xffffffff.  making it 0
X***************
X*** 271,276 ****
X--- 532,538 ----
X  	0x7FFFFFFF
X  	};
X  
X+ #ifndef PURDUE
X  /* a hack, for now, since the entries for 0 need to be all
X     1 bits, not all zeros.
X     this means the code DOES NOT WORK for segments of length
X***************
X*** 347,352 ****
X--- 609,874 ----
X  	0x3FFFFFFF,
X  	0x7FFFFFFF
X  	};
X+ #else  /* PURDUE */
X+ unsigned int partmasks[32][32] = {
X+      {0xFFFFFFFF, 0x00000001, 0x00000003, 0x00000007,
X+       0x0000000F, 0x0000001F, 0x0000003F, 0x0000007F,
X+       0x000000FF, 0x000001FF, 0x000003FF, 0x000007FF,
X+       0x00000FFF, 0x00001FFF, 0x00003FFF, 0x00007FFF,
X+       0x0000FFFF, 0x0001FFFF, 0x0003FFFF, 0x0007FFFF,
X+       0x000FFFFF, 0x001FFFFF, 0x003FFFFF, 0x007FFFFF,
X+       0x00FFFFFF, 0x01FFFFFF, 0x03FFFFFF, 0x07FFFFFF,
X+       0x0FFFFFFF, 0x1FFFFFFF, 0x3FFFFFFF, 0x7FFFFFFF},
X+      {0x00000000, 0x00000002, 0x00000006, 0x0000000E,
X+       0x0000001E, 0x0000003E, 0x0000007E, 0x000000FE,
X+       0x000001FE, 0x000003FE, 0x000007FE, 0x00000FFE,
X+       0x00001FFE, 0x00003FFE, 0x00007FFE, 0x0000FFFE,
X+       0x0001FFFE, 0x0003FFFE, 0x0007FFFE, 0x000FFFFE,
X+       0x001FFFFE, 0x003FFFFE, 0x007FFFFE, 0x00FFFFFE,
X+       0x01FFFFFE, 0x03FFFFFE, 0x07FFFFFE, 0x0FFFFFFE,
X+       0x1FFFFFFE, 0x3FFFFFFE, 0x7FFFFFFE, 0xFFFFFFFE},
X+      {0x00000000, 0x00000004, 0x0000000C, 0x0000001C,
X+       0x0000003C, 0x0000007C, 0x000000FC, 0x000001FC,
X+       0x000003FC, 0x000007FC, 0x00000FFC, 0x00001FFC,
X+       0x00003FFC, 0x00007FFC, 0x0000FFFC, 0x0001FFFC,
X+       0x0003FFFC, 0x0007FFFC, 0x000FFFFC, 0x001FFFFC,
X+       0x003FFFFC, 0x007FFFFC, 0x00FFFFFC, 0x01FFFFFC,
X+       0x03FFFFFC, 0x07FFFFFC, 0x0FFFFFFC, 0x1FFFFFFC,
X+       0x3FFFFFFC, 0x7FFFFFFC, 0xFFFFFFFC, 0x00000000},
X+      {0x00000000, 0x00000008, 0x00000018, 0x00000038,
X+       0x00000078, 0x000000F8, 0x000001F8, 0x000003F8,
X+       0x000007F8, 0x00000FF8, 0x00001FF8, 0x00003FF8,
X+       0x00007FF8, 0x0000FFF8, 0x0001FFF8, 0x0003FFF8,
X+       0x0007FFF8, 0x000FFFF8, 0x001FFFF8, 0x003FFFF8,
X+       0x007FFFF8, 0x00FFFFF8, 0x01FFFFF8, 0x03FFFFF8,
X+       0x07FFFFF8, 0x0FFFFFF8, 0x1FFFFFF8, 0x3FFFFFF8,
X+       0x7FFFFFF8, 0xFFFFFFF8, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000010, 0x00000030, 0x00000070,
X+       0x000000F0, 0x000001F0, 0x000003F0, 0x000007F0,
X+       0x00000FF0, 0x00001FF0, 0x00003FF0, 0x00007FF0,
X+       0x0000FFF0, 0x0001FFF0, 0x0003FFF0, 0x0007FFF0,
X+       0x000FFFF0, 0x001FFFF0, 0x003FFFF0, 0x007FFFF0,
X+       0x00FFFFF0, 0x01FFFFF0, 0x03FFFFF0, 0x07FFFFF0,
X+       0x0FFFFFF0, 0x1FFFFFF0, 0x3FFFFFF0, 0x7FFFFFF0,
X+       0xFFFFFFF0, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000020, 0x00000060, 0x000000E0,
X+       0x000001E0, 0x000003E0, 0x000007E0, 0x00000FE0,
X+       0x00001FE0, 0x00003FE0, 0x00007FE0, 0x0000FFE0,
X+       0x0001FFE0, 0x0003FFE0, 0x0007FFE0, 0x000FFFE0,
X+       0x001FFFE0, 0x003FFFE0, 0x007FFFE0, 0x00FFFFE0,
X+       0x01FFFFE0, 0x03FFFFE0, 0x07FFFFE0, 0x0FFFFFE0,
X+       0x1FFFFFE0, 0x3FFFFFE0, 0x7FFFFFE0, 0xFFFFFFE0,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000040, 0x000000C0, 0x000001C0,
X+       0x000003C0, 0x000007C0, 0x00000FC0, 0x00001FC0,
X+       0x00003FC0, 0x00007FC0, 0x0000FFC0, 0x0001FFC0,
X+       0x0003FFC0, 0x0007FFC0, 0x000FFFC0, 0x001FFFC0,
X+       0x003FFFC0, 0x007FFFC0, 0x00FFFFC0, 0x01FFFFC0,
X+       0x03FFFFC0, 0x07FFFFC0, 0x0FFFFFC0, 0x1FFFFFC0,
X+       0x3FFFFFC0, 0x7FFFFFC0, 0xFFFFFFC0, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000080, 0x00000180, 0x00000380,
X+       0x00000780, 0x00000F80, 0x00001F80, 0x00003F80,
X+       0x00007F80, 0x0000FF80, 0x0001FF80, 0x0003FF80,
X+       0x0007FF80, 0x000FFF80, 0x001FFF80, 0x003FFF80,
X+       0x007FFF80, 0x00FFFF80, 0x01FFFF80, 0x03FFFF80,
X+       0x07FFFF80, 0x0FFFFF80, 0x1FFFFF80, 0x3FFFFF80,
X+       0x7FFFFF80, 0xFFFFFF80, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000100, 0x00000300, 0x00000700,
X+       0x00000F00, 0x00001F00, 0x00003F00, 0x00007F00,
X+       0x0000FF00, 0x0001FF00, 0x0003FF00, 0x0007FF00,
X+       0x000FFF00, 0x001FFF00, 0x003FFF00, 0x007FFF00,
X+       0x00FFFF00, 0x01FFFF00, 0x03FFFF00, 0x07FFFF00,
X+       0x0FFFFF00, 0x1FFFFF00, 0x3FFFFF00, 0x7FFFFF00,
X+       0xFFFFFF00, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000200, 0x00000600, 0x00000E00,
X+       0x00001E00, 0x00003E00, 0x00007E00, 0x0000FE00,
X+       0x0001FE00, 0x0003FE00, 0x0007FE00, 0x000FFE00,
X+       0x001FFE00, 0x003FFE00, 0x007FFE00, 0x00FFFE00,
X+       0x01FFFE00, 0x03FFFE00, 0x07FFFE00, 0x0FFFFE00,
X+       0x1FFFFE00, 0x3FFFFE00, 0x7FFFFE00, 0xFFFFFE00,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000400, 0x00000C00, 0x00001C00,
X+       0x00003C00, 0x00007C00, 0x0000FC00, 0x0001FC00,
X+       0x0003FC00, 0x0007FC00, 0x000FFC00, 0x001FFC00,
X+       0x003FFC00, 0x007FFC00, 0x00FFFC00, 0x01FFFC00,
X+       0x03FFFC00, 0x07FFFC00, 0x0FFFFC00, 0x1FFFFC00,
X+       0x3FFFFC00, 0x7FFFFC00, 0xFFFFFC00, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00000800, 0x00001800, 0x00003800,
X+       0x00007800, 0x0000F800, 0x0001F800, 0x0003F800,
X+       0x0007F800, 0x000FF800, 0x001FF800, 0x003FF800,
X+       0x007FF800, 0x00FFF800, 0x01FFF800, 0x03FFF800,
X+       0x07FFF800, 0x0FFFF800, 0x1FFFF800, 0x3FFFF800,
X+       0x7FFFF800, 0xFFFFF800, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00001000, 0x00003000, 0x00007000,
X+       0x0000F000, 0x0001F000, 0x0003F000, 0x0007F000,
X+       0x000FF000, 0x001FF000, 0x003FF000, 0x007FF000,
X+       0x00FFF000, 0x01FFF000, 0x03FFF000, 0x07FFF000,
X+       0x0FFFF000, 0x1FFFF000, 0x3FFFF000, 0x7FFFF000,
X+       0xFFFFF000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00002000, 0x00006000, 0x0000E000,
X+       0x0001E000, 0x0003E000, 0x0007E000, 0x000FE000,
X+       0x001FE000, 0x003FE000, 0x007FE000, 0x00FFE000,
X+       0x01FFE000, 0x03FFE000, 0x07FFE000, 0x0FFFE000,
X+       0x1FFFE000, 0x3FFFE000, 0x7FFFE000, 0xFFFFE000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00004000, 0x0000C000, 0x0001C000,
X+       0x0003C000, 0x0007C000, 0x000FC000, 0x001FC000,
X+       0x003FC000, 0x007FC000, 0x00FFC000, 0x01FFC000,
X+       0x03FFC000, 0x07FFC000, 0x0FFFC000, 0x1FFFC000,
X+       0x3FFFC000, 0x7FFFC000, 0xFFFFC000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00008000, 0x00018000, 0x00038000,
X+       0x00078000, 0x000F8000, 0x001F8000, 0x003F8000,
X+       0x007F8000, 0x00FF8000, 0x01FF8000, 0x03FF8000,
X+       0x07FF8000, 0x0FFF8000, 0x1FFF8000, 0x3FFF8000,
X+       0x7FFF8000, 0xFFFF8000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00010000, 0x00030000, 0x00070000,
X+       0x000F0000, 0x001F0000, 0x003F0000, 0x007F0000,
X+       0x00FF0000, 0x01FF0000, 0x03FF0000, 0x07FF0000,
X+       0x0FFF0000, 0x1FFF0000, 0x3FFF0000, 0x7FFF0000,
X+       0xFFFF0000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00020000, 0x00060000, 0x000E0000,
X+       0x001E0000, 0x003E0000, 0x007E0000, 0x00FE0000,
X+       0x01FE0000, 0x03FE0000, 0x07FE0000, 0x0FFE0000,
X+       0x1FFE0000, 0x3FFE0000, 0x7FFE0000, 0xFFFE0000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00040000, 0x000C0000, 0x001C0000,
X+       0x003C0000, 0x007C0000, 0x00FC0000, 0x01FC0000,
X+       0x03FC0000, 0x07FC0000, 0x0FFC0000, 0x1FFC0000,
X+       0x3FFC0000, 0x7FFC0000, 0xFFFC0000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00080000, 0x00180000, 0x00380000,
X+       0x00780000, 0x00F80000, 0x01F80000, 0x03F80000,
X+       0x07F80000, 0x0FF80000, 0x1FF80000, 0x3FF80000,
X+       0x7FF80000, 0xFFF80000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00100000, 0x00300000, 0x00700000,
X+       0x00F00000, 0x01F00000, 0x03F00000, 0x07F00000,
X+       0x0FF00000, 0x1FF00000, 0x3FF00000, 0x7FF00000,
X+       0xFFF00000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00200000, 0x00600000, 0x00E00000,
X+       0x01E00000, 0x03E00000, 0x07E00000, 0x0FE00000,
X+       0x1FE00000, 0x3FE00000, 0x7FE00000, 0xFFE00000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00400000, 0x00C00000, 0x01C00000,
X+       0x03C00000, 0x07C00000, 0x0FC00000, 0x1FC00000,
X+       0x3FC00000, 0x7FC00000, 0xFFC00000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x00800000, 0x01800000, 0x03800000,
X+       0x07800000, 0x0F800000, 0x1F800000, 0x3F800000,
X+       0x7F800000, 0xFF800000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x01000000, 0x03000000, 0x07000000,
X+       0x0F000000, 0x1F000000, 0x3F000000, 0x7F000000,
X+       0xFF000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x02000000, 0x06000000, 0x0E000000,
X+       0x1E000000, 0x3E000000, 0x7E000000, 0xFE000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x04000000, 0x0C000000, 0x1C000000,
X+       0x3C000000, 0x7C000000, 0xFC000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x08000000, 0x18000000, 0x38000000,
X+       0x78000000, 0xF8000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x10000000, 0x30000000, 0x70000000,
X+       0xF0000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x20000000, 0x60000000, 0xE0000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x40000000, 0xC0000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+      {0x00000000, 0x80000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000,
X+       0x00000000, 0x00000000, 0x00000000, 0x00000000},
X+ };
X+ #endif  /* PURDUE */
X  #endif
X  
X  
X***************
X*** 402,405 ****
X      0xffffffff ^ (1<<30), 0xffffffff ^ (1<<31)
X      };
X  #endif
X- 
X--- 924,926 ----
END_OF_FILE
if test 29909 -ne `wc -c <'maskbits.c.patch'`; then
    echo shar: \"'maskbits.c.patch'\" unpacked with wrong size!
fi
# end of 'maskbits.c.patch'
fi
if test -f 'maskbits.h.patch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'maskbits.h.patch'\"
else
echo shar: Extracting \"'maskbits.h.patch'\" \(5338 characters\)
sed "s/^X//" >'maskbits.h.patch' <<'END_OF_FILE'
X*** ./ddx/mfb/maskbits.h.orig	Mon Oct  3 07:25:17 1988
X--- ./ddx/mfb/maskbits.h	Thu Nov 17 15:21:25 1988
X***************
X*** 28,35 ****
X--- 28,39 ----
X  
X  extern int starttab[];
X  extern int endtab[];
X+ #ifndef PURDUE
X  extern int startpartial[];
X  extern int endpartial[];
X+ #else  /* PURDUE */
X+ extern unsigned partmasks[32][32];
X+ #endif  /* PURDUE */
X  extern int rmask[];
X  extern int mask[];
X  
X***************
X*** 206,213 ****
X--- 210,222 ----
X      else \
X  	nlw = (w) >> 5;
X  
X+ #ifndef PURDUE
X  #define maskpartialbits(x, w, mask) \
X      mask = startpartial[(x) & 0x1f] & endpartial[((x) + (w)) & 0x1f];
X+ #else  /* PURDUE */
X+ #define maskpartialbits(x, w, mask) \
X+     mask = partmasks[(x)&0x1f][(w)&0x1f];
X+ #endif  /* PURDUE */
X  
X  #define mask32bits(x, w, startmask, endmask) \
X      startmask = starttab[(x)&0x1f]; \
X***************
X*** 214,219 ****
X--- 223,230 ----
X      endmask = endtab[((x)+(w)) & 0x1f];
X  
X  
X+ #ifndef PURDUE
X+ 
X  #define getbits(psrc, x, w, dst) \
X  if ( ((x) + (w)) <= 32) \
X  { \
X***************
X*** 270,275 ****
X--- 281,287 ----
X      *((pdst)+1) = (*((pdst)+1) & starttab[n]) | (t2 & endtab[n]); \
X  }
X  
X+ 
X  #define putbitsrrop(src, x, w, pdst, rop) \
X  if ( ((x)+(w)) <= 32) \
X  { \
X***************
X*** 295,302 ****
X--- 307,399 ----
X      *((pdst)+1) = (*((pdst)+1) & starttab[n]) | (t2 & endtab[n]); \
X  }
X  
X+ #else  /* PURDUE */
X+ #define getbits(psrc, x, w, dst) \
X+ { \
X+     dst = SCRLEFT((unsigned) *(psrc), (x)); \
X+     if ( ((x) + (w)) > 32) \
X+ 	dst |= (SCRRIGHT((unsigned) *((psrc)+1), 32-(x))); \
X+ }
X+ 
X+ #define putbits(src, x, w, pdst) \
X+ { \
X+     register int n = (x)+(w)-32; \
X+     \
X+     if (n <= 0) \
X+     { \
X+ 	register int tmpmask; \
X+ 	maskpartialbits((x), (w), tmpmask); \
X+ 	*(pdst) = (*(pdst) & ~tmpmask) | \
X+ 		(SCRRIGHT((unsigned) src, x) & tmpmask); \
X+     } \
X+     else \
X+     { \
X+ 	register unsigned int *ptmp_ = (unsigned *) (pdst)+1; \
X+ 	*(pdst) = (*(pdst) & endtab[x]) | (SCRRIGHT((unsigned) (src), x)); \
X+ 	*ptmp_ = (*ptmp_ & starttab[n]) | \
X+ 		(SCRLEFT((unsigned) src, 32-(x)) & endtab[n]); \
X+     } \
X+ }
X+ 
X+ #define putbitsrop(src, x, w, pdst, rop) \
X+ {\
X+ 	register int t1, t2; \
X+ 	register int n = (x)+(w)-32; \
X+ 	\
X+ 	t1 = SCRRIGHT((src), (x)); \
X+ 	DoRop(t2, rop, t1, *(pdst)); \
X+ 	\
X+     if (n <= 0) \
X+     { \
X+ 	register int tmpmask; \
X+ 	\
X+ 	maskpartialbits((x), (w), tmpmask); \
X+ 	*(pdst) = (*(pdst) & ~tmpmask) | (t2 & tmpmask); \
X+     } \
X+     else \
X+     { \
X+ 	int m = 32-(x); \
X+ 	register unsigned int *ptmp_ = (unsigned *) (pdst)+1; \
X+ 	*(pdst) = (*(pdst) & endtab[x]) | (t2 & starttab[x]); \
X+ 	t1 = SCRLEFT((src), m); \
X+ 	DoRop(t2, rop, t1, *ptmp_); \
X+ 	*ptmp_ = (*ptmp_ & starttab[n]) | (t2 & endtab[n]); \
X+     } \
X+ }
X+ 
X+ #define putbitsrrop(src, x, w, pdst, rop) \
X+ {\
X+ 	register int t1, t2; \
X+ 	register int n = (x)+(w)-32; \
X+ 	\
X+ 	t1 = SCRRIGHT((src), (x)); \
X+ 	t2 = DoRRop(rop, t1, *(pdst)); \
X+ 	\
X+     if (n <= 0) \
X+     { \
X+ 	register int tmpmask; \
X+ 	\
X+ 	maskpartialbits((x), (w), tmpmask); \
X+ 	*(pdst) = (*(pdst) & ~tmpmask) | (t2 & tmpmask); \
X+     } \
X+     else \
X+     { \
X+ 	int m = 32-(x); \
X+ 	register unsigned int *ptmp_ = (unsigned *) (pdst)+1; \
X+ 	*(pdst) = (*(pdst) & endtab[x]) | (t2 & starttab[x]); \
X+ 	t1 = SCRLEFT((src), m); \
X+ 	t2 = DoRRop(rop, t1, *ptmp_); \
X+ 	*ptmp_ = (*ptmp_ & starttab[n]) | (t2 & endtab[n]); \
X+     } \
X+ }
X+ #endif  /* PURDUE */
X+ 
X  #if GETLEFTBITS_ALIGNMENT == 1
X+ #ifndef PURDUE
X  #define getleftbits(psrc, w, dst)	getbits((unsigned int *)psrc, 0, w, dst)
X+ #else  /* PURDUE */
X+ #define getleftbits(psrc, w, dst)	dst = *((unsigned int *) psrc)
X+ #endif
X  #endif /* GETLEFTBITS_ALIGNMENT == 1 */
X  
X  #if GETLEFTBITS_ALIGNMENT == 2
X***************
X*** 326,329 ****
X--- 423,470 ----
X  	getleftbits((psrc), (w), (dst)); \
X  	dst = SCRLEFT((dst), (offset));
X  
X+ #ifdef PURDUE
X+ /* pairs of getbits/putbits happen frequently. Some of the code can
X+  * be shared or avoided in a few specific instances.  It gets us a
X+  * small advantage, so we do it.
X+  */
X  
X+ #define getandputbits0(psrc, sbindex, width, pdst) \
X+ {			/* unroll the whole damn thing to see how it * behaves */ \
X+     register int          _flag = 32 - (sbindex); \
X+     register unsigned int _src; \
X+  \
X+     _src = SCRLEFT (*(psrc), (sbindex)); \
X+     if ((width) > _flag) \
X+ 	_src |=  SCRRIGHT (*((psrc) + 1), _flag); \
X+  \
X+     *(pdst) = (*(pdst) & starttab[(width)]) | (_src & endtab[(width)]); \
X+ }
X+ 
X+ 
X+ #define getandputrop0(psrc, sbindex, width, pdst, rop) \
X+ {			\
X+     register int          _flag = 32 - (sbindex); \
X+     register unsigned int _src; \
X+  \
X+     _src = SCRLEFT (*(psrc), (sbindex)); \
X+     if ((width) > _flag) \
X+ 	_src |=  SCRRIGHT (*((psrc) + 1), _flag); \
X+     DoRop(_src, rop, _src, *(pdst)); \
X+  \
X+     *(pdst) = (*(pdst) & starttab[(width)]) | (_src & endtab[(width)]); \
X+ }
X+ 
X+ #define getandputrrop0(psrc, sbindex, width, pdst, rop) \
X+ { \
X+     int             _flag = 32 - (sbindex); \
X+     register unsigned int _src; \
X+  \
X+     _src = SCRLEFT (*(psrc), (sbindex)); \
X+     if ((width) > _flag) \
X+ 	_src |=  SCRRIGHT (*((psrc) + 1), _flag); \
X+     _src = DoRRop(rop, _src, *(pdst)); \
X+  \
X+     *(pdst) = (*(pdst) & starttab[(width)]) | (_src & endtab[(width)]); \
X+ }
X+ #endif  /* PURDUE */
END_OF_FILE
if test 5338 -ne `wc -c <'maskbits.h.patch'`; then
    echo shar: \"'maskbits.h.patch'\" unpacked with wrong size!
fi
# end of 'maskbits.h.patch'
fi
if test -f 'mfbfillsp.c.patch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mfbfillsp.c.patch'\"
else
echo shar: Extracting \"'mfbfillsp.c.patch'\" \(4526 characters\)
sed "s/^X//" >'mfbfillsp.c.patch' <<'END_OF_FILE'
X*** ./ddx/mfb/mfbfillsp.c.orig	Tue Sep  6 13:54:01 1988
X--- ./ddx/mfb/mfbfillsp.c	Thu Nov 17 15:21:37 1988
X***************
X*** 123,130 ****
X--- 123,134 ----
X  		maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle);
X  		if (startmask)
X  		    *addrl++ &= ~startmask;
X+ #ifndef PURDUE
X  		while (nlmiddle--)
X  		    *addrl++ = 0x0;
X+ #else
X+ 		Duff (nlmiddle, *addrl++ = 0x0);
X+ #endif
X  		if (endmask)
X  		    *addrl &= ~endmask;
X  	    }
X***************
X*** 207,214 ****
X--- 211,222 ----
X  		maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle);
X  		if (startmask)
X  		    *addrl++ |= startmask;
X+ #ifndef PURDUE
X  		while (nlmiddle--)
X  		    *addrl++ = 0xffffffff;
X+ #else
X+ 		Duff (nlmiddle, *addrl++ = 0xffffffff);
X+ #endif
X  		if (endmask)
X  		    *addrl |= endmask;
X  	    }
X***************
X*** 291,298 ****
X--- 299,310 ----
X  		maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle);
X  		if (startmask)
X  		    *addrl++ ^= startmask;
X+ #ifndef PURDUE
X  		while (nlmiddle--)
X  		    *addrl++ ^= 0xffffffff;
X+ #else
X+ 		Duff (nlmiddle, *addrl++ ^= 0xffffffff);
X+ #endif  /* PURDUE */
X  		if (endmask)
X  		    *addrl ^= endmask;
X  	    }
X***************
X*** 382,389 ****
X--- 394,405 ----
X  	    maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle);
X  	    if (startmask)
X  		*addrl++ |= (src & startmask);
X+ #ifndef PURDUE
X  	    while (nlmiddle--)
X  		*addrl++ |= src;
X+ #else
X+ 	    Duff (nlmiddle, *addrl++ |= src);
X+ #endif  /* PURDUE */
X  	    if (endmask)
X  		*addrl |= (src & endmask);
X          }
X***************
X*** 472,479 ****
X--- 488,499 ----
X  	    maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle);
X  	    if (startmask)
X  		*addrl++ &= ~(src & startmask);
X+ #ifndef PURDUE
X  	    while (nlmiddle--)
X  		*addrl++ &= ~src;
X+ #else
X+ 	    Duff (nlmiddle, *addrl++ &= ~src);
X+ #endif  /* PURDUE */
X  	    if (endmask)
X  		*addrl &= ~(src & endmask);
X          }
X***************
X*** 562,569 ****
X--- 582,593 ----
X  	    maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle);
X  	    if (startmask)
X  		*addrl++ ^= (src & startmask);
X+ #ifndef PURDUE
X  	    while (nlmiddle--)
X  		*addrl++ ^= src;
X+ #else
X+ 	    Duff(nlmiddle, *addrl++ ^= src);
X+ #endif  /* PURDUE */
X  	    if (endmask)
X  		*addrl ^= (src & endmask);
X          }
X***************
X*** 860,867 ****
X--- 884,895 ----
X  		else if(((x & 0x1f) + w) < 32)
X  		{
X  		    /* doing < 32 bits is easy, and worth special-casing */
X+ #ifndef PURDUE
X  		    getbits(psrc, 0, w, tmpSrc);
X  		    putbitsrop(tmpSrc, x & 0x1f, w, pdst, rop);
X+ #else
X+ 		    putbitsrop(*psrc, x & 0x1f, w, pdst, rop);
X+ #endif
X  		}
X  		else
X  		{
X***************
X*** 883,890 ****
X--- 911,922 ----
X  
X  		    if(startmask)
X  		    {
X+ #ifndef PURDUE
X  			getbits(psrc, 0, nstart, tmpSrc);
X  			putbitsrop(tmpSrc, (x & 0x1f), nstart, pdst, rop);
X+ #else
X+ 			putbitsrop(*psrc, (x & 0x1f), nstart, pdst, rop);
X+ #endif  /* PURDUE */
X  			pdst++;
X  			if(srcStartOver)
X  			    psrc++;
X***************
X*** 893,906 ****
X--- 925,946 ----
X  		    while(nlMiddle--)
X  		    {
X  			    getbits(psrc, nstart, 32, tmpSrc);
X+ #ifndef PURDUE
X  			    *pdst = DoRop(rop, tmpSrc, *pdst);
X+ #else  /* PURDUE */
X+ 			    DoRop(*pdst, rop, tmpSrc, *pdst); 
X+ #endif  /* PURDUE */
X  			    pdst++;
X  			    psrc++;
X  		    }
X  		    if(endmask)
X  		    {
X+ #ifndef PURDUE
X  			getbits(psrc, nstart, nend, tmpSrc);
X  			putbitsrop(tmpSrc, 0, nend, pdst, rop);
X+ #else
X+ 			getandputrop0(psrc, nstart, nend, pdst, rop);
X+ #endif  /* PURDUE */
X  		    }
X  		 }
X  		 x += w;
X***************
X*** 1022,1029 ****
X--- 1062,1073 ----
X  		else if(((x & 0x1f) + w) < 32)
X  		{
X  		    /* doing < 32 bits is easy, and worth special-casing */
X+ #ifndef PURDUE
X  		    getbits(psrc, 0, w, tmpSrc);
X  		    putbitsrrop(tmpSrc, x & 0x1f, w, pdst, rop);
X+ #else
X+ 		    putbitsrrop(*psrc, x & 0x1f, w, pdst, rop);
X+ #endif  /* PURDUE */
X  		}
X  		else
X  		{
X***************
X*** 1045,1052 ****
X--- 1089,1100 ----
X  
X  		    if(startmask)
X  		    {
X+ #ifndef PURDUE
X  			getbits(psrc, 0, nstart, tmpSrc);
X  			putbitsrrop(tmpSrc, (x & 0x1f), nstart, pdst, rop);
X+ #else
X+ 			putbitsrrop(*psrc, (x & 0x1f), nstart, pdst, rop);
X+ #endif
X  			pdst++;
X  			if(srcStartOver)
X  			    psrc++;
X***************
X*** 1061,1068 ****
X--- 1109,1120 ----
X  		    }
X  		    if(endmask)
X  		    {
X+ #ifndef PURDUE
X  			getbits(psrc, nstart, nend, tmpSrc);
X  			putbitsrrop(tmpSrc, 0, nend, pdst, rop);
X+ #else
X+ 			getandputrrop0(psrc, nstart, nend, pdst, rop);
X+ #endif  /* PURDUE */
X  		    }
X  		 }
X  		 x += w;
END_OF_FILE
if test 4526 -ne `wc -c <'mfbfillsp.c.patch'`; then
    echo shar: \"'mfbfillsp.c.patch'\" unpacked with wrong size!
fi
# end of 'mfbfillsp.c.patch'
fi
if test -f 'mfbline.c.patch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mfbline.c.patch'\"
else
echo shar: Extracting \"'mfbline.c.patch'\" \(4895 characters\)
sed "s/^X//" >'mfbline.c.patch' <<'END_OF_FILE'
X*** ./ddx/mfb/mfbline.c.orig	Mon Oct 31 11:38:46 1988
X--- ./ddx/mfb/mfbline.c	Thu Nov 17 15:21:21 1988
X***************
X*** 110,116 ****
X--- 110,120 ----
X  #define round(dividend, divisor) \
X  ( (((dividend)<<1) + (divisor)) / ((divisor)<<1) )
X  
X+ #ifndef PURDUE
X  #define ceiling(m,n) ( ((m) + (n) -1)/(n) )
X+ #else
X+ #define ceiling(m,n)  (((m)-1)/(n) + 1)
X+ #endif  /* PURDUE */
X  
X  #define SignTimes(sign, n) ((sign) * ((int)(n)))
X  
X***************
X*** 119,124 ****
X--- 123,129 ----
X      ( ((sign)<0) ? -(n) : (n) )
X  */
X  
X+ #ifndef PURDUE
X  #define SWAPPT(p1, p2, pttmp) \
X  pttmp = p1; \
X  p1 = p2; \
X***************
X*** 129,134 ****
X--- 134,155 ----
X  i = j; \
X  j = t;
X  
X+ #else
X+ #define SWAPINT(i, j) \
X+ {  register int _t = i; \
X+    i = j; \
X+    j = _t; \
X+ }
X+ 
X+ #define SWAPPT(i, j) \
X+ {  register DDXPointRec _t; \
X+    _t = i; \
X+    i = j; \
X+    j = _t; \
X+ }
X+ #endif  /* PURDUE */
X+    
X+ 
X  void
X  mfbLineSS(pDrawable, pGC, mode, npt, pptInit)
X      DrawablePtr pDrawable;
X***************
X*** 200,210 ****
X--- 221,235 ----
X      nptTmp = npt;
X      if (mode == CoordModeOrigin)
X      {
X+ #ifndef PURDUE
X  	while(nptTmp--)
X  	{
X  	    ppt->x += xorg;
X  	    ppt++->y += yorg;
X  	}
X+ #else
X+ 	Duff(nptTmp, ppt->x += xorg; ppt++->y += yorg);
X+ #endif  /* PURDUE */
X      }
X      else
X      {
X***************
X*** 211,216 ****
X--- 236,242 ----
X  	ppt->x += xorg;
X  	ppt->y += yorg;
X  	nptTmp--;
X+ #ifndef PURDUE
X  	while(nptTmp--)
X  	{
X  	    ppt++;
X***************
X*** 217,222 ****
X--- 243,251 ----
X  	    ppt->x += (ppt-1)->x;
X  	    ppt->y += (ppt-1)->y;
X  	}
X+ #else
X+ 	Duff(nptTmp, ppt++; ppt->x += (ppt-1)->x; ppt->y += (ppt-1)->y);
X+ #endif  /* PURDUE */
X      }
X  
X      ppt = pptInit;
X***************
X*** 235,240 ****
X--- 264,272 ----
X  	    */
X  	    if (pt1.y > pt2.y)
X  	    {
X+ #ifdef PURDUE
X+ 		register int tmp;
X+ #endif
X  		tmp = pt2.y;
X  		pt2.y = pt1.y + 1;
X  		pt1.y = tmp + 1;
X***************
X*** 277,282 ****
X--- 309,317 ----
X  	    */
X  	    if (pt1.x > pt2.x)
X  	    {
X+ #ifdef PURDUE
X+ 		register int tmp;
X+ #endif
X  		tmp = pt2.x;
X  		pt2.x = pt1.x + 1;
X  		pt1.x = tmp + 1;
X***************
X*** 308,314 ****
X--- 343,353 ----
X  		    if (pbox->x1 >= pt2.x)
X  		    {
X  			nbox = 0;
X+ #ifndef PURDUE
X  			continue;
X+ #else
X+ 			break;
X+ #endif  /* PURDUE */
X  		    }
X  
X  		    x1 = max(pt1.x, pbox->x1);
X***************
X*** 440,445 ****
X--- 479,485 ----
X  	 (ppt->y != pptInit->y) ||
X  	 (ppt == pptInit + 1)))
X      {
X+ #ifndef PURDUE
X  	pt1 = *ppt;
X  
X  	nbox = nboxInit;
X***************
X*** 469,476 ****
X--- 509,555 ----
X  	    else
X  		pbox++;
X  	}
X+ #else
X+ 	unsigned int _mask;
X+ 	int _incr,  _rop = ((mfbPrivGC *)(pGC->devPriv))->rop;
X+ 
X+ 	pt1 = *ppt;
X+ 	if (_rop == RROP_BLACK)
X+ 		_mask = rmask[pt1.x & 0x1f];
X+ 	else
X+ 		_mask = mask[pt1.x & 0x1f];
X+ 	_incr = (pt1.y * nlwidth) + (pt1.x >> 5);
X+ 
X+ 	nbox = nboxInit;
X+ 	pbox = pboxInit;
X+ 	while (nbox--)
X+ 	{
X+ 	    if ((pt1.x >= pbox->x1) &&
X+ 		(pt1.y >= pbox->y1) &&
X+ 		(pt1.x <  pbox->x2) &&
X+ 		(pt1.y <  pbox->y2))
X+ 	    {
X+ 		addrl += _incr;
X+ 		switch(_rop)
X+ 		{
X+ 		    case RROP_BLACK:
X+ 		        *addrl &= _mask;
X+ 			break;
X+ 		    case RROP_WHITE:
X+ 		        *addrl |= _mask;
X+ 			break;
X+ 		    case RROP_INVERT:
X+ 		        *addrl ^= _mask;
X+ 			break;
X  		}
X+ 		break;
X  	    }
X+ 	    else
X+ 		pbox++;
X+ 	}
X+ #endif  /* PURDUE */
X+     }
X+ }
X  
X  
X  /*
X***************
X*** 570,580 ****
X--- 649,663 ----
X      nptTmp = npt;
X      if (mode == CoordModeOrigin)
X      {
X+ #ifndef PURDUE
X  	while(nptTmp--)
X  	{
X  	    ppt->x += xorg;
X  	    ppt++->y += yorg;
X  	}
X+ #else
X+ 	Duff(nptTmp, ppt->x += xorg; ppt++->y += yorg );
X+ #endif  /* PURDUE */
X      }
X      else
X      {
X***************
X*** 581,586 ****
X--- 664,670 ----
X  	ppt->x += xorg;
X  	ppt->y += yorg;
X  	nptTmp--;
X+ #ifndef PURDUE
X  	while(nptTmp--)
X  	{
X  	    ppt++;
X***************
X*** 587,592 ****
X--- 671,679 ----
X  	    ppt->x += (ppt-1)->x;
X  	    ppt->y += (ppt-1)->y;
X  	}
X+ #else
X+ 	Duff (nptTmp, ppt++; ppt->x += (ppt-1)->x; ppt->y += (ppt-1)->y);
X+ #endif
X      }
X  
X  
X***************
X*** 766,774 ****
X--- 853,867 ----
X  	    clipDone = 1;
X  	    if (swapped)
X  	    {
X+ #ifndef PURDUE
X  	        SWAPPT(pt1, pt2, ptTmp);
X  	        SWAPINT(oc1, oc2, tmp);
X  	        SWAPINT(clip1, clip2, tmp);
X+ #else
X+ 	        SWAPPT(pt1, pt2);
X+ 	        SWAPINT(oc1, oc2);
X+ 	        SWAPINT(clip1, clip2);
X+ #endif  /* PURDUE */
X  	    }
X          }
X          else /* have to clip */
X***************
X*** 776,784 ****
X--- 869,883 ----
X  	    /* only clip one point at a time */
X  	    if (!oc1)
X  	    {
X+ #ifndef PURDUE
X  	        SWAPPT(pt1, pt2, ptTmp);
X  	        SWAPINT(oc1, oc2, tmp);
X  	        SWAPINT(clip1, clip2, tmp);
X+ #else
X+ 	        SWAPPT(pt1, pt2);
X+ 	        SWAPINT(oc1, oc2);
X+ 	        SWAPINT(clip1, clip2);
X+ #endif  /* PURDUE */
X  	        swapped = !swapped;
X  	    }
X      
END_OF_FILE
if test 4895 -ne `wc -c <'mfbline.c.patch'`; then
    echo shar: \"'mfbline.c.patch'\" unpacked with wrong size!
fi
# end of 'mfbline.c.patch'
fi
if test -f 'mfbpntwin.c.patch' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mfbpntwin.c.patch'\"
else
echo shar: Extracting \"'mfbpntwin.c.patch'\" \(1369 characters\)
sed "s/^X//" >'mfbpntwin.c.patch' <<'END_OF_FILE'
X*** ./ddx/mfb/mfbpntwin.c.orig	Mon Oct 31 02:03:05 1988
X--- ./ddx/mfb/mfbpntwin.c	Thu Nov 17 15:21:33 1988
X***************
X*** 179,186 ****
X--- 179,190 ----
X  		    nlw = nlwMiddle;
X  		    *p = (*p & ~startmask) | (srcpix & startmask);
X  		    p++;
X+ #ifndef PURDUE
X  		    while (nlw--)
X  			*p++ = srcpix;
X+ #else
X+ 		    Duff (nlw, *p++ = srcpix );
X+ #endif  /* PURDUE */
X  		    *p = (*p & ~endmask) | (srcpix & endmask);
X  		    p += nlwExtra;
X  		}
X***************
X*** 195,202 ****
X--- 199,210 ----
X  		    nlw = nlwMiddle;
X  		    *p = (*p & ~startmask) | (srcpix & startmask);
X  		    p++;
X+ #ifndef PURDUE
X  		    while (nlw--)
X  			*p++ = srcpix;
X+ #else
X+ 		Duff (nlw, *p++ = srcpix );
X+ #endif  /* PURDUE */
X  		    p += nlwExtra;
X  		}
X  	    }
X***************
X*** 207,214 ****
X--- 215,226 ----
X  		    srcpix = psrc[y%tileHeight];
X  		    y++;
X  		    nlw = nlwMiddle;
X+ #ifndef PURDUE
X  		    while (nlw--)
X  			*p++ = srcpix;
X+ #else
X+ 		Duff (nlw, *p++ = srcpix);
X+ #endif  /* PURDUE */
X  		    *p = (*p & ~endmask) | (srcpix & endmask);
X  		    p += nlwExtra;
X  		}
X***************
X*** 220,227 ****
X--- 232,243 ----
X  		    srcpix = psrc[y%tileHeight];
X  		    y++;
X  		    nlw = nlwMiddle;
X+ #ifndef PURDUE
X  		    while (nlw--)
X  			*p++ = srcpix;
X+ #else
X+ 		Duff (nlw, *p++ = srcpix);
X+ #endif  /* PURDUE */
X  		    p += nlwExtra;
X  		}
X  	    }
END_OF_FILE
if test 1369 -ne `wc -c <'mfbpntwin.c.patch'`; then
    echo shar: \"'mfbpntwin.c.patch'\" unpacked with wrong size!
fi
# end of 'mfbpntwin.c.patch'
fi
echo shar: End of archive 1 \(of 2\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked both archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
Moderator of comp.sources.x



More information about the Comp.sources.x mailing list