mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
Added option CON_CR_TO_LF to enable using console without having to change
settings of terminal software to use CR+LF on send.
This commit is contained in:
parent
922d70c12b
commit
a31daebc0a
@ -55,12 +55,15 @@ static _ssize_t std_read( struct _reent *r, int fd, void* vptr, size_t len )
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if( !isprint( c ) && c != '\n' && c != STD_CTRLZ_CODE )
|
||||
if( !isprint( c ) && c != '\n' && c != '\r' && c != STD_CTRLZ_CODE )
|
||||
continue;
|
||||
if( c == STD_CTRLZ_CODE )
|
||||
return 0;
|
||||
else
|
||||
std_send_char_func( DM_STDOUT_NUM, c );
|
||||
#ifdef CON_CR_TO_LF
|
||||
if ( c == '\r' )
|
||||
c = '\n';
|
||||
#endif
|
||||
std_send_char_func( DM_STDOUT_NUM, c );
|
||||
ptr[ i ] = c;
|
||||
if( c == '\n' )
|
||||
{
|
||||
|
@ -33,6 +33,7 @@
|
||||
#define TERM_LINES 25
|
||||
#define TERM_COLS 80
|
||||
#define TERM_TIMEOUT 100000
|
||||
//#define CON_CR_TO_LF
|
||||
|
||||
// *****************************************************************************
|
||||
// Auxiliary libraries that will be compiled for this platform
|
||||
|
Loading…
x
Reference in New Issue
Block a user