PostGIS  2.4.9dev-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 648 of file lwgeom_api.c.

Referenced by convert_bytes_to_hex().

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