DELOLDER.LST 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. Listing:
  2. 1 MODULE DelOlder;
  3. 2
  4. 3
  5. 4 IMPORT Diagnostics;
  6. 5
  7. 6 IMPORT BigSets;
  8. 7 IMPORT Drectory;
  9. 8 IMPORT EnvironUtils;
  10. 9 IMPORT ErrorManager;
  11. 10 IMPORT HandleIO;
  12. 11 IMPORT KbdInput;
  13. 12 IMPORT M2Strings;
  14. 13 IMPORT PosUtils;
  15. 14 IMPORT StrConv;
  16. 15 IMPORT StrEdit;
  17. 16 IMPORT StringIO;
  18. 17
  19. 18
  20. 19 VAR
  21. 20 exiting, BatchMode : BOOLEAN;
  22. 21 PrimaryFileSpec, SecondaryFileSpec, PrimaryDirName, SecondaryDirName,
  23. 22 PrimaryFileSpecPart, SecondaryFileSpecPart: ARRAY [0..79] OF CHAR;
  24. ***** ^ not supported yet
  25. ***** ^ not supported yet
  26. 23
  27. 24 PrimaryDrive, SecondaryDrive: CHAR;
  28. 25
  29. 26
  30. 27 PROCEDURE Ask( question: ARRAY OF CHAR; VAR answer: ARRAY OF CHAR );
  31. ***** ^ not supported yet
  32. ***** ^ not supported yet
  33. 28 VAR
  34. 29 tmpstr: ARRAY [0..79] OF CHAR;
  35. ***** ^ not supported yet
  36. ***** ^ not supported yet
  37. 30 BEGIN
  38. 31 StringIO.WriteStr( StringIO.outp, question );
  39. ***** ^ not supported yet
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. ***** ^ not supported yet
  44. 32 IF answer[0] # 0C THEN
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. 33 (* There is a default. *)
  48. 34 StringIO.WriteStr( StringIO.outp, ' <' );
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. 35 StringIO.WriteStr( StringIO.outp, answer );
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. 36 StringIO.WriteStr( StringIO.outp, '> ' );
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. 37 END;
  67. 38 StringIO.ReadStr( StringIO.inp, tmpstr );
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. 39 IF tmpstr[0] = 0C THEN
  74. ***** ^ not supported yet
  75. ***** ^ not supported yet
  76. 40 RETURN;
  77. 41 END;
  78. 42 IF (( CAP(tmpstr[0]) = 'Q' ) OR (tmpstr[0] = CHR(27)))
  79. ***** ^ undeclared identifier
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ undeclared identifier
  85. ***** ^ not supported yet
  86. 43 AND (M2Strings.Length(tmpstr) = 1) THEN
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. 44 ErrorManager.StraightToDOS('');
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. 45 END;
  95. 46 M2Strings.Assign( tmpstr, answer );
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 47 END Ask;
  101. ***** ^ not supported yet
  102. 48
  103. 49
  104. 50 PROCEDURE FirstIsOlder( VAR First, Second: Drectory.FileInfoRec ): BOOLEAN;
  105. ***** ^ not supported yet
  106. 51 BEGIN
  107. 52 IF First.year < Second.year THEN
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. 53 RETURN TRUE;
  113. 54 ELSIF First.year > Second.year THEN
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. 55 RETURN FALSE;
  119. 56 END;
  120. 57 IF First.month < Second.month THEN
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. 58 RETURN TRUE;
  126. 59 ELSIF First.month > Second.month THEN
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. 60 RETURN FALSE;
  132. 61 END;
  133. 62 IF First.day < Second.day THEN
  134. ***** ^ not supported yet
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. 63 RETURN TRUE;
  139. 64 ELSIF First.day > Second.day THEN
  140. ***** ^ not supported yet
  141. ***** ^ not supported yet
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. 65 RETURN FALSE;
  145. 66 END;
  146. 67 IF First.hour < Second.hour THEN
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. 68 RETURN TRUE;
  152. 69 ELSIF First.hour > Second.hour THEN
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. 70 RETURN FALSE;
  158. 71 END;
  159. 72 IF First.minute < Second.minute THEN
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. 73 RETURN TRUE;
  165. 74 ELSIF First.minute > Second.minute THEN
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. ***** ^ not supported yet
  170. 75 RETURN FALSE;
  171. 76 END;
  172. 77 IF First.second < Second.second THEN
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. ***** ^ not supported yet
  176. ***** ^ not supported yet
  177. 78 RETURN TRUE;
  178. 79 ELSE
  179. 80 RETURN FALSE;
  180. 81 END;
  181. 82 END FirstIsOlder;
  182. ***** ^ not supported yet
  183. 83
  184. 84
  185. 85 PROCEDURE SameTimeStamp( VAR First, Second: Drectory.FileInfoRec ): BOOLEAN;
  186. ***** ^ not supported yet
  187. 86 BEGIN
  188. 87 IF (First.year = Second.year) AND
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. ***** ^ not supported yet
  193. 88 (First.month = Second.month) AND
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. ***** ^ not supported yet
  198. 89 (First.day = Second.day) AND
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. 90 (First.hour = Second.hour) AND
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. 91 (First.minute = Second.minute) AND
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. 92 (First.second = Second.second) THEN
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. 93 RETURN TRUE;
  219. 94 ELSE
  220. 95 RETURN FALSE;
  221. 96 END;
  222. 97 END SameTimeStamp;
  223. ***** ^ not supported yet
  224. 98
  225. 99
  226. 100 PROCEDURE MakeInfoStr( FileInfo: Drectory.FileInfoRec; VAR TheStr: ARRAY
  227. ***** ^ not supported yet
  228. 101 OF CHAR );
  229. ***** ^ not supported yet
  230. 102 VAR
  231. 103 dumstr: ARRAY [0..79] OF CHAR;
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. 104 BEGIN
  235. 105 StrEdit.AssignStr( FileInfo.name, TheStr );
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. 106 WHILE M2Strings.Length(TheStr) < 12 DO
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. ***** ^ not supported yet
  245. 107 StrEdit.Append( TheStr, ' ' );
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. 108 END;
  251. 109 IF Drectory.SubdirectoryFile IN FileInfo.attribute THEN
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. 110 StrEdit.Append( TheStr, ' <DIR>' );
  257. ***** ^ not supported yet
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. 111 ELSE
  262. 112 StrConv.LongIntegerToStr( FileInfo.size, 8, dumstr );
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. ***** ^ not supported yet
  267. ***** ^ not supported yet
  268. 113 StrEdit.Append( TheStr, dumstr );
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. 114 END;
  274. 115 StrConv.DateToStr( FileInfo.month, FileInfo.day, FileInfo.year,
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. 116 dumstr );
  284. ***** ^ not supported yet
  285. 117 StrEdit.Append( TheStr, ' ' );
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. 118 StrEdit.Append( TheStr, dumstr );
  291. ***** ^ not supported yet
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. 119 StrConv.TimeToStr( FileInfo.hour, FileInfo.minute, FileInfo.second,
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. ***** ^ not supported yet
  303. ***** ^ not supported yet
  304. 120 FileInfo.second, dumstr );
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. 121 M2Strings.Delete( dumstr, M2Strings.Length(dumstr) - 7, 6 );
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. 122 StrEdit.Append( TheStr, ' ' );
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. 123 StrEdit.Append( TheStr, dumstr );
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. 124 END MakeInfoStr;
  327. ***** ^ not supported yet
  328. 125
  329. 126 PROCEDURE yes() : BOOLEAN;
  330. 127 VAR
  331. 128 choice : CARDINAL;
  332. 129 BEGIN
  333. 130 (*yes*)
  334. 131 IF BatchMode THEN
  335. 132 StringIO.WriteStr( StringIO.outp, 'yes');
  336. ***** ^ not supported yet
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. 133 RETURN TRUE;
  342. 134 END;
  343. 135 choice := KbdInput.KeyHit( KbdInput.YorN );
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. 136 IF KbdInput.CAPkey(choice) = ORD('Y') THEN
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. ***** ^ not supported yet
  352. ***** ^ undeclared identifier
  353. ***** ^ not supported yet
  354. 137 StringIO.WriteStr( StringIO.outp, 'yes');
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. 138 RETURN TRUE;
  361. 139 ELSE
  362. 140 StringIO.WriteStr( StringIO.outp, 'no');
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. 141 IF KbdInput.CAPkey(choice) = ORD('Q') THEN
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ undeclared identifier
  373. ***** ^ not supported yet
  374. 142 exiting := TRUE;
  375. 143 END;
  376. 144 RETURN FALSE;
  377. 145 END;
  378. 146 END yes;
  379. ***** ^ not supported yet
  380. 147
  381. 148
  382. 149 PROCEDURE Processor1(info : Drectory.FileInfoRec) : BOOLEAN;
  383. ***** ^ not supported yet
  384. 150 VAR
  385. 151 TmpPrimaryFile, TmpSecondaryFile, PrimaryInfoStr, SecondaryInfoStr:
  386. 152 ARRAY [0..79] OF CHAR;
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. 153 DirHandle: CARDINAL;
  390. 154 tmpinfo: Drectory.FileInfoRec;
  391. ***** ^ not supported yet
  392. 155 BEGIN
  393. 156 IF PosUtils.Equal( '..', info.name ) OR
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. ***** ^ not supported yet
  399. 157 PosUtils.Equal( '.', info.name ) THEN
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. ***** ^ not supported yet
  403. ***** ^ not supported yet
  404. 158 RETURN TRUE;
  405. 159 END;
  406. 160
  407. 161 M2Strings.Concat( PrimaryDirName, info.name, TmpPrimaryFile );
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. 162 M2Strings.Concat( SecondaryDirName, info.name, TmpSecondaryFile );
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. 163
  422. 164 M2Strings.Insert( ':', TmpPrimaryFile, 0 );
  423. ***** ^ not supported yet
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. ***** ^ not supported yet
  427. 165 M2Strings.Insert( PrimaryDrive, TmpPrimaryFile, 0 );
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 166 M2Strings.Insert( ':', TmpSecondaryFile, 0 );
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. 167 M2Strings.Insert( SecondaryDrive, TmpSecondaryFile, 0 );
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. 168
  443. 169 IF HandleIO.FileExists( TmpSecondaryFile ) THEN
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. 170 MakeInfoStr( info, PrimaryInfoStr );
  448. ***** ^ not supported yet
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. 171 DirHandle := 0FFFFH;
  452. 172 StringIO.PrintMessage( Drectory.FindFirstFile( TmpSecondaryFile,
  453. ***** ^ not supported yet
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. 173 DirHandle, tmpinfo ) );
  459. ***** ^ not supported yet
  460. 174 MakeInfoStr( tmpinfo, SecondaryInfoStr );
  461. ***** ^ not supported yet
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. 175 IF ((M2Strings.CompareStr( PrimaryInfoStr, SecondaryInfoStr ) = 0) OR
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. 176 FirstIsOlder( tmpinfo, info ) OR SameTimeStamp( tmpinfo, info) ) AND
  470. ***** ^ not supported yet
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. ***** ^ not supported yet
  476. 177 (NOT PosUtils.Present('<DIR>', PrimaryInfoStr) ) THEN
  477. ***** ^ not supported yet
  478. ***** ^ not supported yet
  479. ***** ^ not supported yet
  480. ***** ^ not supported yet
  481. 178 M2Strings.Insert( PrimaryDirName, PrimaryInfoStr, 0 );
  482. ***** ^ not supported yet
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. ***** ^ not supported yet
  487. 179 M2Strings.Insert( ':', PrimaryInfoStr, 0 );
  488. ***** ^ not supported yet
  489. ***** ^ not supported yet
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. 180 M2Strings.Insert( PrimaryDrive, PrimaryInfoStr, 0 );
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 181 M2Strings.Insert( SecondaryDirName, SecondaryInfoStr, 0 );
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. 182 M2Strings.Insert( ':', SecondaryInfoStr, 0 );
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. 183 M2Strings.Insert( SecondaryDrive, SecondaryInfoStr, 0 );
  509. ***** ^ not supported yet
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. 184 StrEdit.Append( SecondaryInfoStr, ' ' );
  514. ***** ^ not supported yet
  515. ***** ^ not supported yet
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. 185 StringIO.WriteEol( StringIO.outp, '' );
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. ***** ^ not supported yet
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. 186 StringIO.WriteStr( StringIO.outp, 'Keeping ' );
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. ***** ^ not supported yet
  530. 187 StringIO.WriteEol( StringIO.outp, PrimaryInfoStr );
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. ***** ^ not supported yet
  536. 188 StringIO.WriteStr( StringIO.outp, 'Delete? ' );
  537. ***** ^ not supported yet
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. 189 StringIO.WriteStr( StringIO.outp, SecondaryInfoStr );
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. ***** ^ not supported yet
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. 190 IF yes() THEN
  549. ***** ^ not supported yet
  550. ***** ^ not supported yet
  551. 191 StringIO.PrintMessage( Drectory.DeleteFile( TmpSecondaryFile ) );
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. 192 END;
  558. 193 IF exiting THEN
  559. 194 RETURN FALSE;
  560. 195 END;
  561. 196 END;
  562. 197 END;
  563. 198 RETURN TRUE;
  564. 199 END Processor1;
  565. ***** ^ not supported yet
  566. 200
  567. 201
  568. 202
  569. 203 BEGIN
  570. 204 IF NOT EnvironUtils.ParsedParam( 1, PrimaryFileSpec ) THEN
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. ***** ^ not supported yet
  574. 205 StringIO.WriteEol( StringIO.outp, '' );
  575. ***** ^ not supported yet
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. ***** ^ not supported yet
  579. ***** ^ not supported yet
  580. 206 StringIO.WriteEol( StringIO.outp,
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. ***** ^ not supported yet
  584. ***** ^ not supported yet
  585. 207 'DelOlder expects two wildcard specifications of files in different' );
  586. ***** ^ not supported yet
  587. 208 StringIO.WriteEol( StringIO.outp,
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. 209 'directories. It deletes all files in the second directory with ' );
  593. ***** ^ not supported yet
  594. 210 StringIO.WriteEol( StringIO.outp,
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. ***** ^ not supported yet
  599. 211 'names that match those of files in the first directory if the ' );
  600. ***** ^ not supported yet
  601. 212 StringIO.WriteEol( StringIO.outp,
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. 213 'secondary files are identical to or older than the primary files. A ' );
  607. ***** ^ not supported yet
  608. 214 StringIO.WriteEol( StringIO.outp,
  609. ***** ^ not supported yet
  610. ***** ^ not supported yet
  611. ***** ^ not supported yet
  612. ***** ^ not supported yet
  613. 215 'trailing /p makes it pause for confirmation before deleting each file.' );
  614. ***** ^ not supported yet
  615. 216 StringIO.WriteEol( StringIO.outp, '' );
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. 217 PrimaryFileSpec := '';
  622. ***** ^ not supported yet
  623. ***** ^ incompatible assignment
  624. 218 Ask( 'Primary file specification? (These files will survive.) ',
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. 219 PrimaryFileSpec );
  628. ***** ^ not supported yet
  629. 220 END;
  630. 221 IF NOT EnvironUtils.ParsedParam( 2, SecondaryFileSpec ) THEN
  631. ***** ^ not supported yet
  632. ***** ^ not supported yet
  633. ***** ^ not supported yet
  634. 222 SecondaryFileSpec := '';
  635. ***** ^ not supported yet
  636. ***** ^ incompatible assignment
  637. 223 Ask( 'Secondary file specification? (These files may be deleted.) ',
  638. ***** ^ not supported yet
  639. ***** ^ not supported yet
  640. 224 SecondaryFileSpec );
  641. ***** ^ not supported yet
  642. 225 END;
  643. 226
  644. 227 StrEdit.CrunchBlanks( PrimaryFileSpec );
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. 228 StrEdit.CrunchBlanks( SecondaryFileSpec );
  649. ***** ^ not supported yet
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. 229 IF SecondaryFileSpec[M2Strings.Length(SecondaryFileSpec)-2]='/' THEN
  653. ***** ^ not supported yet
  654. ***** ^ not supported yet
  655. ***** ^ not supported yet
  656. ***** ^ not supported yet
  657. ***** ^ not supported yet
  658. 230 IF CAP( SecondaryFileSpec[M2Strings.Length(SecondaryFileSpec)-1] ) = 'P' THEN
  659. ***** ^ undeclared identifier
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. ***** ^ not supported yet
  665. 231 M2Strings.Delete(SecondaryFileSpec, M2Strings.Length(SecondaryFileSpec)-2, 2);
  666. ***** ^ not supported yet
  667. ***** ^ not supported yet
  668. ***** ^ not supported yet
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. 232 StrEdit.CutTrailingChars( ' ', SecondaryFileSpec);
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. ***** ^ not supported yet
  677. 233 BatchMode := FALSE;
  678. 234 ELSE
  679. 235 BatchMode := TRUE;
  680. 236 END;
  681. 237 ELSE
  682. 238 BatchMode := TRUE;
  683. 239 END;
  684. 240
  685. 241 BigSets.AppendSet( KbdInput.YorN, "{'q', 'Q'}" );
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. ***** ^ not supported yet
  689. ***** ^ not supported yet
  690. ***** ^ not supported yet
  691. 242
  692. 243 Drectory.GetDrivePathAndName( SecondaryFileSpec, SecondaryDrive,
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. ***** ^ not supported yet
  696. 244 SecondaryDirName, SecondaryFileSpecPart );
  697. ***** ^ not supported yet
  698. ***** ^ not supported yet
  699. 245 Drectory.GetDrivePathAndName( PrimaryFileSpec, PrimaryDrive,
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. ***** ^ not supported yet
  703. 246 PrimaryDirName, PrimaryFileSpecPart );
  704. ***** ^ not supported yet
  705. ***** ^ not supported yet
  706. 247
  707. 248 IF PosUtils.Equal( PrimaryFileSpecPart, '.' ) THEN
  708. ***** ^ not supported yet
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. 249 StringIO.PrintMessage( Drectory.GetCurrentDir( Drectory.GetDefaultDrive(),
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. ***** ^ not supported yet
  716. ***** ^ not supported yet
  717. ***** ^ not supported yet
  718. ***** ^ not supported yet
  719. ***** ^ not supported yet
  720. 250 PrimaryDirName ) );
  721. ***** ^ not supported yet
  722. 251 END;
  723. 252 IF PosUtils.Equal( SecondaryFileSpecPart, '.' ) THEN
  724. ***** ^ not supported yet
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. 253 StringIO.PrintMessage( Drectory.GetCurrentDir( Drectory.GetDefaultDrive(),
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. ***** ^ not supported yet
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. 254 SecondaryDirName ) );
  737. ***** ^ not supported yet
  738. 255 END;
  739. 256
  740. 257 IF PrimaryFileSpecPart[0] = 0C THEN
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. 258 PrimaryFileSpecPart := '*.*';
  744. ***** ^ not supported yet
  745. ***** ^ not supported yet
  746. 259 END;
  747. 260 IF SecondaryFileSpecPart[0] = 0C THEN
  748. ***** ^ not supported yet
  749. ***** ^ not supported yet
  750. 261 SecondaryFileSpecPart := '*.*';
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. 262 END;
  754. 263
  755. 264 StrEdit.CutTrailingChars( '\', PrimaryDirName );
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. 265 StrEdit.CutTrailingChars( '\', SecondaryDirName );
  760. ***** ^ not supported yet
  761. ***** ^ not supported yet
  762. ***** ^ not supported yet
  763. 266 StrEdit.Append( PrimaryDirName, '\' );
  764. ***** ^ not supported yet
  765. ***** ^ not supported yet
  766. ***** ^ not supported yet
  767. ***** ^ not supported yet
  768. 267 StrEdit.Append( SecondaryDirName, '\' );
  769. ***** ^ not supported yet
  770. ***** ^ not supported yet
  771. ***** ^ not supported yet
  772. ***** ^ not supported yet
  773. 268
  774. 269 exiting := FALSE;
  775. 270
  776. 271 StringIO.PrintMessage(Drectory.FindFiles( PrimaryFileSpec, Processor1 ));
  777. ***** ^ not supported yet
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. ***** ^ not supported yet
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. 272
  784. 273 END DelOlder.
  785. 510 errors