<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- a/comgt.c
+++ b/comgt.c
@@ -30,7 +30,7 @@
 #include &lt;stdio.h&gt;
 #include &lt;stdlib.h&gt;
 #include &lt;signal.h&gt;
-#include &lt;termio.h&gt;
+#include &lt;termios.h&gt;
 #include &lt;fcntl.h&gt;
 #include &lt;unistd.h&gt;
 #include &lt;string.h&gt;
@@ -81,7 +81,7 @@ char token[MAXTOKEN];   /* For gettoken(
 char scriptfile[MAXPATH]; /* Script file name */
 char scriptfilepath[MAXPATH]; /* temp storage for full path */
 BOOL verbose=0; /* Log actions */
-struct termio cons, stbuf, svbuf;  /* termios: svbuf=before, stbuf=while */
+struct termios cons, stbuf, svbuf;  /* termios: svbuf=before, stbuf=while */
 int comfd=0; /* Communication file descriptor.  Defaults to stdin. */
 char msg[STRINGL]; /* Massage messages here */
 int preturn,returns[MAXGOSUBS];
@@ -172,7 +172,7 @@ void dotestkey(void) {
 
 /* Exit after resetting terminal settings */
 void ext(long xtc) {
-  ioctl(1, TCSETA, &amp;cons);
+  ioctl(1, TCSETS, &amp;cons);
   exit(xtc);
 }
 
@@ -920,24 +920,24 @@ BOOL getonoroff(void) {
 void setcom(void) {
   stbuf.c_cflag &amp;= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
   stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
-  if (ioctl(comfd, TCSETA, &amp;stbuf) &lt; 0) {
+  if (ioctl(comfd, TCSETS, &amp;stbuf) &lt; 0) {
     serror("Can't ioctl set device",1);
   }
 }
 
 void doset(void) {
-  struct termio console;
+  struct termios console;
   int a,b;
   gettoken();
   if(strcmp(token,"echo")==0) {
     a=0;
     if(getonoroff()) a=ECHO|ECHOE;
-    if(ioctl(0, TCGETA, &amp;console)&lt;0) {
+    if(ioctl(0, TCGETS, &amp;console)&lt;0) {
       serror("Can't ioctl FD zero!\n",2);
     }
     console.c_lflag &amp;= ~(ECHO | ECHOE);
     console.c_lflag |= a;
-    ioctl(0, TCSETA, &amp;console);
+    ioctl(0, TCSETS, &amp;console);
   }
   else if(strcmp(token,"senddelay")==0) {
     senddelay=10000L*getdvalue();
@@ -1224,7 +1224,7 @@ void doclose(void) {
   if(strcmp(token,"hardcom")==0) {
     if(comfd== -1) serror("Com device not open",1);
     vmsg("Closing device");
-    if (ioctl(comfd, TCSETA, &amp;svbuf) &lt; 0) {
+    if (ioctl(comfd, TCSETS, &amp;svbuf) &lt; 0) {
       sprintf(msg,"Can't ioctl set device %s.\n",device);
       serror(msg,1);
     }
@@ -1266,12 +1266,12 @@ void opengt(void) {
       ext(1);
     }
   }
-  if (ioctl (comfd, TCGETA, &amp;svbuf) &lt; 0) {
+  if (ioctl (comfd, TCGETS, &amp;svbuf) &lt; 0) {
     sprintf(msg,"Can't control %s, please try again.\n",device);
     serror(msg,1);
   }
   setenv("COMGTDEVICE",device,1);
-  ioctl(comfd, TCGETA, &amp;stbuf);
+  ioctl(comfd, TCGETS, &amp;stbuf);
   speed=stbuf.c_cflag &amp; CBAUD;
   if (high_speed == 0)  strcpy(cspeed,"115200");
   else strcpy(cspeed,"57600");
@@ -1303,11 +1303,11 @@ void opendevice(void) {
   }
   else comfd=0;
 
-  if (ioctl (comfd, TCGETA, &amp;svbuf) &lt; 0) {
+  if (ioctl (comfd, TCGETS, &amp;svbuf) &lt; 0) {
     sprintf(msg,"Can't ioctl get device %s.\n",device);
     serror(msg,1);
   }
-  ioctl(comfd, TCGETA, &amp;stbuf);
+  ioctl(comfd, TCGETS, &amp;stbuf);
   speed=stbuf.c_cflag &amp; CBAUD;
   switch(speed) {
     case B0: strcpy(cspeed,"0");break;
@@ -1553,7 +1553,7 @@ int main(int argc,char **argv) {
   skip_default=0;
   filep=NULL;
   scriptspace=4096;
-  ioctl(1, TCGETA, &amp;cons);
+  ioctl(1, TCGETS, &amp;cons);
   if((script=( char *)malloc(scriptspace))==NULL) {
     serror("Could not malloc()",3);
   }
</pre></body></html>