mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 15:26:23 -05:00
Review formatted string printing when '%' is at end of string.
Clean up unused IO return code.
This commit is contained in:
parent
16e6f87ad5
commit
f83ab08609
15
display.c
15
display.c
@ -1333,12 +1333,14 @@ void vmlwrite( const char *fmt, va_list ap) {
|
||||
movecursor( term.t_nrow, 0) ;
|
||||
|
||||
mpresf = *fmt ? TRUE : FALSE ; /* flag if line has content or not */
|
||||
while ((c = *fmt++) != 0) {
|
||||
if (c != '%')
|
||||
while( ( c = *fmt++) != 0)
|
||||
if( c != '%')
|
||||
mlputc( c) ;
|
||||
else {
|
||||
c = *fmt++;
|
||||
switch (c) {
|
||||
else if( ( c = *fmt++) == 0) {
|
||||
mlputc( '%') ;
|
||||
break ;
|
||||
} else
|
||||
switch( c) {
|
||||
case 'd':
|
||||
mlputi(va_arg(ap, int), 10);
|
||||
break;
|
||||
@ -1369,11 +1371,10 @@ void vmlwrite( const char *fmt, va_list ap) {
|
||||
|
||||
default:
|
||||
mlputc( '%') ;
|
||||
/* fallthrough */
|
||||
case '%':
|
||||
mlputc( c) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* if we can, erase to the end of screen */
|
||||
if( eolexist == TRUE && ttcol < term.t_ncol)
|
||||
|
3
fileio.h
3
fileio.h
@ -6,8 +6,7 @@ typedef enum {
|
||||
FIOFNF, /* File I/O, file not found. */
|
||||
FIOEOF, /* File I/O, end of file. */
|
||||
FIOERR, /* File I/O, error. */
|
||||
FIOMEM, /* File I/O, out of memory */
|
||||
FIOFUN /* File I/O, eod of file/bad line */
|
||||
FIOMEM /* File I/O, out of memory */
|
||||
} fio_code ;
|
||||
|
||||
#define FTYPE_NONE 0
|
||||
|
Loading…
Reference in New Issue
Block a user