diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-10-16 16:24:32 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-10-16 23:27:20 +0000 |
commit | 4695ea20cc8f241c5b2ae0e6fc380cc583ee5050 (patch) | |
tree | 3488e1dda7d07af9b8d5fecbeef5c05cf722ea65 /epan/dissectors/packet-synphasor.c | |
parent | b05803db4b7079307565e423a8caf828949add49 (diff) |
Add DEGREE SIGN character to utf8_entities.h and use it.
Add a #define giving the UTF-8 sequence for DEGREE SIGN, and use it in
packet-synphasor.c rather than having it define its own version. Use it
in some other places rather than a string of two octal values.
Change-Id: Ic0f3b23ae0165c9824d89304d683f45bce31dced
Reviewed-on: https://code.wireshark.org/review/11102
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-synphasor.c')
-rw-r--r-- | epan/dissectors/packet-synphasor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c index 0eb7224f77..d192623170 100644 --- a/epan/dissectors/packet-synphasor.c +++ b/epan/dissectors/packet-synphasor.c @@ -32,6 +32,8 @@ #include <epan/expert.h> #include "packet-tcp.h" +#include <wsutil/utf8_entities.h> + #define PROTOCOL_NAME "IEEE C37.118 Synchrophasor Protocol" #define PROTOCOL_SHORT_NAME "SYNCHROPHASOR" #define PROTOCOL_ABBREV "synphasor" @@ -947,14 +949,12 @@ static gint dissect_PHASORS(tvbuff_t *tvb, proto_tree *tree, config_block *block mag = (mag * pi->conv) * 0.00001; #define SYNP_ANGLE "/_" - #define SYNP_DEGREE "\xC2\xB0" /* DEGREE signs in UTF-8 */ - proto_item_append_text(temp_item, ", %10.2f%c" SYNP_ANGLE "%7.2f" SYNP_DEGREE, + proto_item_append_text(temp_item, ", %10.2f%c" SYNP_ANGLE "%7.2f" UTF8_DEGREE_SIGN, mag, V == pi->unit ? 'V' : 'A', phase *180.0/G_PI); #undef SYNP_ANGLE - #undef SYNP_DEGREE } return offset; } |