]> diplodocus.org Git - xorg-xinput/commitdiff
Remove leftover trailing whitespaces.
authorPeter Hutterer <peter@cs.unisa.edu.au>
Thu, 20 Dec 2007 01:36:33 +0000 (12:06 +1030)
committerPeter Hutterer <peter@cs.unisa.edu.au>
Thu, 20 Dec 2007 01:36:33 +0000 (12:06 +1030)
src/feedback.c
src/list.c
src/state.c
src/test.c
src/version.c
src/xinput.c
src/xinput.h

index e374be2d0c562d3ddf55a599b09e12718eb45aca..7f4da57ebc0704847175238af62153241c22dfa5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
- *                                                                            
+ *
  * 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
  * 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
@@ -9,8 +9,8 @@
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.                   
- *                                                                            
+ * is provided "as is" without express or implied warranty.
+ *
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
@@ -37,21 +37,21 @@ set_ptr_feedback(Display    *display,
     int                        num_feedbacks;
     int                        loop;
     int                        id;
     int                        num_feedbacks;
     int                        loop;
     int                        id;
-    
+
     if (argc != 4) {
        fprintf(stderr, "usage: xinput %s %s\n", name, desc);
        return 1;
     }
     if (argc != 4) {
        fprintf(stderr, "usage: xinput %s %s\n", name, desc);
        return 1;
     }
-    
+
     info = find_device_info(display, argv[0], True);
     info = find_device_info(display, argv[0], True);
-    
+
     if (!info) {
        fprintf(stderr, "unable to find device %s\n", argv[0]);
        return 1;
     }
     if (!info) {
        fprintf(stderr, "unable to find device %s\n", argv[0]);
        return 1;
     }
-    
+
     device = XOpenDevice(display, info->id);
     device = XOpenDevice(display, info->id);
-    
+
     if (!device) {
        fprintf(stderr, "unable to open device %s\n", argv[0]);
        return 1;
     if (!device) {
        fprintf(stderr, "unable to open device %s\n", argv[0]);
        return 1;
@@ -71,12 +71,12 @@ set_ptr_feedback(Display    *display,
        fprintf(stderr, "unable to find PtrFeedbackClass for %s\n", argv[0]);
        return 1;
     }
        fprintf(stderr, "unable to find PtrFeedbackClass for %s\n", argv[0]);
        return 1;
     }
-    
-    feedback.class      = PtrFeedbackClass;
-    feedback.length     = sizeof(XPtrFeedbackControl);
-    feedback.id                 = id;
+
+    feedback.class       = PtrFeedbackClass;
+    feedback.length      = sizeof(XPtrFeedbackControl);
+    feedback.id                 = id;
     feedback.threshold  = atoi(argv[1]);
     feedback.threshold  = atoi(argv[1]);
-    feedback.accelNum   = atoi(argv[2]);
+    feedback.accelNum   = atoi(argv[2]);
     feedback.accelDenom  = atoi(argv[3]);
 
     XChangeFeedbackControl(display, device, DvAccelNum|DvAccelDenom|DvThreshold,
     feedback.accelDenom  = atoi(argv[3]);
 
     XChangeFeedbackControl(display, device, DvAccelNum|DvAccelDenom|DvThreshold,
@@ -103,31 +103,31 @@ get_feedbacks(Display     *display,
     XLedFeedbackState  *l;
     XIntegerFeedbackState *i;
     XStringFeedbackState *s;
     XLedFeedbackState  *l;
     XIntegerFeedbackState *i;
     XStringFeedbackState *s;
-    
+
     if (argc != 1) {
        fprintf(stderr, "usage: xinput %s %s\n", name, desc);
        return 1;
     }
     if (argc != 1) {
        fprintf(stderr, "usage: xinput %s %s\n", name, desc);
        return 1;
     }
-    
+
     info = find_device_info(display, argv[0], True);
     info = find_device_info(display, argv[0], True);
-    
+
     if (!info) {
        fprintf(stderr, "unable to find device %s\n", argv[0]);
        return 1;
     }
     if (!info) {
        fprintf(stderr, "unable to find device %s\n", argv[0]);
        return 1;
     }
-    
+
     device = XOpenDevice(display, info->id);
     device = XOpenDevice(display, info->id);
-    
+
     if (!device) {
        fprintf(stderr, "unable to open device %s\n", argv[0]);
        return 1;
     }
     if (!device) {
        fprintf(stderr, "unable to open device %s\n", argv[0]);
        return 1;
     }
-    
+
     state = XGetFeedbackControl(display, device, &num_feedbacks);
 
     printf("%d feedback class%s\n", num_feedbacks,
           (num_feedbacks > 1) ? "es" : "");
     state = XGetFeedbackControl(display, device, &num_feedbacks);
 
     printf("%d feedback class%s\n", num_feedbacks,
           (num_feedbacks > 1) ? "es" : "");
-    
+
     for(loop=0; loop<num_feedbacks; loop++) {
        switch (state->class) {
        case KbdFeedbackClass:
     for(loop=0; loop<num_feedbacks; loop++) {
        switch (state->class) {
        case KbdFeedbackClass:
@@ -140,13 +140,13 @@ get_feedbacks(Display     *display,
            printf("\tled_mask is %d\n", k->led_mask);
            printf("\tglobal_auto_repeat is %d\n", k->global_auto_repeat);
            break;
            printf("\tled_mask is %d\n", k->led_mask);
            printf("\tglobal_auto_repeat is %d\n", k->global_auto_repeat);
            break;
-           
+
        case PtrFeedbackClass:
            p = (XPtrFeedbackState*) state;
            printf("PtrFeedbackClass id=%ld\n", state->id);
            printf("\taccelNum is %d\n", p->accelNum);
            printf("\taccelDenom is %d\n", p->accelDenom);
        case PtrFeedbackClass:
            p = (XPtrFeedbackState*) state;
            printf("PtrFeedbackClass id=%ld\n", state->id);
            printf("\taccelNum is %d\n", p->accelNum);
            printf("\taccelDenom is %d\n", p->accelDenom);
-           printf("\tthreshold is %d\n", p->threshold);            
+           printf("\tthreshold is %d\n", p->threshold);
            break;
 
        case StringFeedbackClass:
            break;
 
        case StringFeedbackClass:
@@ -175,7 +175,7 @@ get_feedbacks(Display       *display,
            printf("XBellFeedbackControl id=%ld\n", state->id);
            printf("\tpercent is %d\n", b->percent);
            printf("\tpitch is %d\n", b->pitch);
            printf("XBellFeedbackControl id=%ld\n", state->id);
            printf("\tpercent is %d\n", b->percent);
            printf("\tpitch is %d\n", b->pitch);
-           printf("\tduration is %d\n", b->duration);      
+           printf("\tduration is %d\n", b->duration);
            break;
        }
        state = (XFeedbackState*) ((char*) state + state->length);
            break;
        }
        state = (XFeedbackState*) ((char*) state + state->length);
index a0236103d70b393bc7259abb7bd05a4141faab44..9ef3d6163360cecba905bee90716f903538b3967 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
- *                                                                            
+ *
  * 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
  * 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
@@ -9,8 +9,8 @@
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.                   
- *                                                                            
+ * is provided "as is" without express or implied warranty.
+ *
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
@@ -22,6 +22,7 @@
  */
 
 #include "xinput.h"
  */
 
 #include "xinput.h"
+#include <string.h>
 
 static void
 print_info(XDeviceInfo *info, Bool shortformat)
 
 static void
 print_info(XDeviceInfo *info, Bool shortformat)
@@ -78,7 +79,7 @@ print_info(XDeviceInfo        *info, Bool shortformat)
 
            case ValuatorClass:
                v = (XValuatorInfoPtr) any;
 
            case ValuatorClass:
                v = (XValuatorInfoPtr) any;
-               a = (XAxisInfoPtr) ((char *) v + 
+               a = (XAxisInfoPtr) ((char *) v +
                                    sizeof (XValuatorInfo));
                printf("\tNum_axes is %d\n", v->num_axes);
                printf("\tMode is %s\n", (v->mode == Absolute) ? "Absolute" : "Relative");
                                    sizeof (XValuatorInfo));
                printf("\tNum_axes is %d\n", v->num_axes);
                printf("\tMode is %s\n", (v->mode == Absolute) ? "Absolute" : "Relative");
@@ -90,7 +91,7 @@ print_info(XDeviceInfo        *info, Bool shortformat)
                    printf ("\t\tResolution is %d\n", a->resolution);
                }
                break;
                    printf ("\t\tResolution is %d\n", a->resolution);
                }
                break;
-               
+
            default:
                printf ("unknown class\n");
            }
            default:
                printf ("unknown class\n");
            }
@@ -112,11 +113,11 @@ list(Display      *display,
 
     shortformat = (argc == 1 && strcmp(argv[0], "--short") == 0);
 
 
     shortformat = (argc == 1 && strcmp(argv[0], "--short") == 0);
 
-    if (argc == 0) {
+    if (argc == 0 || shortformat) {
        int             num_devices;
        int             num_devices;
-    
+
        info = XListInputDevices(display, &num_devices);
        info = XListInputDevices(display, &num_devices);
-       
+
        for(loop=0; loop<num_devices; loop++) {
            print_info(info+loop, shortformat);
        }
        for(loop=0; loop<num_devices; loop++) {
            print_info(info+loop, shortformat);
        }
@@ -125,7 +126,7 @@ list(Display        *display,
 
        for(loop=0; loop<argc; loop++) {
            info = find_device_info(display, argv[0], False);
 
        for(loop=0; loop<argc; loop++) {
            info = find_device_info(display, argv[0], False);
-           
+
            if (!info) {
                fprintf(stderr, "unable to find device %s\n", argv[0]);
                ret = EXIT_FAILURE;
            if (!info) {
                fprintf(stderr, "unable to find device %s\n", argv[0]);
                ret = EXIT_FAILURE;
index 38d244b1cabf1bb19710083b0ce69b71b7c50eb3..39c1b74c666ff415959a527a804f46737baacdf7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright 1996-1997 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
 /*
  * Copyright 1996-1997 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
- *                                                                            
+ *
  * 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
  * 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
@@ -9,8 +9,8 @@
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.                   
- *                                                                            
+ * is provided "as is" without express or implied warranty.
+ *
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
@@ -39,21 +39,21 @@ query_state(Display *display,
     XValuatorState     *val_state;
     XKeyState          *key_state;
     XButtonState       *but_state;
     XValuatorState     *val_state;
     XKeyState          *key_state;
     XButtonState       *but_state;
-    
+
     if (argc != 1) {
        fprintf(stderr, "usage: xinput %s %s\n", name, desc);
        return 1;
     }
     if (argc != 1) {
        fprintf(stderr, "usage: xinput %s %s\n", name, desc);
        return 1;
     }
-    
+
     info = find_device_info(display, argv[0], True);
     info = find_device_info(display, argv[0], True);
-    
+
     if (!info) {
        fprintf(stderr, "unable to find device %s\n", argv[0]);
        return 1;
     }
     if (!info) {
        fprintf(stderr, "unable to find device %s\n", argv[0]);
        return 1;
     }
-    
+
     device = XOpenDevice(display, info->id);
     device = XOpenDevice(display, info->id);
-    
+
     if (!device) {
        fprintf(stderr, "unable to open device %s\n", argv[0]);
        return 1;
     if (!device) {
        fprintf(stderr, "unable to open device %s\n", argv[0]);
        return 1;
@@ -76,7 +76,7 @@ query_state(Display   *display,
              printf("\tvaluator[%d]=%d\n", loop2, val_state->valuators[loop2]);
            }
            break;
              printf("\tvaluator[%d]=%d\n", loop2, val_state->valuators[loop2]);
            }
            break;
-           
+
          case ButtonClass:
            but_state = (XButtonState *) cls;
            printf("ButtonClass\n");
          case ButtonClass:
            but_state = (XButtonState *) cls;
            printf("ButtonClass\n");
@@ -93,7 +93,7 @@ query_state(Display   *display,
              printf("\tkey[%d]=%s\n", loop2,
                     (key_state->keys[loop2 / 8] & (1 << (loop2 % 8))) ? "down" : "up" );
            }
              printf("\tkey[%d]=%s\n", loop2,
                     (key_state->keys[loop2 / 8] & (1 << (loop2 % 8))) ? "down" : "up" );
            }
-           
+
            break;
 
          }
            break;
 
          }
index 5d543646b84c35e389a5d6716c8a708ed5e07d68..be6b119821b7ac7e7099a0ae5eaa5701b9c82406 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
- *                                                                            
+ *
  * 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
  * 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
@@ -9,8 +9,8 @@
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.                   
- *                                                                            
+ * is provided "as is" without express or implied warranty.
+ *
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
@@ -57,7 +57,7 @@ register_events(Display               *dpy,
        fprintf(stderr, "unable to open device %s\n", dev_name);
        return 0;
     }
        fprintf(stderr, "unable to open device %s\n", dev_name);
        return 0;
     }
-    
+
     if (device->num_classes > 0) {
        for (ip = device->classes, i=0; i<info->num_classes; ip++, i++) {
            switch (ip->input_class) {
     if (device->num_classes > 0) {
        for (ip = device->classes, i=0; i<info->num_classes; ip++, i++) {
            switch (ip->input_class) {
@@ -78,7 +78,7 @@ register_events(Display               *dpy,
                    ProximityOut(device, proximity_out_type, event_list[number]); number++;
                }
                break;
                    ProximityOut(device, proximity_out_type, event_list[number]); number++;
                }
                break;
-               
+
            default:
                fprintf(stderr, "unknown class\n");
                break;
            default:
                fprintf(stderr, "unknown class\n");
                break;
@@ -94,19 +94,19 @@ register_events(Display             *dpy,
 }
 
 static void
 }
 
 static void
-print_events(Display   *dpy) 
+print_events(Display   *dpy)
 {
     XEvent        Event;
 {
     XEvent        Event;
-    
+
     while(1) {
        XNextEvent(dpy, &Event);
     while(1) {
        XNextEvent(dpy, &Event);
-       
+
        if (Event.type == motion_type) {
        if (Event.type == motion_type) {
-           int loop;    
+           int loop;
            XDeviceMotionEvent *motion = (XDeviceMotionEvent *) &Event;
 
            printf("motion ");
            XDeviceMotionEvent *motion = (XDeviceMotionEvent *) &Event;
 
            printf("motion ");
-           
+
            for(loop=0; loop<motion->axes_count; loop++) {
                printf("a[%d]=%d ", motion->first_axis + loop, motion->axis_data[loop]);
            }
            for(loop=0; loop<motion->axes_count; loop++) {
                printf("a[%d]=%d ", motion->first_axis + loop, motion->axis_data[loop]);
            }
@@ -115,10 +115,10 @@ print_events(Display      *dpy)
                   (Event.type == button_release_type)) {
            int loop;
            XDeviceButtonEvent *button = (XDeviceButtonEvent *) &Event;
                   (Event.type == button_release_type)) {
            int loop;
            XDeviceButtonEvent *button = (XDeviceButtonEvent *) &Event;
-           
+
            printf("button %s %d ", (Event.type == button_release_type) ? "release" : "press  ",
                   button->button);
            printf("button %s %d ", (Event.type == button_release_type) ? "release" : "press  ",
                   button->button);
-           
+
            for(loop=0; loop<button->axes_count; loop++) {
                printf("a[%d]=%d ", button->first_axis + loop, button->axis_data[loop]);
            }
            for(loop=0; loop<button->axes_count; loop++) {
                printf("a[%d]=%d ", button->first_axis + loop, button->axis_data[loop]);
            }
@@ -127,10 +127,10 @@ print_events(Display      *dpy)
                   (Event.type == key_release_type)) {
            int loop;
            XDeviceKeyEvent *key = (XDeviceKeyEvent *) &Event;
                   (Event.type == key_release_type)) {
            int loop;
            XDeviceKeyEvent *key = (XDeviceKeyEvent *) &Event;
-           
+
            printf("key %s %d ", (Event.type == key_release_type) ? "release" : "press  ",
                   key->keycode);
            printf("key %s %d ", (Event.type == key_release_type) ? "release" : "press  ",
                   key->keycode);
-           
+
            for(loop=0; loop<key->axes_count; loop++) {
                printf("a[%d]=%d ", key->first_axis + loop, key->axis_data[loop]);
            }
            for(loop=0; loop<key->axes_count; loop++) {
                printf("a[%d]=%d ", key->first_axis + loop, key->axis_data[loop]);
            }
@@ -139,9 +139,9 @@ print_events(Display        *dpy)
                   (Event.type == proximity_in_type)) {
            int loop;
            XProximityNotifyEvent *prox = (XProximityNotifyEvent *) &Event;
                   (Event.type == proximity_in_type)) {
            int loop;
            XProximityNotifyEvent *prox = (XProximityNotifyEvent *) &Event;
-           
+
            printf("proximity %s ", (Event.type == proximity_in_type) ? "in " : "out");
            printf("proximity %s ", (Event.type == proximity_in_type) ? "in " : "out");
-           
+
            for(loop=0; loop<prox->axes_count; loop++) {
                printf("a[%d]=%d ", prox->first_axis + loop, prox->axis_data[loop]);
            }
            for(loop=0; loop<prox->axes_count; loop++) {
                printf("a[%d]=%d ", prox->first_axis + loop, prox->axis_data[loop]);
            }
@@ -168,18 +168,18 @@ test(Display      *display,
     } else {
        Bool    handle_proximity = False;
        int     idx = 0;
     } else {
        Bool    handle_proximity = False;
        int     idx = 0;
-       
+
        if (argc == 2) {
            if (strcmp("-proximity", argv[0]) != 0) {
        if (argc == 2) {
            if (strcmp("-proximity", argv[0]) != 0) {
-               fprintf(stderr, "usage: xinput %s %s\n", name, desc);
+               fprintf(stderr, "usage: xinput %s %s\n", name, desc);
                return EXIT_FAILURE;
            }
            handle_proximity = 1;
            idx = 1;
        }
                return EXIT_FAILURE;
            }
            handle_proximity = 1;
            idx = 1;
        }
-       
+
        info = find_device_info(display, argv[idx], True);
        info = find_device_info(display, argv[idx], True);
-           
+
        if (!info) {
            fprintf(stderr, "unable to find device %s\n", argv[idx]);
            return EXIT_FAILURE;
        if (!info) {
            fprintf(stderr, "unable to find device %s\n", argv[idx]);
            return EXIT_FAILURE;
index 906ab6afe85abfe5b0369440e7518751158b7d1f..be35d436c9243ef5ec307951edbb5ee8cce402ae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright 1996-1997 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
 /*
  * Copyright 1996-1997 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
- *                                                                            
+ *
  * 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
  * 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
@@ -9,8 +9,8 @@
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.                   
- *                                                                            
+ * is provided "as is" without express or implied warranty.
+ *
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
index 6bafb2a5a7d8049959968ea10b4178966ec4e028..f74dee5aa1017e12be864779a9e078f76bce127d 100644 (file)
@@ -113,7 +113,7 @@ find_device_info(Display    *display,
     int                len = strlen(name);
     Bool       is_id = True;
     XID                id;
     int                len = strlen(name);
     Bool       is_id = True;
     XID                id;
-    
+
     for(loop=0; loop<len; loop++) {
        if (!isdigit(name[loop])) {
            is_id = False;
     for(loop=0; loop<len; loop++) {
        if (!isdigit(name[loop])) {
            is_id = False;
@@ -124,7 +124,7 @@ find_device_info(Display    *display,
     if (is_id) {
        id = atoi(name);
     }
     if (is_id) {
        id = atoi(name);
     }
-    
+
     devices = XListInputDevices(display, &num_devices);
 
     for(loop=0; loop<num_devices; loop++) {
     devices = XListInputDevices(display, &num_devices);
 
     for(loop=0; loop<num_devices; loop++) {
@@ -138,12 +138,12 @@ find_device_info(Display  *display,
 }
 
 static void
 }
 
 static void
-usage() 
+usage()
 {
     entry      *pdriver = drivers;
 {
     entry      *pdriver = drivers;
-    
+
     fprintf(stderr, "usage :\n");
     fprintf(stderr, "usage :\n");
-    
+
     while(pdriver->func_name) {
        fprintf(stderr, "\txinput %s %s\n", pdriver->func_name,
                pdriver->arg_desc);
     while(pdriver->func_name) {
        fprintf(stderr, "\txinput %s %s\n", pdriver->func_name,
                pdriver->arg_desc);
@@ -157,14 +157,14 @@ main(int argc, char * argv[])
     Display    *display;
     entry      *driver = drivers;
     char        *func;
     Display    *display;
     entry      *driver = drivers;
     char        *func;
-    
+
     if (argc < 2) {
        usage();
        return EXIT_FAILURE;
     }
     if (argc < 2) {
        usage();
        return EXIT_FAILURE;
     }
-    
+
     display = XOpenDisplay(NULL);
     display = XOpenDisplay(NULL);
-    
+
     if (display == NULL) {
        fprintf(stderr, "Unable to connect to X server\n");
        return EXIT_FAILURE;
     if (display == NULL) {
        fprintf(stderr, "Unable to connect to X server\n");
        return EXIT_FAILURE;
@@ -177,7 +177,7 @@ main(int argc, char * argv[])
        fprintf(stderr, "%s extension not available\n", INAME);
        return EXIT_FAILURE;
     }
        fprintf(stderr, "%s extension not available\n", INAME);
        return EXIT_FAILURE;
     }
-    
+
     while(driver->func_name) {
        if (strcmp(driver->func_name, func) == 0) {
            int r = (*driver->func)(display, argc-2, argv+2,
     while(driver->func_name) {
        if (strcmp(driver->func_name, func) == 0) {
            int r = (*driver->func)(display, argc-2, argv+2,
@@ -187,9 +187,9 @@ main(int argc, char * argv[])
        }
        driver++;
     }
        }
        driver++;
     }
-    
+
     usage();
     usage();
-    
+
     return EXIT_FAILURE;
 }
 
     return EXIT_FAILURE;
 }
 
index 02058a287b9258203ac06449cff7aa094c44fcb1..a43ab736d2b9acbc6576879acdfc19b1e3a0e78c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
 /*
  * Copyright 1996 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
- *                                                                            
+ *
  * 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
  * 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
@@ -9,8 +9,8 @@
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
  * advertising or publicity pertaining to distribution of the software without
  * specific,  written      prior  permission.     Frederic  Lepied   makes  no
  * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.                   
- *                                                                            
+ * is provided "as is" without express or implied warranty.
+ *
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
  * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR