summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-05-17 22:01:41 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-05-17 22:01:41 -0700
commitde3301ff61c1f7c5d14265ae9bab9917244568ad (patch)
tree572365be1904e156bbfcee29c590056b15a14ee8
parentdc686289695aa3cef2b0b17d14fae68ac54643de (diff)
delete trailing whitespace from source files
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xclipboard.c48
-rw-r--r--xcutsel.c26
2 files changed, 37 insertions, 37 deletions
diff --git a/xclipboard.c b/xclipboard.c
index e64f6fe..4846e80 100644
--- a/xclipboard.c
+++ b/xclipboard.c
@@ -81,7 +81,7 @@ static String fallback_resources[] = {
NULL
};
-static long
+static long
TextLength(Widget w)
{
return XawTextSourceScan (XawTextGetSource (w),
@@ -129,7 +129,7 @@ RestoreClip(Widget w, ClipPtr clip)
}
/*ARGSUSED*/
-static ClipPtr
+static ClipPtr
NewClip(Widget w, ClipPtr old)
{
ClipPtr newClip;
@@ -364,7 +364,7 @@ FailContinue(Widget w, XEvent *ev, String *parms, Cardinal *np)
}
/*ARGSUSED*/
-static void
+static void
WMProtocols(Widget w, XEvent *ev, String *params, Cardinal *n)
{
if (ev->type == ClientMessage &&
@@ -401,7 +401,7 @@ NewCurrentClipContents(char *data, int len)
/* any trailing clips with no text get overwritten */
if (strlen (currentClip->clip) != 0)
currentClip = NewClip (text, currentClip);
-
+
textBlock.ptr = data;
textBlock.firstPos = 0;
textBlock.length = len;
@@ -432,7 +432,7 @@ EraseTextWidget(void)
static XtActionsRec xclipboard_actions[] = {
- { "NewClip", NewCurrentClip },
+ { "NewClip", NewCurrentClip },
{ "NextClip", NextCurrentClip },
{ "PrevClip", PrevCurrentClip },
{ "DeleteClip", DeleteCurrentClip },
@@ -449,17 +449,17 @@ static XrmOptionDescRec table[] = {
/* {"-nw", "wrap", XrmoptionNoArg, "False"} */
};
-static Boolean ConvertSelection ( Widget w, Atom *selection, Atom *target,
- Atom *type, XtPointer *value,
+static Boolean ConvertSelection ( Widget w, Atom *selection, Atom *target,
+ Atom *type, XtPointer *value,
unsigned long *length, int *format );
static void LoseSelection ( Widget w, Atom *selection );
static Atom ManagerAtom, ClipboardAtom;
/*ARGSUSED*/
-static void
-InsertClipboard(Widget w, XtPointer client_data, Atom *selection,
- Atom *type, XtPointer value, unsigned long *length,
+static void
+InsertClipboard(Widget w, XtPointer client_data, Atom *selection,
+ Atom *type, XtPointer value, unsigned long *length,
int *format)
{
Display *d = XtDisplay(w);
@@ -523,14 +523,14 @@ InsertClipboard(Widget w, XtPointer client_data, Atom *selection,
#endif
}
}
-
+
XtOwnSelection(top, ClipboardAtom, CurrentTime,
ConvertSelection, LoseSelection, NULL);
}
-static Boolean
+static Boolean
ConvertSelection(Widget w, Atom *selection, Atom *target,
- Atom *type, XtPointer *value, unsigned long *length,
+ Atom *type, XtPointer *value, unsigned long *length,
int *format)
{
Display* d = XtDisplay(w);
@@ -565,24 +565,24 @@ ConvertSelection(Widget w, Atom *selection, Atom *target,
*target == XA_LENGTH(d))
{
long * temp;
-
+
temp = (long *) XtMalloc(sizeof(long));
if (*target == XA_LIST_LENGTH(d))
*temp = 1L;
else /* *target == XA_LENGTH(d) */
*temp = (long) TextLength (text);
-
+
*value = (XPointer) temp;
*type = XA_INTEGER;
*length = 1L;
*format = 32;
return True;
}
-
+
if (*target == XA_CHARACTER_POSITION(d))
{
long * temp;
-
+
temp = (long *) XtMalloc(2 * sizeof(long));
temp[0] = (long) 0;
temp[1] = TextLength (text);
@@ -592,7 +592,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target,
*format = 32;
return True;
}
-
+
if (*target == XA_STRING ||
*target == XA_TEXT(d) ||
*target == XA_UTF8_STRING(d) ||
@@ -633,7 +633,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target,
return False;
}
-static void
+static void
LoseSelection(Widget w, Atom *selection)
{
Display *d = XtDisplay(w);
@@ -642,16 +642,16 @@ LoseSelection(Widget w, Atom *selection)
}
/*ARGSUSED*/
-static Boolean
+static Boolean
RefuseSelection(Widget w, Atom *selection, Atom *target,
- Atom *type, XtPointer *value, unsigned long *length,
+ Atom *type, XtPointer *value, unsigned long *length,
int *format)
{
return False;
}
/*ARGSUSED*/
-static void
+static void
LoseManager(Widget w, Atom *selection)
{
XtError("another clipboard has taken over control\n");
@@ -685,7 +685,7 @@ main(int argc, char *argv[])
top = XtAppInitialize( &xtcontext, "XClipboard", table, XtNumber(table),
&argc, argv, fallback_resources, NULL, 0);
- XtGetApplicationResources(top, (XtPointer)&userOptions, resources,
+ XtGetApplicationResources(top, (XtPointer)&userOptions, resources,
XtNumber(resources), NULL, 0);
XtAppAddActions (xtcontext,
@@ -714,7 +714,7 @@ main(int argc, char *argv[])
}
text = XtCreateManagedWidget( "text", Text, parent, args, n);
-
+
currentClip = NewClip (text, (ClipPtr) 0);
set_button_state ();
diff --git a/xcutsel.c b/xcutsel.c
index fb9d2d2..351cf3f 100644
--- a/xcutsel.c
+++ b/xcutsel.c
@@ -86,14 +86,14 @@ static ButtonState state;
static void
Syntax(char *call)
{
- fprintf (stderr, "usage: %s [-selection name] [-cutbuffer number]\n",
+ fprintf (stderr, "usage: %s [-selection name] [-cutbuffer number]\n",
call);
exit (1);
}
-static void
-StoreBuffer(Widget w, XtPointer client_data, Atom *selection, Atom *type,
+static void
+StoreBuffer(Widget w, XtPointer client_data, Atom *selection, Atom *type,
XtPointer value, unsigned long *length, int *format)
{
@@ -108,20 +108,20 @@ StoreBuffer(Widget w, XtPointer client_data, Atom *selection, Atom *type,
XStoreBuffer( XtDisplay(w), (char*)value, (int)(*length),
options.buffer );
-
+
XtFree(value);
}
-static Boolean
+static Boolean
ConvertSelection(Widget w, Atom *selection, Atom *target,
- Atom *type, XtPointer *value, unsigned long *length,
+ Atom *type, XtPointer *value, unsigned long *length,
int *format)
{
Display* d = XtDisplay(w);
XSelectionRequestEvent* req =
XtGetSelectionRequest(w, *selection, (XtRequestId)NULL);
-
+
if (*target == XA_TARGETS(d)) {
Atom* targetP;
Atom* std_targets;
@@ -192,7 +192,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target,
}
-static void
+static void
SetButton(ButtonState *statep, Boolean on)
{
if (statep->is_on != on) {
@@ -209,7 +209,7 @@ SetButton(ButtonState *statep, Boolean on)
}
-static void
+static void
LoseSelection(Widget w, Atom *selection)
{
if (options.value) {
@@ -230,7 +230,7 @@ Quit(Widget w, XtPointer closure, XtPointer callData)
/* ARGSUSED */
-static void
+static void
GetSelection(Widget w, XtPointer closure, XtPointer callData)
{
XtGetSelectionValue(w, options.selection, XA_STRING,
@@ -240,7 +240,7 @@ GetSelection(Widget w, XtPointer closure, XtPointer callData)
/* ARGSUSED */
-static void
+static void
GetBuffer(Widget w, XtPointer closure, XtPointer callData)
{
if (options.value) XFree( options.value );
@@ -255,7 +255,7 @@ GetBuffer(Widget w, XtPointer closure, XtPointer callData)
}
-int
+int
main(int argc, char *argv[])
{
char *label;
@@ -309,7 +309,7 @@ main(int argc, char *argv[])
XtAddCallback( button, XtNcallback, GetBuffer, (XtPointer)&state );
state.button = button;
state.is_on = False;
-
+
XtRealizeWidget(shell);
XtAppMainLoop(appcon);
exit(0);