PostGIS  3.0.0dev-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 651 of file lwgeom_api.c.

Referenced by convert_bytes_to_hex().

652 {
653  int input_high;
654  int input_low;
655  static char outchr[]=
656  {
657  "0123456789ABCDEF"
658  };
659 
660  input_high = (str>>4);
661  input_low = (str & 0x0F);
662 
663  result[0] = outchr[input_high];
664  result[1] = outchr[input_low];
665 
666 }
Here is the caller graph for this function: