MCPcopy Create free account
hub / github.com/cppla/ServerStatus / str_hex

Function str_hex

server/src/system.c:1743–1755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1741}
1742
1743void str_hex(char *dst, int dst_size, const void *data, int data_size)
1744{
1745 static const char hex[] = "0123456789ABCDEF";
1746 int b;
1747
1748 for(b = 0; b < data_size && b < dst_size/4-4; b++)
1749 {
1750 dst[b*3] = hex[((const unsigned char *)data)[b]>>4];
1751 dst[b*3+1] = hex[((const unsigned char *)data)[b]&0xf];
1752 dst[b*3+2] = ' ';
1753 dst[b*3+3] = 0;
1754 }
1755}
1756
1757void str_timestamp(char *buffer, int buffer_size)
1758{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected