home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume13 / ecu2.80 / patch03 < prev    next >
Encoding:
Text File  |  1990-05-25  |  13.0 KB  |  488 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v13i003: ECU 2.80 patch 3
  3. From: wht@gatech.edu@n4hgf.UUCP (Warren Tucker)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 13, Issue 3
  7. Submitted-by: wht@gatech.edu@n4hgf.UUCP (Warren Tucker)
  8. Archive-name: ecu2.80/patch03
  9.  
  10. This patch applies changes to the file transfer programs.
  11. 1. The transfer efficiency was being displayed as .XX% instead of XX%.
  12. 2. Some unused code was removed.
  13. 3. I found several places where I misspelled Chuck Forsberg's name
  14.    (sorry Chuck).
  15.  
  16. Apply the patch by unsharing this package and typing APPLY.P03.
  17. Patches 1 and 2 must have been applied.
  18. Then, make
  19.       su
  20.       make install
  21.  
  22. #!/bin/sh
  23. # This is ecu2.80/patch03, a shell archive (shar 3.27)
  24. # made 05/23/1990 10:44 UTC by wht%n4hgf@gatech.edu
  25. # Source directory /u1/src/ecu
  26. #
  27. # existing files WILL be overwritten
  28. #
  29. # This shar contains:
  30. # length  mode       name
  31. # ------ ---------- ------------------------------------------
  32. #    440 -rwxr-xr-x APPLY.P03
  33. #  10652 -rw-r--r-- ECU280.P03
  34. #
  35. if touch 2>&1 | fgrep 'mmdd' > /dev/null
  36.  then TOUCH=touch
  37.  else TOUCH=true
  38. fi
  39. # ============= APPLY.P03 ==============
  40. echo "x - extracting APPLY.P03 (Text)"
  41. sed 's/^X//' << 'SHAR_EOF' > APPLY.P03 &&
  42. X:
  43. X#--------------------------------------------------------------
  44. X# APPLY.P03 - ensure patch 2 already applied and apply patch 3
  45. X#--------------------------------------------------------------
  46. Xif fgrep 'PATCHLEVEL 2' patchlevel.h > /dev/null 2>&1
  47. X   then
  48. X       echo 'Applying patch 3';
  49. X   else
  50. X       echo 'You must apply patch 2 first (or patch 3 already applied)';
  51. X       exit 1;
  52. Xfi
  53. Xpatch -p < ECU280.P03
  54. Xcat > patchlevel.h << PLEOF
  55. X#define PATCHLEVEL 3
  56. XPLEOF
  57. Xexit 0
  58. SHAR_EOF
  59. $TOUCH -am 0523062790 APPLY.P03 &&
  60. chmod 0755 APPLY.P03 ||
  61. echo "restore of APPLY.P03 failed"
  62. # ============= ECU280.P03 ==============
  63. echo "x - extracting ECU280.P03 (Text)"
  64. sed 's/^X//' << 'SHAR_EOF' > ECU280.P03 &&
  65. X#-------------------------------------------------------
  66. X# ECU380.P031 - transfer program fixes
  67. X# created by gendiff x1.03 on 23 May 1990 10:23 UTC
  68. X#-------------------------------------------------------
  69. X*** /u4/ecurel/z/ecurz.c    Wed May 23 06:02:40 1990
  70. X--- z/ecurz.c    Mon May 21 19:08:40 1990
  71. X***************
  72. X*** 1,5
  73. X  /* CHK=0x459E */
  74. X! char *numeric_revision = "ecurz 2.38";
  75. X  /*+-------------------------------------------------------------------------
  76. X      ecurz.c - X/Y/ZMODEM receive program
  77. X    Derived from public domain source by Chuck Foresberg, Omen Technologies
  78. X
  79. X--- 1,5 -----
  80. X  /* CHK=0x459E */
  81. X! char *numeric_revision = "ecurz 2.40";
  82. X  /*+-------------------------------------------------------------------------
  83. X      ecurz.c - X/Y/ZMODEM receive program
  84. X    Derived from public domain source by Chuck Forsberg, Omen Technologies
  85. X***************
  86. X*** 2,8
  87. X  char *numeric_revision = "ecurz 2.38";
  88. X  /*+-------------------------------------------------------------------------
  89. X      ecurz.c - X/Y/ZMODEM receive program
  90. X!   Derived from public domain source by Chuck Foresberg, Omen Technologies
  91. X    Adaptation for ecu Copyright 1989, Warren H. Tucker, III
  92. X  
  93. X    Defined functions:
  94. X
  95. X--- 2,8 -----
  96. X  char *numeric_revision = "ecurz 2.40";
  97. X  /*+-------------------------------------------------------------------------
  98. X      ecurz.c - X/Y/ZMODEM receive program
  99. X!   Derived from public domain source by Chuck Forsberg, Omen Technologies
  100. X    Adaptation for ecu Copyright 1989, Warren H. Tucker, III
  101. X  
  102. X    Defined functions:
  103. X***************
  104. X*** 877,883
  105. X  register n;
  106. X  static unsigned char *cdq;    /* pointer for removing chars from linbuf */
  107. X  
  108. X- #ifndef bad_problem
  109. X      if(--Lleft >= 0)
  110. X          return(*cdq++);
  111. X  
  112. X
  113. X--- 877,882 -----
  114. X  register n;
  115. X  static unsigned char *cdq;    /* pointer for removing chars from linbuf */
  116. X  
  117. X      if(--Lleft >= 0)
  118. X          return(*cdq++);
  119. X  
  120. X***************
  121. X*** 900,946
  122. X  
  123. X      --Lleft;
  124. X      return(*cdq++);
  125. X- #else
  126. X- int rtnv;
  127. X- 
  128. X-     if(--Lleft >= 0)
  129. X-     {
  130. X-         rtnv = *cdq++;
  131. X-         goto LOG_AND_RETURN;
  132. X-     }
  133. X- 
  134. X-     n = timeout/10;
  135. X-     if(n < 2)
  136. X-         n = 3;
  137. X-     if(setjmp(tohere))
  138. X-     {
  139. X-         Lleft = 0;
  140. X-         rtnv = *cdq++;
  141. X-         goto LOG_AND_RETURN;
  142. X-     }
  143. X-     signal(SIGALRM,SIGALRM_handler);
  144. X-     alarm(n);
  145. X-     Lleft = read(iofd,cdq = linbuf,Readnum);
  146. X-     alarm(0);
  147. X-     rx_char_count += Lleft;
  148. X- 
  149. X-     if(Lleft < 1)
  150. X-     {
  151. X-         rtnv = TIMEOUT;
  152. X-         goto LOG_AND_RETURN;
  153. X-     }
  154. X-     --Lleft;
  155. X-     rtnv = *cdq++;
  156. X- 
  157. X- LOG_AND_RETURN:
  158. X-     if(log_packets)
  159. X-     {
  160. X-         sprintf(s128,"rl: l=%3d ch=%x\n",Lleft,rtnv);
  161. X-         write(log_packets,s128,strlen(s128));
  162. X-     }
  163. X-     return(rtnv);
  164. X- 
  165. X- #endif
  166. X  
  167. X  }    /* end of readline */
  168. X  
  169. X
  170. X--- 899,904 -----
  171. X  
  172. X      --Lleft;
  173. X      return(*cdq++);
  174. X  
  175. X  }    /* end of readline */
  176. X  
  177. X*** /u4/ecurel/z/ecusz.c    Wed May 23 06:02:42 1990
  178. X--- z/ecusz.c    Mon May 21 19:08:47 1990
  179. X***************
  180. X*** 1,5
  181. X  /* CHK=0x89BB */
  182. X! char *numeric_revision = "ecusz 2.38";
  183. X  #define BUFFERED_WRITE
  184. X  /*+-------------------------------------------------------------------------
  185. X      ecusz.c - X/Y/ZMODEM send program
  186. X
  187. X--- 1,5 -----
  188. X  /* CHK=0x89BB */
  189. X! char *numeric_revision = "ecusz 2.40";
  190. X  #define BUFFERED_WRITE
  191. X  /*+-------------------------------------------------------------------------
  192. X      ecusz.c - X/Y/ZMODEM send program
  193. X***************
  194. X*** 3,9
  195. X  #define BUFFERED_WRITE
  196. X  /*+-------------------------------------------------------------------------
  197. X      ecusz.c - X/Y/ZMODEM send program
  198. X!   Derived from public domain source by Chuck Foresberg, Omen Technologies
  199. X    Adaptation for ecu Copyright 1989, Warren H. Tucker, III
  200. X  
  201. X      Usage:    ecusz [-X -Y -Z] [-12+abdefkLlNnquvwy] [-] file ...
  202. X
  203. X--- 3,9 -----
  204. X  #define BUFFERED_WRITE
  205. X  /*+-------------------------------------------------------------------------
  206. X      ecusz.c - X/Y/ZMODEM send program
  207. X!   Derived from public domain source by Chuck Forsberg, Omen Technologies
  208. X    Adaptation for ecu Copyright 1989, Warren H. Tucker, III
  209. X  
  210. X      Usage:    ecusz [-X -Y -Z] [-12+abdefkLlNnquvwy] [-] file ...
  211. X***************
  212. X*** 67,72
  213. X  
  214. X  --------------------------------------------------------------------------*/
  215. X  /*+:EDITS:*/
  216. X  /*:05-14-1990-20:10-wht@n4hgf-log_packets i/o occurred before log open */
  217. X  /*:05-14-1990-16:17-wht@n4hgf-show open window size */
  218. X  /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
  219. X
  220. X--- 67,73 -----
  221. X  
  222. X  --------------------------------------------------------------------------*/
  223. X  /*+:EDITS:*/
  224. X+ /*:05-18-1990-12:57-wht@n4hgf-report changes in block length */
  225. X  /*:05-14-1990-20:10-wht@n4hgf-log_packets i/o occurred before log open */
  226. X  /*:05-14-1990-16:17-wht@n4hgf-show open window size */
  227. X  /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
  228. X***************
  229. X*** 1498,1503
  230. X      for(;;)
  231. X      {
  232. X          blklen = blklen_original;
  233. X          Txhdr[ZF0] = Lzconv;    /* file conversion request */
  234. X          Txhdr[ZF1] = Lzmanag;    /* file management request */
  235. X          Txhdr[ZF2] = Lztrans;    /* file transport request */
  236. X
  237. X--- 1499,1505 -----
  238. X      for(;;)
  239. X      {
  240. X          blklen = blklen_original;
  241. X+         report_txblklen(blklen);
  242. X          Txhdr[ZF0] = Lzconv;    /* file conversion request */
  243. X          Txhdr[ZF1] = Lzmanag;    /* file management request */
  244. X          Txhdr[ZF2] = Lztrans;    /* file transport request */
  245. X***************
  246. X*** 1646,1651
  247. X                  if(blklen == bad_condx_blklen)
  248. X                      bad_condx_blklen = 0;
  249. X                  else
  250. X                      blklen *= 2;
  251. X                  SameZrposAgain = 0;
  252. X              }
  253. X
  254. X--- 1648,1654 -----
  255. X                  if(blklen == bad_condx_blklen)
  256. X                      bad_condx_blklen = 0;
  257. X                  else
  258. X+                 {
  259. X                      blklen *= 2;
  260. X                      report_txblklen(blklen);
  261. X                  }
  262. X***************
  263. X*** 1647,1652
  264. X                      bad_condx_blklen = 0;
  265. X                  else
  266. X                      blklen *= 2;
  267. X                  SameZrposAgain = 0;
  268. X              }
  269. X          }
  270. X
  271. X--- 1650,1657 -----
  272. X                  else
  273. X                  {
  274. X                      blklen *= 2;
  275. X+                     report_txblklen(blklen);
  276. X+                 }
  277. X                  SameZrposAgain = 0;
  278. X              }
  279. X          }
  280. X***************
  281. X*** 1779,1784
  282. X                      if(bad_condx_blklen == 0)        /* wht */
  283. X                          bad_condx_blklen = blklen;    /* wht */
  284. X                      if(blklen > 256)                /* wht - 32->256 */
  285. X                          blklen /= 2;                /* wht - original code */
  286. X                  }                                    /* wht */
  287. X              }                                        /* wht - original code */
  288. X
  289. X--- 1784,1790 -----
  290. X                      if(bad_condx_blklen == 0)        /* wht */
  291. X                          bad_condx_blklen = blklen;    /* wht */
  292. X                      if(blklen > 256)                /* wht - 32->256 */
  293. X+                     {
  294. X                          blklen /= 2;                /* wht - original code */
  295. X                          report_txblklen(blklen);
  296. X                      }
  297. X***************
  298. X*** 1780,1785
  299. X                          bad_condx_blklen = blklen;    /* wht */
  300. X                      if(blklen > 256)                /* wht - 32->256 */
  301. X                          blklen /= 2;                /* wht - original code */
  302. X                  }                                    /* wht */
  303. X              }                                        /* wht - original code */
  304. X              Lastsync = Rxpos;
  305. X
  306. X--- 1786,1793 -----
  307. X                      if(blklen > 256)                /* wht - 32->256 */
  308. X                      {
  309. X                          blklen /= 2;                /* wht - original code */
  310. X+                         report_txblklen(blklen);
  311. X+                     }
  312. X                  }                                    /* wht */
  313. X              }                                        /* wht - original code */
  314. X              Lastsync = Rxpos;
  315. X*** /u4/ecurel/z/zcommon.c    Mon May  7 23:33:00 1990
  316. X--- z/zcommon.c    Mon May 21 17:24:25 1990
  317. X***************
  318. X*** 1,7
  319. X  /* CHK=0x052B */
  320. X  /*+-------------------------------------------------------------------------
  321. X      zcommon.c -  ecurz/ecusz common code
  322. X!     derived from public domain code by Chuck Forsburg
  323. X      ecu adaptation wht%n4hgf@gatech.edu
  324. X  
  325. X    Defined functions:
  326. X
  327. X--- 1,7 -----
  328. X  /* CHK=0x052B */
  329. X  /*+-------------------------------------------------------------------------
  330. X      zcommon.c -  ecurz/ecusz common code
  331. X!     derived from public domain code by Chuck Forsberg
  332. X      ecu adaptation wht%n4hgf@gatech.edu
  333. X  
  334. X    Defined functions:
  335. X***************
  336. X*** 359,365
  337. X          ioctl(TIOCLBIS,&Locbit);
  338. X  #endif
  339. X  /* un-raw doesn't work w/o lit out *//*wht code was 99 */
  340. X!         cancel_transaction(0)
  341. X          did0 = TRUE;
  342. X          return(OK);
  343. X      case 1:
  344. X
  345. X--- 359,365 -----
  346. X          ioctl(TIOCLBIS,&Locbit);
  347. X  #endif
  348. X  /* un-raw doesn't work w/o lit out *//*wht code was 99 */
  349. X!         cancel_transaction(0);
  350. X          did0 = TRUE;
  351. X          return(OK);
  352. X      case 1:
  353. X***************
  354. X*** 431,438
  355. X  int currdir_max;
  356. X  {
  357. X  #if defined(pyr)
  358. X! char *getwd();
  359. X!     return((getwd(currdir) == (char *)0) ? -1 : 0);
  360. X  #endif
  361. X  
  362. X  #if defined(M_SYS5)
  363. X
  364. X--- 431,437 -----
  365. X  int currdir_max;
  366. X  {
  367. X  #if defined(pyr)
  368. X!     getwd(currdir);
  369. X  #endif
  370. X  
  371. X  #if defined(M_SYS5)
  372. X*** /u4/ecurel/z/zcurses.c    Wed May 23 06:02:46 1990
  373. X--- z/zcurses.c    Mon May 21 19:07:28 1990
  374. X***************
  375. X*** 410,416
  376. X          {
  377. X              rate = (float)total_data_chars_xfered / (float)elapsed_seconds;
  378. X              if(zcurses_baud_rate)
  379. X!                 eff  = rate / ((float)zcurses_baud_rate / 10.0);
  380. X          }
  381. X          if(rate > 0.01)
  382. X          {
  383. X
  384. X--- 410,416 -----
  385. X          {
  386. X              rate = (float)total_data_chars_xfered / (float)elapsed_seconds;
  387. X              if(zcurses_baud_rate)
  388. X!                 eff  = 100.0 * (rate / ((float)zcurses_baud_rate / 10.0));
  389. X          }
  390. X          if(rate > 0.01)
  391. X          {
  392. X***************
  393. X*** 414,421
  394. X          }
  395. X          if(rate > 0.01)
  396. X          {
  397. X!             sprintf(s128,"Transfer rate ~= %.0f ch/sec (%.2f%%)",
  398. X!                 rate,(eff > 0.005) ? eff : 0.0);
  399. X              if(log_packets)
  400. X              {
  401. X                  write(log_packets,"info: ",6);
  402. X
  403. X--- 414,421 -----
  404. X          }
  405. X          if(rate > 0.01)
  406. X          {
  407. X!             sprintf(s128,"Transfer rate ~= %.0f ch/sec (%.0f%%)",
  408. X!                 rate,(eff > 0.5) ? eff : 0.0);
  409. X              if(log_packets)
  410. X              {
  411. X                  write(log_packets,"info: ",6);
  412. X*** /u4/ecurel/z/zlint.h    Tue May  8 02:41:00 1990
  413. X--- z/zlint.h    Mon May 21 01:29:19 1990
  414. X***************
  415. X*** 1,4
  416. X! /* CHK=0x545A */
  417. X  /*+-----------------------------------------------------------------------
  418. X      zlint.h
  419. X  ------------------------------------------------------------------------*/
  420. X
  421. X--- 1,4 -----
  422. X! /* CHK=0xE9E3 */
  423. X  /*+-----------------------------------------------------------------------
  424. X      zlint.h
  425. X  ------------------------------------------------------------------------*/
  426. X***************
  427. X*** 3,9
  428. X      zlint.h
  429. X  ------------------------------------------------------------------------*/
  430. X  /*+:EDITS:*/
  431. X! /*:05-08-1990-02:41-afterlint-creation */
  432. X  
  433. X  #ifndef BUILDING_LINT_ARGS
  434. X  #ifdef LINT_ARGS
  435. X
  436. X--- 3,9 -----
  437. X      zlint.h
  438. X  ------------------------------------------------------------------------*/
  439. X  /*+:EDITS:*/
  440. X! /*:05-21-1990-01:29-afterlint-creation */
  441. X  
  442. X  #ifndef BUILDING_LINT_ARGS
  443. X  #ifdef LINT_ARGS
  444. X***************
  445. X*** 48,53
  446. X  void report_txblklen(int );
  447. X  void report_txpos(long );
  448. X  void report_uninit(int );
  449. X  /* zdebug.c */
  450. X  /* zmodem.c */
  451. X  int noxrd7(void );
  452. X
  453. X--- 48,54 -----
  454. X  void report_txblklen(int );
  455. X  void report_txpos(long );
  456. X  void report_uninit(int );
  457. X+ void report_window(void );
  458. X  /* zdebug.c */
  459. X  /* zmodem.c */
  460. X  int noxrd7(void );
  461. X***************
  462. X*** 96,101
  463. X  void report_txblklen();
  464. X  void report_txpos();
  465. X  void report_uninit();
  466. X  /* zdebug.c */
  467. X  /* zmodem.c */
  468. X  long rclhdr();
  469. X
  470. X--- 97,103 -----
  471. X  void report_txblklen();
  472. X  void report_txpos();
  473. X  void report_uninit();
  474. X+ void report_window();
  475. X  /* zdebug.c */
  476. X  /* zmodem.c */
  477. X  long rclhdr();
  478. SHAR_EOF
  479. $TOUCH -am 0523062990 ECU280.P03 &&
  480. chmod 0644 ECU280.P03 ||
  481. echo "restore of ECU280.P03 failed"
  482. set `wc -c ECU280.P03`;Wc_c=$1
  483. if test "$Wc_c" != "10652"; then
  484.     echo original size 10652, current size $Wc_c
  485. fi
  486. exit 0
  487.  
  488.