home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume11 / siotools.p7 < prev    next >
Encoding:
Internet Message Format  |  1991-08-27  |  7.8 KB

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