9,14 → 9,6 |
(* - "OIDplus for DOS" program *) |
(************************************************) |
|
(* IMPORTANT: *) |
(* When you compile this code with Turbo Pascal 7.01, *) |
(* it won't run on fast PCs (Runtime Error 200). *) |
(* The built EXE file needs to be patched. *) |
(* The program "PatchCRT" by Kennedy Software *) |
(* WON'T work because it somehow breaks our "_Pause" function. *) |
(* Instead, use the tool "TPPATCH" by Andreas Bauer. *) |
|
uses |
Dos, Crt, StrList, VtsFuncs, VtsCui, OidFile, OidUtils; |
|
101,9 → 93,21 |
end; |
|
function AsnAlreadyExisting(oid: POID; asnid: string): boolean; |
var |
sTmp: string; |
i: integer; |
begin |
AsnAlreadyExisting := ListContains(oid^.AsnIds, asnid); |
for i := 0 to ListCount(oid^.AsnIds)-1 do |
begin |
sTmp := ListGetElement(oid^.AsnIds, i); |
if sTmp = asnid then |
begin |
AsnAlreadyExisting := true; |
exit; |
end; |
end; |
AsnAlreadyExisting := false; |
end; |
|
function AsnEditor(oid: POID): boolean; |
var |
688,6 → 692,7 |
else |
begin |
ShowMessage('File ' + filename + ' not found', 'ERROR', true); |
(* TODO: With PatchCRT, there will be an infinite loop here *) |
_Pause; |
end; |
end; |
749,11 → 754,9 |
procedure OP_ReturnToMSDOS; |
begin |
ClrScr; |
WriteLn('Thank you for using OIDplus for DOS.'); |
WRiteLn(''); |
end; |
|
function _GetTreeViewLine(oid: POID; indent: integer): string; |
function _GetExportLine(oid: POID; indent: integer): string; |
var |
i: integer; |
sTmp: string; |
780,7 → 783,7 |
begin |
sTmp := Copy(sTmp, 1, TREEVIEW_WIDTH-3) + '...'; |
end; |
_GetTreeViewLine := sTmp; |
_GetExportLine := sTmp; |
end; |
|
procedure _RecTreeExport(oid: POID; var F: Text; indent: integer); |
790,7 → 793,7 |
suboid: POID; |
childFilename: string; |
begin |
sTmp := _GetTreeViewLine(oid, indent); |
sTmp := _GetExportLine(oid, indent); |
sTmp := TrimLineToWidth(sTmp, TREEVIEW_WIDTH); |
WriteLn(F, sTmp); |
|