1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-09-28 00:15:54 -04:00

Minor review of mlerase in relationship to usage in mlwrite.

This commit is contained in:
Renaud 2015-01-22 17:36:11 +08:00
parent 15ae2d4135
commit daa6395128

View File

@ -1311,8 +1311,6 @@ void movecursor(int row, int col)
*/ */
void mlerase(void) void mlerase(void)
{ {
int i;
movecursor(term.t_nrow, 0); movecursor(term.t_nrow, 0);
if (discmd == FALSE) if (discmd == FALSE)
return; return;
@ -1324,7 +1322,9 @@ void mlerase(void)
if (eolexist == TRUE) if (eolexist == TRUE)
TTeeol(); TTeeol();
else { else {
for (i = 0; i < term.t_ncol - 1; i++) int i ;
for( i = 1 ; i < term.t_ncol ; i++)
TTputc(' '); TTputc(' ');
movecursor(term.t_nrow, 1); /* force the move! */ movecursor(term.t_nrow, 1); /* force the move! */
movecursor(term.t_nrow, 0); movecursor(term.t_nrow, 0);
@ -1359,12 +1359,11 @@ void mlwrite(const char *fmt, ...)
#endif #endif
/* if we can not erase to end-of-line, do it manually */ /* if we can not erase to end-of-line, do it manually */
if (eolexist == FALSE) { if( eolexist == FALSE)
mlerase(); mlerase() ; /* ends with movecursor( term.t_nrow, 0) and TTflush() */
TTflush(); else
} movecursor( term.t_nrow, 0) ;
movecursor(term.t_nrow, 0);
va_start(ap, fmt); va_start(ap, fmt);
while ((c = *fmt++) != 0) { while ((c = *fmt++) != 0) {
if (c != '%') { if (c != '%') {