|
Message
From: cvs at opencores.org<cvs@o...>
Date: Wed May 21 14:45:04 CEST 2008
Subject: [cvs-checkins] MODIFIED: mlite ...
Date: 00/08/05 21:14:45 Modified: mlite/kernel tcpip.c Log: IPPrintf will flush if end-of-line is printed Revision Changes Path 1.20 mlite/kernel/tcpip.c http://www.opencores.org/cvsweb.shtml/mlite/kernel/tcpip.c.diff?r1=1.19&r2=1.20 (In the diff below, changes in quantity of whitespace are not shown.) Index: tcpip.c =================================================================== RCS file: /cvsroot/rhoads/mlite/kernel/tcpip.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -b -r1.19 -r1.20 --- tcpip.c 2 May 2008 01:35:21 -0000 1.19 +++ tcpip.c 21 May 2008 12:45:03 -0000 1.20 @@ -1492,21 +1492,20 @@ void IPPrintf(IPSocket *socket, char *message, int arg0, int arg1, int arg2, int arg3) { - char buf[500], *ptr; + char buf[500]; if(socket == NULL) { printf(message, arg0, arg1, arg2, arg3); return; } - ptr = strstr(message, "%"); - if(ptr == NULL) - IPWrite(socket, (uint8*)message, (int)strlen(message)); + if(strcmp(message, "%s") == 0) + IPWrite(socket, (uint8*)arg0, (int)strlen((char*)arg0)); else { sprintf(buf, message, arg0, arg1, arg2, arg3, 0, 0, 0, 0); IPWrite(socket, (uint8*)buf, (int)strlen(buf)); } - if(socket->dontFlush == 0) + if(socket->dontFlush == 0 || strstr(message, "\n")) IPWriteFlush(socket); }
|
 |