FTSUPPOR.LST 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * FTSUPPOR.MOD - COMMS Toolkit FTP support *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1988..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 IMPLEMENTATION MODULE FTSupport;
  13. 12 IMPORT CommUtil,ComSetup,Filenames,FIO,IO,Keyboard,Lib,MPRINTF,RS232,Str,
  14. 13 Timer,Window;
  15. 14 FROM Window IMPORT Color;
  16. ***** ^ duplicate identifier
  17. 15 FROM CommUtil IMPORT StatusFields;
  18. ***** ^ duplicate identifier
  19. 16 FROM ComSetup IMPORT CrTypes;
  20. ***** ^ duplicate identifier
  21. 17
  22. 18 CONST
  23. 19 FTStatWinDef = Window.WinDef(35,5,69,14,LightCyan,Black,FALSE,FALSE,FALSE,TRUE,Window.SingleFrame,LightGray,Black);
  24. ***** ^ not supported yet
  25. ***** ^ not supported yet
  26. ***** ^ undeclared identifier
  27. ***** ^ undeclared identifier
  28. ***** ^ not supported yet
  29. ***** ^ not supported yet
  30. ***** ^ undeclared identifier
  31. ***** ^ undeclared identifier
  32. 20
  33. 21 VAR
  34. 22 SizeIncr,HalfIncr,
  35. 23 BaudIncr,HalfBaud : LONGCARD;
  36. ***** ^ undeclared identifier
  37. 24 StatusWindowOpen,
  38. 25 CarrierLost : BOOLEAN;
  39. 26 BuffPtr,BuffCnt,
  40. 27 TimeCount : CARDINAL;
  41. 28 Buffer : ARRAY[0..260] OF CHAR;
  42. ***** ^ not supported yet
  43. ***** ^ not supported yet
  44. 29 StatWin : Window.WinType;
  45. ***** ^ not supported yet
  46. 30
  47. 31 (*...............................................*)
  48. 32
  49. 33 PROCEDURE OpenStatusWindow(Title:ARRAY OF CHAR);
  50. ***** ^ not supported yet
  51. 34 VAR
  52. 35 i : CARDINAL;
  53. 36 Def : Window.WinDef;
  54. ***** ^ not supported yet
  55. 37 BEGIN
  56. 38 IF StatusWindowOpen THEN
  57. 39 RETURN;
  58. 40 END;
  59. 41 Def := FTStatWinDef;
  60. ***** ^ not supported yet
  61. 42 WITH Def DO
  62. ***** ^ not supported yet
  63. 43 Foreground := CommUtil.Colors.FTStatFore;
  64. ***** ^ undeclared identifier
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. ***** ^ not supported yet
  68. 44 Background := CommUtil.Colors.FTStatBack;
  69. ***** ^ undeclared identifier
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. 45 FrameFore := CommUtil.Colors.FTStatFrFore;
  74. ***** ^ undeclared identifier
  75. ***** ^ not supported yet
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. 46 FrameBack := CommUtil.Colors.FTStatFrBack;
  79. ***** ^ undeclared identifier
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. 47 END;
  84. ***** ^ not supported yet
  85. 48 StatWin := Window.Open(Def);
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. ***** ^ undeclared identifier
  90. 49 Window.SetTitle(StatWin,Title,Window.LeftUpperTitle);
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. ***** ^ undeclared identifier
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. 50 Window.GotoXY(2,1);
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. 51 IO.WrStr('File:');
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. 52 Window.GotoXY(2,2);
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. 53 IO.WrStr('Progress:');
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. 54 Window.GotoXY(2,3);
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. 55 IO.WrStr('Est Mins:');
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. 56 Window.GotoXY(2,4);
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. 57 IO.WrStr('Size:');
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. 58 Window.GotoXY(2,5);
  130. ***** ^ not supported yet
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. 59 IO.WrStr('Mode:');
  134. ***** ^ not supported yet
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. 60 Window.GotoXY(2,6);
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. 61 IO.WrStr('Bytes:');
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. 62 Window.GotoXY(2,7);
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. 63 IO.WrStr('Errors:');
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. 64 Window.GotoXY(2,8);
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. 65 IO.WrStr('Last Msg:');
  158. ***** ^ not supported yet
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. 66 Window.GotoXY(12,2);
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. 67 IO.WrStr('ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ');
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. 68 BuffPtr := 0;
  170. 69 BuffCnt := 0;
  171. 70 StatusWindowOpen := TRUE;
  172. 71 BaudIncr := LONGCARD(ComSetup.Setup.Serial.Baud)*6;
  173. ***** ^ not supported yet
  174. ***** ^ undeclared identifier
  175. ***** ^ not supported yet
  176. ***** ^ not supported yet
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. 72 HalfBaud := BaudIncr DIV 2;
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 73 TimeCount := 0;
  183. 74 Window.TextColor(CommUtil.Colors.FTStatHigh);
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. 75 END OpenStatusWindow;
  190. ***** ^ not supported yet
  191. 76
  192. 77 (*...............................................*)
  193. 78
  194. 79 PROCEDURE NewFilename;
  195. 80 VAR
  196. 81 temps,Path : ARRAY[0..80] OF CHAR;
  197. ***** ^ not supported yet
  198. ***** ^ not supported yet
  199. 82 Name : ARRAY[0..12] OF CHAR;
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. 83 Drive,Ext : ARRAY[0..3] OF CHAR;
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. 84 BEGIN
  206. 85 IF Filenames.ParseFilename(FileSpec,Drive,Path,Name,Ext) THEN
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. ***** ^ undeclared identifier
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. 86 Drive:='';
  215. ***** ^ not supported yet
  216. ***** ^ incompatible assignment
  217. 87 Path:='';
  218. ***** ^ not supported yet
  219. ***** ^ incompatible assignment
  220. 88 Filenames.MakeFilename(Drive,Path,Name,Ext,temps);
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. ***** ^ not supported yet
  224. ***** ^ not supported yet
  225. ***** ^ not supported yet
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. 89 END;
  229. 90 Window.GotoXY(12,1);
  230. ***** ^ not supported yet
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. 91 MPRINTF.PrintF1('%-12s',temps);
  234. ***** ^ not supported yet
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. 92 END NewFilename;
  239. ***** ^ not supported yet
  240. 93
  241. 94 (*...............................................*)
  242. 95
  243. 96 PROCEDURE CompleteFilename;
  244. 97 VAR
  245. 98 Path : ARRAY[0..80] OF CHAR;
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. 99 Name : ARRAY[0..12] OF CHAR;
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. 100 Drive,Ext : ARRAY[0..3] OF CHAR;
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. 101 BEGIN
  255. 102 IF Filenames.ParseFilename(FileSpec,Drive,Path,Name,Ext) & (Drive[0]=0C) & (Path[0]=0C) THEN
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. ***** ^ undeclared identifier
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. ***** ^ not supported yet
  267. 103 Filenames.MakeFilename(Drive,ComSetup.Setup.General.DownloadDir,Name,Ext,FileSpec)
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. ***** ^ undeclared identifier
  278. 104 END;
  279. 105 END CompleteFilename;
  280. ***** ^ not supported yet
  281. 106
  282. 107 (*...............................................*)
  283. 108
  284. 109 (*# save,check(overflow=>off)*)
  285. 110 PROCEDURE ShowProgress;
  286. 111 VAR
  287. 112 Mins : LONGCARD;
  288. ***** ^ undeclared identifier
  289. 113 i,RealLnth,Lnth : CARDINAL;
  290. 114 Line : ARRAY[0..20] OF CHAR;
  291. ***** ^ not supported yet
  292. ***** ^ not supported yet
  293. 115 BEGIN
  294. 116 IF SizeInBytes<>0 THEN
  295. ***** ^ undeclared identifier
  296. 117 Mins := (((SizeInBytes-Transferred)+HalfBaud) DIV BaudIncr)+1;
  297. ***** ^ not supported yet
  298. ***** ^ undeclared identifier
  299. ***** ^ undeclared identifier
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. 118 Window.GotoXY(12,3);
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. 119 IO.WrLngCard(Mins,4);
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. 120 Window.GotoXY(12,2);
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. 121 Window.TextColor(CommUtil.Colors.FTStatFore);
  316. ***** ^ not supported yet
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. 122 Window.TextBackground(CommUtil.Colors.FTStatBar);
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. 123 IF SizeIncr <> 0 THEN
  328. ***** ^ not supported yet
  329. 124 Lnth := CARDINAL((Transferred+HalfIncr) DIV SizeIncr);
  330. ***** ^ undeclared identifier
  331. ***** ^ not supported yet
  332. ***** ^ not supported yet
  333. 125 IF Lnth>40 THEN
  334. 126 Lnth:=40;
  335. 127 END;
  336. 128 RealLnth := Lnth DIV 2;
  337. 129 Lib.Fill(ADR(Line),RealLnth,' ');
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ undeclared identifier
  341. ***** ^ not supported yet
  342. ***** ^ not supported yet
  343. 130 IF ODD(Lnth) THEN
  344. ***** ^ undeclared identifier
  345. ***** ^ not supported yet
  346. 131 Line[RealLnth]:=CHR(222);
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ undeclared identifier
  350. ***** ^ not supported yet
  351. 132 INC(RealLnth);
  352. ***** ^ undeclared identifier
  353. ***** ^ not supported yet
  354. 133 END;
  355. 134 Line[RealLnth] := 0C;
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. 135 IO.WrStr(Line);
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. ***** ^ not supported yet
  362. 136 END;
  363. 137 Window.TextColor(CommUtil.Colors.FTStatHigh);
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. 138 Window.TextBackground(CommUtil.Colors.FTStatBack);
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. ***** ^ not supported yet
  375. 139 END;
  376. 140 END ShowProgress;
  377. ***** ^ not supported yet
  378. 141 (*# restore *)
  379. 142
  380. 143 (*...............................................*)
  381. 144
  382. 145 PROCEDURE UpdateStatus;
  383. 146 BEGIN
  384. 147 IF AbortRequested() THEN
  385. ***** ^ undeclared identifier
  386. ***** ^ not supported yet
  387. 148 RETURN;
  388. 149 END;
  389. 150 Window.GotoXY(12,4);
  390. ***** ^ not supported yet
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. 151 MPRINTF.PrintF1('%-8u',SizeInBytes);
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. ***** ^ undeclared identifier
  398. 152 Window.GotoXY(12,5);
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. 153 MPRINTF.PrintF1('%-8s',XferMode);
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ undeclared identifier
  407. 154 Window.GotoXY(12,6);
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. 155 MPRINTF.PrintF1('%-8u',Transferred);
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. ***** ^ not supported yet
  415. ***** ^ undeclared identifier
  416. 156 Window.GotoXY(12,7);
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. 157 MPRINTF.PrintF1('%-8u',Errors);
  421. ***** ^ not supported yet
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. ***** ^ undeclared identifier
  425. 158 Window.GotoXY(12,8);
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. ***** ^ not supported yet
  429. 159 MPRINTF.PrintF1('%-20s',LastMessage);
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. ***** ^ not supported yet
  433. ***** ^ undeclared identifier
  434. 160 SizeIncr := (SizeInBytes+20) DIV 40;
  435. ***** ^ not supported yet
  436. ***** ^ undeclared identifier
  437. 161 HalfIncr := SizeIncr DIV 2;
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. 162 ShowProgress;
  441. ***** ^ not supported yet
  442. 163 CommUtil.StatusLine(time);
  443. ***** ^ not supported yet
  444. ***** ^ not supported yet
  445. ***** ^ undeclared identifier
  446. 164 Window.Use(StatWin);
  447. ***** ^ not supported yet
  448. ***** ^ not supported yet
  449. ***** ^ not supported yet
  450. 165 END UpdateStatus;
  451. ***** ^ not supported yet
  452. 166
  453. 167 (*...............................................*)
  454. 168
  455. 169 PROCEDURE CloseStatusWindow;
  456. 170 BEGIN
  457. 171 IF NOT StatusWindowOpen THEN
  458. 172 RETURN;
  459. 173 END;
  460. 174 IF Aborted THEN
  461. ***** ^ undeclared identifier
  462. 175 Window.SetTitle(StatWin,'Aborted',Window.LeftUpperTitle);
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. 176 END;
  470. 177 CommUtil.Alarm;
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. 178 Aborted := FALSE;
  474. ***** ^ undeclared identifier
  475. 179 Window.Close(StatWin);
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. ***** ^ not supported yet
  479. 180 CommUtil.StatusLine(time);
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. ***** ^ undeclared identifier
  483. 181 StatusWindowOpen := FALSE;
  484. 182 END CloseStatusWindow;
  485. ***** ^ not supported yet
  486. 183
  487. 184 (*...............................................*)
  488. 185
  489. 186 PROCEDURE Cancel;
  490. 187 VAR
  491. 188 i : CARDINAL;
  492. 189 CanArray : ARRAY[0..15] OF CHAR;
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. 190 BEGIN
  496. 191 FOR i:=0 TO 7 DO
  497. 192 CanArray[i]:=CAN;
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. ***** ^ undeclared identifier
  501. 193 END;
  502. 194 FOR i:=0 TO 7 DO
  503. 195 CanArray[i+8]:=CHR(8);
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. ***** ^ undeclared identifier
  507. ***** ^ not supported yet
  508. 196 END;
  509. 197 RS232.SerialWrite(CanArray,8);
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. ***** ^ not supported yet
  514. 198 END Cancel;
  515. ***** ^ not supported yet
  516. 199
  517. 200 (*...............................................*)
  518. 201
  519. 202 PROCEDURE AbortRequested():BOOLEAN;
  520. 203 VAR
  521. 204 c : CHAR;
  522. 205 BEGIN
  523. 206 IF NOT Aborted THEN
  524. ***** ^ undeclared identifier
  525. 207 WHILE Keyboard.KeyPressed() DO
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. 208 c := Keyboard.RdKey();
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. 209 IF c=CHR(27) THEN
  534. ***** ^ undeclared identifier
  535. ***** ^ not supported yet
  536. 210 Aborted := TRUE;
  537. ***** ^ undeclared identifier
  538. 211 END;
  539. 212 END;
  540. 213 END;
  541. 214 RETURN Aborted;
  542. ***** ^ undeclared identifier
  543. 215 END AbortRequested;
  544. ***** ^ not supported yet
  545. 216
  546. 217 (*...............................................*)
  547. 218
  548. 219 PROCEDURE FlushInput;
  549. 220 VAR
  550. 221 c : CHAR;
  551. 222 BEGIN
  552. 223 WHILE RS232.SerialRead(c,0) DO
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. 224 (* Flush *)
  557. 225 END;
  558. 226 END FlushInput;
  559. ***** ^ not supported yet
  560. 227
  561. 228 (*...............................................*)
  562. 229
  563. 230 PROCEDURE ASCIISend(VAR Filename:ARRAY OF CHAR):CARDINAL;
  564. ***** ^ not supported yet
  565. 231 VAR
  566. 232 f : FIO.File;
  567. ***** ^ not supported yet
  568. 233 Lnth : CARDINAL;
  569. 234
  570. 235 (*. . . . . . . . . . . . . . . . . . . . . . . . .*)
  571. 236
  572. 237 PROCEDURE SendLine;
  573. 238 VAR
  574. 239 i : CARDINAL;
  575. 240 BEGIN
  576. 241 i:=0;
  577. 242 WHILE i<Lnth DO
  578. 243 RS232.SerialWrite(FBuff[i],1);
  579. ***** ^ not supported yet
  580. ***** ^ not supported yet
  581. ***** ^ undeclared identifier
  582. ***** ^ not supported yet
  583. ***** ^ not supported yet
  584. 244 Lib.Delay(ComSetup.Setup.ASCII.CharDelayMS);
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. 245 INC(i);
  592. ***** ^ undeclared identifier
  593. ***** ^ not supported yet
  594. 246 END;
  595. 247 END SendLine;
  596. ***** ^ not supported yet
  597. 248
  598. 249 (*. . . . . . . . . . . . . . . . . . . . . . . . .*)
  599. 250
  600. 251 BEGIN (* ASCIISend *)
  601. 252 f := FIO.Open(Filename);
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. 253 FIO.EOF := FALSE;
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. 254 IF FIO.IOresult()=0 THEN
  610. ***** ^ not supported yet
  611. ***** ^ not supported yet
  612. ***** ^ not supported yet
  613. 255 OpenStatusWindow('ASCII Upload');
  614. ***** ^ not supported yet
  615. ***** ^ not supported yet
  616. 256 Str.Copy(FileSpec,Filename);
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. ***** ^ undeclared identifier
  620. ***** ^ not supported yet
  621. 257 SizeInBytes := FIO.Size(f);
  622. ***** ^ undeclared identifier
  623. ***** ^ not supported yet
  624. ***** ^ not supported yet
  625. ***** ^ not supported yet
  626. 258 Transferred := 0;
  627. ***** ^ undeclared identifier
  628. 259 XferMode:='';
  629. ***** ^ undeclared identifier
  630. 260 Errors:=0;
  631. ***** ^ undeclared identifier
  632. 261 LastMessage:='';
  633. ***** ^ undeclared identifier
  634. 262 Aborted := FALSE;
  635. ***** ^ undeclared identifier
  636. 263 NewFilename;
  637. ***** ^ not supported yet
  638. 264 UpdateStatus;
  639. ***** ^ not supported yet
  640. 265 WHILE (NOT FIO.EOF) AND (NOT AbortRequested()) DO
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. 266 FIO.RdStr(f,FBuff);
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. ***** ^ not supported yet
  649. ***** ^ undeclared identifier
  650. 267 Lnth := Str.Length(FBuff);
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. ***** ^ undeclared identifier
  654. 268 Transferred := Transferred + LONGCARD(Lnth+2);
  655. ***** ^ undeclared identifier
  656. ***** ^ undeclared identifier
  657. ***** ^ undeclared identifier
  658. ***** ^ not supported yet
  659. 269 IF Transferred>SizeInBytes THEN
  660. ***** ^ undeclared identifier
  661. ***** ^ undeclared identifier
  662. 270 Transferred:=SizeInBytes;
  663. ***** ^ undeclared identifier
  664. ***** ^ undeclared identifier
  665. 271 END;
  666. 272 FBuff[Lnth]:=CHR(13);
  667. ***** ^ undeclared identifier
  668. ***** ^ not supported yet
  669. ***** ^ undeclared identifier
  670. ***** ^ not supported yet
  671. 273 INC(Lnth);
  672. ***** ^ undeclared identifier
  673. ***** ^ not supported yet
  674. 274 IF ComSetup.Setup.General.CROutTranslation=CRLF THEN
  675. ***** ^ not supported yet
  676. ***** ^ not supported yet
  677. ***** ^ not supported yet
  678. ***** ^ not supported yet
  679. ***** ^ undeclared identifier
  680. 275 FBuff[Lnth]:=CHR(10);
  681. ***** ^ undeclared identifier
  682. ***** ^ not supported yet
  683. ***** ^ undeclared identifier
  684. ***** ^ not supported yet
  685. 276 INC(Lnth);
  686. ***** ^ undeclared identifier
  687. ***** ^ not supported yet
  688. 277 END;
  689. 278 SendLine;
  690. ***** ^ not supported yet
  691. 279 UpdateStatus;
  692. ***** ^ not supported yet
  693. 280 FlushInput;
  694. ***** ^ not supported yet
  695. 281 Lib.Delay(ComSetup.Setup.ASCII.LineDelayMS);
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. ***** ^ not supported yet
  699. ***** ^ not supported yet
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. 282 END;
  703. 283 FIO.Close(f);
  704. ***** ^ not supported yet
  705. ***** ^ not supported yet
  706. ***** ^ not supported yet
  707. 284 CloseStatusWindow;
  708. ***** ^ not supported yet
  709. 285 RETURN ORD(Aborted)
  710. ***** ^ undeclared identifier
  711. ***** ^ undeclared identifier
  712. 286 ELSE
  713. 287 CommUtil.ErrorMessage('No such file.');
  714. ***** ^ not supported yet
  715. ***** ^ not supported yet
  716. ***** ^ not supported yet
  717. 288 RETURN 2;
  718. 289 END;
  719. 290 END ASCIISend;
  720. ***** ^ not supported yet
  721. 291
  722. 292 (*...............................................*)
  723. 293
  724. 294 PROCEDURE MakeCRCTable;
  725. 295 CONST
  726. 296 POLY = 1021H;
  727. 297 VAR
  728. 298 Entry,i,CRC : CARDINAL;
  729. 299 BEGIN
  730. 300 FOR Entry:=0 TO 255 DO
  731. 301 CRC := Entry<<8;
  732. 302 FOR i:=0 TO 7 DO
  733. 303 IF 15 IN BITSET(CRC) THEN
  734. ***** ^ undeclared identifier
  735. ***** ^ not supported yet
  736. 304 CRC := CARDINAL(BITSET(CRC<<1) / BITSET(POLY))
  737. ***** ^ undeclared identifier
  738. ***** ^ not supported yet
  739. ***** ^ undeclared identifier
  740. ***** ^ not supported yet
  741. 305 ELSE
  742. 306 CRC := CRC<<1
  743. 307 END;
  744. 308 END;
  745. 309 CRCTable[Entry] := CRC;
  746. ***** ^ undeclared identifier
  747. ***** ^ not supported yet
  748. 310 END;
  749. 311 END MakeCRCTable;
  750. ***** ^ not supported yet
  751. 312
  752. 313 (*................................................*)
  753. 314
  754. 315 BEGIN
  755. 316 MakeCRCTable;
  756. ***** ^ not supported yet
  757. 317 StatusWindowOpen := FALSE;
  758. 318 Aborted := FALSE;
  759. ***** ^ undeclared identifier
  760. 319 HookOnFT := FALSE;
  761. ***** ^ undeclared identifier
  762. 320 END FTSupport.
  763. ***** ^ not supported yet
  764. 321
  765. 442 errors