1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Replace PuTTY's 2-3-4 tree implementation with the shiny new counted

one, in preparation for using it to speed up scrollback.

[originally from svn r1053]
This commit is contained in:
Simon Tatham
2001-04-16 17:18:24 +00:00
parent cdf972d9f1
commit 03c9b6107b
7 changed files with 862 additions and 320 deletions

13
plink.c
View File

@ -568,11 +568,10 @@ int main(int argc, char **argv) {
n = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
if (n == 0) {
WSANETWORKEVENTS things;
enum234 e;
SOCKET socket;
extern SOCKET first_socket(enum234 *), next_socket(enum234 *);
extern SOCKET first_socket(int *), next_socket(int *);
extern int select_result(WPARAM, LPARAM);
int i;
int i, socketstate;
/*
* We must not call select_result() for any socket
@ -582,8 +581,8 @@ int main(int argc, char **argv) {
*/
/* Count the active sockets. */
i = 0;
for (socket = first_socket(&e); socket != INVALID_SOCKET;
socket = next_socket(&e))
for (socket = first_socket(&socketstate); socket != INVALID_SOCKET;
socket = next_socket(&socketstate))
i++;
/* Expand the buffer if necessary. */
@ -594,8 +593,8 @@ int main(int argc, char **argv) {
/* Retrieve the sockets into sklist. */
skcount = 0;
for (socket = first_socket(&e); socket != INVALID_SOCKET;
socket = next_socket(&e)) {
for (socket = first_socket(&socketstate); socket != INVALID_SOCKET;
socket = next_socket(&socketstate)) {
sklist[skcount++] = socket;
}