mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-20 10:35:34 +00:00
Trap CR in framed debug string
This commit is contained in:
parent
dff77aea61
commit
6852c0cb03
@ -536,7 +536,14 @@ read_more:
|
||||
if (timestamp) {
|
||||
if (inpktbuf[0]!='0' || inpktbuf[1]!=0 || inpktbuf[2]!=0 || inpktbuf[3]!=0) stamptime();
|
||||
}
|
||||
fwrite(inpktbuf, inbufptr, 1, stderr);
|
||||
/* This could be a proper debug string starting with CR just a print to stdout */
|
||||
/* Trap the CR which would cause overwriting of the timestamp */
|
||||
//{int i;for (i=0;i<inbufptr;i++) fprintf(stderr,"%2x ",inpktbuf[i]);}
|
||||
if(inpktbuf[0] == DEBUG_LINE_MARKER) {
|
||||
fwrite(inpktbuf + 1, inbufptr - 1, 1, stderr);
|
||||
} else {
|
||||
fwrite(inpktbuf, inbufptr, 1, stderr);
|
||||
}
|
||||
inbufptr=0;
|
||||
} else if (c == 0 || c == '\t' || c == '\r') {
|
||||
} else if(c < ' ' || '~' < c) {
|
||||
|
Loading…
Reference in New Issue
Block a user