FIELDTYP.LST 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  1. Listing:
  2. 1 IMPLEMENTATION MODULE FieldTypes;
  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/fieldtyp.mov 1.7 10 Mar 1991 15:27:30 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 (*EntryDiag:
  18. 17 IMPORT Diagnostics;
  19. 18 :EntryDiag*)
  20. 19
  21. 20 IMPORT Hash;
  22. 21 IMPORT GenLists;
  23. 22 IMPORT LowLevel;
  24. 23 IMPORT M2Strings;
  25. 24 IMPORT Numbers;
  26. 25 IMPORT ScrnTypes;
  27. 26 IMPORT StrConv;
  28. 27 IMPORT StrEdit;
  29. 28 IMPORT SYSTEM;
  30. 29 IMPORT ErrorManager;
  31. 30 IMPORT VStorage;
  32. 31
  33. 32 VAR
  34. 33 Initialized : BOOLEAN;
  35. 34
  36. 35 CONST
  37. 36 AfterLast = 65535;
  38. 37 gotoConst = 'GOTO';
  39. ***** ^ not supported yet
  40. 38 stringConst = 'STRING';
  41. ***** ^ not supported yet
  42. 39 integerConst = 'INTEGER';
  43. ***** ^ not supported yet
  44. 40 realConst = 'REAL';
  45. ***** ^ not supported yet
  46. 41 groupConst = 'GROUP';
  47. ***** ^ not supported yet
  48. 42 choiceConst = 'CHOICE';
  49. ***** ^ not supported yet
  50. 43 editorConst = 'EDITOR';
  51. ***** ^ not supported yet
  52. 44 displayConst = 'DISPLAY';
  53. ***** ^ not supported yet
  54. 45 displayonlyConst = 'DISPLAYONLY';
  55. ***** ^ not supported yet
  56. 46 dateConst = 'DATE';
  57. ***** ^ not supported yet
  58. 47 booleanConst = 'BOOLEAN';
  59. ***** ^ not supported yet
  60. 48
  61. 49 TYPE
  62. 50 APromptTable = ARRAY [0..255] OF CARDINAL;
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. 51
  66. 52 VAR
  67. 53 TableHandle: VStorage.MemHandle;
  68. ***** ^ not supported yet
  69. 54 TablePointer: POINTER TO APromptTable;
  70. ***** ^ not supported yet
  71. 55
  72. 56 FieldTypeCodes : Hash.HashTable;
  73. ***** ^ not supported yet
  74. 57 TableInitialized : BOOLEAN;
  75. 58 PromptList: GenLists.GenList;
  76. ***** ^ not supported yet
  77. 59 CharConstSize: CARDINAL;
  78. 60
  79. 61
  80. 62 PROCEDURE DisposeTable();
  81. 63 BEGIN
  82. 64 Hash.Dispose( FieldTypeCodes );
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. 65 GenLists.DisposeList( PromptList );
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. 66 END DisposeTable;
  91. ***** ^ not supported yet
  92. 67
  93. 68
  94. 69 PROCEDURE SetPrompts();
  95. 70 VAR
  96. 71 tmpstr: ARRAY [0..79] OF CHAR;
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. 72 BEGIN
  100. 73 SetDefaultPrompt( editorConst,
  101. ***** ^ undeclared identifier
  102. ***** ^ not supported yet
  103. 74 'Alt-D deletes lines; Alt-U undeletes; Shift-F7 toggles wrapping.' );
  104. ***** ^ not supported yet
  105. 75 StrEdit.AssignStr( 'Enter selects the highlighted choice.',
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. 76 tmpstr );
  110. ***** ^ not supported yet
  111. 77 StrConv.AppendDecoded( tmpstr, '#',
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. 78 'Use #024 or #025 to move to another choice.');
  116. ***** ^ not supported yet
  117. 79 SetDefaultPrompt( gotoConst, tmpstr );
  118. ***** ^ undeclared identifier
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. 80 StrEdit.SetLength(tmpstr, 0);
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. 81 StrConv.AppendDecoded(tmpstr, '#',
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. 82 'Use #017#196 or #196#016 to change the highlighted choice, or');
  131. ***** ^ not supported yet
  132. 83 StrConv.AppendDecoded(tmpstr, '#',
  133. ***** ^ not supported yet
  134. ***** ^ not supported yet
  135. ***** ^ not supported yet
  136. 84 ' #024#025 to move to another field.');
  137. ***** ^ not supported yet
  138. 85 SetDefaultPrompt( choiceConst, tmpstr );
  139. ***** ^ undeclared identifier
  140. ***** ^ not supported yet
  141. ***** ^ not supported yet
  142. 86
  143. 87 StrEdit.AssignStr('Fill in the blank and press',tmpstr);
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. 88 StrConv.AppendDecoded(tmpstr, '#',
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. 89 ' #024 or #025 to change fields, or F10 if finished.');
  153. ***** ^ not supported yet
  154. 90 SetDefaultPrompt( stringConst, tmpstr );
  155. ***** ^ undeclared identifier
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. 91
  159. 92 StrEdit.AssignStr( 'Enter a number between MIN and MAX.',tmpstr);
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. 93 (* MAX and MIN are replaced with the true values at
  165. 94 runtime. *)
  166. 95 SetDefaultPrompt( integerConst, tmpstr );
  167. ***** ^ undeclared identifier
  168. ***** ^ not supported yet
  169. ***** ^ not supported yet
  170. 96 SetDefaultPrompt( realConst, tmpstr );
  171. ***** ^ undeclared identifier
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. 97
  175. 98 SetDefaultPrompt( booleanConst,
  176. ***** ^ undeclared identifier
  177. ***** ^ not supported yet
  178. 99 'Press space bar to select or deselect choice.' );
  179. ***** ^ not supported yet
  180. 100 SetDefaultPrompt( dateConst,
  181. ***** ^ undeclared identifier
  182. ***** ^ not supported yet
  183. 101 'Enter a date in the form 12/25/88 or 12-25-1988.' );
  184. ***** ^ not supported yet
  185. 102 END SetPrompts;
  186. ***** ^ not supported yet
  187. 103
  188. 104
  189. 105 PROCEDURE FilledAssign( s1: ARRAY OF CHAR; VAR s2: ARRAY OF CHAR );
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. 106 VAR
  193. 107 len : CARDINAL;
  194. 108 BEGIN
  195. 109 LowLevel.Fill( SYSTEM.ADR(s2), HIGH(s2) + 1, 0C );
  196. ***** ^ not supported yet
  197. ***** ^ not supported yet
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. ***** ^ undeclared identifier
  202. ***** ^ not supported yet
  203. ***** ^ not supported yet
  204. 110 len := M2Strings.Length( s1 );
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. 111 IF len <= HIGH(s2) THEN
  209. ***** ^ undeclared identifier
  210. ***** ^ not supported yet
  211. 112 LowLevel.Move( SYSTEM.ADR(s1), SYSTEM.ADR(s2), len );
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. ***** ^ not supported yet
  221. 113 ELSE
  222. 114 M2Strings.Assign( s1, s2 );
  223. ***** ^ not supported yet
  224. ***** ^ not supported yet
  225. ***** ^ not supported yet
  226. ***** ^ not supported yet
  227. 115 END;
  228. 116 END FilledAssign;
  229. ***** ^ not supported yet
  230. 117
  231. 118
  232. 119 PROCEDURE InitTableIfNecessary();
  233. 120 (* We can't call this in the module's initialization block
  234. 121 because it does dynamic memory allocation, and Repertoire
  235. 122 doesn't know where dynamic memory comes from until after
  236. 123 the initialization sequence is over. *)
  237. 124 VAR
  238. 125 TmpTypeName: ARRAY [0..15] OF CHAR;
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. 126 BEGIN
  242. 127 IF TableInitialized THEN
  243. 128 RETURN;
  244. 129 END;
  245. 130 TableInitialized := TRUE;
  246. 131 Hash.Define( FieldTypeCodes, 10, CharConstSize );
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. 132 FilledAssign( gotoConst, TmpTypeName );
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. ***** ^ not supported yet
  255. 133 Hash.Insert( FieldTypeCodes, TmpTypeName, 'J' );
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. 134 FilledAssign( stringConst, TmpTypeName );
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. 135 Hash.Insert( FieldTypeCodes, TmpTypeName, 'S' );
  266. ***** ^ not supported yet
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. 136 FilledAssign( integerConst, TmpTypeName );
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. 137 Hash.Insert( FieldTypeCodes, TmpTypeName, 'I' );
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. 138 FilledAssign( realConst, TmpTypeName );
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. ***** ^ not supported yet
  285. 139 Hash.Insert( FieldTypeCodes, TmpTypeName, 'R' );
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. 140 FilledAssign( groupConst, TmpTypeName );
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. 141 Hash.Insert( FieldTypeCodes, TmpTypeName, 'C' );
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. 142 FilledAssign( choiceConst, TmpTypeName );
  302. ***** ^ not supported yet
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. 143 Hash.Insert( FieldTypeCodes, TmpTypeName, 'C' );
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. 144 FilledAssign( editorConst, TmpTypeName );
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. 145 Hash.Insert( FieldTypeCodes, TmpTypeName, 'E' );
  316. ***** ^ not supported yet
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. 146 FilledAssign( displayConst, TmpTypeName );
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. 147 Hash.Insert( FieldTypeCodes, TmpTypeName, 'D' );
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. 148 FilledAssign( displayonlyConst, TmpTypeName );
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. 149 Hash.Insert( FieldTypeCodes, TmpTypeName, 'D' );
  336. ***** ^ not supported yet
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. 150 FilledAssign( dateConst, TmpTypeName );
  342. ***** ^ not supported yet
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. 151 Hash.Insert( FieldTypeCodes, TmpTypeName, 'T' );
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. 152 FilledAssign( booleanConst, TmpTypeName );
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. 153 Hash.Insert( FieldTypeCodes, TmpTypeName, 'B' );
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 154 IF NOT VStorage.AllocMem( TableHandle, SYSTEM.TSIZE(APromptTable) ) THEN
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. ***** ^ not supported yet
  367. ***** ^ not supported yet
  368. 155 END;
  369. 156 TablePointer := VStorage.LockMem( TableHandle );
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. 157 LowLevel.Fill( TablePointer, SYSTEM.TSIZE(APromptTable), 0C );
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. ***** ^ not supported yet
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. ***** ^ not supported yet
  381. ***** ^ not supported yet
  382. 158 VStorage.UnLockMem( TableHandle );
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. ***** ^ not supported yet
  386. 159 GenLists.NewList( PromptList );
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 160 SetPrompts();
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. 161 ErrorManager.AddTermProc( DisposeTable );
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. 162 END InitTableIfNecessary;
  398. ***** ^ not supported yet
  399. 163
  400. 164
  401. 165 PROCEDURE TypeCode( TypeName:
  402. 166 ARRAY OF CHAR ): CHAR;
  403. ***** ^ not supported yet
  404. 167 VAR
  405. 168 TmpTypeName: ARRAY [0..15] OF CHAR;
  406. ***** ^ not supported yet
  407. ***** ^ not supported yet
  408. 169 tmpch : CHAR;
  409. 170 hash1, hash2, hash3 : CARDINAL;
  410. 171 BEGIN
  411. 172 InitTableIfNecessary();
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. 173 FilledAssign( TypeName, TmpTypeName );
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. 174
  419. 175 (* We try to first spot the standard ones by simple string
  420. 176 comparison for speed purposes. *)
  421. 177 IF 0 = M2Strings.CompareStr( stringConst, TmpTypeName ) THEN
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. 178 RETURN 'S';
  427. 179 ELSIF 0 = M2Strings.CompareStr( integerConst, TmpTypeName ) THEN
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 180 RETURN 'I';
  433. 181 ELSIF 0 = M2Strings.CompareStr( realConst, TmpTypeName ) THEN
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. 182 RETURN 'R';
  439. 183 ELSIF 0 = M2Strings.CompareStr( editorConst, TmpTypeName ) THEN
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. ***** ^ not supported yet
  444. 184 RETURN 'E';
  445. 185 ELSIF 0 = M2Strings.CompareStr( dateConst, TmpTypeName ) THEN
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. ***** ^ not supported yet
  449. ***** ^ not supported yet
  450. 186 RETURN 'T';
  451. 187 ELSIF 0 = M2Strings.CompareStr( gotoConst, TmpTypeName ) THEN
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. 188 RETURN 'J';
  457. 189 ELSIF 0 = M2Strings.CompareStr( groupConst, TmpTypeName ) THEN
  458. ***** ^ not supported yet
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. ***** ^ not supported yet
  462. 190 RETURN 'C';
  463. 191 ELSIF 0 = M2Strings.CompareStr( choiceConst, TmpTypeName ) THEN
  464. ***** ^ not supported yet
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. 192 RETURN 'C';
  469. 193 ELSIF 0 = M2Strings.CompareStr( displayConst, TmpTypeName ) THEN
  470. ***** ^ not supported yet
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. 194 RETURN 'D';
  475. 195 ELSIF 0 = M2Strings.CompareStr( displayonlyConst, TmpTypeName ) THEN
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. ***** ^ not supported yet
  479. ***** ^ not supported yet
  480. 196 RETURN 'D';
  481. 197 ELSIF 0 = M2Strings.CompareStr( booleanConst, TmpTypeName ) THEN
  482. ***** ^ not supported yet
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. 198 RETURN 'B';
  487. 199 ELSIF Hash.KeyFind( FieldTypeCodes, TmpTypeName ) THEN
  488. ***** ^ not supported yet
  489. ***** ^ not supported yet
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. 200 Hash.GetData( FieldTypeCodes, tmpch );
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 201 ELSE
  498. 202 Hash.Compute( TmpTypeName, hash1, hash2, hash3 );
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. 203 IF Numbers.CardIsBetween( ORD('['), hash2, 255 ) THEN
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. ***** ^ undeclared identifier
  507. ***** ^ not supported yet
  508. ***** ^ not supported yet
  509. 204 tmpch := CHR( hash2 );
  510. ***** ^ undeclared identifier
  511. ***** ^ not supported yet
  512. 205 ELSE
  513. 206 tmpch := CHR( (hash2 MOD (255 - 91)) + 91 );
  514. ***** ^ undeclared identifier
  515. ***** ^ not supported yet
  516. 207 (*Force value into range 91 to 255.*)
  517. 208 END;
  518. 209 Hash.Insert( FieldTypeCodes, TmpTypeName, tmpch );
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. ***** ^ not supported yet
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. 210 END;
  525. 211 RETURN tmpch;
  526. 212 END TypeCode;
  527. ***** ^ not supported yet
  528. 213
  529. 214
  530. 215 PROCEDURE SetDefaultPrompt( TypeName: ARRAY OF CHAR;
  531. ***** ^ not supported yet
  532. 216 TheStr: ARRAY OF CHAR );
  533. ***** ^ not supported yet
  534. 217 VAR
  535. 218 OrdOfType: CARDINAL;
  536. 219 BEGIN
  537. 220 InitTableIfNecessary();
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. 221 StrEdit.CAPstr( TypeName );
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. 222 TablePointer := VStorage.LockMem( TableHandle );
  545. ***** ^ not supported yet
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. 223 OrdOfType := ORD( TypeCode( TypeName ) );
  550. ***** ^ undeclared identifier
  551. ***** ^ not supported yet
  552. ***** ^ not supported yet
  553. 224 VStorage.UnLockMem( TableHandle );
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. 225 IF TablePointer^[ OrdOfType ] = 0 THEN
  558. ***** ^ not supported yet
  559. ***** ^ not supported yet
  560. 226 GenLists.ListInsert( TheStr, GenLists.StrCode,
  561. ***** ^ not supported yet
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. ***** ^ not supported yet
  565. ***** ^ not supported yet
  566. 227 PromptList, AfterLast );
  567. ***** ^ not supported yet
  568. ***** ^ not supported yet
  569. 228 TablePointer := VStorage.LockMem( TableHandle );
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. ***** ^ not supported yet
  574. 229 TablePointer^[ OrdOfType ] := GenLists.ListLength( PromptList );
  575. ***** ^ not supported yet
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. ***** ^ not supported yet
  579. ***** ^ not supported yet
  580. 230 VStorage.UnLockMem( TableHandle );
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. ***** ^ not supported yet
  584. 231 ELSE
  585. 232 TablePointer := VStorage.LockMem( TableHandle );
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. 233 GenLists.ListReplace( TheStr, GenLists.StrCode,
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. 234 PromptList, TablePointer^[ OrdOfType ] );
  597. ***** ^ not supported yet
  598. ***** ^ not supported yet
  599. ***** ^ not supported yet
  600. 235 VStorage.UnLockMem( TableHandle );
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. 236 END;
  605. 237 END SetDefaultPrompt;
  606. ***** ^ not supported yet
  607. 238
  608. 239
  609. 240 PROCEDURE GetDefaultPrompt( TypeCode: CHAR; VAR TheStr: ARRAY
  610. 241 OF CHAR );
  611. ***** ^ not supported yet
  612. 242 VAR
  613. 243 DumType, ListSpot : CARDINAL;
  614. 244 BEGIN
  615. 245 InitTableIfNecessary();
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. 246 StrEdit.SetLength( TheStr, 0 );
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. 247 TablePointer := VStorage.LockMem( TableHandle );
  624. ***** ^ not supported yet
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. 248 VStorage.UnLockMem( TableHandle );
  629. ***** ^ not supported yet
  630. ***** ^ not supported yet
  631. ***** ^ not supported yet
  632. 249 ListSpot := TablePointer^[ ORD(TypeCode) ];
  633. ***** ^ not supported yet
  634. ***** ^ undeclared identifier
  635. ***** ^ not supported yet
  636. 250 IF ListSpot = 0 THEN
  637. 251 RETURN;
  638. 252 END;
  639. 253 GenLists.GetElmt( PromptList, ListSpot, TheStr, DumType );
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. 254 END GetDefaultPrompt;
  646. ***** ^ not supported yet
  647. 255
  648. 256
  649. 257 PROCEDURE GetCharConstSize(theChar: ARRAY OF CHAR): CARDINAL;
  650. ***** ^ not supported yet
  651. 258 (* We don't know how many bytes a character constant really
  652. 259 occupies. Stony Brook now has an implicit null at the end
  653. 260 of a char const. JPI doesn't. *)
  654. 261 BEGIN
  655. 262 RETURN HIGH(theChar) + 1;
  656. ***** ^ undeclared identifier
  657. ***** ^ not supported yet
  658. 263 END GetCharConstSize;
  659. ***** ^ not supported yet
  660. 264
  661. 265
  662. 266 PROCEDURE Init();
  663. 267 BEGIN
  664. 268 IF Initialized THEN
  665. 269 RETURN;
  666. 270 ELSE
  667. 271 Initialized := TRUE;
  668. 272 END;
  669. 273 (*EntryDiag:
  670. 274 Diagnostics.Init();
  671. 275 :EntryDiag*)
  672. 276
  673. 277 Hash.Init();
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. ***** ^ not supported yet
  677. 278 GenLists.Init();
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. 279 LowLevel.Init();
  682. ***** ^ not supported yet
  683. ***** ^ not supported yet
  684. ***** ^ not supported yet
  685. 280 M2Strings.Init();
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. ***** ^ not supported yet
  689. 281 Numbers.Init();
  690. ***** ^ not supported yet
  691. ***** ^ not supported yet
  692. ***** ^ not supported yet
  693. 282 ScrnTypes.Init();
  694. ***** ^ not supported yet
  695. ***** ^ not supported yet
  696. ***** ^ not supported yet
  697. 283 StrConv.Init();
  698. ***** ^ not supported yet
  699. ***** ^ not supported yet
  700. ***** ^ not supported yet
  701. 284 StrEdit.Init();
  702. ***** ^ not supported yet
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. 285 ErrorManager.Init();
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. ***** ^ not supported yet
  709. 286 VStorage.Init();
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. ***** ^ not supported yet
  713. 287 (*EntryDiag:
  714. 288 Diagnostics.diagS( 'Entering FieldTypes', '' );
  715. 289 :EntryDiag*)
  716. 290
  717. 291 CharConstSize := GetCharConstSize('A');
  718. ***** ^ not supported yet
  719. ***** ^ not supported yet
  720. 292 TableInitialized := FALSE;
  721. 293 GenLists.NilList( PromptList );
  722. ***** ^ not supported yet
  723. ***** ^ not supported yet
  724. ***** ^ not supported yet
  725. 294 VStorage.NilHandle( TableHandle );
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. ***** ^ not supported yet
  729. 295 TablePointer := NIL;
  730. ***** ^ not supported yet
  731. 296
  732. 297 (*EntryDiag:
  733. 298 Diagnostics.diagS( 'Exiting FieldTypes', '' );
  734. 299 :EntryDiag*)
  735. 300 END Init;
  736. ***** ^ not supported yet
  737. 301
  738. 302 BEGIN
  739. 303 Initialized := FALSE;
  740. 304 Init();
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. 305 END FieldTypes.
  744. ***** ^ not supported yet
  745. 438 errors