20000-05-18 H.J. Lu (hjl@gnu.org)
[binutils-gdb.git] / gdb / serial.h
index 11554d789c1b4422950bd1ca3a043c097ed2b6d3..4aff1b0ecae6e4e3b198ab4055536aaa6b647b23 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote serial support interface definitions for GDB, the GNU Debugger.
-   Copyright 1992, 1993, 1999 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -54,14 +54,16 @@ extern void serial_un_fdopen (serial_t scb);
 #define SERIAL_UN_FDOPEN(SERIAL_T) serial_un_fdopen ((SERIAL_T))
 
 /* Read one char from the serial device with TIMEOUT seconds to wait
-   or -1 to wait forever.  Use timeout of 0 to effect a poll. Returns
-   unsigned char if ok, else one of the following codes.  Note that
-   all error return-codes are guaranteed to be < 0. */
+   or -1 to wait forever.  Use timeout of 0 to effect a poll.
+   Infinite waits are not permitted. Returns unsigned char if ok, else
+   one of the following codes.  Note that all error return-codes are
+   guaranteed to be < 0. */
 
 enum serial_rc {
   SERIAL_ERROR = -1,   /* General error. */
-  SERIAL_TIMEOUT = -2, /* Timeout during read. ui_loop_hook() can,
-                          unfortunatly, force this to be returned. */
+  SERIAL_TIMEOUT = -2, /* Timeout or data-not-ready during read.
+                          Unfortunatly, through ui_loop_hook(), this
+                          can also be a QUIT indication.  */
   SERIAL_EOF = -3      /* General end-of-file or remote target
                           connection closed, indication.  Includes
                           things like the line dropping dead. */
@@ -125,7 +127,7 @@ extern int serial_set_tty_state (serial_t scb, serial_ttystate ttystate);
    the specified STREAM. FIXME: At present this sends output to the
    default stream - GDB_STDOUT. */
 
-extern void serial_print_tty_state (serial_t scb, serial_ttystate ttystate, struct gdb_file *);
+extern void serial_print_tty_state (serial_t scb, serial_ttystate ttystate, struct ui_file *);
 #define SERIAL_PRINT_TTY_STATE(SERIAL_T, TTYSTATE, STREAM) serial_print_tty_state ((SERIAL_T), (TTYSTATE), (STREAM))
 
 /* Set the tty state to NEW_TTYSTATE, where OLD_TTYSTATE is the
@@ -236,7 +238,7 @@ struct serial_ops
     void (*go_raw) (serial_t);
     serial_ttystate (*get_tty_state) (serial_t);
     int (*set_tty_state) (serial_t, serial_ttystate);
-    void (*print_tty_state) (serial_t, serial_ttystate, struct gdb_file *);
+    void (*print_tty_state) (serial_t, serial_ttystate, struct ui_file *);
     int (*noflush_set_tty_state) (serial_t, serial_ttystate, serial_ttystate);
     int (*setbaudrate) (serial_t, int rate);
     int (*setstopbits) (serial_t, int num);