/builds/xfbs/passgen/src/pattern/literal.c
Line | Count | Source |
1 | | #include "passgen/pattern/literal.h" |
2 | | |
3 | 65.4k | void passgen_pattern_literal_init(passgen_pattern_literal *literal) { |
4 | 65.4k | literal->count = 0; |
5 | 65.4k | literal->tainted = 0; |
6 | 65.4k | } |
7 | | |
8 | 4.33k | void passgen_pattern_literal_taint(passgen_pattern_literal *literal) { |
9 | 4.33k | literal->tainted = 1; |
10 | 4.33k | } |
11 | | |
12 | | int passgen_pattern_literal_append( |
13 | | passgen_pattern_literal *literal, |
14 | 330k | uint32_t codepoint) { |
15 | 330k | if(literal->count >= 7 || literal->tainted303k ) { |
16 | 29.2k | return 1; |
17 | 29.2k | } |
18 | 301k | |
19 | 301k | literal->codepoints[literal->count] = codepoint; |
20 | 301k | literal->count += 1; |
21 | 301k | |
22 | 301k | return 0; |
23 | 301k | } |