mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
* tuiWin.c (tuiStrDup): Remove, replaced by xstrdup.
(_parseScrollingArgs): Use xstrdup. (_tuiScrollForward_command): Call tui_enable() to force TUI mode. (_tuiScrollBackward_command): Likewise. (_tuiScrollLeft_command): Likewise. (_tuiScrollRight_command): Likewise. (_tuiSetFocus): Likewise. (_tuiSetFocus_command): Likewise. (_tuiRefreshAll_command): Likewise. (_tuiSetTabWidth_command): Likewise. (_tuiSetWinHeight): Likewise. (_tuiSetWinHeight_command): Likewise. (_tuiXDBsetWinHeight): Likewise. (_tui_vSetFocus): Remove. (_tui_vSetWinHeight): Remove. (_tui_vXDBsetWinHeight): Remove.
This commit is contained in:
@ -1,3 +1,22 @@
|
|||||||
|
2001-07-20 Stephane Carrez <Stephane.Carrez@worldnet.fr>
|
||||||
|
|
||||||
|
* tuiWin.c (tuiStrDup): Remove, replaced by xstrdup.
|
||||||
|
(_parseScrollingArgs): Use xstrdup.
|
||||||
|
(_tuiScrollForward_command): Call tui_enable() to force TUI mode.
|
||||||
|
(_tuiScrollBackward_command): Likewise.
|
||||||
|
(_tuiScrollLeft_command): Likewise.
|
||||||
|
(_tuiScrollRight_command): Likewise.
|
||||||
|
(_tuiSetFocus): Likewise.
|
||||||
|
(_tuiSetFocus_command): Likewise.
|
||||||
|
(_tuiRefreshAll_command): Likewise.
|
||||||
|
(_tuiSetTabWidth_command): Likewise.
|
||||||
|
(_tuiSetWinHeight): Likewise.
|
||||||
|
(_tuiSetWinHeight_command): Likewise.
|
||||||
|
(_tuiXDBsetWinHeight): Likewise.
|
||||||
|
(_tui_vSetFocus): Remove.
|
||||||
|
(_tui_vSetWinHeight): Remove.
|
||||||
|
(_tui_vXDBsetWinHeight): Remove.
|
||||||
|
|
||||||
2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr>
|
2001-07-21 Stephane Carrez <Stephane.Carrez@worldnet.fr>
|
||||||
|
|
||||||
* tuiCommand.h: Remove unused declarations.
|
* tuiCommand.h: Remove unused declarations.
|
||||||
|
@ -189,21 +189,6 @@ tuiSetWinFocusTo (TuiWinInfoPtr winInfo)
|
|||||||
} /* tuiSetWinFocusTo */
|
} /* tuiSetWinFocusTo */
|
||||||
|
|
||||||
|
|
||||||
char *
|
|
||||||
tuiStrDup (char *str)
|
|
||||||
{
|
|
||||||
char *newStr = (char *) NULL;
|
|
||||||
|
|
||||||
if (str != (char *) NULL)
|
|
||||||
{
|
|
||||||
newStr = (char *) xmalloc (strlen (str) + 1);
|
|
||||||
strcpy (newStr, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
return newStr;
|
|
||||||
} /* tuiStrDup */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** tuiScrollForward().
|
** tuiScrollForward().
|
||||||
*/
|
*/
|
||||||
@ -578,6 +563,8 @@ _tuiScrollForward_command (char *arg, int fromTTY)
|
|||||||
int numToScroll = 1;
|
int numToScroll = 1;
|
||||||
TuiWinInfoPtr winToScroll;
|
TuiWinInfoPtr winToScroll;
|
||||||
|
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
if (arg == (char *) NULL)
|
if (arg == (char *) NULL)
|
||||||
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
|
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
|
||||||
else
|
else
|
||||||
@ -595,6 +582,8 @@ _tuiScrollBackward_command (char *arg, int fromTTY)
|
|||||||
int numToScroll = 1;
|
int numToScroll = 1;
|
||||||
TuiWinInfoPtr winToScroll;
|
TuiWinInfoPtr winToScroll;
|
||||||
|
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
if (arg == (char *) NULL)
|
if (arg == (char *) NULL)
|
||||||
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
|
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
|
||||||
else
|
else
|
||||||
@ -612,6 +601,8 @@ _tuiScrollLeft_command (char *arg, int fromTTY)
|
|||||||
int numToScroll;
|
int numToScroll;
|
||||||
TuiWinInfoPtr winToScroll;
|
TuiWinInfoPtr winToScroll;
|
||||||
|
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
|
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
|
||||||
tui_scroll (LEFT_SCROLL, winToScroll, numToScroll);
|
tui_scroll (LEFT_SCROLL, winToScroll, numToScroll);
|
||||||
}
|
}
|
||||||
@ -626,6 +617,8 @@ _tuiScrollRight_command (char *arg, int fromTTY)
|
|||||||
int numToScroll;
|
int numToScroll;
|
||||||
TuiWinInfoPtr winToScroll;
|
TuiWinInfoPtr winToScroll;
|
||||||
|
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
|
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
|
||||||
tui_scroll (RIGHT_SCROLL, winToScroll, numToScroll);
|
tui_scroll (RIGHT_SCROLL, winToScroll, numToScroll);
|
||||||
}
|
}
|
||||||
@ -640,7 +633,7 @@ _tuiSetFocus (char *arg, int fromTTY)
|
|||||||
{
|
{
|
||||||
if (arg != (char *) NULL)
|
if (arg != (char *) NULL)
|
||||||
{
|
{
|
||||||
char *bufPtr = (char *) tuiStrDup (arg);
|
char *bufPtr = (char *) xstrdup (arg);
|
||||||
int i;
|
int i;
|
||||||
TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
|
TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
|
||||||
|
|
||||||
@ -675,28 +668,14 @@ The window name specified must be valid and visible.\n");
|
|||||||
return;
|
return;
|
||||||
} /* _tuiSetFocus */
|
} /* _tuiSetFocus */
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** _tui_vSetFocus()
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
_tui_vSetFocus (va_list args)
|
|
||||||
{
|
|
||||||
char *arg = va_arg (args, char *);
|
|
||||||
int fromTTY = va_arg (args, int);
|
|
||||||
|
|
||||||
_tuiSetFocus (arg, fromTTY);
|
|
||||||
|
|
||||||
return;
|
|
||||||
} /* tui_vSetFocus */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** _tuiSetFocus_command()
|
** _tuiSetFocus_command()
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_tuiSetFocus_command (char *arg, int fromTTY)
|
_tuiSetFocus_command (char *arg, int fromTTY)
|
||||||
{
|
{
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
_tuiSetFocus (arg, fromTTY);
|
_tuiSetFocus (arg, fromTTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -733,6 +712,9 @@ _tuiAllWindowsInfo (char *arg, int fromTTY)
|
|||||||
static void
|
static void
|
||||||
_tuiRefreshAll_command (char *arg, int fromTTY)
|
_tuiRefreshAll_command (char *arg, int fromTTY)
|
||||||
{
|
{
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
|
|
||||||
tuiRefreshAll ();
|
tuiRefreshAll ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -744,6 +726,8 @@ _tuiRefreshAll_command (char *arg, int fromTTY)
|
|||||||
static void
|
static void
|
||||||
_tuiSetTabWidth_command (char *arg, int fromTTY)
|
_tuiSetTabWidth_command (char *arg, int fromTTY)
|
||||||
{
|
{
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
if (arg != (char *) NULL)
|
if (arg != (char *) NULL)
|
||||||
{
|
{
|
||||||
int ts;
|
int ts;
|
||||||
@ -766,9 +750,11 @@ _tuiSetTabWidth_command (char *arg, int fromTTY)
|
|||||||
static void
|
static void
|
||||||
_tuiSetWinHeight (char *arg, int fromTTY)
|
_tuiSetWinHeight (char *arg, int fromTTY)
|
||||||
{
|
{
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
if (arg != (char *) NULL)
|
if (arg != (char *) NULL)
|
||||||
{
|
{
|
||||||
char *buf = tuiStrDup (arg);
|
char *buf = xstrdup (arg);
|
||||||
char *bufPtr = buf;
|
char *bufPtr = buf;
|
||||||
char *wname = (char *) NULL;
|
char *wname = (char *) NULL;
|
||||||
int newHeight, i;
|
int newHeight, i;
|
||||||
@ -847,23 +833,6 @@ The window name specified must be valid and visible.\n");
|
|||||||
return;
|
return;
|
||||||
} /* _tuiSetWinHeight */
|
} /* _tuiSetWinHeight */
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** _tui_vSetWinHeight().
|
|
||||||
** Set the height of the specified window, with va_list.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
_tui_vSetWinHeight (va_list args)
|
|
||||||
{
|
|
||||||
char *arg = va_arg (args, char *);
|
|
||||||
int fromTTY = va_arg (args, int);
|
|
||||||
|
|
||||||
_tuiSetWinHeight (arg, fromTTY);
|
|
||||||
|
|
||||||
return;
|
|
||||||
} /* _tui_vSetWinHeight */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** _tuiSetWinHeight_command().
|
** _tuiSetWinHeight_command().
|
||||||
** Set the height of the specified window, with va_list.
|
** Set the height of the specified window, with va_list.
|
||||||
@ -871,6 +840,8 @@ _tui_vSetWinHeight (va_list args)
|
|||||||
static void
|
static void
|
||||||
_tuiSetWinHeight_command (char *arg, int fromTTY)
|
_tuiSetWinHeight_command (char *arg, int fromTTY)
|
||||||
{
|
{
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
_tuiSetWinHeight (arg, fromTTY);
|
_tuiSetWinHeight (arg, fromTTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -883,6 +854,8 @@ _tuiSetWinHeight_command (char *arg, int fromTTY)
|
|||||||
static void
|
static void
|
||||||
_tuiXDBsetWinHeight (char *arg, int fromTTY)
|
_tuiXDBsetWinHeight (char *arg, int fromTTY)
|
||||||
{
|
{
|
||||||
|
/* Make sure the curses mode is enabled. */
|
||||||
|
tui_enable ();
|
||||||
if (arg != (char *) NULL)
|
if (arg != (char *) NULL)
|
||||||
{
|
{
|
||||||
int inputNo = atoi (arg);
|
int inputNo = atoi (arg);
|
||||||
@ -907,23 +880,6 @@ _tuiXDBsetWinHeight (char *arg, int fromTTY)
|
|||||||
return;
|
return;
|
||||||
} /* _tuiXDBsetWinHeight */
|
} /* _tuiXDBsetWinHeight */
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
** _tui_vXDBsetWinHeight().
|
|
||||||
** Set the height of the specified window, with va_list.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
_tui_vXDBsetWinHeight (va_list args)
|
|
||||||
{
|
|
||||||
char *arg = va_arg (args, char *);
|
|
||||||
int fromTTY = va_arg (args, int);
|
|
||||||
|
|
||||||
_tuiXDBsetWinHeight (arg, fromTTY);
|
|
||||||
|
|
||||||
return;
|
|
||||||
} /* _tui_vXDBsetWinHeight */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** _tuiSetWinHeight_command().
|
** _tuiSetWinHeight_command().
|
||||||
** Set the height of the specified window, with va_list.
|
** Set the height of the specified window, with va_list.
|
||||||
@ -1363,7 +1319,7 @@ _parseScrollingArgs (char *arg, TuiWinInfoPtr * winToScroll, int *numToScroll)
|
|||||||
char *buf, *bufPtr;
|
char *buf, *bufPtr;
|
||||||
|
|
||||||
/* process the number of lines to scroll */
|
/* process the number of lines to scroll */
|
||||||
buf = bufPtr = tuiStrDup (arg);
|
buf = bufPtr = xstrdup (arg);
|
||||||
if (isdigit (*bufPtr))
|
if (isdigit (*bufPtr))
|
||||||
{
|
{
|
||||||
char *numStr;
|
char *numStr;
|
||||||
|
Reference in New Issue
Block a user