zap trailing whitespace and tabs

This commit is contained in:
purplerain 2023-12-13 04:57:51 +00:00
parent 9c49429a7e
commit deeab190c1
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
76 changed files with 382 additions and 378 deletions

0
app/xlockmore/etc/xlockmore.desktop Normal file → Executable file
View file

View file

@ -196,7 +196,7 @@ ScaleClassRec scaleClassRec = {
WidgetClass scaleWidgetClass = (WidgetClass) &scaleClassRec; WidgetClass scaleWidgetClass = (WidgetClass) &scaleClassRec;
/* /*
* Private Procedures * Private Procedures
@ -208,7 +208,7 @@ ClassInitialize(void)
{ {
} }
static void static void
GetGC(ScaleWidget sw) GetGC(ScaleWidget sw)
@ -226,7 +226,7 @@ GetGC(ScaleWidget sw)
&values); &values);
} }
static void static void
@ -244,7 +244,7 @@ GetInitialScaleValues(ScaleWidget sw)
sw->scale.scale_x = sw->scale.scale_y = 1.0; sw->scale.scale_x = sw->scale.scale_y = 1.0;
} }
static void static void
GetRectangleBuffer(ScaleWidget sw, Cardinal buffer_size) GetRectangleBuffer(ScaleWidget sw, Cardinal buffer_size)
@ -264,7 +264,7 @@ GetRectangleBuffer(ScaleWidget sw, Cardinal buffer_size)
sw->scale.buffer_size = buffer_size; sw->scale.buffer_size = buffer_size;
} }
/* ARGSUSED */ /* ARGSUSED */
static void static void
@ -335,7 +335,7 @@ Initialize(Widget request, Widget new, ArgList args, Cardinal *num_args)
} }
} }
static void static void
BuildTable(ScaleWidget sw) BuildTable(ScaleWidget sw)
@ -372,7 +372,7 @@ BuildTable(ScaleWidget sw)
} }
} }
static void static void
FlushRectangles(ScaleWidget sw, Drawable drawable, GC gc) FlushRectangles(ScaleWidget sw, Drawable drawable, GC gc)
@ -383,7 +383,7 @@ FlushRectangles(ScaleWidget sw, Drawable drawable, GC gc)
sw->scale.nrectangles = 0; sw->scale.nrectangles = 0;
} }
static void static void
FillRectangle(ScaleWidget sw, Drawable drawable, GC gc, FillRectangle(ScaleWidget sw, Drawable drawable, GC gc,
@ -401,7 +401,7 @@ FillRectangle(ScaleWidget sw, Drawable drawable, GC gc,
++sw->scale.nrectangles; ++sw->scale.nrectangles;
} }
static void static void
ScaleImage(ScaleWidget sw, Drawable drawable, Position img_x, Position img_y, ScaleImage(ScaleWidget sw, Drawable drawable, Position img_x, Position img_y,
@ -488,7 +488,7 @@ ScaleImage(ScaleWidget sw, Drawable drawable, Position img_x, Position img_y,
} }
} }
static int static int
FindPixel(ScaleWidget sw, Position x, Position y, FindPixel(ScaleWidget sw, Position x, Position y,
@ -524,7 +524,7 @@ FindPixel(ScaleWidget sw, Position x, Position y,
return (0); return (0);
} }
int int
SWGetImagePixel(Widget w, Position x, Position y, SWGetImagePixel(Widget w, Position x, Position y,
@ -541,7 +541,7 @@ SWGetImagePixel(Widget w, Position x, Position y,
return FindPixel(sw, x, y, img_x, img_y, img_pixel); return FindPixel(sw, x, y, img_x, img_y, img_pixel);
} }
/* ARGSUSED */ /* ARGSUSED */
static void static void
@ -594,7 +594,7 @@ Redisplay(Widget w, XEvent *event, Region region)
} }
} }
static void static void
TryResize(ScaleWidget sw) TryResize(ScaleWidget sw)
@ -619,7 +619,7 @@ TryResize(ScaleWidget sw)
} }
} }
static void static void
Precision(ScaleWidget sw) Precision(ScaleWidget sw)
@ -633,7 +633,7 @@ Precision(ScaleWidget sw)
* sw->scale.precision; * sw->scale.precision;
} }
static void static void
Proportional(ScaleWidget sw) Proportional(ScaleWidget sw)
@ -670,7 +670,7 @@ Proportional(ScaleWidget sw)
XtWarning("can not preserve aspect ratio"); XtWarning("can not preserve aspect ratio");
} }
static void static void
GetScaledSize(ScaleWidget sw) GetScaledSize(ScaleWidget sw)
@ -681,7 +681,7 @@ GetScaledSize(ScaleWidget sw)
max(myrint(sw->scale.scale_y * sw->scale.image->height), 1); max(myrint(sw->scale.scale_y * sw->scale.image->height), 1);
} }
static void static void
GetScaleValues(ScaleWidget sw) GetScaleValues(ScaleWidget sw)
@ -699,7 +699,7 @@ GetScaleValues(ScaleWidget sw)
/ (float) sw->scale.image->height; / (float) sw->scale.image->height;
} }
static void static void
Unscale(ScaleWidget sw) Unscale(ScaleWidget sw)
@ -711,7 +711,7 @@ Unscale(ScaleWidget sw)
BuildTable(sw); BuildTable(sw);
} }
static void static void
Autoscale(ScaleWidget sw) Autoscale(ScaleWidget sw)
@ -727,7 +727,7 @@ Autoscale(ScaleWidget sw)
BuildTable(sw); BuildTable(sw);
} }
static void static void
PositionImage(ScaleWidget sw) PositionImage(ScaleWidget sw)
@ -752,7 +752,7 @@ PositionImage(ScaleWidget sw)
*****/ *****/
} }
static void static void
Resize(Widget w) Resize(Widget w)
@ -764,7 +764,7 @@ Resize(Widget w)
PositionImage(sw); PositionImage(sw);
} }
static void static void
Realize(Widget wid, Mask *vmask, XSetWindowAttributes *attr) Realize(Widget wid, Mask *vmask, XSetWindowAttributes *attr)
@ -774,7 +774,7 @@ Realize(Widget wid, Mask *vmask, XSetWindowAttributes *attr)
(Visual *) sw->scale.visual, *vmask, attr); (Visual *) sw->scale.visual, *vmask, attr);
} }
static void static void
Destroy(Widget w) Destroy(Widget w)
@ -793,7 +793,7 @@ Destroy(Widget w)
XDestroyImage(sw->scale.image); XDestroyImage(sw->scale.image);
} }
/* ARGSUSED */ /* ARGSUSED */
static Boolean static Boolean
@ -938,7 +938,7 @@ SetValues(Widget current, Widget request, Widget new,
return(redisplay); return(redisplay);
} }
void void
SWUnscale(Widget w, XEvent *event, String *params, Cardinal *num_params) SWUnscale(Widget w, XEvent *event, String *params, Cardinal *num_params)
@ -950,7 +950,7 @@ SWUnscale(Widget w, XEvent *event, String *params, Cardinal *num_params)
XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True); XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True);
} }
void void
SWAutoscale(Widget w, XEvent *event, String *params, Cardinal *num_params) SWAutoscale(Widget w, XEvent *event, String *params, Cardinal *num_params)
@ -962,7 +962,7 @@ SWAutoscale(Widget w, XEvent *event, String *params, Cardinal *num_params)
XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True); XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True);
} }
void void
SWInitialSize(Widget w, XEvent *event, String *params, Cardinal *num_params) SWInitialSize(Widget w, XEvent *event, String *params, Cardinal *num_params)
@ -981,7 +981,7 @@ SWInitialSize(Widget w, XEvent *event, String *params, Cardinal *num_params)
XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True); XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True);
} }
void void
SWSetImage(Widget w, XImage *image) SWSetImage(Widget w, XImage *image)
@ -994,7 +994,7 @@ SWSetImage(Widget w, XImage *image)
XtSetValues(w, wargs, n); XtSetValues(w, wargs, n);
} }
void void
@ -1003,7 +1003,7 @@ RequestSelection(Widget w, XEvent *event, String *params, Cardinal *num_params)
SWRequestSelection(w, event->xbutton.time); SWRequestSelection(w, event->xbutton.time);
} }
void void
GrabSelection(Widget w, XEvent *event, String *params, Cardinal *num_params) GrabSelection(Widget w, XEvent *event, String *params, Cardinal *num_params)
@ -1011,7 +1011,7 @@ GrabSelection(Widget w, XEvent *event, String *params, Cardinal *num_params)
SWGrabSelection(w, event->xbutton.time); SWGrabSelection(w, event->xbutton.time);
} }
Pixmap Pixmap
SWGetPixmap(Widget w) SWGetPixmap(Widget w)

View file

@ -56,7 +56,7 @@ from The Open Group.
#define max(a, b) ((a) > (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
#endif #endif
/* highlight interval (in milliseconds) */ /* highlight interval (in milliseconds) */
#define HLINTERVAL 100 #define HLINTERVAL 100
@ -101,7 +101,7 @@ typedef struct {
Widget scaleShell, scaleInstance, pixShell, pixLabel, cmapWinList [2]; Widget scaleShell, scaleInstance, pixShell, pixLabel, cmapWinList [2];
} hlStruct, *hlPtr; } hlStruct, *hlPtr;
/* global variables */ /* global variables */
static XtAppContext app; static XtAppContext app;
@ -179,7 +179,7 @@ static XrmOptionDescRec optionDesc[] = {
{"-title", "*title", XrmoptionSepArg, (XtPointer)NULL}, {"-title", "*title", XrmoptionSepArg, (XtPointer)NULL},
}; };
/* action table */ /* action table */
@ -195,7 +195,7 @@ static XtActionsRec actions_table[] = {
{"select-region", SelectRegionAP} {"select-region", SelectRegionAP}
}; };
/* /*
* Error() -- Error handler: Catch a bad match in magnifying an * Error() -- Error handler: Catch a bad match in magnifying an
@ -228,7 +228,7 @@ CloseAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
XtDestroyWidget(w); XtDestroyWidget(w);
} }
/* /*
* SetCmapPropsAP() -- Put the scale widget first in WM_COLORMAP_WINDOWS * SetCmapPropsAP() -- Put the scale widget first in WM_COLORMAP_WINDOWS
@ -248,7 +248,7 @@ SetCmapPropsAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
} }
} }
/* /*
* UnsetCmapPropsAP() -- Put the shell first in WM_COLORMAP_WINDOWS * UnsetCmapPropsAP() -- Put the shell first in WM_COLORMAP_WINDOWS
@ -268,7 +268,7 @@ UnsetCmapPropsAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
} }
} }
/* /*
* NewAP() -- Create an additional xmag dialog. THIS IS A COPY OF NewEH * NewAP() -- Create an additional xmag dialog. THIS IS A COPY OF NewEH
@ -280,7 +280,7 @@ NewAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
StartRootPtrGrab(True, NULL); StartRootPtrGrab(True, NULL);
} }
/* /*
* ReplaceAP() -- Replace this particular xmag dialog. * ReplaceAP() -- Replace this particular xmag dialog.
@ -295,7 +295,7 @@ ReplaceAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
StartRootPtrGrab(False, data); StartRootPtrGrab(False, data);
} }
/* /*
* PopupPixelAP() -- Show pixel information. * PopupPixelAP() -- Show pixel information.
@ -343,7 +343,7 @@ PopupPixelAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
UpdatePixelAP(w, event, NULL, NULL); UpdatePixelAP(w, event, NULL, NULL);
} }
/* /*
* UpdatePixelAP() -- Update pixel information. * UpdatePixelAP() -- Update pixel information.
@ -379,7 +379,7 @@ UpdatePixelAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
} }
} }
/* /*
* PopdownPixelAP() -- Remove pixel info. * PopdownPixelAP() -- Remove pixel info.
@ -399,7 +399,7 @@ PopdownPixelAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
XtPopdown(data->pixShell); XtPopdown(data->pixShell);
} }
static void /* ARGSUSED */ static void /* ARGSUSED */
SelectRegionAP(Widget w, XEvent *event, String *params, Cardinal *num_params) SelectRegionAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
@ -419,7 +419,7 @@ SelectRegionAP(Widget w, XEvent *event, String *params, Cardinal *num_params)
******/ ******/
} }
/* /*
* CheckPoints() -- Change the cursor for the correct quadrant. * CheckPoints() -- Change the cursor for the correct quadrant.
@ -445,7 +445,7 @@ CheckPoints(Position *x1, Position *x2, Position *y1, Position *y2)
if (*y2 < *y1) { tmp = *y1; *y1 = *y2; *y2 = tmp; } if (*y2 < *y1) { tmp = *y1; *y1 = *y2; *y2 = tmp; }
} }
/* /*
* HighlightTO() -- Timer to highlight the selection box * HighlightTO() -- Timer to highlight the selection box
@ -481,7 +481,7 @@ HighlightTO(XtPointer closure, XtIntervalId *id) /* ARGSUSED */
XtAppAddTimeOut(app, HLINTERVAL, HighlightTO, (XtPointer)data); XtAppAddTimeOut(app, HLINTERVAL, HighlightTO, (XtPointer)data);
} }
/* /*
* CloseCB() -- Delete this xmag dialog. If its the only one on the screen * CloseCB() -- Delete this xmag dialog. If its the only one on the screen
@ -496,7 +496,7 @@ CloseCB(Widget w, XtPointer clientData, XtPointer callData)
XtDestroyWidget(shell); XtDestroyWidget(shell);
} }
/* /*
* ReplaceCB() -- Replace this particular xmag dialog. * ReplaceCB() -- Replace this particular xmag dialog.
@ -508,7 +508,7 @@ ReplaceCB(Widget w, XtPointer clientData, XtPointer callData)
StartRootPtrGrab(False, data); StartRootPtrGrab(False, data);
} }
/* /*
* NewCB() -- Create an additional xmag dialog. * NewCB() -- Create an additional xmag dialog.
@ -519,7 +519,7 @@ NewCB(Widget w, XtPointer clientData, XtPointer callData)
StartRootPtrGrab(True, NULL); StartRootPtrGrab(True, NULL);
} }
/* /*
* SelectCB() -- Own the primary selection. * SelectCB() -- Own the primary selection.
@ -531,7 +531,7 @@ SelectCB(Widget w, XtPointer clientData, XtPointer callData)
SWGrabSelection(data->scaleInstance, XtLastTimestampProcessed(dpy)); SWGrabSelection(data->scaleInstance, XtLastTimestampProcessed(dpy));
} }
/* /*
* PasteCB() -- Paste from the primary selection into xmag. * PasteCB() -- Paste from the primary selection into xmag.
@ -543,7 +543,7 @@ PasteCB(Widget w, XtPointer clientData, XtPointer callData)
SWRequestSelection(data->scaleInstance, XtLastTimestampProcessed(dpy)); SWRequestSelection(data->scaleInstance, XtLastTimestampProcessed(dpy));
} }
/* /*
* SetupGC() -- Graphics context for magnification selection. * SetupGC() -- Graphics context for magnification selection.
@ -558,7 +558,7 @@ SetupGC(void)
&selectGCV); &selectGCV);
} }
/* /*
* FindWindow() -- Determine window the pointer is over. * FindWindow() -- Determine window the pointer is over.
@ -589,7 +589,7 @@ FindWindow(int x, int y) /* Location of cursor */
return findW; return findW;
} }
/* /*
* ResizeEH() -- Event Handler for resize of selection box. * ResizeEH() -- Event Handler for resize of selection box.
@ -628,7 +628,7 @@ ResizeEH(Widget w, XtPointer closure, XEvent *event,
} }
} }
/* /*
* DragEH() -- Event Handler for dragging selection box. * DragEH() -- Event Handler for dragging selection box.
@ -689,7 +689,7 @@ DragEH(Widget w, XtPointer closure, XEvent *event,
} }
/* /*
* StartRootPtrGrab() -- Bring up the selection box. * StartRootPtrGrab() -- Bring up the selection box.
@ -727,7 +727,7 @@ StartRootPtrGrab(int new, /* do we create a new scale instance? */
(void) XtAppAddTimeOut(app, HLINTERVAL, HighlightTO, (XtPointer)hlData); (void) XtAppAddTimeOut(app, HLINTERVAL, HighlightTO, (XtPointer)hlData);
} }
/* /*
* CreateRoot() -- Create a root window widget. If the user specified x and y * CreateRoot() -- Create a root window widget. If the user specified x and y
@ -837,7 +837,7 @@ GetImageAndAttributes(Window w, int x, int y, int width, int height,
} }
} }
/* /*
* Get_XColors() Get the XColors of all pixels in image - returns # of colors * Get_XColors() Get the XColors of all pixels in image - returns # of colors
@ -889,7 +889,7 @@ Get_XColors(XWindowAttributes *win_info, XColor **colors)
return(ncolors); return(ncolors);
} }
#define Intensity(cptr) (3.0*cptr->red+0.59*cptr->green+0.11*cptr->blue) #define Intensity(cptr) (3.0*cptr->red+0.59*cptr->green+0.11*cptr->blue)
@ -943,7 +943,7 @@ GetMinIntensity(hlPtr data)
return BlackPixel(dpy, scr); return BlackPixel(dpy, scr);
} }
static Widget pane1, pane2, pane3, cclose, replace, new, select_w, paste; static Widget pane1, pane2, pane3, cclose, replace, new, select_w, paste;
@ -1027,7 +1027,7 @@ PopupNewScale(hlPtr data)
} }
} }
/* /*
* RedoOldScale() -- If the visual, depth, or colormap has changed, unrealize * RedoOldScale() -- If the visual, depth, or colormap has changed, unrealize
@ -1071,7 +1071,7 @@ RedoOldScale(hlPtr data)
XtManageChild(data->scaleInstance); XtManageChild(data->scaleInstance);
} }
/* /*
* InitCursors() -- Create our cursors for area selection. * InitCursors() -- Create our cursors for area selection.
@ -1085,7 +1085,7 @@ InitCursors(void)
llAngle = XCreateFontCursor(dpy, XC_ll_angle); llAngle = XCreateFontCursor(dpy, XC_ll_angle);
} }
/* /*
* ParseSourceGeom() -- Determine dimensions of area to magnify from resources. * ParseSourceGeom() -- Determine dimensions of area to magnify from resources.
@ -1103,7 +1103,7 @@ ParseSourceGeom(void)
/* mag */ /* mag */
} }
/* /*
* Main program. * Main program.

0
app/xterm/uxterm.desktop Normal file → Executable file
View file

0
app/xterm/xterm.desktop Normal file → Executable file
View file

View file

@ -373,7 +373,11 @@ CopyPropFwdVisitor::visit(AluInstr *instr)
auto ii = dest->uses().begin(); auto ii = dest->uses().begin();
auto ie = dest->uses().end(); auto ie = dest->uses().end();
while(ii != ie) { /** libc++ seems to invalidate the end iterator too if a std::set is
* made empty by an erase operation,
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/7931
*/
while(ii != ie && !dest->uses().empty()) {
auto i = *ii; auto i = *ii;
++ii; ++ii;
/* SSA can always be propagated, registers only in the same block /* SSA can always be propagated, registers only in the same block