- if (!firstchar) return; /* too early to do anything */
-
- if (rt->pd->handler) {
- /* call custom handler */
-
- int answer = (*(rt->pd->handler))(rt, rt->pd->esbuf);
- if (answer == ROTE_HANDLERESULT_OK) {
- /* successfully handled */
-
- cancel_escape_sequence(rt);
- return;
- } else
- if (answer == ROTE_HANDLERESULT_NOTYET) {
- /* handler might handle it when more characters are appended to
- * it. So for now we don't interpret it */
- return;
- }
-
- /* If we got here then answer == ROTE_HANDLERESULT_NOWAY */
- /* handler said it can't handle that escape sequence,
- * but we can still try handling it ourselves, so
- * we proceed normally. */
- }