mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
* srec.c (hex_value): Always set to a size of 256 bytes. (srec_init): Cosmetic changes.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||||
|
|
||||||
|
* srec.c (hex_value): Always set to a size of 256 bytes.
|
||||||
|
(srec_init): Cosmetic changes.
|
||||||
|
|
||||||
Sun Feb 27 11:18:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
|
Sun Feb 27 11:18:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
* elf32-hppa.c: Second half of major cleanup. More comments,
|
* elf32-hppa.c: Second half of major cleanup. More comments,
|
||||||
|
11
bfd/srec.c
11
bfd/srec.c
@ -107,11 +107,13 @@ DESCRIPTION
|
|||||||
#include "sysdep.h"
|
#include "sysdep.h"
|
||||||
#include "libbfd.h"
|
#include "libbfd.h"
|
||||||
|
|
||||||
/* Macros for converting between hex and binary */
|
/* Macros for converting between hex and binary. */
|
||||||
|
|
||||||
static CONST char digs[] = "0123456789ABCDEF";
|
static CONST char digs[] = "0123456789ABCDEF";
|
||||||
|
|
||||||
static char hex_value[1 + (unsigned char) ~0];
|
/* Table that gets filled in with numbers corresponding to hex chars. */
|
||||||
|
|
||||||
|
static char hex_value[256];
|
||||||
|
|
||||||
#define NOT_HEX 20
|
#define NOT_HEX 20
|
||||||
#define NIBBLE(x) hex_value[(unsigned char)(x)]
|
#define NIBBLE(x) hex_value[(unsigned char)(x)]
|
||||||
@ -122,7 +124,7 @@ static char hex_value[1 + (unsigned char) ~0];
|
|||||||
ch += ((x) & 0xff);
|
ch += ((x) & 0xff);
|
||||||
#define ISHEX(x) (hex_value[(unsigned char)(x)] != NOT_HEX)
|
#define ISHEX(x) (hex_value[(unsigned char)(x)] != NOT_HEX)
|
||||||
|
|
||||||
|
/* Initialize by filling in the hex conversion array. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DEFUN_VOID (srec_init)
|
DEFUN_VOID (srec_init)
|
||||||
@ -132,18 +134,15 @@ DEFUN_VOID (srec_init)
|
|||||||
|
|
||||||
if (inited == false)
|
if (inited == false)
|
||||||
{
|
{
|
||||||
|
|
||||||
inited = true;
|
inited = true;
|
||||||
|
|
||||||
for (i = 0; i < sizeof (hex_value); i++)
|
for (i = 0; i < sizeof (hex_value); i++)
|
||||||
{
|
{
|
||||||
hex_value[i] = NOT_HEX;
|
hex_value[i] = NOT_HEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
hex_value[i + '0'] = i;
|
hex_value[i + '0'] = i;
|
||||||
|
|
||||||
}
|
}
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user