wsutil/to_str: Rename some functions for consistency
This commit is contained in:
parent
8a584222f1
commit
8b70e24889
12
epan/proto.c
12
epan/proto.c
|
@ -10081,7 +10081,7 @@ hfinfo_number_value_format_display(const header_field_info *hfinfo, int display,
|
|||
|
||||
case BASE_DEC_HEX:
|
||||
*(--ptr) = ')';
|
||||
ptr = hex_to_str_back(ptr, hfinfo_hex_digits(hfinfo), value);
|
||||
ptr = hex_to_str_back_len(ptr, value, hfinfo_hex_digits(hfinfo));
|
||||
*(--ptr) = '(';
|
||||
*(--ptr) = ' ';
|
||||
ptr = isint ? int_to_str_back(ptr, (gint32) value) : uint_to_str_back(ptr, value);
|
||||
|
@ -10091,14 +10091,14 @@ hfinfo_number_value_format_display(const header_field_info *hfinfo, int display,
|
|||
return oct_to_str_back(ptr, value);
|
||||
|
||||
case BASE_HEX:
|
||||
return hex_to_str_back(ptr, hfinfo_hex_digits(hfinfo), value);
|
||||
return hex_to_str_back_len(ptr, value, hfinfo_hex_digits(hfinfo));
|
||||
|
||||
case BASE_HEX_DEC:
|
||||
*(--ptr) = ')';
|
||||
ptr = isint ? int_to_str_back(ptr, (gint32) value) : uint_to_str_back(ptr, value);
|
||||
*(--ptr) = '(';
|
||||
*(--ptr) = ' ';
|
||||
ptr = hex_to_str_back(ptr, hfinfo_hex_digits(hfinfo), value);
|
||||
ptr = hex_to_str_back_len(ptr, value, hfinfo_hex_digits(hfinfo));
|
||||
return ptr;
|
||||
|
||||
case BASE_PT_UDP:
|
||||
|
@ -10150,7 +10150,7 @@ hfinfo_number_value_format_display64(const header_field_info *hfinfo, int displa
|
|||
|
||||
case BASE_DEC_HEX:
|
||||
*(--ptr) = ')';
|
||||
ptr = hex64_to_str_back(ptr, hfinfo_hex_digits(hfinfo), value);
|
||||
ptr = hex64_to_str_back_len(ptr, value, hfinfo_hex_digits(hfinfo));
|
||||
*(--ptr) = '(';
|
||||
*(--ptr) = ' ';
|
||||
ptr = isint ? int64_to_str_back(ptr, (gint64) value) : uint64_to_str_back(ptr, value);
|
||||
|
@ -10160,14 +10160,14 @@ hfinfo_number_value_format_display64(const header_field_info *hfinfo, int displa
|
|||
return oct64_to_str_back(ptr, value);
|
||||
|
||||
case BASE_HEX:
|
||||
return hex64_to_str_back(ptr, hfinfo_hex_digits(hfinfo), value);
|
||||
return hex64_to_str_back_len(ptr, value, hfinfo_hex_digits(hfinfo));
|
||||
|
||||
case BASE_HEX_DEC:
|
||||
*(--ptr) = ')';
|
||||
ptr = isint ? int64_to_str_back(ptr, (gint64) value) : uint64_to_str_back(ptr, value);
|
||||
*(--ptr) = '(';
|
||||
*(--ptr) = ' ';
|
||||
ptr = hex64_to_str_back(ptr, hfinfo_hex_digits(hfinfo), value);
|
||||
ptr = hex64_to_str_back_len(ptr, value, hfinfo_hex_digits(hfinfo));
|
||||
return ptr;
|
||||
|
||||
default:
|
||||
|
|
|
@ -222,7 +222,7 @@ oct64_to_str_back(char *ptr, guint64 value)
|
|||
}
|
||||
|
||||
char *
|
||||
hex_to_str_back(char *ptr, int len, guint32 value)
|
||||
hex_to_str_back_len(char *ptr, guint32 value, int len)
|
||||
{
|
||||
do {
|
||||
*(--ptr) = low_nibble_of_octet_to_hex(value);
|
||||
|
@ -243,7 +243,7 @@ hex_to_str_back(char *ptr, int len, guint32 value)
|
|||
}
|
||||
|
||||
char *
|
||||
hex64_to_str_back(char *ptr, int len, guint64 value)
|
||||
hex64_to_str_back_len(char *ptr, guint64 value, int len)
|
||||
{
|
||||
do {
|
||||
*(--ptr) = low_nibble_of_octet_to_hex(value & 0xF);
|
||||
|
|
|
@ -106,7 +106,7 @@ WS_DLL_PUBLIC char *oct64_to_str_back(char *ptr, guint64 value);
|
|||
* String is not NUL terminated by this routine.
|
||||
* There needs to be at least 2 + MAX(8, len) bytes in the buffer.
|
||||
*/
|
||||
WS_DLL_PUBLIC char *hex_to_str_back(char *ptr, int len, guint32 value);
|
||||
WS_DLL_PUBLIC char *hex_to_str_back_len(char *ptr, guint32 value, int len);
|
||||
|
||||
/**
|
||||
* hex64_to_str_back()
|
||||
|
@ -118,7 +118,7 @@ WS_DLL_PUBLIC char *hex_to_str_back(char *ptr, int len, guint32 value);
|
|||
* String is not NUL terminated by this routine.
|
||||
* There needs to be at least 2 + MAX(16, len) bytes in the buffer.
|
||||
*/
|
||||
WS_DLL_PUBLIC char *hex64_to_str_back(char *ptr, int len, guint64 value);
|
||||
WS_DLL_PUBLIC char *hex64_to_str_back_len(char *ptr, guint64 value, int len);
|
||||
|
||||
/**
|
||||
* uint_to_str_back()
|
||||
|
|
Loading…
Reference in New Issue