Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
hd_init.c File Reference
#include "gdtoaimp.h"
Include dependency graph for hd_init.c:

Go to the source code of this file.

Macros

#define USC   (unsigned char*)
 

Functions

static void htinit (unsigned char *h, const unsigned char *s, int inc)
 
void hexdig_init_D2A (Void)
 

Variables

unsigned char hexdig [256]
 

Macro Definition Documentation

◆ USC

#define USC   (unsigned char*)

Function Documentation

◆ hexdig_init_D2A()

void hexdig_init_D2A ( Void  )

Definition at line 52 of file hd_init.c.

53 {
54 #define USC (unsigned char*)
55  htinit(hexdig, USC "0123456789", 0x10);
56  htinit(hexdig, USC "abcdef", 0x10 + 10);
57  htinit(hexdig, USC "ABCDEF", 0x10 + 10);
58 }
unsigned char hexdig[256]
Definition: hd_init.c:34
#define USC
static void htinit(unsigned char *h, const unsigned char *s, int inc)
Definition: hd_init.c:42

References hexdig, htinit(), and USC.

Referenced by gethex(), and hexnan().

Here is the caller graph for this function:

◆ htinit()

static void htinit ( unsigned char *  h,
const unsigned char *  s,
int  inc 
)
static

Definition at line 42 of file hd_init.c.

44 {
45  int i, j;
46  for(i = 0; (j = s[i]) != 0; i++)
47  {
48  h[j] = (unsigned char)(i + inc);
49  }
50 }

Referenced by hexdig_init_D2A().

Variable Documentation

◆ hexdig

unsigned char hexdig[256]

Definition at line 34 of file hd_init.c.

Referenced by hexdig_init_D2A().