Lines Matching refs:state

59 fill(State_t* state)
63 state->bp = state->buf + LINE;
64 if ((r = sfrd(state->codex->sp, state->bp, BUFFER, &state->codex->sfdisc)) <= 0)
66 state->be = state->bp;
69 state->be = state->bp + r;
70 return *state->bp++;
74 flush(register State_t* state, int c)
78 if (c < 0 && state->col)
80 state->col = 0;
81 PUTCHAR(state, '=');
82 PUTCHAR(state, '\n');
84 if (state->bp && (n = state->bp - state->buf) && sfwr(state->codex->sp, state->buf, n, &state->codex->sfdisc) != n)
86 state->be = (state->bp = state->buf) + sizeof(state->buf);
88 *state->bp++ = c;
95 register State_t* state;
98 if (!(state = newof(0, State_t, 1, 0)))
106 for (i = -1; i < elementsof(state->xeh); i++)
107 state->xeh[i] = -1;
109 state->xeh[hex[i]] = i >= 16 ? (i - 6) : i;
111 p->data = state;
112 state->codex = p;
119 register State_t* state = (State_t*)CODEX(disc)->data;
129 switch (c = GETCHAR(state))
132 if ((c = GETCHAR(state)) == '\n')
134 if ((d = state->xeh[c]) != EOF && (c = state->xeh[GETCHAR(state)]) != EOF)
163 while (s > x && state->bp > state->buf)
164 *--state->bp = *--s;
171 register State_t* state = (State_t*)CODEX(disc)->data;
178 if (state->pp)
180 s = state->prv;
181 e = state->pp;
182 state->col = 0;
188 col = state->col;
194 if (state->pp)
196 state->pp = 0;
197 state->col = col;
211 state->pp = state->prv;
213 *state->pp++ = s[c];
225 state->pp = state->prv;
226 *state->pp++ = c;
236 PUTCHAR(state, c);
242 PUTCHAR(state, '=');
243 PUTCHAR(state, '\n');
251 state->pp = state->prv;
252 *state->pp++ = c;
261 PUTCHAR(state, c);
271 PUTCHAR(state, c);
276 PUTCHAR(state, '=');
277 PUTCHAR(state, hex[(c >> 4) & 0xF]);
278 PUTCHAR(state, hex[c & 0xF]);
280 state->col = col;