1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 15:26:23 -05:00

write-message buffer adjust to full width of the terminal.

This commit is contained in:
Renaud 2015-09-18 17:55:35 +08:00
parent e0550db4d1
commit 2c9cbbfb1e

19
eval.c
View File

@ -1428,16 +1428,23 @@ int clrmes( int f, int n) {
* int f, n; arguments ignored * int f, n; arguments ignored
*/ */
int writemsg( int f, int n) { int writemsg( int f, int n) {
int status; int status ;
char buf[ NSTRING] ; /* buffer to recieve message into */ int size ;
char *buf ; /* buffer to receive message into */
status = mlreply( "Message to write: ", buf, sizeof buf - 1) ; size = term.t_ncol + 1 ;
if( status != TRUE) buf = malloc( size) ;
return status ; if( buf == NULL)
return FALSE ;
status = mlreply( "Message to write: ", buf, size) ;
if( status == TRUE)
/* write the message out */ /* write the message out */
mlforce( buf) ; mlforce( buf) ;
return TRUE ;
free( buf) ;
return status ;
} }
/* end of eval.c */