+/* actions associated with putting the terminal in open mode */
+tostart()
+{
+ putpad(VS);
+ putpad(KS);
+ if (!value(MESG))
+ chmod(ttynbuf, 0611); /* 11 = urgent only allowed */
+}
+
+/*
+ * Turn off start/stop chars if they aren't the default ^S/^Q.
+ * This is so idiots who make esc their start/stop don't lose.
+ * We always turn off quit since datamedias send ^\ for their
+ * right arrow key.
+ */
+#ifdef TIOCGETC
+ttcharoff()
+{
+ nttyc.t_quitc = '\377';
+ if (nttyc.t_startc != CTRL(q))
+ nttyc.t_startc = '\377';
+ if (nttyc.t_stopc != CTRL(s))
+ nttyc.t_stopc = '\377';
+# ifdef TIOCLGET
+ nlttyc.t_suspc = '\377'; /* ^Z */
+ nlttyc.t_dsuspc = '\377'; /* ^Y */
+ nlttyc.t_flushc = '\377'; /* ^O */
+ nlttyc.t_lnextc = '\377'; /* ^V */
+# endif
+}
+#endif
+
+#ifdef USG3TTY
+ttcharoff()
+{
+ tty.c_cc[VQUIT] = '\377';
+# ifdef VSTART
+ /*
+ * The following is sample code if USG ever lets people change
+ * their start/stop chars. As long as they can't we can't get
+ * into trouble so we just leave them alone.
+ */
+ if (tty.c_cc[VSTART] != CTRL(q))
+ tty.c_cc[VSTART] = '\377';
+ if (tty.c_cc[VSTOP] != CTRL(s))
+ tty.c_cc[VSTOP] = '\377';
+# endif
+}
+#endif
+