]> sigrok.org Git - libsigrok.git/commitdiff
Minor whitespace fixes.
authorUwe Hermann <redacted>
Fri, 3 May 2013 12:03:49 +0000 (14:03 +0200)
committerUwe Hermann <redacted>
Fri, 3 May 2013 12:03:49 +0000 (14:03 +0200)
hardware/link-mso19/api.c
hardware/mic-985xx/api.c
hardware/tondaj-sl-814/api.c
output/analog.c

index cbf70986a198c71f41e4f97a224de90a18bc5871..f7c35d139373366479e2060f79bfb83da6724d96 100644 (file)
@@ -76,7 +76,7 @@ static GSList *hw_scan(GSList *options)
                        conn = g_variant_get_string(src->data, NULL);
                        break;
                case SR_CONF_SERIALCOMM:
-                       serialcomm  = g_variant_get_string(src->data, NULL);
+                       serialcomm = g_variant_get_string(src->data, NULL);
                        break;
                }
        }
index 4c093148750de14b6598e61466c1de2d21ce33d8..ca653159ab4e6b80cdb8d1ca3e2be9e2b90cc3c8 100644 (file)
@@ -159,7 +159,7 @@ static GSList *hw_scan(GSList *options, int idx)
                        conn = g_variant_get_string(src->data, NULL);
                        break;
                case SR_CONF_SERIALCOMM:
-                       serialcomm  = g_variant_get_string(src->data, NULL);
+                       serialcomm = g_variant_get_string(src->data, NULL);
                        break;
                }
        }
index 444b372b156c6fe1a60b10c3ac50201dffb14fa3..78d61eb64434cde8a67d5ede96db9b2844b6d6b8 100644 (file)
@@ -100,7 +100,7 @@ static GSList *hw_scan(GSList *options)
                        conn = g_variant_get_string(src->data, NULL);
                        break;
                case SR_CONF_SERIALCOMM:
-                       serialcomm  = g_variant_get_string(src->data, NULL);
+                       serialcomm = g_variant_get_string(src->data, NULL);
                        break;
                default:
                        sr_err("Unknown option %d, skipping.", src->key);
index e7e475fc3126ec6219ddf509c76ae02d6e77f74b..4b823955de696fed3982da573a999730ec9c97e2 100644 (file)
@@ -99,82 +99,83 @@ static void si_printf(float value, GString *out, char *unitstr)
 static void fancyprint(int unit, int mqflags, float value, GString *out)
 {
        switch (unit) {
-               case SR_UNIT_VOLT:
-                       si_printf(value, out, "V");
-                       break;
-               case SR_UNIT_AMPERE:
-                       si_printf(value, out, "A");
-                       break;
-               case SR_UNIT_OHM:
-                       si_printf(value, out, "");
-                       g_string_append_unichar(out, 0x2126);
-                       break;
-               case SR_UNIT_FARAD:
-                       si_printf(value, out, "F");
-                       break;
-               case SR_UNIT_KELVIN:
-                       si_printf(value, out, "K");
-                       break;
-               case SR_UNIT_CELSIUS:
-                       si_printf(value, out, "");
-                       g_string_append_unichar(out, 0x00b0);
-                       g_string_append_c(out, 'C');
-                       break;
-               case SR_UNIT_FAHRENHEIT:
-                       si_printf(value, out, "");
-                       g_string_append_unichar(out, 0x00b0);
-                       g_string_append_c(out, 'F');
-                       break;
-               case SR_UNIT_HERTZ:
-                       si_printf(value, out, "Hz");
-                       break;
-               case SR_UNIT_PERCENTAGE:
-                       g_string_append_printf(out, "%f%%", value);
-                       break;
-               case SR_UNIT_BOOLEAN:
-                       if (value > 0)
-                               g_string_append_printf(out, "TRUE");
-                       else
-                               g_string_append_printf(out, "FALSE");
-                       break;
-               case SR_UNIT_SECOND:
-                       si_printf(value, out, "s");
-                       break;
-               case SR_UNIT_SIEMENS:
-                       si_printf(value, out, "S");
-                       break;
-               case SR_UNIT_DECIBEL_MW:
-                       si_printf(value, out, "dBu");
-                       break;
-               case SR_UNIT_DECIBEL_VOLT:
-                       si_printf(value, out, "dBV");
-                       break;
-               case SR_UNIT_DECIBEL_SPL:
-                       if (mqflags & SR_MQFLAG_SPL_FREQ_WEIGHT_A)
-                               si_printf(value, out, "dB(A)");
-                       else if (mqflags & SR_MQFLAG_SPL_FREQ_WEIGHT_C)
-                               si_printf(value, out, "dB(C)");
-                       else if (mqflags & SR_MQFLAG_SPL_FREQ_WEIGHT_Z)
-                               si_printf(value, out, "dB(Z)");
-                       else
-                               /* No frequency weighting, or non-standard "flat" */
-                               si_printf(value, out, "dB(SPL)");
-                       if (mqflags & SR_MQFLAG_SPL_TIME_WEIGHT_S)
-                               g_string_append(out, " S");
-                       else if (mqflags & SR_MQFLAG_SPL_TIME_WEIGHT_F)
-                               g_string_append(out, " F");
-                       if (mqflags & SR_MQFLAG_SPL_LAT)
-                               g_string_append(out, " LAT");
-                       else if (mqflags & SR_MQFLAG_SPL_PCT_OVER_ALARM)
-                               /* Not a standard function for SLMs, so this is
-                                * a made-up notation. */
-                               g_string_append(out, " %oA");
-                       break;
-               case SR_UNIT_CONCENTRATION:
-                       g_string_append_printf(out, "%f ppm", value * 1000000);
-                       break;
-               default:
-                       si_printf(value, out, "");
+       case SR_UNIT_VOLT:
+               si_printf(value, out, "V");
+               break;
+       case SR_UNIT_AMPERE:
+               si_printf(value, out, "A");
+               break;
+       case SR_UNIT_OHM:
+               si_printf(value, out, "");
+               g_string_append_unichar(out, 0x2126);
+               break;
+       case SR_UNIT_FARAD:
+               si_printf(value, out, "F");
+               break;
+       case SR_UNIT_KELVIN:
+               si_printf(value, out, "K");
+               break;
+       case SR_UNIT_CELSIUS:
+               si_printf(value, out, "");
+               g_string_append_unichar(out, 0x00b0);
+               g_string_append_c(out, 'C');
+               break;
+       case SR_UNIT_FAHRENHEIT:
+               si_printf(value, out, "");
+               g_string_append_unichar(out, 0x00b0);
+               g_string_append_c(out, 'F');
+               break;
+       case SR_UNIT_HERTZ:
+               si_printf(value, out, "Hz");
+               break;
+       case SR_UNIT_PERCENTAGE:
+               g_string_append_printf(out, "%f%%", value);
+               break;
+       case SR_UNIT_BOOLEAN:
+               if (value > 0)
+                       g_string_append_printf(out, "TRUE");
+               else
+                       g_string_append_printf(out, "FALSE");
+               break;
+       case SR_UNIT_SECOND:
+               si_printf(value, out, "s");
+               break;
+       case SR_UNIT_SIEMENS:
+               si_printf(value, out, "S");
+               break;
+       case SR_UNIT_DECIBEL_MW:
+               si_printf(value, out, "dBu");
+               break;
+       case SR_UNIT_DECIBEL_VOLT:
+               si_printf(value, out, "dBV");
+               break;
+       case SR_UNIT_DECIBEL_SPL:
+               if (mqflags & SR_MQFLAG_SPL_FREQ_WEIGHT_A)
+                       si_printf(value, out, "dB(A)");
+               else if (mqflags & SR_MQFLAG_SPL_FREQ_WEIGHT_C)
+                       si_printf(value, out, "dB(C)");
+               else if (mqflags & SR_MQFLAG_SPL_FREQ_WEIGHT_Z)
+                       si_printf(value, out, "dB(Z)");
+               else
+                       /* No frequency weighting, or non-standard "flat" */
+                       si_printf(value, out, "dB(SPL)");
+               if (mqflags & SR_MQFLAG_SPL_TIME_WEIGHT_S)
+                       g_string_append(out, " S");
+               else if (mqflags & SR_MQFLAG_SPL_TIME_WEIGHT_F)
+                       g_string_append(out, " F");
+               if (mqflags & SR_MQFLAG_SPL_LAT)
+                       g_string_append(out, " LAT");
+               else if (mqflags & SR_MQFLAG_SPL_PCT_OVER_ALARM)
+                       /* Not a standard function for SLMs, so this is
+                        * a made-up notation. */
+                       g_string_append(out, " %oA");
+               break;
+       case SR_UNIT_CONCENTRATION:
+               g_string_append_printf(out, "%f ppm", value * 1000000);
+               break;
+       default:
+               si_printf(value, out, "");
+               break;
        }
        if ((mqflags & (SR_MQFLAG_AC | SR_MQFLAG_DC)) == (SR_MQFLAG_AC | SR_MQFLAG_DC))
                g_string_append_printf(out, " AC+DC");