/*
-** This module contains functions to support i/o in the TUI
-*/
+ ** This module contains functions to support i/o in the TUI
+ */
#include <stdio.h>
*********************************************************************************/
/*
-** tuiPuts_unfiltered().
-** Function to put a string to the command window
-** When running in TUI mode, this is the "hook"
-** for fputs_unfiltered(). That is, all debugger
-** output eventually makes it's way to the bottom-level
-** routine fputs_unfiltered (main.c), which (in TUI
-** mode), calls tuiPuts_unfiltered().
-*/
+ ** tuiPuts_unfiltered().
+ ** Function to put a string to the command window
+ ** When running in TUI mode, this is the "hook"
+ ** for fputs_unfiltered(). That is, all debugger
+ ** output eventually makes it's way to the bottom-level
+ ** routine fputs_unfiltered (main.c), which (in TUI
+ ** mode), calls tuiPuts_unfiltered().
+ */
void
#ifdef __STDC__
tuiPuts_unfiltered (
/* Backspace. */
/* We see this on an emacs control-B.
- * I.e., it's like the left-arrow key (not like the backspace key).
- * The effect that readline wants when it transmits this
- * character to us is simply to back up one character
- * (but not to write a space over the old character).
- */
+ * I.e., it's like the left-arrow key (not like the backspace key).
+ * The effect that readline wants when it transmits this
+ * character to us is simply to back up one character
+ * (but not to write a space over the old character).
+ */
_updateCommandInfo (-1);
wmove (cmdWin->generic.handle,
{
/* This is actually a tgoto() specifying a character position,
- * followed by either a term_IC/term_DC which [I think] means
- * insert/delete one character at that position.
- * There are complications with this one - need to either
- * extract the position from the string, or have a backdoor
- * means of communicating it from ../readline/display.c.
- * So this one is not yet implemented.
- * Not doing it seems to have no ill effects on command-line-editing
- * that I've noticed so far. - RT
- */
+ * followed by either a term_IC/term_DC which [I think] means
+ * insert/delete one character at that position.
+ * There are complications with this one - need to either
+ * extract the position from the string, or have a backdoor
+ * means of communicating it from ../readline/display.c.
+ * So this one is not yet implemented.
+ * Not doing it seems to have no ill effects on command-line-editing
+ * that I've noticed so far. - RT
+ */
}
else if (str == term_dc)
insert_mode = 0;
/* Strings we know about but don't handle
- * specially here are just passed along to tputs().
- *
- * These are not handled because (as far as I can tell)
- * they are not actually emitted by the readline package
- * in the course of doing command-line editing. Some of them
- * theoretically could be used in the future, in which case we'd
- * need to handle them.
- */
+ * specially here are just passed along to tputs().
+ *
+ * These are not handled because (as far as I can tell)
+ * they are not actually emitted by the readline package
+ * in the course of doing command-line editing. Some of them
+ * theoretically could be used in the future, in which case we'd
+ * need to handle them.
+ */
}
else if (str == term_ic || /* insert character */
str == term_cursor_move || /* cursor move */
- str == term_clrpag ||/* clear page */
+ str == term_clrpag || /* clear page */
str == term_mm || /* turn on meta key */
str == term_mo || /* turn off meta key */
str == term_up || /* up one line (not expected) */
- str == term_scroll_region || /* set scroll region */
+ str == term_scroll_region || /* set scroll region */
str == term_memory_lock || /* lock screen above cursor */
- str == term_memory_unlock || /* unlock screen above cursor */
+ str == term_memory_unlock || /* unlock screen above cursor */
str == visible_bell)
{ /* flash screen */
tputs (str, affcnt, putfunc);
/*
-** tui_vwgetch()
-** Wrapper around wgetch with the window in a va_list
-*/
+ ** tui_vwgetch()
+ ** Wrapper around wgetch with the window in a va_list
+ */
unsigned int
#ifdef __STDC__
tui_vwgetch (va_list args)
/*
-** tui_vread()
-** Wrapper around read() with paramets in a va_list
-*/
+ ** tui_vread()
+ ** Wrapper around read() with paramets in a va_list
+ */
unsigned int
#ifdef __STDC__
tui_vread (va_list args)
} /* tui_vread() */
/*
-** tuiRead()
-** Function to perform a read() catching resize events
-*/
+ ** tuiRead()
+ ** Function to perform a read() catching resize events
+ */
int
#ifdef __STDC__
tuiRead (
/*
-** tuiGetc().
-** Get a character from the command window.
-** This is called from the readline package,
-** that is, we have:
-** tuiGetc() [here], called from
-** readline code [in ../readline/], called from
-** command_line_input() in top.c
-*/
+ ** tuiGetc().
+ ** Get a character from the command window.
+ ** This is called from the readline package,
+ ** that is, we have:
+ ** tuiGetc() [here], called from
+ ** readline code [in ../readline/], called from
+ ** command_line_input() in top.c
+ */
unsigned int
#ifdef __STDC__
tuiGetc (void)
/*
-** tuiBufferGetc().
-*/
+ ** tuiBufferGetc().
+ */
/*elz: this function reads a line of input from the user and
-puts it in a static buffer. Subsequent calls to this same function
-obtain one char at the time, providing the caller with a behavior
-similar to fgetc. When the input is buffered, the backspaces have
-the needed effect, i.e. ignore the last char active in the buffer*/
+ puts it in a static buffer. Subsequent calls to this same function
+ obtain one char at the time, providing the caller with a behavior
+ similar to fgetc. When the input is buffered, the backspaces have
+ the needed effect, i.e. ignore the last char active in the buffer */
/* so far this function is called only from the query function in
-utils.c*/
+ utils.c */
unsigned int
#ifdef __STDC__
if (length_of_answer == -1)
{
- /* this is the first time through, need to read the answer*/
+ /* this is the first time through, need to read the answer */
do
{
/* Call the curses routine that reads one character */
if (index_read == length_of_answer)
{
- /*this is the last time through, reset for next query*/
+ /*this is the last time through, reset for next query */
index_read = -1;
length_of_answer = -1;
}
/*
-** tuiStartNewLines().
-*/
+ ** tuiStartNewLines().
+ */
void
#ifdef __STDC__
tuiStartNewLines (
/*
-** tui_vStartNewLines().
-** With numLines in a va_list
-*/
+ ** tui_vStartNewLines().
+ ** With numLines in a va_list
+ */
void
#ifdef __STDC__
tui_vStartNewLines (
/*
-** _tuiHandleResizeDuringIO
-** This function manages the cleanup when a resize has occured
-** From within a call to getch() or read. Returns the character
-** to return from getc or read.
-*/
+ ** _tuiHandleResizeDuringIO
+ ** This function manages the cleanup when a resize has occured
+ ** From within a call to getch() or read. Returns the character
+ ** to return from getc or read.
+ */
static unsigned int
#ifdef __STDC__
_tuiHandleResizeDuringIO (
/*
-** _updateCommandInfo().
-** Function to update the command window information.
-*/
+ ** _updateCommandInfo().
+ ** Function to update the command window information.
+ */
static void
#ifdef __STDC__
_updateCommandInfo (
* case, since that is what applies on HP-UX. turn_off_echo
* is 1 except for the case where we're being called
* on a "quit", in which case we want to leave echo on.
- */
+ */
if (turn_off_echo)
{
#ifdef HAVE_TERMIOS
/* Compute the start and end lines of the command
* region. (Actually we only use end here)
- */
+ */
start = winList[CMD_WIN]->generic.origin.y;
end = start + winList[CMD_WIN]->generic.height - 1;
endcol = winList[CMD_WIN]->generic.width - 1;
} /* else we're out of luck */
/* This is an attempt to keep the logical & physical
- * cursor in synch, going into curses. Without this,
- * curses seems to be confused by the fact that
- * GDB has physically moved the curser on it. One
- * visible effect of removing this code is that the
- * locator window fails to get updated and the line
- * of text that *should* go into the locator window
- * often goes to the wrong place.
- */
+ * cursor in synch, going into curses. Without this,
+ * curses seems to be confused by the fact that
+ * GDB has physically moved the curser on it. One
+ * visible effect of removing this code is that the
+ * locator window fails to get updated and the line
+ * of text that *should* go into the locator window
+ * often goes to the wrong place.
+ */
/* What's done here is to tell curses to write a ' '
- * at the bottom right corner of the screen.
- * The idea is to wind up with the cursor in a known
- * place.
- * Note I'm relying on refresh()
- * only writing what changed (the space),
- * not the whole screen.
- */
+ * at the bottom right corner of the screen.
+ * The idea is to wind up with the cursor in a known
+ * place.
+ * Note I'm relying on refresh()
+ * only writing what changed (the space),
+ * not the whole screen.
+ */
standend ();
move (end, endcol - 1);
addch (' ');
/* We need to turn on echoing, since the TUI turns it off */
/* Below I only put in the TERMIOS case, since that
* is what applies on HP-UX.
- */
+ */
if (turn_on_echo)
{
#ifdef HAVE_TERMIOS
* region, as well as the last "real" line of
* the region (normally same as end, except when
* we're first populating the region)
- */
+ */
start = winList[CMD_WIN]->generic.origin.y;
end = start + winList[CMD_WIN]->generic.height - 1;
curline = start + winList[CMD_WIN]->detail.commandInfo.curLine;
/* We want to confine target I/O to the command region.
* In order to do so, we must either have "memory lock"
* (hpterm's) or "scroll regions" (xterm's).
- */
+ */
if (term_cursor_move && term_memory_lock)
{