MCPcopy Create free account
hub / github.com/Genivia/ugrep / hex

Method hex

src/output.cpp:40–50  ·  view source on GitHub ↗

dump matching data in hex

Source from the content-addressed store, hash-verified

38
39// dump matching data in hex
40void Output::Dump::hex(short mode, size_t byte_offset, const char *data, size_t size)
41{
42 offset = byte_offset;
43 while (size > 0)
44 {
45 bytes[offset++ % flag_hex_columns] = (mode << 8) | *reinterpret_cast<const unsigned char*>(data++);
46 if (offset % flag_hex_columns == 0)
47 line();
48 --size;
49 }
50}
51
52// dump one line of hex
53void Output::Dump::line()

Callers 9

lineMethod · 0.45
operator()Method · 0.45
operator()Method · 0.45
output_before_contextMethod · 0.45
operator()Method · 0.45
output_before_contextMethod · 0.45
operator()Method · 0.45
output_restlineMethod · 0.45
searchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected