mirror of
https://github.com/fail0verflow/mini.git
synced 2025-02-17 12:06:20 +01:00
make spurious LFCR linebreaks optional
This commit is contained in:
parent
42b3508902
commit
08c6c7f252
13
gecko.c
13
gecko.c
@ -23,6 +23,7 @@ Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
|
||||
#include "powerpc_elf.h"
|
||||
#include "gecko.h"
|
||||
|
||||
//#define GECKO_LFCR
|
||||
//#define GECKO_SAFE
|
||||
|
||||
static u8 gecko_console_enabled = 0;
|
||||
@ -143,8 +144,12 @@ static int gecko_sendbuffer(const void *buffer, u32 size)
|
||||
while(left>0) {
|
||||
if(!_gecko_sendbyte(*ptr))
|
||||
break;
|
||||
if(*ptr == '\n' && !_gecko_sendbyte('\r'))
|
||||
if(*ptr == '\n') {
|
||||
#ifdef GECKO_LFCR
|
||||
_gecko_sendbyte('\r');
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
ptr++;
|
||||
left--;
|
||||
}
|
||||
@ -183,8 +188,12 @@ static int gecko_sendbuffer_safe(const void *buffer, u32 size)
|
||||
if(_gecko_checksend()) {
|
||||
if(!_gecko_sendbyte(*ptr))
|
||||
break;
|
||||
if(*ptr == '\n' && !_gecko_sendbyte('\r'))
|
||||
if(*ptr == '\n') {
|
||||
#ifdef GECKO_LFCR
|
||||
_gecko_sendbyte('\r');
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
ptr++;
|
||||
left--;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user