Lines Matching +full:auto +full:- +full:mode

2  * Copyright (c) 2019-2020 Hartmut Brandt.
36 #pragma clang diagnostic ignored "-Wgnu-string-literal-operator-template"
56 count_comment(A c, Constbuf_mode &mode) in count_comment() argument
59 mode = Constbuf_mode::BIN; in count_comment()
65 count_hex(A c, Constbuf_mode &mode, std::size_t &bits) in count_hex() argument
76 mode = Constbuf_mode::BIN; in count_hex()
82 handle_hex(A c, Constbuf_mode &mode, std::size_t &bit, U &n) in handle_hex() argument
85 n[bit / 8] |= ((c - '0') << 4) >> (bit % 8); in handle_hex()
90 n[bit / 8] |= ((c - 'a' + 10) << 4) >> (bit % 8); in handle_hex()
95 n[bit / 8] |= ((c - 'A' + 10) << 4) >> (bit % 8); in handle_hex()
101 mode = Constbuf_mode::BIN; in handle_hex()
107 count_check(A c, Constbuf_mode &mode, std::size_t &) in count_check() argument
111 mode = Constbuf_mode::BIN; in count_check()
117 handle_check(A c, Constbuf_mode &mode, std::size_t &bits, std::size_t &addr) in handle_check() argument
120 addr = 10 * addr + c - '0'; in handle_check()
125 mode = Constbuf_mode::BIN; in handle_check()
131 count_goto(A c, Constbuf_mode &mode, std::size_t &bits, std::size_t &addr) in count_goto() argument
134 addr = 10 * addr + c - '0'; in count_goto()
140 mode = Constbuf_mode::BIN; in count_goto()
146 count_bin(A c, Constbuf_mode &mode, std::size_t &bits, std::size_t &addr) in count_bin() argument
152 mode = Constbuf_mode::COMMENT; in count_bin()
156 mode = Constbuf_mode::HEX; in count_bin()
160 mode = Constbuf_mode::CHECK; in count_bin()
164 mode = Constbuf_mode::GOTO; in count_bin()
177 handle_bin(A c, Constbuf_mode &mode, std::size_t &bit, std::size_t &addr, U &n) in handle_bin() argument
183 mode = Constbuf_mode::COMMENT; in handle_bin()
187 mode = Constbuf_mode::HEX; in handle_bin()
191 mode = Constbuf_mode::CHECK; in handle_bin()
196 mode = Constbuf_mode::GOTO; in handle_bin()
226 auto mode = Constbuf_mode::BIN; in count_bits() local
228 for (auto c : {a...}) { in count_bits()
230 switch (mode) { in count_bits()
232 again = count_comment(c, mode); in count_bits()
235 again = count_check(c, mode, bits); in count_bits()
238 again = count_goto(c, mode, bits, addr); in count_bits()
241 again = count_hex(c, mode, bits); in count_bits()
244 again = count_bin(c, mode, bits, addr); in count_bits()
256 constexpr auto
258 auto
271 auto mode = Constbuf_mode::BIN; in constbuf() local
273 for (auto c : {a...}) { in constbuf()
275 switch (mode) { in constbuf()
277 again = count_comment(c, mode); in constbuf()
280 again = handle_check(c, mode, bit, addr); in constbuf()
283 again = count_goto(c, mode, bit, addr); in constbuf()
286 again = handle_hex(c, mode, bit, n); in constbuf()
289 again = handle_bin(c, mode, bit, addr, n); in constbuf()
302 constexpr auto
305 auto