Subversion Repositories oidplus

Rev

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

Rev 758 Rev 965
Line 1... Line 1...
1
program OIDPLUS;
1
program OIDPLUS;
2
 
2
 
3
(************************************************)
3
(************************************************)
4
(* OIDPLUS.PAS                                  *)
4
(* OIDPLUS.PAS                                  *)
5
(* Author:   Daniel Marschall                   *)
5
(* Author:   Daniel Marschall                   *)
6
(* Revision: 2022-02-27                         *)
6
(* Revision: 2022-09-26                         *)
7
(* License:  Apache 2.0                         *)
7
(* License:  Apache 2.0                         *)
8
(* This file contains:                          *)
8
(* This file contains:                          *)
9
(* - "OIDplus for DOS" program                  *)
9
(* - "OIDplus for DOS" program                  *)
10
(************************************************)
10
(************************************************)
11
 
11
 
Line 20... Line 20...
20
uses
20
uses
21
  Dos, Crt, Drivers, StrList, VtsFuncs, VtsCui, OidFile, OidUtils,
21
  Dos, Crt, Drivers, StrList, VtsFuncs, VtsCui, OidFile, OidUtils,
22
  Weid;
22
  Weid;
23
 
23
 
24
const
24
const
25
  VERSIONINFO            = 'Revision: 2022-02-27';
25
  VERSIONINFO            = 'Revision: 2022-09-26';
26
  TITLEBAR_LEFT_TEXT     = 'OIDplus';
26
  TITLEBAR_LEFT_TEXT     = 'OIDplus';
27
  DISKIO_SOUND_DEBUGGING = false;
27
  DISKIO_SOUND_DEBUGGING = false;
28
  DISKIO_SOUND_DELAY     = 500;
28
  DISKIO_SOUND_DELAY     = 500;
29
  ASNEDIT_LINES          = 10;
29
  ASNEDIT_LINES          = 10;
30
  DESCEDIT_LINES         = 10;
30
  DESCEDIT_LINES         = 10;
Line 769... Line 769...
769
function WeidNotation(oid: POid): string;
769
function WeidNotation(oid: POid): string;
770
begin
770
begin
771
  WeidNotation := OidToWeid(oid^.DotNotation);
771
  WeidNotation := OidToWeid(oid^.DotNotation);
772
end;
772
end;
773
 
773
 
774
procedure DisplayOIDFile(filename: string);
774
procedure DisplayOIDFile(filename, from: string);
775
var
775
var
776
  isRoot: boolean;
776
  isRoot: boolean;
777
  oid, tmpOID: POID;
777
  oid, tmpOID: POID;
778
  i: integer;
778
  i: integer;
779
  sTmp, subfile: string;
779
  sTmp, subfile: string;
Line 861... Line 861...
861
      end;
861
      end;
862
    end;
862
    end;
863
 
863
 
864
    if isRoot then
864
    if isRoot then
865
    begin
865
    begin
866
      menuIdExit := ListAppend(subsel, 'Back to main menu');
866
      menuIdExit := ListAppend(subsel, 'Back to '+from);
867
      ListAppend(subfiles, '');
867
      ListAppend(subfiles, '');
868
    end
868
    end
869
    else menuIdExit := -99;
869
    else menuIdExit := -99;
870
 
870
 
871
    for i := 0 to ListCount(oid^.SubIds)-1 do
871
    for i := 0 to ListCount(oid^.SubIds)-1 do
Line 1054... Line 1054...
1054
 
1054
 
1055
  (* This will try creating a new root file if it does not exist *)
1055
  (* This will try creating a new root file if it does not exist *)
1056
  rootfile := _GetRootFile(true);
1056
  rootfile := _GetRootFile(true);
1057
  if rootfile = '' then Exit;
1057
  if rootfile = '' then Exit;
1058
 
1058
 
1059
  DisplayOIDFile(rootfile);
1059
  DisplayOIDFile(rootfile, 'main menu');
1060
end;
1060
end;
1061
 
1061
 
1062
procedure OP_ReturnToMSDOS;
1062
procedure OP_ReturnToMSDOS;
1063
begin
1063
begin
1064
  (* Note: These two lines don't seem to be necessary if you use DoneVideo *)
1064
  (* Note: These two lines don't seem to be necessary if you use DoneVideo *)
Line 1170... Line 1170...
1170
        ShowMessage(ListGetElement(visList, res), 'ERROR', true);
1170
        ShowMessage(ListGetElement(visList, res), 'ERROR', true);
1171
        _Pause;
1171
        _Pause;
1172
      end
1172
      end
1173
      else
1173
      else
1174
      begin
1174
      begin
1175
        DisplayOidFile(sTmp + '.OID');
1175
        DisplayOidFile(sTmp + '.OID', 'TreeView Export');
1176
      end;
1176
      end;
1177
    end
1177
    end
1178
    else
1178
    else
1179
    begin
1179
    begin
1180
      break;
1180
      break;