--- term.h.orig	2015-06-07 18:38:30.638390285 +0200
+++ term.h	2019-07-10 19:21:53.161394434 +0200
@@ -92,6 +92,9 @@
 #ifndef TERM_H
 #define TERM_H
 
+// allow arbitrary baud rates
+#define ANY_BAUD
+
 /* M MAX_TERMS
  *
  * Maximum nuber of terminals that can be managed by the library. Keep
@@ -464,7 +467,7 @@
 int term_set (int fd, 
               int raw, 
               int baud, 
-              enum parity_e parity, int bits, enum flowcntrl_e fc,
+              enum parity_e parity, int bits, int stopbits, enum flowcntrl_e fc,
 			  int local, int hupcl);
 
 /* F term_pulse_dtr
@@ -528,6 +531,71 @@
  */
 int term_break(int fd);
 
+/* F term_pulse_rts
+ *
+ * Pulses the DTR line of the device associated with the managed
+ * filedes "fd". The DTR line is lowered for 1sec and then raised
+ * again.
+ *
+ * Returns negative on failure, non negative on success.
+ */
+//int term_pulse_rts (int fd);
+
+/* F term_lower_rts
+ *
+ * Lowers the RTS line of the device associated with the managed
+ * filedes "fd".
+ *
+ * Returns negative on failure, non negative on success.
+ */
+int term_lower_rts (int fd);
+
+/* F term_raise_rts
+ *
+ * Raises the RTS line of the device associated with the managed
+ * filedes "fd".
+ *
+ * Returns negative on failure, non negative on success.
+ */
+int term_raise_rts (int fd);
+
+/* F term_get_baudrate
+ *
+ * Gets the baudrate in the "nexttermios" structure associated with
+ * the managed filedes "fd" to "baudrate". The effective settings of
+ * the device are not affected by this function.
+ *
+ * Supported baudrates: 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
+ *   1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400
+ *
+ * Returns negative on failure, non negative on success.
+ */
+int term_get_baudrate (int fd);
+
+int term_get_databits (int fd);
+
+/* F term_get_cflag
+ *
+ * Gets the c_cflag (control modes) structure from the "nexttermios" structure.
+ * The flags contain information about parity, hardware handshake, and bits.
+ */
+int term_get_cflag (int fd);
+
+/* F term_get_iflag
+ *
+ * Gets the c_iflag (input modes) structure from the "nexttermios" structure.
+ * The flags contain information about software handshake.
+ */
+int term_get_iflag (int fd);
+
+/* F term_get_modem_flags
+ *
+ * Gets the c_iflag (input modes) structure from the "nexttermios" structure.
+ * The flags contain information about software handshake.
+ */
+int term_get_modem_flags(int fd);
+
+
 /***************************************************************************/
 
 #endif /* of TERM_H */
