- Timestamp:
- Jan 2, 2008, 2:42:05 AM (16 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- c60ade2
- Parents:
- 2febcae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
r5bc0f68 r47519e1b 70 70 owl_editwin *tw; 71 71 owl_popwin *pw; 72 int j, ret, initialsubs, debug, argcsave, followlast; 72 int ret, initialsubs, debug, argcsave, followlast; 73 gunichar j; 73 74 int newmsgs, nexttimediff; 74 75 struct sigaction sigact; … … 546 547 usleep(10000); 547 548 } else { 549 /* Pull in a full utf-8 character. */ 550 if (j & 0x80) { 551 char utf8buf[7]; 552 int bytes, i; 553 memset(utf8buf,'\0',7); 554 utf8buf[0] = j; 555 556 if (~j & 0x20) bytes = 2; 557 else if (~j & 0x10) bytes = 3; 558 else if (~j & 0x08) bytes = 4; 559 else if (~j & 0x04) bytes = 5; 560 else if (~j & 0x02) bytes = 6; 561 else bytes = 1; /* This won't validate */ 562 563 for (i = 1; i < bytes; i++) { 564 utf8buf[i] = wgetch(typwin); 565 } 566 if (g_utf8_validate(utf8buf, -1, NULL)) { 567 j = g_utf8_get_char(utf8buf); 568 } 569 else { 570 j = ERR; 571 } 572 } 548 573 owl_global_update_lastinputtime(&g); 549 574 /* find and activate the current keymap.
Note: See TracChangeset
for help on using the changeset viewer.