Lines Matching refs:cc
52 #define CROM_END(cc) ((char *)(cc)->stack[0].dir + MAX_ROM - 1)
55 crom_init_context(struct crom_context *cc, uint32_t *p)
62 cc->depth = -1;
69 cc->depth = -1;
72 cc->depth = 0;
73 cc->stack[0].dir = (struct csrdirectory *)p;
74 cc->stack[0].index = 0;
78 crom_get(struct crom_context *cc)
82 ptr = &cc->stack[cc->depth];
87 crom_next(struct crom_context *cc)
92 if (cc->depth < 0)
94 reg = crom_get(cc);
96 if (cc->depth >= CROM_MAX_DEPTH) {
100 cc->depth++;
102 ptr = &cc->stack[cc->depth];
108 ptr = &cc->stack[cc->depth];
112 (char *)crom_get(cc) <= CROM_END(cc))
118 if (cc->depth > 0) {
119 cc->depth--;
123 cc->depth = -1;
128 crom_search_key(struct crom_context *cc, uint8_t key)
132 while (cc->depth >= 0) {
133 reg = crom_get(cc);
136 crom_next(cc);
145 struct crom_context c, *cc;
148 cc = &c;
149 crom_init_context(cc, p);
150 while (cc->depth >= 0) {
151 reg = crom_get(cc);
163 crom_next(cc);
169 crom_parse_text(struct crom_context *cc, char *buf, int len)
177 if (cc->depth < 0)
180 reg = crom_get(cc);
186 if ((char *)(reg + reg->val) > CROM_END(cc)) {
194 if ((char *)textleaf + textleaf->crc_len > CROM_END(cc)) {
286 crom_desc(struct crom_context *cc, char *buf, size_t len)
294 reg = crom_get(cc);
378 crom_parse_text(cc, buf + l, len - l);