diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-13 15:09:08 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-13 15:09:08 -0700 |
commit | 688bebb13c9a82983f544ff415440321a721fd53 (patch) | |
tree | 4f3c6fd7bf799cfbae74fc9a53ceca07c7a34fe3 /do_blt.c | |
parent | 95ff3954dea7deb1cc995c09c404ebb22b6f18a0 (diff) |
Strip trailing whitespace from source files
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'do_blt.c')
-rw-r--r-- | do_blt.c | 86 |
1 files changed, 43 insertions, 43 deletions
@@ -3,13 +3,13 @@ Copyright 1988, 1989 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -34,7 +34,7 @@ static XSegment *segsa2, *segsb2; #define NegMod(x, y) ((y) - (((-x)-1) % (7)) - 1) -static void +static void InitBltLines(void) { int x, y; @@ -49,7 +49,7 @@ InitBltLines(void) y += HEIGHT / (NUMPOINTS/2); points[i].y = y; } - + x = 0; for (int i = NUMPOINTS/2; i!= NUMPOINTS; i++) { if (i & 1) { @@ -62,7 +62,7 @@ InitBltLines(void) } } -int +int InitScroll(XParms xp, Parms p, int64_t reps) { InitBltLines(); @@ -70,7 +70,7 @@ InitScroll(XParms xp, Parms p, int64_t reps) return reps; } -void +void DoScroll(XParms xp, Parms p, int64_t reps) { int size, x, y, xorg, yorg, delta; @@ -111,20 +111,20 @@ DoScroll(XParms xp, Parms p, int64_t reps) } } -void +void MidScroll(XParms xp, Parms p) { XClearWindow(xp->d, xp->w); XDrawLines(xp->d, xp->w, xp->fggc, points, NUMPOINTS, CoordModeOrigin); } -void +void EndScroll(XParms xp, Parms p) { } -static void -InitCopyLocations(int size, int mul, int div, +static void +InitCopyLocations(int size, int mul, int div, int64_t reps, XSegment **ap, XSegment **bp) { int x1, y1, x2, y2; @@ -143,12 +143,12 @@ InitCopyLocations(int size, int mul, int div, width = (WIDTH - size) & ~31; height = (HEIGHT - size) & ~31; - + x1 = 0; y1 = 0; x2 = width; y2 = height; - + *ap = a = malloc(reps * sizeof(XSegment)); *bp = b = malloc(reps * sizeof(XSegment)); for (int i = 0; i != reps; i++) { @@ -185,7 +185,7 @@ InitCopyLocations(int size, int mul, int div, } -int +int InitCopyWin(XParms xp, Parms p, int64_t reps) { (void) InitScroll(xp, p, reps); @@ -193,7 +193,7 @@ InitCopyWin(XParms xp, Parms p, int64_t reps) return reps; } -int +int InitCopyPix(XParms xp, Parms p, int64_t reps) { GC pixgc; @@ -208,7 +208,7 @@ InitCopyPix(XParms xp, Parms p, int64_t reps) return reps; } -int +int InitGetImage(XParms xp, Parms p, int64_t reps) { (void) InitCopyWin(xp, p, reps); @@ -219,11 +219,11 @@ InitGetImage(XParms xp, Parms p, int64_t reps) if(image==NULL){ printf("XGetImage failed\n"); return False; - } + } return reps; } -int +int InitPutImage(XParms xp, Parms p, int64_t reps) { if(!InitGetImage(xp, p, reps))return False; @@ -231,7 +231,7 @@ InitPutImage(XParms xp, Parms p, int64_t reps) return reps; } -static void +static void CopyArea(XParms xp, Parms p, int64_t reps, Drawable src, Drawable dst) { int i, size; @@ -251,33 +251,33 @@ CopyArea(XParms xp, Parms p, int64_t reps, Drawable src, Drawable dst) } } -void +void DoCopyWinWin(XParms xp, Parms p, int64_t reps) { CopyArea(xp, p, reps, xp->w, xp->w); } -void +void DoCopyPixWin(XParms xp, Parms p, int64_t reps) { CopyArea(xp, p, reps, pix, xp->w); } -void +void DoCopyWinPix(XParms xp, Parms p, int64_t reps) { CopyArea(xp, p, reps, xp->w, pix); xp->p = pix; /* HardwareSync will now sync on pixmap */ } -void +void DoCopyPixPix(XParms xp, Parms p, int64_t reps) { CopyArea(xp, p, reps, pix, pix); xp->p = pix; /* HardwareSync will now sync on pixmap */ } -void +void DoGetImage(XParms xp, Parms p, int64_t reps) { int i, size; @@ -318,7 +318,7 @@ rectangle. } } -void +void DoPutImage(XParms xp, Parms p, int64_t reps) { int i, size; @@ -356,14 +356,14 @@ static XShmSegmentInfo shm_info; static int haderror; static int (*origerrorhandler)(Display *, XErrorEvent *); -static int +static int shmerrorhandler(Display *d, XErrorEvent *e) { haderror++; if(e->error_code==BadAccess) { fprintf(stderr,"failed to attach shared memory\n"); return 0; - } else + } else return (*origerrorhandler)(d,e); } @@ -384,7 +384,7 @@ InitShmImage(XParms xp, Parms p, int64_t reps, Bool read_only) free(segsa); free(segsb); return False; - } + } shm_image = *image; image_size = image->bytes_per_line * image->height; /* allow XYPixmap choice: */ @@ -463,7 +463,7 @@ InitShmGetImage(XParms xp, Parms p, int64_t reps) return InitShmImage(xp, p, reps, False); } -void +void DoShmPutImage(XParms xp, Parms p, int64_t reps) { int i, size; @@ -530,13 +530,13 @@ EndShmPutImage(XParms xp, Parms p) #endif -void +void MidCopyPix(XParms xp, Parms p) { XClearWindow(xp->d, xp->w); } -void +void EndCopyWin(XParms xp, Parms p) { EndScroll(xp, p); @@ -549,7 +549,7 @@ EndCopyWin(XParms xp, Parms p) segsa = segsb = segsa2 = segsb2 = NULL; } -void +void EndCopyPix(XParms xp, Parms p) { EndCopyWin(xp, p); @@ -560,7 +560,7 @@ EndCopyPix(XParms xp, Parms p) xp->p = (Pixmap)0; } -void +void EndGetImage(XParms xp, Parms p) { EndCopyWin(xp, p); @@ -577,12 +577,12 @@ InitCopyPlane(XParms xp, Parms p, int64_t reps) InitCopyLocations(p->special, 1, 1, reps, &segsa, &segsb); /* Create pixmap to write stuff into, and initialize it */ - pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, + pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, p->font==NULL ? 1 : xp->vinfo.depth); gcv.graphics_exposures = False; gcv.foreground = 0; gcv.background = 1; - pixgc = XCreateGC(xp->d, pix, + pixgc = XCreateGC(xp->d, pix, GCForeground | GCBackground | GCGraphicsExposures, &gcv); XFillRectangle(xp->d, pix, pixgc, 0, 0, WIDTH, HEIGHT); gcv.foreground = 1; @@ -594,7 +594,7 @@ InitCopyPlane(XParms xp, Parms p, int64_t reps) return reps; } -void +void DoCopyPlane(XParms xp, Parms p, int64_t reps) { int i, size; @@ -643,7 +643,7 @@ InitCompositePix(XParms xp, Parms p, int64_t reps) static XRenderColor c = { 0xffff, 0x0000, 0xffff, 0xffff }; (void) InitCompositeWin (xp, p, reps); - + /* Create pixmap to write stuff into, and initialize it */ switch (xp->planemask) { case PictStandardNative: @@ -671,14 +671,14 @@ InitCompositePix(XParms xp, Parms p, int64_t reps) } if (!format) format = XRenderFindStandardFormat (xp->d, xp->planemask); - + pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, depth); pixPict = XRenderCreatePicture (xp->d, pix, format, 0, NULL); - + XRenderComposite (xp->d, PictOpClear, winPict, None, pixPict, 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT); - + XRenderFillRectangle (xp->d, PictOpSrc, pixPict, &c, 0, 0, WIDTH, HEIGHT); #if 1 @@ -713,13 +713,13 @@ EndCompositeWin (XParms xp, Parms p) } } -static void +static void CompositeArea(XParms xp, Parms p, int64_t reps, Picture src, Picture dst) { int size; XSegment *sa, *sb; XSegment *sa2, *sb2; - + size = p->special; sa = segsa; |