+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>
* tuiCommand.h: Remove unused declarations.
} /* 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().
*/
int numToScroll = 1;
TuiWinInfoPtr winToScroll;
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
if (arg == (char *) NULL)
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
else
int numToScroll = 1;
TuiWinInfoPtr winToScroll;
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
if (arg == (char *) NULL)
_parseScrollingArgs (arg, &winToScroll, (int *) NULL);
else
int numToScroll;
TuiWinInfoPtr winToScroll;
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
tui_scroll (LEFT_SCROLL, winToScroll, numToScroll);
}
int numToScroll;
TuiWinInfoPtr winToScroll;
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
_parseScrollingArgs (arg, &winToScroll, &numToScroll);
tui_scroll (RIGHT_SCROLL, winToScroll, numToScroll);
}
{
if (arg != (char *) NULL)
{
- char *bufPtr = (char *) tuiStrDup (arg);
+ char *bufPtr = (char *) xstrdup (arg);
int i;
TuiWinInfoPtr winInfo = (TuiWinInfoPtr) NULL;
return;
} /* _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()
*/
static void
_tuiSetFocus_command (char *arg, int fromTTY)
{
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
_tuiSetFocus (arg, fromTTY);
}
static void
_tuiRefreshAll_command (char *arg, int fromTTY)
{
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
+
tuiRefreshAll ();
}
static void
_tuiSetTabWidth_command (char *arg, int fromTTY)
{
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
if (arg != (char *) NULL)
{
int ts;
static void
_tuiSetWinHeight (char *arg, int fromTTY)
{
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
if (arg != (char *) NULL)
{
- char *buf = tuiStrDup (arg);
+ char *buf = xstrdup (arg);
char *bufPtr = buf;
char *wname = (char *) NULL;
int newHeight, i;
return;
} /* _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().
** Set the height of the specified window, with va_list.
static void
_tuiSetWinHeight_command (char *arg, int fromTTY)
{
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
_tuiSetWinHeight (arg, fromTTY);
}
static void
_tuiXDBsetWinHeight (char *arg, int fromTTY)
{
+ /* Make sure the curses mode is enabled. */
+ tui_enable ();
if (arg != (char *) NULL)
{
int inputNo = atoi (arg);
return;
} /* _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().
** Set the height of the specified window, with va_list.
char *buf, *bufPtr;
/* process the number of lines to scroll */
- buf = bufPtr = tuiStrDup (arg);
+ buf = bufPtr = xstrdup (arg);
if (isdigit (*bufPtr))
{
char *numStr;