Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 745 → Rev 746

/trunk_dos/OIDPLUS.EXE
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk_dos/OIDPLUS.PAS
18,7 → 18,7
(* Instead, use the tool "TPPATCH" by Andreas Bauer. *)
 
uses
Dos, Crt, StrList, VtsFuncs, VtsCui, OidFile, OidUtils;
Dos, Crt, Drivers, StrList, VtsFuncs, VtsCui, OidFile, OidUtils;
 
const
VERSIONINFO = 'Revision: 2022-02-15';
40,14 → 40,11
TREEVIEW_FILENAME = 'OIDTREE.TXT';
 
procedure _Pause;
var
bakX, bakY: integer;
begin
bakX := WhereX;
bakY := WhereY;
DrawStatusBar('Press any key to continue');
GoToXY(bakX, bakY);
CursorOn;
ReadKey;
CursorOff;
DrawStatusBar(DEFAULT_STATUSBAR);
end;
 
169,6 → 166,7
begin
(* "NEW" item was selected *)
sInput := '';
CursorOn;
repeat
if QueryVal(sInput,
SINGLE_LINE_BOX_PADDING_INNER,
197,6 → 195,7
end
else break;
until false;
CursorOff;
end
else if res = menuIdSave then
begin
214,6 → 213,7
begin
DrawStatusBar('Note: Remove the text to delete the ASN.1 identifier');
sInput := ListGetElement(oid^.ASNIDs, res);
CursorOn;
repeat
if QueryVal(sInput,
SINGLE_LINE_BOX_PADDING_INNER,
248,6 → 248,7
end
else break;
until false;
CursorOff;
end;
until false;
end;
260,6 → 261,7
 
DrawStatusBar('Note: Press Ctrl+Return for a line-break.');
sInput := oid^.description;
CursorOn;
if QueryVal(sInput,
DESCEDIT_PADDING,
ScreenHeight div 2 - DESCEDIT_LINES div 2,
271,6 → 273,7
oid^.description := sInput;
DescEditor := true; (* request caller to save <oid> *)
end;
CursorOff;
end;
 
function NextPossibleFileID: string;
330,6 → 333,7
NumIdEditor := false;
sInput := '';
 
CursorOn;
repeat
if QueryVal(sInput,
SINGLE_LINE_BOX_PADDING_INNER,
367,14 → 371,15
else
oid^.DotNotation := parentOID^.DotNotation + '.' + sInput;
NumIdEditor := true; (* request caller to save <oid> *)
Exit;
Break;
end;
end
else
begin
Exit;
Break;
end;
until false;
CursorOff;
end;
 
function NewOidEditor(oid: POID): boolean;
469,7 → 474,9
ShowMessage('Are you sure you want to delete this OID? (Y/N)', 'DELETE OID', true);
DrawStatusBar('Y=Yes, N=No');
 
CursorOn;
sc := ReadKey;
CursorOff;
if sc = #0 then
begin
(* Extended key. Nothing we care about. *)
809,6 → 816,8
ClrScr;
TextBackground(Black);
TextColor(LightGray);
ClrScr; (*Important, so that the DOS command prompt is also LightGray *)
 
WriteLn('Thank you for using OIDplus for DOS.');
WriteLn('');
end;
982,5 → 991,8
end;
 
begin
InitVideo; (* sets ScreenWidth and ScreenHeight *)
CursorOff;
OP_MainMenu;
DoneVideo;
end.
/trunk_dos/VTSCUI.PAS
15,8 → 15,10
StrList;
 
const
(* These are available in DRIVERS.TPU, but require a call of InitVideo
ScreenWidth = 80;
ScreenHeight = 25;
*)
SINGLE_LINE_BOX_PADDING = 3;
SINGLE_LINE_BOX_PADDING_INNER = 10;
 
32,6 → 34,8
function QueryVal(var s: string; initX, initY, width, height: integer;
Title: string; borderStrength: integer): boolean;
procedure ShowMessage(msg: string; title: string; dobeep: boolean);
procedure CursorOn;
procedure CursorOff;
 
implementation
 
182,6 → 186,7
begin
Write(' ');
end;
GoToXY(1,1);
 
TextBackground(Black);
TextColor(White);
188,7 → 193,12
end;
 
procedure DrawTitleBar(center, left, right: string);
var
bakx, baky: integer;
begin
bakx := WhereX;
baky := WhereY;
 
DrawTextBar(center, 1);
 
(* Put left text into the title bar *)
206,11 → 216,18
WriteLn(right);
TextBackground(Black);
TextColor(White);
 
GoToXY(bakx, baky);
end;
 
procedure DrawStatusBar(str: string);
var
bakx, baky: integer;
begin
bakx := WhereX;
baky := WhereY;
DrawTextBar(str, ScreenHeight);
GoToXY(bakx, baky);
end;
 
function DrawSelectionList(X, Y, ListWidth, ListHeight: integer;
564,4 → 581,18
if DoBeep then Beep;
end;
 
procedure CursorOn; assembler;
asm
mov ah,1 (* Set text-mode cursor shape *)
mov cx,0607h (* normal underline cursor *)
int 10h
end;
 
procedure CursorOff; assembler;
asm
mov ah,1 (* Set text-mode cursor shape *)
mov cx,2607h (* hide cursor (Start>End) *)
int 10h
end;
 
end.