+2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * utils.c (init_page_info): Use tui_get_command_dimension.
+ * printcmd.c (disassemble_command): Simplify tui specific code,
+ use tui_is_window_visible, tui_show_assembly.
+
2001-07-21 Mark Kettenis <kettenis@gnu.org>
* i386bsd-nat.c: Do not include <sys/sysctl.h>.
#if defined(TUI)
if (tui_version && *exp == '$')
- display_it = ((TuiStatus) tuiDo (
- (TuiOpaqueFuncPtr) tui_vSetLayoutTo, exp) == TUI_FAILURE);
+ display_it = (tui_set_layout (exp) == TUI_FAILURE);
#endif
if (display_it)
error ("No function contains program counter for selected frame.\n");
#if defined(TUI)
else if (tui_version)
- low = (CORE_ADDR) tuiDo ((TuiOpaqueFuncPtr) tui_vGetLowDisassemblyAddress,
- (Opaque) low,
- (Opaque) pc);
+ low = tuiGetLowDisassemblyAddress (low, pc);
#endif
low += FUNCTION_START_OFFSET;
}
error ("No function contains specified address.\n");
#if defined(TUI)
else if (tui_version)
- low = (CORE_ADDR) tuiDo ((TuiOpaqueFuncPtr) tui_vGetLowDisassemblyAddress,
- (Opaque) low,
- (Opaque) pc);
+ low = tuiGetLowDisassemblyAddress (low, pc);
#endif
#if 0
if (overlay_debugging)
}
#if defined(TUI)
- if (!tui_version ||
- m_winPtrIsNull (disassemWin) || !disassemWin->generic.isVisible)
+ if (!tui_is_window_visible (DISASSEM_WIN))
#endif
{
printf_filtered ("Dump of assembler code ");
#if defined(TUI)
else
{
- tuiDo ((TuiOpaqueFuncPtr) tui_vAddWinToLayout, DISASSEM_WIN);
- tuiDo ((TuiOpaqueFuncPtr) tui_vUpdateSourceWindowsWithAddr, low);
+ tui_show_assembly (low);
}
#endif
}
init_page_info (void)
{
#if defined(TUI)
- if (tui_version && m_winPtrNotNull (cmdWin))
- {
- lines_per_page = cmdWin->generic.height;
- chars_per_line = cmdWin->generic.width;
- }
- else
+ if (!tui_get_command_dimension (&chars_per_line, &lines_per_page))
#endif
{
/* These defaults will be used if we are unable to get the correct