curses.c (a5489ae5bbd270f2a72b2179a9adf4089e3fb7b8) | curses.c (a9fda24747321ab8bbd9f91d2ee6f2716c6d8d6b) |
---|---|
1/* 2 * QEMU curses/ncurses display driver 3 * 4 * Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org> 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 505 unchanged lines hidden (view full) --- 514 if (ucs_to_wchar_conv == (iconv_t) -1) { 515 fprintf(stderr, "Could not convert font glyphs from UCS-2: '%s'\n", 516 strerror(errno)); 517 exit(1); 518 } 519 520 wchar_to_ucs_conv = iconv_open("UCS-2", "WCHAR_T"); 521 if (wchar_to_ucs_conv == (iconv_t) -1) { | 1/* 2 * QEMU curses/ncurses display driver 3 * 4 * Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org> 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 505 unchanged lines hidden (view full) --- 514 if (ucs_to_wchar_conv == (iconv_t) -1) { 515 fprintf(stderr, "Could not convert font glyphs from UCS-2: '%s'\n", 516 strerror(errno)); 517 exit(1); 518 } 519 520 wchar_to_ucs_conv = iconv_open("UCS-2", "WCHAR_T"); 521 if (wchar_to_ucs_conv == (iconv_t) -1) { |
522 iconv_close(ucs_to_wchar_conv); |
|
522 fprintf(stderr, "Could not convert font glyphs to UCS-2: '%s'\n", 523 strerror(errno)); 524 exit(1); 525 } 526 527 font_conv = iconv_open("WCHAR_T", font_charset); 528 if (font_conv == (iconv_t) -1) { | 523 fprintf(stderr, "Could not convert font glyphs to UCS-2: '%s'\n", 524 strerror(errno)); 525 exit(1); 526 } 527 528 font_conv = iconv_open("WCHAR_T", font_charset); 529 if (font_conv == (iconv_t) -1) { |
530 iconv_close(ucs_to_wchar_conv); 531 iconv_close(wchar_to_ucs_conv); |
|
529 fprintf(stderr, "Could not convert font glyphs from %s: '%s'\n", 530 font_charset, strerror(errno)); 531 exit(1); 532 } 533 534 /* Control characters */ 535 for (i = 0; i <= 0x1F; i++) { 536 convert_ucs(i, control_characters[i], ucs_to_wchar_conv); --- 104 unchanged lines hidden (view full) --- 641 vga_to_curses[i] = *WACS_S7; 642 break; 643 case 0x23bd: 644 vga_to_curses[i] = *WACS_S9; 645 break; 646 } 647 } 648 } | 532 fprintf(stderr, "Could not convert font glyphs from %s: '%s'\n", 533 font_charset, strerror(errno)); 534 exit(1); 535 } 536 537 /* Control characters */ 538 for (i = 0; i <= 0x1F; i++) { 539 convert_ucs(i, control_characters[i], ucs_to_wchar_conv); --- 104 unchanged lines hidden (view full) --- 644 vga_to_curses[i] = *WACS_S7; 645 break; 646 case 0x23bd: 647 vga_to_curses[i] = *WACS_S9; 648 break; 649 } 650 } 651 } |
652 iconv_close(ucs_to_wchar_conv); 653 iconv_close(wchar_to_ucs_conv); 654 iconv_close(font_conv); |
|
649} 650 651static void curses_setup(void) 652{ 653 int i, colour_default[8] = { 654 [QEMU_COLOR_BLACK] = COLOR_BLACK, 655 [QEMU_COLOR_BLUE] = COLOR_BLUE, 656 [QEMU_COLOR_GREEN] = COLOR_GREEN, --- 84 unchanged lines hidden --- | 655} 656 657static void curses_setup(void) 658{ 659 int i, colour_default[8] = { 660 [QEMU_COLOR_BLACK] = COLOR_BLACK, 661 [QEMU_COLOR_BLUE] = COLOR_BLUE, 662 [QEMU_COLOR_GREEN] = COLOR_GREEN, --- 84 unchanged lines hidden --- |