NDXBONES.LST 76 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631
  1. Listing:
  2. 1 IMPLEMENTATION MODULE NdxBones;
  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/ndxbones.mov 1.7 10 Mar 1991 15:30:02 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 (*EntryDiag:
  18. 17 IMPORT Diagnostics;
  19. 18 :EntryDiag*)
  20. 19
  21. 20 IMPORT ErrorNames;
  22. 21 IMPORT HandleIO;
  23. 22 IMPORT GenLists;
  24. 23 IMPORT ListUtils;
  25. 24 IMPORT LowLevel;
  26. 25 IMPORT M2Strings;
  27. 26 IMPORT NdxTypes;
  28. 27 IMPORT Numbers;
  29. 28 IMPORT NumTypes;
  30. 29 IMPORT PosUtils;
  31. 30 IMPORT StrEdit;
  32. 31 IMPORT StringIO;
  33. 32 IMPORT SYSTEM;
  34. 33 IMPORT VStorage;
  35. 34
  36. 35 VAR
  37. 36 Initialized : BOOLEAN;
  38. 37
  39. 38
  40. 39 CONST
  41. 40 StartChar = 'B';
  42. 41 EndChar = 'E';
  43. 42 EncodedChar = 'R';
  44. 43 NdxMarkChar = 'X';
  45. 44 (*This character marks the start of the ndx list. We use it
  46. 45 to make sure we've got the right file offset when we back
  47. 46 up and read the list.*)
  48. 47 blank = ' ';
  49. 48 null = '';
  50. 49 AfterLastElmt = 65535;
  51. 50
  52. 51
  53. 52 PROCEDURE BiggestRecord( NdxFile: NdxTypes.NdxFileType ): CARDINAL;
  54. ***** ^ not supported yet
  55. 53 VAR
  56. 54 TmpElmt: NdxTypes.NdxElement;
  57. ***** ^ not supported yet
  58. 55 TypeCode, LstLngth, TmpResult: CARDINAL;
  59. 56 BEGIN
  60. 57 IF GenLists.ListLength( NdxFile^.Ndx ) = 0 THEN
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. 58 RETURN 0;
  66. 59 END;
  67. 60 GenLists.GetElmt( NdxFile^.Ndx, 1, TmpElmt, TypeCode );
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. 61 TmpResult := TmpElmt.UsedChars;
  75. ***** ^ not supported yet
  76. ***** ^ not supported yet
  77. 62 LstLngth := GenLists.ListLength( NdxFile^.Ndx );
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. 63 WHILE GenLists.ElmtNow( NdxFile^.Ndx ) < LstLngth DO
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. 64 GenLists.NextElmt( NdxFile^.Ndx, 1, TmpElmt, TypeCode );
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. 65 IF TmpElmt.UsedChars > TmpResult THEN
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. 66 TmpResult := TmpElmt.UsedChars;
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 67 END;
  101. 68 END;
  102. 69 RETURN TmpResult;
  103. 70 END BiggestRecord;
  104. ***** ^ not supported yet
  105. 71
  106. 72
  107. 73 PROCEDURE FindRecord( NdxFile: NdxTypes.NdxFileType; VAR
  108. ***** ^ not supported yet
  109. 74 RecordName : ARRAY OF CHAR; VAR offset : LONGINT; VAR
  110. ***** ^ not supported yet
  111. 75 UsedRecSize, AllocSize: CARDINAL) : BOOLEAN;
  112. 76 (* Move in the record list to this record. If can't find
  113. 77 record, AllocSize is set to the collating position where
  114. 78 record requested would be inserted. All other VAR results
  115. 79 are meaningless *)
  116. 80
  117. 81 VAR
  118. 82 found, StillLooking: BOOLEAN;
  119. 83 HiBound, LoBound, distance, ListPos, TypeCode: CARDINAL;
  120. 84 CompResult: INTEGER;
  121. 85 TmpElmt : NdxTypes.NdxElement;
  122. ***** ^ not supported yet
  123. 86
  124. 87
  125. 88 PROCEDURE AtCurrentPtr( VAR InsertionPoint: CARDINAL ): BOOLEAN;
  126. 89 (*Because lots of routines call FindRecord, sometimes
  127. 90 in sequence when they're all looking for the same record,
  128. 91 it's usually a good bet that the record you want is
  129. 92 either at the current pointer for the ndx list or at
  130. 93 least needs to be inserted there. This routine
  131. 94 determines whether that is true, and if it is, allows us
  132. 95 to skip the binary search through the whole list.*)
  133. 96
  134. 97 VAR
  135. 98 CompResult: INTEGER;
  136. 99 now: CARDINAL;
  137. 100 BEGIN
  138. 101 InsertionPoint := 0;
  139. 102 (*If AtCurrentPtr comes back FALSE but with a non-zero
  140. 103 value in its parameter, it means we didn't find the
  141. 104 record but we know its insertion point.*)
  142. 105 now := GenLists.ElmtNow(NdxFile^.Ndx);
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. ***** ^ not supported yet
  147. 106 IF (now = 0) OR (now > GenLists.ListLength(NdxFile^.Ndx)) THEN
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. 107 (* list has not been used at all yet (or is empty) *)
  153. 108 RETURN FALSE;
  154. 109 END;
  155. 110 GenLists.GetElmt( NdxFile^.Ndx, now, TmpElmt, TypeCode );
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. ***** ^ not supported yet
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. 111 CompResult := CompareProc(RecordName, TmpElmt.RecName);
  163. ***** ^ undeclared identifier
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. 112 CASE CompResult OF
  168. 113 0 :
  169. 114 M2Strings.Assign( TmpElmt.RecName, RecordName );
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. 115 RETURN TRUE;
  176. 116 | 1 :
  177. 117 IF GenLists.ElmtNow( NdxFile^.Ndx ) = 1 THEN
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 118 (*We were at the first of the list and RecordName was
  183. 119 less than TmpElmt.RecName, so we know the
  184. 120 insertion point.*)
  185. 121 InsertionPoint := 1;
  186. 122 RETURN FALSE;
  187. 123 END;
  188. 124 GenLists.NextElmt( NdxFile^.Ndx, -1, TmpElmt, TypeCode );
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. ***** ^ not supported yet
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. 125 CompResult := CompareProc( RecordName, TmpElmt.RecName );
  196. ***** ^ undeclared identifier
  197. ***** ^ not supported yet
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. 126 IF CompResult = 0 THEN
  201. 127 M2Strings.Assign( TmpElmt.RecName, RecordName );
  202. ***** ^ not supported yet
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. 128 RETURN TRUE;
  208. 129 ELSIF CompResult = -1 THEN
  209. 130 (*We know the insertion point is between this
  210. 131 element and the last one we tried.*)
  211. 132 InsertionPoint := GenLists.ElmtNow(NdxFile^.Ndx) + 1;
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. 133 END;
  217. 134 RETURN FALSE;
  218. 135 |-1 :
  219. 136 IF now = GenLists.ListLength(NdxFile^.Ndx) THEN
  220. ***** ^ not supported yet
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. ***** ^ not supported yet
  224. 137 (*We were at the end of the list and RecordName was
  225. 138 greater than TmpElmt.RecName, so we know the insertion
  226. 139 point.*)
  227. 140 InsertionPoint := now + 1;
  228. 141 RETURN FALSE;
  229. 142 END;
  230. 143 GenLists.NextElmt( NdxFile^.Ndx, 1, TmpElmt, TypeCode );
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. ***** ^ not supported yet
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. 144 CompResult := CompareProc( RecordName, TmpElmt.RecName );
  238. ***** ^ undeclared identifier
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. 145 IF CompResult = 0 THEN
  243. 146 M2Strings.Assign( TmpElmt.RecName, RecordName );
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. 147 RETURN TRUE;
  250. 148 ELSIF CompResult = 1 THEN
  251. 149 (*We know the insertion point is between this
  252. 150 element and the last one we tried.*)
  253. 151 InsertionPoint := GenLists.ElmtNow(NdxFile^.Ndx);
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. 152 END;
  259. 153 RETURN FALSE;
  260. 154 END;
  261. 155 RETURN FALSE;
  262. 156 END AtCurrentPtr;
  263. ***** ^ not supported yet
  264. 157
  265. 158 BEGIN
  266. 159 IF AtCurrentPtr( AllocSize ) THEN
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. 160 found := TRUE;
  270. 161 ELSE
  271. 162 IF AllocSize # 0 THEN
  272. 163 RETURN FALSE;
  273. 164 END;
  274. 165 found := FALSE;
  275. 166 offset := Numbers.Lc( 0);
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. 167 UsedRecSize := 0;
  280. 168 ListPos := 1;
  281. 169 HiBound := GenLists.ListLength(NdxFile^.Ndx) + 1;
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. 170 IF HiBound = 1 THEN
  287. 171 AllocSize := 1;
  288. 172 RETURN FALSE;
  289. 173 END;
  290. 174 LoBound := 0;
  291. 175 StillLooking := TRUE;
  292. 176 GenLists.GetElmt( NdxFile^.Ndx, 1, TmpElmt, TypeCode );
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. 177 END;
  300. 178 WHILE (NOT found) AND StillLooking DO
  301. 179 CompResult := CompareProc(RecordName,
  302. ***** ^ undeclared identifier
  303. ***** ^ not supported yet
  304. 180 TmpElmt.RecName);
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. 181 IF CompResult = 0 THEN
  308. 182 M2Strings.Assign( TmpElmt.RecName, RecordName );
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. 183 found := TRUE;
  315. 184 ELSIF CompResult < 0 THEN
  316. 185 (* new name is higher than current spot in list;
  317. 186 so try to move higher in list *)
  318. 187 distance := (HiBound - ListPos) DIV 2;
  319. 188 LoBound := ListPos;
  320. 189 INC( ListPos, distance );
  321. ***** ^ undeclared identifier
  322. ***** ^ not supported yet
  323. 190 IF distance = 0 THEN
  324. 191 StillLooking := FALSE;
  325. 192 AllocSize := ListPos + 1;
  326. 193 ELSE
  327. 194 GenLists.NextElmt(NdxFile^.Ndx, distance, TmpElmt, TypeCode);
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. ***** ^ not supported yet
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. 195 END;
  335. 196 ELSE
  336. 197 distance := (ListPos - LoBound) DIV 2;
  337. 198 HiBound := ListPos;
  338. 199 DEC( ListPos, distance );
  339. ***** ^ undeclared identifier
  340. ***** ^ not supported yet
  341. 200 IF distance = 0 THEN
  342. 201 StillLooking := FALSE;
  343. 202 AllocSize := ListPos;
  344. 203 ELSE
  345. 204 GenLists.NextElmt(NdxFile^.Ndx, -INTEGER(distance),
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. 205 TmpElmt, TypeCode);
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. 206 END;
  355. 207 END;
  356. 208 END;
  357. 209 IF NOT found THEN
  358. 210 (*If we can't find RecordName in the list ... *)
  359. 211 RETURN FALSE;
  360. 212 ELSE
  361. 213 (*Return file location of record.*)
  362. 214 offset := TmpElmt.FilePos;
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. 215 UsedRecSize := TmpElmt.UsedChars;
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. 216 AllocSize := TmpElmt.Allocated;
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. 217 RETURN TRUE;
  372. 218 END;
  373. 219 END FindRecord;
  374. ***** ^ not supported yet
  375. 220
  376. 221
  377. 222 PROCEDURE RemoveCodes( Source: SYSTEM.ADDRESS; VAR TheSize: CARDINAL);
  378. ***** ^ not supported yet
  379. 223 (* Removes all chars that follow CodeChars, and changes
  380. 224 TheSize to reflect number of chars removed. *)
  381. 225 VAR
  382. 226 tmpsize, toskip : CARDINAL;
  383. 227 badspot : SYSTEM.ADDRESS;
  384. ***** ^ not supported yet
  385. 228 tmpchar : CHAR;
  386. 229 BEGIN
  387. 230 tmpsize := TheSize;
  388. 231 tmpchar := CodeChar;
  389. ***** ^ undeclared identifier
  390. 232 LOOP
  391. 233 toskip := PosUtils.PatternScan( SYSTEM.ADR(tmpchar),
  392. ***** ^ not supported yet
  393. ***** ^ not supported yet
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. 234 1, Source, tmpsize );
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. 235 IF toskip >= tmpsize THEN
  401. 236 RETURN
  402. 237 END;
  403. 238 badspot := LowLevel.AddAddr( Source, toskip + 1 );
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ not supported yet
  407. ***** ^ not supported yet
  408. ***** ^ not supported yet
  409. 239 DEC( tmpsize, toskip + 1);
  410. ***** ^ undeclared identifier
  411. ***** ^ not supported yet
  412. 240 LowLevel.ShiftArrayLeft( badspot, tmpsize, 1 );
  413. ***** ^ not supported yet
  414. ***** ^ not supported yet
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. 241 Source := badspot;
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. 242 DEC( TheSize);
  421. ***** ^ undeclared identifier
  422. ***** ^ not supported yet
  423. 243 END;
  424. 244 END RemoveCodes;
  425. ***** ^ not supported yet
  426. 245
  427. 246
  428. 247 PROCEDURE StripList( VAR TheList: GenLists.GenList);
  429. ***** ^ not supported yet
  430. 248 (* Converts CodedStrs to CodeChars in TheList *)
  431. 249
  432. 250 VAR
  433. 251 OldSize, NewSize, ElmntType, cnt, leng: CARDINAL;
  434. 252 SubList: GenLists.GenList;
  435. ***** ^ not supported yet
  436. 253 GenAddr: SYSTEM.ADDRESS;
  437. ***** ^ not supported yet
  438. 254 BEGIN
  439. 255 leng := GenLists.ListLength( TheList );
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 256 FOR cnt := 1 TO leng DO
  444. 257 GenLists.GetElmtAdr( TheList, cnt, GenAddr, OldSize, ElmntType);
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. ***** ^ not supported yet
  449. ***** ^ not supported yet
  450. 258 NewSize := OldSize;
  451. 259 IF ElmntType # GenLists.ListCode THEN
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. 260 RemoveCodes( GenAddr, NewSize );
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. 261 IF OldSize # NewSize THEN
  459. 262 (* do not replace unless code chars found *)
  460. 263 GenLists.ListReplaceAdr( GenAddr, NewSize, ElmntType,
  461. ***** ^ not supported yet
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. 264 TheList, cnt);
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. 265 END;
  468. 266 ELSE
  469. 267 (* this element is a list *)
  470. 268 GenLists.GetChildList( TheList, cnt, SubList);
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. 269 StripList( SubList );
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. 270 (* strip this sub list *)
  479. 271 END;
  480. 272 END;
  481. 273 END StripList;
  482. ***** ^ not supported yet
  483. 274
  484. 275 PROCEDURE ReadStructure( NdxFile: NdxTypes.NdxFileType;
  485. ***** ^ not supported yet
  486. 276 VAR HadToRebuild: BOOLEAN): BOOLEAN;
  487. 277 (*Note that this is the first procedure that will have an
  488. 278 opportunity to determine whether the user is trying to open
  489. 279 a file that is not a valid NdxFile. It has to be very
  490. 280 careful about relying on values it gets from the file.*)
  491. 281 VAR
  492. 282 tmpstr: ARRAY [0..80] OF CHAR;
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. 283 checkchar: CHAR;
  496. 284 bufsize, dumcard: CARDINAL;
  497. 285 ReadBuf : SYSTEM.ADDRESS;
  498. ***** ^ not supported yet
  499. 286 TmpHandle: VStorage.MemHandle;
  500. ***** ^ not supported yet
  501. 287 BEGIN
  502. 288 (*ReadStructure*)
  503. 289 HadToRebuild := FALSE;
  504. 290 bufsize := 0;
  505. 291 HandleIO.SetFilePtr( NdxFile^.handle, HandleIO.FromStart, NumTypes.L0 );
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. ***** ^ not supported yet
  509. ***** ^ not supported yet
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. ***** ^ not supported yet
  514. 292 CASE HandleIO.BlockRead( NdxFile^.handle, SYSTEM.ADR(bufsize), 2) OF
  515. ***** ^ not supported yet
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. ***** ^ not supported yet
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. ***** ^ not supported yet
  522. ***** ^ not supported yet
  523. 293 (*Read the file's first two bytes into bufsize.*)
  524. 294 StringIO.NoError: (*fall through*);
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. 295 ELSE
  528. 296 RETURN FALSE;
  529. 297 END;
  530. 298 HandleIO.SetFilePtr( NdxFile^.handle, HandleIO.FromStart, Numbers.Lc( 2));
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. ***** ^ not supported yet
  536. ***** ^ not supported yet
  537. ***** ^ not supported yet
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. 299 (*Put the pointer on the third byte in the file.*)
  541. 300 IF NOT VStorage.IsAvailable( bufsize ) THEN
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. 301 ErrorNames.WarningName('Mem');
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. 302 RETURN FALSE;
  550. 303 END;
  551. 304 IF NOT VStorage.AllocMem( TmpHandle, bufsize ) THEN
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. 305 ErrorNames.WarningName('Mem');
  557. ***** ^ not supported yet
  558. ***** ^ not supported yet
  559. ***** ^ not supported yet
  560. 306 RETURN FALSE;
  561. 307 END;
  562. 308
  563. 309
  564. 310 ReadBuf := VStorage.LockMem( TmpHandle );
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. ***** ^ not supported yet
  568. ***** ^ not supported yet
  569. 311 CASE HandleIO.BlockRead( NdxFile^.handle, ReadBuf, bufsize) OF
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. ***** ^ not supported yet
  574. ***** ^ not supported yet
  575. ***** ^ not supported yet
  576. 312 (*Read the structure record into the ReadBuf.*)
  577. 313 StringIO.NoError, StringIO.EndOfFile: (*fall through*);
  578. ***** ^ not supported yet
  579. ***** ^ not supported yet
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. 314 ELSE
  583. 315 VStorage.DeallocMem( TmpHandle, bufsize);
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. 316 RETURN FALSE;
  589. 317 END;
  590. 318 (*
  591. 319 Diagnostics.diagBlock( NdxFile^.name, ReadBuf, bufsize );
  592. 320 *)
  593. 321 LowLevel.Fill( ReadBuf, 4, 0C );
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. 322 LowLevel.Fill( LowLevel.AddAddr(ReadBuf, bufsize - 2), 2, 0C );
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. 323 (*Wipe out the startsep and endsep that brackets the whole
  607. 324 structure.*)
  608. 325 VStorage.UnLockMem( TmpHandle );
  609. ***** ^ not supported yet
  610. ***** ^ not supported yet
  611. ***** ^ not supported yet
  612. 326
  613. 327 GenLists.NewList( NdxFile^.StructLst );
  614. ***** ^ not supported yet
  615. ***** ^ not supported yet
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. 328 ListUtils.HandleToList( TmpHandle, bufsize, StartSep, EndSep, 0, 0,
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. ***** ^ not supported yet
  622. ***** ^ undeclared identifier
  623. ***** ^ undeclared identifier
  624. 329 NdxFile^.StructLst);
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. 330 IF GenLists.ListLength( NdxFile^.StructLst ) = 0 THEN
  628. ***** ^ not supported yet
  629. ***** ^ not supported yet
  630. ***** ^ not supported yet
  631. ***** ^ not supported yet
  632. 331 GenLists.DisposeList( NdxFile^.StructLst);
  633. ***** ^ not supported yet
  634. ***** ^ not supported yet
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. 332 RETURN FALSE;
  638. 333 END;
  639. 334 GenLists.GetElmt( NdxFile^.StructLst, 1, tmpstr, dumcard);
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. ***** ^ not supported yet
  646. 335 checkchar := tmpstr[0];
  647. ***** ^ not supported yet
  648. ***** ^ not supported yet
  649. 336 M2Strings.Delete(tmpstr, 0, 1);
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. ***** ^ not supported yet
  654. 337 IF NOT PosUtils.Equal( tmpstr, StructName) THEN
  655. ***** ^ not supported yet
  656. ***** ^ not supported yet
  657. ***** ^ not supported yet
  658. ***** ^ undeclared identifier
  659. 338 GenLists.DisposeList( NdxFile^.StructLst);
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. 339 RETURN FALSE;
  665. 340 ELSIF checkchar = IsGarbageByte THEN
  666. ***** ^ undeclared identifier
  667. 341 (*
  668. 342 Diagnostics.diagS( 'STRUCTURE record is marked garbage', checkchar );
  669. 343 *)
  670. 344 RebuildProc( NdxFile );
  671. ***** ^ undeclared identifier
  672. ***** ^ not supported yet
  673. 345 (*Structure record gets marked as garbage when you write a
  674. 346 record but don't update the ndx. Gets marked okay when
  675. 347 the ndx gets written.*)
  676. 348 HadToRebuild := TRUE;
  677. 349 END;
  678. 350 GenLists.ListDelete( NdxFile^.StructLst, 1, 1);
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. ***** ^ not supported yet
  684. 351 (* deletes the StructName from the Structure *)
  685. 352 StripList( NdxFile^.StructLst );
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. ***** ^ not supported yet
  689. 353 (*Removes CodedStrs from StructLst.*)
  690. 354 RETURN TRUE;
  691. 355 END ReadStructure;
  692. ***** ^ not supported yet
  693. 356
  694. 357 PROCEDURE MakeEmptyBuf( VAR StruList, BufList: GenLists.GenList);
  695. ***** ^ not supported yet
  696. 358 VAR
  697. 359 LastCode, TheType, cnt, StructLstLength : CARDINAL;
  698. 360 SubStruList, EmptyList: GenLists.GenList;
  699. ***** ^ not supported yet
  700. 361 BEGIN
  701. 362 StructLstLength := GenLists.ListLength( StruList);
  702. ***** ^ not supported yet
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. 363 LastCode := GenLists.ListCode;
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. 364 FOR cnt := 1 TO StructLstLength DO
  709. 365 (* write a ListBuf element for each structure element *)
  710. 366 TheType := ListUtils.TypeCheck( StruList, cnt );
  711. ***** ^ not supported yet
  712. ***** ^ not supported yet
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. 367 (* get next element from structure list *)
  716. 368 IF TheType = GenLists.ListCode THEN
  717. ***** ^ not supported yet
  718. ***** ^ not supported yet
  719. 369 IF LastCode = GenLists.ListCode THEN
  720. ***** ^ not supported yet
  721. ***** ^ not supported yet
  722. 370 ErrorNames.WarningName( 'BadStruc' );
  723. ***** ^ not supported yet
  724. ***** ^ not supported yet
  725. ***** ^ not supported yet
  726. 371 END;
  727. 372 GenLists.NewList( EmptyList);
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. 373 GenLists.ListInsert( EmptyList, GenLists.ListCode,
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. ***** ^ not supported yet
  737. 374 BufList, AfterLastElmt);
  738. ***** ^ not supported yet
  739. ***** ^ not supported yet
  740. 375 GenLists.GetChildList( StruList, cnt, SubStruList);
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. ***** ^ not supported yet
  744. ***** ^ not supported yet
  745. 376 MakeEmptyBuf( SubStruList, EmptyList);
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. ***** ^ not supported yet
  749. 377 ELSE
  750. 378 IF LastCode # GenLists.ListCode THEN
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. 379 GenLists.ListInsert( 0C, GenLists.StrCode, BufList,
  754. ***** ^ not supported yet
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. 380 AfterLastElmt);
  760. ***** ^ not supported yet
  761. 381 END;
  762. 382 END;
  763. 383 LastCode := TheType;
  764. 384 END;
  765. 385 IF LastCode # GenLists.ListCode THEN
  766. ***** ^ not supported yet
  767. ***** ^ not supported yet
  768. 386 GenLists.ListInsert( 0C, GenLists.StrCode, BufList,
  769. ***** ^ not supported yet
  770. ***** ^ not supported yet
  771. ***** ^ not supported yet
  772. ***** ^ not supported yet
  773. ***** ^ not supported yet
  774. 387 AfterLastElmt);
  775. ***** ^ not supported yet
  776. 388 END;
  777. 389 END MakeEmptyBuf;
  778. ***** ^ not supported yet
  779. 390
  780. 391 PROCEDURE OpenNdxFile( VAR NdxFile: NdxTypes.NdxFileType;
  781. ***** ^ not supported yet
  782. 392 FileName: ARRAY OF CHAR): BOOLEAN;
  783. ***** ^ not supported yet
  784. 393 (*Uses HandleIO FindFile routine to open NdxFile. Returns
  785. 394 FALSE if not found. Otherwise initializes NdxFile and
  786. 395 creates linked list of record names, record sizes, and file
  787. 396 offsets from the ndx stored at the end of NdxFile.*)
  788. 397
  789. 398 PROCEDURE ReadNdx( NdxFile: NdxTypes.NdxFileType );
  790. ***** ^ not supported yet
  791. 399 VAR
  792. 400 TmpAvail, len1, len2, FilePos, BytesToRead : LONGINT;
  793. 401 CheckStr: ARRAY [0..1] OF CHAR;
  794. ***** ^ not supported yet
  795. ***** ^ not supported yet
  796. 402 NdxAddr : SYSTEM.ADDRESS;
  797. ***** ^ not supported yet
  798. 403 TmpHandle : VStorage.MemHandle;
  799. ***** ^ not supported yet
  800. 404 TmpNdx: GenLists.GenList;
  801. ***** ^ not supported yet
  802. 405 ThisChunk: CARDINAL;
  803. 406 BEGIN
  804. 407 (*ReadNdx*)
  805. 408 HandleIO.SetFilePtr(NdxFile^.handle, HandleIO.FromEnd,
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. ***** ^ not supported yet
  809. ***** ^ not supported yet
  810. ***** ^ not supported yet
  811. ***** ^ not supported yet
  812. 409 Numbers.Li( -4) );
  813. ***** ^ not supported yet
  814. ***** ^ not supported yet
  815. ***** ^ not supported yet
  816. 410 (*Goto end of file and read Ndx offset*)
  817. 411 IF StringIO.NoError <> HandleIO.BlockRead(NdxFile^.handle,
  818. ***** ^ not supported yet
  819. ***** ^ not supported yet
  820. ***** ^ not supported yet
  821. ***** ^ not supported yet
  822. ***** ^ not supported yet
  823. ***** ^ not supported yet
  824. 412 SYSTEM.ADR(FilePos), 4) THEN
  825. ***** ^ not supported yet
  826. ***** ^ not supported yet
  827. ***** ^ not supported yet
  828. ***** ^ not supported yet
  829. 413 ErrorNames.WarningName( 'FRead' );
  830. ***** ^ not supported yet
  831. ***** ^ not supported yet
  832. ***** ^ not supported yet
  833. 414 RETURN;
  834. 415 END;
  835. 416 IF (FilePos < NumTypes.L0) OR
  836. ***** ^ not supported yet
  837. ***** ^ not supported yet
  838. 417 ( FilePos > HandleIO.FileLength(NdxFile^.handle)) THEN
  839. ***** ^ not supported yet
  840. ***** ^ not supported yet
  841. ***** ^ not supported yet
  842. ***** ^ not supported yet
  843. 418 (*
  844. 419 Diagnostics.diagL( 'FilePos', FilePos );
  845. 420 *)
  846. 421 RebuildProc( NdxFile );
  847. ***** ^ undeclared identifier
  848. ***** ^ not supported yet
  849. 422 RETURN;
  850. 423 END;
  851. 424 HandleIO.SetFilePtr(NdxFile^.handle, HandleIO.FromStart, FilePos);
  852. ***** ^ not supported yet
  853. ***** ^ not supported yet
  854. ***** ^ not supported yet
  855. ***** ^ not supported yet
  856. ***** ^ not supported yet
  857. ***** ^ not supported yet
  858. ***** ^ not supported yet
  859. 425 (*Now we should be sitting on the NdxMarker.*)
  860. 426 NdxFile^.NdxFilePtr := FilePos;
  861. ***** ^ not supported yet
  862. ***** ^ not supported yet
  863. 427 (*Set file pointer to start of the index.*)
  864. 428 len1 := HandleIO.FileLength(NdxFile^.handle) - FilePos;
  865. ***** ^ not supported yet
  866. ***** ^ not supported yet
  867. ***** ^ not supported yet
  868. ***** ^ not supported yet
  869. 429 (* len1 is the file size minus the data *)
  870. 430 BytesToRead := len1 - Numbers.Lc( 6);
  871. ***** ^ not supported yet
  872. ***** ^ not supported yet
  873. ***** ^ not supported yet
  874. 431 (* the index size *)
  875. 432 IF BytesToRead = NumTypes.L0 THEN
  876. ***** ^ not supported yet
  877. ***** ^ not supported yet
  878. 433 (* return empty index if index area of file is empty *)
  879. 434 GenLists.NewList( NdxFile^.Ndx );
  880. ***** ^ not supported yet
  881. ***** ^ not supported yet
  882. ***** ^ not supported yet
  883. ***** ^ not supported yet
  884. 435 RETURN;
  885. 436 END;
  886. 437 (*Now we check to make sure our offset numbers are valid by
  887. 438 looking for the NdxMarker.*)
  888. 439 IF HandleIO.BlockRead(NdxFile^.handle, SYSTEM.ADR(CheckStr),
  889. ***** ^ not supported yet
  890. ***** ^ not supported yet
  891. ***** ^ not supported yet
  892. ***** ^ not supported yet
  893. ***** ^ not supported yet
  894. ***** ^ not supported yet
  895. ***** ^ not supported yet
  896. 440 2) # StringIO.NoError THEN
  897. ***** ^ not supported yet
  898. ***** ^ not supported yet
  899. ***** ^ not supported yet
  900. 441 (*
  901. 442 Diagnostics.diagL( 'BlockRead failure at', FilePos );
  902. 443 *)
  903. 444 RebuildProc( NdxFile );
  904. ***** ^ undeclared identifier
  905. ***** ^ not supported yet
  906. 445 RETURN;
  907. 446 END;
  908. 447 IF NOT PosUtils.Equal( CheckStr, NdxMarker) THEN
  909. ***** ^ not supported yet
  910. ***** ^ not supported yet
  911. ***** ^ not supported yet
  912. ***** ^ undeclared identifier
  913. 448 (*
  914. 449 Diagnostics.diagS( 'Invalid CheckStr:', CheckStr );
  915. 450 *)
  916. 451 RebuildProc( NdxFile );
  917. ***** ^ undeclared identifier
  918. ***** ^ not supported yet
  919. 452 RETURN;
  920. 453 END;
  921. 454 IF (BytesToRead MOD Numbers.Lc( SYSTEM.TSIZE(NdxTypes.NdxElement)))
  922. ***** ^ not supported yet
  923. ***** ^ not supported yet
  924. ***** ^ not supported yet
  925. ***** ^ not supported yet
  926. ***** ^ not supported yet
  927. ***** ^ not supported yet
  928. 455 # NumTypes.L0 THEN
  929. ***** ^ not supported yet
  930. ***** ^ not supported yet
  931. 456 (*If the size of the index does not divide evenly by the
  932. 457 size of an NdxElement, then the size of an NdxElement
  933. 458 has been changed since the file was last used, and we
  934. 459 have to rebuild.*)
  935. 460 (*
  936. 461 Diagnostics.diagL( 'BytesToRead', BytesToRead );
  937. 462 *)
  938. 463 RebuildProc( NdxFile );
  939. ***** ^ undeclared identifier
  940. ***** ^ not supported yet
  941. 464 RETURN;
  942. 465 END;
  943. 466 (* Next, read in the index *)
  944. 467 GenLists.NewList( NdxFile^.Ndx );
  945. ***** ^ not supported yet
  946. ***** ^ not supported yet
  947. ***** ^ not supported yet
  948. ***** ^ not supported yet
  949. 468 WHILE BytesToRead > NumTypes.L0 DO
  950. ***** ^ not supported yet
  951. ***** ^ not supported yet
  952. 469 TmpAvail := VStorage.AvailMem();
  953. ***** ^ not supported yet
  954. ***** ^ not supported yet
  955. ***** ^ not supported yet
  956. 470 (*If EMS is installed, more than 64K may be available,
  957. 471 so we do this in two steps.*)
  958. 472 IF TmpAvail > NumTypes.L65535 THEN
  959. ***** ^ not supported yet
  960. ***** ^ not supported yet
  961. 473 ThisChunk := 65535;
  962. 474 ELSE
  963. 475 ThisChunk := Numbers.C( TmpAvail );
  964. ***** ^ not supported yet
  965. ***** ^ not supported yet
  966. ***** ^ not supported yet
  967. 476 END;
  968. 477 DEC( ThisChunk, ThisChunk MOD SYSTEM.TSIZE(NdxTypes.NdxElement) );
  969. ***** ^ undeclared identifier
  970. ***** ^ not supported yet
  971. ***** ^ not supported yet
  972. ***** ^ not supported yet
  973. ***** ^ not supported yet
  974. 478 IF ThisChunk < SYSTEM.TSIZE(NdxTypes.NdxElement) THEN
  975. ***** ^ not supported yet
  976. ***** ^ not supported yet
  977. ***** ^ not supported yet
  978. ***** ^ not supported yet
  979. 479 ErrorNames.WarningName('Mem');
  980. ***** ^ not supported yet
  981. ***** ^ not supported yet
  982. ***** ^ not supported yet
  983. 480 RETURN;
  984. 481 END;
  985. 482 IF BytesToRead > Numbers.Lc( ThisChunk) THEN
  986. ***** ^ not supported yet
  987. ***** ^ not supported yet
  988. ***** ^ not supported yet
  989. 483 BytesToRead := BytesToRead - Numbers.Lc( ThisChunk );
  990. ***** ^ not supported yet
  991. ***** ^ not supported yet
  992. ***** ^ not supported yet
  993. 484 ELSE
  994. 485 ThisChunk := Numbers.C( BytesToRead);
  995. ***** ^ not supported yet
  996. ***** ^ not supported yet
  997. ***** ^ not supported yet
  998. 486 BytesToRead := NumTypes.L0;
  999. ***** ^ not supported yet
  1000. ***** ^ not supported yet
  1001. 487 END;
  1002. 488 IF NOT VStorage.AllocMem( TmpHandle, ThisChunk ) THEN
  1003. ***** ^ not supported yet
  1004. ***** ^ not supported yet
  1005. ***** ^ not supported yet
  1006. ***** ^ not supported yet
  1007. 489 ErrorNames.WarningName('Mem');
  1008. ***** ^ not supported yet
  1009. ***** ^ not supported yet
  1010. ***** ^ not supported yet
  1011. 490 RETURN;
  1012. 491 END;
  1013. 492 NdxAddr := VStorage.LockMem( TmpHandle );
  1014. ***** ^ not supported yet
  1015. ***** ^ not supported yet
  1016. ***** ^ not supported yet
  1017. ***** ^ not supported yet
  1018. 493 IF HandleIO.BlockRead(NdxFile^.handle, NdxAddr, ThisChunk)
  1019. ***** ^ not supported yet
  1020. ***** ^ not supported yet
  1021. ***** ^ not supported yet
  1022. ***** ^ not supported yet
  1023. ***** ^ not supported yet
  1024. ***** ^ not supported yet
  1025. 494 # StringIO.NoError THEN
  1026. ***** ^ not supported yet
  1027. ***** ^ not supported yet
  1028. 495 VStorage.UnLockMem( TmpHandle );
  1029. ***** ^ not supported yet
  1030. ***** ^ not supported yet
  1031. ***** ^ not supported yet
  1032. 496 VStorage.DeallocMem( TmpHandle, ThisChunk );
  1033. ***** ^ not supported yet
  1034. ***** ^ not supported yet
  1035. ***** ^ not supported yet
  1036. ***** ^ not supported yet
  1037. 497 (*
  1038. 498 Diagnostics.diagC( 'Unable to read ThisChunk # of bytes:', ThisChunk );
  1039. 499 *)
  1040. 500 RebuildProc( NdxFile );
  1041. ***** ^ undeclared identifier
  1042. ***** ^ not supported yet
  1043. 501 RETURN;
  1044. 502 END;
  1045. 503 VStorage.UnLockMem( TmpHandle );
  1046. ***** ^ not supported yet
  1047. ***** ^ not supported yet
  1048. ***** ^ not supported yet
  1049. 504 GenLists.NewList( TmpNdx );
  1050. ***** ^ not supported yet
  1051. ***** ^ not supported yet
  1052. ***** ^ not supported yet
  1053. 505 ListUtils.HandleToList( TmpHandle, ThisChunk, '', '',
  1054. ***** ^ not supported yet
  1055. ***** ^ not supported yet
  1056. ***** ^ not supported yet
  1057. 506 SYSTEM.TSIZE(NdxTypes.NdxElement), NdxTypes.NdxTypeCode,
  1058. ***** ^ not supported yet
  1059. ***** ^ not supported yet
  1060. ***** ^ not supported yet
  1061. ***** ^ not supported yet
  1062. ***** ^ not supported yet
  1063. ***** ^ not supported yet
  1064. 507 TmpNdx );
  1065. ***** ^ not supported yet
  1066. 508 (*The nulls mean "there are no delimiters in the
  1067. 509 block."*)
  1068. 510 len1 := Numbers.Lc( GenLists.ListLength(TmpNdx));
  1069. ***** ^ not supported yet
  1070. ***** ^ not supported yet
  1071. ***** ^ not supported yet
  1072. ***** ^ not supported yet
  1073. ***** ^ not supported yet
  1074. 511 len2 := Numbers.Lc( GenLists.ListLength(NdxFile^.Ndx));
  1075. ***** ^ not supported yet
  1076. ***** ^ not supported yet
  1077. ***** ^ not supported yet
  1078. ***** ^ not supported yet
  1079. ***** ^ not supported yet
  1080. ***** ^ not supported yet
  1081. 512 IF (len1 + len2) > NumTypes.L65535 THEN
  1082. ***** ^ not supported yet
  1083. ***** ^ not supported yet
  1084. 513 ErrorNames.WarningName('RecLim');
  1085. ***** ^ not supported yet
  1086. ***** ^ not supported yet
  1087. ***** ^ not supported yet
  1088. 514 END;
  1089. 515 GenLists.JoinLists( TmpNdx, NdxFile^.Ndx,
  1090. ***** ^ not supported yet
  1091. ***** ^ not supported yet
  1092. ***** ^ not supported yet
  1093. ***** ^ not supported yet
  1094. ***** ^ not supported yet
  1095. 516 GenLists.ListLength(NdxFile^.Ndx) + 1 );
  1096. ***** ^ not supported yet
  1097. ***** ^ not supported yet
  1098. ***** ^ not supported yet
  1099. ***** ^ not supported yet
  1100. ***** ^ not supported yet
  1101. 517 END;
  1102. 518 END ReadNdx;
  1103. ***** ^ not supported yet
  1104. 519
  1105. 520 VAR
  1106. 521 NdxRebuilt : BOOLEAN;
  1107. 522
  1108. 523 BEGIN
  1109. 524 (*OpenNdxFile*)
  1110. 525 NdxTypes.InitNdxFile( NdxFile );
  1111. ***** ^ not supported yet
  1112. ***** ^ not supported yet
  1113. ***** ^ not supported yet
  1114. 526 M2Strings.Assign( FileName, NdxFile^.name );
  1115. ***** ^ not supported yet
  1116. ***** ^ not supported yet
  1117. ***** ^ not supported yet
  1118. ***** ^ not supported yet
  1119. ***** ^ not supported yet
  1120. 527 IF HandleIO.FindFile( NdxFile^.handle, NdxFile^.name, "path" )
  1121. ***** ^ not supported yet
  1122. ***** ^ not supported yet
  1123. ***** ^ not supported yet
  1124. ***** ^ not supported yet
  1125. ***** ^ not supported yet
  1126. ***** ^ not supported yet
  1127. ***** ^ not supported yet
  1128. 528 # StringIO.NoError THEN
  1129. ***** ^ not supported yet
  1130. ***** ^ not supported yet
  1131. 529 (*Find and open the ndx file if it exists.*)
  1132. 530 NdxFile^.name := "";
  1133. ***** ^ not supported yet
  1134. ***** ^ not supported yet
  1135. 531 VStorage.DosDealloc( NdxFile, SYSTEM.TSIZE(NdxTypes.NdxRecord) );
  1136. ***** ^ not supported yet
  1137. ***** ^ not supported yet
  1138. ***** ^ not supported yet
  1139. ***** ^ not supported yet
  1140. ***** ^ not supported yet
  1141. ***** ^ not supported yet
  1142. ***** ^ not supported yet
  1143. 532 NdxFile := NIL;
  1144. ***** ^ not supported yet
  1145. 533 (*Some Storage modules don't nil out the pointer after
  1146. 534 deallocating it, so we do it ourselves.*)
  1147. 535 RETURN FALSE;
  1148. 536 END;
  1149. 537 IF NOT ReadStructure( NdxFile, NdxRebuilt) THEN
  1150. ***** ^ not supported yet
  1151. ***** ^ not supported yet
  1152. ***** ^ not supported yet
  1153. 538 (*Reads the zero record and fills the StructLst in
  1154. 539 NdxFile^.*)
  1155. 540 VStorage.DosDealloc( NdxFile, SYSTEM.TSIZE(NdxTypes.NdxRecord) );
  1156. ***** ^ not supported yet
  1157. ***** ^ not supported yet
  1158. ***** ^ not supported yet
  1159. ***** ^ not supported yet
  1160. ***** ^ not supported yet
  1161. ***** ^ not supported yet
  1162. ***** ^ not supported yet
  1163. 541 NdxFile := NIL;
  1164. ***** ^ not supported yet
  1165. 542 RETURN FALSE;
  1166. 543 END;
  1167. 544 IF NOT NdxRebuilt THEN
  1168. 545 ReadNdx( NdxFile);
  1169. ***** ^ not supported yet
  1170. ***** ^ not supported yet
  1171. 546 (*Load a linked list with the record index for this file.*)
  1172. 547 END;
  1173. 548 NdxFile^.FileBufPtr := NIL;
  1174. ***** ^ not supported yet
  1175. ***** ^ not supported yet
  1176. 549 GenLists.NewList( NdxFile^.ListBuf );
  1177. ***** ^ not supported yet
  1178. ***** ^ not supported yet
  1179. ***** ^ not supported yet
  1180. ***** ^ not supported yet
  1181. 550 MakeEmptyBuf( NdxFile^.StructLst, NdxFile^.ListBuf );
  1182. ***** ^ not supported yet
  1183. ***** ^ not supported yet
  1184. ***** ^ not supported yet
  1185. ***** ^ not supported yet
  1186. ***** ^ not supported yet
  1187. 551 RETURN TRUE;
  1188. 552 END OpenNdxFile;
  1189. ***** ^ not supported yet
  1190. 553
  1191. 554
  1192. 555 PROCEDURE InitBuffer( VAR NdxFile: NdxTypes.NdxFileType; RecName: ARRAY
  1193. ***** ^ not supported yet
  1194. 556 OF CHAR): BOOLEAN;
  1195. ***** ^ not supported yet
  1196. 557 (* called by PutField and GetField to load the record data
  1197. 558 into the list buffer. If RecordName is already in BufRecName
  1198. 559 RETURNs TRUE. If not, checks to see if RecName exists in
  1199. 560 index. If no, returns FALSE. If OK, retrieves record,
  1200. 561 then moves read buffer into GenList in ListBuf. IF all OK,
  1201. 562 returns TRUE.*)
  1202. 563 VAR
  1203. 564 NameFound: ARRAY [0..NdxTypes.RecNameLength] OF CHAR;
  1204. ***** ^ not supported yet
  1205. ***** ^ not supported yet
  1206. ***** ^ not supported yet
  1207. 565 NameAdr : SYSTEM.ADDRESS;
  1208. ***** ^ not supported yet
  1209. 566 NameSize : CARDINAL;
  1210. 567 checkchar: CHAR;
  1211. 568 OffSet: LONGINT;
  1212. 569 UsedSize, AllocatedSize, dumcard: CARDINAL;
  1213. 570
  1214. 571 BEGIN
  1215. 572 NdxTypes.CheckInit( NdxFile);
  1216. ***** ^ not supported yet
  1217. ***** ^ not supported yet
  1218. ***** ^ not supported yet
  1219. 573 StrEdit.CrunchBlanks( RecName );
  1220. ***** ^ not supported yet
  1221. ***** ^ not supported yet
  1222. ***** ^ not supported yet
  1223. 574 IF PosUtils.Equal(RecName, NdxFile^.BufRecName) THEN
  1224. ***** ^ not supported yet
  1225. ***** ^ not supported yet
  1226. ***** ^ not supported yet
  1227. ***** ^ not supported yet
  1228. ***** ^ not supported yet
  1229. 575 RETURN TRUE;
  1230. 576 ELSIF M2Strings.Length(RecName) = 0 THEN
  1231. ***** ^ not supported yet
  1232. ***** ^ not supported yet
  1233. ***** ^ not supported yet
  1234. 577 RETURN FALSE;
  1235. 578 END;
  1236. 579 IF GenLists.Initialized( NdxFile^.ListBuf ) THEN
  1237. ***** ^ not supported yet
  1238. ***** ^ not supported yet
  1239. ***** ^ not supported yet
  1240. ***** ^ not supported yet
  1241. 580 GenLists.DisposeList( NdxFile^.ListBuf );
  1242. ***** ^ not supported yet
  1243. ***** ^ not supported yet
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. 581 END;
  1247. 582 IF NOT FindRecord( NdxFile, RecName, OffSet, UsedSize,
  1248. ***** ^ not supported yet
  1249. ***** ^ not supported yet
  1250. ***** ^ not supported yet
  1251. 583 AllocatedSize ) THEN
  1252. ***** ^ not supported yet
  1253. 584 GenLists.NewList( NdxFile^.ListBuf );
  1254. ***** ^ not supported yet
  1255. ***** ^ not supported yet
  1256. ***** ^ not supported yet
  1257. ***** ^ not supported yet
  1258. 585 MakeEmptyBuf( NdxFile^.StructLst, NdxFile^.ListBuf );
  1259. ***** ^ not supported yet
  1260. ***** ^ not supported yet
  1261. ***** ^ not supported yet
  1262. ***** ^ not supported yet
  1263. ***** ^ not supported yet
  1264. 586 M2Strings.Assign( RecName, NdxFile^.BufRecName );
  1265. ***** ^ not supported yet
  1266. ***** ^ not supported yet
  1267. ***** ^ not supported yet
  1268. ***** ^ not supported yet
  1269. ***** ^ not supported yet
  1270. 587 RETURN FALSE;
  1271. 588 END;
  1272. 589 VStorage.DosAlloc( NdxFile^.FileBufPtr, UsedSize );
  1273. ***** ^ not supported yet
  1274. ***** ^ not supported yet
  1275. ***** ^ not supported yet
  1276. ***** ^ not supported yet
  1277. ***** ^ not supported yet
  1278. 590 NdxFile^.BufSizeNow := UsedSize;
  1279. ***** ^ not supported yet
  1280. ***** ^ not supported yet
  1281. 591 HandleIO.SetFilePtr(NdxFile^.handle, HandleIO.FromStart, OffSet );
  1282. ***** ^ not supported yet
  1283. ***** ^ not supported yet
  1284. ***** ^ not supported yet
  1285. ***** ^ not supported yet
  1286. ***** ^ not supported yet
  1287. ***** ^ not supported yet
  1288. ***** ^ not supported yet
  1289. 592 IF NOT (StringIO.NoError = HandleIO.BlockRead( NdxFile^.handle,
  1290. ***** ^ not supported yet
  1291. ***** ^ not supported yet
  1292. ***** ^ not supported yet
  1293. ***** ^ not supported yet
  1294. ***** ^ not supported yet
  1295. ***** ^ not supported yet
  1296. 593 NdxFile^.FileBufPtr, UsedSize)) THEN
  1297. ***** ^ not supported yet
  1298. ***** ^ not supported yet
  1299. ***** ^ not supported yet
  1300. 594 VStorage.DosDealloc( NdxFile^.FileBufPtr, UsedSize );
  1301. ***** ^ not supported yet
  1302. ***** ^ not supported yet
  1303. ***** ^ not supported yet
  1304. ***** ^ not supported yet
  1305. ***** ^ not supported yet
  1306. 595 NdxFile^.BufSizeNow := 0;
  1307. ***** ^ not supported yet
  1308. ***** ^ not supported yet
  1309. 596 RETURN FALSE;
  1310. 597 END;
  1311. 598 LowLevel.Fill( NdxFile^.FileBufPtr, 4 (*SIZE(StartSep) +
  1312. ***** ^ not supported yet
  1313. ***** ^ not supported yet
  1314. ***** ^ not supported yet
  1315. ***** ^ not supported yet
  1316. 599 SIZE(TypeCode)*), 0C );
  1317. ***** ^ not supported yet
  1318. 600 LowLevel.Fill( LowLevel.AddAddr( NdxFile^.FileBufPtr,
  1319. ***** ^ not supported yet
  1320. ***** ^ not supported yet
  1321. ***** ^ not supported yet
  1322. ***** ^ not supported yet
  1323. ***** ^ not supported yet
  1324. ***** ^ not supported yet
  1325. 601 UsedSize - 2 ), 2, 0C );
  1326. ***** ^ not supported yet
  1327. ***** ^ not supported yet
  1328. 602 (*These two fills wipe out the startsep and endsep that begin
  1329. 603 and end each record.*)
  1330. 604 M2Strings.Assign( RecName, NdxFile^.BufRecName );
  1331. ***** ^ not supported yet
  1332. ***** ^ not supported yet
  1333. ***** ^ not supported yet
  1334. ***** ^ not supported yet
  1335. ***** ^ not supported yet
  1336. 605 (* put current record name in BufRecName *)
  1337. 606 GenLists.NewList( NdxFile^.ListBuf );
  1338. ***** ^ not supported yet
  1339. ***** ^ not supported yet
  1340. ***** ^ not supported yet
  1341. ***** ^ not supported yet
  1342. 607 GenLists.BlockToList( NdxFile^.FileBufPtr, NdxFile^.BufSizeNow,
  1343. ***** ^ not supported yet
  1344. ***** ^ not supported yet
  1345. ***** ^ not supported yet
  1346. ***** ^ not supported yet
  1347. ***** ^ not supported yet
  1348. ***** ^ not supported yet
  1349. 608 StartSep, EndSep, 0, 0, NdxFile^.ListBuf);
  1350. ***** ^ undeclared identifier
  1351. ***** ^ undeclared identifier
  1352. ***** ^ not supported yet
  1353. ***** ^ not supported yet
  1354. 609 IF GenLists.ErrorFlag # GenLists.NoListError THEN
  1355. ***** ^ not supported yet
  1356. ***** ^ not supported yet
  1357. ***** ^ not supported yet
  1358. ***** ^ not supported yet
  1359. 610 RETURN FALSE;
  1360. 611 END;
  1361. 612
  1362. 613 IF GenLists.ListLength( NdxFile^.ListBuf ) > 0 THEN
  1363. ***** ^ not supported yet
  1364. ***** ^ not supported yet
  1365. ***** ^ not supported yet
  1366. ***** ^ not supported yet
  1367. 614 StripList( NdxFile^.ListBuf );
  1368. ***** ^ not supported yet
  1369. ***** ^ not supported yet
  1370. ***** ^ not supported yet
  1371. 615 GenLists.GetElmtAdr( NdxFile^.ListBuf, 1, NameAdr,
  1372. ***** ^ not supported yet
  1373. ***** ^ not supported yet
  1374. ***** ^ not supported yet
  1375. ***** ^ not supported yet
  1376. ***** ^ not supported yet
  1377. 616 NameSize, dumcard );
  1378. ***** ^ not supported yet
  1379. 617 (* We want to store the record name in NameFound, but first we
  1380. 618 have to check it so that we can warn intelligently
  1381. 619 in case of file damage. *)
  1382. 620 NameSize := LowLevel.ScanEQ( NameSize, 0C, NameAdr );
  1383. ***** ^ not supported yet
  1384. ***** ^ not supported yet
  1385. ***** ^ not supported yet
  1386. 621 (* Reduce NameSize to length of string before the null. *)
  1387. 622 IF NameSize <= NdxTypes.RecNameLength THEN
  1388. ***** ^ not supported yet
  1389. ***** ^ not supported yet
  1390. 623 LowLevel.Move( NameAdr, SYSTEM.ADR(NameFound), NameSize + 1 );
  1391. ***** ^ not supported yet
  1392. ***** ^ not supported yet
  1393. ***** ^ not supported yet
  1394. ***** ^ not supported yet
  1395. ***** ^ not supported yet
  1396. ***** ^ not supported yet
  1397. ***** ^ not supported yet
  1398. 624 (* It's NameSize + 1 because we have to make sure the trailing
  1399. 625 null gets included in the move. *)
  1400. 626 ELSE
  1401. 627 ErrorNames.WarningName( 'RecDam' );
  1402. ***** ^ not supported yet
  1403. ***** ^ not supported yet
  1404. ***** ^ not supported yet
  1405. 628 END;
  1406. 629 GenLists.ListDelete( NdxFile^.ListBuf, 1, 1 );
  1407. ***** ^ not supported yet
  1408. ***** ^ not supported yet
  1409. ***** ^ not supported yet
  1410. ***** ^ not supported yet
  1411. ***** ^ not supported yet
  1412. 630 (*Delete the record name from the ListBuf.*)
  1413. 631 ELSE
  1414. 632 MakeEmptyBuf( NdxFile^.StructLst, NdxFile^.ListBuf );
  1415. ***** ^ not supported yet
  1416. ***** ^ not supported yet
  1417. ***** ^ not supported yet
  1418. ***** ^ not supported yet
  1419. ***** ^ not supported yet
  1420. 633 RETURN TRUE;
  1421. 634 (*Actually something has probably gone wrong here--a
  1422. 635 record has apparently been written to the file that
  1423. 636 doesn't even have the record-bracketing StartSep and
  1424. 637 EndSep. But maybe we're about to correct it, so we
  1425. 638 return TRUE.*)
  1426. 639 END;
  1427. 640 checkchar := NameFound[0];
  1428. ***** ^ not supported yet
  1429. ***** ^ not supported yet
  1430. 641 M2Strings.Delete(NameFound, 0, 1);
  1431. ***** ^ not supported yet
  1432. ***** ^ not supported yet
  1433. ***** ^ not supported yet
  1434. ***** ^ not supported yet
  1435. 642 RETURN PosUtils.Equal( NameFound, RecName )
  1436. ***** ^ not supported yet
  1437. ***** ^ not supported yet
  1438. ***** ^ not supported yet
  1439. ***** ^ not supported yet
  1440. 643 (* RecName stored in record read *)
  1441. 644 AND (checkchar # IsGarbageByte);
  1442. ***** ^ undeclared identifier
  1443. 645 (* Successful closing of file last time it was used *)
  1444. 646 END InitBuffer;
  1445. ***** ^ not supported yet
  1446. 647
  1447. 648
  1448. 649 PROCEDURE Retrieve( NdxFile: NdxTypes.NdxFileType; RecordName: ARRAY OF
  1449. ***** ^ not supported yet
  1450. 650 CHAR; BufAddr: SYSTEM.ADDRESS; VAR RecSize: CARDINAL): BOOLEAN;
  1451. ***** ^ not supported yet
  1452. ***** ^ not supported yet
  1453. 651 (* Reads record named into file buffer. Returns TRUE if found,
  1454. 652 FALSE if not. *)
  1455. 653 VAR
  1456. 654 offset: LONGINT;
  1457. 655 ListSpot: CARDINAL;
  1458. 656 BEGIN
  1459. 657 NdxTypes.CheckInit( NdxFile );
  1460. ***** ^ not supported yet
  1461. ***** ^ not supported yet
  1462. ***** ^ not supported yet
  1463. 658 IF NOT FindRecord( NdxFile, RecordName, offset, RecSize,
  1464. ***** ^ not supported yet
  1465. ***** ^ not supported yet
  1466. ***** ^ not supported yet
  1467. 659 ListSpot ) THEN
  1468. ***** ^ not supported yet
  1469. 660 (* if RecordName not in index list, return FALSE *)
  1470. 661 RETURN FALSE;
  1471. 662 END;
  1472. 663 HandleIO.SetFilePtr(NdxFile^.handle, HandleIO.FromStart, offset );
  1473. ***** ^ not supported yet
  1474. ***** ^ not supported yet
  1475. ***** ^ not supported yet
  1476. ***** ^ not supported yet
  1477. ***** ^ not supported yet
  1478. ***** ^ not supported yet
  1479. ***** ^ not supported yet
  1480. 664 RETURN StringIO.NoError = HandleIO.BlockRead( NdxFile^.handle,
  1481. ***** ^ not supported yet
  1482. ***** ^ not supported yet
  1483. ***** ^ not supported yet
  1484. ***** ^ not supported yet
  1485. ***** ^ not supported yet
  1486. ***** ^ not supported yet
  1487. 665 BufAddr, RecSize);
  1488. ***** ^ not supported yet
  1489. ***** ^ not supported yet
  1490. 666 END Retrieve;
  1491. ***** ^ not supported yet
  1492. 667
  1493. 668
  1494. 669 PROCEDURE NoRebuild( VAR NdxFile: NdxTypes.NdxFileType );
  1495. ***** ^ not supported yet
  1496. 670 BEGIN
  1497. 671 ErrorNames.WarningName( 'NdxDam' );
  1498. ***** ^ not supported yet
  1499. ***** ^ not supported yet
  1500. ***** ^ not supported yet
  1501. 672 END NoRebuild;
  1502. ***** ^ not supported yet
  1503. 673
  1504. 674
  1505. 675 PROCEDURE Init();
  1506. 676 BEGIN
  1507. 677 IF Initialized THEN
  1508. 678 RETURN;
  1509. 679 ELSE
  1510. 680 Initialized := TRUE;
  1511. 681 END;
  1512. 682 (*EntryDiag:
  1513. 683 Diagnostics.Init();
  1514. 684 :EntryDiag*)
  1515. 685
  1516. 686 ErrorNames.Init();
  1517. ***** ^ not supported yet
  1518. ***** ^ not supported yet
  1519. ***** ^ not supported yet
  1520. 687 HandleIO.Init();
  1521. ***** ^ not supported yet
  1522. ***** ^ not supported yet
  1523. ***** ^ not supported yet
  1524. 688 GenLists.Init();
  1525. ***** ^ not supported yet
  1526. ***** ^ not supported yet
  1527. ***** ^ not supported yet
  1528. 689 ListUtils.Init();
  1529. ***** ^ not supported yet
  1530. ***** ^ not supported yet
  1531. ***** ^ not supported yet
  1532. 690 LowLevel.Init();
  1533. ***** ^ not supported yet
  1534. ***** ^ not supported yet
  1535. ***** ^ not supported yet
  1536. 691 M2Strings.Init();
  1537. ***** ^ not supported yet
  1538. ***** ^ not supported yet
  1539. ***** ^ not supported yet
  1540. 692 NdxTypes.Init();
  1541. ***** ^ not supported yet
  1542. ***** ^ not supported yet
  1543. ***** ^ not supported yet
  1544. 693 Numbers.Init();
  1545. ***** ^ not supported yet
  1546. ***** ^ not supported yet
  1547. ***** ^ not supported yet
  1548. 694 NumTypes.Init();
  1549. ***** ^ not supported yet
  1550. ***** ^ not supported yet
  1551. ***** ^ not supported yet
  1552. 695 PosUtils.Init();
  1553. ***** ^ not supported yet
  1554. ***** ^ not supported yet
  1555. ***** ^ not supported yet
  1556. 696 StrEdit.Init();
  1557. ***** ^ not supported yet
  1558. ***** ^ not supported yet
  1559. ***** ^ not supported yet
  1560. 697 StringIO.Init();
  1561. ***** ^ not supported yet
  1562. ***** ^ not supported yet
  1563. ***** ^ not supported yet
  1564. 698 VStorage.Init();
  1565. ***** ^ not supported yet
  1566. ***** ^ not supported yet
  1567. ***** ^ not supported yet
  1568. 699
  1569. 700 (*EntryDiag:
  1570. 701 Diagnostics.diagS( 'Entering NdxBones', '' );
  1571. 702 :EntryDiag*)
  1572. 703
  1573. 704 RebuildProc := NoRebuild;
  1574. ***** ^ undeclared identifier
  1575. ***** ^ not supported yet
  1576. 705 CompareProc := M2Strings.CompareStr;
  1577. ***** ^ undeclared identifier
  1578. ***** ^ not supported yet
  1579. ***** ^ not supported yet
  1580. 706 StartSep[0] := CodeChar;
  1581. ***** ^ undeclared identifier
  1582. ***** ^ not supported yet
  1583. ***** ^ undeclared identifier
  1584. 707 StartSep[1] := StartChar;
  1585. ***** ^ undeclared identifier
  1586. ***** ^ not supported yet
  1587. 708 EndSep[0] := CodeChar;
  1588. ***** ^ undeclared identifier
  1589. ***** ^ not supported yet
  1590. ***** ^ undeclared identifier
  1591. 709 EndSep[1] := EndChar;
  1592. ***** ^ undeclared identifier
  1593. ***** ^ not supported yet
  1594. 710 CodedStr[0] := CodeChar;
  1595. ***** ^ undeclared identifier
  1596. ***** ^ not supported yet
  1597. ***** ^ undeclared identifier
  1598. 711 CodedStr[1] := EncodedChar;
  1599. ***** ^ undeclared identifier
  1600. ***** ^ not supported yet
  1601. 712 NdxMarker[0] := CodeChar;
  1602. ***** ^ undeclared identifier
  1603. ***** ^ not supported yet
  1604. ***** ^ undeclared identifier
  1605. 713 NdxMarker[1] := NdxMarkChar;
  1606. ***** ^ undeclared identifier
  1607. ***** ^ not supported yet
  1608. 714 StrEdit.AssignStr( "STRUCTURE", StructName);
  1609. ***** ^ not supported yet
  1610. ***** ^ not supported yet
  1611. ***** ^ not supported yet
  1612. ***** ^ undeclared identifier
  1613. 715
  1614. 716 (*EntryDiag:
  1615. 717 Diagnostics.diagS( 'Exiting NdxBones', '' );
  1616. 718 :EntryDiag*)
  1617. 719 END Init;
  1618. ***** ^ not supported yet
  1619. 720
  1620. 721 BEGIN
  1621. 722 Initialized := FALSE;
  1622. 723 Init();
  1623. ***** ^ not supported yet
  1624. ***** ^ not supported yet
  1625. 724 END NdxBones.
  1626. ***** ^ not supported yet
  1627. 901 errors