Blob Blame History Raw
From 93d9206499bab837dccb5d864a875829c3dc057c Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Tue, 25 Dec 2012 11:44:48 +0100
Subject: [PATCH 1/8] Remove trailing whitespace.

It makes the patches harder to read.
---
 Makefile.in          |  2 +-
 client-interface.c   |  2 +-
 client.c             |  8 ++++----
 dataPackets.c        |  2 +-
 device-interface.c   | 10 +++++-----
 drivers/libusb.c     |  6 +++---
 drivers/libusbpre1.c |  6 +++---
 iguanaIR.h           |  2 +-
 osx/daemonosx.c      |  4 ++--
 server.h             |  4 ++--
 udev/iguanaIR.rules  |  2 +-
 11 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 71f59cf..e62b6fa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -187,7 +187,7 @@ endif
 .PHONY: dist devel-cleaner
 dist: configure
 devel-clean: distclean
-	rm -rf autoconf/autom4te.cache autoconf/aclocal.m4 
+	rm -rf autoconf/autom4te.cache autoconf/aclocal.m4
 
 # rules to rebuild the configure script
 M4S=$(filter-out $(srcdir)/autoconf/aclocal.m4, $(wildcard $(srcdir)/autoconf/*.m4))
diff --git a/client-interface.c b/client-interface.c
index 6c45e0d..6052206 100644
--- a/client-interface.c
+++ b/client-interface.c
@@ -80,7 +80,7 @@ static int pulsesToIguanaSend(int carrier,
         fprintf(stderr, "%5d ", sendCode[x] & IG_PULSE_MASK);
 #endif
 
-        cycles = (uint32_t)((sendCode[x] & IG_PULSE_MASK) / 
+        cycles = (uint32_t)((sendCode[x] & IG_PULSE_MASK) /
                             1000000.0 * carrier + 0.5);
         numBytes = (cycles / MAX_DATA_BYTE) + 1;
         cycles %= MAX_DATA_BYTE;
diff --git a/client.c b/client.c
index 13d0053..af0b30e 100644
--- a/client.c
+++ b/client.c
@@ -162,7 +162,7 @@ bool parseNumber(const char *text, unsigned int *value)
                 retval = false;
                 break;
             }
-            else 
+            else
                 *value = (*value << 1) + text[x] - '0';
     }
     else
@@ -432,7 +432,7 @@ static bool handleInternalTask(igtask *cmd, PIPE_PTR conn)
     else if ((cmd->spec->code & INTERNAL_SETCONFIG) == INTERNAL_SETCONFIG)
     {
         setSetting(cmd->spec->bit, cmd->arg, pinState);
-        message(LOG_NORMAL, "%s: success\n", cmd->command);        
+        message(LOG_NORMAL, "%s: success\n", cmd->command);
         retval = true;
     }
     else
@@ -451,7 +451,7 @@ static bool performTask(PIPE_PTR conn, igtask *cmd)
     {
         int result = 0;
         void *data = NULL;
-                
+
         switch(cmd->spec->code)
         {
         case IG_DEV_RECVON:
@@ -593,7 +593,7 @@ static bool performTask(PIPE_PTR conn, igtask *cmd)
                 b[3] = (c & 0x0F) << 4 | 0x0C;
             }
             ((unsigned char*)data)[0] = (unsigned char)(x * 4);
-            
+
             break;
         }
         }
diff --git a/dataPackets.c b/dataPackets.c
index f7900e2..a57574d 100644
--- a/dataPackets.c
+++ b/dataPackets.c
@@ -75,7 +75,7 @@ bool readDataPacket(dataPacket *packet, PIPE_PTR fd, unsigned int timeout)
 
     if (result == 0)
         errno = ETIMEDOUT;
-    
+
     return retval;
 }
 
diff --git a/device-interface.c b/device-interface.c
index afb1d96..29c104b 100644
--- a/device-interface.c
+++ b/device-interface.c
@@ -139,7 +139,7 @@ static void queueDataPacket(iguanaDev *idev, dataPacket *current, bool fromDev)
     {
         insertItem(&idev->recvList, NULL, (itemHeader*)current);
         if (! notify(idev->readerPipe[WRITE]))
-            message(LOG_ERROR, "Failed to signal primary thread.\n");        
+            message(LOG_ERROR, "Failed to signal primary thread.\n");
     }
     else
     {
@@ -543,7 +543,7 @@ bool oldPinConfig(iguanaDev *idev,       /* required */
             }
         }
     }
-    
+
     if (code == IG_DEV_SETPINCONFIG)
         request->data = data;
     if (x == 2)
@@ -561,7 +561,7 @@ bool deviceTransaction(iguanaDev *idev,       /* required */
     /* For old devices setting pin configs actually becomes 2
        requests, awkward, but the way it has to be to support old
        firmware. */
-    if (idev->version <= 3 && 
+    if (idev->version <= 3 &&
         (request->code == IG_DEV_SETPINCONFIG ||
          request->code == IG_DEV_GETPINCONFIG))
         return oldPinConfig(idev, request, response);
@@ -583,7 +583,7 @@ bool deviceTransaction(iguanaDev *idev,       /* required */
         case IG_DEV_GETID:
             msg[CODE_OFFSET] = IG_DEV_EXECUTE;
             break;
-            
+
         case IG_DEV_SETID:
         {
             unsigned char *block;
@@ -911,7 +911,7 @@ void handleIncomingPackets(iguanaDev *idev)
                         /* NOTE: last byte is the fill level */
                         current->dataLen = length - 1;
                         dataStart = buffer;
- 
+
                         message(LOG_DEBUG2,
                                 "Data without ctl header assuming IG_DEV_RECV.\n");
 /* TODO: DEBUG: sleep here to test overflow on the device
diff --git a/drivers/libusb.c b/drivers/libusb.c
index 4993fef..ff2e667 100644
--- a/drivers/libusb.c
+++ b/drivers/libusb.c
@@ -2,7 +2,7 @@
  ** libusb.c ****************************************************************
  ****************************************************************************
  *
- * Lowest level interface to the USB devices.  
+ * Lowest level interface to the USB devices.
  *
  * Copyright (C) 2007, IguanaWorks Incorporated (http://iguanaworks.net)
  * Author: Joseph Dunn <jdunn@iguanaworks.net>
@@ -519,11 +519,11 @@ static int clearHalt(deviceInfo *info, unsigned int ep)
     switch (ep)
     {
     case EP_IN:
-        return libusb_clear_halt(handle->device, 
+        return libusb_clear_halt(handle->device,
                                  handle->epIn->bEndpointAddress);
 
     case EP_OUT:
-        return libusb_clear_halt(handle->device, 
+        return libusb_clear_halt(handle->device,
                                  handle->epOut->bEndpointAddress);
     }
     return -1;
diff --git a/drivers/libusbpre1.c b/drivers/libusbpre1.c
index a0fe8d7..0303aa4 100644
--- a/drivers/libusbpre1.c
+++ b/drivers/libusbpre1.c
@@ -2,7 +2,7 @@
  ** usbclient.c *************************************************************
  ****************************************************************************
  *
- * Lowest level interface to the USB devices.  
+ * Lowest level interface to the USB devices.
  *
  * Copyright (C) 2007, IguanaWorks Incorporated (http://iguanaworks.net)
  * Author: Joseph Dunn <jdunn@iguanaworks.net>
@@ -435,11 +435,11 @@ static int clearHalt(deviceInfo *info, unsigned int ep)
     switch (ep)
     {
     case EP_IN:
-        return usb_clear_halt(handle->device, 
+        return usb_clear_halt(handle->device,
                               handle->epIn->bEndpointAddress);
 
     case EP_OUT:
-        return usb_clear_halt(handle->device, 
+        return usb_clear_halt(handle->device,
                               handle->epOut->bEndpointAddress);
     }
     return -1;
diff --git a/iguanaIR.h b/iguanaIR.h
index 0d0236d..bbc27ae 100644
--- a/iguanaIR.h
+++ b/iguanaIR.h
@@ -170,7 +170,7 @@ IGUANAIR_API unsigned char iguanaDataToPinSpec(const void *data,
  * below (all default to 0):
  *
  * bit: name:          notes
- *  0   output enable 
+ *  0   output enable
  *  1   pullup enable
  *  2   open drain
  *  3   high sink      only pins 0 and 1, ignored elsewhere
diff --git a/osx/daemonosx.c b/osx/daemonosx.c
index e425f2b..2397ac8 100644
--- a/osx/daemonosx.c
+++ b/osx/daemonosx.c
@@ -6,7 +6,7 @@
       Mac OS X.  It spawns a thread and waits for notification that an
       iguanaIR device has been plugged in at which point it raises a SIGHUP
       so that the standard igdaemon hot plug in processing will take place.
-      
+
     @note
       Without this support the reflasher will not work as the reset operation
       during programming results in a disconnect and a reconnect on Mac OS X.
@@ -66,7 +66,7 @@ int daemon_osx_support(const usbId *ids)
 static void arm_notification(io_iterator_t iterator)
 {
   io_object_t object;
-  
+
   while ((object = IOIteratorNext(iterator)) != 0) {
     IOObjectRelease(object);
   }
diff --git a/server.h b/server.h
index 3d1d0ce..c127d5b 100644
--- a/server.h
+++ b/server.h
@@ -14,7 +14,7 @@
 #ifndef _DAEMON_BASE_H_
 #define _DAEMON_BASE_H_
 
-typedef struct 
+typedef struct
 {
     /* driver location and prefered driver information */
     bool onlyPreferred;
@@ -31,7 +31,7 @@ typedef struct
     /* whether the server should ask devices for their labels */
     bool readLabels;
 
-    /* should the server rescan the usb bus after a disconnect */ 
+    /* should the server rescan the usb bus after a disconnect */
     bool autoRescan;
 
     /* a method for children to communicate back to the list owner */
diff --git a/udev/iguanaIR.rules b/udev/iguanaIR.rules
index 5e49ebf..e43aa91 100644
--- a/udev/iguanaIR.rules
+++ b/udev/iguanaIR.rules
@@ -6,7 +6,7 @@
 #
 # So if someone is using an old version of udev they may need to use a
 # different first line like:
-#    SYSFS{manufacturer} == "IguanaWorks", 
+#    SYSFS{manufacturer} == "IguanaWorks",
 
 ATTR{manufacturer} == "IguanaWorks", ATTR{product} == "USB IR Transceiver", \
                OWNER = "iguanair", MODE = "0664", \
-- 
1.7.11.7