Subversion Repositories oidplus

Rev

Rev 739 | Rev 741 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 739 Rev 740
Line 13... Line 13...
13
  Dos, Crt, StrList, VtsFuncs, VtsCui, OidFile, OidUtils;
13
  Dos, Crt, StrList, VtsFuncs, VtsCui, OidFile, OidUtils;
14
 
14
 
15
const
15
const
16
  VERSIONINFO            = 'Revision: 2022-02-14';
16
  VERSIONINFO            = 'Revision: 2022-02-14';
17
  DEFAULT_STATUSBAR      = '(C)2020-2022 ViaThinkSoft. Licensed under the terms of the Apache 2.0 license.';
17
  DEFAULT_STATUSBAR      = '(C)2020-2022 ViaThinkSoft. Licensed under the terms of the Apache 2.0 license.';
-
 
18
  TITLEBAR_LEFT_TEXT     = 'OIDplus';
18
  DISKIO_SOUND_DEBUGGING = false;
19
  DISKIO_SOUND_DEBUGGING = false;
19
  DISKIO_SOUND_DELAY     = 500;
20
  DISKIO_SOUND_DELAY     = 500;
20
  ASNEDIT_LINES          = 10;
21
  ASNEDIT_LINES          = 10;
21
  DESCEDIT_LINES         = 10;
22
  DESCEDIT_LINES         = 10;
22
  DESCEDIT_PADDING       = 3;
23
  DESCEDIT_PADDING       = 3;
23
  ACTIONMENU_SIZE        = 5;
24
  ACTIONMENU_SIZE        = 5;
24
  MAINMENU_WIDTH         = 15;
25
  MAINMENU_WIDTH         = 15;
25
  MAINMENU_HEIGHT        = 3;
26
  MAINMENU_HEIGHT        = 3;
26
  MAINMENU_ALLOW_ESC     = false;
27
  MAINMENU_ALLOW_ESC     = false;
-
 
28
  TREEVIEW_INDENT        = 0;
-
 
29
  TREEVIEW_INCLUDE_DESC  = true;
27
  TITLEBAR_LEFT_TEXT     = 'OIDplus';
30
  TREEVIEW_WIDTH         = 80;
28
 
31
 
29
procedure _WriteOidFile(filename: string; oid: POid);
32
procedure _WriteOidFile(filename: string; oid: POid);
30
begin
33
begin
31
  DrawStatusBar('Write file ' + filename + '...');
34
  DrawStatusBar('Write file ' + filename + '...');
32
  WriteOidFile(filename, oid);
35
  WriteOidFile(filename, oid);
Line 68... Line 71...
68
  GoToXY(bakX, bakY);
71
  GoToXY(bakX, bakY);
69
  ReadKey;
72
  ReadKey;
70
  DrawStatusBar(DEFAULT_STATUSBAR);
73
  DrawStatusBar(DEFAULT_STATUSBAR);
71
end;
74
end;
72
 
75
 
73
function _ShowASNIds(subfile: string): string;
76
function _ShowASNIds(childOID: POID): string;
74
var
77
var
75
  childOID: POID;
-
 
76
  j, jmax: integer;
78
  j, jmax: integer;
77
  sTmp: string;
79
  sTmp: string;
78
begin
80
begin
79
  sTmp := '';
81
  sTmp := '';
80
  CreateOidDef(childOID);
-
 
81
  _ReadOidFile(subfile, childOID);
-
 
82
  jmax := ListCount(childOID^.ASNIds)-1;
82
  jmax := ListCount(childOID^.ASNIds)-1;
83
  for j := 0 to jmax do
83
  for j := 0 to jmax do
84
  begin
84
  begin
85
    if j = 0 then sTmp := sTmp + ' (';
85
    if j = 0 then sTmp := sTmp + ' (';
86
    sTmp := sTmp + ListGetElement(childOID^.ASNIds, j);
86
    sTmp := sTmp + ListGetElement(childOID^.ASNIds, j);
87
    if j = jmax then
87
    if j = jmax then
88
      sTmp := sTmp + ')'
88
      sTmp := sTmp + ')'
89
    else
89
    else
90
      sTmp := sTmp + ', ';
90
      sTmp := sTmp + ', ';
91
  end;
91
  end;
92
  FreeOidDef(childOID);
-
 
93
  _ShowASNIds := sTmp;
92
  _ShowASNIds := sTmp;
94
end;
93
end;
95
 
94
 
96
function AsnAlreadyExisting(oid: POID; asnid: string): boolean;
95
function AsnAlreadyExisting(oid: POID; asnid: string): boolean;
97
var
96
var
Line 254... Line 253...
254
              DESCEDIT_LINES,
253
              DESCEDIT_LINES,
255
              'EDIT DESCRIPTION',
254
              'EDIT DESCRIPTION',
256
              2) then
255
              2) then
257
  begin
256
  begin
258
    oid^.description := sInput;
257
    oid^.description := sInput;
259
    DescEditor := true; (* request caller to save @oid *)
258
    DescEditor := true; (* request caller to save <oid> *)
260
  end;
259
  end;
261
end;
260
end;
262
 
261
 
263
function NextPossibleFileID: string;
262
function NextPossibleFileID: string;
264
var
263
var
Line 351... Line 350...
351
      begin
350
      begin
352
        if parentOID^.DotNotation = '' then
351
        if parentOID^.DotNotation = '' then
353
          oid^.DotNotation := sInput
352
          oid^.DotNotation := sInput
354
        else
353
        else
355
          oid^.DotNotation := parentOID^.DotNotation + '.' + sInput;
354
          oid^.DotNotation := parentOID^.DotNotation + '.' + sInput;
356
        NumIdEditor := true; (* request caller to save @oid *)
355
        NumIdEditor := true; (* request caller to save <oid> *)
357
        Exit;
356
        Exit;
358
      end;
357
      end;
359
    end
358
    end
360
    else
359
    else
361
    begin
360
    begin
Line 381... Line 380...
381
    newfilename := newOID^.FileId + '.OID';
380
    newfilename := newOID^.FileId + '.OID';
382
    _WriteOidFile(newfilename, newOID);
381
    _WriteOidFile(newfilename, newOID);
383
 
382
 
384
    (* Add link to original file and enable the saving of it *)
383
    (* Add link to original file and enable the saving of it *)
385
    ListAppend(oid^.SubIds, newOID^.FileId + newOID^.DotNotation);
384
    ListAppend(oid^.SubIds, newOID^.FileId + newOID^.DotNotation);
386
    NewOidEditor := true; (* request caller to save @oid *)
385
    NewOidEditor := true; (* request caller to save <oid> *)
387
  end;
386
  end;
388
  FreeOidDef(newOID);
387
  FreeOidDef(newOID);
389
end;
388
end;
390
 
389
 
391
procedure DeleteChildrenRecursive(oid: POID);
390
procedure DeleteChildrenRecursive(oid: POID);
Line 395... Line 394...
395
  filenameChild: string;
394
  filenameChild: string;
396
begin
395
begin
397
  for i := 0 to ListCount(oid^.SubIds)-1 do
396
  for i := 0 to ListCount(oid^.SubIds)-1 do
398
  begin
397
  begin
399
    filenameChild := FileIdPart(ListGetElement(oid^.SubIds, i)) + '.OID';
398
    filenameChild := FileIdPart(ListGetElement(oid^.SubIds, i)) + '.OID';
-
 
399
    if FileExists(filenameChild) then
-
 
400
    begin
400
    CreateOidDef(childOID);
401
      CreateOidDef(childOID);
401
    _ReadOidFile(filenameChild, childOID);
402
      _ReadOidFile(filenameChild, childOID);
402
    DeleteChildrenRecursive(childOID);
403
      DeleteChildrenRecursive(childOID);
403
    FreeOidDef(childOID);
404
      FreeOidDef(childOID);
404
    DeleteFile(filenameChild);
405
      DeleteFile(filenameChild);
405
  end;
406
    end;
-
 
407
  end;
406
  ListClear(oid^.SubIds);
408
  ListClear(oid^.SubIds);
407
end;
409
end;
408
 
410
 
409
procedure DeleteOidRecursive(selfOID: POID);
411
procedure DeleteOidRecursive(selfOID: POID);
410
var
412
var
Line 415... Line 417...
415
  (* Remove all children and their files recursively *)
417
  (* Remove all children and their files recursively *)
416
  DeleteChildrenRecursive(selfOID);
418
  DeleteChildrenRecursive(selfOID);
417
 
419
 
418
  (* Remove forward reference in parent OID *)
420
  (* Remove forward reference in parent OID *)
419
  filenameParent := FileIdPart(selfOID^.Parent) + '.OID';
421
  filenameParent := FileIdPart(selfOID^.Parent) + '.OID';
-
 
422
  if FileExists(filenameParent) then
-
 
423
  begin
420
  CreateOidDef(parentOID);
424
    CreateOidDef(parentOID);
421
  _ReadOidFile(filenameParent, parentOID);
425
    _ReadOidFile(filenameParent, parentOID);
422
  if ListDeleteElementByValue(parentOID^.SubIds, selfOID^.FileId + selfOID^.DotNotation) then
426
    if ListDeleteElementByValue(parentOID^.SubIds, selfOID^.FileId + selfOID^.DotNotation) then
423
  begin
427
    begin
424
    _WriteOidFile(filenameParent, parentOID);
428
      _WriteOidFile(filenameParent, parentOID);
425
  end;
429
    end;
426
  FreeOidDef(parentOID);
430
    FreeOidDef(parentOID);
-
 
431
  end;
427
 
432
 
428
  (* Delete own file *)
433
  (* Delete own file *)
429
  filenameSelf := selfOID^.FileId + '.OID';
434
  filenameSelf := selfOID^.FileId + '.OID';
-
 
435
  if FileExists(filenameSelf) then
-
 
436
  begin
430
  DeleteFile(filenameSelf);
437
    DeleteFile(filenameSelf);
431
end;
438
  end;
-
 
439
end;
432
 
440
 
433
function _DeleteConfirmation: boolean;
441
function _DeleteConfirmation: boolean;
434
var
442
var
435
  sc: Char;
443
  sc: Char;
436
begin
444
begin
Line 468... Line 476...
468
end;
476
end;
469
 
477
 
470
procedure DisplayOIDFile(filename: string);
478
procedure DisplayOIDFile(filename: string);
471
var
479
var
472
  isRoot: boolean;
480
  isRoot: boolean;
473
  oid: POID;
481
  oid, tmpOID: POID;
474
  i, menuX, menuY: integer;
482
  i, menuX, menuY: integer;
475
  linesLeft, linesRequired: integer;
483
  linesLeft, linesRequired: integer;
476
  sTmp, subfile: string;
484
  sTmp, subfile: string;
477
  subsel, subfiles: PStringList;
485
  subsel, subfiles: PStringList;
478
  subselres: integer;
486
  subselres: integer;
479
  exitRequest: boolean;
487
  exitRequest: boolean;
480
  menuIdExit, menuIdAsnEdit, menuIdDescEdit, menuIdAdd, menuIdDelete: integer;
488
  menuIdExit, menuIdAsnEdit, menuIdDescEdit, menuIdAdd, menuIdDelete: integer;
481
begin
489
begin
482
  exitRequest := false;
490
  exitRequest := false;
483
  repeat
491
  repeat
-
 
492
    if not FileExists(filename) then
-
 
493
    begin
-
 
494
      ShowMessage('File ' + filename + ' not found', 'ERROR', true);
-
 
495
      _Pause;
-
 
496
      exit;
-
 
497
    end;
-
 
498
 
484
    CreateOidDef(oid);
499
    CreateOidDef(oid);
485
    _ReadOidFile(filename, oid);
500
    _ReadOidFile(filename, oid);
486
 
501
 
487
    (* Print OID information *)
502
    (* Print OID information *)
488
 
503
 
Line 552... Line 567...
552
 
567
 
553
    if (oid^.Parent <> '') and not isRoot then
568
    if (oid^.Parent <> '') and not isRoot then
554
    begin
569
    begin
555
      sTmp := oid^.Parent;
570
      sTmp := oid^.Parent;
556
      subfile := FileIdPart(sTmp) + '.OID';
571
      subfile := FileIdPart(sTmp) + '.OID';
-
 
572
      if FileExists(subfile) then
-
 
573
      begin
-
 
574
        CreateOidDef(tmpOID);
-
 
575
        _ReadOidFile(subfile, tmpOID);
557
      ListAppend(subsel, 'Go to parent ' + DotNotationPart(sTmp) + _ShowASNIds(subfile));
576
        ListAppend(subsel, 'Go to parent ' + DotNotationPart(sTmp) + _ShowASNIds(tmpOID));
-
 
577
        FreeOidDef(tmpOID);
-
 
578
      end
-
 
579
      else
-
 
580
      begin
-
 
581
        ListAppend(subsel, 'Go to parent ' + DotNotationPart(sTmp) + ' (FILE NOT FOUND)');
-
 
582
      end;
558
      ListAppend(subfiles, subfile);
583
      ListAppend(subfiles, subfile);
559
    end;
584
    end;
560
 
585
 
561
    if isRoot then
586
    if isRoot then
562
    begin
587
    begin
Line 567... Line 592...
567
 
592
 
568
    for i := 0 to ListCount(oid^.SubIds)-1 do
593
    for i := 0 to ListCount(oid^.SubIds)-1 do
569
    begin
594
    begin
570
      sTmp := ListGetElement(oid^.SubIds, i);
595
      sTmp := ListGetElement(oid^.SubIds, i);
571
      subfile := FileIdPart(sTmp) + '.OID';
596
      subfile := FileIdPart(sTmp) + '.OID';
-
 
597
      if FileExists(subfile) then
-
 
598
      begin
-
 
599
        CreateOidDef(tmpOID);
-
 
600
        _ReadOidFile(subfile, tmpOID);
572
      ListAppend(subsel, 'Go to child  ' + DotNotationPart(sTmp) + _ShowASNIds(subfile));
601
        ListAppend(subsel, 'Go to child  ' + DotNotationPart(sTmp) + _ShowASNIds(tmpOID));
-
 
602
        FreeOidDef(tmpOID);
-
 
603
      end
-
 
604
      else
-
 
605
      begin
-
 
606
        ListAppend(subsel, 'Go to child  ' + DotNotationPart(sTmp) + ' (FILE NOT FOUND)');
-
 
607
      end;
573
      ListAppend(subfiles, subfile);
608
      ListAppend(subfiles, subfile);
574
    end;
609
    end;
575
 
610
 
576
    if oid^.DotNotation <> '' then
611
    if oid^.DotNotation <> '' then
577
    begin
612
    begin
Line 626... Line 661...
626
    end
661
    end
627
    else if subselres = menuIdDelete then
662
    else if subselres = menuIdDelete then
628
    begin
663
    begin
629
      if _DeleteConfirmation then
664
      if _DeleteConfirmation then
630
      begin
665
      begin
631
        filename := FileIdPart(oid^.Parent) + '.OID';
666
        sTmp := FileIdPart(oid^.Parent) + '.OID';
632
        DeleteOidRecursive(oid);
667
        DeleteOidRecursive(oid);
-
 
668
        if FileExists(sTmp) then
-
 
669
        begin
-
 
670
          filename := sTmp;
-
 
671
        end
-
 
672
        else
-
 
673
        begin
-
 
674
          ShowMessage('Parent file ' + filename + ' not found', 'ERROR', true);
-
 
675
          _Pause;
-
 
676
          exitRequest := true;
-
 
677
        end;
633
      end;
678
      end;
634
    end
679
    end
635
    else if subselres = menuIdExit then
680
    else if subselres = menuIdExit then
636
    begin
681
    begin
637
      exitRequest := true;
682
      exitRequest := true;
638
    end
683
    end
639
    else
684
    else
640
    begin
685
    begin
641
      (* Normal OID *)
686
      (* Normal OID *)
642
      filename := ListGetElement(subfiles, subselres);
687
      sTmp := ListGetElement(subfiles, subselres);
-
 
688
      if FileExists(sTmp) then
-
 
689
      begin
-
 
690
        filename := sTmp;
-
 
691
      end
-
 
692
      else
-
 
693
      begin
-
 
694
        ShowMessage('File ' + filename + ' not found', 'ERROR', true);
-
 
695
        (* TODO: With PatchCRT, there will be an infinite loop here *)
-
 
696
        _Pause;
-
 
697
      end;
643
    end;
698
    end;
644
    FreeList(subsel);
699
    FreeList(subsel);
645
    FreeList(subfiles);
700
    FreeList(subfiles);
646
 
701
 
647
    FreeOidDef(oid);
702
    FreeOidDef(oid);
Line 664... Line 719...
664
  oid^.Parent      := ZeroPad(0, 8);
719
  oid^.Parent      := ZeroPad(0, 8);
665
  _WriteOidFile(filename, oid);
720
  _WriteOidFile(filename, oid);
666
  FreeOidDef(oid);
721
  FreeOidDef(oid);
667
end;
722
end;
668
 
723
 
669
procedure OP_ManageOIDs;
724
function _GetInitFile: string;
670
var
725
var
671
  initFile: string;
726
  initFile: string;
672
begin
727
begin
673
  ClrScr;
-
 
674
  DrawTitleBar('Manage Object Identifiers', TITLEBAR_LEFT_TEXT, '');
-
 
675
  DrawStatusBar('Loading data... please wait...');
-
 
676
 
-
 
677
  initFile := ZeroPad(0, 8) + '.OID';
728
  initFile := ZeroPad(0, 8) + '.OID';
678
  if not FileExists(initFile) then
729
  if not FileExists(initFile) then
679
  begin
730
  begin
680
    CreateInitOIDFile(initFile);
731
    CreateInitOIDFile(initFile);
681
  end;
732
  end;
-
 
733
  _GetInitFile := initFile;
-
 
734
end;
-
 
735
 
-
 
736
procedure OP_ManageOIDs;
-
 
737
begin
-
 
738
  ClrScr;
-
 
739
  DrawTitleBar('Manage Object Identifiers', TITLEBAR_LEFT_TEXT, '');
-
 
740
  DrawStatusBar('Loading data... please wait...');
-
 
741
 
682
  DisplayOIDFile(initFile);
742
  DisplayOIDFile(_GetInitFile);
683
end;
743
end;
684
 
744
 
685
procedure OP_ManageRAs;
745
procedure OP_ManageRAs;
686
begin
746
begin
687
  ClrScr;
747
  ClrScr;
Line 694... Line 754...
694
procedure OP_ReturnToMSDOS;
754
procedure OP_ReturnToMSDOS;
695
begin
755
begin
696
  ClrScr;
756
  ClrScr;
697
end;
757
end;
698
 
758
 
-
 
759
function _GetExportLine(oid: POID; indent: integer): string;
-
 
760
var
-
 
761
  i: integer;
-
 
762
  sTmp: string;
-
 
763
begin
-
 
764
  (* Build line *)
-
 
765
  sTmp := RepeatStr(' ', indent*TREEVIEW_INDENT);
-
 
766
  if oid^.DotNotation = '' then
-
 
767
    sTmp := sTmp + 'Object Identifiers'
-
 
768
  else
-
 
769
    sTmp := sTmp + oid^.DotNotation;
-
 
770
  sTmp := sTmp + _ShowAsnIds(oid);
-
 
771
  if TREEVIEW_INCLUDE_DESC then
-
 
772
  begin
-
 
773
    if Trim(oid^.Description) <> '' then
-
 
774
    begin
-
 
775
      sTmp := sTmp + ': ' + oid^.Description;
-
 
776
    end;
-
 
777
  end;
-
 
778
  for i := 1 to Length(sTmp) do
-
 
779
  begin
-
 
780
    if (sTmp[i]=#13) or (sTmp[i]=#10) then sTmp[i] := ' ';
-
 
781
  end;
-
 
782
  if Length(sTmp) > TREEVIEW_WIDTH then
-
 
783
  begin
-
 
784
    sTmp := Copy(sTmp, 1, TREEVIEW_WIDTH-3) + '...';
-
 
785
  end;
-
 
786
  _GetExportLine := sTmp;
-
 
787
end;
-
 
788
 
-
 
789
procedure _RecTreeExport(oid: POID; var F: Text; indent: integer);
-
 
790
var
-
 
791
  i: integer;
-
 
792
  sTmp: string;
-
 
793
  suboid: POID;
-
 
794
  childFilename: string;
-
 
795
begin
-
 
796
  sTmp := _GetExportLine(oid, indent);
-
 
797
  sTmp := TrimLineToWidth(sTmp, TREEVIEW_WIDTH);
-
 
798
  WriteLn(F, sTmp);
-
 
799
 
-
 
800
  (* Recursively call children *)
-
 
801
  for i := 0 to ListCount(oid^.SubIds)-1 do
-
 
802
  begin
-
 
803
    sTmp := ListGetElement(oid^.SubIds, i);
-
 
804
    CreateOidDef(suboid);
-
 
805
    childFilename := FileIdPart(sTmp) + '.OID';
-
 
806
    if FileExists(childFilename) then
-
 
807
    begin
-
 
808
      _ReadOidFile(childFilename, suboid);
-
 
809
      _RecTreeExport(suboid, F, indent+1);
-
 
810
      FreeOidDef(suboid);
-
 
811
    end
-
 
812
    else
-
 
813
    begin
-
 
814
      sTmp := 'ERROR: FILE ' + childFilename + ' CONTAINING CHILD OID ' + DotNotationPart(sTmp) + ' WAS NOT FOUND!';
-
 
815
      sTmp := TrimLineToWidth(sTmp, TREEVIEW_WIDTH);
-
 
816
      WriteLn(F, sTmp);
-
 
817
    end;
-
 
818
  end;
-
 
819
end;
-
 
820
 
-
 
821
procedure OP_TreeView;
-
 
822
var
-
 
823
  F: Text;
-
 
824
  rootoid: POID;
-
 
825
begin
-
 
826
  ClrScr;
-
 
827
  DrawTitleBar('TreeView Export', TITLEBAR_LEFT_TEXT, '');
-
 
828
  DrawStatusBar('Exporting data... please wait...');
-
 
829
 
-
 
830
  Assign(F, 'OIDTREE.TXT');
-
 
831
  Rewrite(F);
-
 
832
 
-
 
833
  CreateOidDef(rootoid);
-
 
834
  _ReadOidFile(_GetInitFile, rootoid);
-
 
835
  _RecTreeExport(rootoid, F, 0);
-
 
836
  FreeOidDef(rootoid);
-
 
837
 
-
 
838
  DrawStatusBar(DEFAULT_STATUSBAR);
-
 
839
  ShowMessage('TreeView successfully exported as OIDTREE.TXT', 'TREEVIEW EXPORT', true);
-
 
840
  _Pause;
-
 
841
 
-
 
842
  Close(F);
-
 
843
end;
-
 
844
 
699
procedure OP_MainMenu;
845
procedure OP_MainMenu;
700
var
846
var
701
  menu: PStringList;
847
  menu: PStringList;
702
  menuRes, menuLeft, menuTop: integer;
848
  menuRes, menuLeft, menuTop: integer;
703
  menuIdOID, menuIdRA, menuIdExit: integer;
849
  menuIdOID, menuIdRA, menuIdTree, menuIdExit: integer;
704
begin
850
begin
705
  repeat
851
  repeat
706
    ClrScr;
852
    ClrScr;
707
 
853
 
708
    DrawTitleBar('Welcome to OIDplus for DOS', '', '');
854
    DrawTitleBar('Welcome to OIDplus for DOS', '', '');
Line 712... Line 858...
712
 
858
 
713
    CreateList(menu);
859
    CreateList(menu);
714
 
860
 
715
    menuIdOID  := ListAppend(menu, 'Manage OIDs');
861
    menuIdOID  := ListAppend(menu, 'Manage OIDs');
716
    menuIdRA   := -99; (*ListAppend(menu, 'Manage RAs');*)
862
    menuIdRA   := -99; (*ListAppend(menu, 'Manage RAs');*)
-
 
863
    menuIdTree := ListAppend(menu, 'Export TreeView');
717
    menuIdExit := ListAppend(menu, 'Return to DOS');
864
    menuIdExit := ListAppend(menu, 'Return to DOS');
718
 
865
 
719
    menuLeft := round(ScreenWidth/2 -MAINMENU_WIDTH/2);
866
    menuLeft := round(ScreenWidth/2 -MAINMENU_WIDTH/2);
720
    menuTop  := round(ScreenHeight/2-MAINMENU_HEIGHT/2);
867
    menuTop  := round(ScreenHeight/2-MAINMENU_HEIGHT/2);
721
    menuRes  := DrawSelectionList(menuLeft, menuTop,
868
    menuRes  := DrawSelectionList(menuLeft, menuTop,
Line 728... Line 875...
728
      OP_ManageOIDs;
875
      OP_ManageOIDs;
729
    end
876
    end
730
    else if menuRes = menuIdRA then
877
    else if menuRes = menuIdRA then
731
    begin
878
    begin
732
      OP_ManageRAs;
879
      OP_ManageRAs;
-
 
880
    end
-
 
881
    else if menuRes = menuIdTree then
-
 
882
    begin
-
 
883
      OP_Treeview;
733
    end;
884
    end;
734
  until (menuRes = menuIdExit) or (MAINMENU_ALLOW_ESC and (menuRes = -1));
885
  until (menuRes = menuIdExit) or (MAINMENU_ALLOW_ESC and (menuRes = -1));
735
 
886
 
736
  OP_ReturnToMSDOS;
887
  OP_ReturnToMSDOS;
737
end;
888
end;