}
}
- if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_STRING_LEN, kbuf, len, DT_END)))
+ if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_STR_LEN, kbuf, len, DT_END)))
return;
if (len <= 0)
rxvt_term::cmd_parse ()
{
bool flag = false;
- unicode_t ch = NOCHAR;
+ wchar_t ch = NOCHAR;
char *seq_begin; // remember start of esc-sequence here
for (;;)
}
/* Read a text string from the input buffer */
- unicode_t buf[UBUFSIZ];
+ wchar_t buf[UBUFSIZ];
bool refreshnow = false;
int nlines = 0;
- unicode_t *str = buf;
- unicode_t *eol = str + min (ncol, UBUFSIZ);
+ wchar_t *str = buf;
+ wchar_t *eol = str + min (ncol, UBUFSIZ);
for (;;)
{
// scr_add_lines only works for nlines <= nrow - 1.
if (nlines >= nrow - 1)
{
- if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_USTRING_LEN, buf, str - buf, DT_END)))
- scr_add_lines (buf, nlines, str - buf);
+ if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))
+ scr_add_lines (buf, str - buf, nlines);
nlines = 0;
str = buf;
ch = next_char ();
}
- if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_USTRING_LEN, buf, str - buf, DT_END)))
- scr_add_lines (buf, nlines, str - buf);
+ if (!HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))
+ scr_add_lines (buf, str - buf, nlines);
/*
* If there have been a lot of new lines, then update the screen
return flag;
}
-// read the next octet
-unicode_t
-rxvt_term::next_octet ()
-{
- return cmdbuf_ptr < cmdbuf_endp
- ? *cmdbuf_ptr++
- : NOCHAR;
-}
-
// read the next character
-unicode_t
+wchar_t
rxvt_term::next_char ()
{
while (cmdbuf_ptr < cmdbuf_endp)
}
if (len == (size_t)-1)
- return *cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
+ return (unsigned char)*cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
// assume wchar == unicode
cmdbuf_ptr += len;
return NOCHAR;
}
+// read the next octet
+uint32_t
+rxvt_term::next_octet ()
+{
+ return cmdbuf_ptr < cmdbuf_endp
+ ? *cmdbuf_ptr++
+ : NOCHAR;
+}
+
/* rxvt_cmd_getc () - Return next input character */
/*
* Return the next input character after first passing any keyboard input
* to the command.
*/
-unicode_t
+wchar_t
rxvt_term::cmd_getc ()
{
- unicode_t c = next_char ();
+ wchar_t c = next_char ();
if (c == NOCHAR)
throw out_of_input;
return c;
}
-unicode_t
+uint32_t
rxvt_term::cmd_get8 ()
{
- unicode_t c = next_octet ();
+ uint32_t c = next_octet ();
if (c == NOCHAR)
throw out_of_input;
/* 8.3.87: NEXT LINE */
case C1_NEL: /* ESC E */
{
- unicode_t nlcr[] = { C0_LF, C0_CR };
- scr_add_lines (nlcr, 1, 2);
+ wchar_t nlcr[] = { C0_LF, C0_CR };
+ scr_add_lines (nlcr, sizeof (nlcr) / sizeof (nlcr [0]), 1);
}
break;
#if ENABLE_PERL
case URxvt_perl:
- if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_STRING, str, DT_END)))
+ if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_STR, str, DT_END)))
; // no responses yet
break;
#endif