Update of /cvsroot/jake2/jake2/src/jake2/qcommon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29321/src/jake2/qcommon
Modified Files:
MSG.java
Log Message:
unify string read buffers
Index: MSG.java
===================================================================
RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/MSG.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MSG.java 8 Jul 2004 20:24:48 -0000 1.3
--- MSG.java 28 Jul 2004 11:58:10 -0000 1.4
***************
*** 478,487 ****
} while (l < 2047);
- //readbuf[l] = 0;
return new String(readbuf, 0, l);
}
- // 2k read buffer.
- public static byte readbuf1[] = new byte[2048];
public static String ReadStringLine(sizebuf_t msg_read) {
--- 478,484 ----
***************
*** 494,505 ****
if (c == -1 || c == 0 || c == 0x0a)
break;
! readbuf1[l] = c;
l++;
! }
! while (l < 2047);
!
! readbuf1[l] = 0;
! return new String(readbuf1, 0, l).trim();
}
--- 491,499 ----
if (c == -1 || c == 0 || c == 0x0a)
break;
! readbuf[l] = c;
l++;
! } while (l < 2047);
! return new String(readbuf, 0, l).trim();
}
***************
*** 563,572 ****
public static void ReadData(sizebuf_t msg_read, byte data[], int len) {
! int i;
!
! for (i = 0; i < len; i++)
data[i] = (byte) ReadByte(msg_read);
}
-
- //============================================================================
}
--- 557,562 ----
public static void ReadData(sizebuf_t msg_read, byte data[], int len) {
! for (int i = 0; i < len; i++)
data[i] = (byte) ReadByte(msg_read);
}
}
|