Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2001-04-16 21:18:24 +0400
committerSimon Tatham <anakin@pobox.com>2001-04-16 21:18:24 +0400
commit03c9b6107ba13a7075a91d7fe42b13434b72bb96 (patch)
treedda8884bb1993ddda82a289f2045c7a31af2b158 /winnet.c
parentcdf972d9f13ebc4bf0ed1afaeb3ab8918c8e0521 (diff)
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]
Diffstat (limited to 'winnet.c')
-rw-r--r--winnet.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/winnet.c b/winnet.c
index 777c8c37..0f17906e 100644
--- a/winnet.c
+++ b/winnet.c
@@ -747,11 +747,13 @@ static char *sk_tcp_socket_error(Socket sock) {
/*
* For Plink: enumerate all sockets currently active.
*/
-SOCKET first_socket(enum234 *e) {
- Actual_Socket s = first234(sktree, e);
+SOCKET first_socket(int *state) {
+ Actual_Socket s;
+ *state = 0;
+ s = index234(sktree, (*state)++);
return s ? s->s : INVALID_SOCKET;
}
-SOCKET next_socket(enum234 *e) {
- Actual_Socket s = next234(e);
+SOCKET next_socket(int *state) {
+ Actual_Socket s = index234(sktree, (*state)++);
return s ? s->s : INVALID_SOCKET;
}