1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-06-09 05:20:42 +00: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

17
eval.c
View File

@ -1429,15 +1429,22 @@ int clrmes( int f, int n) {
*/
int writemsg( int f, int n) {
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) ;
if( status != TRUE)
return status ;
size = term.t_ncol + 1 ;
buf = malloc( size) ;
if( buf == NULL)
return FALSE ;
status = mlreply( "Message to write: ", buf, size) ;
if( status == TRUE)
/* write the message out */
mlforce( buf) ;
return TRUE ;
free( buf) ;
return status ;
}
/* end of eval.c */