• Home
  • Raw
  • Download

Lines Matching refs:parser

15   if(vt->parser.callbacks && vt->parser.callbacks->control)  in do_control()
16 if((*vt->parser.callbacks->control)(control, vt->parser.cbdata)) in do_control()
26 printf(" leader: %s\n", vt->parser.csi_leader); in do_csi()
27 for(int argi = 0; argi < vt->parser.csi_argi; argi++) { in do_csi()
28 printf(" %lu", CSI_ARG(vt->parser.csi_args[argi])); in do_csi()
29 if(!CSI_ARG_HAS_MORE(vt->parser.csi_args[argi])) in do_csi()
31 printf(" intermed: %s\n", vt->parser.intermed); in do_csi()
35 if(vt->parser.callbacks && vt->parser.callbacks->csi) in do_csi()
36 if((*vt->parser.callbacks->csi)( in do_csi()
37 vt->parser.csi_leaderlen ? vt->parser.csi_leader : NULL, in do_csi()
38 vt->parser.csi_args, in do_csi()
39 vt->parser.csi_argi, in do_csi()
40 vt->parser.intermedlen ? vt->parser.intermed : NULL, in do_csi()
42 vt->parser.cbdata)) in do_csi()
52 size_t len = vt->parser.intermedlen; in do_escape()
53 strncpy(seq, vt->parser.intermed, len); in do_escape()
57 if(vt->parser.callbacks && vt->parser.callbacks->escape) in do_escape()
58 if((*vt->parser.callbacks->escape)(seq, len, vt->parser.cbdata)) in do_escape()
66 if(len > vt->parser.strbuffer_len - vt->parser.strbuffer_cur) { in append_strbuffer()
67 len = vt->parser.strbuffer_len - vt->parser.strbuffer_cur; in append_strbuffer()
72 strncpy(vt->parser.strbuffer + vt->parser.strbuffer_cur, str, len); in append_strbuffer()
73 vt->parser.strbuffer_cur += len; in append_strbuffer()
79 vt->parser.stringtype = type; in start_string()
81 vt->parser.strbuffer_cur = 0; in start_string()
91 if(vt->parser.strbuffer_cur) { in done_string()
95 str = vt->parser.strbuffer; in done_string()
96 len = vt->parser.strbuffer_cur; in done_string()
103 switch(vt->parser.stringtype) { in done_string()
105 if(vt->parser.callbacks && vt->parser.callbacks->osc) in done_string()
106 if((*vt->parser.callbacks->osc)(str, len, vt->parser.cbdata)) in done_string()
113 if(vt->parser.callbacks && vt->parser.callbacks->dcs) in done_string()
114 if((*vt->parser.callbacks->dcs)(str, len, vt->parser.cbdata)) in done_string()
130 switch(vt->parser.state) { in vterm_input_write()
144 #define ENTER_STRING_STATE(st) do { vt->parser.state = STRING; string_start = bytes + pos + 1; } wh… in vterm_input_write()
145 #define ENTER_STATE(st) do { vt->parser.state = st; string_start = NULL; } while(0) in vterm_input_write()
152 if(vt->parser.state >= STRING) { in vterm_input_write()
163 vt->parser.intermedlen = 0; in vterm_input_write()
164 if(vt->parser.state == STRING) in vterm_input_write()
165 vt->parser.state = ESC_IN_STRING; in vterm_input_write()
171 vt->parser.state == STRING) { in vterm_input_write()
175 if(vt->parser.state >= STRING) in vterm_input_write()
178 if(vt->parser.state >= STRING) in vterm_input_write()
184 switch(vt->parser.state) { in vterm_input_write()
187 vt->parser.state = STRING; in vterm_input_write()
192 vt->parser.state = ESC; in vterm_input_write()
202 vt->parser.csi_leaderlen = 0; in vterm_input_write()
211 if(vt->parser.intermedlen < INTERMED_MAX-1) in vterm_input_write()
212 vt->parser.intermed[vt->parser.intermedlen++] = c; in vterm_input_write()
214 else if(!vt->parser.intermedlen && c >= 0x40 && c < 0x60) { in vterm_input_write()
231 if(vt->parser.csi_leaderlen < CSI_LEADER_MAX-1) in vterm_input_write()
232 vt->parser.csi_leader[vt->parser.csi_leaderlen++] = c; in vterm_input_write()
237 vt->parser.csi_leader[vt->parser.csi_leaderlen] = 0; in vterm_input_write()
239 vt->parser.csi_argi = 0; in vterm_input_write()
240 vt->parser.csi_args[0] = CSI_ARG_MISSING; in vterm_input_write()
241 vt->parser.state = CSI_ARGS; in vterm_input_write()
247 if(vt->parser.csi_args[vt->parser.csi_argi] == CSI_ARG_MISSING) in vterm_input_write()
248 vt->parser.csi_args[vt->parser.csi_argi] = 0; in vterm_input_write()
249 vt->parser.csi_args[vt->parser.csi_argi] *= 10; in vterm_input_write()
250 vt->parser.csi_args[vt->parser.csi_argi] += c - '0'; in vterm_input_write()
254 vt->parser.csi_args[vt->parser.csi_argi] |= CSI_ARG_FLAG_MORE; in vterm_input_write()
258 vt->parser.csi_argi++; in vterm_input_write()
259 vt->parser.csi_args[vt->parser.csi_argi] = CSI_ARG_MISSING; in vterm_input_write()
264 vt->parser.csi_argi++; in vterm_input_write()
265 vt->parser.intermedlen = 0; in vterm_input_write()
266 vt->parser.state = CSI_INTERMED; in vterm_input_write()
269 if(vt->parser.intermedlen < INTERMED_MAX-1) in vterm_input_write()
270 vt->parser.intermed[vt->parser.intermedlen++] = c; in vterm_input_write()
277 vt->parser.intermed[vt->parser.intermedlen] = 0; in vterm_input_write()
313 if(vt->parser.callbacks && vt->parser.callbacks->text) in vterm_input_write()
314 eaten = (*vt->parser.callbacks->text)(bytes + pos, len - pos, vt->parser.cbdata); in vterm_input_write()
333 vt->parser.callbacks = callbacks; in vterm_parser_set_callbacks()
334 vt->parser.cbdata = user; in vterm_parser_set_callbacks()
339 return vt->parser.cbdata; in vterm_parser_get_cbdata()