PostGIS  2.2.8dev-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 774 of file lwgeom_api.c.

Referenced by convert_bytes_to_hex().

775 {
776  int input_high;
777  int input_low;
778  static char outchr[]=
779  {
780  "0123456789ABCDEF"
781  };
782 
783  input_high = (str>>4);
784  input_low = (str & 0x0F);
785 
786  result[0] = outchr[input_high];
787  result[1] = outchr[input_low];
788 
789 }
Here is the caller graph for this function: