diff --git a/FL/Fl_Terminal.H b/FL/Fl_Terminal.H index 36dbf3673..3b9b39a86 100644 --- a/FL/Fl_Terminal.H +++ b/FL/Fl_Terminal.H @@ -144,7 +144,7 @@ Single character output can be done with: \par - print_char() to print a single ASCII/UTF-8 char at the cursor - - putchar() to put single ASCII/UTF-8 char at an x,y position + - plot_char() to put single ASCII/UTF-8 char at an x,y position \par \subsection Fl_Terminal_Attributes Text Attributes @@ -1017,8 +1017,8 @@ private: void utf8_cache_flush(void); // API: Character display output public: - void putchar(const char *text, int len, int drow, int dcol); - void putchar(char c, int drow, int dcol); + void plot_char(const char *text, int len, int drow, int dcol); + void plot_char(char c, int drow, int dcol); void print_char(const char *text, int len=-1); void print_char(char c); // API: String display output diff --git a/src/Fl_Terminal.cxx b/src/Fl_Terminal.cxx index 52afb4ef8..ad41f31fe 100644 --- a/src/Fl_Terminal.cxx +++ b/src/Fl_Terminal.cxx @@ -1902,10 +1902,10 @@ void Fl_Terminal::clear_sod(void) { for (int drow=0; drow <= cursor_.row(); drow++) if (drow == cursor_.row()) for (int dcol=0; dcol<=cursor_.col(); dcol++) - putchar(' ', drow, dcol); + plot_char(' ', drow, dcol); else for (int dcol=0; dcolu8c->max_utf8() || len!=fl_utf8len(*text)) @@ -3001,7 +3001,7 @@ void Fl_Terminal::putchar(const char *text, int len, int drow, int dcol) { } /** - Print the ASCII character \p c at the terminal's display position \p (drow,dcol). + Plot the ASCII character \p c at the terminal's display position \p (drow,dcol). The character MUST be printable (in range 0x20 - 0x7e), and is displayed using the current text color/attributes. Characters outside that range are either @@ -3018,7 +3018,7 @@ void Fl_Terminal::putchar(const char *text, int len, int drow, int dcol) { \see show_unknown(bool), handle_unknown_char(), is_printable() */ -void Fl_Terminal::putchar(char c, int drow, int dcol) { +void Fl_Terminal::plot_char(char c, int drow, int dcol) { if (!is_printable(c)) { handle_unknown_char(); return; } Utf8Char *u8c = u8c_disp_row(drow) + dcol; u8c->text_ascii(c, *current_style_); @@ -3053,7 +3053,7 @@ void Fl_Terminal::print_char(const char *text, int len/*=-1*/) { } else if (escseq.parse_in_progress()) { // ESC sequence in progress? handle_escseq(*text); } else { // Handle printable char.. - putchar(text, len, cursor_row(), cursor_col()); + plot_char(text, len, cursor_row(), cursor_col()); cursor_right(1, do_scroll); } } @@ -3074,7 +3074,7 @@ void Fl_Terminal::print_char(char c) { } else if (escseq.parse_in_progress()) { // ESC sequence in progress? handle_escseq(c); } else { // Handle printable char.. - putchar(c, cursor_row(), cursor_col()); + plot_char(c, cursor_row(), cursor_col()); cursor_right(1, do_scroll); return; } diff --git a/test/terminal.fl b/test/terminal.fl index 379520291..490fcf301 100644 --- a/test/terminal.fl +++ b/test/terminal.fl @@ -1282,7 +1282,7 @@ for (int i=0; i<50; i++ ) { for ( int col=0; coltextfgcolor_xterm(rand() % 8); // random fg uchar color for each char - G_tty->putchar(c, row, col); + G_tty->plot_char(c, row, col); } } G_tty->redraw();