Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 746 → Rev 745

/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, Drivers, StrList, VtsFuncs, VtsCui, OidFile, OidUtils;
Dos, Crt, StrList, VtsFuncs, VtsCui, OidFile, OidUtils;
 
const
VERSIONINFO = 'Revision: 2022-02-15';
40,11 → 40,14
TREEVIEW_FILENAME = 'OIDTREE.TXT';
 
procedure _Pause;
var
bakX, bakY: integer;
begin
bakX := WhereX;
bakY := WhereY;
DrawStatusBar('Press any key to continue');
CursorOn;
GoToXY(bakX, bakY);
ReadKey;
CursorOff;
DrawStatusBar(DEFAULT_STATUSBAR);
end;
 
166,7 → 169,6
begin
(* "NEW" item was selected *)
sInput := '';
CursorOn;
repeat
if QueryVal(sInput,
SINGLE_LINE_BOX_PADDING_INNER,
195,7 → 197,6
end
else break;
until false;
CursorOff;
end
else if res = menuIdSave then
begin
213,7 → 214,6
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,7 → 248,6
end
else break;
until false;
CursorOff;
end;
until false;
end;
261,7 → 260,6
 
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,
273,7 → 271,6
oid^.description := sInput;
DescEditor := true; (* request caller to save <oid> *)
end;
CursorOff;
end;
 
function NextPossibleFileID: string;
333,7 → 330,6
NumIdEditor := false;
sInput := '';
 
CursorOn;
repeat
if QueryVal(sInput,
SINGLE_LINE_BOX_PADDING_INNER,
371,15 → 367,14
else
oid^.DotNotation := parentOID^.DotNotation + '.' + sInput;
NumIdEditor := true; (* request caller to save <oid> *)
Break;
Exit;
end;
end
else
begin
Break;
Exit;
end;
until false;
CursorOff;
end;
 
function NewOidEditor(oid: POID): boolean;
474,9 → 469,7
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. *)
816,8 → 809,6
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;
991,8 → 982,5
end;
 
begin
InitVideo; (* sets ScreenWidth and ScreenHeight *)
CursorOff;
OP_MainMenu;
DoneVideo;
end.
/trunk_dos/VTSCUI.PAS
15,10 → 15,8
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;
 
34,8 → 32,6
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
 
186,7 → 182,6
begin
Write(' ');
end;
GoToXY(1,1);
 
TextBackground(Black);
TextColor(White);
193,12 → 188,7
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 *)
216,18 → 206,11
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;
581,18 → 564,4
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.