OLD | NEW |
1 /* TUI window generic functions. | 1 /* TUI window generic functions. |
2 | 2 |
3 Copyright (C) 1998-2004, 2006-2012 Free Software Foundation, Inc. | 3 Copyright (C) 1998-2004, 2006-2012 Free Software Foundation, Inc. |
4 | 4 |
5 Contributed by Hewlett-Packard Company. | 5 Contributed by Hewlett-Packard Company. |
6 | 6 |
7 This file is part of GDB. | 7 This file is part of GDB. |
8 | 8 |
9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
10 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 # define ACS_URCORNER '+' | 100 # define ACS_URCORNER '+' |
101 #endif | 101 #endif |
102 #ifndef ACS_HLINE | 102 #ifndef ACS_HLINE |
103 # define ACS_HLINE '-' | 103 # define ACS_HLINE '-' |
104 #endif | 104 #endif |
105 #ifndef ACS_VLINE | 105 #ifndef ACS_VLINE |
106 # define ACS_VLINE '|' | 106 # define ACS_VLINE '|' |
107 #endif | 107 #endif |
108 | 108 |
109 /* Possible values for tui-border-kind variable. */ | 109 /* Possible values for tui-border-kind variable. */ |
110 static const char *tui_border_kind_enums[] = { | 110 static const char *const tui_border_kind_enums[] = { |
111 "space", | 111 "space", |
112 "ascii", | 112 "ascii", |
113 "acs", | 113 "acs", |
114 NULL | 114 NULL |
115 }; | 115 }; |
116 | 116 |
117 /* Possible values for tui-border-mode and tui-active-border-mode. */ | 117 /* Possible values for tui-border-mode and tui-active-border-mode. */ |
118 static const char *tui_border_mode_enums[] = { | 118 static const char *const tui_border_mode_enums[] = { |
119 "normal", | 119 "normal", |
120 "standout", | 120 "standout", |
121 "reverse", | 121 "reverse", |
122 "half", | 122 "half", |
123 "half-standout", | 123 "half-standout", |
124 "bold", | 124 "bold", |
125 "bold-standout", | 125 "bold-standout", |
126 NULL | 126 NULL |
127 }; | 127 }; |
128 | 128 |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 || cur_layout == SRC_DATA_COMMAND | 683 || cur_layout == SRC_DATA_COMMAND |
684 || cur_layout == DISASSEM_DATA_COMMAND) | 684 || cur_layout == DISASSEM_DATA_COMMAND) |
685 num_wins_displayed++; | 685 num_wins_displayed++; |
686 split_diff = height_diff / num_wins_displayed; | 686 split_diff = height_diff / num_wins_displayed; |
687 cmd_split_diff = split_diff; | 687 cmd_split_diff = split_diff; |
688 if (height_diff % num_wins_displayed) | 688 if (height_diff % num_wins_displayed) |
689 { | 689 { |
690 if (height_diff < 0) | 690 if (height_diff < 0) |
691 cmd_split_diff--; | 691 cmd_split_diff--; |
692 else | 692 else |
693 » cmd_split_diff++; | 693 cmd_split_diff++; |
694 » } | 694 } |
695 /* Now adjust each window. */ | 695 /* Now adjust each window. */ |
696 clear (); | 696 /* erase + clearok are used instead of a straightforward clear as |
| 697 AIX 5.3 does not define clear. */ |
| 698 erase (); |
| 699 clearok (curscr, TRUE); |
697 refresh (); | 700 refresh (); |
698 switch (cur_layout) | 701 switch (cur_layout) |
699 » { | 702 { |
700 case SRC_COMMAND: | 703 case SRC_COMMAND: |
701 case DISASSEM_COMMAND: | 704 case DISASSEM_COMMAND: |
702 first_win = (struct tui_win_info *) (tui_source_windows ())->list[0]; | 705 first_win = (struct tui_win_info *) (tui_source_windows ())->list[0]; |
703 first_win->generic.width += width_diff; | 706 first_win->generic.width += width_diff; |
704 locator->width += width_diff; | 707 locator->width += width_diff; |
705 /* Check for invalid heights. */ | 708 /* Check for invalid heights. */ |
706 if (height_diff == 0) | 709 if (height_diff == 0) |
707 new_height = first_win->generic.height; | 710 new_height = first_win->generic.height; |
708 else if ((first_win->generic.height + split_diff) >= | 711 else if ((first_win->generic.height + split_diff) >= |
709 (screenheight - MIN_CMD_WIN_HEIGHT - 1)) | 712 (screenheight - MIN_CMD_WIN_HEIGHT - 1)) |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 if (buf_ptr != (char *) NULL) | 1579 if (buf_ptr != (char *) NULL) |
1577 { | 1580 { |
1578 char *wname; | 1581 char *wname; |
1579 int i; | 1582 int i; |
1580 | 1583 |
1581 if (*buf_ptr == ' ') | 1584 if (*buf_ptr == ' ') |
1582 while (*(++buf_ptr) == ' ') | 1585 while (*(++buf_ptr) == ' ') |
1583 ; | 1586 ; |
1584 | 1587 |
1585 if (*buf_ptr != (char) 0) | 1588 if (*buf_ptr != (char) 0) |
1586 » wname = buf_ptr; | 1589 » { |
| 1590 » wname = buf_ptr; |
| 1591 |
| 1592 » /* Validate the window name. */ |
| 1593 » for (i = 0; i < strlen (wname); i++) |
| 1594 » » wname[i] = toupper (wname[i]); |
| 1595 » } |
1587 else | 1596 else |
1588 wname = "?"; | 1597 wname = "?"; |
1589 | 1598 |
1590 /* Validate the window name. */ | |
1591 for (i = 0; i < strlen (wname); i++) | |
1592 wname[i] = toupper (wname[i]); | |
1593 *win_to_scroll = tui_partial_win_by_name (wname); | 1599 *win_to_scroll = tui_partial_win_by_name (wname); |
1594 | 1600 |
1595 if (*win_to_scroll == (struct tui_win_info *) NULL | 1601 if (*win_to_scroll == (struct tui_win_info *) NULL |
1596 || !(*win_to_scroll)->generic.is_visible) | 1602 || !(*win_to_scroll)->generic.is_visible) |
1597 error (_("Invalid window specified. \n\ | 1603 error (_("Invalid window specified. \n\ |
1598 The window name specified must be valid and visible.\n")); | 1604 The window name specified must be valid and visible.\n")); |
1599 else if (*win_to_scroll == TUI_CMD_WIN) | 1605 else if (*win_to_scroll == TUI_CMD_WIN) |
1600 *win_to_scroll = (tui_source_windows ())->list[0]; | 1606 *win_to_scroll = (tui_source_windows ())->list[0]; |
1601 } | 1607 } |
1602 xfree (buf); | 1608 xfree (buf); |
1603 } | 1609 } |
1604 } | 1610 } |
OLD | NEW |