summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2017-10-15 10:37:29 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2017-10-15 10:37:29 +0000
commit1af23ab32f55b7b5f6bc00840d0f8faa70102cec (patch)
tree066513dd8d19c29ae84044e63b99653fd5c74714 /src/Fl_x.cxx
parent41f92be2f19e771820c12a4c528896e9133545f4 (diff)
Fix doxygen and other comments, coding style, and alignment.
Replace QT style doxygen markers "/*!" with Javadoc markers "/**". This commit does not change executable code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12497 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 62d19d777..239f82473 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1159,11 +1159,11 @@ static int wasXExceptionRaised() {
static bool getNextEvent(XEvent *event_return)
{
time_t t = time(NULL);
- while(!XPending(fl_display))
+ while (!XPending(fl_display))
{
if(time(NULL) - t > 10.0)
{
- //fprintf(stderr,"Error: The XNextEvent never came...\n");
+ // fprintf(stderr,"Error: The XNextEvent never came...\n");
return false;
}
}
@@ -1173,7 +1173,7 @@ static bool getNextEvent(XEvent *event_return)
static long getIncrData(uchar* &data, const XSelectionEvent& selevent, long lower_bound)
{
-//fprintf(stderr,"Incremental transfer starting due to INCR property\n");
+ // fprintf(stderr,"Incremental transfer starting due to INCR property\n");
size_t total = 0;
XEvent event;
XDeleteProperty(fl_display, selevent.requestor, selevent.property);
@@ -1191,19 +1191,19 @@ static long getIncrData(uchar* &data, const XSelectionEvent& selevent, long lowe
unsigned char* prop = 0;
long offset = 0;
size_t num_bytes;
- //size_t slice_size = 0;
+ // size_t slice_size = 0;
do
{
XGetWindowProperty(fl_display, selevent.requestor, selevent.property, offset, 70000, True,
AnyPropertyType, &actual_type, &actual_format, &nitems, &bytes_after, &prop);
num_bytes = nitems * (actual_format / 8);
offset += num_bytes/4;
- //slice_size += num_bytes;
+ // slice_size += num_bytes;
if (total + num_bytes > (size_t)lower_bound) data = (uchar*)realloc(data, total + num_bytes);
memcpy(data + total, prop, num_bytes); total += num_bytes;
if (prop) XFree(prop);
} while (bytes_after != 0);
-//fprintf(stderr,"INCR data size:%ld\n", slice_size);
+ // fprintf(stderr,"INCR data size:%ld\n", slice_size);
if (num_bytes == 0) break;
}
else break;
@@ -1307,10 +1307,11 @@ int fl_handle(const XEvent& thisevent)
}
if (actual == TARGETS || actual == XA_ATOM) {
-/*for (unsigned i = 0; i<count; i++) {
- fprintf(stderr," %s", XGetAtomName(fl_display, ((Atom*)portion)[i]) );
- }
-fprintf(stderr,"\n");*/
+ /*for (unsigned i = 0; i<count; i++) {
+ fprintf(stderr," %s", XGetAtomName(fl_display, ((Atom*)portion)[i]) );
+ }
+ fprintf(stderr,"\n");
+ */
Atom t, type = XA_STRING;
if (Fl::e_clipboard_type == Fl::clipboard_image) { // searching for image data
for (unsigned i = 0; i<count; i++) {
@@ -1353,9 +1354,9 @@ fprintf(stderr,"\n");*/
}
else {
Fl::e_clipboard_type = Fl::clipboard_plain_text;
- //buffer_format = Fl::clipboard_plain_text;
+ // buffer_format = Fl::clipboard_plain_text;
}
-//fprintf(stderr,"used format=%s\n", buffer_format);
+ // fprintf(stderr,"used format=%s\n", buffer_format);
return true;
}
if (actual == fl_INCR) {