patch-term_c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --- picocom-1.7.orig/term.c 2010-05-29 00:41:19.000000000 +0200
  2. +++ picocom-1.7/term.c 2013-12-26 09:45:20.000000000 +0100
  3. @@ -33,11 +33,7 @@
  4. #include <string.h>
  5. #include <errno.h>
  6. #include <unistd.h>
  7. -#ifdef __linux__
  8. -#include <termio.h>
  9. -#else
  10. #include <termios.h>
  11. -#endif /* of __linux__ */
  12. #include "term.h"
  13. @@ -945,27 +941,6 @@ term_pulse_dtr (int fd)
  14. break;
  15. }
  16. -#ifdef __linux__
  17. - {
  18. - int opins = TIOCM_DTR;
  19. -
  20. - r = ioctl(fd, TIOCMBIC, &opins);
  21. - if ( r < 0 ) {
  22. - term_errno = TERM_EDTRDOWN;
  23. - rval = -1;
  24. - break;
  25. - }
  26. -
  27. - sleep(1);
  28. -
  29. - r = ioctl(fd, TIOCMBIS, &opins);
  30. - if ( r < 0 ) {
  31. - term_errno = TERM_EDTRUP;
  32. - rval = -1;
  33. - break;
  34. - }
  35. - }
  36. -#else
  37. {
  38. struct termios tio, tioold;
  39. @@ -997,8 +972,6 @@ term_pulse_dtr (int fd)
  40. break;
  41. }
  42. }
  43. -#endif /* of __linux__ */
  44. -
  45. } while (0);
  46. return rval;
  47. @@ -1020,19 +993,6 @@ term_raise_dtr(int fd)
  48. rval = -1;
  49. break;
  50. }
  51. -
  52. -#ifdef __linux__
  53. - {
  54. - int opins = TIOCM_DTR;
  55. -
  56. - r = ioctl(fd, TIOCMBIS, &opins);
  57. - if ( r < 0 ) {
  58. - term_errno = TERM_EDTRUP;
  59. - rval = -1;
  60. - break;
  61. - }
  62. - }
  63. -#else
  64. r = tcsetattr(fd, TCSANOW, &term.currtermios[i]);
  65. if ( r < 0 ) {
  66. /* FIXME: perhaps try to update currtermios */
  67. @@ -1040,7 +1000,6 @@ term_raise_dtr(int fd)
  68. rval = -1;
  69. break;
  70. }
  71. -#endif /* of __linux__ */
  72. } while (0);
  73. return rval;
  74. @@ -1064,18 +1023,6 @@ term_lower_dtr(int fd)
  75. break;
  76. }
  77. -#ifdef __linux__
  78. - {
  79. - int opins = TIOCM_DTR;
  80. -
  81. - r = ioctl(fd, TIOCMBIC, &opins);
  82. - if ( r < 0 ) {
  83. - term_errno = TERM_EDTRDOWN;
  84. - rval = -1;
  85. - break;
  86. - }
  87. - }
  88. -#else
  89. {
  90. struct termios tio;
  91. @@ -1097,7 +1044,6 @@ term_lower_dtr(int fd)
  92. break;
  93. }
  94. }
  95. -#endif /* of __linux__ */
  96. } while (0);
  97. return rval;