|
@@ -666,7 +666,11 @@ Function CrtWrite(var f : textrec) : integer;
|
|
var
|
|
var
|
|
i : longint;
|
|
i : longint;
|
|
s : string;
|
|
s : string;
|
|
|
|
+ OldConsoleOutputCP : Word;
|
|
begin
|
|
begin
|
|
|
|
+ OldConsoleOutputCP:=GetConsoleOutputCP;
|
|
|
|
+ SetConsoleOutputCP(GetACP);
|
|
|
|
+
|
|
GetScreenCursor(CurrX, CurrY);
|
|
GetScreenCursor(CurrX, CurrY);
|
|
s:='';
|
|
s:='';
|
|
for i:=0 to f.bufpos-1 do
|
|
for i:=0 to f.bufpos-1 do
|
|
@@ -675,7 +679,7 @@ begin
|
|
if s<>'' then
|
|
if s<>'' then
|
|
begin
|
|
begin
|
|
WriteStr(s);
|
|
WriteStr(s);
|
|
- s:='';
|
|
|
|
|
|
+ s:='';
|
|
end;
|
|
end;
|
|
WriteChar(f.buffer[i]);
|
|
WriteChar(f.buffer[i]);
|
|
end
|
|
end
|
|
@@ -684,6 +688,8 @@ begin
|
|
if s<>'' then
|
|
if s<>'' then
|
|
WriteStr(s);
|
|
WriteStr(s);
|
|
SetScreenCursor(CurrX, CurrY);
|
|
SetScreenCursor(CurrX, CurrY);
|
|
|
|
+
|
|
|
|
+ SetConsoleOutputCP(OldConsoleOutputCP);
|
|
|
|
|
|
f.bufpos:=0;
|
|
f.bufpos:=0;
|
|
CrtWrite:=0;
|
|
CrtWrite:=0;
|
|
@@ -704,7 +710,11 @@ Function CrtRead(Var F: TextRec): Integer;
|
|
|
|
|
|
var
|
|
var
|
|
ch : Char;
|
|
ch : Char;
|
|
|
|
+ OldConsoleOutputCP : Word;
|
|
Begin
|
|
Begin
|
|
|
|
+ OldConsoleOutputCP:=GetConsoleOutputCP;
|
|
|
|
+ SetConsoleOutputCP(GetACP);
|
|
|
|
+
|
|
GetScreenCursor(CurrX,CurrY);
|
|
GetScreenCursor(CurrX,CurrY);
|
|
f.bufpos:=0;
|
|
f.bufpos:=0;
|
|
f.bufend:=0;
|
|
f.bufend:=0;
|
|
@@ -781,6 +791,9 @@ Begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
until false;
|
|
until false;
|
|
|
|
+
|
|
|
|
+ SetConsoleOutputCP(OldConsoleOutputCP);
|
|
|
|
+
|
|
f.bufpos:=0;
|
|
f.bufpos:=0;
|
|
SetScreenCursor(CurrX, CurrY);
|
|
SetScreenCursor(CurrX, CurrY);
|
|
CrtRead:=0;
|
|
CrtRead:=0;
|