PostGIS  3.4.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 617 of file lwgeom_api.c.

618 {
619  int input_high;
620  int input_low;
621  static char outchr[]=
622  {
623  "0123456789ABCDEF"
624  };
625 
626  input_high = (str>>4);
627  input_low = (str & 0x0F);
628 
629  result[0] = outchr[input_high];
630  result[1] = outchr[input_low];
631 
632 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
#define str(s)
Definition: lwgeom_api.c:36

References result, and str.

Referenced by convert_bytes_to_hex().

Here is the caller graph for this function: