mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Never print the last character in screen, this may break some terminals (cygwin at least).
term_addstr() now uses const char * instead of char * parameter. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2192 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
575a5a3b8b
commit
377b66745d
@ -314,9 +314,9 @@ void term_addch(TERM_WINDOW *window, int chr)
|
||||
waddch(window->win, chr);
|
||||
}
|
||||
|
||||
void term_addstr(TERM_WINDOW *window, char *str)
|
||||
void term_addstr(TERM_WINDOW *window, const char *str)
|
||||
{
|
||||
waddstr(window->win, str);
|
||||
waddstr(window->win, (const char *) str);
|
||||
}
|
||||
|
||||
void term_clrtoeol(TERM_WINDOW *window)
|
||||
|
@ -344,15 +344,23 @@ static void term_printed_text(int count)
|
||||
void term_addch(TERM_WINDOW *window, int chr)
|
||||
{
|
||||
if (vcmove) term_move_real();
|
||||
putc(chr, window->term->out);
|
||||
term_printed_text(1);
|
||||
if (vcy != term_height || vcx != 0)
|
||||
putc(chr, window->term->out);
|
||||
}
|
||||
|
||||
void term_addstr(TERM_WINDOW *window, char *str)
|
||||
void term_addstr(TERM_WINDOW *window, const char *str)
|
||||
{
|
||||
int len;
|
||||
|
||||
if (vcmove) term_move_real();
|
||||
fputs(str, window->term->out);
|
||||
term_printed_text(strlen(str));
|
||||
len = strlen(str);
|
||||
term_printed_text(len);
|
||||
|
||||
if (vcy != term_height || vcx != 0)
|
||||
fputs(str, window->term->out);
|
||||
else
|
||||
fwrite(str, 1, len-1, window->term->out);
|
||||
}
|
||||
|
||||
void term_clrtoeol(TERM_WINDOW *window)
|
||||
|
@ -63,7 +63,7 @@ void term_set_color(TERM_WINDOW *window, int col);
|
||||
|
||||
void term_move(TERM_WINDOW *window, int x, int y);
|
||||
void term_addch(TERM_WINDOW *window, int chr);
|
||||
void term_addstr(TERM_WINDOW *window, char *str);
|
||||
void term_addstr(TERM_WINDOW *window, const char *str);
|
||||
void term_clrtoeol(TERM_WINDOW *window);
|
||||
|
||||
void term_move_cursor(int x, int y);
|
||||
|
Loading…
Reference in New Issue
Block a user