SCRN2DBF.LST 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791
  1. Listing:
  2. 1 IMPLEMENTATION MODULE Scrn2DBF;
  3. 2 (*
  4. 3 * ModBase
  5. 4 * Release 3.0
  6. 5 * (c) Copyright 1986 - 1991 Donald G. Fletcher
  7. 6 * (c) Copyright 1986 - 1991 PMI
  8. 7 * P.O. Box 8402
  9. 8 * Green Bay Wi 53308
  10. 9 * All Rights Reserved
  11. 10 *
  12. 11 * Contributed by John McMonagle of McMonagle Software
  13. 12 * Green Bay, Wisconsin.
  14. 13 *)
  15. 14
  16. 15 (* 12/23/88 replaced LeftJustify with LeftJust to save leading blanks *)
  17. 16 (* increased memosize limit to 4k *)
  18. 17 (* 6/22/89 @DELETED,@RECNUM,@RECOUNT TO Frame to DBF *)
  19. 18
  20. 19 IMPORT DateFunctions;
  21. 20 IMPORT DBFields;
  22. 21 IMPORT ErrorManager;
  23. 22 IMPORT FieldTypes;
  24. 23 IMPORT GenLists;
  25. 24 IMPORT LowLevel;
  26. 25 IMPORT MemoFunctions;
  27. 26 IMPORT ModBase3;
  28. 27 IMPORT PosUtils;
  29. 28 IMPORT ScrnTypes;
  30. 29 IMPORT ScrnUtl1;
  31. 30 IMPORT StrConv;
  32. 31 IMPORT StrEdit;
  33. 32 IMPORT StringIO;
  34. 33 IMPORT M2Strings;
  35. 34 IMPORT SYSTEM;
  36. 35 FROM VStorage IMPORT
  37. 36 DosAlloc, DosDealloc;
  38. 37
  39. 38 CONST
  40. 39 MemoSize=4000;
  41. 40 PROCEDURE DEALLOCATE(VAR loc:SYSTEM.ADDRESS;size:CARDINAL);
  42. ***** ^ not supported yet
  43. 41 BEGIN
  44. 42 DosDealloc(loc,size);
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. ***** ^ not supported yet
  48. 43 END DEALLOCATE;
  49. ***** ^ not supported yet
  50. 44
  51. 45 PROCEDURE ALLOCATE(VAR loc:SYSTEM.ADDRESS;size:CARDINAL);
  52. ***** ^ not supported yet
  53. 46 BEGIN
  54. 47 DosAlloc(loc,size);
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. 48 END ALLOCATE;
  59. ***** ^ not supported yet
  60. 49
  61. 50 PROCEDURE LeftJust( VAR TheStr: ARRAY OF CHAR;
  62. ***** ^ not supported yet
  63. 51 RequiredLength: CARDINAL );
  64. 52 VAR strlength: CARDINAL;
  65. 53 BEGIN
  66. 54 strlength := M2Strings.Length( TheStr );
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. 55 IF strlength > RequiredLength THEN
  71. 56 StrEdit.SetLength( TheStr, RequiredLength );
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. ***** ^ not supported yet
  76. 57 ELSE
  77. 58 WHILE strlength < RequiredLength DO
  78. 59 StrEdit.Append( TheStr, ' ' );
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. 60 INC( strlength );
  84. ***** ^ undeclared identifier
  85. ***** ^ not supported yet
  86. 61 END;
  87. 62 END;
  88. 63 END LeftJust;
  89. ***** ^ not supported yet
  90. 64
  91. 65 PROCEDURE FrameToDBF
  92. 66 ( VAR DBF : ModBase3.DBFile;
  93. ***** ^ not supported yet
  94. 67 VAR TheFrame : ScrnTypes.DisplayFrame) : BOOLEAN;
  95. ***** ^ not supported yet
  96. 68
  97. 69 VAR
  98. 70 string : ARRAY[ 0 .. 128 ] OF CHAR;
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. 71 TotalFields,
  102. 72 size,
  103. 73 i,
  104. 74 FieldCount,
  105. 75 k,
  106. 76 J : CARDINAL;
  107. 77 offby : INTEGER;
  108. 78 dumbool : BOOLEAN;
  109. 79 date : DateFunctions.Date;
  110. ***** ^ not supported yet
  111. 80 list : GenLists.GenList;
  112. ***** ^ not supported yet
  113. 81 text : POINTER TO ARRAY[ 0 .. MemoSize-1 ] OF CHAR;
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. 82 FieldPtr : ScrnTypes.InputFieldPtr;
  117. ***** ^ not supported yet
  118. 83 ImagePtr : ScrnTypes.ImageElmtPtr;
  119. ***** ^ not supported yet
  120. 84 fldptr : ModBase3.DBFieldPtr;
  121. ***** ^ not supported yet
  122. 85
  123. 86 BEGIN
  124. 87 TotalFields := ScrnUtl1.FieldListTotal( TheFrame );
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. 88 fldptr:=ModBase3.FieldList(DBF);
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. 89 FieldCount := 1;
  134. 90 REPEAT
  135. 91 ScrnUtl1.GetFieldPtr( TheFrame, FieldCount, FieldPtr );
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. 92 IF M2Strings.Length( FieldPtr^.fnam ) # 0 THEN
  141. ***** ^ not supported yet
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. 93 ScrnUtl1.GetFieldImagePtr( TheFrame, FieldCount, ImagePtr );
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. 94 i := ModBase3.PosOfField( DBF, FieldPtr^.fnam );
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. 95 IF i # 0 THEN
  157. 96 CASE fldptr^[i].fldtype OF
  158. ***** ^ not supported yet
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. 97 'C' :
  162. 98 M2Strings.Assign( ImagePtr^.text, string );
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. 99 DBFields.Replace( DBF, i, string ); |
  169. ***** ^ not supported yet
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. 100 'D' :
  174. 101 (* as dates are to be checked in userops count and errorcheck
  175. 102 are to be dropped *)
  176. 103 (* should modify to use fieldptr variables *)
  177. 104 IF NOT PosUtils.IsBlank( ImagePtr^.text ) THEN
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 105 DateFunctions.StrToDate( ImagePtr^.text, date, dumbool );
  183. ***** ^ not supported yet
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. 106 IF NOT dumbool THEN
  190. 107 RETURN FALSE
  191. 108 END (* if *);
  192. 109 DBFields.ReplaceD( DBF, i, date );
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. 110 ELSE
  198. 111 DBFields.Replace( DBF, i, ' ' );
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. 112 END (* if *); |
  204. 113 'L' :
  205. 114 (* should work fine for both group and boolean fields *)
  206. 115 DBFields.ReplaceL( DBF, i, FieldPtr^.selected ); |
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. 116 'M' :
  213. 117 IF FieldPtr^.typ = FieldTypes.TypeCode( 'EDITOR' ) THEN
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. 118 dumbool := ScrnUtl1.ListFromEdField( TheFrame, FieldCount,
  220. ***** ^ not supported yet
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. 119 list );
  224. ***** ^ not supported yet
  225. 120 size := GenLists.ListLength( list );
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. 121 (* cludge because empty list has 1 element !!!*)
  230. 122 IF size=1 THEN
  231. 123 GenLists.GetElmt( list, 1, string, k );
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. ***** ^ not supported yet
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. 124 END;
  238. 125 NEW(text);
  239. ***** ^ undeclared identifier
  240. ***** ^ not supported yet
  241. 126 text^ := '';
  242. ***** ^ not supported yet
  243. 127 IF (size # 0 ) AND NOT ((size =1) AND (string[0]=0C)) THEN
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. 128 FOR J := 1 TO size DO
  247. 129 GenLists.GetElmt( list, J, string, k );
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. ***** ^ not supported yet
  253. 130 StrEdit.Append( text^, string );
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. 131 StrEdit.Append( text^, StringIO.CrLf );
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. 132 (* for *)
  265. 133 END (* for J *);
  266. 134 END (* if size *);
  267. 135 MemoFunctions.ReplaceM( DBF, i, text^ );
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. 136 DISPOSE(text);
  273. ***** ^ undeclared identifier
  274. ***** ^ not supported yet
  275. 137 END (* if FieldPtr *);
  276. 138 |
  277. 139 'N' :
  278. 140 M2Strings.Assign( ImagePtr^.text, string );
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. 141 StrEdit.DeleteChar( ' ', string );
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. 142 IF M2Strings.Pos( '.', string ) > HIGH( string ) THEN
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. ***** ^ undeclared identifier
  293. ***** ^ not supported yet
  294. 143 StrEdit.Append( string, '.' );
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. 144 (* no decimal point *)
  300. 145 END (* if M2Strings.Pos *);
  301. 146 (* if *)
  302. 147 offby := -INTEGER( fldptr^[i].decplaces ) + INTEGER(
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. 148 M2Strings.Length( string ) )
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. 149 - INTEGER( M2Strings.Pos( '.', string ) + 1 );
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. 150 IF offby < 0 THEN
  316. 151 REPEAT
  317. 152 StrEdit.Append( string, '0' );
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. ***** ^ not supported yet
  322. 153 INC( offby );
  323. ***** ^ undeclared identifier
  324. ***** ^ not supported yet
  325. 154 UNTIL offby = 0;
  326. 155 ELSE
  327. 156 StrEdit.SetLength( string, M2Strings.Length( string ) -
  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. 157 CARDINAL( offby ) );
  335. ***** ^ not supported yet
  336. 158 END (* if offby *);
  337. 159 (* if *)
  338. 160 IF fldptr^[i].decplaces = 0 THEN
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. 161 StrEdit.SetLength( string, M2Strings.Pos( '.', string ) );
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. 162 END (* if DBF.fieldlist^ *);
  350. 163 (* if *)
  351. 164 (* Right justify *)
  352. 165 WHILE M2Strings.Length( string ) < fldptr^[i].size DO
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. 166 M2Strings.Concat( ' ', string, string );
  360. ***** ^ not supported yet
  361. ***** ^ not supported yet
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. 167 (* while *)
  365. 168 END (* while M2Strings.Length *);
  366. 169 DBFields.Replace( DBF, i, string );
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. 170 ELSE
  372. 171 END (* case DBF.fieldlist^ *);
  373. 172 END (* if i *);
  374. 173 END (* if M2Strings.Length *);
  375. 174 INC( FieldCount );
  376. ***** ^ undeclared identifier
  377. ***** ^ not supported yet
  378. 175 UNTIL FieldCount > TotalFields;
  379. 176 RETURN TRUE;
  380. 177 END FrameToDBF;
  381. ***** ^ not supported yet
  382. 178
  383. 179
  384. 180 PROCEDURE DBFToFrame
  385. 181 ( VAR DBF : ModBase3.DBFile;
  386. ***** ^ not supported yet
  387. 182 VAR TheFrame : ScrnTypes.DisplayFrame);
  388. ***** ^ not supported yet
  389. 183
  390. 184 VAR
  391. 185 string : ARRAY[ 0 .. 79 ] OF CHAR;
  392. ***** ^ not supported yet
  393. ***** ^ not supported yet
  394. 186 TotalFields,
  395. 187 size,
  396. 188 FieldCount,
  397. 189 i : CARDINAL;
  398. 190 ok : BOOLEAN;
  399. 191 date : DateFunctions.Date;
  400. ***** ^ not supported yet
  401. 192 list : GenLists.GenList;
  402. ***** ^ not supported yet
  403. 193 FieldPtr : ScrnTypes.InputFieldPtr;
  404. ***** ^ not supported yet
  405. 194 ImagePtr : ScrnTypes.ImageElmtPtr;
  406. ***** ^ not supported yet
  407. 195 Block : SYSTEM.ADDRESS;
  408. ***** ^ not supported yet
  409. 196 fldptr : ModBase3.DBFieldPtr;
  410. ***** ^ not supported yet
  411. 197 text : POINTER TO ARRAY[ 0 .. MemoSize-1 ] OF CHAR;
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. 198
  415. 199 BEGIN
  416. 200 fldptr:=ModBase3.FieldList(DBF);
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. 201 TotalFields := ScrnUtl1.FieldListTotal( TheFrame );
  422. ***** ^ not supported yet
  423. ***** ^ not supported yet
  424. ***** ^ not supported yet
  425. 202 FieldCount := 1;
  426. 203 REPEAT
  427. 204 ScrnUtl1.GetFieldPtr( TheFrame, FieldCount, FieldPtr );
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 205 IF M2Strings.Length( FieldPtr^.fnam ) # 0 THEN
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. 206 ScrnUtl1.GetFieldImagePtr( TheFrame, FieldCount, ImagePtr );
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. 207 i := ModBase3.PosOfField( DBF, FieldPtr^.fnam );
  443. ***** ^ not supported yet
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. 208 IF i # 0 THEN
  449. 209 CASE fldptr^[i].fldtype OF
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. 210 'C' :
  454. 211 ModBase3.GetField( DBF, i, string );
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. ***** ^ not supported yet
  459. 212 size := M2Strings.Length( ImagePtr^.text );
  460. ***** ^ not supported yet
  461. ***** ^ not supported yet
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. 213 LeftJust( string, size );
  465. ***** ^ not supported yet
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. 214 LowLevel.Move(SYSTEM.ADR(string),SYSTEM.ADR(ImagePtr^.text),
  469. ***** ^ not supported yet
  470. ***** ^ not supported yet
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. ***** ^ not supported yet
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. 215 size);
  479. ***** ^ not supported yet
  480. 216 (* if *) |
  481. 217 'N' :
  482. 218 ModBase3.GetField( DBF, i, string );
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. ***** ^ not supported yet
  487. 219 size := M2Strings.Length( ImagePtr^.text );
  488. ***** ^ not supported yet
  489. ***** ^ not supported yet
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. 220 StrEdit.RightJustify( string, size );
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 221 LowLevel.Move(SYSTEM.ADR(string),SYSTEM.ADR(ImagePtr^.text),
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. ***** ^ not supported yet
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. ***** ^ not supported yet
  507. 222 size);
  508. ***** ^ not supported yet
  509. 223 (* if *) |
  510. 224 'D' :
  511. 225 (* should add code to initalize date paramaters in
  512. 226 fieldptr *)
  513. 227 DBFields.GetDateField( DBF, i, date );
  514. ***** ^ not supported yet
  515. ***** ^ not supported yet
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. 228 DateFunctions.DateToStr( date, string, ok );
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. ***** ^ not supported yet
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. 229 IF NOT ok THEN
  525. 230 string:='';
  526. ***** ^ not supported yet
  527. ***** ^ incompatible assignment
  528. 231 END (* if ok *);
  529. 232 size := M2Strings.Length( ImagePtr^.text );
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. 233 LeftJust( string, size );
  535. ***** ^ not supported yet
  536. ***** ^ not supported yet
  537. ***** ^ not supported yet
  538. 234 LowLevel.Move(SYSTEM.ADR(string),SYSTEM.ADR(ImagePtr^.text),
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. ***** ^ not supported yet
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. 235 size);
  549. ***** ^ not supported yet
  550. 236 (* if *) |
  551. 237 'L' :
  552. 238 DBFields.GetLogicalField( DBF, i, FieldPtr^.selected );
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. ***** ^ not supported yet
  558. 239 IF (FieldPtr^.typ = FieldTypes.TypeCode('BOOLEAN') ) THEN
  559. ***** ^ not supported yet
  560. ***** ^ not supported yet
  561. ***** ^ not supported yet
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. 240 IF FieldPtr^.selected THEN
  565. ***** ^ not supported yet
  566. ***** ^ not supported yet
  567. 241 (* if boolean code mark *)
  568. 242 ImagePtr^.text[0]:=CHR(251);(* û *)
  569. ***** ^ not supported yet
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. ***** ^ undeclared identifier
  573. ***** ^ not supported yet
  574. 243 ELSE
  575. 244 ImagePtr^.text[0]:=' ';
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. ***** ^ not supported yet
  579. 245 END;
  580. 246 END; |
  581. 247 'M' :
  582. 248 IF FieldPtr^.typ = FieldTypes.TypeCode( 'EDITOR' ) THEN
  583. ***** ^ not supported yet
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. 249 NEW( text );
  589. ***** ^ undeclared identifier
  590. ***** ^ not supported yet
  591. 250 (* LowLevel.Fill( text, HIGH( text^ )+1, 0 );*)
  592. 251 (* to clear block for block to list*)
  593. 252 MemoFunctions.GetMemoField( DBF, i, text^ );
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. 253 GenLists.NewList(list);
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. 254 size:=M2Strings.Length( text^ );
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. ***** ^ not supported yet
  606. 255 IF size # 0
  607. 256 THEN
  608. 257 (* check to see ends with crlf *)
  609. 258 IF NOT ((text^[size-2]=StringIO.CrLf[0]) AND
  610. ***** ^ not supported yet
  611. ***** ^ not supported yet
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. 259 (text^[size-1]=StringIO.CrLf[1]))
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. 260 THEN
  622. 261 StrEdit.Append(text^,StringIO.CrLf);
  623. ***** ^ not supported yet
  624. ***** ^ not supported yet
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. 262 INC(size,2);
  629. ***** ^ undeclared identifier
  630. ***** ^ not supported yet
  631. 263 END;
  632. 264 (* do this so that only enough memory is kept *)
  633. 265 ALLOCATE(Block,size);
  634. ***** ^ not supported yet
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. 266 LowLevel.Move(text,Block,size);
  638. ***** ^ not supported yet
  639. ***** ^ not supported yet
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. 267 GenLists.BlockToList( Block, size,
  644. ***** ^ not supported yet
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. 268 StringIO.CrLf, StringIO.CrLf, 0,
  648. ***** ^ not supported yet
  649. ***** ^ not supported yet
  650. ***** ^ not supported yet
  651. ***** ^ not supported yet
  652. 269 GenLists.StrCode, list );
  653. ***** ^ not supported yet
  654. ***** ^ not supported yet
  655. ***** ^ not supported yet
  656. 270 END (* if M2Strings.Length *);
  657. 271 DISPOSE( text );
  658. ***** ^ undeclared identifier
  659. ***** ^ not supported yet
  660. 272 ok := ScrnUtl1.ListToEdField( list, TheFrame, FieldCount );
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. ***** ^ not supported yet
  665. ***** ^ not supported yet
  666. 273 END (* if FieldPtr *);
  667. 274 ELSE
  668. 275 END (* case DBF.fieldlist^ *);
  669. 276 (* case *)
  670. 277 ELSIF PosUtils.Equal('@DELETED',FieldPtr^.fnam)
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. ***** ^ not supported yet
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. 278 THEN
  677. 279 IF ModBase3.Deleted(DBF)
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. ***** ^ not supported yet
  681. 280 THEN
  682. 281 string:='DELETED'
  683. ***** ^ not supported yet
  684. ***** ^ not supported yet
  685. 282 ELSE
  686. 283 string:='';
  687. ***** ^ not supported yet
  688. ***** ^ incompatible assignment
  689. 284 END;
  690. 285 size := M2Strings.Length( ImagePtr^.text );
  691. ***** ^ not supported yet
  692. ***** ^ not supported yet
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. 286 LeftJust( string, size );
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. ***** ^ not supported yet
  699. 287 LowLevel.Move(SYSTEM.ADR(string),SYSTEM.ADR(ImagePtr^.text),
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. ***** ^ not supported yet
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. ***** ^ not supported yet
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. ***** ^ not supported yet
  709. 288 size);
  710. ***** ^ not supported yet
  711. 289 ELSIF PosUtils.Equal('@RECNO',FieldPtr^.fnam)
  712. ***** ^ not supported yet
  713. ***** ^ not supported yet
  714. ***** ^ not supported yet
  715. ***** ^ not supported yet
  716. ***** ^ not supported yet
  717. 290 THEN
  718. 291 size := M2Strings.Length( ImagePtr^.text );
  719. ***** ^ not supported yet
  720. ***** ^ not supported yet
  721. ***** ^ not supported yet
  722. ***** ^ not supported yet
  723. 292 StrConv.LongIntegerToStr(ModBase3.Record(DBF),size,string);
  724. ***** ^ not supported yet
  725. ***** ^ not supported yet
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. 293 LowLevel.Move(SYSTEM.ADR(string),SYSTEM.ADR(ImagePtr^.text),
  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. ***** ^ not supported yet
  739. ***** ^ not supported yet
  740. 294 size);
  741. ***** ^ not supported yet
  742. 295 ELSIF PosUtils.Equal('@RECCOUNT',FieldPtr^.fnam)
  743. ***** ^ not supported yet
  744. ***** ^ not supported yet
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. 296 THEN
  749. 297 size := M2Strings.Length( ImagePtr^.text );
  750. ***** ^ not supported yet
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. 298 StrConv.LongIntegerToStr(ModBase3.NumberRecords(DBF),size,string);
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. ***** ^ not supported yet
  760. ***** ^ not supported yet
  761. 299 LowLevel.Move(SYSTEM.ADR(string),SYSTEM.ADR(ImagePtr^.text),
  762. ***** ^ not supported yet
  763. ***** ^ not supported yet
  764. ***** ^ not supported yet
  765. ***** ^ not supported yet
  766. ***** ^ not supported yet
  767. ***** ^ not supported yet
  768. ***** ^ not supported yet
  769. ***** ^ not supported yet
  770. ***** ^ not supported yet
  771. 300 size);
  772. ***** ^ not supported yet
  773. 301
  774. 302 END (* if i *);
  775. 303 (* IF*)
  776. 304 END (* if M2Strings.Length *);
  777. 305 INC( FieldCount );
  778. ***** ^ undeclared identifier
  779. ***** ^ not supported yet
  780. 306 UNTIL FieldCount > TotalFields;
  781. 307 END DBFToFrame;
  782. ***** ^ not supported yet
  783. 308
  784. 309 BEGIN
  785. 310 END Scrn2DBF.
  786. ***** ^ not supported yet
  787. 475 errors