PostGIS  3.3.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 618 of file lwgeom_api.c.

619 {
620  int input_high;
621  int input_low;
622  static char outchr[]=
623  {
624  "0123456789ABCDEF"
625  };
626 
627  input_high = (str>>4);
628  input_low = (str & 0x0F);
629 
630  result[0] = outchr[input_high];
631  result[1] = outchr[input_low];
632 
633 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
#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: