mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
replace unhexify with hex2bin
unhexify and hex2bin are identical, so this removes unhexify. The particular choice of which to keep was made on the basis of parallelism with the earlier patch that removed hexify. 2014-02-12 Tom Tromey <tromey@redhat.com> * common/rsp-low.h (unhexify): Don't declare. * common/rsp-low.c (unhexify): Remove. 2014-02-12 Tom Tromey <tromey@redhat.com> * server.c (handle_query, handle_v_run): Use hex2bin, not unhexify. * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
This commit is contained in:
@@ -127,25 +127,6 @@ hex2bin (const char *hex, gdb_byte *bin, int count)
|
||||
return i;
|
||||
}
|
||||
|
||||
int
|
||||
unhexify (char *bin, const char *hex, int count)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if (hex[0] == 0 || hex[1] == 0)
|
||||
{
|
||||
/* Hex string is short, or of uneven length.
|
||||
Return the count that has been converted so far. */
|
||||
return i;
|
||||
}
|
||||
*bin++ = fromhex (hex[0]) * 16 + fromhex (hex[1]);
|
||||
hex += 2;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
void
|
||||
convert_ascii_to_int (const char *from, unsigned char *to, int n)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user