/* Serial interface for local (hardwired) serial ports on Un*x like systems
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+ 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
void _initialize_ser_hardwire (void);
-extern int (*ui_loop_hook) (int);
-
/* Open up a real live device for serial I/O */
static int
if (timeout > 0)
timeout++;
- /* We have to be able to keep the GUI alive here, so we break the original
- timeout into steps of 1 second, running the "keep the GUI alive" hook
- each time through the loop.
- Also, timeout = 0 means to poll, so we just set the delta to 0, so we
- will only go through the loop once. */
+ /* We have to be able to keep the GUI alive here, so we break the
+ original timeout into steps of 1 second, running the "keep the
+ GUI alive" hook each time through the loop.
+
+ Also, timeout = 0 means to poll, so we just set the delta to 0,
+ so we will only go through the loop once. */
delta = (timeout == 0 ? 0 : 1);
while (1)
/* N.B. The UI may destroy our world (for instance by calling
remote_stop,) in which case we want to get out of here as
quickly as possible. It is not safe to touch scb, since
- someone else might have freed it. The ui_loop_hook signals that
- we should exit by returning 1. */
+ someone else might have freed it. The
+ deprecated_ui_loop_hook signals that we should exit by
+ returning 1. */
- if (ui_loop_hook)
- detach = ui_loop_hook (0);
+ if (deprecated_ui_loop_hook)
+ detach = deprecated_ui_loop_hook (0);
if (detach)
return SERIAL_TIMEOUT;
{
if (i)
{
- warning ("Invalid baud rate %d. Closest values are %d and %d.",
+ warning (_("Invalid baud rate %d. Closest values are %d and %d."),
rate, baudtab[i - 1].rate, baudtab[i].rate);
}
else
{
- warning ("Invalid baud rate %d. Minimum value is %d.",
+ warning (_("Invalid baud rate %d. Minimum value is %d."),
rate, baudtab[0].rate);
}
return -1;
}
/* The requested speed was too large. */
- warning ("Invalid baud rate %d. Maximum value is %d.",
+ warning (_("Invalid baud rate %d. Maximum value is %d."),
rate, baudtab[i - 1].rate);
return -1;
}
int status;
int delta;
- /* We have to be able to keep the GUI alive here, so we break the original
- timeout into steps of 1 second, running the "keep the GUI alive" hook
- each time through the loop.
+ /* We have to be able to keep the GUI alive here, so we break the
+ original timeout into steps of 1 second, running the "keep the
+ GUI alive" hook each time through the loop.
- Also, timeout = 0 means to poll, so we just set the delta to 0, so we
- will only go through the loop once. */
+ Also, timeout = 0 means to poll, so we just set the delta to 0,
+ so we will only go through the loop once. */
delta = (timeout == 0 ? 0 : 1);
while (1)
/* N.B. The UI may destroy our world (for instance by calling
remote_stop,) in which case we want to get out of here as
quickly as possible. It is not safe to touch scb, since
- someone else might have freed it. The ui_loop_hook signals that
- we should exit by returning 1. */
+ someone else might have freed it. The
+ deprecated_ui_loop_hook signals that we should exit by
+ returning 1. */
- if (ui_loop_hook)
+ if (deprecated_ui_loop_hook)
{
- if (ui_loop_hook (0))
+ if (deprecated_ui_loop_hook (0))
return SERIAL_TIMEOUT;
}