+int
+serial_flush_output (struct serial *scb)
+{
+ return scb->ops->flush_output (scb);
+}
+
+int
+serial_flush_input (struct serial *scb)
+{
+ return scb->ops->flush_input (scb);
+}
+
+int
+serial_send_break (struct serial *scb)
+{
+ if (serial_logfp != NULL)
+ serial_logchar (serial_logfp, 'w', SERIAL_BREAK, 0);
+
+ return (scb->ops->send_break (scb));
+}
+
+void
+serial_raw (struct serial *scb)
+{
+ scb->ops->go_raw (scb);
+}
+
+serial_ttystate
+serial_get_tty_state (struct serial *scb)
+{
+ return scb->ops->get_tty_state (scb);
+}
+
+serial_ttystate
+serial_copy_tty_state (struct serial *scb, serial_ttystate ttystate)
+{
+ return scb->ops->copy_tty_state (scb, ttystate);
+}
+
+int
+serial_set_tty_state (struct serial *scb, serial_ttystate ttystate)
+{
+ return scb->ops->set_tty_state (scb, ttystate);
+}
+
+void
+serial_print_tty_state (struct serial *scb,
+ serial_ttystate ttystate,
+ struct ui_file *stream)
+{
+ scb->ops->print_tty_state (scb, ttystate, stream);
+}
+
+int
+serial_noflush_set_tty_state (struct serial *scb,
+ serial_ttystate new_ttystate,
+ serial_ttystate old_ttystate)
+{
+ return scb->ops->noflush_set_tty_state (scb, new_ttystate, old_ttystate);
+}
+
+int
+serial_setbaudrate (struct serial *scb, int rate)
+{
+ return scb->ops->setbaudrate (scb, rate);
+}
+
+int
+serial_setstopbits (struct serial *scb, int num)
+{
+ return scb->ops->setstopbits (scb, num);
+}
+
+int
+serial_can_async_p (struct serial *scb)
+{
+ return (scb->ops->async != NULL);
+}
+
+int
+serial_is_async_p (struct serial *scb)
+{
+ return (scb->ops->async != NULL) && (scb->async_handler != NULL);
+}
+
+void
+serial_async (struct serial *scb,
+ serial_event_ftype *handler,
+ void *context)
+{
+ int changed = ((scb->async_handler == NULL) != (handler == NULL));
+
+ scb->async_handler = handler;
+ scb->async_context = context;
+ /* Only change mode if there is a need. */
+ if (changed)
+ scb->ops->async (scb, handler != NULL);
+}
+
+void
+serial_debug (struct serial *scb, int debug_p)
+{
+ scb->debug_p = debug_p;
+}
+
+int
+serial_debug_p (struct serial *scb)
+{
+ return scb->debug_p || global_serial_debug_p;
+}
+
+#ifdef USE_WIN32API
+void
+serial_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except)
+{
+ if (scb->ops->wait_handle)
+ scb->ops->wait_handle (scb, read, except);
+ else
+ {
+ *read = (HANDLE) _get_osfhandle (scb->fd);
+ *except = NULL;