annotate lib/gl_anylinked_list1.h @ 10690:01f3623813da

Split winsock.c into many smaller files. * lib/close.c: Add _gl_close_fd_maybe_socket from winsock.c. * lib/accept.c: New file, based on winsock.c. * lib/bind.c: New file, based on winsock.c. * lib/connect.c: New file, based on winsock.c. * lib/getpeername.c: New file, based on winsock.c. * lib/getsockname.c: New file, based on winsock.c. * lib/getsockopt.c: New file, based on winsock.c. * lib/ioctl.c: New file, based on winsock.c. * lib/listen.c: New file, based on winsock.c. * lib/recv.c: New file, based on winsock.c. * lib/recvfrom.c: New file, based on winsock.c. * lib/send.c: New file, based on winsock.c. * lib/sendto.c: New file, based on winsock.c. * lib/setsockopt.c: New file, based on winsock.c. * lib/shutdown.c: New file, based on winsock.c. * lib/socket.c: New file, based on winsock.c. * lib/w32sock.h: New file, based on winsock.c. * lib/winsock.c: Remove file. * modules/accept: Likewise. * modules/bind: Likewise. * modules/connect: Likewise. * modules/getpeername: Likewise. * modules/getsockname: Likewise. * modules/getsockopt: Likewise. * modules/ioctl: Likewise. * modules/listen: Likewise. * modules/recv: Likewise. * modules/recvfrom: Likewise. * modules/send: Likewise. * modules/sendto: Likewise. * modules/setsockopt: Likewise. * modules/shutdown: Likewise. * modules/socket: Use socket.c instead of winsock.c. * modules/sys_socket: Remove (unneeded?) dependency on winsock.c. * doc/posix-functions/accept.texi: Doc fix. * doc/posix-functions/bind.texi: Doc fix. * doc/posix-functions/close.texi: Doc fix. * doc/posix-functions/connect.texi: Doc fix. * doc/posix-functions/getpeername.texi: Doc fix. * doc/posix-functions/getsockname.texi: Doc fix. * doc/posix-functions/getsockopt.texi: Doc fix. * doc/posix-functions/ioctl.texi: Doc fix. * doc/posix-functions/listen.texi: Doc fix. * doc/posix-functions/recv.texi: Doc fix. * doc/posix-functions/recvfrom.texi: Doc fix. * doc/posix-functions/send.texi: Doc fix. * doc/posix-functions/sendto.texi: Doc fix. * doc/posix-functions/setsockopt.texi: Doc fix. * doc/posix-functions/shutdown.texi: Doc fix. * doc/posix-functions/socket.texi: Doc fix.
author Simon Josefsson <simon@josefsson.org>
date Tue, 21 Oct 2008 12:17:19 +0200
parents bbbbbf4cd1c5
children b5e42ef33b49
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6973
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Sequential list data type implemented by a linked list.
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 Copyright (C) 2006 Free Software Foundation, Inc.
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 Written by Bruno Haible <bruno@clisp.org>, 2006.
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6973
diff changeset
5 This program is free software: you can redistribute it and/or modify
6973
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6973
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6973
diff changeset
8 (at your option) any later version.
6973
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 6973
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
6973
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 /* Common code of gl_linked_list.c and gl_linkedhash_list.c. */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 /* -------------------------- gl_list_t Data Type -------------------------- */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 /* Concrete list node implementation, valid for this file only. */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 struct gl_list_node_impl
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 {
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 #if WITH_HASHTABLE
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 struct gl_hash_entry h; /* hash table entry fields; must be first */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 #endif
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 struct gl_list_node_impl *next;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 struct gl_list_node_impl *prev;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 const void *value;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 };
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 /* Concrete gl_list_impl type, valid for this file only. */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 struct gl_list_impl
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 {
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 struct gl_list_impl_base base;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 #if WITH_HASHTABLE
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 /* A hash table: managed as an array of collision lists. */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 struct gl_hash_entry **table;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 size_t table_size;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 #endif
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 /* A circular list anchored at root.
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 The first node is = root.next, the last node is = root.prev.
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 The root's value is unused. */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 struct gl_list_node_impl root;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 /* Number of list nodes, excluding the root. */
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 size_t count;
de9a21fc207a Common code several concrete list implementations.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 };