From b0fa314dfc8d7a84a5bd664366a787a6a73164b8 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Tue, 10 Sep 2019 15:31:22 -0300 Subject: [PATCH] Fixing oversize. --- src/core/sf.c | 7 ++++++- src/include/screenc.h | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/sf.c b/src/core/sf.c index 15c17ec..54dca61 100644 --- a/src/core/sf.c +++ b/src/core/sf.c @@ -793,6 +793,7 @@ static void do_qr_usable_area(H3270 *hSession) SET16(hSession->output.ptr, hSession->max.cols); /* usable width */ SET16(hSession->output.ptr, hSession->max.rows); /* usable height */ *hSession->output.ptr++ = 0x01; /* units (mm) */ + num = display_widthMM(); denom = display_width(); while (!(num %2) && !(denom % 2)) @@ -802,6 +803,7 @@ static void do_qr_usable_area(H3270 *hSession) } SET16(hSession->output.ptr, (int)num); /* Xr numerator */ SET16(hSession->output.ptr, (int)denom); /* Xr denominator */ + num = display_heightMM(); denom = display_height(); while (!(num %2) && !(denom % 2)) @@ -809,11 +811,14 @@ static void do_qr_usable_area(H3270 *hSession) num /= 2; denom /= 2; } + SET16(hSession->output.ptr, (int)num); /* Yr numerator */ SET16(hSession->output.ptr, (int)denom); /* Yr denominator */ + *hSession->output.ptr++ = *char_width; /* AW */ *hSession->output.ptr++ = *char_height; /* AH */ - SET16(hSession->output.ptr, hSession->max.cols * hSession->max.cols); /* buffer, questionable */ + + SET16(hSession->output.ptr, hSession->max.cols * hSession->max.rows); /* buffer, questionable */ } diff --git a/src/include/screenc.h b/src/include/screenc.h index 7fc2748..cf59dae 100644 --- a/src/include/screenc.h +++ b/src/include/screenc.h @@ -41,7 +41,6 @@ #define display_width() 1 LIB3270_INTERNAL int screen_init(H3270 *session); -// LIB3270_INTERNAL Boolean screen_new_display_charsets(char *cslist, char *csname); LIB3270_INTERNAL void mcursor_set(H3270 *session,LIB3270_POINTER m); #define mcursor_locked(x) mcursor_set(x,LIB3270_POINTER_LOCKED) -- libgit2 0.21.2