home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume11 / siotools.p7 < prev    next >
Encoding:
Text File  |  1990-03-15  |  7.5 KB  |  232 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v11i028: siotools v09i044/045 patch 7
  3. from: wht%n4hgf@gatech.edu (Warren Tucker)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 11, Issue 28
  7. Submitted-by: wht%n4hgf@gatech.edu (Warren Tucker)
  8. Archive-name: siotools.p7
  9.  
  10. Fixes more problems with some curses versions not restoring console tty
  11. upon exit.  This version has been tested successully on XENIX 2.2.1,
  12. 2.3.1 and 2.3.2 and on SCO UNIX 3.2.0, all of which _appear_ to have
  13. subtle libtcap.a (M_TERMCAP) curses libraries differences. I think I
  14. now code to correctly handle going in and out of raw mode for all the
  15. variations.
  16.  
  17. Unshar, type 'PATCH.7', make, check the Makefile LBIN definition, su
  18. root and make install.
  19.  
  20. #!/bin/sh
  21. # This is siotools.p7, a shell archive (shar 3.04)
  22. # made 03/12/1990 21:51 UTC by gatech!kd4nc!n4hgf!wht (wht%n4hgf@gatech.edu)
  23. # Source directory /u4/src/siotools/rel
  24. #
  25. # existing files WILL be overwritten
  26. #
  27. # This shar contains:
  28. #    PATCH.7
  29. #
  30. touch 2>&1 | fgrep '[-amc]' > /tmp/s3_touch$$
  31. if [ -s /tmp/s3_touch$$ ]
  32. then
  33.     TOUCH=can
  34. else
  35.     TOUCH=cannot
  36. fi
  37. rm -f /tmp/s3_touch$$
  38. echo "x - extracting PATCH.7 (Text)"
  39. sed 's/^X//' << 'SHAR_EOF' > PATCH.7 &&
  40. X:
  41. X#-----------------------------------------------------------------------
  42. X# siotools v09i044/v09i45 Patch 7
  43. X# Fix more problems with some curses versions not restoring console tty
  44. X# upon exit.  This version has been tested successully on XENIX 2.2.1,
  45. X# 2.3.1 and 2.3.2 and on SCO UNIX 3.2.0, all of which _appear_ to have
  46. X# subtle libtcap.a (M_TERMCAP) curses libraries differences. I think I
  47. X# now code to correctly handle going in and out of raw mode for all the
  48. X# variations.
  49. X#
  50. X# comp.source.misc references:
  51. X# v09i044: siotools part 1/2
  52. X# v09i045: siotools part 2/2
  53. X# v09i056: siotools patch 1
  54. X# v09i058: siotools patch 2
  55. X# v09i086: siotools patch 3
  56. X# v10i049: siotools patch 4
  57. X# v10i070: siotools patch 5
  58. X# v10i076: siotools patch 6
  59. X#-----------------------------------------------------------------------
  60. X
  61. Xsed -e 's/^P//' << DIFF_EOF | patch
  62. XP*** ../rel/siomon.c    Mon Mar 12 16:30:39 1990
  63. XP--- siomon.c    Fri Feb 23 17:11:11 1990
  64. XP***************
  65. XP*** 1,5
  66. XP  /* CHK=0x75B9 */
  67. XP! char *revision = "1.36";
  68. XP  /*+-------------------------------------------------------------------------
  69. XP      siomon.c -- watch XENIX/UNIX serial I/O
  70. XP      ...!gatech!kd4nc!n4hgf!wht
  71. XP
  72. XP--- 1,5 -----
  73. XP  /* CHK=0x75B9 */
  74. XP! char *revision = "1.37";
  75. XP  /*+-------------------------------------------------------------------------
  76. XP      siomon.c -- watch XENIX/UNIX serial I/O
  77. XP      ...!gatech!kd4nc!n4hgf!wht
  78. XP***************
  79. XP*** 33,39
  80. XP  22        S stopped by XOFF  D delay timeout in progress
  81. XP  23 Commands: + inc delay  - dec delay  ^L refresh  q quit  d detail
  82. XP  
  83. XP! Under XENIX, termio.h is included twice (once by curses.h/tcap.h andf
  84. XP  again by sys/tty.h.  You need to bracket the termio.h under XENIX with
  85. XP    #if !defined(TERMIO_HACK) || (defined(TERMIO_HACK) && !defined(IOCTYPE))
  86. XP    ...
  87. XP
  88. XP--- 33,39 -----
  89. XP  22        S stopped by XOFF  D delay timeout in progress
  90. XP  23 Commands: + inc delay  - dec delay  ^L refresh  q quit  d detail
  91. XP  
  92. XP! Under XENIX, termio.h is included twice (once by curses.h/tcap.h and
  93. XP  again by sys/tty.h.  You need to bracket the termio.h under XENIX with
  94. XP    #if !defined(TERMIO_HACK) || (defined(TERMIO_HACK) && !defined(IOCTYPE))
  95. XP    ...
  96. XP***************
  97. XP*** 56,61
  98. XP    bug hopefully now retired, even if it crockish.
  99. XP  --------------------------------------------------------------------------*/
  100. XP  /*+:EDITS:*/
  101. XP  /*:02-18-1990-03:29-wht-bug in curses tty mode handling - force a fix */
  102. XP  /*:12-28-1989-13:35-wht-change rev - B600 added to wintty */
  103. XP  /*:12-21-1989-15:20-wht-version number chg - CTSFLOW/RTSFLOW */
  104. XP
  105. XP--- 56,62 -----
  106. XP    bug hopefully now retired, even if it crockish.
  107. XP  --------------------------------------------------------------------------*/
  108. XP  /*+:EDITS:*/
  109. XP+ /*:02-23-1990-17:10-wht-more keyboard problems with UNIX: try typeahead(-1) */
  110. XP  /*:02-18-1990-03:29-wht-bug in curses tty mode handling - force a fix */
  111. XP  /*:12-28-1989-13:35-wht-change rev - B600 added to wintty */
  112. XP  /*:12-21-1989-15:20-wht-version number chg - CTSFLOW/RTSFLOW */
  113. XP***************
  114. XP*** 444,449
  115. XP          fputs("curses init failed ... check terminal type\n",stderr);
  116. XP          exit(1);
  117. XP      }
  118. XP      crmode();
  119. XP      noecho();
  120. XP      main_template();
  121. XP
  122. XP--- 445,453 -----
  123. XP          fputs("curses init failed ... check terminal type\n",stderr);
  124. XP          exit(1);
  125. XP      }
  126. XP+ #if defined(M_TERMINFO)
  127. XP+     typeahead(-1);
  128. XP+ #endif
  129. XP      crmode();
  130. XP      noecho();
  131. XP      main_template();
  132. XP*** ../rel/uusnap.c    Mon Mar 12 16:30:40 1990
  133. XP--- uusnap.c    Fri Feb 23 17:14:13 1990
  134. XP***************
  135. XP*** 1,5
  136. XP  /* CHK=0xBF8D */
  137. XP! char *revision = "1.74";
  138. XP  /*+-------------------------------------------------------------------------
  139. XP      uusnap.c - display UUCP communications status for HDB systems
  140. XP      ...gatech!kd4nc!n4hgf!wht
  141. XP
  142. XP--- 1,5 -----
  143. XP  /* CHK=0xBF8D */
  144. XP! char *revision = "1.75";
  145. XP  /*+-------------------------------------------------------------------------
  146. XP      uusnap.c - display UUCP communications status for HDB systems
  147. XP      ...gatech!kd4nc!n4hgf!wht
  148. XP***************
  149. XP*** 26,32
  150. XP      spooldirname(fname)
  151. XP      statdirname(fname)
  152. XP  
  153. XP! Under XENIX, termio.h is included twice (once by curses.h/tcap.h andf
  154. XP  again by sys/tty.h.  You need to bracket the termio.h under XENIX with
  155. XP    #if !defined(TERMIO_HACK) || (defined(TERMIO_HACK) && !defined(IOCTYPE))
  156. XP    ...
  157. XP
  158. XP--- 26,32 -----
  159. XP      spooldirname(fname)
  160. XP      statdirname(fname)
  161. XP  
  162. XP! Under XENIX, termio.h is included twice (once by curses.h/tcap.h and
  163. XP  again by sys/tty.h.  You need to bracket the termio.h under XENIX with
  164. XP    #if !defined(TERMIO_HACK) || (defined(TERMIO_HACK) && !defined(IOCTYPE))
  165. XP    ...
  166. XP***************
  167. XP*** 48,53
  168. XP   bug hopefully now retired, even if it crockish.
  169. XP  --------------------------------------------------------------------------*/
  170. XP  /*+:EDITS:*/
  171. XP  /*:02-18-1990-03:29-wht-bug in curses tty mode handling - force a fix */
  172. XP  /*:02-07-1990-16:34-wht-use crmode and nocrmode rather than raw and noraw */
  173. XP  /*:01-27-1990-19:11-wht-show input and output queues + cosmetics */
  174. XP
  175. XP--- 48,54 -----
  176. XP   bug hopefully now retired, even if it crockish.
  177. XP  --------------------------------------------------------------------------*/
  178. XP  /*+:EDITS:*/
  179. XP+ /*:02-23-1990-17:10-wht-more keyboard problems with UNIX: try typeahead(-1) */
  180. XP  /*:02-18-1990-03:29-wht-bug in curses tty mode handling - force a fix */
  181. XP  /*:02-07-1990-16:34-wht-use crmode and nocrmode rather than raw and noraw */
  182. XP  /*:01-27-1990-19:11-wht-show input and output queues + cosmetics */
  183. XP***************
  184. XP*** 755,762
  185. XP      getyx(stdscr,y,x);
  186. XP      move(y,x - 2);
  187. XP      refresh();
  188. XP!     nocrmode();
  189. XP!     echo();
  190. XP      x = scanw("%d",&sysdetail);
  191. XP      crmode();
  192. XP      noecho();
  193. XP
  194. XP--- 756,762 -----
  195. XP      getyx(stdscr,y,x);
  196. XP      move(y,x - 2);
  197. XP      refresh();
  198. XP!     resetty();
  199. XP      x = scanw("%d",&sysdetail);
  200. XP      crmode();
  201. XP      noecho();
  202. XP***************
  203. XP*** 888,893
  204. XP          fprintf(stderr,"curses init failed... check terminal type\n");
  205. XP          exit(0);
  206. XP      }
  207. XP      noecho();
  208. XP      crmode();
  209. XP  
  210. XP
  211. XP--- 888,896 -----
  212. XP          fprintf(stderr,"curses init failed... check terminal type\n");
  213. XP          exit(0);
  214. XP      }
  215. XP+ #if defined(M_TERMINFO)
  216. XP+     typeahead(-1);
  217. XP+ #endif
  218. XP      noecho();
  219. XP      crmode();
  220. XP  
  221. XDIFF_EOF
  222. Xecho patch 7 applied
  223. Xexit 0
  224. SHAR_EOF
  225. chmod 0744 PATCH.7 || echo "restore of PATCH.7 fails"
  226. if [ $TOUCH = can ]
  227. then
  228.     touch -m 0312165090 PATCH.7
  229. fi
  230. exit 0
  231.  
  232.