diff --git a/delphi/KPANSI.PAS b/delphi/KPANSI.PAS index 522f0f7..528b0d1 100644 --- a/delphi/KPANSI.PAS +++ b/delphi/KPANSI.PAS @@ -150,6 +150,8 @@ type procedure Write(const S: string); procedure WriteDeferred(const S: string); procedure WriteDeferredBuf(Buf: PChar; Len: Integer); + property CellWidth: Integer read FCellWidth; + property CellHeight: Integer read FCellHeight; property CursorCol: Integer read FCursorCol; property CursorRow: Integer read FCursorRow; published @@ -316,8 +318,6 @@ var Line: PTermLine; begin inherited Create(AOwner); - Width := 660; - Height := 450; Color := clBlack; TabStop := True; FCols := 80; diff --git a/delphi/TESTMAIN.PAS b/delphi/TESTMAIN.PAS index 0ba4778..fabcf84 100644 --- a/delphi/TESTMAIN.PAS +++ b/delphi/TESTMAIN.PAS @@ -87,8 +87,6 @@ begin inherited CreateNew(AOwner); Caption := 'KPComm ANSI Terminal'; - Width := 780; - Height := 560; BorderStyle := bsSingle; { Serial component } @@ -153,6 +151,10 @@ begin FAnsi.Top := 38; FAnsi.OnKeyData := AnsiKeyData; + { Size form to fit terminal + toolbar } + ClientWidth := FAnsi.Width; + ClientHeight := FAnsi.Top + FAnsi.Height; + { Font diagnostic: write known CP437 box-drawing characters. } { If the OEM font is working, you should see: } { Line 1: single-line box top +---+ } diff --git a/drv/commdrv.c b/drv/commdrv.c index cd97e1f..4444970 100644 --- a/drv/commdrv.c +++ b/drv/commdrv.c @@ -1252,7 +1252,7 @@ int16_t FAR PASCAL _export reccom(int16_t commId, void FAR *buf, int16_t len) { PortStateT *port; uint8_t FAR *dst; - int16_t bytesRead; + uint16_t bytesRead; dbgInt16("KPCOMM: reccom Id", commId);