Commit b0fa314dfc8d7a84a5bd664366a787a6a73164b8
1 parent
3923aabb
Exists in
master
and in
3 other branches
Fixing oversize.
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
src/core/sf.c
| ... | ... | @@ -793,6 +793,7 @@ static void do_qr_usable_area(H3270 *hSession) |
| 793 | 793 | SET16(hSession->output.ptr, hSession->max.cols); /* usable width */ |
| 794 | 794 | SET16(hSession->output.ptr, hSession->max.rows); /* usable height */ |
| 795 | 795 | *hSession->output.ptr++ = 0x01; /* units (mm) */ |
| 796 | + | |
| 796 | 797 | num = display_widthMM(); |
| 797 | 798 | denom = display_width(); |
| 798 | 799 | while (!(num %2) && !(denom % 2)) |
| ... | ... | @@ -802,6 +803,7 @@ static void do_qr_usable_area(H3270 *hSession) |
| 802 | 803 | } |
| 803 | 804 | SET16(hSession->output.ptr, (int)num); /* Xr numerator */ |
| 804 | 805 | SET16(hSession->output.ptr, (int)denom); /* Xr denominator */ |
| 806 | + | |
| 805 | 807 | num = display_heightMM(); |
| 806 | 808 | denom = display_height(); |
| 807 | 809 | while (!(num %2) && !(denom % 2)) |
| ... | ... | @@ -809,11 +811,14 @@ static void do_qr_usable_area(H3270 *hSession) |
| 809 | 811 | num /= 2; |
| 810 | 812 | denom /= 2; |
| 811 | 813 | } |
| 814 | + | |
| 812 | 815 | SET16(hSession->output.ptr, (int)num); /* Yr numerator */ |
| 813 | 816 | SET16(hSession->output.ptr, (int)denom); /* Yr denominator */ |
| 817 | + | |
| 814 | 818 | *hSession->output.ptr++ = *char_width; /* AW */ |
| 815 | 819 | *hSession->output.ptr++ = *char_height; /* AH */ |
| 816 | - SET16(hSession->output.ptr, hSession->max.cols * hSession->max.cols); /* buffer, questionable */ | |
| 820 | + | |
| 821 | + SET16(hSession->output.ptr, hSession->max.cols * hSession->max.rows); /* buffer, questionable */ | |
| 817 | 822 | |
| 818 | 823 | } |
| 819 | 824 | ... | ... |
src/include/screenc.h
| ... | ... | @@ -41,7 +41,6 @@ |
| 41 | 41 | #define display_width() 1 |
| 42 | 42 | |
| 43 | 43 | LIB3270_INTERNAL int screen_init(H3270 *session); |
| 44 | -// LIB3270_INTERNAL Boolean screen_new_display_charsets(char *cslist, char *csname); | |
| 45 | 44 | LIB3270_INTERNAL void mcursor_set(H3270 *session,LIB3270_POINTER m); |
| 46 | 45 | |
| 47 | 46 | #define mcursor_locked(x) mcursor_set(x,LIB3270_POINTER_LOCKED) | ... | ... |