]> sigrok.org Git - libsigrok.git/commitdiff
Drop trailing whitespace in various files.
authorUwe Hermann <redacted>
Tue, 6 Jun 2017 12:10:02 +0000 (14:10 +0200)
committerUwe Hermann <redacted>
Tue, 6 Jun 2017 12:10:02 +0000 (14:10 +0200)
20 files changed:
NEWS
bindings/cxx/classes.cpp
bindings/java/org/sigrok/core/classes/classes.i
bindings/java/org/sigrok/core/interfaces/LogCallback.java
src/hardware/asix-sigma/protocol.h
src/hardware/brymen-dmm/parser.c
src/hardware/fx2lafw/api.c
src/hardware/fx2lafw/dslogic.c
src/hardware/gwinstek-gds-800/protocol.c
src/hardware/link-mso19/protocol.c
src/hardware/pipistrello-ols/api.c
src/hardware/pipistrello-ols/protocol.c
src/hardware/rigol-ds/protocol.c
src/hardware/tondaj-sl-814/api.c
src/hardware/uni-t-dmm/protocol.c
src/input/vcd.c
src/modbus/modbus_serial_rtu.c
src/output/wav.c
src/scpi/scpi_usbtmc_libusb.c
src/usb.c

diff --git a/NEWS b/NEWS
index 57fac4d7d8e75beede00082237c9b1fdf030216d..d85237ae702b57fd345ace659036fcacc49ba97c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -155,7 +155,7 @@ Note: This release DOES change the libsigrok API. That means it is NOT
    - Check for the numpy Python module (bug #533).
    - Check for zip_discard(), provide alternative if not available (bug #674).
  * Portability:
-   - Android: Add fallbacks for missing stoi()/stod(). 
+   - Android: Add fallbacks for missing stoi()/stod().
    - FreeBSD: Fix a libusb related compiler error.
    - FreeBSD: Fix an issue with libusb_get_port_numbers().
    - FreeBSD: Fix an issue with BSD Make (bug #556).
index be76263a942e7af576bf3c97e3f9f464ddc1f6ac..03b81edb3cc0da0b0256ea751199e976cc5aa631 100644 (file)
@@ -768,7 +768,7 @@ vector<shared_ptr<Channel>> ChannelGroup::channels()
        return result;
 }
 
-Trigger::Trigger(shared_ptr<Context> context, string name) : 
+Trigger::Trigger(shared_ptr<Context> context, string name) :
        _structure(sr_trigger_new(name.c_str())),
        _context(move(context))
 {
@@ -812,7 +812,7 @@ TriggerStage::TriggerStage(struct sr_trigger_stage *structure) :
 TriggerStage::~TriggerStage()
 {
 }
-       
+
 int TriggerStage::number() const
 {
        return _structure->stage;
index df372af805690a633e51424fdb25ace5ad8a5009..75793b2531a39e8f5858cb9bc9af239a18824b73 100644 (file)
 %pragma(java) jniclassimports=%{
 /**
  * @mainpage API Reference
- * 
+ *
  * Introduction
  * ------------
- * 
+ *
  * The sigrok-java API provides an object-oriented Java interface to the
  * functionality in libsigrok. It is built on top of the libsigrokcxx C++ API.
- * 
+ *
  * Getting started
  * ---------------
- * 
+ *
  * Usage of the sigrok-java API needs to begin with a call to Context.create().
  * This will create the global libsigrok context and returns a Context object.
  * Methods on this object provide access to the hardware drivers, input and
  * output formats supported by the library, as well as means of creating other
  * objects such as sessions and triggers.
- * 
+ *
  * Error handling
  * --------------
- * 
+ *
  * When any libsigrok C API call returns an error, an Error exception is raised,
  * which provides access to the error code and description.
  */
@@ -197,7 +197,7 @@ MAP_COMMON(const sigrok::ConfigKey *, Glib::VariantBase, ConfigKey, Variant)
 
 %typemap(in, numinputs=0) JNIEnv * %{
    $1 = jenv;
-%} 
+%}
 
 /* Thread safe JNIEnv handling */
 
index 24ef4ed740df5e869ff2a5e280d025525a1edd69..d08408616dc9cf238fb136b2e9bd6eeba91583d5 100644 (file)
@@ -2,7 +2,7 @@ package org.sigrok.core.interfaces;
 
 import org.sigrok.core.classes.LogLevel;
 
-public interface LogCallback 
+public interface LogCallback
 {
     public void run(LogLevel loglevel, String message);
 }
index 7e5d8497ed0f03d20a048f39265fb6697e1a0532..e84badd9c8db77f79ffa53124183670d45425038 100644 (file)
@@ -276,7 +276,7 @@ struct dev_context {
 extern SR_PRIV const uint64_t samplerates[];
 extern SR_PRIV const size_t samplerates_count;
 
-SR_PRIV int sigma_write_register(uint8_t reg, uint8_t *data, size_t len, 
+SR_PRIV int sigma_write_register(uint8_t reg, uint8_t *data, size_t len,
                                 struct dev_context *devc);
 SR_PRIV int sigma_set_register(uint8_t reg, uint8_t value, struct dev_context *devc);
 SR_PRIV int sigma_write_trigger_lut(struct triggerlut *lut, struct dev_context *devc);
index a5e8333a6a004e3f3eda0d489a2bd0abc2695378..2f55cdf70f2ea9d148e9dfe1f0ce526b8a86af01 100644 (file)
@@ -130,21 +130,21 @@ SR_PRIV gboolean brymen_packet_is_valid(const uint8_t *buf)
        int i;
        uint8_t chksum = 0;
        uint8_t *payload;
-       
+
        payload = (uint8_t *)(buf + sizeof(struct brymen_header));
 
        hdr = (void *)buf;
        tail = (void *)(payload + hdr->len);
-       
+
        for (i = 0; i< hdr->len; i++)
                chksum ^= payload[i];
-       
+
        if (tail->checksum != chksum) {
                sr_dbg("Packet has invalid checksum 0x%.2x. Expected 0x%.2x.",
                       chksum, tail->checksum);
                return FALSE;
        }
-       
+
        return TRUE;
 }
 
index 856e51854af9eb0bbd6702fe3cce302b480f3724..3f80b93e73c2d904be035a686e4e9292459854fc 100644 (file)
@@ -709,7 +709,7 @@ static int config_set(uint32_t key, GVariant *data,
                if (i < 0)
                        return SR_ERR_ARG;
                devc->dslogic_clock_edge = i;
-               break;          
+               break;
        default:
                ret = SR_ERR_NA;
        }
index a7a50f7fccd43c73e17483e3741de726d837a479..a3c45be90686b6be4a9a01c727dae867897d9b85 100644 (file)
@@ -363,7 +363,7 @@ SR_PRIV int dslogic_fpga_configure(const struct sr_dev_inst *sdi)
                        v16 |= 1 << 2;
        }
        if (devc->limit_samples > DS_MAX_LOGIC_DEPTH *
-               ceil(devc->cur_samplerate * 1.0 / DS_MAX_LOGIC_SAMPLERATE) 
+               ceil(devc->cur_samplerate * 1.0 / DS_MAX_LOGIC_SAMPLERATE)
                && !devc->dslogic_continuous_mode) {
                /* Enable RLE for long captures.
                 * Without this, captured data present errors.
index 723b421231342ad853f8f7bb9b904379f0551252..604ec54f9d0a881465f0da3b63c64cf54dec8cf0 100644 (file)
@@ -135,7 +135,7 @@ SR_PRIV int gwinstek_gds_800_receive_data(int fd, int revents, void *cb_data)
                                if (devc->cur_acq_frame == devc->frame_limit - 1) {
                                        /* All frames accquired. */
                                        sr_spew("All frames acquired.");
-                                       
+
                                        sdi->driver->dev_acquisition_stop(sdi);
                                        return TRUE;
                                } else {
@@ -143,7 +143,7 @@ SR_PRIV int gwinstek_gds_800_receive_data(int fd, int revents, void *cb_data)
                                        if (devc->df_started) {
                                                packet.type = SR_DF_FRAME_END;
                                                sr_session_send(sdi, &packet);
-                                               
+
                                                packet.type = SR_DF_FRAME_BEGIN;
                                                sr_session_send(sdi, &packet);
                                        }
@@ -271,7 +271,7 @@ SR_PRIV int gwinstek_gds_800_receive_data(int fd, int revents, void *cb_data)
                                        if (devc->df_started) {
                                                packet.type = SR_DF_FRAME_END;
                                                sr_session_send(sdi, &packet);
-                                               
+
                                                packet.type = SR_DF_FRAME_BEGIN;
                                                sr_session_send(sdi, &packet);
                                        }
index 3952dd99635435b6cd4ae2a6a325500f8563ef3e..29aacbdab0642b33b32df487f343df5b4cf9aa53 100644 (file)
@@ -100,7 +100,7 @@ SR_PRIV int mso_configure_trigger(const struct sr_dev_inst *sdi)
                trigger_config |= 0x20; //DSO level trigger & width < trigger_width
                break;
        case 2:
-               trigger_config |= 0x40; //DSO level trigger & width >= trigger_width 
+               trigger_config |= 0x40; //DSO level trigger & width >= trigger_width
                break;
        case 3:
                trigger_config |= 0x60; //LA combination trigger
index ca050bf633700f438677d2aa8014ecdd99802ad3..269b99f7c2c8287ac6173d81c37dbbd86169019b 100644 (file)
@@ -113,7 +113,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        if (p_ols_open(devc) != SR_OK) {
                goto err_free_ftdic;
        }
-       
+
        /* The discovery procedure is like this: first send the Reset
         * command (0x00) 5 times, since the device could be anywhere
         * in a 5-byte command. Then send the ID command (0x02).
@@ -642,8 +642,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        sr_dbg("flag_reg = %x", devc->flag_reg);
 
        /*
-       * In demux mode the OLS is processing two 8-bit or 16-bit samples 
-       * in parallel and for this to work the lower two bits of the four 
+       * In demux mode the OLS is processing two 8-bit or 16-bit samples
+       * in parallel and for this to work the lower two bits of the four
        * "channel_disable" bits must be replicated to the upper two bits.
        */
        flag_tmp = devc->flag_reg;
index 421934b2318d3bd2cea53927cea4b0150e937610..9948944d2681703ceedac4306d49740bbbbc6c30 100644 (file)
@@ -128,7 +128,7 @@ SR_PRIV int p_ols_open(struct dev_context *devc)
                goto err_open_close_ftdic;
        }
        sr_dbg("FTDI chip read data chunk size set successfully.");
-       
+
        return SR_OK;
 
 err_open_close_ftdic:
@@ -443,7 +443,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
                        sr_spew("Received byte 0x%.2x.", byte);
 
                        if ((devc->flag_reg & FLAG_DEMUX) && (devc->flag_reg & FLAG_RLE)) {
-                               /* RLE in demux mode must be processed differently 
+                               /* RLE in demux mode must be processed differently
                                * since in this case the RLE encoder is operating on pairs of samples.
                                */
                                if (devc->num_bytes == num_channels * 2) {
@@ -499,7 +499,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
                                                         * sample.
                                                         */
                                                        devc->tmp_sample[i] = devc->sample[j++];
-                                               } 
+                                               }
                                        }
                                        /* Clear out the most significant bit of the sample */
                                        devc->tmp_sample[devc->num_bytes - 1] &= 0x7f;
@@ -517,7 +517,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
                                                         * sample.
                                                         */
                                                        devc->tmp_sample2[i] = devc->sample[j++];
-                                               } 
+                                               }
                                        }
                                        /* Clear out the most significant bit of the sample */
                                        devc->tmp_sample2[devc->num_bytes - 1] &= 0x7f;
@@ -597,7 +597,7 @@ SR_PRIV int p_ols_receive_data(int fd, int revents, void *cb_data)
                                                                 * sample.
                                                                 */
                                                                devc->tmp_sample[i] = devc->sample[j++];
-                                                       } 
+                                                       }
                                                }
                                                memcpy(devc->sample, devc->tmp_sample, 4);
                                                sr_spew("Expanded sample: 0x%.8x.", sample);
index e68fb08e68bcc184f16db9ae622fb3625cac0832..39462c280ba1830ec208ac5390cebaa1b64e9621 100644 (file)
@@ -177,7 +177,7 @@ static int rigol_ds_trigger_wait(const struct sr_dev_inst *sdi)
        if (!(devc = sdi->priv))
                return SR_ERR;
 
-       /* 
+       /*
         * If timebase < 50 msecs/DIV just sleep about one sweep time except
         * for really fast sweeps.
         */
index 32f5de7bcc353b1f017798f6d26caca89dcd0501..445b4274863a57b9fccae4dea75e0fcdee731624 100644 (file)
@@ -137,7 +137,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
                return SR_ERR_DEV_CLOSED;
 
        std_session_send_df_header(sdi);
-       
+
        sr_sw_limits_acquisition_start(&devc->limits);
 
        /* Poll every 500ms, or whenever some data comes in. */
index 5503584e33bcfef256665212dc2c51aae9461ecc..c0ed21f3fbbfa687ff0f5b2ed6b0709c21cb76be 100644 (file)
@@ -102,7 +102,7 @@ static int hid_chip_init(struct sr_dev_inst *sdi, uint16_t baudrate)
        struct sr_usb_dev_inst *usb;
 
        usb = sdi->conn;
-       
+
        /* Detach kernel drivers which grabbed this device (if any). */
        if (libusb_kernel_driver_active(usb->devhdl, 0) == 1) {
                ret = libusb_detach_kernel_driver(usb->devhdl, 0);
index 1f20033095e30066e46a9716a78f6f7a3c17e61c..8d6edd1dcc77594ea31f6cab8c489c1c974a48aa 100644 (file)
@@ -26,7 +26,7 @@
  *
  * skip:        Allows skipping until given timestamp in the file.
  *              This can speed up analyzing of long captures.
- *            
+ *
  *              Value < 0: Skip until first timestamp listed in
  *              the file. (default)
  *
index 2cb589b9b8cb2d21e9b5bf932bdb60cb7bda8716..21205d941163d6544602e66b44a9d90d5f73fabc 100644 (file)
@@ -152,11 +152,11 @@ static int modbus_serial_rtu_read_data(void *priv, uint8_t *buf, int maxlen)
        struct modbus_serial_rtu *modbus = priv;
        int ret;
 
-       ret = serial_read_nonblocking(modbus->serial, buf, maxlen); 
+       ret = serial_read_nonblocking(modbus->serial, buf, maxlen);
        if (ret < 0)
                return ret;
-       modbus->crc = modbus_serial_rtu_crc(modbus->crc, buf, ret); 
-       return ret; 
+       modbus->crc = modbus_serial_rtu_crc(modbus->crc, buf, ret);
+       return ret;
 }
 
 static int modbus_serial_rtu_read_end(void *priv)
index b266b203275fec65e9e4bf3f4215aba981ba2022..6984c03d29b5185c61c41cc34325772d964249c2 100644 (file)
@@ -46,7 +46,7 @@ static int realloc_chanbufs(const struct sr_output *o, int size)
 
        outc = o->priv;
        for (i = 0; i < outc->num_channels; i++) {
-               if (!(outc->chanbuf[i] = g_try_realloc(outc->chanbuf[i], sizeof(float) * size))) { 
+               if (!(outc->chanbuf[i] = g_try_realloc(outc->chanbuf[i], sizeof(float) * size))) {
                        sr_err("Unable to allocate enough output buffer memory.");
                        return SR_ERR;
                }
index decafdb62af3c44b0635853d751694d0fb29eef8..5e8b267665fe5ac705d77afce9e9e5ea9028537f 100644 (file)
@@ -617,7 +617,7 @@ static int scpi_usbtmc_libusb_close(struct sr_scpi_dev_inst *scpi)
        if ((ret = libusb_release_interface(usb->devhdl, uscpi->interface)) < 0)
                sr_err("Failed to release interface: %s.",
                       libusb_error_name(ret));
-       
+
        if (uscpi->detached_kernel_driver) {
                if ((ret = libusb_attach_kernel_driver(usb->devhdl,
                                                uscpi->interface)) < 0)
index 35a3e80ed58cc7d340317b1aeea116ba4d1f2d83..f53119a6aab181b08c2faf338777da9db9db0712 100644 (file)
--- a/src/usb.c
+++ b/src/usb.c
@@ -393,7 +393,7 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn)
        libusb_free_device_list(devlist, 1);
 
        sr_dbg("Found %d device(s).", g_slist_length(devices));
-       
+
        return devices;
 }