home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume22 / ecu / patch04b < prev    next >
Text File  |  1991-08-29  |  40KB  |  1,364 lines

  1. Newsgroups: comp.sources.misc
  2. From: Warren Tucker <wht@n4hgf.GA.US>
  3. Subject:  v22i078:  ecu - ECU async comm package rev 3.10, Patch04b/2
  4. Message-ID: <1991Aug30.002957.21618@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 4679b63c96be57927cd04a72688f3315
  6. Date: Fri, 30 Aug 1991 00:29:57 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Warren Tucker <wht@n4hgf.GA.US>
  10. Posting-number: Volume 22, Issue 78
  11. Archive-name: ecu/patch04b
  12. Environment: SCO, XENIX, ISC, SUNOS4.1, SYSVR4
  13. Patch-To: ecu: Volume 21, Issue 53-89
  14.  
  15. #!/bin/sh
  16. # this is ecu/patch4b (ECU 3.10 patch 4 part 2)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file PATCH4.01 continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 2; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test ! -f _shar_wnt_.tmp; then
  33.     echo 'x - still skipping PATCH4.01'
  34. else
  35. echo 'x - continuing file PATCH4.01'
  36. sed 's/^X//' << 'SHAR_EOF' >> 'PATCH4.01' &&
  37. X! # ECU 3.13 nonansikeys
  38. X  #
  39. X  # This file contains mapping information to convert non-ANSI
  40. X  # keyboard function keys to an internal ECU function key
  41. X***************
  42. X*** 53,61 ****
  43. X--- 53,64 ----
  44. X  #
  45. X  # Comment the SCO ODT xterm and uncomment the Metro Link xterm entry
  46. X  # if you have that system.  See below for xmodmap instructions.
  47. X+ # Likewise, a Sun xterm entry also appears (commented out) below.
  48. X+ # A 'sun' console entry has been added
  49. X  # 
  50. X  #-------------------------------------------------------------------------
  51. X  #+:EDITS:
  52. X+ #:08-26-1991-05:06-wht@n4hgf2-add sun console and xterm entry
  53. X  #:08-10-1991-16:07-wht@n4hgf-add new Metro Link server entry
  54. X  #:05-06-1991-02:31-wht@n4hgf-add tandem terminal "ansi-terminal"
  55. X  #:05-05-1991-17:37-root@n4hgf-add ISC at386 tnx to dug@kd4nc
  56. X***************
  57. X*** 237,242 ****
  58. X--- 240,318 ----
  59. X  #    CUD:CUD:        esc [ B
  60. X  #    CUL:CUL:        esc [ D
  61. X  #    CUR:CUR:        esc [ C
  62. X+ 
  63. X+ ##+-------------------------------------------------------------------
  64. X+ ##   Sun Sparc 1+ xterm using MIT X11R4 server (pl18)
  65. X+ ##
  66. X+ ## Place in .Xdefaults or whatever:
  67. X+ ##
  68. X+ ## XTerm*VT100*Translations: #override\
  69. X+ ##     Shift <Key>Tab:   string(0x1b) string("[Z") \n \
  70. X+ ##     <Key>F27:         string(0x1b) string("[H") \n \
  71. X+ ##     <Key>R13:         string(0x1b) string("[F") \n \
  72. X+ ##     <Key>F29:         string(0x1b) string("[I") \n \
  73. X+ ##     <Key>F31:         string(0x1b) string("[E") \n \
  74. X+ ##     <Key>F35:         string(0x1b) string("[G") \n \
  75. X+ ##     <Key>Insert:      string(0x1b) string("[L") \n \
  76. X+ ##
  77. X+ ## nonansikey for 'xterm' under SunOS
  78. X+ ## built by kbdtest3 1.02 Mon Aug 26 04:55:24 1991
  79. X+ ## keyboard parity required = even
  80. X+ ##--------------------------------------------------------------------
  81. X+ #xterm
  82. X+ #    BkTab:BkTab:    esc [ Z
  83. X+ #    CU5:CU5:        esc [ E
  84. X+ #    F1:F1:          esc [ 1 1 ~
  85. X+ #    F2:F2:          esc [ 1 2 ~
  86. X+ #    F3:F3:          esc [ 1 3 ~
  87. X+ #    F4:F4:          esc [ 1 4 ~
  88. X+ #    F5:F5:          esc [ 1 5 ~
  89. X+ #    F6:F6:          esc [ 1 7 ~
  90. X+ #    F7:F7:          esc [ 1 8 ~
  91. X+ #    F8:F8:          esc [ 1 9 ~
  92. X+ #    F9:F9:          esc [ 2 0 ~
  93. X+ #    F10:F10:        esc [ 2 1 ~
  94. X+ #    F11:F11:        esc [ 2 3 ~
  95. X+ #    F12:F12:        esc [ 2 4 ~
  96. X+ #    Ins:Ins:        esc [ L        # Ins generates Insert
  97. X+ #    Home:Home:      esc [ H     # Home generates F27
  98. X+ #    End:End:        esc [ F        # End generates R13
  99. X+ #    PgUp:PgUp:      esc [ I        # PgUp generates F29
  100. X+ #    PgDn:PgDn:      esc [ G        # PgDn generates F35
  101. X+ #    CUU:CUU:        esc [ A
  102. X+ #    CUD:CUD:        esc [ B
  103. X+ #    CUL:CUL:        esc [ D
  104. X+ #    CUR:CUR:        esc [ C
  105. X+ 
  106. X+ #+-------------------------------------------------------------------
  107. X+ # nonansikey for 'sun' (native console) under SunOS 4.1
  108. X+ # built by kbdtest3 1.02 Mon Aug 26 16:21:57 1991
  109. X+ # keyboard parity required = even
  110. X+ #--------------------------------------------------------------------
  111. X+ sun
  112. X+ #   BkTab:BkTab:    ht                   # does not work
  113. X+     CU5:CU5:        esc [ 2 1 8 z
  114. X+     F1:F1:          esc [ 2 2 4 z
  115. X+     F2:F2:          esc [ 2 2 5 z
  116. X+     F3:F3:          esc [ 2 2 6 z
  117. X+     F4:F4:          esc [ 2 2 7 z
  118. X+     F5:F5:          esc [ 2 2 8 z
  119. X+     F6:F6:          esc [ 2 2 9 z
  120. X+     F7:F7:          esc [ 2 3 0 z
  121. X+     F8:F8:          esc [ 2 3 1 z
  122. X+     F9:F9:          esc [ 2 3 2 z
  123. X+     F10:F10:        esc [ 2 3 3 z
  124. X+     F11:F11:        esc [ 2 3 4 z
  125. X+     F12:F12:        esc [ 2 3 5 z
  126. X+     Ins:Ins:        esc [ 2 4 7 z
  127. X+     Home:Home:      esc [ 2 1 4 z
  128. X+     End:End:        esc [ 2 2 0 z
  129. X+     PgUp:PgUp:      esc [ 2 1 6 z
  130. X+     PgDn:PgDn:      esc [ 2 2 2 z
  131. X+     CUU:CUU:        esc [ A
  132. X+     CUD:CUD:        esc [ B
  133. X+     CUL:CUL:        esc [ D
  134. X+     CUR:CUR:        esc [ C
  135. X  
  136. X  #+-------------------------------------------------------------------
  137. X  #   ISC 'AT386' keyboard
  138. Xdiff -c -r /export/home/wht/src/ecu313/sea/Make.src ./sea/Make.src
  139. X*** /export/home/wht/src/ecu313/sea/Make.src    Wed Aug 28 19:29:12 1991
  140. X--- ./sea/Make.src    Fri Aug 23 14:21:24 1991
  141. X***************
  142. X*** 69,81 ****
  143. X       >> depend.tmp) ;\
  144. X      fi
  145. X  
  146. X!     echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp
  147. X!     echo '.+1,$$d' >>exdep.tmp
  148. X!     echo 'r depend.tmp' >> exdep.tmp
  149. X!     echo 'w' >> exdep.tmp
  150. X      cp Makefile Makefile.new
  151. X!     ex Makefile.new < exdep.tmp
  152. X!     rm exdep.tmp depend.tmp
  153. X      echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  154. X      echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  155. X      echo '# see make depend above'>>Makefile.new
  156. X--- 69,81 ----
  157. X       >> depend.tmp) ;\
  158. X      fi
  159. X  
  160. X!     echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  161. X!     echo '.+1,$$d' >>eddep.tmp
  162. X!     echo 'r depend.tmp' >> eddep.tmp
  163. X!     echo 'w' >> eddep.tmp
  164. X      cp Makefile Makefile.new
  165. X!     ed Makefile.new < eddep.tmp
  166. X!     rm eddep.tmp depend.tmp
  167. X      echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  168. X      echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  169. X      echo '# see make depend above'>>Makefile.new
  170. XOnly in ./sea: Makefile
  171. XOnly in ./sea: ecusea
  172. Xdiff -c -r /export/home/wht/src/ecu313/sea/ecusea.c ./sea/ecusea.c
  173. X*** /export/home/wht/src/ecu313/sea/ecusea.c    Wed Aug 28 19:31:21 1991
  174. X--- ./sea/ecusea.c    Wed Aug 28 15:42:56 1991
  175. X***************
  176. X*** 1,4 ****
  177. X! char *revision = "3.10";    /* cannot be longer than 7 chars (blk0.sender) */
  178. X  
  179. X  /* #define TABLE_CRC16 */
  180. X  #ifdef M_XENIX
  181. X--- 1,4 ----
  182. X! char *revision = "3.14";    /* cannot be longer than 7 chars (blk0.sender) */
  183. X  
  184. X  /* #define TABLE_CRC16 */
  185. X  #ifdef M_XENIX
  186. X***************
  187. X*** 69,74 ****
  188. X--- 69,95 ----
  189. X  #include <setjmp.h>
  190. X  #include <fcntl.h>
  191. X  #include <termio.h>
  192. X+ #if defined(sun)
  193. X+ #undef ECHO
  194. X+ #undef NL0
  195. X+ #undef NL1
  196. X+ #undef TAB0
  197. X+ #undef TAB1
  198. X+ #undef TAB2
  199. X+ #undef XTABS
  200. X+ #undef CR0
  201. X+ #undef CR1
  202. X+ #undef CR2
  203. X+ #undef CR3
  204. X+ #undef FF0
  205. X+ #undef FF1
  206. X+ #undef BS0
  207. X+ #undef BS1
  208. X+ #undef TOSTOP
  209. X+ #undef FLUSHO
  210. X+ #undef PENDIN
  211. X+ #undef NOFLSH
  212. X+ #endif
  213. X  #include <sys/ioctl.h>
  214. X  #include <sys/types.h>
  215. X  #include <sys/stat.h>
  216. X***************
  217. X*** 239,244 ****
  218. X--- 260,357 ----
  219. X  }    /* end of crc_update */
  220. X  #endif /* crc calc selection */
  221. X  
  222. X+ /*+-------------------------------------------------------------------------
  223. X+     Nap(msec) - wrapper for nap()
  224. X+ 
  225. X+ ISC and SCO UNIX nap() misbehave.  This kludge doesn't return the
  226. X+ proper value (the actual time slept), but at least it does not make
  227. X+ a mockery of the manual page.  It says:
  228. X+ 
  229. X+      NAP(S)               UNIX System V            NAP(S)
  230. X+ 
  231. X+      Name
  232. X+       nap -    suspends execution for a short interval
  233. X+ 
  234. X+      Syntax
  235. X+       long nap(period)
  236. X+       long period;
  237. X+ 
  238. X+      Description
  239. X+       The current process is suspended from    execution for at least
  240. X+       the number of    milliseconds specified by period, or until a
  241. X+       signal is received.
  242. X+ 
  243. X+      Return Value
  244. X+       On successful    completion, a long integer indicating the
  245. X+       number of milliseconds actually slept    is returned. If    the
  246. X+       process received a signal while napping, the return value
  247. X+       will be -1, and errno    will be    set to EINTR.
  248. X+ 
  249. X+      See Also
  250. X+       sleep(S)
  251. X+ 
  252. X+      Notes
  253. X+       This function    is driven by the system    clock, which in    most
  254. X+       cases    has a granularity of tens of milliseconds.  This
  255. X+       function must    be linked with the linker option -lx.
  256. X+ 
  257. X+ It appears nap() under UNIX 3.2.x has departed virtually entirely from
  258. X+ the manual page.  I'm beginning to look rather silly in several
  259. X+ milleus since I keep telling people SCO UNIX is a viable upgrade from
  260. X+ XENIX.  But process control people need some kind of timing capability
  261. X+ less than one second and we can't do it with nap or select.
  262. X+ 
  263. X+ nap(msec) is supposed to nap *at least* msec milliseconds.  However,
  264. X+ if msec is specified less than 1000/HZ + 1, it will not nap at all.
  265. X+ This was true for 3.2.0 and 3.2.1.
  266. X+ 
  267. X+ It is supposed to return the number of milliseconds it actually
  268. X+ slept.  Instead, it appears to "save up" the values and return them in
  269. X+ lots of 1000. This behavior is true for 3.2.2.
  270. X+ 
  271. X+ As it is nap() is nearly useless.  I believe select() suffers
  272. X+ from the same deficiency (< 1000 msec timeout becomes 1000 msec) but
  273. X+ I haven't "proven" it yet.
  274. X+ --------------------------------------------------------------------------*/
  275. X+ long
  276. X+ Nap(msec)
  277. X+ long msec;
  278. X+ {
  279. X+ #if defined(sun)
  280. X+ struct timeval timer;
  281. X+     timer.tv_sec = 0;
  282. X+     timer.tv_usec = 1000L * msec;
  283. X+     select(0,0,0,0,&timer);
  284. X+ #else
  285. X+ #if defined(M_XENIX) || defined(WORKING_UNIX_NAP)
  286. X+     return(nap(msec));
  287. X+ #else
  288. X+     if(msec < hzmsec)
  289. X+         msec = hzmsec;
  290. X+     if(nap(msec) < 0)
  291. X+         return(-1);
  292. X+     return(msec);
  293. X+ #endif /* defined(M_XENIX) || defined(WORKING_UNIX_NAP) */
  294. X+ #endif /* sun */
  295. X+ 
  296. X+ }    /* end of Nap */
  297. X+ 
  298. X+ /*+-------------------------------------------------------------------------
  299. X+     rdchk(fd) - for systems without it but with FIONREAD
  300. X+ --------------------------------------------------------------------------*/
  301. X+ #if defined(sun)
  302. X+ int
  303. X+ rdchk(fd)
  304. X+ {
  305. X+ int chars_waiting;
  306. X+ 
  307. X+     if(ioctl(fd,FIONREAD,&chars_waiting))
  308. X+         return(0);
  309. X+     else
  310. X+         return(!!chars_waiting);
  311. X+ }    /* end of rdchk */
  312. X+ #endif
  313. X+ 
  314. X  /*+-----------------------------------------------------------------------
  315. X      arg_token(parsestr,termchars)
  316. X  
  317. X***************
  318. X*** 501,507 ****
  319. X  unsigned char rdchar;
  320. X  long msec;
  321. X  int seconds;
  322. X! long nap(long);
  323. X  #else
  324. X  int fdmask;
  325. X  struct timeval tval;
  326. X--- 614,620 ----
  327. X  unsigned char rdchar;
  328. X  long msec;
  329. X  int seconds;
  330. X! long Nap();
  331. X  #else
  332. X  int fdmask;
  333. X  struct timeval tval;
  334. X***************
  335. X*** 528,534 ****
  336. X          msec = (tenths < 6) ? 60L : (long)tenths * 10;
  337. X          while(msec)
  338. X          {
  339. X!             msec -= nap(20L);
  340. X              if(rdchk(iofd))
  341. X              {
  342. X                  read(iofd,&rdchar,1);
  343. X--- 641,647 ----
  344. X          msec = (tenths < 6) ? 60L : (long)tenths * 10;
  345. X          while(msec)
  346. X          {
  347. X!             msec -= Nap(20L);
  348. X              if(rdchk(iofd))
  349. X              {
  350. X                  read(iofd,&rdchar,1);
  351. X***************
  352. X*** 902,908 ****
  353. X                  report_last_txhdr("EOT",0);
  354. X                  write(iofd,&eot,1);
  355. X                  sent_EOT = 1;
  356. X!                 nap(500L);
  357. X                  tx_char_count++;
  358. X              }
  359. X              sf_blknum++;
  360. X--- 1015,1021 ----
  361. X                  report_last_txhdr("EOT",0);
  362. X                  write(iofd,&eot,1);
  363. X                  sent_EOT = 1;
  364. X!                 Nap(500L);
  365. X                  tx_char_count++;
  366. X              }
  367. X              sf_blknum++;
  368. X***************
  369. X*** 1363,1369 ****
  370. X      {
  371. X          case 0:                /* receive files */
  372. X              while(receive_file() != NULL)
  373. X!                 nap(1000L);
  374. X              ok = (rf_done == 1);
  375. X              break;
  376. X  
  377. X--- 1476,1482 ----
  378. X      {
  379. X          case 0:                /* receive files */
  380. X              while(receive_file() != NULL)
  381. X!                 Nap(1000L);
  382. X              ok = (rf_done == 1);
  383. X              break;
  384. X  
  385. X***************
  386. X*** 1373,1379 ****
  387. X              {
  388. X                  if(!(ok = send_file(paths[ipaths])))
  389. X                      break;
  390. X!                 nap(1000L);
  391. X                  ipaths++;
  392. X              }
  393. X              if(ok)        /* no errors, send end marker */
  394. X--- 1486,1492 ----
  395. X              {
  396. X                  if(!(ok = send_file(paths[ipaths])))
  397. X                      break;
  398. X!                 Nap(1000L);
  399. X                  ipaths++;
  400. X              }
  401. X              if(ok)        /* no errors, send end marker */
  402. XOnly in ./sea: ecusea.o
  403. Xdiff -c -r /export/home/wht/src/ecu313/sea/scurses.c ./sea/scurses.c
  404. X*** /export/home/wht/src/ecu313/sea/scurses.c    Wed Aug 28 19:31:24 1991
  405. X--- ./sea/scurses.c    Wed Aug 28 14:08:53 1991
  406. X***************
  407. X*** 48,53 ****
  408. X--- 48,54 ----
  409. X  
  410. X  ------------------------------------------------------------------------*/
  411. X  /*+:EDITS:*/
  412. X+ /*:08-28-1991-14:08-wht@n4hgf2-SVR4 cleanup by slootman@dri.nl */
  413. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  414. X  /*:09-19-1990-19:36-wht@n4hgf-ecu_log_event now gets pid for log from caller */
  415. X  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  416. X***************
  417. X*** 59,74 ****
  418. X  #include <signal.h>
  419. X  #include <time.h>
  420. X  #include <sys/timeb.h>
  421. X  #if defined(M_SYSV)
  422. X  #   include <sys/machdep.h>
  423. X  #else
  424. X  #  include <sys/at_ansi.h>
  425. X  #  include <sys/kd.h>
  426. X  #endif
  427. X  
  428. X  #include "../pc_scr.h"
  429. X- 
  430. X- #include "../pc_scr.h"
  431. X  #include "lint_args.h"
  432. X  
  433. X  long time();
  434. X--- 60,76 ----
  435. X  #include <signal.h>
  436. X  #include <time.h>
  437. X  #include <sys/timeb.h>
  438. X+ 
  439. X  #if defined(M_SYSV)
  440. X  #   include <sys/machdep.h>
  441. X  #else
  442. X+ #if defined(ISC)
  443. X  #  include <sys/at_ansi.h>
  444. X  #  include <sys/kd.h>
  445. X  #endif
  446. X+ #endif
  447. X  
  448. X  #include "../pc_scr.h"
  449. X  #include "lint_args.h"
  450. X  
  451. X  long time();
  452. X***************
  453. X*** 75,81 ****
  454. X  extern char *tzname[];
  455. X  struct tm *localtime();
  456. X  
  457. X- 
  458. X  #define WIN_LINES    15
  459. X  #define WIN_COLS    60
  460. X  #define WIN_TOPY    2
  461. X--- 77,82 ----
  462. X***************
  463. X*** 303,309 ****
  464. X--- 304,312 ----
  465. X  char *title;
  466. X  {
  467. X  register int itmp;
  468. X+ #if defined(M_UNIX) || defined(ISC) || defined(M_XENIX)
  469. X  int monitor_type;
  470. X+ #endif
  471. X  
  472. X      if(curses_installed)
  473. X          return;
  474. X***************
  475. X*** 347,369 ****
  476. X          clear_area(win,2,15,3);
  477. X          sprintf(s128,"%3d",npaths);
  478. X          waddstr(win,s128);
  479. X- #if defined(FORK_DEBUG)
  480. X-         sprintf(s128,"ecusz pid %d",getpid());
  481. X- #endif
  482. X      }
  483. X      else    /* ecurz */
  484. X      {
  485. X          clear_area(win,2,11,8);    /* clear "of ###" */
  486. X          waddstr(win,":");
  487. X- #if defined(FORK_DEBUG)
  488. X-         sprintf(s128,"ecurz pid %d",getpid());
  489. X- #endif
  490. X      }
  491. X  
  492. X- #if defined(FORK_DEBUG)
  493. X-     ecu_log_event(getppid(),s128);
  494. X- #endif
  495. X- 
  496. X      clear_area(win,1,11,47);
  497. X      report_error_count();
  498. X      clear_area(win,8,26,8);        /* starting time */
  499. X--- 350,362 ----
  500. X***************
  501. X*** 371,378 ****
  502. X--- 364,373 ----
  503. X      start_seconds = time((long *)0);
  504. X      current_seconds = start_seconds;
  505. X  
  506. X+ #if defined(M_UNIX) || defined(ISC) || defined(M_XENIX)
  507. X      if(ioctl(0,CONS_GET,&monitor_type) < 0)    /* not multiscreen */
  508. X      {
  509. X+ #endif
  510. X          sTL = vanilla_TL;
  511. X          sTR = vanilla_TR;
  512. X          sBL = vanilla_BL;
  513. X***************
  514. X*** 381,387 ****
  515. X--- 376,384 ----
  516. X          sRT = vanilla_RT;
  517. X          sVR = vanilla_VR;
  518. X          sHR = vanilla_HR;
  519. X+ #if defined(M_UNIX) || defined(ISC) || defined(M_XENIX)
  520. X      }
  521. X+ #endif
  522. X  
  523. X      wrefresh(win);
  524. X  
  525. X***************
  526. X*** 484,490 ****
  527. X          if(refr == 0x0C || refr == 0x012)    /* ^L or ^R */
  528. X          {
  529. X              write(2,"\033[2J",4);
  530. X!             nap((long)60);
  531. X              touchwin(stdscr);
  532. X              wrefresh(stdscr);
  533. X              touchwin(win);
  534. X--- 481,487 ----
  535. X          if(refr == 0x0C || refr == 0x012)    /* ^L or ^R */
  536. X          {
  537. X              write(2,"\033[2J",4);
  538. X!             Nap((long)60);
  539. X              touchwin(stdscr);
  540. X              wrefresh(stdscr);
  541. X              touchwin(win);
  542. XOnly in ./sea: scurses.o
  543. Xdiff -c -r /export/home/wht/src/ecu313/z/Make.src ./z/Make.src
  544. X*** /export/home/wht/src/ecu313/z/Make.src    Wed Aug 28 19:34:02 1991
  545. X--- ./z/Make.src    Fri Aug 23 14:21:25 1991
  546. X***************
  547. X*** 101,113 ****
  548. X       >> depend.tmp) ;\
  549. X      fi
  550. X  
  551. X!     echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp
  552. X!     echo '.+1,$$d' >>exdep.tmp
  553. X!     echo 'r depend.tmp' >> exdep.tmp
  554. X!     echo 'w' >> exdep.tmp
  555. X      cp Makefile Makefile.new
  556. X!     ex Makefile.new < exdep.tmp
  557. X!     rm exdep.tmp depend.tmp
  558. X      echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  559. X      echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  560. X      echo '# see make depend above'>>Makefile.new
  561. X--- 101,113 ----
  562. X       >> depend.tmp) ;\
  563. X      fi
  564. X  
  565. X!     echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
  566. X!     echo '.+1,$$d' >>eddep.tmp
  567. X!     echo 'r depend.tmp' >> eddep.tmp
  568. X!     echo 'w' >> eddep.tmp
  569. X      cp Makefile Makefile.new
  570. X!     ed Makefile.new < eddep.tmp
  571. X!     rm eddep.tmp depend.tmp
  572. X      echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
  573. X      echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
  574. X      echo '# see make depend above'>>Makefile.new
  575. XOnly in ./z: Makefile
  576. Xdiff -c -r /export/home/wht/src/ecu313/z/baudtest.c ./z/baudtest.c
  577. X*** /export/home/wht/src/ecu313/z/baudtest.c    Wed Aug 28 19:31:06 1991
  578. X--- ./z/baudtest.c    Wed Aug 28 14:08:53 1991
  579. X***************
  580. X*** 1,12 ****
  581. X- 
  582. X  /*+-------------------------------------------------------------------------
  583. X      baudtest.c
  584. X      wht@n4hgf.Mt-Park.GA.US
  585. X  
  586. X  Alas, on some systems, curses insists on sgtty.h inclusion
  587. X! which does not get aslong with termio.h AT ALL
  588. X  --------------------------------------------------------------------------*/
  589. X  /*+:EDITS:*/
  590. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  591. X  /*:12-04-1990-05:36-wht-creation */
  592. X  
  593. X--- 1,13 ----
  594. X  /*+-------------------------------------------------------------------------
  595. X      baudtest.c
  596. X      wht@n4hgf.Mt-Park.GA.US
  597. X  
  598. X  Alas, on some systems, curses insists on sgtty.h inclusion
  599. X! which does not get along with termio.h AT ALL
  600. X  --------------------------------------------------------------------------*/
  601. X  /*+:EDITS:*/
  602. X+ /*:08-28-1991-14:08-wht@n4hgf2-SVR4 cleanup by slootman@dri.nl */
  603. X+ /*:08-23-1991-18:33-wht@n4hgf2-disable force no curses for tty vs. line speed */
  604. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  605. X  /*:12-04-1990-05:36-wht-creation */
  606. X  
  607. X***************
  608. X*** 28,33 ****
  609. X--- 29,35 ----
  610. X    verbose than if tty not char special
  611. X  
  612. X  --------------------------------------------------------------------------*/
  613. X+ #ifdef TTY_VS_LINE_SPEED_NO_CURSES
  614. X  void
  615. X  test_tty_and_line_baud()
  616. X  {
  617. X***************
  618. X*** 37,43 ****
  619. X      memset((char *)&tty_termio,0,sizeof(struct termio));
  620. X      memset((char *)&line_termio,0,sizeof(struct termio));
  621. X      if(ioctl(0,TCGETA,&tty_termio) || ioctl(iofd,TCGETA,&line_termio) ||
  622. X!         ((tty_termio.c_cflag & CBAUD) < ((line_termio.c_cflag & CBAUD))))
  623. X      {
  624. X          fprintf(stderr,"%s %o %o\r\n",numeric_revision,
  625. X              (tty_termio.c_cflag & CBAUD), (line_termio.c_cflag & CBAUD));
  626. X--- 39,45 ----
  627. X      memset((char *)&tty_termio,0,sizeof(struct termio));
  628. X      memset((char *)&line_termio,0,sizeof(struct termio));
  629. X      if(ioctl(0,TCGETA,&tty_termio) || ioctl(iofd,TCGETA,&line_termio) ||
  630. X!         ((tty_termio.c_cflag & CBAUD) < (unsigned)((line_termio.c_cflag & CBAUD))))
  631. X      {
  632. X          fprintf(stderr,"%s %o %o\r\n",numeric_revision,
  633. X              (tty_termio.c_cflag & CBAUD), (line_termio.c_cflag & CBAUD));
  634. X***************
  635. X*** 47,52 ****
  636. X--- 49,55 ----
  637. X      }
  638. X  
  639. X  }    /* end of test_tty_and_line_baud */
  640. X+ #endif
  641. X  
  642. X  /* vi: set tabstop=4 shiftwidth=4: */
  643. X  /* end of baudtest.c */
  644. XOnly in ./z: baudtest.o
  645. XOnly in ./z: ecurz
  646. Xdiff -c -r /export/home/wht/src/ecu313/z/ecurz.c ./z/ecurz.c
  647. X*** /export/home/wht/src/ecu313/z/ecurz.c    Wed Aug 28 19:31:08 1991
  648. X--- ./z/ecurz.c    Wed Aug 28 15:42:29 1991
  649. X***************
  650. X*** 1,4 ****
  651. X! char *numeric_revision = "ecurz 3.13";
  652. X  /*+-------------------------------------------------------------------------
  653. X      ecurz.c - X/Y/ZMODEM receive program
  654. X    Derived from public domain source by Chuck Forsberg, Omen Technologies
  655. X--- 1,4 ----
  656. X! char *numeric_revision = "ecurz 3.14";
  657. X  /*+-------------------------------------------------------------------------
  658. X      ecurz.c - X/Y/ZMODEM receive program
  659. X    Derived from public domain source by Chuck Forsberg, Omen Technologies
  660. X***************
  661. X*** 57,62 ****
  662. X--- 57,63 ----
  663. X  
  664. X  --------------------------------------------------------------------------*/
  665. X  /*+:EDITS:*/
  666. X+ /*:08-28-1991-14:08-wht@n4hgf2-SVR4 cleanup by slootman@dri.nl */
  667. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  668. X  /*:04-30-1991-18:33-wht@n4hgf-gcc version coredumping on putc(); use fputc() */
  669. X  /*:03-27-1991-21:21-wht@n4hgf-dont bump error count on send ZRPOS */
  670. X***************
  671. X*** 95,105 ****
  672. X  extern int Rxtimeout;    /* Tenths of seconds to wait for something */
  673. X  extern char s128[128];
  674. X  
  675. X! /* Max value for VMIN_COUNT is 255.  A larger value reduces system
  676. X! overhead but may evoke kernel bugs.  133 corresponds to an XMODEM/CRC
  677. X! sector */
  678. X  #if !defined(VMIN_COUNT)
  679. X! #define VMIN_COUNT 133
  680. X  #endif
  681. X  unsigned char vmin_count = VMIN_COUNT;
  682. X  int Readnum = VMIN_COUNT;    /* num bytes to ask for in read() from modem */
  683. X--- 96,132 ----
  684. X  extern int Rxtimeout;    /* Tenths of seconds to wait for something */
  685. X  extern char s128[128];
  686. X  
  687. X! /*
  688. X!  * Max value for VMIN_COUNT is 255.  A larger value reduces system
  689. X!  * overhead but may evoke kernel bugs.  133 corresponds to an XMODEM/CRC
  690. X!  * sector.
  691. X! 
  692. X! Paul Slootman said, though:
  693. X! :PS: Something somewhere in the SVR4 kernel is a signed char, which causes
  694. X! :PS: VMIN values of more than 127 to return *immediately* without ever
  695. X! :PS: reading...
  696. X! :PS:
  697. X! :PS: I had troubles running the regular rz, which was where I saw
  698. X! :PS: the bug the first time. I've also heard of this from someone
  699. X! :PS: else, running something else than the ICL SPARC port for SVR4:
  700. X! :PS:
  701. X! :PS: Date: Sat, 3 Aug 91 11:41:16 EDT
  702. X! :PS: From: tompkins@cat.syr.edu (Terry Tompkins)
  703. X! :PS: Subject: Re:  Zmodem
  704. X! :PS: 
  705. X! :PS: Thanks for the info.  I just returned from vacation - sorry for the delay.
  706. X! :PS: We are running AT&T 5.4 UNIX on an Osicom 25mhz 386.  If you hear of a 
  707. X! :PS: fix for the OS, let me know - I feel a little apprehensive about a kernel
  708. X! :PS: bug of this nature.  (The machine is a network server that we are using
  709. X! :PS: for all kinds of things).
  710. X! */
  711. X! 
  712. X  #if !defined(VMIN_COUNT)
  713. X! # ifdef SVR4
  714. X! #  define VMIN_COUNT 127
  715. X! # else
  716. X! #  define VMIN_COUNT 133
  717. X! # endif
  718. X  #endif
  719. X  unsigned char vmin_count = VMIN_COUNT;
  720. X  int Readnum = VMIN_COUNT;    /* num bytes to ask for in read() from modem */
  721. XOnly in ./z: ecurz.o
  722. XOnly in ./z: ecusz
  723. Xdiff -c -r /export/home/wht/src/ecu313/z/ecusz.c ./z/ecusz.c
  724. X*** /export/home/wht/src/ecu313/z/ecusz.c    Wed Aug 28 19:31:11 1991
  725. X--- ./z/ecusz.c    Wed Aug 28 15:42:40 1991
  726. X***************
  727. X*** 1,4 ****
  728. X! char *numeric_revision = "ecusz 3.13";
  729. X  #define BUFFERED_WRITE
  730. X  /*+-------------------------------------------------------------------------
  731. X      ecusz.c - X/Y/ZMODEM send program
  732. X--- 1,4 ----
  733. X! char *numeric_revision = "ecusz 3.14";
  734. X  #define BUFFERED_WRITE
  735. X  /*+-------------------------------------------------------------------------
  736. X      ecusz.c - X/Y/ZMODEM send program
  737. X***************
  738. X*** 66,71 ****
  739. X--- 66,72 ----
  740. X  
  741. X  --------------------------------------------------------------------------*/
  742. X  /*+:EDITS:*/
  743. X+ /*:08-28-1991-14:08-wht@n4hgf2-SVR4 cleanup by slootman@dri.nl */
  744. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  745. X  /*:02-03-1991-17:27-wht@n4hgf-version number change - see zcurses.c */
  746. X  /*:12-18-1990-21:26-wht@n4hgf-better output control */
  747. X***************
  748. X*** 127,138 ****
  749. X  #if defined(READCHECK)
  750. X  char Myattn[] = { 0 };
  751. X  #else
  752. X- #if defined(M_SYS5)
  753. X  char Myattn[] = { 03,0336,0 };
  754. X- #else
  755. X- char Myattn[] = { 0 };
  756. X  #endif
  757. X- #endif
  758. X  
  759. X  FILE *in;
  760. X  
  761. X--- 128,135 ----
  762. X***************
  763. X*** 340,349 ****
  764. X  onintr()
  765. X  {
  766. X      signal(SIGINT,SIG_IGN);
  767. X- #if defined(M_SYS5)
  768. X      report_rx_ind(0);
  769. X      report_tx_ind(0);
  770. X- #endif
  771. X      longjmp(intrjmp,-1);
  772. X  }
  773. X  
  774. X--- 337,344 ----
  775. X***************
  776. X*** 472,480 ****
  777. X--- 467,478 ----
  778. X  
  779. X  flushline()
  780. X  {
  781. X+ struct termio tio;
  782. X  #ifdef BUFFERED_WRITE
  783. X      fflush(iofp);
  784. X  #endif
  785. X+     ioctl(iofd,TCGETA,(char *)&tio);
  786. X+     ioctl(iofd,TCSETAW,(char *)&tio);
  787. X  }
  788. X  
  789. X  main(argc,argv)
  790. X***************
  791. X*** 704,710 ****
  792. X              write(iofd,"rz\r",3);
  793. X          else    /* wht -- why not? */
  794. X              write(iofd,"rb\r",3);        /* wht */
  795. X!         nap(2000L);
  796. X          report_str("",-1);
  797. X          if(!Nozmodem)
  798. X          {
  799. X--- 702,708 ----
  800. X              write(iofd,"rz\r",3);
  801. X          else    /* wht -- why not? */
  802. X              write(iofd,"rb\r",3);        /* wht */
  803. X!         Nap(2000L);
  804. X          report_str("",-1);
  805. X          if(!Nozmodem)
  806. X          {
  807. X***************
  808. X*** 885,891 ****
  809. X              else if(*p == '.')
  810. X                  *(q=p) = '/';
  811. X          }
  812. X!         if(q && strlen(++q) > 8)
  813. X          {    /* If name>8 chars */
  814. X              q += 8;            /*   make it .ext */
  815. X              strcpy(name2,q);    /* save excess of name */
  816. X--- 883,889 ----
  817. X              else if(*p == '.')
  818. X                  *(q=p) = '/';
  819. X          }
  820. X!         if(q && strlen(++q) > (unsigned)8)
  821. X          {    /* If name>8 chars */
  822. X              q += 8;            /*   make it .ext */
  823. X              strcpy(name2,q);    /* save excess of name */
  824. X***************
  825. X*** 1230,1239 ****
  826. X  SIGTYPE
  827. X  SIGALRM_handler()
  828. X  {
  829. X- #if defined(M_SYS5)
  830. X      report_rx_ind(0);
  831. X      report_tx_ind(0);
  832. X- #endif
  833. X      longjmp(tohere,-1);
  834. X  }    /* end of SIGALRM_handler */
  835. X  
  836. X--- 1228,1235 ----
  837. X***************
  838. X*** 1296,1306 ****
  839. X  --------------------------------------------------------------------------*/
  840. X  purgeline()
  841. X  {
  842. X- #if defined(M_SYS5)
  843. X      ioctl(iofd,TCFLSH,0);
  844. X- #else
  845. X-     lseek(iofd,0L,2);
  846. X- #endif
  847. X  }    /* end of purgeline */
  848. X  
  849. X  
  850. X--- 1292,1298 ----
  851. X***************
  852. X*** 1392,1404 ****
  853. X              mode(2);    /* Set cbreak,XON/XOFF,etc. */
  854. X  #endif
  855. X  #if !defined(READCHECK)
  856. X- #if !defined(M_SYS5)
  857. X              /* Use 1024 byte frames if no sample/interrupt */
  858. X              if(Rxbuflen < 32 || Rxbuflen > 1024)
  859. X              {
  860. X                  Rxbuflen = 1024;
  861. X              }
  862. X- #endif
  863. X  #endif
  864. X              /* Override to force shorter frame length */
  865. X              if(Rxbuflen && (Rxbuflen>Tframlen) && (Tframlen>=32))
  866. X--- 1384,1394 ----
  867. XOnly in ./z: ecusz.o
  868. Xdiff -c -r /export/home/wht/src/ecu313/z/lint_args.h ./z/lint_args.h
  869. X*** /export/home/wht/src/ecu313/z/lint_args.h    Wed Aug 28 19:31:12 1991
  870. X--- ./z/lint_args.h    Fri Aug 23 14:23:00 1991
  871. X***************
  872. X*** 25,31 ****
  873. X  int clear_area_char(struct _win_st *,int ,int ,int ,char );
  874. X  int determine_output_mode(void );
  875. X  int report_comm_baud_rate(unsigned int );
  876. X! int report_error_count(void );
  877. X  int report_file_byte_io(long );
  878. X  int report_file_open_length(long );
  879. X  int report_file_open_mode(unsigned short );
  880. X--- 25,31 ----
  881. X  int clear_area_char(struct _win_st *,int ,int ,int ,char );
  882. X  int determine_output_mode(void );
  883. X  int report_comm_baud_rate(unsigned int );
  884. X! void report_error_count(void );
  885. X  int report_file_byte_io(long );
  886. X  int report_file_open_length(long );
  887. X  int report_file_open_mode(unsigned short );
  888. X***************
  889. X*** 88,93 ****
  890. X--- 88,94 ----
  891. X  char *hhmmss();
  892. X  char *mode_map();
  893. X  void no_curses_newline();
  894. X+ void report_error_count();
  895. X  void report_file_close();
  896. X  void report_file_open_tod();
  897. X  void report_file_send_open();
  898. Xdiff -c -r /export/home/wht/src/ecu313/z/zcommon.c ./z/zcommon.c
  899. X*** /export/home/wht/src/ecu313/z/zcommon.c    Wed Aug 28 19:31:13 1991
  900. X--- ./z/zcommon.c    Wed Aug 28 19:51:26 1991
  901. X***************
  902. X*** 16,21 ****
  903. X--- 16,22 ----
  904. X  
  905. X  --------------------------------------------------------------------------*/
  906. X  /*+:EDITS:*/
  907. X+ /*:08-21-1991-06:23-wht@n4hgf-sun porting */
  908. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  909. X  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  910. X  
  911. X***************
  912. X*** 26,31 ****
  913. X--- 27,36 ----
  914. X  #include <pwd.h>
  915. X  #include "zmodem.h"
  916. X  
  917. X+ #if defined(sun) || defined(SVR4)
  918. X+ # include <sys/time.h>
  919. X+ #endif
  920. X+ 
  921. X  extern unsigned char vmin_count;
  922. X  extern int Zmodem;
  923. X  extern unsigned Baudrate;
  924. X***************
  925. X*** 248,254 ****
  926. X      report_mode(new_mode);
  927. X      switch(new_mode)
  928. X      {
  929. X- #if defined(M_SYSV)
  930. X      case 2:        /* Un-raw mode used by sz,sb when -g detected */
  931. X          if(!did0)
  932. X              (void) ioctl(iofd,TCGETA,&oldtty);
  933. X--- 253,258 ----
  934. X***************
  935. X*** 323,403 ****
  936. X          Baudrate = getspeed(tty.c_cflag & CBAUD);
  937. X          report_comm_baud_rate(Baudrate);
  938. X          return(OK);
  939. X- #endif
  940. X- #if defined(pyr)
  941. X-         /*
  942. X-      *  NOTE: this should transmit all 8 bits and at the same time
  943. X-      *   respond to XOFF/XON flow control.  If no FIONREAD or other
  944. X-      *   READCHECK alternative,also must respond to INTRRUPT char
  945. X-      *   This doesn't work with BSD4.  It should work with LLITOUT,
  946. X-      *   but LLITOUT was broken on the machine I tried it on.
  947. X-      */
  948. X-     case 2:        /* Un-raw mode used by sz,sb when -g detected */
  949. X-         if(!did0)
  950. X-         {
  951. X-             ioctl(iofd,TIOCEXCL,0);
  952. X-             ioctl(iofd,TIOCGETP,&oldtty);
  953. X-             ioctl(iofd,TIOCGETC,&oldtch);
  954. X- #if defined(LLITOUT)
  955. X-             ioctl(TIOCLGET,&Locmode);    /* Get "local mode" */
  956. X- #endif
  957. X-         }
  958. X-         tty = oldtty;
  959. X-         tch = oldtch;
  960. X- #if defined(READCHECK)
  961. X-         tch.t_intrc = Zmodem ? -1:030;    /* Interrupt char */
  962. X- #else
  963. X-         tch.t_intrc = Zmodem ? 03:030;    /* Interrupt char */
  964. X- #endif
  965. X-         tty.sg_flags |= (ODDP|EVENP|CBREAK);
  966. X-         tty.sg_flags &= ~(ALLDELAY|CRMOD|ECHO|LCASE);
  967. X-         ioctl(iofd,TIOCSETP,&tty);
  968. X-         ioctl(iofd,TIOCSETC,&tch);
  969. X- #if defined(LLITOUT)
  970. X-         ioctl(TIOCLBIS,&Locbit);
  971. X- #endif
  972. X- /* un-raw doesn't work w/o lit out *//*wht code was 99 */
  973. X-         cancel_transaction(0);
  974. X-         did0 = TRUE;
  975. X-         return(OK);
  976. X-     case 1:
  977. X-     case 3:
  978. X-         if(!did0)
  979. X-         {
  980. X-             ioctl(iofd,TIOCEXCL,0);
  981. X-             ioctl(iofd,TIOCGETP,&oldtty);
  982. X-             ioctl(iofd,TIOCGETC,&oldtch);
  983. X- #if defined(LLITOUT)
  984. X-             ioctl(TIOCLGET,&Locmode);    /* Get "local mode" */
  985. X- #endif
  986. X-         }
  987. X-         tty = oldtty;
  988. X-         tty.sg_flags |= RAW;
  989. X-         tty.sg_flags &= ~ECHO;
  990. X-         ioctl(iofd,TIOCSETP,&tty);
  991. X-         did0 = TRUE;
  992. X-         Baudrate = getspeed(tty.sg_ospeed);
  993. X-         report_comm_baud_rate(Baudrate);
  994. X-         return(OK);
  995. X- #endif
  996. X      case 0:
  997. X          if(!did0)
  998. X              return(ERROR);
  999. X- #if defined(M_SYS5)
  1000. X          (void) ioctl(iofd,TCSBRK,1);    /* Wait for output to drain */
  1001. X          (void) ioctl(iofd,TCFLSH,1);    /* Flush input queue */
  1002. X          (void) ioctl(iofd,TCSETAW,&oldtty);    /* Restore modes */
  1003. X          (void) ioctl(iofd,TCXONC,1);    /* Restart output */
  1004. X- #endif
  1005. X- #if defined(pyr)
  1006. X-         ioctl(iofd,TIOCSETP,&oldtty);
  1007. X-         ioctl(iofd,TIOCSETC,&oldtch);
  1008. X-         ioctl(iofd,TIOCNXCL,0);
  1009. X- #if defined(LLITOUT)
  1010. X-         ioctl(TIOCLSET,&Locmode);    /* Restore "local mode" */
  1011. X- #endif
  1012. X- #endif
  1013. X- 
  1014. X          return(OK);
  1015. X      default:
  1016. X          return(ERROR);
  1017. X--- 327,339 ----
  1018. X***************
  1019. X*** 409,423 ****
  1020. X  --------------------------------------------------------------------------*/
  1021. X  sendbrk()
  1022. X  {
  1023. X- #if defined(pyr)
  1024. X-     sleep(1);
  1025. X-     ioctl(iofd,TIOCSBRK,0);
  1026. X-     sleep(1);
  1027. X-     ioctl(iofd,TIOCCBRK,0);
  1028. X- #endif
  1029. X- #if defined(M_SYS5)
  1030. X      ioctl(iofd,TCSBRK,0);
  1031. X- #endif
  1032. X  }    /* end of sendbrk */
  1033. X  
  1034. X  /*+-------------------------------------------------------------------------
  1035. X--- 345,351 ----
  1036. X***************
  1037. X*** 428,441 ****
  1038. X  char *currdir;
  1039. X  int currdir_max;
  1040. X  {
  1041. X- #if defined(pyr)
  1042. X-     getwd(currdir);
  1043. X- #endif
  1044. X- 
  1045. X- #if defined(M_SYS5)
  1046. X      getcwd(currdir,currdir_max);
  1047. X- #endif
  1048. X- 
  1049. X  }    /* end of get_curr_dir */
  1050. X  
  1051. X  /*+-------------------------------------------------------------------------
  1052. X--- 356,362 ----
  1053. X***************
  1054. X*** 492,496 ****
  1055. X--- 413,494 ----
  1056. X  
  1057. X  }    /* end of get_home_dir */
  1058. X  
  1059. X+ /*+-------------------------------------------------------------------------
  1060. X+     Nap(msec) - wrapper for nap()
  1061. X+ 
  1062. X+ ISC and SCO UNIX nap() misbehave.  This kludge doesn't return the
  1063. X+ proper value (the actual time slept), but at least it does not make
  1064. X+ a mockery of the manual page.  It says:
  1065. X+ 
  1066. X+      NAP(S)               UNIX System V            NAP(S)
  1067. X+ 
  1068. X+      Name
  1069. X+       nap -    suspends execution for a short interval
  1070. X+ 
  1071. X+      Syntax
  1072. X+       long nap(period)
  1073. X+       long period;
  1074. X+ 
  1075. X+      Description
  1076. X+       The current process is suspended from    execution for at least
  1077. X+       the number of    milliseconds specified by period, or until a
  1078. X+       signal is received.
  1079. X+ 
  1080. X+      Return Value
  1081. X+       On successful    completion, a long integer indicating the
  1082. X+       number of milliseconds actually slept    is returned. If    the
  1083. X+       process received a signal while napping, the return value
  1084. X+       will be -1, and errno    will be    set to EINTR.
  1085. X+ 
  1086. X+      See Also
  1087. X+       sleep(S)
  1088. X+ 
  1089. X+      Notes
  1090. X+       This function    is driven by the system    clock, which in    most
  1091. X+       cases    has a granularity of tens of milliseconds.  This
  1092. X+       function must    be linked with the linker option -lx.
  1093. X+ 
  1094. X+ It appears nap() under UNIX 3.2.x has departed virtually entirely from
  1095. X+ the manual page.  I'm beginning to look rather silly in several
  1096. X+ milleus since I keep telling people SCO UNIX is a viable upgrade from
  1097. X+ XENIX.  But process control people need some kind of timing capability
  1098. X+ less than one second and we can't do it with nap or select.
  1099. X+ 
  1100. X+ nap(msec) is supposed to nap *at least* msec milliseconds.  However,
  1101. X+ if msec is specified less than 1000/HZ + 1, it will not nap at all.
  1102. X+ This was true for 3.2.0 and 3.2.1.
  1103. X+ 
  1104. X+ It is supposed to return the number of milliseconds it actually
  1105. X+ slept.  Instead, it appears to "save up" the values and return them in
  1106. X+ lots of 1000. This behavior is true for 3.2.2.
  1107. X+ 
  1108. X+ As it is nap() is nearly useless.  I believe select() suffers
  1109. X+ from the same deficiency (< 1000 msec timeout becomes 1000 msec) but
  1110. X+ I haven't "proven" it yet.
  1111. X+ --------------------------------------------------------------------------*/
  1112. X+ long
  1113. X+ Nap(msec)
  1114. X+ long msec;
  1115. X+ {
  1116. X+ #if defined(sun) || defined(SVR4)
  1117. X+ struct timeval timer;
  1118. X+     timer.tv_sec = 0;
  1119. X+     timer.tv_usec = 1000L * msec;
  1120. X+     select(0,0,0,0,&timer);
  1121. X+ #else
  1122. X+ #if defined(M_XENIX) || defined(WORKING_UNIX_NAP)
  1123. X+     return(nap(msec));
  1124. X+ #else
  1125. X+ #ifdef NEED_SHORT_INTERVALS    /* borrow hzmsec setup from ecu.c if need to >*/
  1126. X+     if(msec < hzmsec)
  1127. X+         msec = hzmsec;
  1128. X+ #endif
  1129. X+     if(nap(msec) < 0)
  1130. X+         return(-1);
  1131. X+     return(msec);
  1132. X+ #endif /* defined(M_XENIX) || defined(WORKING_UNIX_NAP) */
  1133. X+ #endif /* sun */
  1134. X+ 
  1135. X+ }    /* end of Nap */
  1136. X  /* end of zcommon.c */
  1137. X  /* vi: set tabstop=4 shiftwidth=4: */
  1138. XOnly in ./z: zcommon.o
  1139. Xdiff -c -r /export/home/wht/src/ecu313/z/zcurses.c ./z/zcurses.c
  1140. X*** /export/home/wht/src/ecu313/z/zcurses.c    Wed Aug 28 19:31:16 1991
  1141. X--- ./z/zcurses.c    Wed Aug 28 14:08:54 1991
  1142. X***************
  1143. X*** 60,65 ****
  1144. X--- 60,68 ----
  1145. X  
  1146. X  ------------------------------------------------------------------------*/
  1147. X  /*+:EDITS:*/
  1148. X+ /*:08-28-1991-14:08-wht@n4hgf2-SVR4 cleanup by slootman@dri.nl */
  1149. X+ /*:08-23-1991-18:33-wht@n4hgf2-disable force no curses for tty vs. line speed */
  1150. X+ /*:08-21-1991-06:23-wht@n4hgf-sun porting */
  1151. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  1152. X  /*:06-15-1991-05:47-root@n4hgf-report per-file xfer rate */
  1153. X  /*:05-25-1991-14:51-wht@n4hgf-FAS/i display */
  1154. X***************
  1155. X*** 79,90 ****
  1156. X--- 82,97 ----
  1157. X  #include <signal.h>
  1158. X  #include <time.h>
  1159. X  #include <sys/timeb.h>
  1160. X+ 
  1161. X  #if defined(M_SYSV)
  1162. X  #   include <sys/machdep.h>
  1163. X  #else
  1164. X+ #if defined(ISC)
  1165. X  #  include <sys/at_ansi.h>
  1166. X  #  include <sys/kd.h>
  1167. X  #endif
  1168. X+ #endif
  1169. X+ 
  1170. X  #if defined(FASI)
  1171. X  #  include <local/fas.h>
  1172. X  #endif    /* FASI */
  1173. X***************
  1174. X*** 270,281 ****
  1175. X          case S_IFBLK:    *rtn = 'b'; break; /* block special */
  1176. X          case S_IFREG:    *rtn = '-'; break; /* regular */
  1177. X  
  1178. X! #if defined(pyr) | defined(BSD4)
  1179. X          case S_IFLNK:    *rtn = 'l'; break; /* symbolic link */
  1180. X          case S_IFSOCK:    *rtn = 's'; break; /* socket */
  1181. X  #endif
  1182. X  
  1183. X! #if defined(M_SYS5)
  1184. X          case S_IFNAM:                        /* name space entry */
  1185. X              if(mode & S_INSEM)                /* semaphore */
  1186. X              {
  1187. X--- 277,288 ----
  1188. X          case S_IFBLK:    *rtn = 'b'; break; /* block special */
  1189. X          case S_IFREG:    *rtn = '-'; break; /* regular */
  1190. X  
  1191. X! #if defined(BSD)
  1192. X          case S_IFLNK:    *rtn = 'l'; break; /* symbolic link */
  1193. X          case S_IFSOCK:    *rtn = 's'; break; /* socket */
  1194. X  #endif
  1195. X  
  1196. X! #if defined(SYSV)
  1197. X          case S_IFNAM:                        /* name space entry */
  1198. X              if(mode & S_INSEM)                /* semaphore */
  1199. X              {
  1200. X***************
  1201. X*** 522,528 ****
  1202. X--- 529,537 ----
  1203. X  int
  1204. X  determine_output_mode()
  1205. X  {
  1206. X+ #if defined(M_UNIX) || defined(ISC) || defined(M_XENIX)
  1207. X      int monitor_type;
  1208. X+ #endif
  1209. X      struct stat dn;
  1210. X      struct stat tty_stat;
  1211. X  #ifdef NO_PTY_CURSES
  1212. X***************
  1213. X*** 537,544 ****
  1214. X--- 546,555 ----
  1215. X          return(1);
  1216. X      }
  1217. X  
  1218. X+ #if defined(M_UNIX) || defined(ISC) || defined(M_XENIX)
  1219. X      if(ioctl(0,CONS_GET,&monitor_type) < 0)    /* not multiscreen */
  1220. X      {
  1221. X+ #endif
  1222. X          sTL = vanilla_TL;
  1223. X          sTR = vanilla_TR;
  1224. X          sBL = vanilla_BL;
  1225. X***************
  1226. X*** 585,592 ****
  1227. X--- 596,607 ----
  1228. X           * of the attached line, use no curses, but do be a bit
  1229. X           * more verbose than if tty not char special
  1230. X           */
  1231. X+ #ifdef TTY_VS_LINE_SPEED_NO_CURSES
  1232. X          test_tty_and_line_baud();
  1233. X+ #endif
  1234. X+ #if defined(M_UNIX) || defined(ISC) || defined(M_XENIX)
  1235. X      }
  1236. X+ #endif
  1237. X  
  1238. X      return(no_curses);
  1239. X  
  1240. X***************
  1241. X*** 1077,1083 ****
  1242. X  long rxpos;
  1243. X  {
  1244. X  char tmp[16];
  1245. X- #if defined(M_SYS5)
  1246. X  char refr;
  1247. X  
  1248. X      if(no_curses)
  1249. X--- 1092,1097 ----
  1250. X***************
  1251. X*** 1091,1097 ****
  1252. X          if(refr == 0x0C || refr == 0x012)    /* ^L or ^R */
  1253. X          {
  1254. X              write(2,"\033[2J",4);
  1255. X!             nap((long)60);
  1256. X              touchwin(stdscr);
  1257. X              wrefresh(stdscr);
  1258. X              touchwin(win);
  1259. X--- 1105,1111 ----
  1260. X          if(refr == 0x0C || refr == 0x012)    /* ^L or ^R */
  1261. X          {
  1262. X              write(2,"\033[2J",4);
  1263. X!             Nap((long)60);
  1264. X              touchwin(stdscr);
  1265. X              wrefresh(stdscr);
  1266. X              touchwin(win);
  1267. X***************
  1268. X*** 1098,1104 ****
  1269. X              wrefresh(win);
  1270. X          }
  1271. X      }
  1272. X- #endif
  1273. X  
  1274. X      if((rxpos > 99999999L) || (rxpos < 0L))
  1275. X          return;
  1276. X--- 1112,1117 ----
  1277. X***************
  1278. X*** 1134,1139 ****
  1279. X--- 1147,1153 ----
  1280. X    total:     row 10 col 33 len 4
  1281. X    skipped:   row 10 col 53 len 3
  1282. X  --------------------------------------------------------------------------*/
  1283. X+ void
  1284. X  report_error_count()
  1285. X  {
  1286. X      char tmp[16];
  1287. XOnly in ./z: zcurses.o
  1288. Xdiff -c -r /export/home/wht/src/ecu313/z/zmodem.h ./z/zmodem.h
  1289. X*** /export/home/wht/src/ecu313/z/zmodem.h    Wed Aug 28 19:31:19 1991
  1290. X--- ./z/zmodem.h    Wed Aug 28 14:08:55 1991
  1291. X***************
  1292. X*** 2,7 ****
  1293. X--- 2,9 ----
  1294. X      zmodem.h -- common include filefor ecurz/ecusz
  1295. X  --------------------------------------------------------------------------*/
  1296. X  /*+:EDITS:*/
  1297. X+ /*:08-28-1991-14:08-wht@n4hgf2-SVR4 cleanup by slootman@dri.nl */
  1298. X+ /*:08-21-1991-06:23-wht@n4hgf-sun porting */
  1299. X  /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
  1300. X  /*:08-14-1990-20:41-wht@n4hgf-ecu3.00-flush old edit history */
  1301. X  
  1302. X***************
  1303. X*** 25,30 ****
  1304. X--- 27,53 ----
  1305. X  #include <sys/types.h>
  1306. X  #include <sys/stat.h>
  1307. X  #include <termio.h>
  1308. X+ #if defined(sun)
  1309. X+ #undef ECHO
  1310. X+ #undef NL0
  1311. X+ #undef NL1
  1312. X+ #undef TAB0
  1313. X+ #undef TAB1
  1314. X+ #undef TAB2
  1315. X+ #undef XTABS
  1316. X+ #undef CR0
  1317. X+ #undef CR1
  1318. X+ #undef CR2
  1319. X+ #undef CR3
  1320. X+ #undef FF0
  1321. X+ #undef FF1
  1322. X+ #undef BS0
  1323. X+ #undef BS1
  1324. X+ #undef TOSTOP
  1325. X+ #undef FLUSHO
  1326. X+ #undef PENDIN
  1327. X+ #undef NOFLSH
  1328. X+ #endif
  1329. X  #include <sys/ioctl.h>
  1330. X  #include <string.h>
  1331. X  #define MODE2OK
  1332. X***************
  1333. X*** 74,80 ****
  1334. X   * Omen Technology.
  1335. X   */
  1336. X  
  1337. X! #define updcrc(cp, crc) ( crctab[((crc >> 8) & 255)] ^ (crc << 8) ^ (cp))
  1338. X  #define UPDC32(b, c) (cr3tab[((int)c ^ b) & 0xff] ^ ((c >> 8) & 0x00FFFFFF))
  1339. X  
  1340. X  
  1341. X--- 97,103 ----
  1342. X   * Omen Technology.
  1343. X   */
  1344. X  
  1345. X! #define updcrc(cp, crc) ( crctab[(((unsigned)crc >> 8) & 255)] ^ (crc << 8) ^ (cp))
  1346. X  #define UPDC32(b, c) (cr3tab[((int)c ^ b) & 0xff] ^ ((c >> 8) & 0x00FFFFFF))
  1347. X  
  1348. X  
  1349. XOnly in ./z: zmodem.o
  1350. SHAR_EOF
  1351. echo 'File PATCH4.01 is complete' &&
  1352. chmod 0664 PATCH4.01 ||
  1353. echo 'restore of PATCH4.01 failed'
  1354. Wc_c="`wc -c < 'PATCH4.01'`"
  1355. test 83457 -eq "$Wc_c" ||
  1356.     echo 'PATCH4.01: original size 83457, current size' "$Wc_c"
  1357. rm -f _shar_wnt_.tmp
  1358. fi
  1359. rm -f _shar_seq_.tmp
  1360. echo You have unpacked the last part
  1361. exit 0
  1362.  
  1363. exit 0 # Just in case...
  1364.