PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ deparse_hex()

void deparse_hex ( uint8_t  str,
char *  result 
)
extern

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 614 of file lwgeom_api.c.

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

References result, and str.

Referenced by convert_bytes_to_hex().

Here is the caller graph for this function: