mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Insure that mlwrite( "") as same effect as mlerase().
This commit is contained in:
parent
5e5558e00b
commit
2953531913
6
Makefile
6
Makefile
@ -135,7 +135,7 @@ bindable.o: bindable.c bindable.h defines.h buffer.h crypt.h line.h \
|
|||||||
retcode.h utf8.h display.h estruct.h file.h input.h bind.h lock.h \
|
retcode.h utf8.h display.h estruct.h file.h input.h bind.h lock.h \
|
||||||
mlout.h terminal.h
|
mlout.h terminal.h
|
||||||
buffer.o: buffer.c buffer.h crypt.h line.h retcode.h utf8.h defines.h \
|
buffer.o: buffer.c buffer.h crypt.h line.h retcode.h utf8.h defines.h \
|
||||||
display.h estruct.h file.h input.h bind.h window.h
|
estruct.h file.h input.h bind.h mlout.h window.h
|
||||||
crypt.o: crypt.c crypt.h
|
crypt.o: crypt.c crypt.h
|
||||||
display.o: display.c display.h estruct.h buffer.h crypt.h line.h \
|
display.o: display.c display.h estruct.h buffer.h crypt.h line.h \
|
||||||
retcode.h utf8.h input.h bind.h termio.h terminal.h defines.h version.h \
|
retcode.h utf8.h input.h bind.h termio.h terminal.h defines.h version.h \
|
||||||
@ -164,8 +164,8 @@ line.o: line.c line.h retcode.h utf8.h buffer.h crypt.h estruct.h mlout.h \
|
|||||||
window.h defines.h
|
window.h defines.h
|
||||||
lock.o: lock.c estruct.h lock.h
|
lock.o: lock.c estruct.h lock.h
|
||||||
main.o: main.c estruct.h basic.h bind.h bindable.h buffer.h crypt.h \
|
main.o: main.c estruct.h basic.h bind.h bindable.h buffer.h crypt.h \
|
||||||
line.h retcode.h utf8.h display.h eval.h execute.h file.h input.h \
|
line.h retcode.h utf8.h display.h eval.h execute.h file.h input.h lock.h \
|
||||||
mlout.h lock.h random.h search.h terminal.h defines.h termio.h version.h \
|
mlout.h random.h search.h terminal.h defines.h termio.h version.h \
|
||||||
window.h
|
window.h
|
||||||
mingw32.o: mingw32.c
|
mingw32.o: mingw32.c
|
||||||
mlout.o: mlout.c mlout.h
|
mlout.o: mlout.c mlout.h
|
||||||
|
6
buffer.c
6
buffer.c
@ -17,10 +17,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "display.h"
|
|
||||||
#include "estruct.h"
|
#include "estruct.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "mlout.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ int zotbuf(struct buffer *bp)
|
|||||||
int s;
|
int s;
|
||||||
|
|
||||||
if (bp->b_nwnd != 0) { /* Error if on screen. */
|
if (bp->b_nwnd != 0) { /* Error if on screen. */
|
||||||
mlwrite("Buffer is being displayed");
|
mloutstr("Buffer is being displayed");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if ((s = bclear(bp)) != TRUE) /* Blow text away. */
|
if ((s = bclear(bp)) != TRUE) /* Blow text away. */
|
||||||
@ -238,7 +238,7 @@ int namebuffer(int f, int n)
|
|||||||
|
|
||||||
strcpy(curbp->b_bname, bufn); /* copy buffer name to structure */
|
strcpy(curbp->b_bname, bufn); /* copy buffer name to structure */
|
||||||
curwp->w_flag |= WFMODE; /* make mode line replot */
|
curwp->w_flag |= WFMODE; /* make mode line replot */
|
||||||
mlerase();
|
mloutstr( "") ; /* erase message line */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1370,6 +1370,7 @@ void mlwrite(const char *fmt, ...)
|
|||||||
else
|
else
|
||||||
movecursor( term.t_nrow, 0) ;
|
movecursor( term.t_nrow, 0) ;
|
||||||
|
|
||||||
|
mpresf = *fmt ? TRUE : FALSE ; /* flag if line has content or not */
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
while ((c = *fmt++) != 0) {
|
while ((c = *fmt++) != 0) {
|
||||||
if (c != '%')
|
if (c != '%')
|
||||||
@ -1417,7 +1418,6 @@ void mlwrite(const char *fmt, ...)
|
|||||||
TTeeol() ;
|
TTeeol() ;
|
||||||
|
|
||||||
TTflush();
|
TTflush();
|
||||||
mpresf = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1432,7 +1432,7 @@ void mlforce( char *s) {
|
|||||||
|
|
||||||
oldcmd = discmd; /* save the discmd value */
|
oldcmd = discmd; /* save the discmd value */
|
||||||
discmd = TRUE; /* and turn display on */
|
discmd = TRUE; /* and turn display on */
|
||||||
mlwrite( "%s", s) ; /* write the string out */
|
mlwrite( (*s) ? "%s" : "", s) ; /* write the string out or erase line */
|
||||||
discmd = oldcmd; /* and restore the original setting */
|
discmd = oldcmd; /* and restore the original setting */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
mlout.c
2
mlout.c
@ -9,7 +9,7 @@ static void mloutdump( const char *buf, ...) {
|
|||||||
void (*mloutfmt)( const char *, ...) = mloutdump ;
|
void (*mloutfmt)( const char *, ...) = mloutdump ;
|
||||||
|
|
||||||
void mloutstr( const char *str) {
|
void mloutstr( const char *str) {
|
||||||
mloutfmt( "%s", str) ;
|
mloutfmt( (*str) ? "%s" : "", str) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end of mlout.c */
|
/* end of mlout.c */
|
||||||
|
Loading…
Reference in New Issue
Block a user