PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ deparse_hex()

void deparse_hex ( uint8_t  str,
char *  result 
)

Convert a char into a human readable hex digit.

Convert a char into a human readable hex digit.

Ie. deparse_hex( 255, mystr) -> mystr[0] = 'F' and mystr[1] = 'F'

No error checking done

Definition at line 624 of file lwgeom_api.c.

625 {
626  int input_high;
627  int input_low;
628  static char outchr[]=
629  {
630  "0123456789ABCDEF"
631  };
632 
633  input_high = (str>>4);
634  input_low = (str & 0x0F);
635 
636  result[0] = outchr[input_high];
637  result[1] = outchr[input_low];
638 
639 }
#define str(s)
Definition: lwgeom_api.c:36

References str.

Referenced by convert_bytes_to_hex().

Here is the caller graph for this function: