* doc/gdbint.texinfo (Host Definition): Remove documentation
[deliverable/binutils-gdb.git] / gdb / ser-unix.c
index f7ab28ae750d3ad0cddca1e5feec6d9c430001ec..6f64f419b3383399a986150df6a005205291ea83 100644 (file)
@@ -1,6 +1,7 @@
 /* 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.
 
@@ -98,8 +99,6 @@ static void reschedule (struct serial *scb);
 
 void _initialize_ser_hardwire (void);
 
-extern int (*ui_loop_hook) (int);
-
 /* Open up a real live device for serial I/O */
 
 static int
@@ -579,11 +578,12 @@ do_hardwire_readchar (struct serial *scb, int timeout)
       /* 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;
@@ -958,12 +958,13 @@ do_unix_readchar (struct serial *scb, int timeout)
       /* 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;
        }
 
@@ -1324,7 +1325,7 @@ ser_unix_async (struct serial *scb,
        case FD_SCHEDULED:
          delete_file_handler (scb->fd);
          break;
-       NOTHING_SCHEDULED:
+       case NOTHING_SCHEDULED:
          break;
        default: /* TIMER SCHEDULED */
          delete_timer (scb->async_state);
@@ -1337,7 +1338,7 @@ void
 _initialize_ser_hardwire (void)
 {
   struct serial_ops *ops = XMALLOC (struct serial_ops);
-  memset (ops, sizeof (struct serial_ops), 0);
+  memset (ops, 0, sizeof (struct serial_ops));
   ops->name = "hardwire";
   ops->next = 0;
   ops->open = hardwire_open;
This page took 0.024352 seconds and 4 git commands to generate.