X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Foutput%2Fascii.c;h=d7ec317d706d39cefc384679bab69c86d9ae998a;hb=3d183ce2adfc32a104c91baa3ab5909d6f7afaa1;hp=636d9ecc4fc822ed949f35ddbcce291a2a686e65;hpb=d6cbbc8d634fa91f050661355139a4e4697e99ab;p=pspp diff --git a/src/output/ascii.c b/src/output/ascii.c index 636d9ecc4f..d7ec317d70 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -127,7 +127,15 @@ static const ucs4_t unicode_box_chars[N_BOX] = static inline int make_box_index (int left, int right, int top, int bottom) { - return ((right * RENDER_N_LINES + bottom) * RENDER_N_LINES + left) * RENDER_N_LINES + top; + int start_side = left; + int end_side = right; + if (render_direction_rtl ()) + { + start_side = right; + end_side = left; + } + + return ((end_side * RENDER_N_LINES + bottom) * RENDER_N_LINES + start_side) * RENDER_N_LINES + top; } /* How to emphasize text. */ @@ -449,7 +457,7 @@ ascii_output_table_item (struct ascii_driver *a, used = render_pager_draw_next (p, a->length - a->y); if (used == 0) { - assert (a->y > 0); + assert (a->y >= 0); ascii_close_page (a); if (!ascii_open_page (a)) break; @@ -492,7 +500,7 @@ ascii_submit (struct output_driver *driver, file_name = xr_draw_png_chart (chart_item, a->chart_file_name, a->chart_cnt++, - &a->fg, + &a->fg, &a->bg); if (file_name != NULL) {