aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-12-16 20:35:13 +0000
committerJoão Valverde <j@v6e.pt>2016-12-16 22:49:30 +0000
commit166e129e7ee7e026b44ed587d185957cf45cc6c4 (patch)
tree95931f5c70ee299e2e87965d5d3b1d87eec638e8
parent2892cc6603820db170cefe0b5939635bc95445d1 (diff)
Improve some unit strings with unicode characters
Change-Id: Ic6812fd266832743962e020cfc8f0af2d4742fdf Reviewed-on: https://code.wireshark.org/review/19308 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--epan/dissectors/packet-lldp.c4
-rw-r--r--epan/dissectors/packet-ppi-vector.c20
-rw-r--r--epan/unit_strings.c6
-rw-r--r--epan/unit_strings.h6
-rw-r--r--wsutil/utf8_entities.h1
5 files changed, 19 insertions, 18 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c
index 999fc71a7e..050db65d0d 100644
--- a/epan/dissectors/packet-lldp.c
+++ b/epan/dissectors/packet-lldp.c
@@ -5119,11 +5119,11 @@ proto_register_lldp(void)
},
{ &hf_hytec_tx_current_output_power,
{ HYTEC_MD__TX_CURRENT_OUTPUT_POWER_STR, "lldp.hytec.tx_current_output_power", FT_FLOAT, BASE_NONE|BASE_UNIT_STRING,
- &units_uW, 0x0, NULL, HFILL}
+ &units_microwatts, 0x0, NULL, HFILL}
},
{ &hf_hytec_rx_current_input_power,
{ HYTEC_MD__RX_CURRENT_INPUT_POWER_STR, "lldp.hytec.rx_current_input_power", FT_FLOAT, BASE_NONE|BASE_UNIT_STRING,
- &units_uW, 0x0, NULL, HFILL}
+ &units_microwatts, 0x0, NULL, HFILL}
},
{ &hf_hytec_rx_input_snr,
{ HYTEC_MD__RX_INPUT_SNR_STR, "lldp.hytec.rx_input_snr", FT_FLOAT, BASE_NONE|BASE_UNIT_STRING,
diff --git a/epan/dissectors/packet-ppi-vector.c b/epan/dissectors/packet-ppi-vector.c
index 9ee8836969..e9d81c01dc 100644
--- a/epan/dissectors/packet-ppi-vector.c
+++ b/epan/dissectors/packet-ppi-vector.c
@@ -1178,36 +1178,36 @@ proto_register_ppi_vector(void)
"Offset up", HFILL } },
{ &hf_ppi_vector_vel_r,
{ "Vel-r", "ppi_vector.vel_r",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec, 0x0,
"Velocity-right", HFILL } },
{ &hf_ppi_vector_vel_f,
{ "Vel-f", "ppi_vector.vel_f",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec, 0x0,
"Velocity-forward", HFILL } },
{ &hf_ppi_vector_vel_u,
{ "Vel-u", "ppi_vector.vel_u",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec, 0x0,
"Velocity-up", HFILL } },
{ &hf_ppi_vector_vel_t,
{ "Vel-t", "ppi_vector.vel_t",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec, 0x0,
"Velocity-Total", HFILL } },
{ &hf_ppi_vector_acc_r,
{ "Accel-r", "ppi_vector.acc_r",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec_squared, 0x0,
"Acceleration-right", HFILL } },
{ &hf_ppi_vector_acc_f,
{ "Accel-f", "ppi_vector.acc_f",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec_squared, 0x0,
"Acceleration-forward", HFILL } },
{ &hf_ppi_vector_acc_u,
{ "Accel-u", "ppi_vector.acc_u",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec_squared, 0x0,
"Acceleration-up", HFILL } },
{ &hf_ppi_vector_acc_t,
{ "Accel-t", "ppi_vector.acc_t",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec_squared, 0x0,
"Acceleration-Total", HFILL } },
/* V2 */
@@ -1236,11 +1236,11 @@ proto_register_ppi_vector(void)
/* V1 only */
{ &hf_ppi_vector_err_vel,
{ "Err-Vel", "ppi_vector.err_vel",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec, 0x0,
"Velocity margin of error", HFILL } },
{ &hf_ppi_vector_err_acc,
{ "Err-Accel", "ppi_vector.err_acc",
- FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_m_per_s_per_s, 0x0,
+ FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_meter_sec_squared, 0x0,
"Acceleration margin of error", HFILL } },
{ &hf_ppi_vector_descstr,
diff --git a/epan/unit_strings.c b/epan/unit_strings.c
index c259d4ff7d..0673526697 100644
--- a/epan/unit_strings.c
+++ b/epan/unit_strings.c
@@ -76,9 +76,9 @@ const unit_name_string units_kbps = { "Kbps", NULL };
const unit_name_string units_kibps = { "KiB/s", NULL };
const unit_name_string units_kmh = { "km/h", NULL };
const unit_name_string units_bit_sec = { "bits/s", NULL };
-const unit_name_string units_uW = { "uW", NULL };
-const unit_name_string units_m_per_s = { "m/s", NULL };
-const unit_name_string units_m_per_s_per_s = { " (m/s)/s", NULL };
+const unit_name_string units_microwatts = { UTF8_MICRO_SIGN "W", NULL };
+const unit_name_string units_meter_sec = { "m/s", NULL };
+const unit_name_string units_meter_sec_squared = { "m/s" UTF8_SUPERSCRIPT_TWO , NULL };
const unit_name_string units_segment_remaining = { " segment remaining", " segments remaining" };
diff --git a/epan/unit_strings.h b/epan/unit_strings.h
index 8cd0ee73ff..5221a32a52 100644
--- a/epan/unit_strings.h
+++ b/epan/unit_strings.h
@@ -74,9 +74,9 @@ WS_DLL_PUBLIC const unit_name_string units_kbit;
WS_DLL_PUBLIC const unit_name_string units_kbps;
WS_DLL_PUBLIC const unit_name_string units_kibps;
WS_DLL_PUBLIC const unit_name_string units_kmh;
-WS_DLL_PUBLIC const unit_name_string units_uW;
-WS_DLL_PUBLIC const unit_name_string units_m_per_s;
-WS_DLL_PUBLIC const unit_name_string units_m_per_s_per_s;
+WS_DLL_PUBLIC const unit_name_string units_microwatts;
+WS_DLL_PUBLIC const unit_name_string units_meter_sec;
+WS_DLL_PUBLIC const unit_name_string units_meter_sec_squared;
WS_DLL_PUBLIC const unit_name_string units_bit_sec;
WS_DLL_PUBLIC const unit_name_string units_segment_remaining;
diff --git a/wsutil/utf8_entities.h b/wsutil/utf8_entities.h
index df1d9dc0f8..952d277906 100644
--- a/wsutil/utf8_entities.h
+++ b/wsutil/utf8_entities.h
@@ -45,6 +45,7 @@
*/
#define UTF8_DEGREE_SIGN "\xc2\xb0" /* 176 / 0xb0 */
+#define UTF8_SUPERSCRIPT_TWO "\xc2\xb2" /* 178 / 0xb2 */
#define UTF8_MICRO_SIGN "\xc2\xb5" /* 181 / 0xb5 */
#define UTF8_MIDDLE_DOT "\xc2\xb7" /* 183 / 0xb7 */