Commit 40548349 authored by Peter Hutterer's avatar Peter Hutterer

mi: remove 'register' keywords.

parent 63169ce5
......@@ -246,7 +246,7 @@ typedef struct _miPolyArc {
static CARD32 gcvals[6];
static void fillSpans(DrawablePtr pDrawable, GCPtr pGC);
static void newFinalSpan(int y, register int xmin, register int xmax);
static void newFinalSpan(int y, int xmin, int xmax);
static void drawArc(xArc *tarc, int l, int a0, int a1, miArcFacePtr right,
miArcFacePtr left);
static void drawZeroArc(DrawablePtr pDraw, GCPtr pGC, xArc *tarc, int lw,
......@@ -284,7 +284,7 @@ miArcSegment(
{
int l = pGC->lineWidth;
int a0, a1, startAngle, endAngle;
miArcFacePtr temp;
miArcFacePtr temp;
if (!l)
l = 1;
......@@ -432,8 +432,8 @@ static RESTYPE cacheType;
/*ARGSUSED*/
int
miFreeArcCache (data, id)
pointer data;
XID id;
pointer data;
XID id;
{
int k;
arcCacheRec *cent;
......@@ -461,11 +461,11 @@ miComputeCircleSpans(
xArc *parc,
miArcSpanData *spdata)
{
register miArcSpan *span;
miArcSpan *span;
int doinner;
register int x, y, e;
int x, y, e;
int xk, yk, xm, ym, dx, dy;
register int slw, inslw;
int slw, inslw;
int inx = 0, iny, ine = 0;
int inxk = 0, inyk = 0, inxm = 0, inym = 0;
......@@ -529,7 +529,7 @@ miComputeEllipseSpans(
xArc *parc,
miArcSpanData *spdata)
{
register miArcSpan *span;
miArcSpan *span;
double w, h, r, xorg;
double Hs, Hf, WH, K, Vk, Nk, Fk, Vr, N, Nc, Z, rs;
double A, T, b, d, x, y, t, inx, outx = 0.0, hepp, hepm;
......@@ -859,13 +859,13 @@ tailX(
static miArcSpanData *
miComputeWideEllipse(
int lw,
register xArc *parc,
Bool *mustFree)
int lw,
xArc *parc,
Bool *mustFree)
{
register miArcSpanData *spdata;
register arcCacheRec *cent, *lruent;
register int k;
miArcSpanData *spdata;
arcCacheRec *cent, *lruent;
int k;
arcCacheRec fakeent;
if (!lw)
......@@ -943,14 +943,14 @@ miFillWideEllipse(
xArc *parc)
{
DDXPointPtr points;
register DDXPointPtr pts;
DDXPointPtr pts;
int *widths;
register int *wids;
int *wids;
miArcSpanData *spdata;
Bool mustFree;
register miArcSpan *span;
register int xorg, yorgu, yorgl;
register int n;
miArcSpan *span;
int xorg, yorgu, yorgl;
int n;
yorgu = parc->height + pGC->lineWidth;
n = (sizeof(int) * 2) * yorgu;
......@@ -1077,20 +1077,20 @@ miPolyArc(pDraw, pGC, narcs, parcs)
int narcs;
xArc *parcs;
{
register int i;
xArc *parc;
int xMin, xMax, yMin, yMax;
int pixmapWidth = 0, pixmapHeight = 0;
int xOrg = 0, yOrg = 0;
int width;
Bool fTricky;
DrawablePtr pDrawTo;
CARD32 fg, bg;
GCPtr pGCTo;
miPolyArcPtr polyArcs;
int cap[2], join[2];
int iphase;
int halfWidth;
int i;
xArc *parc;
int xMin, xMax, yMin, yMax;
int pixmapWidth = 0, pixmapHeight = 0;
int xOrg = 0, yOrg = 0;
int width;
Bool fTricky;
DrawablePtr pDrawTo;
CARD32 fg, bg;
GCPtr pGCTo;
miPolyArcPtr polyArcs;
int cap[2], join[2];
int iphase;
int halfWidth;
width = pGC->lineWidth;
if(width == 0 && pGC->lineStyle == LineSolid)
......@@ -3139,9 +3139,9 @@ static struct finalSpanChunk *chunks;
struct finalSpan *
realAllocSpan ()
{
register struct finalSpanChunk *newChunk;
register struct finalSpan *span;
register int i;
struct finalSpanChunk *newChunk;
struct finalSpan *span;
int i;
newChunk = (struct finalSpanChunk *) xalloc (sizeof (struct finalSpanChunk));
if (!newChunk)
......@@ -3179,14 +3179,14 @@ fillSpans (
DrawablePtr pDrawable,
GCPtr pGC)
{
register struct finalSpan *span;
register DDXPointPtr xSpan;
register int *xWidth;
register int i;
register struct finalSpan **f;
register int spany;
DDXPointPtr xSpans;
int *xWidths;
struct finalSpan *span;
DDXPointPtr xSpan;
int *xWidth;
int i;
struct finalSpan **f;
int spany;
DDXPointPtr xSpans;
int *xWidths;
if (nspans == 0)
return;
......@@ -3280,13 +3280,13 @@ realFindSpan (int y)
static void
newFinalSpan (
int y,
register int xmin,
register int xmax)
int xmin,
int xmax)
{
register struct finalSpan *x;
register struct finalSpan **f;
struct finalSpan *oldx;
struct finalSpan *prev;
struct finalSpan *x;
struct finalSpan **f;
struct finalSpan *oldx;
struct finalSpan *prev;
f = findSpan (y);
if (!f)
......
......@@ -76,12 +76,12 @@ extern int ffs(int);
_X_EXPORT RegionPtr
miCopyArea(pSrcDrawable, pDstDrawable,
pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut)
register DrawablePtr pSrcDrawable;
register DrawablePtr pDstDrawable;
GCPtr pGC;
int xIn, yIn;
int widthSrc, heightSrc;
int xOut, yOut;
DrawablePtr pSrcDrawable;
DrawablePtr pDstDrawable;
GCPtr pGC;
int xIn, yIn;
int widthSrc, heightSrc;
int xOut, yOut;
{
DDXPointPtr ppt, pptFirst;
unsigned int *pwidthFirst, *pwidth, *pbits;
......
......@@ -152,11 +152,11 @@ static void miBSClearBackingRegion(WindowPtr pWin, RegionPtr pRgn);
#define copyData(src,dst,n,morecopy) \
{ \
register short *srcCopy = (short *)(src); \
register short *dstCopy = (short *)(dst); \
register int i; \
register int bsx = pBackingStore->x; \
register int bsy = pBackingStore->y; \
short *srcCopy = (short *)(src); \
short *dstCopy = (short *)(dst); \
int i; \
int bsx = pBackingStore->x; \
int bsy = pBackingStore->y; \
for (i = n; --i >= 0; ) \
{ \
*dstCopy++ = *srcCopy++ - bsx; \
......@@ -1010,7 +1010,7 @@ miBSSetSpans(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted)
DrawablePtr pDrawable;
GCPtr pGC;
char *psrc;
register DDXPointPtr ppt;
DDXPointPtr ppt;
int *pwidth;
int nspans;
int fSorted;
......@@ -1150,8 +1150,8 @@ miBSDoCopy(
} *boxes; /* Array of box/drawable pairs covering
* source box. */
int *sequence; /* Sequence of boxes to move */
register int i, j, k, l, y;
register BoxPtr pBox;
int i, j, k, l, y;
BoxPtr pBox;
int dx, dy, nrects;
Bool graphicsExposures;
CopyPlaneProcPtr pixCopyProc;
......@@ -1591,7 +1591,7 @@ static RegionPtr
miBSCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane)
DrawablePtr pSrc;
DrawablePtr pDst;
register GC *pGC;
GC *pGC;
int srcx,
srcy;
int w,
......@@ -1901,9 +1901,9 @@ miBSPolyArc(pDrawable, pGC, narcs, parcs)
static void
miBSFillPolygon(pDrawable, pGC, shape, mode, count, pPts)
DrawablePtr pDrawable;
register GCPtr pGC;
GCPtr pGC;
int shape, mode;
register int count;
int count;
DDXPointPtr pPts;
{
DDXPointPtr pPtsCopy;
......@@ -2546,8 +2546,8 @@ static void
miBSAllocate(pWin)
WindowPtr pWin;
{
register miBSWindowPtr pBackingStore;
register ScreenPtr pScreen;
miBSWindowPtr pBackingStore;
ScreenPtr pScreen;
if (pWin->drawable.pScreen->backingStoreSupport == NotUseful)
return;
......@@ -2648,7 +2648,7 @@ miBSFree(pWin)
WindowPtr pWin;
{
miBSWindowPtr pBackingStore;
register ScreenPtr pScreen;
ScreenPtr pScreen;
pScreen = pWin->drawable.pScreen;
......@@ -2792,9 +2792,9 @@ miResizeBackingStore(
*/
static void
miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
register WindowPtr pWin;
RegionPtr pObscured;
int dx, dy;
WindowPtr pWin;
RegionPtr pObscured;
int dx, dy;
{
miBSWindowPtr pBackingStore;
ScreenPtr pScreen;
......@@ -2899,14 +2899,14 @@ miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
*/
static RegionPtr
miBSRestoreAreas(pWin, prgnExposed)
register WindowPtr pWin;
WindowPtr pWin;
RegionPtr prgnExposed;
{
PixmapPtr pBackingPixmap;
miBSWindowPtr pBackingStore;
RegionPtr prgnSaved;
RegionPtr prgnRestored;
register ScreenPtr pScreen;
ScreenPtr pScreen;
RegionPtr exposures = prgnExposed;
pScreen = pWin->drawable.pScreen;
......@@ -3097,15 +3097,15 @@ miBSTranslateBackingStore(pWin, windx, windy, oldClip, oldx, oldy)
int oldx; /* old window position */
int oldy;
{
register miBSWindowPtr pBackingStore;
register RegionPtr pSavedRegion;
register RegionPtr newSaved, doomed;
register ScreenPtr pScreen;
BoxRec extents;
int scrdx; /* bit translation distance on screen */
int scrdy;
int dx; /* distance window moved on screen */
int dy;
miBSWindowPtr pBackingStore;
RegionPtr pSavedRegion;
RegionPtr newSaved, doomed;
ScreenPtr pScreen;
BoxRec extents;
int scrdx; /* bit translation distance on screen */
int scrdy;
int dx; /* distance window moved on screen */
int dy;
pScreen = pWin->drawable.pScreen;
pBackingStore = (miBSWindowPtr)(pWin->backStorage);
......@@ -3815,9 +3815,9 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
miBSWindowPtr pBackingStore;
CopyPlaneProcPtr copyProc;
GCPtr pScratchGC;
register BoxPtr pBox;
register int i;
register int dx, dy;
BoxPtr pBox;
int i;
int dx, dy;
BITS32 gcMask;
if (!REGION_NOTEMPTY(pGC->pScreen, prgnExposed))
......
......@@ -125,8 +125,8 @@ miResolveColor(unsigned short *pred, unsigned short *pgreen,
_X_EXPORT Bool
miInitializeColormap(ColormapPtr pmap)
{
register unsigned i;
register VisualPtr pVisual;
unsigned i;
VisualPtr pVisual;
unsigned lim, maxent, shift;
pVisual = pmap->pVisual;
......@@ -211,13 +211,13 @@ _X_EXPORT int
miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem *indefs,
xColorItem *outdefs)
{
register int red, green, blue;
int maxred, maxgreen, maxblue;
int stepred, stepgreen, stepblue;
VisualPtr pVisual;
register int pixel;
register int nresult;
register int i;
int red, green, blue;
int maxred, maxgreen, maxblue;
int stepred, stepgreen, stepblue;
VisualPtr pVisual;
int pixel;
int nresult;
int i;
pVisual = pmap->pVisual;
......
......@@ -130,15 +130,15 @@ exposing is done by the backing store's GraphicsExpose function, of course.
_X_EXPORT RegionPtr
miHandleExposures(pSrcDrawable, pDstDrawable,
pGC, srcx, srcy, width, height, dstx, dsty, plane)
register DrawablePtr pSrcDrawable;
register DrawablePtr pDstDrawable;
DrawablePtr pSrcDrawable;
DrawablePtr pDstDrawable;
GCPtr pGC;
int srcx, srcy;
int width, height;
int dstx, dsty;
unsigned long plane;
{
register ScreenPtr pscr;
ScreenPtr pscr;
RegionPtr prgnSrcClip; /* drawable-relative source clip */
RegionRec rgnSrcRec;
RegionPtr prgnDstClip; /* drawable-relative dest clip */
......@@ -387,9 +387,9 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
if (pRgn && !REGION_NIL(pRgn))
{
xEvent *pEvent;
register xEvent *pe;
register BoxPtr pBox;
register int i;
xEvent *pe;
BoxPtr pBox;
int i;
int numRects;
numRects = REGION_NUM_RECTS(pRgn);
......@@ -431,12 +431,12 @@ void
miSendExposures(pWin, pRgn, dx, dy)
WindowPtr pWin;
RegionPtr pRgn;
register int dx, dy;
int dx, dy;
{
register BoxPtr pBox;
BoxPtr pBox;
int numRects;
register xEvent *pEvent, *pe;
register int i;
xEvent *pEvent, *pe;
int i;
pBox = REGION_RECTS(pRgn);
numRects = REGION_NUM_RECTS(pRgn);
......@@ -493,7 +493,7 @@ miSendExposures(pWin, pRgn, dx, dy)
_X_EXPORT void
miWindowExposures(pWin, prgn, other_exposed)
WindowPtr pWin;
register RegionPtr prgn, other_exposed;
RegionPtr prgn, other_exposed;
{
RegionPtr exposures = prgn;
if (pWin->backStorage && prgn)
......@@ -629,7 +629,7 @@ tossGC (
_X_EXPORT void
miPaintWindow(pWin, prgn, what)
register WindowPtr pWin;
WindowPtr pWin;
RegionPtr prgn;
int what;
{
......@@ -657,10 +657,10 @@ int what;
BoxRec box;
WindowPtr pBgWin;
GCPtr pGC;
register int i;
register BoxPtr pbox;
register ScreenPtr pScreen = pWin->drawable.pScreen;
register xRectangle *prect;
int i;
BoxPtr pbox;
ScreenPtr pScreen = pWin->drawable.pScreen;
xRectangle *prect;
int numRects;
gcmask = 0;
......
......@@ -54,8 +54,8 @@ Author: Bob Scheifler, MIT X Consortium
_X_EXPORT void
miFillArcSetup(arc, info)
register xArc *arc;
register miFillArcRec *info;
xArc *arc;
miFillArcRec *info;
{
info->y = arc->height >> 1;
info->dy = arc->height & 1;
......@@ -109,8 +109,8 @@ miFillArcSetup(arc, info)
void
miFillArcDSetup(arc, info)
register xArc *arc;
register miFillArcDRec *info;
xArc *arc;
miFillArcDRec *info;
{
/* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */
/* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */
......@@ -141,13 +141,13 @@ miFillArcDSetup(arc, info)
static void
miGetArcEdge(
register xArc *arc,
register miSliceEdgePtr edge,
xArc *arc,
miSliceEdgePtr edge,
int k,
Bool top,
Bool left )
{
register int xady, y;
int xady, y;
y = arc->height >> 1;
if (!(arc->width & 1))
......@@ -271,13 +271,13 @@ miEllipseAngleToSlope (angle, width, height, dxp, dyp, d_dxp, d_dyp)
static void
miGetPieEdge(
register xArc *arc,
register int angle,
register miSliceEdgePtr edge,
xArc *arc,
int angle,
miSliceEdgePtr edge,
Bool top,
Bool left )
{
register int k;
int k;
int dx, dy;
miEllipseAngleToSlope (angle, arc->width, arc->height, &dx, &dy, 0, 0);
......@@ -316,11 +316,11 @@ miGetPieEdge(
_X_EXPORT void
miFillArcSliceSetup(arc, slice, pGC)
register xArc *arc;
register miArcSliceRec *slice;
xArc *arc;
miArcSliceRec *slice;
GCPtr pGC;
{
register int angle1, angle2;
int angle1, angle2;
angle1 = arc->angle1;
if (arc->angle2 < 0)
......@@ -550,14 +550,14 @@ miFillEllipseI(
GCPtr pGC,
xArc *arc )
{
register int x, y, e;
int x, y, e;
int yk, xk, ym, xm, dx, dy, xorg, yorg;
int slw;
miFillArcRec info;
DDXPointPtr points;
register DDXPointPtr pts;
DDXPointPtr pts;
int *widths;
register int *wids;
int *wids;
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
if (!points)
......@@ -593,14 +593,14 @@ miFillEllipseD(
GCPtr pGC,
xArc *arc )
{
register int x, y;
int x, y;
int xorg, yorg, dx, dy, slw;
double e, yk, xk, ym, xm;
miFillArcDRec info;
DDXPointPtr points;
register DDXPointPtr pts;
DDXPointPtr pts;
int *widths;
register int *wids;
int *wids;
points = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * arc->height);
if (!points)
......@@ -659,14 +659,14 @@ miFillArcSliceI(
xArc *arc )
{
int yk, xk, ym, xm, dx, dy, xorg, yorg, slw;
register int x, y, e;
int x, y, e;
miFillArcRec info;
miArcSliceRec slice;
int ya, xl, xr, xc;
DDXPointPtr points;
register DDXPointPtr pts;
DDXPointPtr pts;
int *widths;
register int *wids;
int *wids;
miFillArcSetup(arc, &info);
miFillArcSliceSetup(arc, &slice, pGC);
......@@ -721,16 +721,16 @@ miFillArcSliceD(
GCPtr pGC,
xArc *arc )
{
register int x, y;
int x, y;
int dx, dy, xorg, yorg, slw;
double e, yk, xk, ym, xm;
miFillArcDRec info;
miArcSliceRec slice;
int ya, xl, xr, xc;
DDXPointPtr points;
register DDXPointPtr pts;
DDXPointPtr pts;
int *widths;
register int *wids;
int *wids;
miFillArcDSetup(arc, &info);
miFillArcSliceSetup(arc, &slice, pGC);
......@@ -790,8 +790,8 @@ miPolyFillArc(pDraw, pGC, narcs, parcs)
int narcs;
xArc *parcs;
{
register int i;
register xArc *arc;
int i;
xArc *arc;
for(i = narcs, arc = parcs; --i >= 0; arc++)
{
......
......@@ -74,16 +74,16 @@ miPolyFillRect(pDrawable, pGC, nrectFill, prectInit)
xRectangle *prectInit; /* Pointer to first rectangle to fill */
{
int i;
register int height;
register int width;
register xRectangle *prect;
int xorg;
register int yorg;
int maxheight;
DDXPointPtr pptFirst;
register DDXPointPtr ppt;
int *pwFirst;
register int *pw;
int height;
int width;
xRectangle *prect;
int xorg;
int yorg;
int maxheight;
DDXPointPtr pptFirst;
DDXPointPtr ppt;
int *pwFirst;
int *pw;
if (pGC->miTranslate)
{
......
......@@ -55,7 +55,7 @@ SOFTWARE.
#include "pixmapstr.h"
#include "mifpoly.h"
static int GetFPolyYBounds(register SppPointPtr pts, int n, double yFtrans,
static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans,
int *by, int *ty);
#ifdef ICEILTEMPDECL
......@@ -101,7 +101,7 @@ miFillSppPoly(dst, pgc, count, ptsIn, xTrans, yTrans, xFtrans, yFtrans)
*width,
*FirstWidth, /* output buffer */
*Marked; /* set if this vertex has been used */
register int left, right, /* indices to first endpoints */
int left, right, /* indices to first endpoints */
nextleft,
nextright; /* indices to second endpoints */
DDXPointPtr ptsOut,
......@@ -251,13 +251,13 @@ miFillSppPoly(dst, pgc, count, ptsIn, xTrans, yTrans, xFtrans, yFtrans)
static
int
GetFPolyYBounds(
register SppPointPtr pts,
SppPointPtr pts,
int n,
double yFtrans,
int *by,
int *ty)
{
register SppPointPtr ptMin;
SppPointPtr ptMin;
double ymin, ymax;
SppPointPtr ptsStart = pts;
......
......@@ -92,18 +92,18 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
{
int width, height;
PixmapPtr pPixmap;
int nbyLine; /* bytes per line of padded pixmap */
int nbyLine; /* bytes per line of padded pixmap */
FontPtr pfont;
GCPtr pGCtmp;
register int i;
register int j;
unsigned char *pbits; /* buffer for PutImage */
register unsigned char *pb; /* temp pointer into buffer */
register CharInfoPtr pci; /* currect char info */
register unsigned char *pglyph; /* pointer bits in glyph */
int gWidth, gHeight; /* width and height of glyph */
register int nbyGlyphWidth; /* bytes per scanline of glyph */
int nbyPadGlyph; /* server padded line of glyph */
int i;
int j;
unsigned char *pbits; /* buffer for PutImage */
unsigned char *pb; /* temp pointer into buffer */
CharInfoPtr pci; /* currect char info */
unsigned char *pglyph; /* pointer bits in glyph */
int gWidth, gHeight; /* width and height of glyph */
int nbyGlyphWidth; /* bytes per scanline of glyph */
int nbyPadGlyph; /* server padded line of glyph */
XID gcvals[3];
......
......@@ -109,7 +109,7 @@ extern void miSetZeroLineBias(
}
#define SWAPINT(i, j) \
{ register int _t = i; i = j; j = _t; }
{ int _t = i; i = j; j = _t; }
#define SWAPPT(i, j) \
{ DDXPointRec _t; _t = i; i = j; j = _t; }
......
......@@ -1019,7 +1019,7 @@ miOverlayMoveWindow(
static void
miOverlayWindowExposures(
WindowPtr pWin,
register RegionPtr prgn,
RegionPtr prgn,
RegionPtr other_exposed
){
RegionPtr exposures = prgn;
......@@ -1106,7 +1106,7 @@ miOverlayRecomputeExposures (
WindowPtr pWin,
pointer value
){
register ScreenPtr pScreen;
ScreenPtr pScreen;
miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value;
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
......@@ -1161,10 +1161,10 @@ miOverlayResizeWindow(
DDXPointRec oldpt;
RegionPtr oldRegion = NULL, oldRegion2 = NULL;
WindowPtr pFirstChange;
register WindowPtr pChild;
WindowPtr pChild;
RegionPtr gravitate[StaticGravity + 1];
RegionPtr gravitate2