Lines Matching +full:0 +full:- +full:9
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
23 static constexpr uint8_t utf8Accept = 0;
29 // clang-format off in decode()
33 …0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //… in decode()
34 …0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //… in decode()
35 …0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //… in decode()
36 …0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //… in decode()
37 …1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, //… in decode()
40 … 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF in decode()
41 … 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF in decode()
42 … 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 in decode()
43 …1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, //… in decode()
49 // clang-format on in decode()
51 if (state > 0x8) in decode()
59 ? (byte & 0x3fU) | (codePoint << 6) in decode()
60 : static_cast<uint32_t>(0xff >> type) & (byte); in decode()
69 uint32_t codePoint = 0; in dumpEscaped()
71 std::size_t bytes = 0; // number of bytes written to string_buffer in dumpEscaped()
74 std::size_t bytesAfterLastAccept = 0; in dumpEscaped()
75 std::size_t undumpedChars = 0; in dumpEscaped()
77 for (std::size_t i = 0; i < str.size(); ++i) in dumpEscaped()
87 case 0x08: // backspace in dumpEscaped()
94 case 0x09: // horizontal tab in dumpEscaped()
101 case 0x0A: // newline in dumpEscaped()
108 case 0x0C: // formfeed in dumpEscaped()
115 case 0x0D: // carriage return in dumpEscaped()
122 case 0x22: // quotation mark in dumpEscaped()
133 case 0x27: // apostrophe in dumpEscaped()
144 case 0x26: // ampersand in dumpEscaped()
154 case 0x3C: // less than in dumpEscaped()
163 case 0x3E: // greater than in dumpEscaped()
174 // escape control characters (0x00..0x1F) in dumpEscaped()
175 if ((codePoint <= 0x1F) or (codePoint >= 0x7F)) in dumpEscaped()
177 if (codePoint <= 0xFFFF) in dumpEscaped()
179 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) in dumpEscaped()
187 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) in dumpEscaped()
191 0xD7C0 + (codePoint >> 10)), in dumpEscaped()
193 0xDC00 + (codePoint & 0x3FF))); in dumpEscaped()
209 // written ("\uxxxx\uxxxx\0") for one code point in dumpEscaped()
210 if (stringBuffer.size() - bytes < 13) in dumpEscaped()
213 bytes = 0; in dumpEscaped()
218 undumpedChars = 0; in dumpEscaped()
222 case utf8Reject: // decode found invalid UTF-8 byte in dumpEscaped()
228 if (undumpedChars > 0) in dumpEscaped()
230 --i; in dumpEscaped()
246 undumpedChars = 0; in dumpEscaped()
253 default: // decode found yet incomplete multi-byte code point in dumpEscaped()
265 if (bytes > 0) in dumpEscaped()
307 int> = 0>
313 {'0', '0'}, {'0', '1'}, {'0', '2'}, {'0', '3'}, {'0', '4'}, {'0', '5'}, in dumpInteger()
314 {'0', '6'}, {'0', '7'}, {'0', '8'}, {'0', '9'}, {'1', '0'}, {'1', '1'}, in dumpInteger()
316 {'1', '8'}, {'1', '9'}, {'2', '0'}, {'2', '1'}, {'2', '2'}, {'2', '3'}, in dumpInteger()
317 {'2', '4'}, {'2', '5'}, {'2', '6'}, {'2', '7'}, {'2', '8'}, {'2', '9'}, in dumpInteger()
318 {'3', '0'}, {'3', '1'}, {'3', '2'}, {'3', '3'}, {'3', '4'}, {'3', '5'}, in dumpInteger()
319 {'3', '6'}, {'3', '7'}, {'3', '8'}, {'3', '9'}, {'4', '0'}, {'4', '1'}, in dumpInteger()
321 {'4', '8'}, {'4', '9'}, {'5', '0'}, {'5', '1'}, {'5', '2'}, {'5', '3'}, in dumpInteger()
322 {'5', '4'}, {'5', '5'}, {'5', '6'}, {'5', '7'}, {'5', '8'}, {'5', '9'}, in dumpInteger()
323 {'6', '0'}, {'6', '1'}, {'6', '2'}, {'6', '3'}, {'6', '4'}, {'6', '5'}, in dumpInteger()
324 {'6', '6'}, {'6', '7'}, {'6', '8'}, {'6', '9'}, {'7', '0'}, {'7', '1'}, in dumpInteger()
326 {'7', '8'}, {'7', '9'}, {'8', '0'}, {'8', '1'}, {'8', '2'}, {'8', '3'}, in dumpInteger()
327 {'8', '4'}, {'8', '5'}, {'8', '6'}, {'8', '7'}, {'8', '8'}, {'8', '9'}, in dumpInteger()
328 {'9', '0'}, {'9', '1'}, {'9', '2'}, {'9', '3'}, {'9', '4'}, {'9', '5'}, in dumpInteger()
329 {'9', '6'}, {'9', '7'}, {'9', '8'}, {'9', '9'}, in dumpInteger()
332 // special case for "0" in dumpInteger()
333 if (number == 0) in dumpInteger()
335 out += '0'; in dumpInteger()
343 !(number >= 0); // see issue #755 in dumpInteger()
344 uint64_t absValue = 0; in dumpInteger()
346 unsigned int nChars = 0; in dumpInteger()
350 *bufferPtr = '-'; in dumpInteger()
351 absValue = static_cast<uint64_t>(0 - number); in dumpInteger()
362 // spare 1 byte for '\0' in dumpInteger()
363 if (nChars >= numberbuffer.size() - 1) in dumpInteger()
370 std::advance(bufferPtr, nChars - 1); in dumpInteger()
373 // Alexandrescu See: https://www.youtube.com/watch?v=o4-CwDo2zpg in dumpInteger()
380 *bufferPtr = digitsTo99[digitsIndex][0]; in dumpInteger()
389 *bufferPtr = digitsTo99[digitsIndex][0]; in dumpInteger()
394 *bufferPtr = static_cast<char>('0' + absValue); in dumpInteger()
482 // first n-1 elements in dump()
483 for (auto i = val.cbegin(); i != val.cend() - 1; ++i) in dump()
588 "text/html;charset=UTF-8"); in prettyPrintJson()