ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.590 by sf-exg, Tue May 11 18:46:50 2021 UTC vs.
Revision 1.591 by sf-exg, Thu May 13 19:40:19 2021 UTC

2352 } 2352 }
2353} 2353}
2354 2354
2355// read the next character 2355// read the next character
2356wchar_t ecb_hot 2356wchar_t ecb_hot
2357rxvt_term::next_char () NOTHROW 2357rxvt_term::next_char () noexcept
2358{ 2358{
2359 while (cmdbuf_ptr < cmdbuf_endp) 2359 while (cmdbuf_ptr < cmdbuf_endp)
2360 { 2360 {
2361 // assume 7-bit to be ascii ALWAYS (always true in POSIX) 2361 // assume 7-bit to be ascii ALWAYS (always true in POSIX)
2362 if (ecb_likely ((unsigned char)*cmdbuf_ptr <= 0x7f)) 2362 if (ecb_likely ((unsigned char)*cmdbuf_ptr <= 0x7f))
2388 return NOCHAR; 2388 return NOCHAR;
2389} 2389}
2390 2390
2391// read the next octet 2391// read the next octet
2392uint32_t ecb_hot 2392uint32_t ecb_hot
2393rxvt_term::next_octet () NOTHROW 2393rxvt_term::next_octet () noexcept
2394{ 2394{
2395 return cmdbuf_ptr < cmdbuf_endp 2395 return cmdbuf_ptr < cmdbuf_endp
2396 ? (unsigned char)*cmdbuf_ptr++ 2396 ? (unsigned char)*cmdbuf_ptr++
2397 : NOCHAR; 2397 : NOCHAR;
2398} 2398}
2399 2399
2400static class out_of_input out_of_input; 2400static class out_of_input out_of_input;
2401 2401
2402wchar_t ecb_hot 2402wchar_t ecb_hot
2403rxvt_term::cmd_getc () THROW ((class out_of_input)) 2403rxvt_term::cmd_getc ()
2404{ 2404{
2405 wchar_t c = next_char (); 2405 wchar_t c = next_char ();
2406 2406
2407 if (c == NOCHAR) 2407 if (c == NOCHAR)
2408 throw out_of_input; 2408 throw out_of_input;
2409 2409
2410 return c; 2410 return c;
2411} 2411}
2412 2412
2413uint32_t ecb_hot 2413uint32_t ecb_hot
2414rxvt_term::cmd_get8 () THROW ((class out_of_input)) 2414rxvt_term::cmd_get8 ()
2415{ 2415{
2416 uint32_t c = next_octet (); 2416 uint32_t c = next_octet ();
2417 2417
2418 if (c == NOCHAR) 2418 if (c == NOCHAR)
2419 throw out_of_input; 2419 throw out_of_input;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines