summaryrefslogtreecommitdiff
path: root/app/xclipboard/xcutsel.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/xclipboard/xcutsel.c')
-rw-r--r--app/xclipboard/xcutsel.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/app/xclipboard/xcutsel.c b/app/xclipboard/xcutsel.c
index 609b83dba..3386b57a3 100644
--- a/app/xclipboard/xcutsel.c
+++ b/app/xclipboard/xcutsel.c
@@ -1,7 +1,5 @@
/*
- * $Xorg: xcutsel.c,v 1.4 2001/02/09 02:05:39 xorgcvs Exp $
- *
- *
+
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
@@ -26,7 +24,10 @@ in this Software without prior written authorization from The Open Group.
* *
* Author: Ralph Swick, DEC/Project Athena
*/
-/* $XFree86: xc/programs/xclipboard/xcutsel.c,v 1.7 2001/04/01 14:00:19 tsi Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
@@ -257,7 +258,7 @@ GetBuffer(Widget w, XtPointer closure, XtPointer callData)
int
main(int argc, char *argv[])
{
- char label[100];
+ char *label;
Widget box, button;
XtAppContext appcon;
Widget shell;
@@ -287,19 +288,21 @@ main(int argc, char *argv[])
XtAddCallback( button, XtNcallback, Quit, NULL );
/* %%% hack alert... */
- sprintf(label, "*label:copy %s to %d",
+ XtAsprintf(&label, "*label:copy %s to %d",
options.selection_name,
options.buffer);
XrmPutLineResource( &rdb, label );
+ XtFree(label);
button =
XtCreateManagedWidget("sel-cut", commandWidgetClass, box, NULL, ZERO);
XtAddCallback( button, XtNcallback, GetSelection, NULL );
- sprintf(label, "*label:copy %d to %s",
+ XtAsprintf(&label, "*label:copy %d to %s",
options.buffer,
options.selection_name);
XrmPutLineResource( &rdb, label );
+ XtFree(label);
button =
XtCreateManagedWidget("cut-sel", commandWidgetClass, box, NULL, ZERO);