Listing: 1 MODULE PMIdbms; (* * REPERTOIRE * Release 1.6 * By Charles Bradford and 2 Cole Brecheen * (c) Copyright 1985-1991 PMI * Green Bay Wisconsin * All 3 rights reserved * (414) 468-6040 * * $Header: 4 D:/logfiles/demos/pmidbms.mov 1.3 09 Dec 1990 11:18:22 coleb $ * * A 5 program to illustrate use of REPERTOIRE's screen * and NdxFile system. 6 This is the advanced example; * programmers new to REPERTOIRE should begin 7 with DEMO1. *) 8 9 10 (* 11 IMPORT EMS; 12 EMS is part of PMI's EmsStorage, a product separate from 13 Repertoire. It allows Repertoire applications automatically 14 to use expanded memory. If you don't have it, just comment 15 out the IMPORT EMS from any program modules in which it 16 appears.*) 17 18 IMPORT BuildLst; 19 IMPORT ByteFiddler; 20 IMPORT ControlUtils; 21 IMPORT DateFunctions; 22 IMPORT DirManager; 23 IMPORT Drectory; 24 IMPORT DspFiles; 25 IMPORT EnvironUtils; 26 IMPORT ErrorManager; 27 IMPORT ErrStrgs; 28 IMPORT HandleIO; 29 IMPORT FrameManager; 30 IMPORT FramePainter; 31 IMPORT GenLists; 32 IMPORT InitCompilerMods; 33 IMPORT InputManager; 34 IMPORT KbdInput; 35 IMPORT ListUtils; 36 IMPORT NdxUtils; 37 IMPORT MsgBox2; 38 IMPORT NdxBones; 39 IMPORT NdxFiles; 40 IMPORT NdxTypes; 41 IMPORT NumTypes; 42 IMPORT PosUtils; 43 IMPORT PrtFrame; 44 IMPORT Scrn2Ndx; 45 IMPORT ScrnTypes; 46 IMPORT ScrnUtl1; 47 IMPORT ScrnUtl2; 48 IMPORT SmartScreen; 49 IMPORT StrConv; 50 IMPORT StrEdit; 51 IMPORT StringIO; 52 IMPORT M2Strings; 53 IMPORT UserOps; 54 IMPORT VEditor; 55 IMPORT VWindows; 56 IMPORT WindowPrims; 57 58 59 VAR 60 NdxFile: NdxTypes.NdxFileType; ***** ^ not supported yet 61 ScreenFile: ScrnTypes.DisplayFile; ***** ^ not supported yet 62 EntryFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 63 NdxFileName, RecName: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 64 dumbool: BOOLEAN; 65 PrnHandle, SavedCursorHeight : CARDINAL; 66 67 68 PROCEDURE PrintMenu(); 69 VAR 70 TmpName: ScrnTypes.AFrameName; ***** ^ not supported yet 71 thestr: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 72 ff: ARRAY [0..0] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 73 FormFeeding, dumbool: BOOLEAN; 74 TmpList: GenLists.GenList; ***** ^ not supported yet 75 chkey: CARDINAL; 76 LeftMargin : INTEGER; 77 InvoiceFrame, DialogBox: ScrnTypes.DisplayFrame; ***** ^ not supported yet 78 79 PROCEDURE WriteInvoice(); 80 VAR 81 NewEd: GenLists.GenList; ***** ^ not supported yet 82 month, day, year, AcctBalance: CARDINAL; 83 date, name, tmpstr : ARRAY [0..50] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 84 BEGIN 85 ControlUtils.ReadInput( EntryFrame, tmpstr, 'ACCTBAL' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 86 (* get account balance string from record entry frame *) 87 IF NOT StrConv.StrToCardinal(tmpstr, 0, AcctBalance) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 88 AcctBalance := 0; 89 END; 90 IF AcctBalance > 0 THEN 91 StrEdit.MakeCurrency( '$', tmpstr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 92 ControlUtils.ChangeField( InvoiceFrame, tmpstr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 93 'AMTDUE', TRUE ); ***** ^ not supported yet ***** ^ not supported yet 94 ControlUtils.ChangeField( InvoiceFrame, '$0.00', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 95 'AMTPAID', TRUE ); ***** ^ not supported yet ***** ^ not supported yet 96 ELSE 97 ControlUtils.ChangeField( InvoiceFrame, 'prepaid', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 98 'TERMS', TRUE ); ***** ^ not supported yet ***** ^ not supported yet 99 END; 100 EnvironUtils.GetDate( month, day, year, name, date ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 101 (* get the system date *) 102 ControlUtils.ChangeField( InvoiceFrame, date, 'DATE', TRUE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 103 (*Insert the current date.*) 104 ControlUtils.ChangeField( InvoiceFrame, date, 'SHIPDATE', TRUE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 105 (* fill in default dates *) 106 ControlUtils.ReadInput( EntryFrame, name, 'NAME'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 107 (* get the name of the customer out of the record entry frame*) 108 ScrnUtl2.CopyEdField( EntryFrame, 'ADDRESS', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 109 InvoiceFrame, 'SOLDTO'); ***** ^ not supported yet ***** ^ not supported yet 110 ScrnUtl2.GetEdField( InvoiceFrame, 'SOLDTO', NewEd ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 111 GenLists.ListInsert( name, GenLists.StrCode, NewEd, 1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 112 (* put name and address in sold to field; notice that 113 we don't have to do a PutEdField here because 114 ScrnUtl2.GetEdField returns the real list, not a copy of it. *) 115 ScrnUtl2.CopyEdField( InvoiceFrame, 'SOLDTO', InvoiceFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 116 'SHIPTO'); ***** ^ not supported yet 117 FramePainter.ShowDisplayFrame( InvoiceFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 118 InputManager.ControlFrame( InvoiceFrame, 0, '', FALSE, TmpName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 119 (* now let user change screen if desired *) 120 IF NOT PosUtils.Equal( TmpName, InvoiceFrame^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 121 RETURN 122 END; 123 IF AcctBalance > 0 THEN 124 PrtFrame.PrintDisplayFrame( InvoiceFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 125 PrnHandle, LeftMargin ); ***** ^ not supported yet 126 StringIO.WriteStr( PrnHandle, 14C); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 127 (* send a page feed to the printer *) 128 END; 129 ControlUtils.ChangeField( InvoiceFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 130 ' This Copy For Your Records.', 'TITLE', FALSE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 131 PrtFrame.PrintDisplayFrame( InvoiceFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 132 PrnHandle, LeftMargin ); ***** ^ not supported yet 133 END WriteInvoice; ***** ^ not supported yet 134 135 BEGIN 136 (*PrintMenu*) 137 ScrnTypes.InitDisplayFrame( DialogBox, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 138 ScrnTypes.InitDisplayFrame( InvoiceFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 139 DspFiles.ReadDisplayFrame( ScreenFile, InvoiceFrame, '28' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 140 (* now fill screen with input data *) 141 PrnHandle := StringIO.StdPrn; ***** ^ not supported yet ***** ^ not supported yet 142 ff[0] := CHR(12); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 143 LOOP 144 TmpName := 'PrintDialog'; (*The print menu screen.*) ***** ^ not supported yet ***** ^ not supported yet 145 ControlUtils.ReadShowAndCntrl( ScreenFile, DialogBox, TmpName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 146 IF PosUtils.Equal( TmpName, '5' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 147 (* User pressed Cancel or Escape *) 148 EXIT; 149 END; 150 chkey := ScrnUtl1.WhichChoiceKey( DialogBox, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 151 ScrnUtl1.FieldNum(DialogBox, 'file') ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 152 CASE CHR(chkey) OF ***** ^ undeclared identifier ***** ^ not supported yet 153 'f': 154 HandleIO.OpenForAppending( "PRINTER.TXT", PrnHandle); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 155 | 'p': 156 StringIO.PrintMessage(HandleIO.OpenFile(PrnHandle,'PRN')); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 157 END; 158 FormFeeding := ScrnUtl1.WhichChoiceKey( DialogBox, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 159 ScrnUtl1.FieldNum(DialogBox, 'ff') ) = ORD('Y'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 160 ScrnUtl1.GetIntField( DialogBox, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 161 ScrnUtl1.FieldNum(DialogBox, 'margin'), LeftMargin ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 162 chkey := ScrnUtl1.WhichChoiceKey( DialogBox, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 163 ScrnUtl1.FieldNum(DialogBox, 'label') ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 164 CASE CHR(chkey) OF ***** ^ undeclared identifier ***** ^ not supported yet 165 'A': 166 ControlUtils.ReadInput( EntryFrame, thestr, 'NAME'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 167 StringIO.PrintMessage( HandleIO.FillFile( PrnHandle, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 168 LeftMargin, ' ' ) ); ***** ^ not supported yet 169 StrEdit.CrunchBlanks(thestr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 170 StringIO.WriteEol( PrnHandle, thestr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 171 IF NOT ScrnUtl1.ListFromEdField( ***** ^ not supported yet ***** ^ not supported yet 172 EntryFrame, ***** ^ not supported yet 173 ScrnUtl1.FieldNum( EntryFrame, 'ADDRESS' ), ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 174 TmpList ) THEN ***** ^ not supported yet 175 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 176 END; 177 ListUtils.PrintList( PrnHandle, TmpList, LeftMargin, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 178 StringIO.CrLf ); ***** ^ not supported yet ***** ^ not supported yet 179 | 'I': 180 WriteInvoice(); ***** ^ not supported yet ***** ^ not supported yet 181 | 'T': 182 PrtFrame.PrintFrameData( EntryFrame, PrnHandle, LeftMargin ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 183 END; 184 IF FormFeeding THEN 185 StringIO.WriteEol( PrnHandle, ff ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 186 END; 187 END; 188 StringIO.PrintMessage( HandleIO.CloseHandle( PrnHandle)); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 189 ScrnUtl2.CloseDisplayFrame( InvoiceFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 190 ScrnUtl2.CloseDisplayFrame( DialogBox ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 191 END PrintMenu; ***** ^ not supported yet 192 193 194 PROCEDURE DoOneRecord( RecName: ARRAY OF CHAR ); ***** ^ not supported yet 195 VAR 196 KeyHit, month, day, year: CARDINAL; 197 DateStr, dumstr: ARRAY [0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 198 ch: CHAR; 199 NextName: ScrnTypes.AFrameName; ***** ^ not supported yet 200 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 201 BEGIN 202 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 203 DspFiles.ReadFrame( ScreenFile, EntryFrame, '3' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 204 (*Frame 3 is the entry form.*) 205 IF NOT Scrn2Ndx.FillScrFast( NdxFile, EntryFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 206 RecName, '') THEN ***** ^ not supported yet ***** ^ not supported yet 207 (*FillScr says we're creating a new record, so fill the 208 screen with some default values to save the user 209 some typing.*) 210 ControlUtils.ChangeField( EntryFrame, RecName, 'name', TRUE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 211 (*Insert the RecName they've selected.*) 212 EnvironUtils.GetDate( month, day, year, dumstr, DateStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 213 ControlUtils.ChangeField( EntryFrame, DateStr, 'date', TRUE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 214 (*Insert the current date.*) 215 END; 216 FramePainter.ShowDisplayFrame( EntryFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 217 (*Displays the entry form.*) 218 REPEAT 219 NextName := '5'; ***** ^ not supported yet 220 (*The menu at the top of the screen.*) 221 ControlUtils.ReadShowAndCntrl( ScreenFile, TmpFrame, NextName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 222 IF PosUtils.Equal( NextName, '2' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 223 (* User pressed Escape *) 224 IF EntryFrame^.FrameChanged THEN ***** ^ not supported yet ***** ^ not supported yet 225 IF MsgBox2.MsgOkay( TmpFrame, VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 226 "Changes made will be lost. Please confirm." ) THEN ***** ^ not supported yet 227 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 228 RETURN; 229 ELSE 230 ch := 0C; 231 NextName := '5'; ***** ^ not supported yet 232 END; 233 ELSE 234 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 235 RETURN; 236 END; 237 ELSE 238 ch := CAP( ScrnUtl1.SelectedChar( TmpFrame ) ); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 239 END; 240 IF ch = 'S' THEN 241 (*Store*) 242 StrEdit.SetLength( RecName, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 243 (*We're using a null record name here to make PutScrFast 244 take its record name from the 'name' field in EntryFrame.*) 245 EnvironUtils.GetDate( month, day, year, dumstr, DateStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 246 ControlUtils.ChangeField( EntryFrame, DateStr, 'date', TRUE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 247 (*Make the date field reflect date of last change.*) 248 IF Scrn2Ndx.PutScrFast( NdxFile, EntryFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 249 RecName, 'name') THEN ***** ^ not supported yet ***** ^ not supported yet 250 IF NOT NdxFiles.WriteRecord( NdxFile, RecName) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 251 ControlUtils.RdShwAndCntrlConst( ScreenFile, TmpFrame, '17' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 252 (*"Cannot put record in file" message*) 253 ELSE 254 EntryFrame^.FrameChanged := FALSE; ***** ^ not supported yet ***** ^ not supported yet 255 ControlUtils.RdShwAndCntrlConst( ScreenFile, TmpFrame, '15' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 256 (*"Record successfully added" message*) 257 END; 258 ELSE 259 ControlUtils.RdShwAndCntrlConst( ScreenFile, TmpFrame, '17' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 260 END; 261 ELSIF ch = 'D' THEN 262 (*Delete*) 263 ControlUtils.ReadInput( EntryFrame, RecName, 'name'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 264 IF MsgBox2.MsgOkay( TmpFrame, VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 265 "Preparing to delete record. Please confirm." ) THEN ***** ^ not supported yet 266 IF NdxFiles.DeleteRecord( NdxFile, RecName) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 267 ControlUtils.RdShwAndCntrlConst( ScreenFile, TmpFrame, '14' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 268 (* successfully deleted *) 269 ELSE 270 ControlUtils.RdShwAndCntrlConst( ScreenFile, TmpFrame, '11' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 271 (* cannot delete this record *) 272 END; 273 END; 274 ELSIF ch = 'P' THEN 275 (* Print *) 276 PrintMenu(); ***** ^ not supported yet ***** ^ not supported yet 277 FramePainter.ShowDisplayFrame( EntryFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 278 ELSIF ch = 'E' THEN 279 (*Edit.*) 280 ControlUtils.Control( EntryFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 281 END; 282 UNTIL PosUtils.Equal(NextName, '2'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 283 (*Frame 2 is the Main Menu *) 284 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 285 END DoOneRecord; ***** ^ not supported yet 286 287 288 PROCEDURE ShowAllRecords( TheList: GenLists.GenList ); ***** ^ not supported yet 289 VAR 290 cnt, lngth, TypeCode: CARDINAL; 291 TmpName: NdxTypes.RecNameStr; ***** ^ not supported yet 292 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 293 BEGIN 294 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 295 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, '42' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 296 (* changes the line at the bottom that explains the special keys *) 297 lngth := GenLists.ListLength( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 298 cnt := 1; 299 WHILE (cnt <= lngth) DO 300 GenLists.GetElmt( TheList, cnt, TmpName, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 301 DoOneRecord( TmpName ); ***** ^ not supported yet ***** ^ not supported yet 302 INC(cnt); ***** ^ undeclared identifier ***** ^ not supported yet 303 END; 304 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, '1' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 305 (* resets the bottom line explaining the special keys *) 306 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 307 END ShowAllRecords; ***** ^ not supported yet 308 309 310 PROCEDURE ProcessRecord(); 311 VAR 312 spot, dumc, LandingField, KeyHit: CARDINAL; 313 done: BOOLEAN; 314 NdxRec: NdxTypes.NdxElement; ***** ^ not supported yet 315 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 316 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 317 BEGIN 318 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 319 RecName := ''; ***** ^ not supported yet ***** ^ incompatible assignment 320 REPEAT 321 NextFrame := '4'; (*the record selection form*) ***** ^ not supported yet 322 DspFiles.ReadDisplayFrame( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 323 REPEAT 324 ControlUtils.ChangeField( TmpFrame, RecName, 'name', TRUE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 325 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 326 LandingField := 0; 327 InputManager.ControlFrame( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 328 LandingField, '', FALSE, NextFrame ); ***** ^ not supported yet 329 IF NOT PosUtils.Equal( NextFrame, TmpFrame^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 330 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 331 RETURN; 332 END; 333 ControlUtils.ReadInput( TmpFrame, RecName, 'name'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 334 done := NdxFiles.RecordExists( NdxFile, RecName); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 335 IF NOT done THEN 336 done := MsgBox2.MsgOkay( TmpFrame, VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 337 "Record not found. Preparing to create it. Please confirm." ); ***** ^ not supported yet 338 END; 339 IF NOT done THEN 340 IF MsgBox2.MsgOkay( TmpFrame, VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 341 "Search for a name in which this pattern appears?" ) THEN ***** ^ not supported yet 342 StrEdit.CrunchBlanks( RecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 343 spot := GenLists.ScanList( RecName, NdxFile^.Ndx, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 344 1, 65535, dumc ); ***** ^ not supported yet 345 IF spot > 0 THEN 346 GenLists.GetElmt( NdxFile^.Ndx, spot, NdxRec, dumc ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 347 M2Strings.Assign( NdxRec.RecName, RecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 348 ELSE 349 RecName := ''; ***** ^ not supported yet ***** ^ incompatible assignment 350 END; 351 END; 352 END; 353 UNTIL done; 354 DoOneRecord( RecName ); ***** ^ not supported yet ***** ^ not supported yet 355 UNTIL NOT PosUtils.Equal( NextFrame, '4' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 356 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 357 END ProcessRecord; ***** ^ not supported yet 358 359 360 PROCEDURE StoreList( TheList: GenLists.GenList ); ***** ^ not supported yet 361 VAR 362 ListName: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 363 TmpList: GenLists.GenList; ***** ^ not supported yet 364 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 365 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 366 BEGIN 367 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 368 NextFrame := '20'; ***** ^ not supported yet ***** ^ not supported yet 369 (*List Storage Form*) 370 DspFiles.ReadDisplayFrame( ScreenFile, TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 371 NextFrame ); ***** ^ not supported yet 372 IF NOT (0 # ScrnUtl1.FieldNum( TmpFrame, 'list' )) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 373 (*Find the editor field.*) 374 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 375 END; 376 IF NOT ScrnUtl1.ListToEdField( TheList, TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 377 TmpFrame^.CurrentField ) THEN ***** ^ not supported yet ***** ^ not supported yet 378 (*Put the list created in BuildList into the editor 379 field.*) 380 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 381 END; 382 StrConv.CardinalToStr( GenLists.ListLength( TheList), 0, ListName); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 383 StrEdit.Append( ListName, '.'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 384 ControlUtils.ChangeField( TmpFrame, ListName, 'size', FALSE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 385 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 386 REPEAT 387 InputManager.ControlFrame( TmpFrame, 0, '', FALSE, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 388 IF PosUtils.Equal( NextFrame, '999' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 389 (*They want to store the list.*) 390 ControlUtils.ReadInput( TmpFrame, ListName, 'name' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 391 (*Get the name they've chosen for the list out of 392 the 'name' field.*) 393 GenLists.CopyList( TheList, TmpList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 394 IF NOT BuildLst.StoreRecNameList( NdxFile, ListName, TmpList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 395 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 396 END; 397 ScrnUtl2.ShowMessage( ScreenFile, '27' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 398 (*Says store successful; waits for any key.*) 399 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 400 RETURN; 401 END; 402 UNTIL PosUtils.Equal( NextFrame, '21' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 403 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 404 END StoreList; ***** ^ not supported yet 405 406 407 PROCEDURE SearchFile(); 408 VAR 409 ListMade: GenLists.GenList; ***** ^ not supported yet 410 ErrorField: CARDINAL; 411 message, LimitingList: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 412 dumbool: BOOLEAN; 413 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 414 MsgFrame, TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 415 416 BEGIN (*SearchFile*) 417 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 418 LOOP 419 StrEdit.AssignStr( '', message ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 420 ErrorField := 0; 421 NextFrame := '21'; (*The List Building form*) ***** ^ not supported yet ***** ^ not supported yet 422 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 423 REPEAT 424 InputManager.ControlFrame( TmpFrame, ErrorField, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 425 message, FALSE, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet 426 ErrorField := 0; 427 (*Reset ErrorField and message so they'll signal an 428 error on the next loop only if there's really been 429 an error.*) 430 StrEdit.AssignStr( '', message ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 431 IF NOT PosUtils.Equal( NextFrame, TmpFrame^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 432 (*exit if they press the backup or program-exit 433 keys.*) 434 EXIT; 435 END; 436 IF NOT ScrnUtl1.FieldIsBlank( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 437 'listname', ErrorField) THEN ***** ^ not supported yet ***** ^ not supported yet 438 ControlUtils.ReadInput( TmpFrame, LimitingList, 'listname' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 439 (*Get the name of the list they've chosen to use 440 out of the 'name' field.*) 441 ELSE 442 StrEdit.AssignStr( '', LimitingList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 443 END; 444 ScrnTypes.InitDisplayFrame( MsgFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 445 ScrnUtl2.ReadAndShow( ScreenFile, MsgFrame, '43' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 446 (*a screen that says list is being created *) 447 BuildLst.BuildList( NdxFile, TmpFrame, 1, 13, LimitingList, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 448 ErrorField, ListMade ); ***** ^ not supported yet 449 FrameManager.EraseFrame( MsgFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 450 ScrnUtl2.CloseDisplayFrame( MsgFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 451 IF ErrorField = 0 THEN 452 BuildLst.DeleteListRec( ListMade); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 453 StoreList( ListMade ); ***** ^ not supported yet ***** ^ not supported yet 454 EXIT; 455 ELSE 456 StrEdit.AssignStr( "Something's wrong with this field.", ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 457 message ); ***** ^ not supported yet 458 END; 459 UNTIL ErrorField = 0; 460 END; 461 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 462 END SearchFile; ***** ^ not supported yet 463 464 465 PROCEDURE ManageLists(); 466 VAR 467 TmpList: GenLists.GenList; ***** ^ not supported yet 468 LastListName : ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 469 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 470 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 471 BEGIN 472 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 473 LastListName[0] := 0C; ***** ^ not supported yet ***** ^ not supported yet 474 LOOP 475 NextFrame := '29'; (*The main list management menu.*) ***** ^ not supported yet ***** ^ not supported yet 476 ControlUtils.ReadShowAndCntrl( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 477 IF PosUtils.Equal( NextFrame, TmpFrame^.parent ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 478 EXIT; 479 END; 480 CASE ScrnUtl1.SelectedChar(TmpFrame) OF ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 481 'M': (*Make a new list.*) 482 SearchFile(); ***** ^ not supported yet ***** ^ not supported yet 483 | 'D': (*Delete a list.*) 484 IF ControlUtils.GetStrResponse( ScreenFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 485 '30', LastListName, LastListName ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 486 (* if they didn't try to back up or exit *) 487 IF BuildLst.DelRecNameList( NdxFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 488 LastListName ) THEN ***** ^ not supported yet 489 ScrnUtl2.ShowMessage( ScreenFile, '34' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 490 (*Says the list was successfully deleted.*) 491 ELSE 492 ScrnUtl2.ShowMessage( ScreenFile, '35' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 493 (*Says no such list stored; waits for any key.*) 494 END; 495 END; 496 | 'S': (*Show lists.*) 497 IF BuildLst.GetListNames( NdxFile, TmpList ) AND ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 498 (GenLists.ListLength( TmpList) # 0) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 499 IF NOT ControlUtils.ListBox( ScreenFile, '31', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 500 TmpList, LastListName, NextFrame ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 501 (* We don't care if they press Esc here. *) 502 END; 503 ELSE 504 ScrnUtl2.ShowMessage( ScreenFile, '35' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 505 (*Says no such list stored and waits for a key.*) 506 END; 507 | 'E': (*Edit a list.*) 508 IF ControlUtils.GetStrResponse( ScreenFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 509 '32', LastListName, LastListName ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 510 (* if they didn't try to back up or exit *) 511 IF BuildLst.GetRecNameList( NdxFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 512 LastListName, TmpList ) THEN ***** ^ not supported yet ***** ^ not supported yet 513 StoreList( TmpList ); ***** ^ not supported yet ***** ^ not supported yet 514 ELSE 515 ScrnUtl2.ShowMessage( ScreenFile, '35' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 516 (*Says no such list stored; waits for any key.*) 517 END; 518 END; 519 | 'A': (*Examine list of All records.*) 520 NdxUtils.GetRecNames( NdxFile, TmpList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 521 StoreList( TmpList ); ***** ^ not supported yet ***** ^ not supported yet 522 | 'R': (*Retrieve listed records.*) 523 IF ControlUtils.GetStrResponse( ScreenFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 524 '33', LastListName, LastListName ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 525 (* if they didn't try to back up or exit *) 526 IF BuildLst.GetRecNameList( NdxFile, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 527 LastListName, TmpList ) THEN ***** ^ not supported yet ***** ^ not supported yet 528 ShowAllRecords( TmpList ); ***** ^ not supported yet ***** ^ not supported yet 529 NextFrame := '29'; (* The main list management menu. *) ***** ^ not supported yet ***** ^ not supported yet 530 ELSE 531 ScrnUtl2.ShowMessage( ScreenFile, '35' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 532 (*Says no such list stored; waits for any key.*) 533 END; 534 END; 535 ELSE 536 END; 537 END; 538 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 539 END ManageLists; ***** ^ not supported yet 540 541 542 543 PROCEDURE ErrorOpeningFile( ErrMsg: CARDINAL; 544 ErrText, fname: ARRAY OF CHAR ); ***** ^ not supported yet 545 VAR 546 TmpStr1: ARRAY [0..149] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 547 TmpStr2: ARRAY [0..59] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 548 KeyHit: CARDINAL; 549 BEGIN 550 StrEdit.AssignStr( "Error in opening '", TmpStr1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 551 StrEdit.Append( TmpStr1, fname ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 552 StrEdit.Append( TmpStr1, "': " ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 553 IF ErrMsg # StringIO.MissingMessage THEN ***** ^ not supported yet ***** ^ not supported yet 554 ErrStrgs.NumToStr( ErrMsg, TmpStr2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 555 StrEdit.Append( TmpStr1, TmpStr2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 556 ELSE 557 StrEdit.Append( TmpStr1, ErrText); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 558 END; 559 StrEdit.Append( TmpStr1, " Press any key." ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 560 WindowPrims.MsgBox( VWindows.SE, TmpStr1, KbdInput.AnyKeyNum, KeyHit ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 561 END ErrorOpeningFile; ***** ^ not supported yet 562 563 564 PROCEDURE NotPmiFile( fname: ARRAY OF CHAR): BOOLEAN; ***** ^ not supported yet 565 BEGIN 566 RETURN NOT PosUtils.Present( 'pmidbms', fname); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 567 END NotPmiFile; ***** ^ not supported yet 568 569 570 PROCEDURE ExportRecords( NdxFile: NdxTypes.NdxFileType; VAR NextFrame: ***** ^ not supported yet 571 ScrnTypes.AFrameName; ScreenFile: ScrnTypes.DisplayFile); ***** ^ not supported yet ***** ^ not supported yet 572 573 VAR 574 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 575 576 577 PROCEDURE ExportToNdxFile( NdxF1: NdxTypes.NdxFileType; RecNameList, ***** ^ not supported yet 578 MatchingFields: GenLists.GenList; NdxF2: NdxTypes.NdxFileType ); ***** ^ not supported yet ***** ^ not supported yet 579 580 VAR 581 SearchingAll: BOOLEAN; 582 TypeCode, lngth1, cnt: CARDINAL; 583 TmpStr: NdxTypes.RecNameStr; ***** ^ not supported yet 584 TmpNdxRec: NdxTypes.NdxElement; ***** ^ not supported yet 585 586 BEGIN (* ExportToNdxFile *) 587 lngth1 := GenLists.ListLength( RecNameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 588 IF lngth1 = 0 THEN 589 SearchingAll := TRUE; 590 lngth1 := GenLists.ListLength( NdxF1^.Ndx ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 591 ELSE 592 SearchingAll := FALSE; 593 END; 594 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, '38' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 595 FOR cnt := 1 TO lngth1 DO 596 IF SearchingAll THEN 597 GenLists.GetElmt( NdxF1^.Ndx, cnt, TmpNdxRec, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 598 StrEdit.AssignStr( TmpNdxRec.RecName, TmpStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 599 ELSE 600 GenLists.GetElmt( RecNameList, cnt, TmpStr, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 601 (*Put the cnt'th record name in TmpStr.*) 602 END; 603 IF (M2Strings.Length( TmpStr ) > 0) AND ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 604 (0 # M2Strings.CompareStr( TmpStr, BuildLst.ListStorageRec)) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 605 (* don't export the special record of list names *) 606 NdxUtils.CopyMatchingFields( NdxF1, NdxF2, TmpStr, MatchingFields ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 607 END; 608 END; 609 END ExportToNdxFile; ***** ^ not supported yet 610 611 CONST 612 FillThisField = 613 'Your selection requires completion of this field. Press any key.'; ***** ^ not supported yet 614 VAR 615 fname, ListName, TmpStr1, TmpStr2, message: ARRAY [0..79] ***** ^ not supported yet 616 OF CHAR; ***** ^ not supported yet 617 MatchingFieldList, RecNameList: GenLists.GenList; ***** ^ not supported yet 618 DestNdxFile: NdxTypes.NdxFileType; ***** ^ not supported yet 619 done: BOOLEAN; 620 SavedMessage: CARDINAL; 621 TmpFieldRec: ScrnTypes.InputFieldRecord; ***** ^ not supported yet 622 ErrField, ExpFile, KeyHit: CARDINAL; 623 624 PROCEDURE AllFieldsCorrect( TheFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 625 ReqFieldName: ARRAY OF CHAR; VAR BadFieldNum: CARDINAL; ***** ^ not supported yet 626 VAR message, DestFileName: ARRAY OF CHAR; ListFieldName: ***** ^ not supported yet 627 ARRAY OF CHAR; VAR RecNameList: GenLists.GenList ): BOOLEAN; ***** ^ not supported yet ***** ^ not supported yet 628 VAR 629 ListName: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 630 dumbool : BOOLEAN; 631 BEGIN 632 IF ScrnUtl1.FieldIsBlank( TheFrame, ReqFieldName, BadFieldNum ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 633 StrEdit.AssignStr( FillThisField, message ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 634 done := FALSE; 635 ELSE 636 ControlUtils.ReadInput( TheFrame, DestFileName, ReqFieldName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 637 StrEdit.DeleteChar( ' ', DestFileName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 638 IF ScrnUtl1.FieldIsBlank( TheFrame, ListFieldName, BadFieldNum ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 639 StrEdit.AssignStr( FillThisField, message ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 640 GenLists.NewList( RecNameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 641 BadFieldNum := 0; 642 done := TRUE; 643 ELSE 644 ControlUtils.ReadInput( TheFrame, ListName, ListFieldName); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 645 IF NOT BuildLst.GetRecNameList( NdxFile, ListName, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 646 RecNameList ) THEN ***** ^ not supported yet 647 done := FALSE; 648 StrEdit.AssignStr( "List does not exist. Press any key.", ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 649 message ); ***** ^ not supported yet 650 ELSE 651 BadFieldNum := 0; 652 done := TRUE; 653 END; 654 END; 655 END; 656 RETURN done; 657 END AllFieldsCorrect; ***** ^ not supported yet 658 659 660 661 PROCEDURE ToNdxFile(); 662 VAR 663 TmpList1, TmpList2, TmpList3: GenLists.GenList; ***** ^ not supported yet 664 665 PROCEDURE PairFieldNames( list1, list2: GenLists.GenList; VAR ***** ^ not supported yet 666 outlist: GenLists.GenList); ***** ^ not supported yet 667 VAR 668 lngth1, lngth2, cnt, TypeCode, strndx, spot: CARDINAL; 669 TmpStr1, TmpStr2: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 670 BEGIN 671 lngth1 := GenLists.ListLength( list1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 672 lngth2 := GenLists.ListLength( list2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 673 GenLists.NewList( outlist ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 674 FOR cnt := 1 TO lngth1 DO 675 GenLists.GetElmt( list1, cnt, TmpStr1, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 676 IF TypeCode = GenLists.StrCode THEN ***** ^ not supported yet ***** ^ not supported yet 677 spot := GenLists.ScanList( TmpStr1, list2, 1, lngth2, strndx ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 678 IF (spot > 0) AND (strndx = 0) THEN 679 GenLists.GetElmt( list2, spot, TmpStr2, TypeCode ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 680 StrEdit.Append( TmpStr1, '=' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 681 StrEdit.Append( TmpStr1, TmpStr2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 682 GenLists.ListInsert( TmpStr1, GenLists.StrCode, outlist, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 683 GenLists.ListLength(outlist) + 1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 684 END; 685 END; 686 END; 687 END PairFieldNames; ***** ^ not supported yet 688 689 BEGIN (*ToNdxFile*) 690 done := AllFieldsCorrect( TmpFrame, 'cpyfname', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 691 ErrField, message, fname, 'cpylist', RecNameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 692 StrEdit.CrunchBlanks( fname); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 693 IF done THEN 694 IF PosUtils.Equal( fname, NdxFile^.name) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 695 done := FALSE; 696 message := 'Cannot export from a file to itself'; ***** ^ not supported yet ***** ^ not supported yet 697 ErrField := 8; 698 ELSIF NOT NdxBones.OpenNdxFile( DestNdxFile, fname ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 699 ErrorOpeningFile( StringIO.MissingMessage, 'Not an Index File.', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 700 fname ); ***** ^ not supported yet 701 done := FALSE; 702 ELSE 703 DspFiles.ReadDisplayFrame( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 704 IF NOT (0 # ScrnUtl1.FieldNum( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 705 'oldstruct' )) THEN ***** ^ not supported yet 706 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 707 END; 708 GenLists.CopyList( NdxFile^.StructLst, TmpList1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 709 IF NOT ScrnUtl1.ListToEdField( TmpList1, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 710 TmpFrame, ***** ^ not supported yet 711 TmpFrame^.CurrentField ) THEN ***** ^ not supported yet ***** ^ not supported yet 712 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 713 END; 714 IF NOT (0 # ScrnUtl1.FieldNum( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 715 'newstruct' )) THEN ***** ^ not supported yet 716 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 717 END; 718 GenLists.CopyList( DestNdxFile^.StructLst, TmpList2 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 719 IF NOT ScrnUtl1.ListToEdField( TmpList2, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 720 TmpFrame, ***** ^ not supported yet 721 TmpFrame^.CurrentField ) THEN ***** ^ not supported yet ***** ^ not supported yet 722 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 723 END; 724 IF NOT (0 # ScrnUtl1.FieldNum( TmpFrame, 'matches' )) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 725 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 726 END; 727 PairFieldNames( NdxFile^.StructLst, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 728 DestNdxFile^.StructLst, MatchingFieldList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 729 GenLists.CopyList( MatchingFieldList, TmpList3 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 730 IF NOT ScrnUtl1.ListToEdField( TmpList3, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 731 TmpFrame, TmpFrame^.CurrentField ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 732 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 733 END; 734 GenLists.DisposeList( MatchingFieldList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 735 (*We dispose here because the editor field now 736 has a copy of the list.*) 737 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 738 InputManager.ControlFrame( TmpFrame, 0, '', FALSE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 739 NextFrame ); ***** ^ not supported yet 740 (*Let them edit the lists.*) 741 IF NOT (0 # ScrnUtl1.FieldNum( TmpFrame, 'MATCHES')) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 742 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 743 END; 744 IF NOT ScrnUtl1.ListFromEdField( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 745 TmpFrame^.CurrentField, MatchingFieldList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 746 HALT(); ***** ^ undeclared identifier ***** ^ not supported yet 747 END; 748 (*Now we've gotten the list back from the editor 749 field, presumably changed in some way.*) 750 GenLists.CopyList( MatchingFieldList, TmpList1 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 751 IF PosUtils.Equal( NextFrame, TmpFrame^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 752 ExportToNdxFile( NdxFile, RecNameList, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 753 TmpList1, DestNdxFile ); ***** ^ not supported yet ***** ^ not supported yet 754 NextFrame := '24'; ***** ^ not supported yet ***** ^ not supported yet 755 END; 756 NdxFiles.CloseNdxFile( DestNdxFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 757 END; 758 END; 759 END ToNdxFile; ***** ^ not supported yet 760 761 PROCEDURE ToAscii(); 762 BEGIN 763 IF AllFieldsCorrect( TmpFrame, 'expfname', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 764 ErrField, message, fname, 'explist', RecNameList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 765 IF NotPmiFile( fname) THEN ***** ^ not supported yet ***** ^ not supported yet 766 SavedMessage := HandleIO.CreateFile( ExpFile, fname ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 767 IF SavedMessage = StringIO.NoError THEN ***** ^ not supported yet ***** ^ not supported yet 768 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, '38' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 769 NdxUtils.ExportToFile( NdxFile, RecNameList, ExpFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 770 StringIO.PrintMessage( HandleIO.CloseHandle( ExpFile ) ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 771 NextFrame := '24'; ***** ^ not supported yet ***** ^ not supported yet 772 done := TRUE; 773 ELSE 774 ErrorOpeningFile( SavedMessage, '', fname ); ***** ^ not supported yet ***** ^ not supported yet 775 done := FALSE; 776 END; 777 ELSE 778 ErrorOpeningFile( StringIO.MissingMessage, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 779 'Invalid Reserved PMI File Name', fname ); ***** ^ not supported yet ***** ^ not supported yet 780 done := FALSE; 781 END; 782 END; 783 END ToAscii; ***** ^ not supported yet 784 785 PROCEDURE ToPrinter(); 786 BEGIN 787 done := AllFieldsCorrect( TmpFrame, 'prnlist', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 788 ErrField, message, fname, 'prnlist', RecNameList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 789 IF done THEN 790 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, '38' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 791 NdxUtils.ExportToFile( NdxFile, RecNameList, StringIO.StdPrn ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 792 NextFrame := '37'; ***** ^ not supported yet ***** ^ not supported yet 793 END; 794 END ToPrinter; ***** ^ not supported yet 795 796 797 BEGIN (*ExportRecords*) 798 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 799 NextFrame := '19'; ***** ^ not supported yet ***** ^ not supported yet 800 (*This is the export form; the one with all the lines 801 and blanks for list and file names.*) 802 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 803 done := FALSE; 804 ErrField := 0; 805 StrEdit.AssignStr( '', message ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 806 StrEdit.AssignStr( '', fname ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 807 WHILE NOT done DO 808 InputManager.ControlFrame( TmpFrame, ErrField, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 809 message, FALSE, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet 810 IF PosUtils.Equal( NextFrame, TmpFrame^.parent ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 811 RETURN; 812 END; 813 CASE ScrnUtl1.SelectedChar(TmpFrame) OF ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 814 (*To determine what they want us to do, we have to 815 figure out where the pointer bar was when the 816 screen was submitted.*) 817 'A', 'l', 'f': 818 (*Export records to an ASCII file.*) 819 ToAscii(); ***** ^ not supported yet ***** ^ not supported yet 820 | 'P', 'p': (*Print records.*) 821 ToPrinter(); ***** ^ not supported yet ***** ^ not supported yet 822 | 'N', 'c', 'x': (*Copy records to another Ndx file.*) 823 ToNdxFile(); ***** ^ not supported yet ***** ^ not supported yet 824 END; 825 END; (*WHILE NOT done*) 826 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 827 END ExportRecords; ***** ^ not supported yet 828 829 830 PROCEDURE GetFile( VAR NdxFile: NdxTypes.NdxFileType; ScreenFile: ***** ^ not supported yet 831 ScrnTypes.DisplayFile; VAR NextFrame: ScrnTypes.AFrameName): BOOLEAN; ***** ^ not supported yet ***** ^ not supported yet 832 VAR 833 SavedMessage : CARDINAL; 834 SelectedFile, FileSpec: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 835 FileOpened, dumbool: BOOLEAN; 836 structure: ARRAY [0..511] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 837 pathleng, KeyHit: CARDINAL; 838 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 839 840 PROCEDURE OpenExisting( fname: ARRAY OF CHAR ): BOOLEAN; ***** ^ not supported yet 841 BEGIN 842 IF FileOpened THEN 843 NdxFiles.CloseNdxFile( NdxFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 844 END; 845 IF NOT NdxBones.OpenNdxFile( NdxFile, fname ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 846 ErrorOpeningFile( StringIO.MissingMessage, 'Not an Index File.', ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 847 fname ); ***** ^ not supported yet 848 RETURN FALSE; 849 ELSE 850 WindowPrims.MsgBox( VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 851 'New file selected. Press any key.', ***** ^ not supported yet 852 KbdInput.AnyKeyNum, KeyHit ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 853 NextFrame := '2'; ***** ^ not supported yet 854 (*We do this to guarantee that we fall out at the 855 bottom of the loop.*) 856 RETURN TRUE; 857 END; 858 END OpenExisting; ***** ^ not supported yet 859 860 PROCEDURE TryCreate(); 861 862 BEGIN (* TryCreate *) 863 IF NotPmiFile( FileSpec ) THEN ***** ^ not supported yet ***** ^ not supported yet 864 IF Drectory.ValidFile( FileSpec ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 865 WindowPrims.MsgBox( VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 866 "File not found. Do you want to create it? (Y/N)", ***** ^ not supported yet 867 KbdInput.YorN, KeyHit ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 868 IF KbdInput.CAPkey(KeyHit) = ORD('Y') THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 869 IF FileOpened THEN 870 NdxFiles.CloseNdxFile( NdxFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 871 END; 872 (*For convenience we've stored the file structure in 873 the DataList for frame 6.*) 874 ListUtils.ListToString( TmpFrame^.DataList, structure ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 875 NdxFiles.CreateNdxFile( NdxFile, FileSpec, structure ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 876 WindowPrims.MsgBox( VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 877 'File created. Press any key.', KbdInput.AnyKeyNum, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 878 KeyHit ); ***** ^ not supported yet 879 FileOpened := TRUE; 880 END; 881 ELSE 882 ErrorOpeningFile( StringIO.MissingMessage, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 883 'Invalid File Name', FileSpec ); ***** ^ not supported yet ***** ^ not supported yet 884 END; 885 ELSE 886 ErrorOpeningFile( StringIO.MissingMessage, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 887 'Invalid Reserved PMI File Name', FileSpec ); ***** ^ not supported yet ***** ^ not supported yet 888 END; 889 END TryCreate; ***** ^ not supported yet 890 891 BEGIN 892 (*GetFile*) 893 FileOpened := FALSE; 894 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 895 REPEAT 896 NextFrame := '6'; ***** ^ not supported yet 897 (*File Creation/Selection form; prompts for a file 898 specification*) 899 ControlUtils.ReadShowAndCntrl( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 900 IF NOT PosUtils.Equal( NextFrame, TmpFrame^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 901 (*return if they press the backup key*) 902 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 903 RETURN FileOpened; 904 END; 905 ControlUtils.ReadInput( TmpFrame, FileSpec, 'path'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 906 (*Get the string out of the field named 'path' and put 907 it in the variable FileSpec.*) 908 StrEdit.CutTrailingChars( ' ', FileSpec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 909 pathleng := M2Strings.Length(FileSpec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 910 IF HandleIO.FileExists( FileSpec ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 911 (* open file entered *) 912 FileOpened := OpenExisting( FileSpec ); ***** ^ not supported yet ***** ^ not supported yet 913 ELSIF (pathleng > 0) AND 914 (NOT PosUtils.Present( '*', FileSpec)) AND ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 915 (FileSpec[ pathleng-1] # '\') AND ***** ^ not supported yet ***** ^ not supported yet 916 (FileSpec[ pathleng-1] # ':') THEN ***** ^ not supported yet ***** ^ not supported yet 917 (* try to create file name entered *) 918 TryCreate(); ***** ^ not supported yet ***** ^ not supported yet 919 ELSE 920 (* search for file spec entered *) 921 ScrnUtl2.PushFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 922 (*this saves frame 6*) 923 NextFrame := '7'; ***** ^ not supported yet 924 (*7 is a blank window to hold the file names*) 925 DspFiles.ReadDisplayFrame( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 926 DirManager.ControlDirectory( FileSpec, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 927 TmpFrame, 1, SelectedFile, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 928 (*Loads frame 7 with a list of filenames that match 929 the file specification in FileSpec, and controls 930 scrolling of the pointer bar within the frame until 931 the user selects a file. The 1 means 932 ControlDirectory will list only file NAMES (i.e., 933 will use only one column). We could have it list 934 size, date, and time information by using 2, 3, or 935 4 for the number of columns. *) 936 IF PosUtils.Equal( NextFrame, TmpFrame^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 937 StrEdit.DeleteChar( ' ', SelectedFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 938 IF NOT PosUtils.Present( 'Error:', SelectedFile ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 939 FileOpened := OpenExisting( SelectedFile ); ***** ^ not supported yet ***** ^ not supported yet 940 ScrnUtl2.PopFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 941 (*TmpFrame is now frame 6.*) 942 ELSE 943 (* couldn't search for file, so try to create it *) 944 ScrnUtl2.PopFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 945 (*TmpFrame is now frame 6.*) 946 TryCreate(); ***** ^ not supported yet ***** ^ not supported yet 947 END; 948 ELSE 949 ScrnUtl2.PopFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 950 (*TmpFrame is now frame 6.*) 951 END; 952 END; 953 UNTIL FileOpened; 954 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 955 RETURN FileOpened; 956 END GetFile; ***** ^ not supported yet 957 958 959 PROCEDURE FileManagement( VAR NdxFile: NdxTypes.NdxFileType; VAR NextFrame: ***** ^ not supported yet 960 ScrnTypes.AFrameName; ScreenFile: ScrnTypes.DisplayFile); ***** ^ not supported yet ***** ^ not supported yet 961 962 PROCEDURE CrunchMenu(); 963 VAR 964 TotSize, GbgSize: LONGINT; 965 PctUsed, NumDatRecs, NumGbgRecs: CARDINAL; 966 dumstr: ARRAY [0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 967 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 968 BEGIN 969 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 970 REPEAT 971 NextFrame := '10'; ***** ^ not supported yet ***** ^ not supported yet 972 DspFiles.ReadDisplayFrame( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 973 NdxUtils.SizeInfo( NdxFile, TotSize, GbgSize, PctUsed, NumDatRecs, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 974 NumGbgRecs); ***** ^ not supported yet 975 StrConv.LongIntegerToStr( TotSize, 0, dumstr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 976 ControlUtils.ChangeField( TmpFrame, dumstr, 'size', FALSE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 977 StrConv.LongIntegerToStr( GbgSize, 0, dumstr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 978 ControlUtils.ChangeField( TmpFrame, dumstr, 'save', FALSE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 979 StrConv.CardinalToStr( PctUsed, 0, dumstr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 980 ControlUtils.ChangeField( TmpFrame, dumstr, 'pct', FALSE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 981 StrConv.CardinalToStr( NumDatRecs, 0, dumstr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 982 ControlUtils.ChangeField( TmpFrame, dumstr, 'custs', FALSE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 983 StrConv.CardinalToStr( NumGbgRecs, 0, dumstr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 984 ControlUtils.ChangeField( TmpFrame, dumstr, 'grecs', FALSE ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 985 FramePainter.ShowDisplayFrame( TmpFrame, 0, 0, 0, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 986 InputManager.ControlFrame( TmpFrame, 0, '', FALSE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 987 NextFrame ); ***** ^ not supported yet 988 IF PosUtils.Equal( NextFrame, '12' ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 989 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 990 (*File crunch in progress*) 991 NdxUtils.CrunchNdxFile( NdxFile); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 992 NextFrame := '13'; (*File crunch complete*) ***** ^ not supported yet ***** ^ not supported yet 993 ControlUtils.ReadShowAndCntrl( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 994 END; 995 UNTIL PosUtils.Equal( NextFrame, TmpFrame^.parent ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 996 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 997 END CrunchMenu; ***** ^ not supported yet 998 999 1000 PROCEDURE EditFile(); 1001 VAR 1002 fname: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 1003 ready: BOOLEAN; 1004 SavedMessage: CARDINAL; 1005 KeyHit: CARDINAL; 1006 TheList: GenLists.GenList; ***** ^ not supported yet 1007 ControlRec: VEditor.AnEdControlRec; ***** ^ not supported yet 1008 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 1009 1010 BEGIN 1011 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1012 ScrnUtl2.ReadAndShow( ScreenFile, TmpFrame, '18' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1013 (*This frame prompts for a file name.*) 1014 REPEAT 1015 InputManager.ControlFrame( TmpFrame, 0, '', FALSE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1016 NextFrame ); ***** ^ not supported yet 1017 IF NOT PosUtils.Equal( NextFrame, TmpFrame^.normlnext ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1018 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1019 RETURN; 1020 END; 1021 ControlUtils.ReadInput( TmpFrame, fname, 'fname' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1022 (*Get the file name out of the 'fname' field.*) 1023 IF NotPmiFile( fname) THEN ***** ^ not supported yet ***** ^ not supported yet 1024 GenLists.NewList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1025 SavedMessage := ListUtils.TextFileToList( fname, TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1026 IF SavedMessage = StringIO.NoError THEN ***** ^ not supported yet ***** ^ not supported yet 1027 ready := TRUE; 1028 ELSIF SavedMessage = StringIO.FileNotFound THEN ***** ^ not supported yet ***** ^ not supported yet 1029 WindowPrims.MsgBox( VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1030 "File not found. Do you want to create it? (Y/N)", ***** ^ not supported yet 1031 KbdInput.YorN, KeyHit ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1032 ready := KbdInput.CAPkey(KeyHit) = ORD('Y'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1033 IF ready THEN 1034 GenLists.NewList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1035 END; 1036 ELSE 1037 ErrorOpeningFile( SavedMessage, '', fname ); ***** ^ not supported yet ***** ^ not supported yet 1038 ready := FALSE; 1039 END; 1040 ELSE 1041 ErrorOpeningFile( StringIO.MissingMessage, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1042 'Invalid Reserved PMI File Name', fname ); ***** ^ not supported yet ***** ^ not supported yet 1043 ready := FALSE; 1044 END; 1045 UNTIL ready; 1046 VEditor.InitEdRec( ControlRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1047 VEditor.TheEditor( TheList, ControlRec ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1048 IF ControlRec.ChangeMade THEN ***** ^ not supported yet ***** ^ not supported yet 1049 (*Ask if they want to save the file.*) 1050 WindowPrims.MsgBox( VWindows.SE, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1051 "Do you want to save your changes? (Y/N)", ***** ^ not supported yet 1052 KbdInput.YorN, KeyHit ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1053 ready := KbdInput.CAPkey(KeyHit) = ORD('Y'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1054 IF ready THEN 1055 SavedMessage := ListUtils.TextListToFile( TheList, fname ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1056 END; 1057 END; 1058 GenLists.DisposeList( TheList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1059 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1060 END EditFile; ***** ^ not supported yet 1061 1062 PROCEDURE GetRecDate( NdxFile: NdxTypes.NdxFileType; ***** ^ not supported yet 1063 RecName: ARRAY OF CHAR; VAR Date: CARDINAL ); ***** ^ not supported yet 1064 VAR 1065 TypeCode, day, month, year, hours, minutes, seconds: CARDINAL; 1066 DateStr: ARRAY [0..31] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 1067 BEGIN 1068 Drectory.GetFileDateAndTime( NdxFile^.handle, month, day, year, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1069 hours, minutes, seconds ); ***** ^ not supported yet 1070 Date := ByteFiddler.DateToCardinal( month, day, year ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1071 IF NOT NdxFiles.GetField( NdxFile, RecName, 'DATE', TypeCode, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1072 DateStr ) THEN ***** ^ not supported yet 1073 RETURN; 1074 END; 1075 IF NOT DateFunctions.StrToDate2( DateStr, FALSE, day, month, year ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1076 RETURN; 1077 END; 1078 Date := ByteFiddler.DateToCardinal( month, day, year ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1079 END GetRecDate; ***** ^ not supported yet 1080 1081 PROCEDURE FirstIsOlder( VAR date1, date2: CARDINAL ): BOOLEAN; 1082 BEGIN 1083 RETURN date1 < date2; 1084 END FirstIsOlder; ***** ^ not supported yet 1085 1086 PROCEDURE MergeFile(); 1087 VAR 1088 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 1089 OtherRecName: NdxTypes.RecNameStr; ***** ^ not supported yet 1090 OtherNdxFile: NdxTypes.NdxFileType; ***** ^ not supported yet 1091 AddingRecords, AlwaysUpdate, NeverUpdate, Transferring, 1092 DoSomething: BOOLEAN; 1093 OurDate, TheirDate, cnt: CARDINAL; 1094 FileName: ARRAY [0..63] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 1095 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 1096 1097 BEGIN 1098 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1099 LOOP 1100 NextFrame := 'MergeOpts'; ***** ^ not supported yet ***** ^ not supported yet 1101 ControlUtils.ReadShowAndCntrl( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1102 IF PosUtils.Equal( NextFrame, TmpFrame^.parent ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1103 EXIT; 1104 END; 1105 ControlUtils.ReadInput( TmpFrame, FileName, 'fname' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1106 IF NOT NdxBones.OpenNdxFile( OtherNdxFile, FileName ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1107 EXIT; 1108 END; 1109 1110 AddingRecords := ScrnUtl1.WhichChoiceKey( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1111 ScrnUtl1.FieldNum(TmpFrame, 'add') ) = ORD('y'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1112 Transferring := ScrnUtl1.WhichChoiceKey( TmpFrame, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1113 ScrnUtl1.FieldNum(TmpFrame, 'transf') ) = ORD('y'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1114 CASE CHR(ScrnUtl1.WhichChoiceKey( TmpFrame, ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1115 ScrnUtl1.FieldNum(TmpFrame, 'upd') )) OF ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1116 'A': 1117 AlwaysUpdate := TRUE; 1118 NeverUpdate := FALSE; 1119 | 'O': 1120 AlwaysUpdate := FALSE; 1121 NeverUpdate := FALSE; 1122 | 'N': 1123 AlwaysUpdate := FALSE; 1124 NeverUpdate := TRUE; 1125 END; 1126 1127 cnt := 1; 1128 1129 WHILE NdxUtils.GetRecName( OtherNdxFile, cnt, OtherRecName ) DO ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1130 IF NdxFiles.RecordExists( NdxFile, OtherRecName ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1131 IF AlwaysUpdate THEN 1132 DoSomething := TRUE; 1133 ELSIF NeverUpdate THEN 1134 DoSomething := FALSE; 1135 ELSE 1136 GetRecDate( NdxFile, OtherRecName, OurDate ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1137 GetRecDate( OtherNdxFile, OtherRecName, TheirDate ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1138 IF FirstIsOlder( OurDate, TheirDate ) THEN ***** ^ not supported yet ***** ^ not supported yet 1139 DoSomething := TRUE; 1140 ELSE 1141 DoSomething := FALSE; 1142 END; 1143 END; 1144 ELSE 1145 DoSomething := AddingRecords; 1146 END; 1147 1148 IF DoSomething THEN 1149 IF Transferring THEN 1150 IF NOT NdxUtils.TransferRecord( ***** ^ not supported yet ***** ^ not supported yet 1151 OtherRecName, OtherNdxFile, NdxFile ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1152 ErrorManager.WARN( OtherRecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1153 END; 1154 ELSE 1155 IF NOT NdxUtils.CopyRecord( ***** ^ not supported yet ***** ^ not supported yet 1156 OtherRecName, OtherNdxFile, NdxFile ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1157 ErrorManager.WARN( OtherRecName ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1158 END; 1159 END; 1160 END; 1161 1162 INC( cnt ); ***** ^ undeclared identifier ***** ^ not supported yet 1163 END; 1164 NdxFiles.CloseNdxFile( OtherNdxFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1165 END; 1166 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1167 END MergeFile; ***** ^ not supported yet 1168 1169 1170 VAR 1171 NdxFile2 : NdxTypes.NdxFileType; ***** ^ not supported yet 1172 TmpFrame: ScrnTypes.DisplayFrame; ***** ^ not supported yet 1173 1174 BEGIN (* FileManagement *) 1175 ScrnTypes.InitDisplayFrame( TmpFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1176 LOOP 1177 NextFrame := '9'; ***** ^ not supported yet 1178 ControlUtils.ReadShowAndCntrl( ScreenFile, TmpFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1179 IF PosUtils.Equal( NextFrame, TmpFrame^.parent ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1180 EXIT; 1181 END; 1182 CASE ScrnUtl1.SelectedChar(TmpFrame) OF ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1183 'C': (*Create or select a new file.*) 1184 IF GetFile( NdxFile2, ScreenFile, NextFrame) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1185 NdxFiles.CloseNdxFile( NdxFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1186 NdxFile := NdxFile2; ***** ^ not supported yet ***** ^ not supported yet 1187 END; 1188 (*TmpFrame will be 6 at this point; NextFrame will be 9.*) 1189 |'s': (*Manage space usage in this file.*) 1190 CrunchMenu(); ***** ^ not supported yet ***** ^ not supported yet 1191 |'M': (*Merge another file*) 1192 MergeFile(); ***** ^ not supported yet ***** ^ not supported yet 1193 |'E': (*Edit a file.*) 1194 EditFile(); ***** ^ not supported yet ***** ^ not supported yet 1195 ELSE 1196 END; 1197 END; 1198 ScrnUtl2.CloseDisplayFrame( TmpFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1199 END FileManagement; ***** ^ not supported yet 1200 1201 1202 PROCEDURE RestoreDisplay(); 1203 BEGIN 1204 SmartScreen.SetAttribOrColor( SmartScreen.lightgrey, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1205 SmartScreen.black, SmartScreen.plain ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1206 SmartScreen.ClearPart( 1, 1, SmartScreen.MaxCol, SmartScreen.MaxRow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1207 SmartScreen.SetCursorHeight( SavedCursorHeight ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1208 END RestoreDisplay; ***** ^ not supported yet 1209 1210 1211 PROCEDURE CloseFiles(); 1212 BEGIN 1213 DspFiles.CloseDisplayFile(ScreenFile); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1214 NdxFiles.CloseNdxFile( NdxFile ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1215 END CloseFiles; ***** ^ not supported yet 1216 1217 VAR 1218 NextFrame: ScrnTypes.AFrameName; ***** ^ not supported yet 1219 1220 BEGIN (*Main*) 1221 SavedCursorHeight := WindowPrims.GetCursorHeight(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1222 SmartScreen.SetCursorHeight( 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1223 ErrorManager.AddTermProc( RestoreDisplay ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1224 IF NOT DspFiles.OpenDisplayFile( ScreenFile, "pmidbms.dsp") THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1225 ErrorManager.WARN( "Could not find PMIDBMS.DSP" ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1226 HALT; ***** ^ undeclared identifier 1227 END; 1228 StrEdit.AssignStr( 'pmidbms.ndx', NdxFileName); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1229 GenLists.DiagMode := FALSE; ***** ^ not supported yet ***** ^ not supported yet 1230 IF NOT (NdxBones.OpenNdxFile( NdxFile, NdxFileName) OR ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1231 GetFile( NdxFile, ScreenFile, NextFrame)) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1232 ControlUtils.InputConst( DspFiles.MainFrame, '8' ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1233 (* Tell them we can't proceed without an Ndx file *) 1234 DspFiles.CloseDisplayFile( ScreenFile); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1235 RETURN; ***** ^ bad RETURN 1236 END; 1237 ScrnTypes.InitDisplayFrame( EntryFrame, VWindows.CurrentWindow ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1238 ErrorManager.AddTermProc( CloseFiles ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1239 LOOP 1240 NextFrame := '2'; ***** ^ not supported yet 1241 ControlUtils.Input( DspFiles.MainFrame, NextFrame ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1242 (*the top menu*) 1243 IF PosUtils.Equal( NextFrame, ScrnTypes.ProgramExit ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1244 EXIT; 1245 END; 1246 CASE ScrnUtl1.SelectedChar( DspFiles.MainFrame ) OF ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1247 'P': (*Process a record*) 1248 ProcessRecord(); ***** ^ not supported yet ***** ^ not supported yet 1249 | 'U': (*Search*) 1250 ManageLists(); ***** ^ not supported yet ***** ^ not supported yet 1251 | 'E': (*Export*) 1252 ExportRecords( NdxFile, NextFrame, ScreenFile); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1253 | 'M': (*File Info & Management*) 1254 FileManagement( NdxFile, NextFrame, ScreenFile); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1255 ELSE 1256 END; 1257 END; 1258 END PMIdbms. 1899 errors