Commit 9e9ba124 authored by Alan Coopersmith's avatar Alan Coopersmith

Strip trailing whitespace

Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
parent b1def388
......@@ -74,10 +74,10 @@ static XtResource resources[] = {
#undef goffset
static void ClassInitialize ( void );
static void Initialize ( Widget greq, Widget gnew, ArgList args,
static void Initialize ( Widget greq, Widget gnew, ArgList args,
Cardinal *num_args );
static void Resize ( Widget widget );
static void Realize ( Widget gw, XtValueMask *valueMask,
static void Realize ( Widget gw, XtValueMask *valueMask,
XSetWindowAttributes *attrs );
static void Destroy ( Widget gw );
static void Redisplay ( Widget gw, XEvent *event, Region region );
......@@ -163,7 +163,7 @@ static void Initialize (Widget greq, Widget gnew,
myXGCV.foreground = w->clock.jewel;
w->clock.jewelGC = XtGetGC(gnew, valuemask, &myXGCV);
myXGCV.foreground = w->core.background_pixel;
w->clock.eraseGC = XtGetGC(gnew, valuemask, &myXGCV);
}
......@@ -171,8 +171,8 @@ static void Initialize (Widget greq, Widget gnew,
/* wait for Realize to add the timeout */
w->clock.interval_id = 0;
if (w->clock.shape_window && !XShapeQueryExtension (XtDisplay (w),
&shape_event_base,
if (w->clock.shape_window && !XShapeQueryExtension (XtDisplay (w),
&shape_event_base,
&shape_error_base))
w->clock.shape_window = False;
w->clock.shape_mask = 0;
......@@ -219,7 +219,7 @@ static void Resize (Widget widget)
w->core.height - face_height, face_height,
-WINDOW_WIDTH(w)/2, WINDOW_WIDTH(w)/2,
-WINDOW_HEIGHT(w)/2, WINDOW_HEIGHT(w)/2);
/*
* allocate a pixmap to draw shapes in
*/
......@@ -231,7 +231,7 @@ static void Resize (Widget widget)
XFreePixmap (XtDisplay (w), w->clock.shape_mask);
w->clock.shape_mask = None;
}
if (!w->clock.shape_mask)
{
w->clock.shape_mask = XCreatePixmap (XtDisplay (w), XtWindow (w),
......@@ -314,7 +314,7 @@ static void Resize (Widget widget)
0, 360 * 64);
}
XShapeCombineMask (XtDisplay (w), XtWindow (w), ShapeClip,
XShapeCombineMask (XtDisplay (w), XtWindow (w), ShapeClip,
0, 0, shape_mask, ShapeSet);
} else
......@@ -333,7 +333,7 @@ static void Resize (Widget widget)
XConfigureWindow (XtDisplay (w), XtWindow (w),
CWWidth|CWHeight|CWBorderWidth,
&xwc);
SetTransform (&w->clock.t,
0, xwc.width,
xwc.height, 0,
......@@ -421,7 +421,7 @@ static void new_time (XtPointer client_data, XtIntervalId *id)
ClockWidget w = (ClockWidget)client_data;
Time_t now;
struct tm *tm;
if (!w->clock.transparent)
if (w->clock.polys_valid) {
paint_hands (w, XtWindow (w), w->clock.eraseGC, w->clock.eraseGC);
......@@ -440,7 +440,7 @@ static void new_time (XtPointer client_data, XtIntervalId *id)
* take a while and we'd like the clock to keep up
* with time changes.
*/
w->clock.interval_id =
w->clock.interval_id =
XtAppAddTimeOut (XtWidgetToApplicationContext((Widget) w),
(60 - tm->tm_sec) * 1000, new_time, client_data);
compute_hands (w);
......@@ -525,7 +525,7 @@ compute_hand (ClockWidget w, double a, double l, double width,
c = cos(a);
s = sin(a);
poly[0].x = c * l;
poly[0].x = c * l;
poly[0].y = s * l;
poly[1].x = (l - width) * c - s * width;
poly[1].y = (l - width) * s + c * width;
......
......@@ -88,7 +88,7 @@ extern ClockClassRec clockClassRec;
extern void paint_jewel ( ClockWidget w, Drawable d, GC gc );
extern int check_jewel_poly ( ClockWidget w, TPoint poly[6] );
extern void check_jewel ( ClockWidget w, Drawable d, GC gc );
extern void compute_hand ( ClockWidget w, double a, double l, double width,
extern void compute_hand ( ClockWidget w, double a, double l, double width,
TPoint poly[6] );
extern void compute_hands ( ClockWidget w );
extern void paint_hand ( ClockWidget w, Drawable d, GC gc, TPoint poly[6] );
......
#
#
# Copyright 2005 Red Hat, Inc.
#
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
......@@ -10,7 +10,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
......
dnl Copyright 2005 Red Hat, Inc.
dnl
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
......@@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
dnl specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any purpose. It
dnl is provided "as is" without express or implied warranty.
dnl
dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
......
......@@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Shell.h>
#include <X11/Xmu/Editres.h>
#include "Clock.h"
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef XKB
......@@ -44,7 +44,7 @@ in this Software without prior written authorization from The Open Group.
static void die ( Widget w, XtPointer client_data, XtPointer call_data );
static void save ( Widget w, XtPointer client_data, XtPointer call_data );
static void usage ( void );
static void quit ( Widget w, XEvent *event, String *params,
static void quit ( Widget w, XEvent *event, String *params,
Cardinal *num_params );
......@@ -96,14 +96,14 @@ static XrmOptionDescRec options[] = {
{"-transparent","*clock.transparent", XrmoptionNoArg, "TRUE"},
};
int
int
main(int argc, char *argv[])
{
XtAppContext xtcontext;
Widget toplevel;
Arg arg[2];
int i;
toplevel = XtOpenApplication(&xtcontext, "Clock",
options, XtNumber(options), &argc, argv, NULL,
sessionShellWidgetClass, NULL, 0);
......@@ -117,7 +117,7 @@ main(int argc, char *argv[])
(toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: quit()"));
i = 0;
XtSetArg (arg[i], XtNiconPixmap,
XtSetArg (arg[i], XtNiconPixmap,
XCreateBitmapFromData (XtDisplay(toplevel),
XtScreen(toplevel)->root,
(char *)oclock_bits,
......@@ -139,7 +139,7 @@ main(int argc, char *argv[])
(void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel),
&wm_delete_window, 1);
XtAddEventHandler(toplevel, (EventMask) 0, TRUE,
XtAddEventHandler(toplevel, (EventMask) 0, TRUE,
_XEditResCheckMessages, NULL);
XtAppMainLoop(xtcontext);
......@@ -150,7 +150,7 @@ static void quit(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
Arg arg;
if (event->type == ClientMessage &&
if (event->type == ClientMessage &&
event->xclient.data.l[0] != wm_delete_window) {
#ifdef XKB
XkbStdBell(XtDisplay(w), XtWindow(w), 0, XkbBI_BadValue);
......
......@@ -37,8 +37,8 @@ from The Open Group.
#include "transform.h"
#include <stdlib.h>
static XPoint *
TranslatePoints(TPoint *points, int n_points,
static XPoint *
TranslatePoints(TPoint *points, int n_points,
Transform *t, int mode)
{
XPoint *xpoints;
......
......@@ -56,13 +56,13 @@ typedef struct _TRectangle {
# define Twidth(w,h,t) (((double) (w)) / (t)->mx)
# define Theight(w,h,t) (((double) (h)) / (t)->my)
extern void TFillPolygon ( Display *dpy, Drawable d, GC gc, Transform *t,
extern void TFillPolygon ( Display *dpy, Drawable d, GC gc, Transform *t,
TPoint *points, int n_points, int shape, int mode );
extern void TDrawArc ( Display *dpy, Drawable d, GC gc, Transform *t,
double x, double y, double width, double height,
extern void TDrawArc ( Display *dpy, Drawable d, GC gc, Transform *t,
double x, double y, double width, double height,
int angle1, int angle2 );
extern void TFillArc ( Display *dpy, Drawable d, GC gc, Transform *t,
double x, double y, double width, double height,
extern void TFillArc ( Display *dpy, Drawable d, GC gc, Transform *t,
double x, double y, double width, double height,
int angle1, int angle2 );
extern void SetTransform ( Transform *t, int xx1, int xx2, int xy1, int xy2,
extern void SetTransform ( Transform *t, int xx1, int xx2, int xy1, int xy2,
double tx1, double tx2, double ty1, double ty2 );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment