patch-comgt_c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- comgt.0.32.orig/comgt.c 2006-10-20 16:49:46.000000000 +0200
  2. +++ comgt.0.32/comgt.c 2013-12-28 19:40:28.000000000 +0100
  3. @@ -30,7 +30,7 @@
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <signal.h>
  7. -#include <termio.h>
  8. +#include <termios.h>
  9. #include <fcntl.h>
  10. #include <unistd.h>
  11. #include <string.h>
  12. @@ -81,7 +81,7 @@ char token[MAXTOKEN]; /* For gettoken(
  13. char scriptfile[MAXPATH]; /* Script file name */
  14. char scriptfilepath[MAXPATH]; /* temp storage for full path */
  15. BOOL verbose=0; /* Log actions */
  16. -struct termio cons, stbuf, svbuf; /* termios: svbuf=before, stbuf=while */
  17. +struct termios cons, stbuf, svbuf; /* termios: svbuf=before, stbuf=while */
  18. int comfd=0; /* Communication file descriptor. Defaults to stdin. */
  19. char msg[STRINGL]; /* Massage messages here */
  20. int preturn,returns[MAXGOSUBS];
  21. @@ -926,7 +926,7 @@ void setcom(void) {
  22. }
  23. void doset(void) {
  24. - struct termio console;
  25. + struct termios console;
  26. int a,b;
  27. gettoken();
  28. if(strcmp(token,"echo")==0) {
  29. @@ -1281,7 +1281,7 @@ void opengt(void) {
  30. parity=stbuf.c_cflag & (PARENB | PARODD);
  31. stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
  32. stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
  33. - stbuf.c_lflag &= ~(ICANON | XCASE | ECHO | ECHOE | ECHONL);
  34. + stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
  35. stbuf.c_lflag &= ~(ECHO | ECHOE);
  36. stbuf.c_cc[VMIN] = 1;
  37. stbuf.c_cc[VTIME] = 0;
  38. @@ -1336,7 +1336,7 @@ void opendevice(void) {
  39. parity=stbuf.c_cflag & (PARENB | PARODD);
  40. stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
  41. stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
  42. - stbuf.c_lflag &= ~(ICANON | XCASE | ECHO | ECHOE | ECHONL);
  43. + stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
  44. stbuf.c_lflag &= ~(ECHO | ECHOE);
  45. stbuf.c_cc[VMIN] = 1;
  46. stbuf.c_cc[VTIME] = 0;