BUILDLST.LST 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837
  1. Listing:
  2. 1 IMPLEMENTATION MODULE BuildLst;
  3. 2 (*
  4. 3 * REPERTOIRE
  5. 4 * Release 1.6
  6. 5 * By Charles Bradford and Cole Brecheen
  7. 6 * (c) Copyright 1985-1992 PMI
  8. 7 * Green Bay, Wisconsin
  9. 8 * All rights reserved
  10. 9 * (414) 468-6040
  11. 10 *
  12. 11 * $Header: D:/logfiles/mods/buildlst.mov 1.5 10 Mar 1991 15:25:16 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 IMPORT AltKeys;
  18. 17 IMPORT ErrorManager;
  19. 18 IMPORT GenLists;
  20. 19 IMPORT KbdInput;
  21. 20 IMPORT M2Strings;
  22. 21 IMPORT NdxBones;
  23. 22 IMPORT NdxFiles;
  24. 23 IMPORT NdxTypes;
  25. 24 IMPORT PosUtils;
  26. 25 IMPORT ScreenInput;
  27. 26 IMPORT ScrnTypes;
  28. 27 IMPORT ScrnUtl1;
  29. 28 IMPORT StrEdit;
  30. 29 IMPORT StrLogic;
  31. 30 IMPORT VWindows;
  32. 31 IMPORT WindowPrims;
  33. 32
  34. 33 VAR
  35. 34 Initialized : BOOLEAN;
  36. 35
  37. 36 PROCEDURE Init();
  38. 37 BEGIN
  39. 38 IF Initialized THEN
  40. 39 RETURN;
  41. 40 ELSE
  42. 41 Initialized := TRUE;
  43. 42 END;
  44. 43 AltKeys.Init();
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. ***** ^ not supported yet
  48. 44 ErrorManager.Init();
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. 45 GenLists.Init();
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. 46 KbdInput.Init();
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. 47 M2Strings.Init();
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. 48 NdxBones.Init();
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. ***** ^ not supported yet
  68. 49 NdxFiles.Init();
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 50 NdxTypes.Init();
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. ***** ^ not supported yet
  76. 51 PosUtils.Init();
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. 52 ScreenInput.Init();
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. 53 ScrnTypes.Init();
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. 54 ScrnUtl1.Init();
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. 55 StrEdit.Init();
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. 56 StrLogic.Init();
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 57 VWindows.Init();
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. 58 WindowPrims.Init();
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. 59 END Init;
  109. ***** ^ not supported yet
  110. 60
  111. 61
  112. 62 PROCEDURE DeleteListRec( VAR TheList: GenLists.GenList);
  113. ***** ^ not supported yet
  114. 63 VAR
  115. 64 dumc, BadOne: CARDINAL;
  116. 65 BEGIN
  117. 66 BadOne := GenLists.ScanList( ListStorageRec,
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ undeclared identifier
  121. 67 TheList, 1, 65535, dumc);
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. 68 IF BadOne # 0 THEN
  125. 69 GenLists.ListDelete( TheList, BadOne, 1);
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. 70 END;
  131. 71 END DeleteListRec;
  132. ***** ^ not supported yet
  133. 72
  134. 73
  135. 74 PROCEDURE BuildList( NdxFile: NdxTypes.NdxFileType; TheFrame:
  136. ***** ^ not supported yet
  137. 75 ScrnTypes.DisplayFrame; FirstRuleField, LastRuleField: CARDINAL;
  138. ***** ^ not supported yet
  139. 76 LimitingListName: ARRAY OF CHAR; VAR ErrorField: CARDINAL; VAR
  140. ***** ^ not supported yet
  141. 77 OutList: GenLists.GenList);
  142. ***** ^ not supported yet
  143. 78
  144. 79 VAR
  145. 80 LimitingList, TmpList, Criteria: GenLists.GenList;
  146. ***** ^ not supported yet
  147. 81 KeyHit, cnt: CARDINAL;
  148. 82 dumbool: BOOLEAN;
  149. 83 TmpFieldRec: ScrnTypes.InputFieldRecord;
  150. ***** ^ not supported yet
  151. 84 TmpExpression: ARRAY [0..79] OF CHAR;
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. 85 BEGIN
  155. 86 (*BuildLists*)
  156. 87 ErrorField := 0;
  157. 88 FOR cnt := FirstRuleField TO LastRuleField DO
  158. 89 (*First we make sure each non-empty field contains a
  159. 90 valid search expression.*)
  160. 91 ScrnUtl1.GetFieldText( TheFrame, cnt, TmpExpression);
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. 92 IF NOT PosUtils.IsBlank( TmpExpression ) THEN
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. 93 IF StrLogic.ExpressionTest( (*dummy string*) '',
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. 94 TmpExpression ) = 0 THEN
  173. ***** ^ not supported yet
  174. 95 (*do nothing*)
  175. 96 END;
  176. 97 IF StrLogic.StrLogicErrorLevel # 0 THEN
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. 98 (*something's wrong with this expression*)
  180. 99 ErrorField := cnt;
  181. 100 END;
  182. 101 END;
  183. 102 END;
  184. 103 IF ErrorField # 0 THEN
  185. 104 RETURN;
  186. 105 END;
  187. 106 IF M2Strings.Length(LimitingListName) > 0 THEN
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. 107 IF NOT GetRecNameList( NdxFile, LimitingListName,
  192. ***** ^ undeclared identifier
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. 108 LimitingList) THEN
  196. ***** ^ not supported yet
  197. 109 WindowPrims.MsgBox( VWindows.SE,
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. 110 "List not stored. Press any key.",
  203. ***** ^ not supported yet
  204. 111 KbdInput.AnyKeyNum, KeyHit );
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. 112 GenLists.NewList( LimitingList );
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. 113 END;
  213. 114 ELSE
  214. 115 GenLists.NewList( LimitingList );
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. 116 END;
  219. 117 GenLists.NewList( Criteria );
  220. ***** ^ not supported yet
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. 118 FOR cnt := FirstRuleField TO LastRuleField DO
  224. 119 ScrnUtl1.GetFieldText( TheFrame, cnt, TmpExpression);
  225. ***** ^ not supported yet
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. 120 IF NOT PosUtils.IsBlank( TmpExpression ) THEN
  230. ***** ^ not supported yet
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. 121 ScrnUtl1.GetFieldRec( TheFrame, cnt, TmpFieldRec );
  234. ***** ^ not supported yet
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. 122 AltKeys.AddCriteria( Criteria, AltKeys.or, AltKeys.StrSelector,
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. 123 TmpExpression, TmpFieldRec.fnam );
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. 124 (*Means the field names in this screen have to be the
  251. 125 same as the field names we plan to search.*)
  252. 126 END;
  253. 127 END;
  254. 128 IF AltKeys.LoadAltList( NdxFile, LimitingList, 'KEY', Criteria ) THEN
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. 129 IF NOT AltKeys.GetAltList( NdxFile, 'KEY', TmpList ) THEN
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. ***** ^ not supported yet
  267. 130 ErrorManager.WARN('Critical error in building list.');
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. 131 END;
  272. 132 GenLists.CopyList( TmpList, OutList );
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. 133 AltKeys.DisposeAltList( NdxFile, 'KEY' );
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. 134 ELSE
  283. 135 GenLists.NewList( OutList );
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. 136 END;
  288. 137 GenLists.DisposeList( Criteria );
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. 138 END BuildList;
  293. ***** ^ not supported yet
  294. 139
  295. 140 PROCEDURE TypeCheck( TheList: GenLists.GenList; TheElmt: CARDINAL ):
  296. ***** ^ not supported yet
  297. 141 CARDINAL;
  298. 142 (*This routine is described in section 6.9 of the manual.*)
  299. 143 VAR
  300. 144 TypeCode, DummySize: CARDINAL;
  301. 145 DummyAddr: POINTER TO CARDINAL;
  302. ***** ^ not supported yet
  303. 146 BEGIN
  304. 147 GenLists.GetElmtAdr( TheList, TheElmt, DummyAddr, DummySize,
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. 148 TypeCode );
  310. ***** ^ not supported yet
  311. 149 RETURN TypeCode;
  312. 150 END TypeCheck;
  313. ***** ^ not supported yet
  314. 151
  315. 152 VAR
  316. 153 LastSpot: CARDINAL;
  317. 154
  318. 155 PROCEDURE GetNamedList( MainList: GenLists.GenList; ListName: ARRAY OF
  319. ***** ^ not supported yet
  320. 156 CHAR; VAR TheList: GenLists.GenList ): BOOLEAN;
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. 157 VAR
  324. 158 TypeCode, lngth, cnt: CARDINAL;
  325. 159 TmpStr: ARRAY [0..79] OF CHAR;
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. 160 NameList: GenLists.GenList;
  329. ***** ^ not supported yet
  330. 161 BEGIN
  331. 162 IF GenLists.ListLength( MainList ) < 2 THEN
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. 163 RETURN FALSE;
  336. 164 END;
  337. 165 IF TypeCheck( MainList, 1 ) # GenLists.ListCode THEN
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. ***** ^ not supported yet
  343. 166 RETURN FALSE;
  344. 167 END;
  345. 168 GenLists.GetChildList( MainList, 1, NameList );
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. 169 lngth := GenLists.ListLength( NameList );
  351. ***** ^ not supported yet
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. 170 IF lngth # (GenLists.ListLength(MainList) -1) THEN
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. 171 (*Corrupted list.*)
  359. 172 HALT();
  360. ***** ^ undeclared identifier
  361. ***** ^ not supported yet
  362. 173 END;
  363. 174 StrEdit.CrunchBlanks( ListName );
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. ***** ^ not supported yet
  367. 175 FOR cnt := 1 TO lngth DO
  368. 176 GenLists.GetElmt( NameList, cnt, TmpStr, TypeCode );
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. 177 StrEdit.CrunchBlanks( TmpStr );
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. ***** ^ not supported yet
  378. 178 IF PosUtils.Equal(TmpStr, ListName) THEN
  379. ***** ^ not supported yet
  380. ***** ^ not supported yet
  381. ***** ^ not supported yet
  382. ***** ^ not supported yet
  383. 179 LastSpot := cnt;
  384. 180 GenLists.GetElmt( MainList, cnt + 1, TheList, TypeCode );
  385. ***** ^ not supported yet
  386. ***** ^ not supported yet
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 181 RETURN TRUE;
  391. 182 END;
  392. 183 END;
  393. 184 RETURN FALSE;
  394. 185 END GetNamedList;
  395. ***** ^ not supported yet
  396. 186
  397. 187 PROCEDURE AddNamedList( MainList: GenLists.GenList; ListName: ARRAY OF
  398. ***** ^ not supported yet
  399. 188 CHAR; VAR TheList: GenLists.GenList );
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. 189 VAR
  403. 190 NameList: GenLists.GenList;
  404. ***** ^ not supported yet
  405. 191 BEGIN
  406. 192 IF GenLists.ListLength( MainList ) = 0 THEN
  407. ***** ^ not supported yet
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. 193 GenLists.NewList( NameList );
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. 194 GenLists.ListInsert( NameList, GenLists.ListCode, MainList, 1 );
  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. ***** ^ not supported yet
  422. 195 END;
  423. 196 StrEdit.CrunchBlanks( ListName );
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. ***** ^ not supported yet
  427. 197 GenLists.GetChildList( MainList, 1, NameList );
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 198 GenLists.ListInsert( ListName, GenLists.StrCode, NameList, GenLists.ListLength(NameList) + 1 );
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 199 GenLists.ListInsert( TheList, GenLists.ListCode, MainList, GenLists.ListLength(MainList) + 1 );
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. ***** ^ not supported yet
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. 200 LastSpot := GenLists.ListLength(NameList) + 1;
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. 201 END AddNamedList;
  459. ***** ^ not supported yet
  460. 202
  461. 203 PROCEDURE DelNamedList( MainList: GenLists.GenList; ListName: ARRAY OF
  462. ***** ^ not supported yet
  463. 204 CHAR ): BOOLEAN;
  464. ***** ^ not supported yet
  465. 205 VAR
  466. 206 NameList: GenLists.GenList;
  467. ***** ^ not supported yet
  468. 207 BEGIN
  469. 208 StrEdit.CrunchBlanks( ListName );
  470. ***** ^ not supported yet
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. 209 IF NOT GetNamedList( MainList, ListName, NameList ) THEN
  474. ***** ^ not supported yet
  475. ***** ^ not supported yet
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. 210 RETURN FALSE;
  479. 211 END;
  480. 212 GenLists.ListDelete( MainList, LastSpot + 1, 1 );
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. 213 GenLists.GetChildList( MainList, 1, NameList );
  486. ***** ^ not supported yet
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. ***** ^ not supported yet
  490. 214 GenLists.ListDelete( NameList, LastSpot, 1 );
  491. ***** ^ not supported yet
  492. ***** ^ not supported yet
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. 215 RETURN TRUE;
  496. 216 END DelNamedList;
  497. ***** ^ not supported yet
  498. 217
  499. 218
  500. 219
  501. 220 PROCEDURE GetRecNameList( NdxFile: NdxTypes.NdxFileType; ListName: ARRAY
  502. ***** ^ not supported yet
  503. 221 OF CHAR; VAR TheList: GenLists.GenList ): BOOLEAN;
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. 222 VAR
  507. 223 TypeCode: CARDINAL;
  508. 224 TopList, TmpList, TmpList2: GenLists.GenList;
  509. ***** ^ not supported yet
  510. 225 BEGIN
  511. 226 IF NOT NdxFiles.GetField( NdxFile, ListStorageRec, 'RECORD',
  512. ***** ^ not supported yet
  513. ***** ^ not supported yet
  514. ***** ^ not supported yet
  515. ***** ^ undeclared identifier
  516. ***** ^ not supported yet
  517. 227 TypeCode, TopList ) THEN
  518. ***** ^ not supported yet
  519. 228 RETURN FALSE;
  520. 229 END;
  521. 230 IF TypeCode # GenLists.ListCode THEN
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. 231 (*Something's wrong with this file.*)
  525. 232 HALT();
  526. ***** ^ undeclared identifier
  527. ***** ^ not supported yet
  528. 233 END;
  529. 234 IF TypeCheck( TopList, 2 ) = GenLists.ListCode THEN
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. 235 GenLists.GetElmt( TopList, 2, TmpList, TypeCode );
  536. ***** ^ not supported yet
  537. ***** ^ not supported yet
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. 236 ELSE
  542. 237 RETURN FALSE;
  543. 238 END;
  544. 239 IF NOT GetNamedList( TmpList, ListName, TmpList2 ) THEN
  545. ***** ^ not supported yet
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. 240 RETURN FALSE;
  550. 241 ELSE
  551. 242 GenLists.CopyList( TmpList2, TheList );
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. 243 RETURN TRUE;
  557. 244 END;
  558. 245 END GetRecNameList;
  559. ***** ^ not supported yet
  560. 246
  561. 247
  562. 248 PROCEDURE StoreRecNameList( NdxFile: NdxTypes.NdxFileType; ListName: ARRAY
  563. ***** ^ not supported yet
  564. 249 OF CHAR; TheList: GenLists.GenList ): BOOLEAN;
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. 250 VAR
  568. 251 TypeCode: CARDINAL;
  569. 252 TopList, OldList: GenLists.GenList;
  570. ***** ^ not supported yet
  571. 253 (*A list of lists; structured just like the AltKey list
  572. 254 in an NdxFileType record.*)
  573. 255
  574. 256 BEGIN
  575. 257 IF NOT NdxFiles.GetField( NdxFile, ListStorageRec, 'RECORD',
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. ***** ^ not supported yet
  579. ***** ^ undeclared identifier
  580. ***** ^ not supported yet
  581. 258 TypeCode, TopList ) THEN
  582. ***** ^ not supported yet
  583. 259 IF GenLists.ListLength( NdxFile^.ListBuf ) = 0 THEN
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. 260 (*File has just been opened; ListBuf needs to be
  589. 261 initialized. We'll do it by calling PutField.*)
  590. 262 GenLists.NewList( TopList );
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. 263 IF NdxFiles.PutField( NdxFile, ListStorageRec,
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. ***** ^ undeclared identifier
  599. 264 'RECORD', GenLists.ListCode, TopList ) THEN
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. 265 (*This shouldn't happen; we're supposed to return
  605. 266 false here.*)
  606. 267 HALT();
  607. ***** ^ undeclared identifier
  608. ***** ^ not supported yet
  609. 268 END;
  610. 269 END;
  611. 270 GenLists.CopyList( NdxFile^.ListBuf, TopList );
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. ***** ^ not supported yet
  616. ***** ^ not supported yet
  617. 271 END;
  618. 272 IF TypeCheck( TopList, 2 ) = GenLists.ListCode THEN
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. ***** ^ not supported yet
  624. 273 GenLists.GetElmt( TopList, 2, OldList, TypeCode );
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. ***** ^ not supported yet
  629. ***** ^ not supported yet
  630. 274 ELSE
  631. 275 GenLists.NewList( OldList );
  632. ***** ^ not supported yet
  633. ***** ^ not supported yet
  634. ***** ^ not supported yet
  635. 276 END;
  636. 277 IF DelNamedList( OldList, ListName ) THEN
  637. ***** ^ not supported yet
  638. ***** ^ not supported yet
  639. ***** ^ not supported yet
  640. 278 (*Do nothing; we do this just to make sure we don't have
  641. 279 two lists with the same name.*)
  642. 280 END;
  643. 281 AddNamedList( OldList, ListName, TheList );
  644. ***** ^ not supported yet
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. 282 GenLists.ListReplace( OldList, GenLists.ListCode, TopList, 2 );
  649. ***** ^ not supported yet
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. ***** ^ not supported yet
  654. ***** ^ not supported yet
  655. ***** ^ not supported yet
  656. 283 IF NOT NdxFiles.PutField( NdxFile, ListStorageRec,
  657. ***** ^ not supported yet
  658. ***** ^ not supported yet
  659. ***** ^ not supported yet
  660. ***** ^ undeclared identifier
  661. 284 'RECORD', GenLists.ListCode, TopList ) THEN
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. ***** ^ not supported yet
  665. ***** ^ not supported yet
  666. 285 RETURN FALSE;
  667. 286 END;
  668. 287 IF NOT NdxFiles.WriteRecord( NdxFile, ListStorageRec ) THEN
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ undeclared identifier
  673. 288 RETURN FALSE;
  674. 289 END;
  675. 290 RETURN TRUE;
  676. 291 END StoreRecNameList;
  677. ***** ^ not supported yet
  678. 292
  679. 293 PROCEDURE DelRecNameList( NdxFile: NdxTypes.NdxFileType; ListName: ARRAY
  680. ***** ^ not supported yet
  681. 294 OF CHAR ): BOOLEAN;
  682. ***** ^ not supported yet
  683. 295 VAR
  684. 296 TmpList, TopList: GenLists.GenList;
  685. ***** ^ not supported yet
  686. 297 TypeCode: CARDINAL;
  687. 298 BEGIN
  688. 299 IF PosUtils.IsBlank( ListName) THEN
  689. ***** ^ not supported yet
  690. ***** ^ not supported yet
  691. ***** ^ not supported yet
  692. 300 RETURN FALSE;
  693. 301 END;
  694. 302 IF NOT NdxFiles.GetField( NdxFile, ListStorageRec, 'RECORD',
  695. ***** ^ not supported yet
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. ***** ^ undeclared identifier
  699. ***** ^ not supported yet
  700. 303 TypeCode, TopList ) THEN
  701. ***** ^ not supported yet
  702. 304 RETURN FALSE;
  703. 305 END;
  704. 306 IF TypeCode # GenLists.ListCode THEN
  705. ***** ^ not supported yet
  706. ***** ^ not supported yet
  707. 307 RETURN FALSE;
  708. 308 END;
  709. 309 IF TypeCheck( TopList, 2 ) = GenLists.ListCode THEN
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. ***** ^ not supported yet
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. 310 GenLists.GetElmt( TopList, 2, TmpList, TypeCode );
  716. ***** ^ not supported yet
  717. ***** ^ not supported yet
  718. ***** ^ not supported yet
  719. ***** ^ not supported yet
  720. ***** ^ not supported yet
  721. 311 ELSE
  722. 312 RETURN FALSE;
  723. 313 END;
  724. 314 IF NOT DelNamedList( TmpList, ListName ) THEN
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. 315 RETURN FALSE;
  729. 316 END;
  730. 317 GenLists.ListReplace( TmpList, GenLists.ListCode, TopList, 2 );
  731. ***** ^ not supported yet
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. ***** ^ not supported yet
  737. ***** ^ not supported yet
  738. 318 IF NOT NdxFiles.PutField( NdxFile, ListStorageRec,
  739. ***** ^ not supported yet
  740. ***** ^ not supported yet
  741. ***** ^ not supported yet
  742. ***** ^ undeclared identifier
  743. 319 'RECORD', GenLists.ListCode, TopList ) THEN
  744. ***** ^ not supported yet
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. 320 RETURN FALSE;
  749. 321 END;
  750. 322 IF NOT NdxFiles.WriteRecord( NdxFile, ListStorageRec ) THEN
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. ***** ^ undeclared identifier
  755. 323 RETURN FALSE;
  756. 324 END;
  757. 325 RETURN TRUE;
  758. 326 END DelRecNameList;
  759. ***** ^ not supported yet
  760. 327
  761. 328
  762. 329 PROCEDURE GetListNames( NdxFile: NdxTypes.NdxFileType; VAR TheList:
  763. ***** ^ not supported yet
  764. 330 GenLists.GenList ): BOOLEAN;
  765. ***** ^ not supported yet
  766. 331 VAR
  767. 332 TypeCode: CARDINAL;
  768. 333 TopList, TmpList, TmpList2: GenLists.GenList;
  769. ***** ^ not supported yet
  770. 334 BEGIN
  771. 335 IF NOT NdxFiles.GetField( NdxFile, ListStorageRec, 'RECORD',
  772. ***** ^ not supported yet
  773. ***** ^ not supported yet
  774. ***** ^ not supported yet
  775. ***** ^ undeclared identifier
  776. ***** ^ not supported yet
  777. 336 TypeCode, TopList ) THEN
  778. ***** ^ not supported yet
  779. 337 RETURN FALSE;
  780. 338 END;
  781. 339 IF TypeCode # GenLists.ListCode THEN
  782. ***** ^ not supported yet
  783. ***** ^ not supported yet
  784. 340 (*Something's wrong with this file.*)
  785. 341 HALT();
  786. ***** ^ undeclared identifier
  787. ***** ^ not supported yet
  788. 342 END;
  789. 343 IF TypeCheck( TopList, 2 ) = GenLists.ListCode THEN
  790. ***** ^ not supported yet
  791. ***** ^ not supported yet
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. ***** ^ not supported yet
  795. 344 GenLists.GetElmt( TopList, 2, TmpList, TypeCode );
  796. ***** ^ not supported yet
  797. ***** ^ not supported yet
  798. ***** ^ not supported yet
  799. ***** ^ not supported yet
  800. ***** ^ not supported yet
  801. 345 ELSE
  802. 346 RETURN FALSE;
  803. 347 END;
  804. 348 GenLists.GetChildList( TmpList, 1, TmpList2 );
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. ***** ^ not supported yet
  809. 349 IF GenLists.Initialized(TmpList2) THEN
  810. ***** ^ not supported yet
  811. ***** ^ not supported yet
  812. ***** ^ not supported yet
  813. 350 GenLists.CopyList( TmpList2, TheList );
  814. ***** ^ not supported yet
  815. ***** ^ not supported yet
  816. ***** ^ not supported yet
  817. ***** ^ not supported yet
  818. 351 RETURN TRUE;
  819. 352 ELSE
  820. 353 RETURN FALSE;
  821. 354 END;
  822. 355 END GetListNames;
  823. ***** ^ not supported yet
  824. 356
  825. 357
  826. 358 BEGIN
  827. 359 Initialized := FALSE;
  828. 360 Init();
  829. ***** ^ not supported yet
  830. ***** ^ not supported yet
  831. 361 END BuildLst.
  832. ***** ^ not supported yet
  833. 470 errors