Listing: 1 IMPLEMENTATION MODULE ListUtils; 2 (* 3 * REPERTOIRE 4 * Release 1.6 5 * By Charles Bradford and Cole Brecheen 6 * (c) Copyright 1985-1992 PMI 7 * Green Bay, Wisconsin 8 * All rights reserved 9 * (414) 468-6040 10 * 11 * $Header: D:/logfiles/mods/listutil.mov 1.6 10 Mar 1991 15:35:08 coleb $ 12 * 13 * 14 * For GenList manipulation routines that don't need access to 15 * the internal structure of a GenList. 16 *) 17 18 19 IMPORT ByteFiddler; 20 IMPORT EnvironUtils; 21 IMPORT ErrorManager; 22 IMPORT HandleIO; 23 IMPORT GenLists; 24 IMPORT LowLevel; 25 IMPORT M2Strings; 26 IMPORT Numbers; 27 IMPORT NumTypes; 28 IMPORT PosUtils; 29 IMPORT StrConv; 30 IMPORT StrEdit; 31 IMPORT StringIO; 32 IMPORT SYSTEM; 33 IMPORT VStorage; 34 35 VAR 36 Initialized : BOOLEAN; 37 38 PROCEDURE Init(); 39 BEGIN 40 IF Initialized THEN 41 RETURN; 42 ELSE 43 Initialized := TRUE; 44 END; 45 ByteFiddler.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 46 EnvironUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 47 ErrorManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 48 HandleIO.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 49 GenLists.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 50 LowLevel.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 51 M2Strings.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 52 Numbers.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 53 NumTypes.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 54 PosUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 55 StrConv.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 56 StrEdit.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 57 StringIO.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 58 VStorage.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 59 END Init; ***** ^ not supported yet 60 61 62 PROCEDURE InitResponse(msg : ARRAY OF CHAR); ***** ^ not supported yet 63 (*All calls to InitResponse are diagnostic. Remove them from 64 finished programs.*) 65 VAR 66 TmpStr : ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 67 BEGIN 68 StrEdit.AssignStr('Uninit. list passed to ', TmpStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 69 StrEdit.Append(TmpStr, msg); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 70 ErrorManager.WARN(TmpStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 71 END InitResponse; ***** ^ not supported yet 72 73 74 (*$O-*) 75 PROCEDURE CharCount( TheList : GenLists.GenList; ***** ^ not supported yet 76 StartLine, EndLine: CARDINAL ): LONGINT; 77 VAR 78 tmp1, tmp2: LONGINT; 79 lngth, cnt: CARDINAL; 80 BEGIN 81 tmp2 := NumTypes.L0; ***** ^ not supported yet ***** ^ not supported yet 82 lngth := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 83 IF EndLine > lngth THEN 84 EndLine := lngth; 85 END; 86 FOR cnt := StartLine TO EndLine DO 87 tmp1 := Numbers.Lc( ElmtSize(TheList, cnt) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 88 (*Workaround for Logitech LONGINT bug.*) 89 tmp2 := tmp2 + tmp1; 90 END; 91 RETURN tmp2; 92 END CharCount; ***** ^ not supported yet 93 (*$O=*) 94 95 96 PROCEDURE CheckLength(VAR TheList : GenLists.GenList; ***** ^ not supported yet 97 LeftMargin, LngthLimit : CARDINAL); 98 VAR 99 delimiters : ARRAY [0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 100 tmpsize, cnt, DumType, BreakSpot : CARDINAL; 101 tmpadr: SYSTEM.ADDRESS; ***** ^ not supported yet 102 BEGIN 103 delimiters := ' -,)]?+'; ***** ^ not supported yet ***** ^ not supported yet 104 cnt := 1; 105 WHILE cnt <= GenLists.ListLength( TheList) DO ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 106 tmpsize := ElmtSize( TheList, cnt ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 107 (* we assign this out here to make it easier to see in 108 the RTD *) 109 IF tmpsize > LngthLimit THEN 110 GenLists.GetElmtAdr( TheList, cnt, tmpadr, tmpsize, DumType ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 111 tmpsize := LowLevel.ScanEQ( tmpsize, 0C, tmpadr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 112 (*reduce size to real string length*) 113 BreakSpot := PosUtils.BreakPtAdr( tmpadr, tmpsize, LngthLimit, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 114 delimiters) + 1; ***** ^ not supported yet 115 GenLists.ListInsertAdr( LowLevel.AddAddr(tmpadr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 116 BreakSpot), (tmpsize -BreakSpot) + LeftMargin + 1, ***** ^ not supported yet 117 0, TheList, cnt + 1 ); ***** ^ not supported yet ***** ^ not supported yet 118 (* We can't use StrCode as the type in this 119 ListInsertAdr because we need to reserve room in 120 the list element beyond the null. *) 121 GenLists.ChangeTypeCode( TheList, cnt + 1, GenLists.StrCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 122 LowLevel.Fill( LowLevel.AddAddr(tmpadr, BreakSpot), 1, 0C ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 123 (*Make sure there's a null terminator at end of old 124 string.*) 125 IF LeftMargin > 0 THEN 126 GenLists.GetElmtAdr( TheList, cnt + 1, tmpadr, tmpsize, DumType ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 127 LowLevel.ShiftArrayRight( tmpadr, tmpsize, LeftMargin ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 128 LowLevel.Fill( tmpadr, LeftMargin, ' ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 129 END; 130 END; 131 INC( cnt ); ***** ^ undeclared identifier ***** ^ not supported yet 132 END; 133 END CheckLength; ***** ^ not supported yet 134 135 136 PROCEDURE IndentationAt( TheList : GenLists.GenList; ***** ^ not supported yet 137 Line : CARDINAL ): CARDINAL; 138 VAR 139 tmpsize, indent, DumType: CARDINAL; 140 tmpadr: SYSTEM.ADDRESS; ***** ^ not supported yet 141 BEGIN 142 GenLists.GetElmtAdr( TheList, Line, tmpadr, tmpsize, DumType ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 143 tmpsize := LowLevel.ScanEQ( tmpsize, 0C, tmpadr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 144 IF tmpsize = 0 THEN 145 RETURN 65535; 146 END; 147 indent := LowLevel.ScanNE(tmpsize, ' ', tmpadr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 148 RETURN indent; 149 END IndentationAt; ***** ^ not supported yet 150 151 152 PROCEDURE ReformPara( VAR TheList : GenLists.GenList; ***** ^ not supported yet 153 LeftMargin, RightMargin : CARDINAL; VAR 154 StartLine, CursorLine, CursorCol: CARDINAL; 155 VAR LinesAdded, BytesAdded: INTEGER; VAR 156 CursorBytePos: LONGINT ); 157 158 VAR 159 blank : ARRAY [0..0] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 160 delimiters : ARRAY [0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 161 tmpsize, cnt, indent, DumType, BreakSpot : CARDINAL; 162 tmpadr: SYSTEM.ADDRESS; ***** ^ not supported yet 163 done : BOOLEAN; 164 BEGIN 165 blank[0] := ' '; ***** ^ not supported yet ***** ^ not supported yet 166 delimiters := ' -,)]?+'; ***** ^ not supported yet ***** ^ not supported yet 167 cnt := StartLine; 168 LinesAdded := 0; 169 BytesAdded := 0; 170 done := FALSE; 171 WHILE (NOT done) AND (cnt <= GenLists.ListLength( TheList)) DO ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 172 IF cnt = GenLists.ListLength( TheList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 173 StartLine := cnt; 174 done := TRUE; 175 ELSE 176 indent := IndentationAt( TheList, cnt + 1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 177 END; 178 IF (NOT done) AND (indent = LeftMargin) THEN 179 (* We bring the next line up and append it to this one. Means the 180 reformat stops when we reach a line where indentation <> 181 LeftMargin. *) 182 GenLists.GetElmtAdr( TheList, cnt, tmpadr, tmpsize, DumType ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 183 tmpsize := LowLevel.ScanEQ( tmpsize, 0C, tmpadr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 184 (*reduce size to real string length*) 185 IF (tmpsize > 0) AND (ByteFiddler.PeekChar( ***** ^ not supported yet ***** ^ not supported yet 186 LowLevel.AddAddr( tmpadr, tmpsize - 1 )) # ' ') THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 187 (* If this line doesn't end with a blank. *) 188 InsertIntoElmt( TheList, cnt, SYSTEM.ADR(blank), 1, 65535 ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 189 (*Append a blank to this line because we're not going to 190 insert leading blanks from the line below.*) 191 INC( BytesAdded ); ***** ^ undeclared identifier ***** ^ not supported yet 192 END; 193 IF CursorLine > (cnt + 1) THEN 194 DEC( CursorLine ); ***** ^ undeclared identifier ***** ^ not supported yet 195 ELSIF (CursorLine = (cnt + 1)) THEN 196 DEC( CursorLine ); ***** ^ undeclared identifier ***** ^ not supported yet 197 CursorCol := CursorCol + ElmtSize(TheList, cnt); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 198 END; 199 GenLists.GetElmtAdr( TheList, cnt + 1, tmpadr, tmpsize, DumType ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 200 InsertIntoElmt( TheList, cnt, LowLevel.AddAddr(tmpadr, indent), ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 201 ElmtSize(TheList, cnt + 1) - indent, 65535 ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 202 BytesAdded := BytesAdded - INTEGER(indent) - 2; ***** ^ not supported yet 203 (* We've deleted leading spaces and separating CR/LF. *) 204 GenLists.ListDelete( TheList, cnt + 1, 1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 205 DEC( LinesAdded ); ***** ^ undeclared identifier ***** ^ not supported yet 206 ELSE 207 done := TRUE; 208 END; 209 210 GenLists.GetElmtAdr( TheList, cnt, tmpadr, tmpsize, DumType ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 211 tmpsize := LowLevel.ScanEQ( tmpsize, 0C, tmpadr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 212 (*reduce size to real string length*) 213 IF (tmpsize > RightMargin) THEN 214 done := FALSE; 215 BreakSpot := PosUtils.BreakPtAdr( tmpadr, tmpsize, RightMargin, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 216 delimiters) + 1; ***** ^ not supported yet 217 IF CursorLine > cnt THEN 218 INC( CursorLine ); ***** ^ undeclared identifier ***** ^ not supported yet 219 ELSIF (CursorLine = cnt) AND (CursorCol >= BreakSpot) THEN 220 INC( CursorLine ); ***** ^ undeclared identifier ***** ^ not supported yet 221 CursorCol := CursorCol - BreakSpot; 222 END; 223 GenLists.ListInsertAdr( LowLevel.AddAddr(tmpadr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 224 BreakSpot), (tmpsize -BreakSpot) + LeftMargin + 1, ***** ^ not supported yet 225 0, TheList, cnt + 1 ); ***** ^ not supported yet ***** ^ not supported yet 226 (* We can't use StrCode as the type in this 227 ListInsertAdr because we need to reserve room in 228 the list element beyond the null. *) 229 INC( LinesAdded ); ***** ^ undeclared identifier ***** ^ not supported yet 230 GenLists.ChangeTypeCode( TheList, cnt + 1, GenLists.StrCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 231 LowLevel.Fill( LowLevel.AddAddr(tmpadr, BreakSpot), 1, 0C ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 232 (*Make sure there's a null terminator at end of old 233 string.*) 234 IF LeftMargin > 0 THEN 235 GenLists.GetElmtAdr( TheList, cnt + 1, tmpadr, tmpsize, DumType ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 236 LowLevel.ShiftArrayRight( tmpadr, tmpsize, LeftMargin ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 237 LowLevel.Fill( tmpadr, LeftMargin, ' ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 238 IF CursorLine = (cnt + 1) THEN 239 CursorCol := CursorCol + LeftMargin; 240 END; 241 BytesAdded := BytesAdded + INTEGER(LeftMargin) + 2 ; ***** ^ not supported yet 242 (* We've added leading spaces on new line plus CR/LF 243 on this one. *) 244 ELSE 245 BytesAdded := BytesAdded + 2; 246 (* We've added only the CR/LF. *) 247 END; 248 END; 249 INC( cnt ); ***** ^ undeclared identifier ***** ^ not supported yet 250 END; 251 IF (CursorBytePos > NumTypes.L0) THEN ***** ^ not supported yet ***** ^ not supported yet 252 (* They want us to compute new byte position. *) 253 IF CursorLine > 1 THEN 254 CursorBytePos := CharCount( TheList, 1, CursorLine - 1 ) + ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 255 Numbers.Lc( CursorCol ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 256 ELSE 257 CursorBytePos := Numbers.Lc( CursorCol ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 258 END; 259 END; 260 StartLine := cnt; 261 END ReformPara; ***** ^ not supported yet 262 263 264 PROCEDURE DeTabList( VAR TheList: GenLists.GenList; VAR ***** ^ not supported yet 265 ListChanged: BOOLEAN ); 266 VAR 267 TmpStr: ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 268 ListEnd, StartingSpot, StrSpot: CARDINAL; 269 TabStr: ARRAY [0..0] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 270 BEGIN 271 TabStr[0] := 11C; ***** ^ not supported yet ***** ^ not supported yet 272 ListEnd := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 273 StartingSpot := 1; 274 ListChanged := FALSE; 275 WHILE (StartingSpot <= ListEnd) AND (StartingSpot # 0) DO 276 StartingSpot := GenLists.ScanList( TabStr, TheList, StartingSpot, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 277 ListEnd, StrSpot ); ***** ^ not supported yet 278 IF StartingSpot > 0 THEN 279 ListChanged := TRUE; 280 GetStr( TheList, StartingSpot, TmpStr ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 281 StrEdit.CutTrailingChars( ' ', TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 282 StrEdit.ReplaceTabs( TmpStr, 8 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 283 GenLists.ListReplace( TmpStr, GenLists.StrCode, TheList, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 284 StartingSpot ); ***** ^ not supported yet 285 END; 286 END; 287 END DeTabList; ***** ^ not supported yet 288 289 290 PROCEDURE EnTabList( VAR TheList: GenLists.GenList; LeadingOnly: BOOLEAN; VAR ***** ^ not supported yet 291 ListChanged: BOOLEAN ); 292 VAR 293 TmpStr: ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 294 ListEnd, StartingSpot, StrSpot: CARDINAL; 295 BlankStr: ARRAY [0..8] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 296 BEGIN 297 BlankStr := ' '; ***** ^ not supported yet ***** ^ not supported yet 298 ListEnd := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 299 StartingSpot := 1; 300 ListChanged := FALSE; 301 WHILE (StartingSpot <= ListEnd) AND (StartingSpot # 0) DO 302 StartingSpot := GenLists.ScanList( BlankStr, TheList, StartingSpot, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 303 ListEnd, StrSpot ); ***** ^ not supported yet 304 IF StartingSpot > 0 THEN 305 ListChanged := TRUE; 306 GetStr( TheList, StartingSpot, TmpStr ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 307 StrEdit.CutTrailingChars( ' ', TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 308 StrEdit.InsertTabs( TmpStr, 8, LeadingOnly ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 309 GenLists.ListReplace( TmpStr, GenLists.StrCode, TheList, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 310 StartingSpot ); ***** ^ not supported yet 311 END; 312 END; 313 END EnTabList; ***** ^ not supported yet 314 315 316 PROCEDURE ElmtSize( TheList: GenLists.GenList; spot: CARDINAL ): CARDINAL; ***** ^ not supported yet 317 VAR 318 TheAddr: SYSTEM.ADDRESS; ***** ^ not supported yet 319 TheSize, TypeCode: CARDINAL; 320 BEGIN 321 GenLists.GetElmtAdr( TheList, spot, TheAddr, TheSize, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 322 IF TypeCode = GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 323 TheSize := LowLevel.ScanEQ( TheSize, 0C, TheAddr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 324 END; 325 RETURN TheSize; 326 END ElmtSize; ***** ^ not supported yet 327 328 329 PROCEDURE GetStr( TheList: GenLists.GenList; spot: CARDINAL; VAR ***** ^ not supported yet 330 TheStr: ARRAY OF CHAR ); ***** ^ not supported yet 331 VAR 332 TypeCode: CARDINAL; 333 BEGIN 334 GenLists.GetElmt( TheList, spot, TheStr, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 335 IF TypeCode # GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 336 ErrorManager.WARN('Not a string'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 337 END; 338 END GetStr; ***** ^ not supported yet 339 340 PROCEDURE HandleToList( TheHandle : VStorage.MemHandle; ***** ^ not supported yet 341 BlockSize : CARDINAL; delimiter1, delimiter2 : ARRAY OF 342 CHAR; RecSize, TypeCode : CARDINAL; VAR TheList : GenLists.GenList); ***** ^ not supported yet ***** ^ not supported yet 343 VAR 344 BytesDone, Delim1Len, Delim2Len : CARDINAL; 345 TwoDelimiters, FixedLengthRecs : BOOLEAN; 346 347 PROCEDURE AnElmtStartsHere( OffSet: CARDINAL ): BOOLEAN; 348 VAR 349 TmpAdr: SYSTEM.ADDRESS; ***** ^ not supported yet 350 BEGIN 351 IF FixedLengthRecs OR (NOT TwoDelimiters) THEN 352 RETURN FALSE; 353 END; 354 TmpAdr := VStorage.LockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 355 VStorage.UnLockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 356 LowLevel.IncAddr( TmpAdr, OffSet ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 357 IF (BytesDone >= BlockSize) OR (0 = PosUtils.PosAdr( ***** ^ not supported yet ***** ^ not supported yet 358 delimiter1, TmpAdr, BlockSize - BytesDone)) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 359 RETURN TRUE; 360 END; 361 RETURN FALSE; 362 END AnElmtStartsHere; ***** ^ not supported yet 363 364 PROCEDURE AnElmtEndsHere( OffSet: CARDINAL ): BOOLEAN; 365 VAR 366 TmpAdr: SYSTEM.ADDRESS; ***** ^ not supported yet 367 BEGIN 368 IF FixedLengthRecs OR (NOT TwoDelimiters) THEN 369 RETURN FALSE; 370 END; 371 TmpAdr := VStorage.LockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 372 VStorage.UnLockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 373 LowLevel.IncAddr( TmpAdr, OffSet ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 374 IF (BytesDone >= BlockSize) OR (0 = PosUtils.PosAdr( ***** ^ not supported yet ***** ^ not supported yet 375 delimiter2, TmpAdr, BlockSize - BytesDone)) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 376 RETURN TRUE; 377 END; 378 RETURN FALSE; 379 END AnElmtEndsHere; ***** ^ not supported yet 380 381 PROCEDURE SizeOfElement( OldAdr: SYSTEM.ADDRESS ): CARDINAL; ***** ^ not supported yet 382 (*Returns the address of the first byte following delimiter2, 383 but dist includes only the bytes preceding delimiter2.*) 384 BEGIN 385 IF FixedLengthRecs THEN 386 RETURN RecSize; 387 ELSE 388 RETURN PosUtils.PosAdr( delimiter2, OldAdr, BlockSize-BytesDone); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 389 END; 390 END SizeOfElement; ***** ^ not supported yet 391 392 PROCEDURE MakeOneList( TheList : GenLists.GenList ); ***** ^ not supported yet 393 VAR 394 TmpTypeCode, TmpSize: CARDINAL; 395 TmpAdr: SYSTEM.ADDRESS; ***** ^ not supported yet 396 SubList : GenLists.GenList; ***** ^ not supported yet 397 BEGIN 398 LOOP 399 IF TwoDelimiters THEN 400 LOOP 401 (*Skip the leading delim1, if there is one, and 402 move at least to the byte just beyond the next 403 delim1.*) 404 IF AnElmtStartsHere(BytesDone) THEN ***** ^ not supported yet ***** ^ not supported yet 405 INC( BytesDone, Delim1Len ); ***** ^ undeclared identifier ***** ^ not supported yet 406 EXIT; 407 ELSE 408 INC( BytesDone, Delim1Len ); ***** ^ undeclared identifier ***** ^ not supported yet 409 END; 410 END; 411 END; 412 IF (BytesDone >= BlockSize) THEN 413 EXIT; 414 END; 415 IF (TypeCode < 65000) 416 AND (NOT FixedLengthRecs) 417 AND TwoDelimiters THEN 418 TmpAdr := VStorage.LockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 419 LowLevel.IncAddr( TmpAdr, BytesDone ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 420 LowLevel.Move( TmpAdr, SYSTEM.ADR(TmpTypeCode), 2); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 421 VStorage.UnLockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 422 INC( BytesDone, 2 ); ***** ^ undeclared identifier ***** ^ not supported yet 423 ELSE 424 TmpTypeCode := TypeCode; 425 END; 426 IF (TmpTypeCode = GenLists.ListCode) OR AnElmtStartsHere( ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 427 BytesDone ) THEN ***** ^ not supported yet 428 GenLists.NewList( SubList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 429 IF AnElmtEndsHere( BytesDone ) THEN ***** ^ not supported yet ***** ^ not supported yet 430 (*Null list.*) 431 INC( BytesDone, Delim2Len ); ***** ^ undeclared identifier ***** ^ not supported yet 432 ELSE 433 MakeOneList( SubList ); ***** ^ not supported yet ***** ^ not supported yet 434 END; 435 GenLists.ListInsert( SubList, GenLists.ListCode, TheList, 65535 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 436 ELSE 437 TmpAdr := VStorage.LockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 438 VStorage.UnLockMem( TheHandle ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 439 LowLevel.IncAddr( TmpAdr, BytesDone ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 440 TmpSize := SizeOfElement( TmpAdr ); ***** ^ not supported yet ***** ^ not supported yet 441 GenLists.ListInsertAdr( TmpAdr, TmpSize, TmpTypeCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 442 TheList, 65535 ); ***** ^ not supported yet ***** ^ not supported yet 443 INC( BytesDone, TmpSize + Delim2Len ); ***** ^ undeclared identifier ***** ^ not supported yet 444 END; 445 IF (BytesDone >= BlockSize) OR (AnElmtEndsHere(BytesDone)) THEN ***** ^ not supported yet ***** ^ not supported yet 446 (*Increment past the delimiter2 that ends the whole list.*) 447 INC( BytesDone, Delim2Len ); ***** ^ undeclared identifier ***** ^ not supported yet 448 EXIT; 449 END; 450 END; 451 END MakeOneList; ***** ^ not supported yet 452 453 BEGIN 454 (*HandleToList*) 455 IF NOT GenLists.Initialized( TheList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 456 InitResponse( 'HandleToList' ); ***** ^ not supported yet ***** ^ not supported yet 457 END; 458 Delim1Len := M2Strings.Length(delimiter1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 459 Delim2Len := M2Strings.Length(delimiter2); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 460 TwoDelimiters := FALSE; 461 IF ((Delim1Len>0) OR (Delim2Len>0)) AND (RecSize>0) THEN 462 ErrorManager.WARN("Delim-RecSize conflict"); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 463 RETURN; 464 END; 465 FixedLengthRecs := RecSize>0; 466 IF FixedLengthRecs THEN 467 IF ((BlockSize MOD RecSize) # 0) THEN 468 ErrorManager.WARN('Bad Recsize'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 469 RETURN; 470 END; 471 ELSE 472 IF NOT PosUtils.Equal(delimiter1,delimiter2) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 473 TwoDelimiters := TRUE; 474 END; 475 END; 476 477 BytesDone := 0; 478 479 MakeOneList( TheList ); ***** ^ not supported yet ***** ^ not supported yet 480 481 VStorage.DeallocMem( TheHandle, BlockSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 482 END HandleToList; ***** ^ not supported yet 483 484 485 (*$O-*) 486 (*We turn off optimization for this procedure because of a bug in 487 Logitech's v3.0.*) 488 489 PROCEDURE ListToFileHandle( TheList: GenLists.GenList; TheHandle: ***** ^ not supported yet 490 CARDINAL; delim1, delim2: ARRAY OF CHAR; ***** ^ not supported yet 491 InitialNestingLevel: CARDINAL; VAR BytesWritten: 492 LONGINT ): CARDINAL; 493 VAR 494 TmpAdr: SYSTEM.ADDRESS; ***** ^ not supported yet 495 LstCount, LstLngth, TypeCode, TmpSize, DumRecSz, 496 Delim1Lngth, Delim2Lngth, tmpc: CARDINAL; 497 SubList: GenLists.GenList; ***** ^ not supported yet 498 NilList, TwoDelimiters: BOOLEAN; 499 SavedMessage: CARDINAL; 500 TmpL, TmpBytesWritten: LONGINT; 501 502 BEGIN 503 BytesWritten := NumTypes.L0; ***** ^ not supported yet ***** ^ not supported yet 504 Delim1Lngth := M2Strings.Length( delim1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 505 Delim2Lngth := M2Strings.Length( delim2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 506 TwoDelimiters := (Delim1Lngth > 0) AND (Delim2Lngth > 0); 507 (*We begin and end the procedure by bracketing the 508 entire block with a StartSep and EndSep, if the 509 parameter list indicates that they're in use. That's 510 the convention NdxFiles uses to indicate that the block 511 as a whole represents a list.*) 512 IF (Delim1Lngth > 0) AND (InitialNestingLevel = 0) THEN 513 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 514 SYSTEM.ADR(delim1), Delim1Lngth ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 515 TmpL := Numbers.Lc(Delim1Lngth); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 516 (*Necessary because of a bug in Logitech's LONGINT 517 addition.*) 518 BytesWritten := BytesWritten + TmpL; 519 END; 520 IF TwoDelimiters AND (InitialNestingLevel = 0) THEN 521 tmpc := GenLists.ListCode; ***** ^ not supported yet ***** ^ not supported yet 522 (*We have to do this because some implementations won't 523 give us the address of a constant.*) 524 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 525 SYSTEM.ADR(tmpc), SYSTEM.TSIZE(CARDINAL) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 526 BytesWritten := BytesWritten + Numbers.Lc(SYSTEM.TSIZE(CARDINAL)); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 527 END; 528 IF GenLists.Initialized( TheList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 529 NilList := FALSE; 530 ELSE 531 GenLists.NewList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 532 NilList := TRUE; 533 END; 534 GenLists.ListToBlock( TheList, delim1, delim2, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 535 TmpAdr, TmpSize, DumRecSz); ***** ^ not supported yet ***** ^ not supported yet 536 IF (GenLists.ErrorFlag = GenLists.NoListError) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 537 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 538 TmpAdr, TmpSize ); ***** ^ not supported yet ***** ^ not supported yet 539 (*Write the Ndx as a single block.*) 540 VStorage.DosDealloc( TmpAdr, TmpSize); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 541 (*Get rid of temporary buffer space used.*) 542 BytesWritten := BytesWritten + Numbers.Lc(TmpSize); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 543 IF (Delim2Lngth > 0) AND (InitialNestingLevel = 0) THEN 544 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 545 SYSTEM.ADR(delim2), Delim2Lngth ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 546 BytesWritten := BytesWritten + Numbers.Lc(Delim2Lngth); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 547 END; 548 IF NilList THEN 549 GenLists.DisposeList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 550 END; 551 RETURN SavedMessage; 552 END; 553 (*Write the NdxElements one by one if there isn't 554 enough memory to write them as a block.*) 555 LstLngth := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 556 LstCount := 1; 557 WHILE LstCount <= LstLngth DO 558 GenLists.GetElmtAdr( TheList, LstCount, TmpAdr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 559 TmpSize, TypeCode ); ***** ^ not supported yet 560 IF Delim1Lngth > 0 THEN 561 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 562 SYSTEM.ADR(delim1), Delim1Lngth ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 563 BytesWritten := BytesWritten + Numbers.Lc(Delim1Lngth); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 564 END; 565 IF TwoDelimiters THEN 566 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 567 SYSTEM.ADR(TypeCode), SYSTEM.TSIZE(CARDINAL) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 568 BytesWritten := BytesWritten + Numbers.Lc(SYSTEM.TSIZE(CARDINAL)); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 569 END; 570 IF TypeCode = GenLists.ListCode THEN ***** ^ not supported yet ***** ^ not supported yet 571 GenLists.GetChildList( TheList, LstCount, SubList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 572 SavedMessage := ListToFileHandle( SubList, TheHandle, ***** ^ not supported yet ***** ^ not supported yet 573 delim1, delim2, InitialNestingLevel + 1, ***** ^ not supported yet ***** ^ not supported yet 574 TmpBytesWritten ); ***** ^ not supported yet 575 BytesWritten := BytesWritten + TmpBytesWritten; 576 IF SavedMessage # StringIO.NoError THEN ***** ^ not supported yet ***** ^ not supported yet 577 IF NilList THEN 578 GenLists.DisposeList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 579 END; 580 RETURN SavedMessage; 581 END; 582 ELSE 583 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 584 TmpAdr, TmpSize ); ***** ^ not supported yet ***** ^ not supported yet 585 BytesWritten := BytesWritten + Numbers.Lc( TmpSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 586 END; 587 IF Delim2Lngth > 0 THEN 588 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 589 SYSTEM.ADR(delim2), Delim2Lngth ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 590 BytesWritten := BytesWritten + Numbers.Lc(Delim2Lngth); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 591 END; 592 INC(LstCount); ***** ^ undeclared identifier ***** ^ not supported yet 593 END; 594 IF (Delim2Lngth > 0) AND (InitialNestingLevel = 0) THEN 595 SavedMessage := HandleIO.BlockWrite( TheHandle, ***** ^ not supported yet ***** ^ not supported yet 596 SYSTEM.ADR(delim2), Delim2Lngth ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 597 BytesWritten := BytesWritten + Numbers.Lc(Delim2Lngth); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 598 END; 599 IF NilList THEN 600 GenLists.DisposeList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 601 END; 602 RETURN SavedMessage; 603 END ListToFileHandle; ***** ^ not supported yet 604 (*$O=*) 605 606 607 PROCEDURE InsertElmtsOf( List1: GenLists.GenList; StartingAt, ***** ^ not supported yet 608 NumberOfLines: CARDINAL; VAR List2: GenLists.GenList; ***** ^ not supported yet 609 InsertionPoint: CARDINAL ); 610 VAR 611 cnt, tmpsize, TypeCode, List2Lngth : CARDINAL; 612 tmpadr: SYSTEM.ADDRESS; ***** ^ not supported yet 613 BEGIN 614 NumberOfLines := Numbers.Min( NumberOfLines, ***** ^ not supported yet ***** ^ not supported yet 615 GenLists.ListLength( List1 ) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 616 List2Lngth := GenLists.ListLength( List2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 617 IF Numbers.Lc(InsertionPoint) + ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 618 Numbers.Lc( NumberOfLines ) > NumTypes.L65535 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 619 InsertionPoint := List2Lngth + 1; 620 END; 621 FOR cnt := 1 TO NumberOfLines DO 622 GenLists.GetElmtAdr( List1, StartingAt + cnt - 1, tmpadr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 623 tmpsize, TypeCode ); ***** ^ not supported yet 624 GenLists.ListInsertAdr( tmpadr, tmpsize, TypeCode, List2, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 625 InsertionPoint + (cnt - 1) ); ***** ^ not supported yet 626 END; 627 END InsertElmtsOf; ***** ^ not supported yet 628 629 630 PROCEDURE InsertIntoElmt( VAR TheList: GenLists.GenList; ***** ^ not supported yet 631 ListSpot: CARDINAL; StrAdr: SYSTEM.ADDRESS; StrSize: ***** ^ not supported yet 632 CARDINAL; ElmtSpot: CARDINAL ); 633 VAR 634 tmpadr1, tmpadr2: SYSTEM.ADDRESS; ***** ^ not supported yet 635 TypeCode, tmpsize: CARDINAL; 636 BEGIN 637 GenLists.GetElmtAdr( TheList, ListSpot, tmpadr1, tmpsize, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 638 (* Make sure we're inserting into a string. *) 639 IF TypeCode # GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 640 ErrorManager.WARN('Not a string'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 641 END; 642 tmpsize := LowLevel.ScanEQ( tmpsize, 0C, tmpadr1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 643 (* This means you can insert your string at ElmtSpot 65535 and 644 have it neatly appended. *) 645 IF ElmtSpot > tmpsize THEN 646 ElmtSpot := tmpsize; 647 END; 648 VStorage.DosAlloc( tmpadr2, tmpsize + StrSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 649 LowLevel.Move( tmpadr1, tmpadr2, ElmtSpot ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 650 LowLevel.Move( StrAdr, LowLevel.AddAddr(tmpadr2, ElmtSpot), StrSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 651 LowLevel.Move( LowLevel.AddAddr(tmpadr1, ElmtSpot), ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 652 LowLevel.AddAddr(tmpadr2, ElmtSpot + StrSize), tmpsize - ElmtSpot ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 653 GenLists.ListReplaceAdr( tmpadr2, tmpsize + StrSize, GenLists.StrCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 654 TheList, ListSpot ); ***** ^ not supported yet ***** ^ not supported yet 655 VStorage.DosDealloc( tmpadr2, tmpsize + StrSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 656 END InsertIntoElmt; ***** ^ not supported yet 657 658 659 PROCEDURE IsBlankList( TheList: GenLists.GenList ): BOOLEAN; ***** ^ not supported yet 660 (*We use this procedure to test Editor fields that have been 661 marked "required."*) 662 VAR 663 SomethingFound: BOOLEAN; 664 lngth, cnt, TypeCode: CARDINAL; 665 LocalStr: ARRAY [0..127] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 666 BEGIN 667 IF NOT GenLists.Initialized(TheList) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 668 RETURN TRUE; 669 END; 670 SomethingFound := FALSE; 671 lngth := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 672 cnt := 1; 673 WHILE (cnt <= lngth) AND (NOT SomethingFound) DO 674 GenLists.GetElmt( TheList, cnt, LocalStr, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 675 SomethingFound := (TypeCode # GenLists.StrCode) OR (NOT ***** ^ not supported yet ***** ^ not supported yet 676 PosUtils.IsBlank( LocalStr )); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 677 INC(cnt); ***** ^ undeclared identifier ***** ^ not supported yet 678 END; 679 RETURN NOT SomethingFound; 680 END IsBlankList; ***** ^ not supported yet 681 682 683 PROCEDURE ListToString( TheList: GenLists.GenList; VAR TheStr: ARRAY OF CHAR); ***** ^ not supported yet ***** ^ not supported yet 684 VAR 685 tmpstr: ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 686 lngth, TypeCode, cnt: CARDINAL; 687 BEGIN 688 lngth := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 689 StrEdit.SetLength( TheStr, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 690 FOR cnt := 1 TO lngth DO 691 GenLists.GetElmt( TheList, cnt, tmpstr, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 692 IF TypeCode = GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 693 StrEdit.Append( TheStr, tmpstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 694 END; 695 END; 696 END ListToString; ***** ^ not supported yet 697 698 699 700 PROCEDURE LongestLine( TheList: GenLists.GenList ): CARDINAL; ***** ^ not supported yet 701 VAR 702 LstLngth, lngth, cnt, longest: CARDINAL; 703 BEGIN 704 LstLngth := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 705 longest := 0; 706 FOR cnt := 1 TO LstLngth DO 707 lngth := ElmtSize( TheList, cnt ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 708 IF lngth > longest THEN 709 longest := lngth; 710 END; 711 END; 712 RETURN longest; 713 END LongestLine; ***** ^ not supported yet 714 715 716 PROCEDURE OverwriteElmt( VAR TheList: GenLists.GenList; ***** ^ not supported yet 717 ListSpot: CARDINAL; StrAdr: SYSTEM.ADDRESS; StrSize: ***** ^ not supported yet 718 CARDINAL; ElmtSpot: CARDINAL ); 719 VAR 720 tmpadr1, tmpadr2: SYSTEM.ADDRESS; ***** ^ not supported yet 721 excess, TypeCode, tmpsize: CARDINAL; 722 BEGIN 723 GenLists.GetElmtAdr( TheList, ListSpot, tmpadr1, tmpsize, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 724 IF TypeCode # GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 725 ErrorManager.WARN('Not a string'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 726 END; 727 IF tmpsize >= (ElmtSpot + StrSize) THEN 728 LowLevel.Move( StrAdr, LowLevel.AddAddr(tmpadr1, ElmtSpot), StrSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 729 ELSE 730 excess := (ElmtSpot + StrSize) - tmpsize; 731 VStorage.DosAlloc( tmpadr2, tmpsize + excess ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 732 LowLevel.Move( tmpadr1, tmpadr2, ElmtSpot ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 733 LowLevel.Move( StrAdr, LowLevel.AddAddr(tmpadr2, ElmtSpot), StrSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 734 GenLists.ListReplaceAdr( tmpadr2, tmpsize + excess, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 735 GenLists.StrCode, TheList, ListSpot ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 736 VStorage.DosDealloc( tmpadr2, tmpsize + excess ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 737 END; 738 END OverwriteElmt; ***** ^ not supported yet 739 740 741 PROCEDURE ObjectSpot( BinaryObject : ARRAY OF SYSTEM.BYTE; ***** ^ not supported yet 742 TheList : GenLists.GenList; StartingAt, EndingAt : ***** ^ not supported yet 743 CARDINAL) : CARDINAL; 744 VAR 745 cnt, ListEnd, ObjSize, TmpSize, TypeCode : CARDINAL; 746 TmpAdr : SYSTEM.ADDRESS; ***** ^ not supported yet 747 BEGIN 748 (*ObjectSpot*) 749 ListEnd := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 750 IF ListEnd < EndingAt THEN 751 EndingAt := ListEnd; 752 END; 753 IF StartingAt > EndingAt THEN 754 RETURN 0; 755 END; 756 ObjSize := HIGH( BinaryObject ) + 1; ***** ^ undeclared identifier ***** ^ not supported yet 757 FOR cnt := StartingAt TO EndingAt DO 758 GenLists.GetElmtAdr( TheList, cnt, TmpAdr, TmpSize, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 759 IF TmpSize = ObjSize THEN 760 IF PosUtils.PatternScan( SYSTEM.ADR(BinaryObject), ObjSize, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 761 TmpAdr, TmpSize ) = 0 THEN ***** ^ not supported yet ***** ^ not supported yet 762 RETURN cnt; 763 END; 764 END; 765 END; 766 RETURN 0; 767 (*BinaryObject not found between StartingAt and EndingAt.*) 768 END ObjectSpot; ***** ^ not supported yet 769 770 771 PROCEDURE PrintList( fhandle: CARDINAL; TheList : GenLists.GenList; ***** ^ not supported yet 772 LeftMargin: CARDINAL; Separator: ARRAY OF CHAR ); ***** ^ not supported yet 773 774 PROCEDURE PrintRecursive( fhandle: CARDINAL; TheList : 775 GenLists.GenList; Separator: ARRAY OF CHAR; InSubList: ***** ^ not supported yet ***** ^ not supported yet 776 BOOLEAN ); 777 VAR 778 SubLeader, TmpStr : ARRAY [0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 779 SubList : GenLists.GenList; ***** ^ not supported yet 780 TmpSiz, cnt, ListLen, TypeCode, spot : CARDINAL; 781 FirstTime: BOOLEAN; 782 TmpAdr: SYSTEM.ADDRESS; ***** ^ not supported yet 783 784 BEGIN 785 IF InSubList THEN 786 StringIO.PrintMessage( HandleIO.FillFile( fhandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 787 LeftMargin, ' ' ) ); ***** ^ not supported yet 788 StringIO.WriteStr( fhandle, '{' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 789 END; 790 FirstTime := TRUE; 791 spot := 1; 792 ListLen := GenLists.ListLength(TheList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 793 IF GenLists.ErrorFlag # GenLists.NoListError THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 794 ErrorManager.WARN('Uninitialized list?'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 795 END; 796 REPEAT 797 IF spot<=ListLen THEN 798 GenLists.GetElmtAdr( TheList, spot, TmpAdr, TmpSiz, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 799 IF TypeCode=GenLists.ListCode THEN ***** ^ not supported yet ***** ^ not supported yet 800 GenLists.GetChildList(TheList, spot, SubList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 801 PrintRecursive( fhandle, SubList, Separator, TRUE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 802 ELSE 803 IF FirstTime THEN 804 FirstTime := FALSE; 805 ELSE 806 StringIO.WriteStr( fhandle, Separator ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 807 END; 808 IF TypeCode = GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 809 GetStr( TheList, spot, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 810 IF PosUtils.Present( Separator, TmpStr ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 811 StringIO.WriteStr( fhandle, '"' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 812 StringIO.WriteStr( fhandle, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 813 StringIO.WriteStr( fhandle, '"' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 814 ELSE 815 StringIO.PrintMessage( HandleIO.FillFile( fhandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 816 LeftMargin, ' ' ) ); ***** ^ not supported yet 817 StringIO.WriteStr( fhandle, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 818 END; 819 ELSE 820 StrConv.CardinalToStr( spot, 2, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 821 StringIO.PrintMessage( HandleIO.FillFile( fhandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 822 LeftMargin, ' ' ) ); ***** ^ not supported yet 823 StringIO.WriteStr( fhandle, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 824 StringIO.WriteStr( fhandle, ': ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 825 StringIO.WriteStr( fhandle, 'Size = ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 826 StrConv.CardinalToStr( TmpSiz, 4, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 827 StringIO.WriteStr( fhandle, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 828 StringIO.WriteStr( fhandle, '; Type = ' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 829 StrConv.CardinalToStr( TypeCode, 0, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 830 StringIO.WriteStr( fhandle, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 831 END; 832 END; 833 END; 834 INC(spot); ***** ^ undeclared identifier ***** ^ not supported yet 835 UNTIL spot>ListLen; 836 IF InSubList THEN 837 StringIO.WriteStr( fhandle, '}' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 838 END; 839 END PrintRecursive; ***** ^ not supported yet 840 841 BEGIN (* PrintList *) 842 PrintRecursive( fhandle, TheList, Separator, FALSE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 843 (*We don't call PrintList itself recursively because we 844 don't want the CrLf from the WriteEol below to follow 845 embedded lists.*) 846 StringIO.WriteEol( fhandle, '' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 847 END PrintList; ***** ^ not supported yet 848 849 850 PROCEDURE TextFileToList( VAR TheFile: ARRAY OF CHAR; ***** ^ not supported yet 851 VAR TheList: GenLists.GenList): CARDINAL; ***** ^ not supported yet 852 (* finds the file, reads it into the list, closes the file *) 853 VAR 854 SizeLeft, SizeOK, DoSizeL : LONGINT; 855 ResultErr: CARDINAL; 856 NextList: GenLists.GenList; ***** ^ not supported yet 857 DoSizeC, TheHandl : CARDINAL; 858 GoBack : INTEGER; 859 buffer: SYSTEM.ADDRESS; ***** ^ not supported yet 860 BEGIN 861 IF NOT GenLists.Initialized( TheList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 862 InitResponse( 'TextFileToList' ); ***** ^ not supported yet ***** ^ not supported yet 863 END; 864 ResultErr := HandleIO.FindFile( TheHandl, TheFile, 'PATH'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 865 IF StringIO.NoError # ResultErr THEN ***** ^ not supported yet ***** ^ not supported yet 866 RETURN ResultErr; 867 END; 868 SizeLeft := HandleIO.FileLength( TheHandl); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 869 WHILE SizeLeft # Numbers.Lc( 0) DO ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 870 (* first, get a mem block <= 65000 bytes *) 871 DoSizeC := 65000; 872 IF NOT VStorage.DosAvail( DoSizeC) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 873 (* If there's not a 64K chunk available, get as much as there 874 is.*) 875 DoSizeC := EnvironUtils.MemAvail( 100); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 876 END; 877 SizeOK := Numbers.Lc( DoSizeC); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 878 IF ( SizeLeft > SizeOK) 879 AND ( Numbers.Lc( 64000) > SizeLeft) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 880 GenLists.DisposeList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 881 ResultErr := HandleIO.CloseHandle( TheHandl); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 882 RETURN StringIO.TooLittleMemory; ***** ^ not supported yet ***** ^ not supported yet 883 END; 884 IF SizeLeft > SizeOK THEN 885 DoSizeL := SizeOK; 886 ELSE 887 DoSizeL := SizeLeft; 888 END; 889 SizeLeft := SizeLeft - DoSizeL; 890 DoSizeC := Numbers.C( DoSizeL ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 891 IF NOT VStorage.DosAvail( DoSizeC ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 892 ResultErr := HandleIO.CloseHandle( TheHandl); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 893 RETURN StringIO.TooLittleMemory; ***** ^ not supported yet ***** ^ not supported yet 894 END; 895 VStorage.DosAlloc( buffer, DoSizeC ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 896 ResultErr := HandleIO.BlockRead( TheHandl, buffer, DoSizeC); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 897 IF StringIO.NoError # ResultErr THEN ***** ^ not supported yet ***** ^ not supported yet 898 ResultErr := HandleIO.CloseHandle( TheHandl); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 899 RETURN ResultErr; 900 END; 901 IF SizeLeft # Numbers.Lc( 0) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 902 GoBack := LowLevel.ScanEQ( -32000, 12C, ***** ^ not supported yet ***** ^ not supported yet 903 LowLevel.AddAddr(buffer, DoSizeC - 1) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 904 (* to locate a cut-ff line, look for the last 905 line-feed character before the end of the block *) 906 IF GoBack = -32000 THEN 907 (* No LF found in last 32000 bytes of block *) 908 ResultErr := HandleIO.CloseHandle( TheHandl); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 909 RETURN StringIO.BadData; ***** ^ not supported yet ***** ^ not supported yet 910 END; 911 DoSizeL := Numbers.Lc( -GoBack ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 912 SizeLeft := SizeLeft + DoSizeL; 913 DoSizeL := -DoSizeL; 914 HandleIO.SetFilePtr( TheHandl, HandleIO.FromCurrent, DoSizeL); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 915 (* change file position and counters to start from 916 beginning of the line that was cut off *) 917 END; 918 GenLists.NewList( NextList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 919 GenLists.BlockToList( buffer, DoSizeC, StringIO.CrLf, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 920 StringIO.CrLf, 0, GenLists.StrCode, NextList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 921 GenLists.JoinLists( NextList, TheList, 65535); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 922 END; 923 ResultErr := HandleIO.CloseHandle( TheHandl); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 924 RETURN ResultErr; 925 END TextFileToList; ***** ^ not supported yet 926 927 928 PROCEDURE TextListToFile( VAR TheList: GenLists.GenList; ***** ^ not supported yet 929 TheFile: ARRAY OF CHAR): CARDINAL; ***** ^ not supported yet 930 (* creates the file; writes the list to it and closes file *) 931 VAR 932 StrAdr1, StrAdr2: SYSTEM.ADDRESS; ***** ^ not supported yet 933 934 StrSize, DumType, SizeL, TheHandl, cnt: CARDINAL; 935 ResultErr: CARDINAL; 936 TmpCrLf: ARRAY [0..2] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 937 BEGIN 938 StrEdit.AssignStr( StringIO.CrLf, TmpCrLf ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 939 ResultErr := HandleIO.CreateFile( TheHandl, TheFile); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 940 IF StringIO.NoError # ResultErr THEN ***** ^ not supported yet ***** ^ not supported yet 941 RETURN ResultErr; 942 END; 943 SizeL := GenLists.ListLength( TheList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 944 FOR cnt := 1 TO SizeL DO 945 GenLists.GetElmtAdr( TheList, cnt, StrAdr1, StrSize, DumType); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 946 StrSize := LowLevel.ScanEQ( StrSize, 0C, StrAdr1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 947 (* Reduce StrSize to number of bytes before the null. *) 948 VStorage.DosAlloc( StrAdr2, StrSize + 2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 949 LowLevel.Move( StrAdr1, StrAdr2, StrSize ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 950 LowLevel.Move( SYSTEM.ADR(TmpCrLf), ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 951 LowLevel.AddAddr(StrAdr2, StrSize), 2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 952 ResultErr := HandleIO.BlockWrite( TheHandl, ***** ^ not supported yet ***** ^ not supported yet 953 StrAdr2, StrSize + 2 ); ***** ^ not supported yet ***** ^ not supported yet 954 VStorage.DosDealloc( StrAdr2, StrSize + 2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 955 IF StringIO.NoError # ResultErr THEN ***** ^ not supported yet ***** ^ not supported yet 956 RETURN ResultErr; 957 END; 958 END; 959 ResultErr := HandleIO.CloseHandle( TheHandl); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 960 RETURN ResultErr; 961 END TextListToFile; ***** ^ not supported yet 962 963 964 PROCEDURE TypeCheck( TheList: GenLists.GenList; spot: CARDINAL ): CARDINAL; ***** ^ not supported yet 965 VAR 966 DumAddr: SYSTEM.ADDRESS; ***** ^ not supported yet 967 TheSize, TypeCode: CARDINAL; 968 BEGIN 969 GenLists.GetElmtAdr( TheList, spot, DumAddr, TheSize, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 970 RETURN TypeCode; 971 END TypeCheck; ***** ^ not supported yet 972 973 974 BEGIN 975 Initialized := FALSE; 976 Init(); ***** ^ not supported yet ***** ^ not supported yet 977 END ListUtils. ***** ^ not supported yet 1178 errors