| 1 |
# Spanish translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Miguel Pérez Ibars <[email protected]>, 2004. |
| 5 |
msgid "" |
| 6 |
msgstr "" |
| 7 |
"Project-Id-Version: manpages-l10n\n" |
| 8 |
"POT-Creation-Date: 2023-08-27 17:15+0200\n" |
| 9 |
"PO-Revision-Date: 2004-08-09 19:53+0200\n" |
| 10 |
"Last-Translator: Miguel Pérez Ibars <[email protected]>\n" |
| 11 |
"Language-Team: Spanish <[email protected]>\n" |
| 12 |
"Language: es\n" |
| 13 |
"MIME-Version: 1.0\n" |
| 14 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 15 |
"Content-Transfer-Encoding: 8bit\n" |
| 16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
| 17 |
"X-Generator: Lokalize 20.04.1\n" |
| 18 |
|
| 19 |
#. type: Dd |
| 20 |
#: opensuse-leap-15-6 |
| 21 |
#, fuzzy, no-wrap |
| 22 |
#| msgid "February 2019" |
| 23 |
msgid "February 7, 2015" |
| 24 |
msgstr "Febrero 2019" |
| 25 |
|
| 26 |
#. type: Dt |
| 27 |
#: opensuse-leap-15-6 |
| 28 |
#, no-wrap |
| 29 |
msgid "QUEUE 3" |
| 30 |
msgstr "QUEUE 3" |
| 31 |
|
| 32 |
#. type: Sh |
| 33 |
#: opensuse-leap-15-6 |
| 34 |
#, no-wrap |
| 35 |
msgid "NAME" |
| 36 |
msgstr "NOMBRE" |
| 37 |
|
| 38 |
#. .Nm SLIST_FOREACH_FROM , |
| 39 |
#. .Nm SLIST_FOREACH_SAFE , |
| 40 |
#. .Nm SLIST_FOREACH_FROM_SAFE , |
| 41 |
#. .Nm SLIST_REMOVE_AFTER , |
| 42 |
#. .Nm SLIST_SWAP , |
| 43 |
#. .Nm STAILQ_FOREACH_FROM , |
| 44 |
#. .Nm STAILQ_FOREACH_SAFE , |
| 45 |
#. .Nm STAILQ_FOREACH_FROM_SAFE , |
| 46 |
#. .Nm STAILQ_LAST , |
| 47 |
#. .Nm STAILQ_REMOVE_AFTER , |
| 48 |
#. .Nm STAILQ_SWAP , |
| 49 |
#. .Nm LIST_FOREACH_FROM , |
| 50 |
#. .Nm LIST_FOREACH_SAFE , |
| 51 |
#. .Nm LIST_FOREACH_FROM_SAFE , |
| 52 |
#. .Nm LIST_PREV , |
| 53 |
#. .Nm LIST_SWAP , |
| 54 |
#. .Nm TAILQ_FOREACH_FROM , |
| 55 |
#. .Nm TAILQ_FOREACH_SAFE , |
| 56 |
#. .Nm TAILQ_FOREACH_FROM_SAFE , |
| 57 |
#. .Nm TAILQ_FOREACH_REVERSE_FROM , |
| 58 |
#. .Nm TAILQ_FOREACH_REVERSE_SAFE , |
| 59 |
#. .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE , |
| 60 |
#. type: Plain text |
| 61 |
#: opensuse-leap-15-6 |
| 62 |
msgid "" |
| 63 |
"E<.Nm SLIST_EMPTY>, E<.Nm SLIST_ENTRY>, E<.Nm SLIST_FIRST>, E<.Nm " |
| 64 |
"SLIST_FOREACH>, E<.Nm SLIST_HEAD>, E<.Nm SLIST_HEAD_INITIALIZER>, E<.Nm " |
| 65 |
"SLIST_INIT>, E<.Nm SLIST_INSERT_AFTER>, E<.Nm SLIST_INSERT_HEAD>, E<.Nm " |
| 66 |
"SLIST_NEXT>, E<.Nm SLIST_REMOVE_HEAD>, E<.Nm SLIST_REMOVE>, E<.Nm " |
| 67 |
"STAILQ_CONCAT>, E<.Nm STAILQ_EMPTY>, E<.Nm STAILQ_ENTRY>, E<.Nm " |
| 68 |
"STAILQ_FIRST>, E<.Nm STAILQ_FOREACH>, E<.Nm STAILQ_HEAD>, E<.Nm " |
| 69 |
"STAILQ_HEAD_INITIALIZER>, E<.Nm STAILQ_INIT>, E<.Nm STAILQ_INSERT_AFTER>, E<." |
| 70 |
"Nm STAILQ_INSERT_HEAD>, E<.Nm STAILQ_INSERT_TAIL>, E<.Nm STAILQ_NEXT>, E<.Nm " |
| 71 |
"STAILQ_REMOVE_HEAD>, E<.Nm STAILQ_REMOVE>, E<.Nm LIST_EMPTY>, E<.Nm " |
| 72 |
"LIST_ENTRY>, E<.Nm LIST_FIRST>, E<.Nm LIST_FOREACH>, E<.Nm LIST_HEAD>, E<.Nm " |
| 73 |
"LIST_HEAD_INITIALIZER>, E<.Nm LIST_INIT>, E<.Nm LIST_INSERT_AFTER>, E<.Nm " |
| 74 |
"LIST_INSERT_BEFORE>, E<.Nm LIST_INSERT_HEAD>, E<.Nm LIST_NEXT>, E<.Nm " |
| 75 |
"LIST_REMOVE>, E<.Nm TAILQ_CONCAT>, E<.Nm TAILQ_EMPTY>, E<.Nm TAILQ_ENTRY>, " |
| 76 |
"E<.Nm TAILQ_FIRST>, E<.Nm TAILQ_FOREACH>, E<.Nm TAILQ_FOREACH_REVERSE>, E<." |
| 77 |
"Nm TAILQ_HEAD>, E<.Nm TAILQ_HEAD_INITIALIZER>, E<.Nm TAILQ_INIT>, E<.Nm " |
| 78 |
"TAILQ_INSERT_AFTER>, E<.Nm TAILQ_INSERT_BEFORE>, E<.Nm TAILQ_INSERT_HEAD>, " |
| 79 |
"E<.Nm TAILQ_INSERT_TAIL>, E<.Nm TAILQ_LAST>, E<.Nm TAILQ_NEXT>, E<.Nm " |
| 80 |
"TAILQ_PREV>, E<.Nm TAILQ_REMOVE>, E<.Nm TAILQ_SWAP>" |
| 81 |
msgstr "" |
| 82 |
|
| 83 |
#. type: Nd |
| 84 |
#: opensuse-leap-15-6 |
| 85 |
#, fuzzy, no-wrap |
| 86 |
#| msgid "implementations of lists, tail queues, and circular queues" |
| 87 |
msgid "implementations of singly-linked lists, singly-linked tail queues," |
| 88 |
msgstr "implementación de listas, colas, y colas circulares" |
| 89 |
|
| 90 |
#. type: Plain text |
| 91 |
#: opensuse-leap-15-6 |
| 92 |
msgid "lists and tail queues" |
| 93 |
msgstr "" |
| 94 |
|
| 95 |
#. type: Sh |
| 96 |
#: opensuse-leap-15-6 |
| 97 |
#, no-wrap |
| 98 |
msgid "SYNOPSIS" |
| 99 |
msgstr "SINOPSIS" |
| 100 |
|
| 101 |
#. type: In |
| 102 |
#: opensuse-leap-15-6 |
| 103 |
#, no-wrap |
| 104 |
msgid "sys/queue.h" |
| 105 |
msgstr "sys/queue.h" |
| 106 |
|
| 107 |
# |
| 108 |
# |
| 109 |
# |
| 110 |
# |
| 111 |
#. .Fn SLIST_FOREACH_FROM "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" |
| 112 |
#. .Fn SLIST_FOREACH_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" |
| 113 |
#. .Fn SLIST_FOREACH_FROM_SAFE "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TYPE *temp_var" |
| 114 |
#. .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" |
| 115 |
#. .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" |
| 116 |
#. .Fn STAILQ_FOREACH_FROM "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" |
| 117 |
#. .Fn STAILQ_FOREACH_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" |
| 118 |
#. .Fn STAILQ_FOREACH_FROM_SAFE "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" "TYPE *temp_var" |
| 119 |
#. .Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" |
| 120 |
#. .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" |
| 121 |
#. .Fn STAILQ_SWAP "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" "STAILQ_ENTRY NAME" |
| 122 |
#. .Fn LIST_FOREACH_FROM "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" |
| 123 |
#. .Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" |
| 124 |
#. .Fn LIST_FOREACH_FROM_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" |
| 125 |
#. .Fn LIST_PREV "TYPE *elm" "LIST_HEAD *head" "TYPE" "LIST_ENTRY NAME" |
| 126 |
#. .Fn TAILQ_FOREACH_FROM "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" |
| 127 |
#. .Fn TAILQ_FOREACH_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" |
| 128 |
#. .Fn TAILQ_FOREACH_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "TYPE *temp_var" |
| 129 |
#. .Fn TAILQ_FOREACH_REVERSE_FROM "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" |
| 130 |
#. .Fn TAILQ_FOREACH_REVERSE_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" |
| 131 |
#. .Fn TAILQ_FOREACH_REVERSE_FROM_SAFE "TYPE *var" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME" "TYPE *temp_var" |
| 132 |
#. type: Plain text |
| 133 |
#: opensuse-leap-15-6 |
| 134 |
msgid "" |
| 135 |
"E<.Fn SLIST_EMPTY \"SLIST_HEAD *head\"> E<.Fn SLIST_ENTRY \"TYPE\"> E<.Fn " |
| 136 |
"SLIST_FIRST \"SLIST_HEAD *head\"> E<.Fn SLIST_FOREACH \"TYPE *var\" " |
| 137 |
"\"SLIST_HEAD *head\" \"SLIST_ENTRY NAME\"> E<.Fn SLIST_HEAD \"HEADNAME\" " |
| 138 |
"\"TYPE\"> E<.Fn SLIST_HEAD_INITIALIZER \"SLIST_HEAD head\"> E<.Fn SLIST_INIT " |
| 139 |
"\"SLIST_HEAD *head\"> E<.Fn SLIST_INSERT_AFTER \"TYPE *listelm\" \"TYPE " |
| 140 |
"*elm\" \"SLIST_ENTRY NAME\"> E<.Fn SLIST_INSERT_HEAD \"SLIST_HEAD *head\" " |
| 141 |
"\"TYPE *elm\" \"SLIST_ENTRY NAME\"> E<.Fn SLIST_NEXT \"TYPE *elm\" " |
| 142 |
"\"SLIST_ENTRY NAME\"> E<.Fn SLIST_REMOVE_HEAD \"SLIST_HEAD *head\" " |
| 143 |
"\"SLIST_ENTRY NAME\"> E<.Fn SLIST_REMOVE \"SLIST_HEAD *head\" \"TYPE *elm\" " |
| 144 |
"\"TYPE\" \"SLIST_ENTRY NAME\"> E<.Fn STAILQ_CONCAT \"STAILQ_HEAD *head1\" " |
| 145 |
"\"STAILQ_HEAD *head2\"> E<.Fn STAILQ_EMPTY \"STAILQ_HEAD *head\"> E<.Fn " |
| 146 |
"STAILQ_ENTRY \"TYPE\"> E<.Fn STAILQ_FIRST \"STAILQ_HEAD *head\"> E<.Fn " |
| 147 |
"STAILQ_FOREACH \"TYPE *var\" \"STAILQ_HEAD *head\" \"STAILQ_ENTRY NAME\"> E<." |
| 148 |
"Fn STAILQ_HEAD \"HEADNAME\" \"TYPE\"> E<.Fn STAILQ_HEAD_INITIALIZER " |
| 149 |
"\"STAILQ_HEAD head\"> E<.Fn STAILQ_INIT \"STAILQ_HEAD *head\"> E<.Fn " |
| 150 |
"STAILQ_INSERT_AFTER \"STAILQ_HEAD *head\" \"TYPE *listelm\" \"TYPE *elm\" " |
| 151 |
"\"STAILQ_ENTRY NAME\"> E<.Fn STAILQ_INSERT_HEAD \"STAILQ_HEAD *head\" \"TYPE " |
| 152 |
"*elm\" \"STAILQ_ENTRY NAME\"> E<.Fn STAILQ_INSERT_TAIL \"STAILQ_HEAD *head\" " |
| 153 |
"\"TYPE *elm\" \"STAILQ_ENTRY NAME\"> E<.Fn STAILQ_NEXT \"TYPE *elm\" " |
| 154 |
"\"STAILQ_ENTRY NAME\"> E<.Fn STAILQ_REMOVE_HEAD \"STAILQ_HEAD *head\" " |
| 155 |
"\"STAILQ_ENTRY NAME\"> E<.Fn STAILQ_REMOVE \"STAILQ_HEAD *head\" \"TYPE " |
| 156 |
"*elm\" \"TYPE\" \"STAILQ_ENTRY NAME\"> E<.Fn LIST_EMPTY \"LIST_HEAD *head\"> " |
| 157 |
"E<.Fn LIST_ENTRY \"TYPE\"> E<.Fn LIST_FIRST \"LIST_HEAD *head\"> E<.Fn " |
| 158 |
"LIST_FOREACH \"TYPE *var\" \"LIST_HEAD *head\" \"LIST_ENTRY NAME\"> E<.Fn " |
| 159 |
"LIST_HEAD \"HEADNAME\" \"TYPE\"> E<.Fn LIST_HEAD_INITIALIZER \"LIST_HEAD " |
| 160 |
"head\"> E<.Fn LIST_INIT \"LIST_HEAD *head\"> E<.Fn LIST_INSERT_AFTER \"TYPE " |
| 161 |
"*listelm\" \"TYPE *elm\" \"LIST_ENTRY NAME\"> E<.Fn LIST_INSERT_BEFORE " |
| 162 |
"\"TYPE *listelm\" \"TYPE *elm\" \"LIST_ENTRY NAME\"> E<.Fn LIST_INSERT_HEAD " |
| 163 |
"\"LIST_HEAD *head\" \"TYPE *elm\" \"LIST_ENTRY NAME\"> E<.Fn LIST_NEXT " |
| 164 |
"\"TYPE *elm\" \"LIST_ENTRY NAME\"> E<.Fn LIST_REMOVE \"TYPE *elm\" " |
| 165 |
"\"LIST_ENTRY NAME\"> E<.Fn LIST_SWAP \"LIST_HEAD *head1\" \"LIST_HEAD " |
| 166 |
"*head2\" \"TYPE\" \"LIST_ENTRY NAME\"> E<.Fn TAILQ_CONCAT \"TAILQ_HEAD " |
| 167 |
"*head1\" \"TAILQ_HEAD *head2\" \"TAILQ_ENTRY NAME\"> E<.Fn TAILQ_EMPTY " |
| 168 |
"\"TAILQ_HEAD *head\"> E<.Fn TAILQ_ENTRY \"TYPE\"> E<.Fn TAILQ_FIRST " |
| 169 |
"\"TAILQ_HEAD *head\"> E<.Fn TAILQ_FOREACH \"TYPE *var\" \"TAILQ_HEAD *head\" " |
| 170 |
"\"TAILQ_ENTRY NAME\"> E<.Fn TAILQ_FOREACH_REVERSE \"TYPE *var\" \"TAILQ_HEAD " |
| 171 |
"*head\" \"HEADNAME\" \"TAILQ_ENTRY NAME\"> E<.Fn TAILQ_HEAD \"HEADNAME\" " |
| 172 |
"\"TYPE\"> E<.Fn TAILQ_HEAD_INITIALIZER \"TAILQ_HEAD head\"> E<.Fn TAILQ_INIT " |
| 173 |
"\"TAILQ_HEAD *head\"> E<.Fn TAILQ_INSERT_AFTER \"TAILQ_HEAD *head\" \"TYPE " |
| 174 |
"*listelm\" \"TYPE *elm\" \"TAILQ_ENTRY NAME\"> E<.Fn TAILQ_INSERT_BEFORE " |
| 175 |
"\"TYPE *listelm\" \"TYPE *elm\" \"TAILQ_ENTRY NAME\"> E<.Fn " |
| 176 |
"TAILQ_INSERT_HEAD \"TAILQ_HEAD *head\" \"TYPE *elm\" \"TAILQ_ENTRY NAME\"> " |
| 177 |
"E<.Fn TAILQ_INSERT_TAIL \"TAILQ_HEAD *head\" \"TYPE *elm\" \"TAILQ_ENTRY " |
| 178 |
"NAME\"> E<.Fn TAILQ_LAST \"TAILQ_HEAD *head\" \"HEADNAME\"> E<.Fn TAILQ_NEXT " |
| 179 |
"\"TYPE *elm\" \"TAILQ_ENTRY NAME\"> E<.Fn TAILQ_PREV \"TYPE *elm\" " |
| 180 |
"\"HEADNAME\" \"TAILQ_ENTRY NAME\"> E<.Fn TAILQ_REMOVE \"TAILQ_HEAD *head\" " |
| 181 |
"\"TYPE *elm\" \"TAILQ_ENTRY NAME\"> E<.Fn TAILQ_SWAP \"TAILQ_HEAD *head1\" " |
| 182 |
"\"TAILQ_HEAD *head2\" \"TYPE\" \"TAILQ_ENTRY NAME\">" |
| 183 |
msgstr "" |
| 184 |
|
| 185 |
#. type: Sh |
| 186 |
#: opensuse-leap-15-6 |
| 187 |
#, no-wrap |
| 188 |
msgid "DESCRIPTION" |
| 189 |
msgstr "DESCRIPCIÓN" |
| 190 |
|
| 191 |
#. type: Plain text |
| 192 |
#: opensuse-leap-15-6 |
| 193 |
#, fuzzy |
| 194 |
#| msgid "" |
| 195 |
#| "These macros define and operate on three types of data structures: lists, " |
| 196 |
#| "tail queues, and circular queues. All three structures support the " |
| 197 |
#| "following functionality:" |
| 198 |
msgid "" |
| 199 |
"These macros define and operate on four types of data structures: singly-" |
| 200 |
"linked lists, singly-linked tail queues, lists, and tail queues. All four " |
| 201 |
"structures support the following functionality:" |
| 202 |
msgstr "" |
| 203 |
"Estas macros definen y operan sobre tres tipos de estructuras de datos: " |
| 204 |
"listas, colas, y colas circulares. Las tres estructuras soportan la " |
| 205 |
"siguiente funcionalidad:" |
| 206 |
|
| 207 |
#. type: Plain text |
| 208 |
#: opensuse-leap-15-6 |
| 209 |
msgid "Insertion of a new entry at the head of the list." |
| 210 |
msgstr "Inserción de una nueva entrada en la cabeza de la lista." |
| 211 |
|
| 212 |
#. type: Plain text |
| 213 |
#: opensuse-leap-15-6 |
| 214 |
msgid "Insertion of a new entry after any element in the list." |
| 215 |
msgstr "" |
| 216 |
"Inserción de una nueva entrada después de cualquier elemento de la lista." |
| 217 |
|
| 218 |
#. type: Plain text |
| 219 |
#: opensuse-leap-15-6 |
| 220 |
#, fuzzy |
| 221 |
#| msgid "Insertion of a new entry at the head of the list." |
| 222 |
msgid "O(1) removal of an entry from the head of the list." |
| 223 |
msgstr "Inserción de una nueva entrada en la cabeza de la lista." |
| 224 |
|
| 225 |
#. type: Plain text |
| 226 |
#: opensuse-leap-15-6 |
| 227 |
msgid "Forward traversal through the list." |
| 228 |
msgstr "Recorrido hacia delante de la lista." |
| 229 |
|
| 230 |
#. type: Plain text |
| 231 |
#: opensuse-leap-15-6 |
| 232 |
msgid "Swapping the contents of two lists." |
| 233 |
msgstr "" |
| 234 |
|
| 235 |
#. type: Plain text |
| 236 |
#: opensuse-leap-15-6 |
| 237 |
msgid "" |
| 238 |
"Singly-linked lists are the simplest of the four data structures and support " |
| 239 |
"only the above functionality. Singly-linked lists are ideal for " |
| 240 |
"applications with large datasets and few or no removals, or for implementing " |
| 241 |
"a LIFO queue. Singly-linked lists add the following functionality:" |
| 242 |
msgstr "" |
| 243 |
|
| 244 |
#. type: Plain text |
| 245 |
#: opensuse-leap-15-6 |
| 246 |
#, fuzzy |
| 247 |
#| msgid "Removal of any entry in the list." |
| 248 |
msgid "O(n) removal of any entry in the list." |
| 249 |
msgstr "Eliminación de cualquier entrada en la lista." |
| 250 |
|
| 251 |
#. type: Plain text |
| 252 |
#: opensuse-leap-15-6 |
| 253 |
#, fuzzy |
| 254 |
#| msgid "Tail queues add the following functionality:" |
| 255 |
msgid "Singly-linked tail queues add the following functionality:" |
| 256 |
msgstr "Las colas añaden la siguiente funcionalidad:" |
| 257 |
|
| 258 |
#. type: Plain text |
| 259 |
#: opensuse-leap-15-6 |
| 260 |
msgid "Entries can be added at the end of a list." |
| 261 |
msgstr "Las entradas pueden ser añadidas al final de una lista." |
| 262 |
|
| 263 |
#. type: Plain text |
| 264 |
#: opensuse-leap-15-6 |
| 265 |
msgid "They may be concatenated." |
| 266 |
msgstr "" |
| 267 |
|
| 268 |
#. type: Plain text |
| 269 |
#: opensuse-leap-15-6 |
| 270 |
msgid "However:" |
| 271 |
msgstr "Sin embargo:" |
| 272 |
|
| 273 |
#. type: Plain text |
| 274 |
#: opensuse-leap-15-6 |
| 275 |
msgid "All list insertions must specify the head of the list." |
| 276 |
msgstr "" |
| 277 |
"Todas las inserciones en la lista deben especificar la cabeza de la lista." |
| 278 |
|
| 279 |
#. type: Plain text |
| 280 |
#: opensuse-leap-15-6 |
| 281 |
msgid "Each head entry requires two pointers rather than one." |
| 282 |
msgstr "Cada entrada de cabecera requiere dos punteros en lugar de uno." |
| 283 |
|
| 284 |
#. type: Plain text |
| 285 |
#: opensuse-leap-15-6 |
| 286 |
#, fuzzy |
| 287 |
#| msgid "" |
| 288 |
#| "Code size is about 15% greater and operations run about 20% slower than " |
| 289 |
#| "lists." |
| 290 |
msgid "" |
| 291 |
"Code size is about 15% greater and operations run about 20% slower than " |
| 292 |
"singly-linked lists." |
| 293 |
msgstr "" |
| 294 |
"El tamaño del código es aproximadamente un 15% más grande y las operaciones " |
| 295 |
"se ejecutan sobre un 20% más lentas que en las listas." |
| 296 |
|
| 297 |
#. type: Plain text |
| 298 |
#: opensuse-leap-15-6 |
| 299 |
msgid "" |
| 300 |
"Singly-linked tail queues are ideal for applications with large datasets and " |
| 301 |
"few or no removals, or for implementing a FIFO queue." |
| 302 |
msgstr "" |
| 303 |
|
| 304 |
#. type: Plain text |
| 305 |
#: opensuse-leap-15-6 |
| 306 |
msgid "" |
| 307 |
"All doubly linked types of data structures (lists and tail queues) " |
| 308 |
"additionally allow:" |
| 309 |
msgstr "" |
| 310 |
|
| 311 |
#. type: Plain text |
| 312 |
#: opensuse-leap-15-6 |
| 313 |
#, fuzzy |
| 314 |
#| msgid "Insertion of a new entry after any element in the list." |
| 315 |
msgid "Insertion of a new entry before any element in the list." |
| 316 |
msgstr "" |
| 317 |
"Inserción de una nueva entrada después de cualquier elemento de la lista." |
| 318 |
|
| 319 |
#. type: Plain text |
| 320 |
#: opensuse-leap-15-6 |
| 321 |
#, fuzzy |
| 322 |
#| msgid "Removal of any entry in the list." |
| 323 |
msgid "O(1) removal of any entry in the list." |
| 324 |
msgstr "Eliminación de cualquier entrada en la lista." |
| 325 |
|
| 326 |
#. type: Plain text |
| 327 |
#: opensuse-leap-15-6 |
| 328 |
#, fuzzy |
| 329 |
#| msgid "Each head entry requires two pointers rather than one." |
| 330 |
msgid "Each element requires two pointers rather than one." |
| 331 |
msgstr "Cada entrada de cabecera requiere dos punteros en lugar de uno." |
| 332 |
|
| 333 |
#. type: Plain text |
| 334 |
#: opensuse-leap-15-6 |
| 335 |
msgid "" |
| 336 |
"Code size and execution time of operations (except for removal) is about " |
| 337 |
"twice that of the singly-linked data-structures." |
| 338 |
msgstr "" |
| 339 |
|
| 340 |
#. type: Plain text |
| 341 |
#: opensuse-leap-15-6 |
| 342 |
#, fuzzy |
| 343 |
#| msgid "" |
| 344 |
#| "Lists are the simplest of the three data structures and support only the " |
| 345 |
#| "above functionality." |
| 346 |
msgid "" |
| 347 |
"Linked lists are the simplest of the doubly linked data structures. They " |
| 348 |
"add the following functionality over the above:" |
| 349 |
msgstr "" |
| 350 |
"Las listas son las más simples de las tres estructuras de datos y soportan " |
| 351 |
"sólo la funcionalidad descrita arriba." |
| 352 |
|
| 353 |
#. type: Plain text |
| 354 |
#: opensuse-leap-15-6 |
| 355 |
msgid "They may be traversed backwards." |
| 356 |
msgstr "Pueden ser recorridas hacia atrás." |
| 357 |
|
| 358 |
#. type: Plain text |
| 359 |
#: opensuse-leap-15-6 |
| 360 |
msgid "" |
| 361 |
"To traverse backwards, an entry to begin the traversal and the list in which " |
| 362 |
"it is contained must be specified." |
| 363 |
msgstr "" |
| 364 |
|
| 365 |
#. type: Plain text |
| 366 |
#: opensuse-leap-15-6 |
| 367 |
msgid "Tail queues add the following functionality:" |
| 368 |
msgstr "Las colas añaden la siguiente funcionalidad:" |
| 369 |
|
| 370 |
#. type: Plain text |
| 371 |
#: opensuse-leap-15-6 |
| 372 |
msgid "They may be traversed backwards, from tail to head." |
| 373 |
msgstr "Pueden ser recorridas hacia atrás, desde la cola hasta la cabeza." |
| 374 |
|
| 375 |
#. type: Plain text |
| 376 |
#: opensuse-leap-15-6 |
| 377 |
msgid "All list insertions and removals must specify the head of the list." |
| 378 |
msgstr "" |
| 379 |
"Todas las inserciones y eliminaciones en la lista deben especificar la " |
| 380 |
"cabeza de la lista." |
| 381 |
|
| 382 |
#. type: Plain text |
| 383 |
#: opensuse-leap-15-6 |
| 384 |
#, fuzzy |
| 385 |
#| msgid "" |
| 386 |
#| "In the macro definitions, E<.Fa TYPE> is the name of a user defined " |
| 387 |
#| "structure, that must contain a field of type E<.Li LIST_ENTRY>, E<.Li " |
| 388 |
#| "TAILQ_ENTRY>, or E<.Li CIRCLEQ_ENTRY>, named E<.Fa NAME>. The argument " |
| 389 |
#| "E<.Fa HEADNAME> is the name of a user defined structure that must be " |
| 390 |
#| "declared using the macros E<.Li LIST_HEAD>, E<.Li TAILQ_HEAD>, or E<.Li " |
| 391 |
#| "CIRCLEQ_HEAD>. See the examples below for further explanation of how " |
| 392 |
#| "these macros are used." |
| 393 |
msgid "" |
| 394 |
"In the macro definitions, E<.Fa TYPE> is the name of a user defined " |
| 395 |
"structure, that must contain a field of type E<.Li SLIST_ENTRY>, E<.Li " |
| 396 |
"STAILQ_ENTRY>, E<.Li LIST_ENTRY>, or E<.Li TAILQ_ENTRY>, named E<.Fa NAME>. " |
| 397 |
"The argument E<.Fa HEADNAME> is the name of a user defined structure that " |
| 398 |
"must be declared using the macros E<.Li SLIST_HEAD>, E<.Li STAILQ_HEAD>, E<." |
| 399 |
"Li LIST_HEAD>, or E<.Li TAILQ_HEAD>. See the examples below for further " |
| 400 |
"explanation of how these macros are used." |
| 401 |
msgstr "" |
| 402 |
"En las definiciones de las macros, E<.Fa TYPE> es el nombre de una " |
| 403 |
"estructura definida por el usuario, que debe contener un campo de tipo E<.Li " |
| 404 |
"LIST_ENTRY>, E<.Li TAILQ_ENTRY>, o E<.Li CIRCLEQ_ENTRY>, con nombre E<.Fa " |
| 405 |
"NAME>. El argumento E<.Fa HEADNAME> es el nombre de una estructura definida " |
| 406 |
"por el usuario que debe ser declarada usando las macros E<.Li LIST_HEAD>, E<." |
| 407 |
"Li TAILQ_HEAD>, o E<.Li CIRCLEQ_HEAD>. Vea los ejemplos más abajo para una " |
| 408 |
"explicación más detallada sobre cómo se usan estas macros." |
| 409 |
|
| 410 |
#. type: Ss |
| 411 |
#: opensuse-leap-15-6 |
| 412 |
#, no-wrap |
| 413 |
msgid "Singly-linked lists" |
| 414 |
msgstr "" |
| 415 |
|
| 416 |
#. type: Plain text |
| 417 |
#: opensuse-leap-15-6 |
| 418 |
#, fuzzy |
| 419 |
#| msgid "" |
| 420 |
#| "A list is headed by a structure defined by the E<.Nm LIST_HEAD> macro. " |
| 421 |
#| "This structure contains a single pointer to the first element on the " |
| 422 |
#| "list. The elements are doubly linked so that an arbitrary element can be " |
| 423 |
#| "removed without traversing the list. New elements can be added to the " |
| 424 |
#| "list after an existing element or at the head of the list. A E<.Fa " |
| 425 |
#| "LIST_HEAD> structure is declared as follows:" |
| 426 |
msgid "" |
| 427 |
"A singly-linked list is headed by a structure defined by the E<.Nm " |
| 428 |
"SLIST_HEAD> macro. This structure contains a single pointer to the first " |
| 429 |
"element on the list. The elements are singly linked for minimum space and " |
| 430 |
"pointer manipulation overhead at the expense of O(n) removal for arbitrary " |
| 431 |
"elements. New elements can be added to the list after an existing element " |
| 432 |
"or at the head of the list. An E<.Fa SLIST_HEAD> structure is declared as " |
| 433 |
"follows:" |
| 434 |
msgstr "" |
| 435 |
"Una lista es encabezada por una estructura definida por la macro E<.Nm " |
| 436 |
"LIST_HEAD.> Esta estructura contiene un sólo puntero al primer elemento de " |
| 437 |
"la lista. Los elementos están doblemente enlazados por lo que puede " |
| 438 |
"eliminarse un elemento arbitrario sin recorrer la lista. Nuevos elementos " |
| 439 |
"pueden ser añadidos a la lista después de un elemento existente o en la " |
| 440 |
"cabeza de la lista. Una estructura E<.Fa LIST_HEAD> es declarada como sigue:" |
| 441 |
|
| 442 |
#. type: Plain text |
| 443 |
#: opensuse-leap-15-6 |
| 444 |
#, no-wrap |
| 445 |
msgid "SLIST_HEAD(HEADNAME, TYPE) head;\n" |
| 446 |
msgstr "SLIST_HEAD(HEADNAME, TYPE) head;\n" |
| 447 |
|
| 448 |
#. type: Plain text |
| 449 |
#: opensuse-leap-15-6 |
| 450 |
msgid "" |
| 451 |
"where E<.Fa HEADNAME> is the name of the structure to be defined, and E<.Fa " |
| 452 |
"TYPE> is the type of the elements to be linked into the list. A pointer to " |
| 453 |
"the head of the list can later be declared as:" |
| 454 |
msgstr "" |
| 455 |
"donde E<.Fa HEADNAME> es el nombre de la estructura a ser definida, y E<.Fa " |
| 456 |
"TYPE> es el tipo de elementos que serán enlazados en la lista. Un puntero a " |
| 457 |
"la cabeza de la lista puede ser declarado después como:" |
| 458 |
|
| 459 |
#. type: Plain text |
| 460 |
#: opensuse-leap-15-6 |
| 461 |
#, no-wrap |
| 462 |
msgid "struct HEADNAME *headp;\n" |
| 463 |
msgstr "struct HEADNAME *headp;\n" |
| 464 |
|
| 465 |
#. type: Plain text |
| 466 |
#: opensuse-leap-15-6 |
| 467 |
msgid "(The names E<.Li head> and E<.Li headp> are user selectable.)" |
| 468 |
msgstr "" |
| 469 |
"(Los nombres E<.Li head> y E<.Li headp> son seleccionables por el usuario.)" |
| 470 |
|
| 471 |
#. type: Plain text |
| 472 |
#: opensuse-leap-15-6 |
| 473 |
#, fuzzy |
| 474 |
#| msgid "" |
| 475 |
#| "The macro E<.Nm LIST_INIT> initializes the list referenced by E<.Fa head>." |
| 476 |
msgid "" |
| 477 |
"The macro E<.Nm SLIST_HEAD_INITIALIZER> evaluates to an initializer for the " |
| 478 |
"list E<.Fa head>." |
| 479 |
msgstr "" |
| 480 |
"La macro E<.Nm LIST_INIT> inicializa la lista referenciada por E<.Fa head>." |
| 481 |
|
| 482 |
#. type: Plain text |
| 483 |
#: opensuse-leap-15-6 |
| 484 |
#, fuzzy |
| 485 |
#| msgid "" |
| 486 |
#| "The macro E<.Nm LIST_ENTRY> declares a structure that connects the " |
| 487 |
#| "elements in the list." |
| 488 |
msgid "" |
| 489 |
"The macro E<.Nm SLIST_EMPTY> evaluates to true if there are no elements in " |
| 490 |
"the list." |
| 491 |
msgstr "" |
| 492 |
"La macro E<.Nm LIST_ENTRY> declara una estructura que conecta los elementos " |
| 493 |
"en la lista." |
| 494 |
|
| 495 |
#. type: Plain text |
| 496 |
#: opensuse-leap-15-6 |
| 497 |
msgid "" |
| 498 |
"The macro E<.Nm SLIST_ENTRY> declares a structure that connects the elements " |
| 499 |
"in the list." |
| 500 |
msgstr "" |
| 501 |
"La macro E<.Nm SLIST_ENTRY> declara una estructura que conecta los elementos " |
| 502 |
"en la lista." |
| 503 |
|
| 504 |
#. type: Plain text |
| 505 |
#: opensuse-leap-15-6 |
| 506 |
#, fuzzy |
| 507 |
#| msgid "" |
| 508 |
#| "The macro E<.Nm LIST_REMOVE> removes the element E<.Fa elm> from the list." |
| 509 |
msgid "" |
| 510 |
"The macro E<.Nm SLIST_FIRST> returns the first element in the list or NULL " |
| 511 |
"if the list is empty." |
| 512 |
msgstr "" |
| 513 |
"La macro E<.Nm LIST_REMOVE> elimina el elemento E<.Fa elm> de la lista." |
| 514 |
|
| 515 |
#. .Pp |
| 516 |
#. The macro |
| 517 |
#. .Nm SLIST_FOREACH_FROM |
| 518 |
#. behaves identically to |
| 519 |
#. .Nm SLIST_FOREACH |
| 520 |
#. when |
| 521 |
#. .Fa var |
| 522 |
#. is NULL, else it treats |
| 523 |
#. .Fa var |
| 524 |
#. as a previously found SLIST element and begins the loop at |
| 525 |
#. .Fa var |
| 526 |
#. instead of the first element in the SLIST referenced by |
| 527 |
#. .Fa head . |
| 528 |
#. .Pp |
| 529 |
#. The macro |
| 530 |
#. .Nm SLIST_FOREACH_SAFE |
| 531 |
#. traverses the list referenced by |
| 532 |
#. .Fa head |
| 533 |
#. in the forward direction, assigning each element in |
| 534 |
#. turn to |
| 535 |
#. .Fa var . |
| 536 |
#. However, unlike |
| 537 |
#. .Fn SLIST_FOREACH |
| 538 |
#. here it is permitted to both remove |
| 539 |
#. .Fa var |
| 540 |
#. as well as free it from within the loop safely without interfering with the |
| 541 |
#. traversal. |
| 542 |
#. .Pp |
| 543 |
#. The macro |
| 544 |
#. .Nm SLIST_FOREACH_FROM_SAFE |
| 545 |
#. behaves identically to |
| 546 |
#. .Nm SLIST_FOREACH_SAFE |
| 547 |
#. when |
| 548 |
#. .Fa var |
| 549 |
#. is NULL, else it treats |
| 550 |
#. .Fa var |
| 551 |
#. as a previously found SLIST element and begins the loop at |
| 552 |
#. .Fa var |
| 553 |
#. instead of the first element in the SLIST referenced by |
| 554 |
#. .Fa head . |
| 555 |
#. type: Plain text |
| 556 |
#: opensuse-leap-15-6 |
| 557 |
msgid "" |
| 558 |
"The macro E<.Nm SLIST_FOREACH> traverses the list referenced by E<.Fa head> " |
| 559 |
"in the forward direction, assigning each element in turn to E<.Fa var>." |
| 560 |
msgstr "" |
| 561 |
|
| 562 |
#. type: Plain text |
| 563 |
#: opensuse-leap-15-6 |
| 564 |
msgid "" |
| 565 |
"The macro E<.Nm SLIST_INIT> initializes the list referenced by E<.Fa head>." |
| 566 |
msgstr "" |
| 567 |
"La macro E<.Nm SLIST_INIT> inicializa la lista referenciada por E<.Fa head>." |
| 568 |
|
| 569 |
#. type: Plain text |
| 570 |
#: opensuse-leap-15-6 |
| 571 |
msgid "" |
| 572 |
"The macro E<.Nm SLIST_INSERT_HEAD> inserts the new element E<.Fa elm> at the " |
| 573 |
"head of the list." |
| 574 |
msgstr "" |
| 575 |
"La macro E<.Nm SLIST_INSERT_HEAD> inserta el nuevo elemento E<.Fa elm> en la " |
| 576 |
"cabeza de la lista." |
| 577 |
|
| 578 |
#. type: Plain text |
| 579 |
#: opensuse-leap-15-6 |
| 580 |
msgid "" |
| 581 |
"The macro E<.Nm SLIST_INSERT_AFTER> inserts the new element E<.Fa elm> after " |
| 582 |
"the element E<.Fa listelm>." |
| 583 |
msgstr "" |
| 584 |
"La macro E<.Nm SLIST_INSERT_AFTER> inserta el nuevo elemento E<.Fa elm> " |
| 585 |
"después del elemento E<.Fa listelm>." |
| 586 |
|
| 587 |
#. .Pp |
| 588 |
#. The macro |
| 589 |
#. .Nm SLIST_REMOVE_AFTER |
| 590 |
#. removes the element after |
| 591 |
#. .Fa elm |
| 592 |
#. from the list. |
| 593 |
#. Unlike |
| 594 |
#. .Fa SLIST_REMOVE , |
| 595 |
#. this macro does not traverse the entire list. |
| 596 |
#. type: Plain text |
| 597 |
#: opensuse-leap-15-6 |
| 598 |
#, fuzzy |
| 599 |
#| msgid "" |
| 600 |
#| "The macro E<.Nm LIST_ENTRY> declares a structure that connects the " |
| 601 |
#| "elements in the list." |
| 602 |
msgid "The macro E<.Nm SLIST_NEXT> returns the next element in the list." |
| 603 |
msgstr "" |
| 604 |
"La macro E<.Nm LIST_ENTRY> declara una estructura que conecta los elementos " |
| 605 |
"en la lista." |
| 606 |
|
| 607 |
#. type: Plain text |
| 608 |
#: opensuse-leap-15-6 |
| 609 |
msgid "" |
| 610 |
"The macro E<.Nm SLIST_REMOVE_HEAD> removes the element E<.Fa elm> from the " |
| 611 |
"head of the list. For optimum efficiency, elements being removed from the " |
| 612 |
"head of the list should explicitly use this macro instead of the generic E<." |
| 613 |
"Fa SLIST_REMOVE> macro." |
| 614 |
msgstr "" |
| 615 |
|
| 616 |
#. .Pp |
| 617 |
#. The macro |
| 618 |
#. .Nm SLIST_SWAP |
| 619 |
#. swaps the contents of |
| 620 |
#. .Fa head1 |
| 621 |
#. and |
| 622 |
#. .Fa head2 . |
| 623 |
#. type: Plain text |
| 624 |
#: opensuse-leap-15-6 |
| 625 |
msgid "" |
| 626 |
"The macro E<.Nm SLIST_REMOVE> removes the element E<.Fa elm> from the list." |
| 627 |
msgstr "" |
| 628 |
"La macro E<.Nm SLIST_REMOVE> elimina el elemento E<.Fa elm> de la lista." |
| 629 |
|
| 630 |
#. type: Ss |
| 631 |
#: opensuse-leap-15-6 |
| 632 |
#, no-wrap |
| 633 |
msgid "Singly-linked list example" |
| 634 |
msgstr "" |
| 635 |
|
| 636 |
#. type: Plain text |
| 637 |
#: opensuse-leap-15-6 |
| 638 |
#, fuzzy, no-wrap |
| 639 |
#| msgid "" |
| 640 |
#| "LIST_HEAD(listhead, entry) head;\n" |
| 641 |
#| "struct listhead *headp;\t\t/* List head. */\n" |
| 642 |
#| "struct entry {\n" |
| 643 |
#| "\t...\n" |
| 644 |
#| "\tLIST_ENTRY(entry) entries;\t/* List. */\n" |
| 645 |
#| "\t...\n" |
| 646 |
#| "} *n1, *n2, *np;\n" |
| 647 |
msgid "" |
| 648 |
"SLIST_HEAD(slisthead, entry) head =\n" |
| 649 |
" SLIST_HEAD_INITIALIZER(head);\n" |
| 650 |
"struct slisthead *headp;\t\t/* Singly-linked List\n" |
| 651 |
" head. */\n" |
| 652 |
"struct entry {\n" |
| 653 |
"\t...\n" |
| 654 |
"\tSLIST_ENTRY(entry) entries;\t/* Singly-linked List. */\n" |
| 655 |
"\t...\n" |
| 656 |
"} *n1, *n2, *n3, *np;\n" |
| 657 |
msgstr "" |
| 658 |
"LIST_HEAD(listhead, entry) head;\n" |
| 659 |
"struct listhead *headp;\t\t/* Cabeza de la lista. */\n" |
| 660 |
"struct entry {\n" |
| 661 |
"\t...\n" |
| 662 |
"\tLIST_ENTRY(entry) entries;\t/* Lista. */\n" |
| 663 |
"\t...\n" |
| 664 |
"} *n1, *n2, *np;\n" |
| 665 |
|
| 666 |
#. type: Plain text |
| 667 |
#: opensuse-leap-15-6 |
| 668 |
#, no-wrap |
| 669 |
msgid "SLIST_INIT(&head);\t\t\t/* Initialize the list. */\n" |
| 670 |
msgstr "SLIST_INIT(&head);\t\t\t/* Inicializa la lista. */\n" |
| 671 |
|
| 672 |
#. type: Plain text |
| 673 |
#: opensuse-leap-15-6 |
| 674 |
#, no-wrap |
| 675 |
msgid "" |
| 676 |
"n1 = malloc(sizeof(struct entry));\t/* Insert at the head. */\n" |
| 677 |
"SLIST_INSERT_HEAD(&head, n1, entries);\n" |
| 678 |
msgstr "" |
| 679 |
"n1 = malloc(sizeof(struct entry));\t/* Inserta en la cabeza. */\n" |
| 680 |
"SLIST_INSERT_HEAD(&head, n1, entries);\n" |
| 681 |
|
| 682 |
#. type: Plain text |
| 683 |
#: opensuse-leap-15-6 |
| 684 |
#, no-wrap |
| 685 |
msgid "" |
| 686 |
"n2 = malloc(sizeof(struct entry));\t/* Insert after. */\n" |
| 687 |
"SLIST_INSERT_AFTER(n1, n2, entries);\n" |
| 688 |
msgstr "" |
| 689 |
"n2 = malloc(sizeof(struct entry));\t/* Inserta después. */\n" |
| 690 |
"SLIST_INSERT_AFTER(n1, n2, entries);\n" |
| 691 |
|
| 692 |
#. type: Plain text |
| 693 |
#: opensuse-leap-15-6 |
| 694 |
#, no-wrap |
| 695 |
msgid "" |
| 696 |
"SLIST_REMOVE(&head, n2, entry, entries);/* Deletion. */\n" |
| 697 |
"free(n2);\n" |
| 698 |
msgstr "" |
| 699 |
|
| 700 |
#. /* Safe forward traversal. */ |
| 701 |
#. SLIST_FOREACH_SAFE(np, &head, entries, np_temp) { |
| 702 |
#. np\->do_stuff(); |
| 703 |
#. ... |
| 704 |
#. SLIST_REMOVE(&head, np, entry, entries); |
| 705 |
#. free(np); |
| 706 |
#. } |
| 707 |
#. type: Plain text |
| 708 |
#: opensuse-leap-15-6 |
| 709 |
#, no-wrap |
| 710 |
msgid "" |
| 711 |
"n3 = SLIST_FIRST(&head);\n" |
| 712 |
"SLIST_REMOVE_HEAD(&head, entries);\t/* Deletion from the head. */\n" |
| 713 |
"free(n3);\n" |
| 714 |
"\t\t\t\t\t/* Forward traversal. */\n" |
| 715 |
"SLIST_FOREACH(np, &head, entries)\n" |
| 716 |
"\tnp\\-E<gt> ...\n" |
| 717 |
msgstr "" |
| 718 |
|
| 719 |
#. type: Plain text |
| 720 |
#: opensuse-leap-15-6 |
| 721 |
#, no-wrap |
| 722 |
msgid "" |
| 723 |
"while (!SLIST_EMPTY(&head)) {\t\t/* List Deletion. */\n" |
| 724 |
"\tn1 = SLIST_FIRST(&head);\n" |
| 725 |
"\tSLIST_REMOVE_HEAD(&head, entries);\n" |
| 726 |
"\tfree(n1);\n" |
| 727 |
"}\n" |
| 728 |
msgstr "" |
| 729 |
|
| 730 |
#. type: Ss |
| 731 |
#: opensuse-leap-15-6 |
| 732 |
#, no-wrap |
| 733 |
msgid "Singly-linked tail queues" |
| 734 |
msgstr "" |
| 735 |
|
| 736 |
#. type: Plain text |
| 737 |
#: opensuse-leap-15-6 |
| 738 |
#, fuzzy |
| 739 |
#| msgid "" |
| 740 |
#| "A tail queue is headed by a structure defined by the E<.Nm TAILQ_HEAD> " |
| 741 |
#| "macro. This structure contains a pair of pointers, one to the first " |
| 742 |
#| "element in the tail queue and the other to the last element in the tail " |
| 743 |
#| "queue. The elements are doubly linked so that an arbitrary element can " |
| 744 |
#| "be removed without traversing the tail queue. New elements can be added " |
| 745 |
#| "to the tail queue after an existing element, at the head of the tail " |
| 746 |
#| "queue, or at the end of the tail queue. A E<.Fa TAILQ_HEAD> structure is " |
| 747 |
#| "declared as follows:" |
| 748 |
msgid "" |
| 749 |
"A singly-linked tail queue is headed by a structure defined by the E<.Nm " |
| 750 |
"STAILQ_HEAD> macro. This structure contains a pair of pointers, one to the " |
| 751 |
"first element in the tail queue and the other to the last element in the " |
| 752 |
"tail queue. The elements are singly linked for minimum space and pointer " |
| 753 |
"manipulation overhead at the expense of O(n) removal for arbitrary " |
| 754 |
"elements. New elements can be added to the tail queue after an existing " |
| 755 |
"element, at the head of the tail queue, or at the end of the tail queue. A " |
| 756 |
"E<.Fa STAILQ_HEAD> structure is declared as follows:" |
| 757 |
msgstr "" |
| 758 |
"Una cola es encabezada por una estructura definida por la macro E<.Nm " |
| 759 |
"TAILQ_HEAD.> Esta estructura contiene un par de punteros, uno al primer " |
| 760 |
"elemento en la cola y el otro al último elemento en la cola. Los elementos " |
| 761 |
"están doblemente enlazadas por lo que puede eliminarse un elemento " |
| 762 |
"arbitrario sin recorrer la cola. Nuevos elementos pueden añadirse a la cola " |
| 763 |
"después de un elemento existente, en la cabeza de la cola, o en el final de " |
| 764 |
"la cola. Una estructura E<.Fa TAILQ_HEAD> se declara como sigue:" |
| 765 |
|
| 766 |
#. type: Plain text |
| 767 |
#: opensuse-leap-15-6 |
| 768 |
#, no-wrap |
| 769 |
msgid "STAILQ_HEAD(HEADNAME, TYPE) head;\n" |
| 770 |
msgstr "STAILQ_HEAD(HEADNAME, TYPE) head;\n" |
| 771 |
|
| 772 |
#. type: Plain text |
| 773 |
#: opensuse-leap-15-6 |
| 774 |
msgid "" |
| 775 |
"where E<.Li HEADNAME> is the name of the structure to be defined, and E<.Li " |
| 776 |
"TYPE> is the type of the elements to be linked into the tail queue. A " |
| 777 |
"pointer to the head of the tail queue can later be declared as:" |
| 778 |
msgstr "" |
| 779 |
"donde E<.Li HEADNAME> es el nombre de la estructura a ser definida, y E<.Li " |
| 780 |
"TYPE> es el tipo de los elementos que serán enlazados en la cola. Un " |
| 781 |
"puntero a la cabeza de la cola puede ser declarado después como:" |
| 782 |
|
| 783 |
#. type: Plain text |
| 784 |
#: opensuse-leap-15-6 |
| 785 |
#, fuzzy |
| 786 |
#| msgid "" |
| 787 |
#| "The macro E<.Nm TAILQ_INIT> initializes the tail queue referenced by E<." |
| 788 |
#| "Fa head>." |
| 789 |
msgid "" |
| 790 |
"The macro E<.Nm STAILQ_HEAD_INITIALIZER> evaluates to an initializer for the " |
| 791 |
"tail queue E<.Fa head>." |
| 792 |
msgstr "" |
| 793 |
"La macro E<.Nm TAILQ_INIT> inicializa la cola referenciada por E<.Fa head>." |
| 794 |
|
| 795 |
#. type: Plain text |
| 796 |
#: opensuse-leap-15-6 |
| 797 |
msgid "" |
| 798 |
"The macro E<.Nm STAILQ_CONCAT> concatenates the tail queue headed by E<.Fa " |
| 799 |
"head2> onto the end of the one headed by E<.Fa head1> removing all entries " |
| 800 |
"from the former." |
| 801 |
msgstr "" |
| 802 |
|
| 803 |
#. type: Plain text |
| 804 |
#: opensuse-leap-15-6 |
| 805 |
#, fuzzy |
| 806 |
#| msgid "" |
| 807 |
#| "The macro E<.Nm TAILQ_ENTRY> declares a structure that connects the " |
| 808 |
#| "elements in the tail queue." |
| 809 |
msgid "" |
| 810 |
"The macro E<.Nm STAILQ_EMPTY> evaluates to true if there are no items on the " |
| 811 |
"tail queue." |
| 812 |
msgstr "" |
| 813 |
"La macro E<.Nm TAILQ_ENTRY> declara una estructura que conecta los elementos " |
| 814 |
"en la cola." |
| 815 |
|
| 816 |
#. type: Plain text |
| 817 |
#: opensuse-leap-15-6 |
| 818 |
msgid "" |
| 819 |
"The macro E<.Nm STAILQ_ENTRY> declares a structure that connects the " |
| 820 |
"elements in the tail queue." |
| 821 |
msgstr "" |
| 822 |
"La macro E<.Nm STAILQ_ENTRY> declara una estructura que conecta los " |
| 823 |
"elementos en la cola." |
| 824 |
|
| 825 |
#. type: Plain text |
| 826 |
#: opensuse-leap-15-6 |
| 827 |
#, fuzzy |
| 828 |
#| msgid "" |
| 829 |
#| "The macro E<.Nm TAILQ_INSERT_TAIL> inserts the new element E<.Fa elm> at " |
| 830 |
#| "the end of the tail queue." |
| 831 |
msgid "" |
| 832 |
"The macro E<.Nm STAILQ_FIRST> returns the first item on the tail queue or " |
| 833 |
"NULL if the tail queue is empty." |
| 834 |
msgstr "" |
| 835 |
"La macro E<.Nm TAILQ_INSERT_TAIL> inserta el nuevo elemento E<.Fa elm> en el " |
| 836 |
"final de la cola." |
| 837 |
|
| 838 |
#. .Pp |
| 839 |
#. The macro |
| 840 |
#. .Nm STAILQ_FOREACH_FROM |
| 841 |
#. behaves identically to |
| 842 |
#. .Nm STAILQ_FOREACH |
| 843 |
#. when |
| 844 |
#. .Fa var |
| 845 |
#. is NULL, else it treats |
| 846 |
#. .Fa var |
| 847 |
#. as a previously found STAILQ element and begins the loop at |
| 848 |
#. .Fa var |
| 849 |
#. instead of the first element in the STAILQ referenced by |
| 850 |
#. .Fa head . |
| 851 |
#. .Pp |
| 852 |
#. The macro |
| 853 |
#. .Nm STAILQ_FOREACH_SAFE |
| 854 |
#. traverses the tail queue referenced by |
| 855 |
#. .Fa head |
| 856 |
#. in the forward direction, assigning each element |
| 857 |
#. in turn to |
| 858 |
#. .Fa var . |
| 859 |
#. However, unlike |
| 860 |
#. .Fn STAILQ_FOREACH |
| 861 |
#. here it is permitted to both remove |
| 862 |
#. .Fa var |
| 863 |
#. as well as free it from within the loop safely without interfering with the |
| 864 |
#. traversal. |
| 865 |
#. .Pp |
| 866 |
#. The macro |
| 867 |
#. .Nm STAILQ_FOREACH_FROM_SAFE |
| 868 |
#. behaves identically to |
| 869 |
#. .Nm STAILQ_FOREACH_SAFE |
| 870 |
#. when |
| 871 |
#. .Fa var |
| 872 |
#. is NULL, else it treats |
| 873 |
#. .Fa var |
| 874 |
#. as a previously found STAILQ element and begins the loop at |
| 875 |
#. .Fa var |
| 876 |
#. instead of the first element in the STAILQ referenced by |
| 877 |
#. .Fa head . |
| 878 |
#. type: Plain text |
| 879 |
#: opensuse-leap-15-6 |
| 880 |
msgid "" |
| 881 |
"The macro E<.Nm STAILQ_FOREACH> traverses the tail queue referenced by E<.Fa " |
| 882 |
"head> in the forward direction, assigning each element in turn to E<.Fa var>." |
| 883 |
msgstr "" |
| 884 |
|
| 885 |
#. type: Plain text |
| 886 |
#: opensuse-leap-15-6 |
| 887 |
msgid "" |
| 888 |
"The macro E<.Nm STAILQ_INIT> initializes the tail queue referenced by E<.Fa " |
| 889 |
"head>." |
| 890 |
msgstr "" |
| 891 |
"La macro E<.Nm STAILQ_INIT> inicializa la cola referenciada por E<.Fa head>." |
| 892 |
|
| 893 |
#. type: Plain text |
| 894 |
#: opensuse-leap-15-6 |
| 895 |
msgid "" |
| 896 |
"The macro E<.Nm STAILQ_INSERT_HEAD> inserts the new element E<.Fa elm> at " |
| 897 |
"the head of the tail queue." |
| 898 |
msgstr "" |
| 899 |
"La macro E<.Nm STAILQ_INSERT_HEAD> inserta el nuevo elemento E<.Fa elm> en " |
| 900 |
"la cabeza de la cola." |
| 901 |
|
| 902 |
#. type: Plain text |
| 903 |
#: opensuse-leap-15-6 |
| 904 |
msgid "" |
| 905 |
"The macro E<.Nm STAILQ_INSERT_TAIL> inserts the new element E<.Fa elm> at " |
| 906 |
"the end of the tail queue." |
| 907 |
msgstr "" |
| 908 |
"La macro E<.Nm STAILQ_INSERT_TAIL> inserta el nuevo elemento E<.Fa elm> en " |
| 909 |
"el final de la cola." |
| 910 |
|
| 911 |
#. .Pp |
| 912 |
#. The macro |
| 913 |
#. .Nm STAILQ_LAST |
| 914 |
#. returns the last item on the tail queue. |
| 915 |
#. If the tail queue is empty the return value is |
| 916 |
#. .Dv NULL . |
| 917 |
#. type: Plain text |
| 918 |
#: opensuse-leap-15-6 |
| 919 |
msgid "" |
| 920 |
"The macro E<.Nm STAILQ_INSERT_AFTER> inserts the new element E<.Fa elm> " |
| 921 |
"after the element E<.Fa listelm>." |
| 922 |
msgstr "" |
| 923 |
"La macro E<.Nm STAILQ_INSERT_AFTER> inserta el nuevo elemento E<.Fa elm> " |
| 924 |
"después del elemento E<.Fa listelm>." |
| 925 |
|
| 926 |
#. .Pp |
| 927 |
#. The macro |
| 928 |
#. .Nm STAILQ_REMOVE_AFTER |
| 929 |
#. removes the element after |
| 930 |
#. .Fa elm |
| 931 |
#. from the tail queue. |
| 932 |
#. Unlike |
| 933 |
#. .Fa STAILQ_REMOVE , |
| 934 |
#. this macro does not traverse the entire tail queue. |
| 935 |
#. type: Plain text |
| 936 |
#: opensuse-leap-15-6 |
| 937 |
#, fuzzy |
| 938 |
#| msgid "" |
| 939 |
#| "The macro E<.Nm TAILQ_REMOVE> removes the element E<.Fa elm> from the " |
| 940 |
#| "tail queue." |
| 941 |
msgid "" |
| 942 |
"The macro E<.Nm STAILQ_NEXT> returns the next item on the tail queue, or " |
| 943 |
"NULL this item is the last." |
| 944 |
msgstr "" |
| 945 |
"La macro E<.Nm TAILQ_REMOVE> elimina el elemento E<.Fa elm> de la cola." |
| 946 |
|
| 947 |
#. type: Plain text |
| 948 |
#: opensuse-leap-15-6 |
| 949 |
msgid "" |
| 950 |
"The macro E<.Nm STAILQ_REMOVE_HEAD> removes the element at the head of the " |
| 951 |
"tail queue. For optimum efficiency, elements being removed from the head of " |
| 952 |
"the tail queue should use this macro explicitly rather than the generic E<." |
| 953 |
"Fa STAILQ_REMOVE> macro." |
| 954 |
msgstr "" |
| 955 |
|
| 956 |
#. .Pp |
| 957 |
#. The macro |
| 958 |
#. .Nm STAILQ_SWAP |
| 959 |
#. swaps the contents of |
| 960 |
#. .Fa head1 |
| 961 |
#. and |
| 962 |
#. .Fa head2 . |
| 963 |
#. type: Plain text |
| 964 |
#: opensuse-leap-15-6 |
| 965 |
msgid "" |
| 966 |
"The macro E<.Nm STAILQ_REMOVE> removes the element E<.Fa elm> from the tail " |
| 967 |
"queue." |
| 968 |
msgstr "" |
| 969 |
"La macro E<.Nm STAILQ_REMOVE> elimina el elemento E<.Fa elm> de la cola." |
| 970 |
|
| 971 |
#. type: Ss |
| 972 |
#: opensuse-leap-15-6 |
| 973 |
#, no-wrap |
| 974 |
msgid "Singly-linked tail queue example" |
| 975 |
msgstr "" |
| 976 |
|
| 977 |
#. type: Plain text |
| 978 |
#: opensuse-leap-15-6 |
| 979 |
#, fuzzy, no-wrap |
| 980 |
#| msgid "" |
| 981 |
#| "TAILQ_HEAD(tailhead, entry) head;\n" |
| 982 |
#| "struct tailhead *headp;\t\t/* Tail queue head. */\n" |
| 983 |
#| "struct entry {\n" |
| 984 |
#| "\t...\n" |
| 985 |
#| "\tTAILQ_ENTRY(entry) entries;\t/* Tail queue. */\n" |
| 986 |
#| "\t...\n" |
| 987 |
#| "} *n1, *n2, *np;\n" |
| 988 |
msgid "" |
| 989 |
"STAILQ_HEAD(stailhead, entry) head =\n" |
| 990 |
" STAILQ_HEAD_INITIALIZER(head);\n" |
| 991 |
"struct stailhead *headp;\t\t/* Singly-linked tail queue head. */\n" |
| 992 |
"struct entry {\n" |
| 993 |
"\t...\n" |
| 994 |
"\tSTAILQ_ENTRY(entry) entries;\t/* Tail queue. */\n" |
| 995 |
"\t...\n" |
| 996 |
"} *n1, *n2, *n3, *np;\n" |
| 997 |
msgstr "" |
| 998 |
"TAILQ_HEAD(tailhead, entry) head;\n" |
| 999 |
"struct tailhead *headp;\t\t/* Cabeza de la cola. */\n" |
| 1000 |
"struct entry {\n" |
| 1001 |
"\t...\n" |
| 1002 |
"\tTAILQ_ENTRY(entry) entries;\t/* Cola. */\n" |
| 1003 |
"\t...\n" |
| 1004 |
"} *n1, *n2, *np;\n" |
| 1005 |
|
| 1006 |
#. type: Plain text |
| 1007 |
#: opensuse-leap-15-6 |
| 1008 |
#, no-wrap |
| 1009 |
msgid "STAILQ_INIT(&head);\t\t\t/* Initialize the queue. */\n" |
| 1010 |
msgstr "STAILQ_INIT(&head);\t\t\t/* Inicializa la cola. */\n" |
| 1011 |
|
| 1012 |
#. type: Plain text |
| 1013 |
#: opensuse-leap-15-6 |
| 1014 |
#, no-wrap |
| 1015 |
msgid "" |
| 1016 |
"n1 = malloc(sizeof(struct entry));\t/* Insert at the head. */\n" |
| 1017 |
"STAILQ_INSERT_HEAD(&head, n1, entries);\n" |
| 1018 |
msgstr "" |
| 1019 |
"n1 = malloc(sizeof(struct entry));\t/* Inserta en la cabeza. */\n" |
| 1020 |
"STAILQ_INSERT_HEAD(&head, n1, entries);\n" |
| 1021 |
|
| 1022 |
#. type: Plain text |
| 1023 |
#: opensuse-leap-15-6 |
| 1024 |
#, no-wrap |
| 1025 |
msgid "" |
| 1026 |
"n1 = malloc(sizeof(struct entry));\t/* Insert at the tail. */\n" |
| 1027 |
"STAILQ_INSERT_TAIL(&head, n1, entries);\n" |
| 1028 |
msgstr "" |
| 1029 |
"n1 = malloc(sizeof(struct entry));\t/* Inserta en el final. */\n" |
| 1030 |
"STAILQ_INSERT_TAIL(&head, n1, entries);\n" |
| 1031 |
|
| 1032 |
#. /* Safe forward traversal. */ |
| 1033 |
#. STAILQ_FOREACH_SAFE(np, &head, entries, np_temp) { |
| 1034 |
#. np\->do_stuff(); |
| 1035 |
#. ... |
| 1036 |
#. STAILQ_REMOVE(&head, np, entry, entries); |
| 1037 |
#. free(np); |
| 1038 |
#. } |
| 1039 |
#. type: Plain text |
| 1040 |
#: opensuse-leap-15-6 |
| 1041 |
#, no-wrap |
| 1042 |
msgid "" |
| 1043 |
"n2 = malloc(sizeof(struct entry));\t/* Insert after. */\n" |
| 1044 |
"STAILQ_INSERT_AFTER(&head, n1, n2, entries);\n" |
| 1045 |
"\t\t\t\t\t/* Deletion. */\n" |
| 1046 |
"STAILQ_REMOVE(&head, n2, entry, entries);\n" |
| 1047 |
"free(n2);\n" |
| 1048 |
"\t\t\t\t\t/* Deletion from the head. */\n" |
| 1049 |
"n3 = STAILQ_FIRST(&head);\n" |
| 1050 |
"STAILQ_REMOVE_HEAD(&head, entries);\n" |
| 1051 |
"free(n3);\n" |
| 1052 |
"\t\t\t\t\t/* Forward traversal. */\n" |
| 1053 |
"STAILQ_FOREACH(np, &head, entries)\n" |
| 1054 |
"\tnp\\-E<gt> ...\n" |
| 1055 |
"\t\t\t\t\t/* TailQ Deletion. */\n" |
| 1056 |
"while (!STAILQ_EMPTY(&head)) {\n" |
| 1057 |
"\tn1 = STAILQ_FIRST(&head);\n" |
| 1058 |
"\tSTAILQ_REMOVE_HEAD(&head, entries);\n" |
| 1059 |
"\tfree(n1);\n" |
| 1060 |
"}\n" |
| 1061 |
"\t\t\t\t\t/* Faster TailQ Deletion. */\n" |
| 1062 |
"n1 = STAILQ_FIRST(&head);\n" |
| 1063 |
"while (n1 != NULL) {\n" |
| 1064 |
"\tn2 = STAILQ_NEXT(n1, entries);\n" |
| 1065 |
"\tfree(n1);\n" |
| 1066 |
"\tn1 = n2;\n" |
| 1067 |
"}\n" |
| 1068 |
"STAILQ_INIT(&head);\n" |
| 1069 |
msgstr "" |
| 1070 |
|
| 1071 |
#. type: Ss |
| 1072 |
#: opensuse-leap-15-6 |
| 1073 |
#, no-wrap |
| 1074 |
msgid "Lists" |
| 1075 |
msgstr "Listas" |
| 1076 |
|
| 1077 |
#. type: Plain text |
| 1078 |
#: opensuse-leap-15-6 |
| 1079 |
#, fuzzy |
| 1080 |
#| msgid "" |
| 1081 |
#| "A list is headed by a structure defined by the E<.Nm LIST_HEAD> macro. " |
| 1082 |
#| "This structure contains a single pointer to the first element on the " |
| 1083 |
#| "list. The elements are doubly linked so that an arbitrary element can be " |
| 1084 |
#| "removed without traversing the list. New elements can be added to the " |
| 1085 |
#| "list after an existing element or at the head of the list. A E<.Fa " |
| 1086 |
#| "LIST_HEAD> structure is declared as follows:" |
| 1087 |
msgid "" |
| 1088 |
"A list is headed by a structure defined by the E<.Nm LIST_HEAD> macro. This " |
| 1089 |
"structure contains a single pointer to the first element on the list. The " |
| 1090 |
"elements are doubly linked so that an arbitrary element can be removed " |
| 1091 |
"without traversing the list. New elements can be added to the list after an " |
| 1092 |
"existing element, before an existing element, or at the head of the list. A " |
| 1093 |
"E<.Fa LIST_HEAD> structure is declared as follows:" |
| 1094 |
msgstr "" |
| 1095 |
"Una lista es encabezada por una estructura definida por la macro E<.Nm " |
| 1096 |
"LIST_HEAD.> Esta estructura contiene un sólo puntero al primer elemento de " |
| 1097 |
"la lista. Los elementos están doblemente enlazados por lo que puede " |
| 1098 |
"eliminarse un elemento arbitrario sin recorrer la lista. Nuevos elementos " |
| 1099 |
"pueden ser añadidos a la lista después de un elemento existente o en la " |
| 1100 |
"cabeza de la lista. Una estructura E<.Fa LIST_HEAD> es declarada como sigue:" |
| 1101 |
|
| 1102 |
#. type: Plain text |
| 1103 |
#: opensuse-leap-15-6 |
| 1104 |
#, no-wrap |
| 1105 |
msgid "LIST_HEAD(HEADNAME, TYPE) head;\n" |
| 1106 |
msgstr "LIST_HEAD(HEADNAME, TYPE) head;\n" |
| 1107 |
|
| 1108 |
#. type: Plain text |
| 1109 |
#: opensuse-leap-15-6 |
| 1110 |
#, fuzzy |
| 1111 |
#| msgid "" |
| 1112 |
#| "The macro E<.Nm LIST_INIT> initializes the list referenced by E<.Fa head>." |
| 1113 |
msgid "" |
| 1114 |
"The macro E<.Nm LIST_HEAD_INITIALIZER> evaluates to an initializer for the " |
| 1115 |
"list E<.Fa head>." |
| 1116 |
msgstr "" |
| 1117 |
"La macro E<.Nm LIST_INIT> inicializa la lista referenciada por E<.Fa head>." |
| 1118 |
|
| 1119 |
#. type: Plain text |
| 1120 |
#: opensuse-leap-15-6 |
| 1121 |
#, fuzzy |
| 1122 |
#| msgid "" |
| 1123 |
#| "The macro E<.Nm LIST_ENTRY> declares a structure that connects the " |
| 1124 |
#| "elements in the list." |
| 1125 |
msgid "" |
| 1126 |
"The macro E<.Nm LIST_EMPTY> evaluates to true if there are no elements in " |
| 1127 |
"the list." |
| 1128 |
msgstr "" |
| 1129 |
"La macro E<.Nm LIST_ENTRY> declara una estructura que conecta los elementos " |
| 1130 |
"en la lista." |
| 1131 |
|
| 1132 |
#. type: Plain text |
| 1133 |
#: opensuse-leap-15-6 |
| 1134 |
msgid "" |
| 1135 |
"The macro E<.Nm LIST_ENTRY> declares a structure that connects the elements " |
| 1136 |
"in the list." |
| 1137 |
msgstr "" |
| 1138 |
"La macro E<.Nm LIST_ENTRY> declara una estructura que conecta los elementos " |
| 1139 |
"en la lista." |
| 1140 |
|
| 1141 |
#. type: Plain text |
| 1142 |
#: opensuse-leap-15-6 |
| 1143 |
#, fuzzy |
| 1144 |
#| msgid "" |
| 1145 |
#| "The macro E<.Nm LIST_REMOVE> removes the element E<.Fa elm> from the list." |
| 1146 |
msgid "" |
| 1147 |
"The macro E<.Nm LIST_FIRST> returns the first element in the list or NULL if " |
| 1148 |
"the list is empty." |
| 1149 |
msgstr "" |
| 1150 |
"La macro E<.Nm LIST_REMOVE> elimina el elemento E<.Fa elm> de la lista." |
| 1151 |
|
| 1152 |
#. .Pp |
| 1153 |
#. The macro |
| 1154 |
#. .Nm LIST_FOREACH_FROM |
| 1155 |
#. behaves identically to |
| 1156 |
#. .Nm LIST_FOREACH |
| 1157 |
#. when |
| 1158 |
#. .Fa var |
| 1159 |
#. is NULL, else it treats |
| 1160 |
#. .Fa var |
| 1161 |
#. as a previously found LIST element and begins the loop at |
| 1162 |
#. .Fa var |
| 1163 |
#. instead of the first element in the LIST referenced by |
| 1164 |
#. .Fa head . |
| 1165 |
#. .Pp |
| 1166 |
#. The macro |
| 1167 |
#. .Nm LIST_FOREACH_SAFE |
| 1168 |
#. traverses the list referenced by |
| 1169 |
#. .Fa head |
| 1170 |
#. in the forward direction, assigning each element in turn to |
| 1171 |
#. .Fa var . |
| 1172 |
#. However, unlike |
| 1173 |
#. .Fn LIST_FOREACH |
| 1174 |
#. here it is permitted to both remove |
| 1175 |
#. .Fa var |
| 1176 |
#. as well as free it from within the loop safely without interfering with the |
| 1177 |
#. traversal. |
| 1178 |
#. .Pp |
| 1179 |
#. The macro |
| 1180 |
#. .Nm LIST_FOREACH_FROM_SAFE |
| 1181 |
#. behaves identically to |
| 1182 |
#. .Nm LIST_FOREACH_SAFE |
| 1183 |
#. when |
| 1184 |
#. .Fa var |
| 1185 |
#. is NULL, else it treats |
| 1186 |
#. .Fa var |
| 1187 |
#. as a previously found LIST element and begins the loop at |
| 1188 |
#. .Fa var |
| 1189 |
#. instead of the first element in the LIST referenced by |
| 1190 |
#. .Fa head . |
| 1191 |
#. type: Plain text |
| 1192 |
#: opensuse-leap-15-6 |
| 1193 |
msgid "" |
| 1194 |
"The macro E<.Nm LIST_FOREACH> traverses the list referenced by E<.Fa head> " |
| 1195 |
"in the forward direction, assigning each element in turn to E<.Fa var>." |
| 1196 |
msgstr "" |
| 1197 |
|
| 1198 |
#. type: Plain text |
| 1199 |
#: opensuse-leap-15-6 |
| 1200 |
msgid "" |
| 1201 |
"The macro E<.Nm LIST_INIT> initializes the list referenced by E<.Fa head>." |
| 1202 |
msgstr "" |
| 1203 |
"La macro E<.Nm LIST_INIT> inicializa la lista referenciada por E<.Fa head>." |
| 1204 |
|
| 1205 |
#. type: Plain text |
| 1206 |
#: opensuse-leap-15-6 |
| 1207 |
msgid "" |
| 1208 |
"The macro E<.Nm LIST_INSERT_HEAD> inserts the new element E<.Fa elm> at the " |
| 1209 |
"head of the list." |
| 1210 |
msgstr "" |
| 1211 |
"La macro E<.Nm LIST_INSERT_HEAD> inserta el nuevo elemento E<.Fa elm> en la " |
| 1212 |
"cabeza de la lista." |
| 1213 |
|
| 1214 |
#. type: Plain text |
| 1215 |
#: opensuse-leap-15-6 |
| 1216 |
msgid "" |
| 1217 |
"The macro E<.Nm LIST_INSERT_AFTER> inserts the new element E<.Fa elm> after " |
| 1218 |
"the element E<.Fa listelm>." |
| 1219 |
msgstr "" |
| 1220 |
"La macro E<.Nm LIST_INSERT_AFTER> inserta el nuevo elemento E<.Fa elm> " |
| 1221 |
"después del elemento E<.Fa listelm>." |
| 1222 |
|
| 1223 |
#. type: Plain text |
| 1224 |
#: opensuse-leap-15-6 |
| 1225 |
msgid "" |
| 1226 |
"The macro E<.Nm LIST_INSERT_BEFORE> inserts the new element E<.Fa elm> " |
| 1227 |
"before the element E<.Fa listelm>." |
| 1228 |
msgstr "" |
| 1229 |
"La macro E<.Nm LIST_INSERT_BEFORE> inserta el nuevo elemento E<.Fa elm> " |
| 1230 |
"antes del elemento E<.Fa listelm>." |
| 1231 |
|
| 1232 |
#. .Pp |
| 1233 |
#. The macro |
| 1234 |
#. .Nm LIST_PREV |
| 1235 |
#. returns the previous element in the list, or NULL if this is the first. |
| 1236 |
#. List |
| 1237 |
#. .Fa head |
| 1238 |
#. must contain element |
| 1239 |
#. .Fa elm . |
| 1240 |
#. type: Plain text |
| 1241 |
#: opensuse-leap-15-6 |
| 1242 |
#, fuzzy |
| 1243 |
#| msgid "" |
| 1244 |
#| "The macro E<.Nm LIST_INSERT_HEAD> inserts the new element E<.Fa elm> at " |
| 1245 |
#| "the head of the list." |
| 1246 |
msgid "" |
| 1247 |
"The macro E<.Nm LIST_NEXT> returns the next element in the list, or NULL if " |
| 1248 |
"this is the last." |
| 1249 |
msgstr "" |
| 1250 |
"La macro E<.Nm LIST_INSERT_HEAD> inserta el nuevo elemento E<.Fa elm> en la " |
| 1251 |
"cabeza de la lista." |
| 1252 |
|
| 1253 |
#. .Pp |
| 1254 |
#. The macro |
| 1255 |
#. .Nm LIST_SWAP |
| 1256 |
#. swaps the contents of |
| 1257 |
#. .Fa head1 |
| 1258 |
#. and |
| 1259 |
#. .Fa head2 . |
| 1260 |
#. type: Plain text |
| 1261 |
#: opensuse-leap-15-6 |
| 1262 |
msgid "" |
| 1263 |
"The macro E<.Nm LIST_REMOVE> removes the element E<.Fa elm> from the list." |
| 1264 |
msgstr "" |
| 1265 |
"La macro E<.Nm LIST_REMOVE> elimina el elemento E<.Fa elm> de la lista." |
| 1266 |
|
| 1267 |
#. type: Ss |
| 1268 |
#: opensuse-leap-15-6 |
| 1269 |
#, no-wrap |
| 1270 |
msgid "List example" |
| 1271 |
msgstr "Ejemplo de lista" |
| 1272 |
|
| 1273 |
#. type: Plain text |
| 1274 |
#: opensuse-leap-15-6 |
| 1275 |
#, fuzzy, no-wrap |
| 1276 |
#| msgid "" |
| 1277 |
#| "LIST_HEAD(listhead, entry) head;\n" |
| 1278 |
#| "struct listhead *headp;\t\t/* List head. */\n" |
| 1279 |
#| "struct entry {\n" |
| 1280 |
#| "\t...\n" |
| 1281 |
#| "\tLIST_ENTRY(entry) entries;\t/* List. */\n" |
| 1282 |
#| "\t...\n" |
| 1283 |
#| "} *n1, *n2, *np;\n" |
| 1284 |
msgid "" |
| 1285 |
"LIST_HEAD(listhead, entry) head =\n" |
| 1286 |
" LIST_HEAD_INITIALIZER(head);\n" |
| 1287 |
"struct listhead *headp;\t\t\t/* List head. */\n" |
| 1288 |
"struct entry {\n" |
| 1289 |
"\t...\n" |
| 1290 |
"\tLIST_ENTRY(entry) entries;\t/* List. */\n" |
| 1291 |
"\t...\n" |
| 1292 |
"} *n1, *n2, *n3, *np, *np_temp;\n" |
| 1293 |
msgstr "" |
| 1294 |
"LIST_HEAD(listhead, entry) head;\n" |
| 1295 |
"struct listhead *headp;\t\t/* Cabeza de la lista. */\n" |
| 1296 |
"struct entry {\n" |
| 1297 |
"\t...\n" |
| 1298 |
"\tLIST_ENTRY(entry) entries;\t/* Lista. */\n" |
| 1299 |
"\t...\n" |
| 1300 |
"} *n1, *n2, *np;\n" |
| 1301 |
|
| 1302 |
#. type: Plain text |
| 1303 |
#: opensuse-leap-15-6 |
| 1304 |
#, no-wrap |
| 1305 |
msgid "LIST_INIT(&head);\t\t\t/* Initialize the list. */\n" |
| 1306 |
msgstr "LIST_INIT(&head);\t\t\t/* Inicializa la lista. */\n" |
| 1307 |
|
| 1308 |
#. type: Plain text |
| 1309 |
#: opensuse-leap-15-6 |
| 1310 |
#, no-wrap |
| 1311 |
msgid "" |
| 1312 |
"n1 = malloc(sizeof(struct entry));\t/* Insert at the head. */\n" |
| 1313 |
"LIST_INSERT_HEAD(&head, n1, entries);\n" |
| 1314 |
msgstr "" |
| 1315 |
"n1 = malloc(sizeof(struct entry));\t/* Inserta en la cabeza. */\n" |
| 1316 |
"LIST_INSERT_HEAD(&head, n1, entries);\n" |
| 1317 |
|
| 1318 |
#. type: Plain text |
| 1319 |
#: opensuse-leap-15-6 |
| 1320 |
#, no-wrap |
| 1321 |
msgid "" |
| 1322 |
"n2 = malloc(sizeof(struct entry));\t/* Insert after. */\n" |
| 1323 |
"LIST_INSERT_AFTER(n1, n2, entries);\n" |
| 1324 |
msgstr "" |
| 1325 |
"n2 = malloc(sizeof(struct entry));\t/* Inserta después. */\n" |
| 1326 |
"LIST_INSERT_AFTER(n1, n2, entries);\n" |
| 1327 |
|
| 1328 |
#. type: Plain text |
| 1329 |
#: opensuse-leap-15-6 |
| 1330 |
#, no-wrap |
| 1331 |
msgid "" |
| 1332 |
"n3 = malloc(sizeof(struct entry));\t/* Insert before. */\n" |
| 1333 |
"LIST_INSERT_BEFORE(n2, n3, entries);\n" |
| 1334 |
msgstr "" |
| 1335 |
"n3 = malloc(sizeof(struct entry));\t/* Inserta en la cabeza. */\n" |
| 1336 |
"LIST_INSERT_BEFORE(n2, n3, entries);\n" |
| 1337 |
|
| 1338 |
#. type: Plain text |
| 1339 |
#: opensuse-leap-15-6 |
| 1340 |
#, no-wrap |
| 1341 |
msgid "" |
| 1342 |
"LIST_REMOVE(n2, entries);\t\t/* Deletion. */\n" |
| 1343 |
"free(n2);\n" |
| 1344 |
"\t\t\t\t\t/* Forward traversal. */\n" |
| 1345 |
"LIST_FOREACH(np, &head, entries)\n" |
| 1346 |
"\tnp\\-E<gt> ...\n" |
| 1347 |
msgstr "" |
| 1348 |
|
| 1349 |
#. /* Safe forward traversal. */ |
| 1350 |
#. LIST_FOREACH_SAFE(np, &head, entries, np_temp) { |
| 1351 |
#. np\->do_stuff(); |
| 1352 |
#. ... |
| 1353 |
#. LIST_REMOVE(np, entries); |
| 1354 |
#. free(np); |
| 1355 |
#. } |
| 1356 |
#. type: Plain text |
| 1357 |
#: opensuse-leap-15-6 |
| 1358 |
#, no-wrap |
| 1359 |
msgid "" |
| 1360 |
"while (!LIST_EMPTY(&head)) {\t\t/* List Deletion. */\n" |
| 1361 |
"\tn1 = LIST_FIRST(&head);\n" |
| 1362 |
"\tLIST_REMOVE(n1, entries);\n" |
| 1363 |
"\tfree(n1);\n" |
| 1364 |
"}\n" |
| 1365 |
msgstr "" |
| 1366 |
|
| 1367 |
#. type: Plain text |
| 1368 |
#: opensuse-leap-15-6 |
| 1369 |
#, no-wrap |
| 1370 |
msgid "" |
| 1371 |
"n1 = LIST_FIRST(&head);\t\t\t/* Faster List Deletion. */\n" |
| 1372 |
"while (n1 != NULL) {\n" |
| 1373 |
"\tn2 = LIST_NEXT(n1, entries);\n" |
| 1374 |
"\tfree(n1);\n" |
| 1375 |
"\tn1 = n2;\n" |
| 1376 |
"}\n" |
| 1377 |
"LIST_INIT(&head);\n" |
| 1378 |
msgstr "" |
| 1379 |
|
| 1380 |
#. type: Ss |
| 1381 |
#: opensuse-leap-15-6 |
| 1382 |
#, no-wrap |
| 1383 |
msgid "Tail queues" |
| 1384 |
msgstr "" |
| 1385 |
|
| 1386 |
#. type: Plain text |
| 1387 |
#: opensuse-leap-15-6 |
| 1388 |
#, fuzzy |
| 1389 |
#| msgid "" |
| 1390 |
#| "A tail queue is headed by a structure defined by the E<.Nm TAILQ_HEAD> " |
| 1391 |
#| "macro. This structure contains a pair of pointers, one to the first " |
| 1392 |
#| "element in the tail queue and the other to the last element in the tail " |
| 1393 |
#| "queue. The elements are doubly linked so that an arbitrary element can " |
| 1394 |
#| "be removed without traversing the tail queue. New elements can be added " |
| 1395 |
#| "to the tail queue after an existing element, at the head of the tail " |
| 1396 |
#| "queue, or at the end of the tail queue. A E<.Fa TAILQ_HEAD> structure is " |
| 1397 |
#| "declared as follows:" |
| 1398 |
msgid "" |
| 1399 |
"A tail queue is headed by a structure defined by the E<.Nm TAILQ_HEAD> " |
| 1400 |
"macro. This structure contains a pair of pointers, one to the first element " |
| 1401 |
"in the tail queue and the other to the last element in the tail queue. The " |
| 1402 |
"elements are doubly linked so that an arbitrary element can be removed " |
| 1403 |
"without traversing the tail queue. New elements can be added to the tail " |
| 1404 |
"queue after an existing element, before an existing element, at the head of " |
| 1405 |
"the tail queue, or at the end of the tail queue. A E<.Fa TAILQ_HEAD> " |
| 1406 |
"structure is declared as follows:" |
| 1407 |
msgstr "" |
| 1408 |
"Una cola es encabezada por una estructura definida por la macro E<.Nm " |
| 1409 |
"TAILQ_HEAD.> Esta estructura contiene un par de punteros, uno al primer " |
| 1410 |
"elemento en la cola y el otro al último elemento en la cola. Los elementos " |
| 1411 |
"están doblemente enlazadas por lo que puede eliminarse un elemento " |
| 1412 |
"arbitrario sin recorrer la cola. Nuevos elementos pueden añadirse a la cola " |
| 1413 |
"después de un elemento existente, en la cabeza de la cola, o en el final de " |
| 1414 |
"la cola. Una estructura E<.Fa TAILQ_HEAD> se declara como sigue:" |
| 1415 |
|
| 1416 |
#. type: Plain text |
| 1417 |
#: opensuse-leap-15-6 |
| 1418 |
#, no-wrap |
| 1419 |
msgid "TAILQ_HEAD(HEADNAME, TYPE) head;\n" |
| 1420 |
msgstr "TAILQ_HEAD(HEADNAME, TYPE) head;\n" |
| 1421 |
|
| 1422 |
#. type: Plain text |
| 1423 |
#: opensuse-leap-15-6 |
| 1424 |
#, fuzzy |
| 1425 |
#| msgid "" |
| 1426 |
#| "The macro E<.Nm TAILQ_INIT> initializes the tail queue referenced by E<." |
| 1427 |
#| "Fa head>." |
| 1428 |
msgid "" |
| 1429 |
"The macro E<.Nm TAILQ_HEAD_INITIALIZER> evaluates to an initializer for the " |
| 1430 |
"tail queue E<.Fa head>." |
| 1431 |
msgstr "" |
| 1432 |
"La macro E<.Nm TAILQ_INIT> inicializa la cola referenciada por E<.Fa head>." |
| 1433 |
|
| 1434 |
#. type: Plain text |
| 1435 |
#: opensuse-leap-15-6 |
| 1436 |
msgid "" |
| 1437 |
"The macro E<.Nm TAILQ_CONCAT> concatenates the tail queue headed by E<.Fa " |
| 1438 |
"head2> onto the end of the one headed by E<.Fa head1> removing all entries " |
| 1439 |
"from the former." |
| 1440 |
msgstr "" |
| 1441 |
|
| 1442 |
#. type: Plain text |
| 1443 |
#: opensuse-leap-15-6 |
| 1444 |
#, fuzzy |
| 1445 |
#| msgid "" |
| 1446 |
#| "The macro E<.Nm TAILQ_ENTRY> declares a structure that connects the " |
| 1447 |
#| "elements in the tail queue." |
| 1448 |
msgid "" |
| 1449 |
"The macro E<.Nm TAILQ_EMPTY> evaluates to true if there are no items on the " |
| 1450 |
"tail queue." |
| 1451 |
msgstr "" |
| 1452 |
"La macro E<.Nm TAILQ_ENTRY> declara una estructura que conecta los elementos " |
| 1453 |
"en la cola." |
| 1454 |
|
| 1455 |
#. type: Plain text |
| 1456 |
#: opensuse-leap-15-6 |
| 1457 |
msgid "" |
| 1458 |
"The macro E<.Nm TAILQ_ENTRY> declares a structure that connects the elements " |
| 1459 |
"in the tail queue." |
| 1460 |
msgstr "" |
| 1461 |
"La macro E<.Nm TAILQ_ENTRY> declara una estructura que conecta los elementos " |
| 1462 |
"en la cola." |
| 1463 |
|
| 1464 |
#. type: Plain text |
| 1465 |
#: opensuse-leap-15-6 |
| 1466 |
#, fuzzy |
| 1467 |
#| msgid "" |
| 1468 |
#| "The macro E<.Nm TAILQ_INSERT_TAIL> inserts the new element E<.Fa elm> at " |
| 1469 |
#| "the end of the tail queue." |
| 1470 |
msgid "" |
| 1471 |
"The macro E<.Nm TAILQ_FIRST> returns the first item on the tail queue or " |
| 1472 |
"NULL if the tail queue is empty." |
| 1473 |
msgstr "" |
| 1474 |
"La macro E<.Nm TAILQ_INSERT_TAIL> inserta el nuevo elemento E<.Fa elm> en el " |
| 1475 |
"final de la cola." |
| 1476 |
|
| 1477 |
#. .Pp |
| 1478 |
#. The macro |
| 1479 |
#. .Nm TAILQ_FOREACH_FROM |
| 1480 |
#. behaves identically to |
| 1481 |
#. .Nm TAILQ_FOREACH |
| 1482 |
#. when |
| 1483 |
#. .Fa var |
| 1484 |
#. is NULL, else it treats |
| 1485 |
#. .Fa var |
| 1486 |
#. as a previously found TAILQ element and begins the loop at |
| 1487 |
#. .Fa var |
| 1488 |
#. instead of the first element in the TAILQ referenced by |
| 1489 |
#. .Fa head . |
| 1490 |
#. type: Plain text |
| 1491 |
#: opensuse-leap-15-6 |
| 1492 |
msgid "" |
| 1493 |
"The macro E<.Nm TAILQ_FOREACH> traverses the tail queue referenced by E<.Fa " |
| 1494 |
"head> in the forward direction, assigning each element in turn to E<.Fa " |
| 1495 |
"var>. E<.Fa var> is set to E<.Dv NULL> if the loop completes normally, or " |
| 1496 |
"if there were no elements." |
| 1497 |
msgstr "" |
| 1498 |
|
| 1499 |
#. .Pp |
| 1500 |
#. The macro |
| 1501 |
#. .Nm TAILQ_FOREACH_REVERSE_FROM |
| 1502 |
#. behaves identically to |
| 1503 |
#. .Nm TAILQ_FOREACH_REVERSE |
| 1504 |
#. when |
| 1505 |
#. .Fa var |
| 1506 |
#. is NULL, else it treats |
| 1507 |
#. .Fa var |
| 1508 |
#. as a previously found TAILQ element and begins the reverse loop at |
| 1509 |
#. .Fa var |
| 1510 |
#. instead of the last element in the TAILQ referenced by |
| 1511 |
#. .Fa head . |
| 1512 |
#. .Pp |
| 1513 |
#. The macros |
| 1514 |
#. .Nm TAILQ_FOREACH_SAFE |
| 1515 |
#. and |
| 1516 |
#. .Nm TAILQ_FOREACH_REVERSE_SAFE |
| 1517 |
#. traverse the list referenced by |
| 1518 |
#. .Fa head |
| 1519 |
#. in the forward or reverse direction respectively, |
| 1520 |
#. assigning each element in turn to |
| 1521 |
#. .Fa var . |
| 1522 |
#. However, unlike their unsafe counterparts, |
| 1523 |
#. .Nm TAILQ_FOREACH |
| 1524 |
#. and |
| 1525 |
#. .Nm TAILQ_FOREACH_REVERSE |
| 1526 |
#. permit to both remove |
| 1527 |
#. .Fa var |
| 1528 |
#. as well as free it from within the loop safely without interfering with the |
| 1529 |
#. traversal. |
| 1530 |
#. .Pp |
| 1531 |
#. The macro |
| 1532 |
#. .Nm TAILQ_FOREACH_FROM_SAFE |
| 1533 |
#. behaves identically to |
| 1534 |
#. .Nm TAILQ_FOREACH_SAFE |
| 1535 |
#. when |
| 1536 |
#. .Fa var |
| 1537 |
#. is NULL, else it treats |
| 1538 |
#. .Fa var |
| 1539 |
#. as a previously found TAILQ element and begins the loop at |
| 1540 |
#. .Fa var |
| 1541 |
#. instead of the first element in the TAILQ referenced by |
| 1542 |
#. .Fa head . |
| 1543 |
#. .Pp |
| 1544 |
#. The macro |
| 1545 |
#. .Nm TAILQ_FOREACH_REVERSE_FROM_SAFE |
| 1546 |
#. behaves identically to |
| 1547 |
#. .Nm TAILQ_FOREACH_REVERSE_SAFE |
| 1548 |
#. when |
| 1549 |
#. .Fa var |
| 1550 |
#. is NULL, else it treats |
| 1551 |
#. .Fa var |
| 1552 |
#. as a previously found TAILQ element and begins the reverse loop at |
| 1553 |
#. .Fa var |
| 1554 |
#. instead of the last element in the TAILQ referenced by |
| 1555 |
#. .Fa head . |
| 1556 |
#. type: Plain text |
| 1557 |
#: opensuse-leap-15-6 |
| 1558 |
msgid "" |
| 1559 |
"The macro E<.Nm TAILQ_FOREACH_REVERSE> traverses the tail queue referenced " |
| 1560 |
"by E<.Fa head> in the reverse direction, assigning each element in turn to " |
| 1561 |
"E<.Fa var>." |
| 1562 |
msgstr "" |
| 1563 |
|
| 1564 |
#. type: Plain text |
| 1565 |
#: opensuse-leap-15-6 |
| 1566 |
msgid "" |
| 1567 |
"The macro E<.Nm TAILQ_INIT> initializes the tail queue referenced by E<.Fa " |
| 1568 |
"head>." |
| 1569 |
msgstr "" |
| 1570 |
"La macro E<.Nm TAILQ_INIT> inicializa la cola referenciada por E<.Fa head>." |
| 1571 |
|
| 1572 |
#. type: Plain text |
| 1573 |
#: opensuse-leap-15-6 |
| 1574 |
msgid "" |
| 1575 |
"The macro E<.Nm TAILQ_INSERT_HEAD> inserts the new element E<.Fa elm> at the " |
| 1576 |
"head of the tail queue." |
| 1577 |
msgstr "" |
| 1578 |
"La macro E<.Nm TAILQ_INSERT_HEAD> inserta el nuevo elemento E<.Fa elm> en la " |
| 1579 |
"cabeza de la cola." |
| 1580 |
|
| 1581 |
#. type: Plain text |
| 1582 |
#: opensuse-leap-15-6 |
| 1583 |
msgid "" |
| 1584 |
"The macro E<.Nm TAILQ_INSERT_TAIL> inserts the new element E<.Fa elm> at the " |
| 1585 |
"end of the tail queue." |
| 1586 |
msgstr "" |
| 1587 |
"La macro E<.Nm TAILQ_INSERT_TAIL> inserta el nuevo elemento E<.Fa elm> en el " |
| 1588 |
"final de la cola." |
| 1589 |
|
| 1590 |
#. type: Plain text |
| 1591 |
#: opensuse-leap-15-6 |
| 1592 |
msgid "" |
| 1593 |
"The macro E<.Nm TAILQ_INSERT_AFTER> inserts the new element E<.Fa elm> after " |
| 1594 |
"the element E<.Fa listelm>." |
| 1595 |
msgstr "" |
| 1596 |
"La macro E<.Nm TAILQ_INSERT_AFTER> inserta el nuevo elemento E<.Fa elm> " |
| 1597 |
"después del elemento E<.Fa listelm>." |
| 1598 |
|
| 1599 |
#. type: Plain text |
| 1600 |
#: opensuse-leap-15-6 |
| 1601 |
msgid "" |
| 1602 |
"The macro E<.Nm TAILQ_INSERT_BEFORE> inserts the new element E<.Fa elm> " |
| 1603 |
"before the element E<.Fa listelm>." |
| 1604 |
msgstr "" |
| 1605 |
"La macro E<.Nm TAILQ_INSERT_BEFORE> inserta el nuevo elemento E<.Fa elm> " |
| 1606 |
"antes del elemento E<.Fa listelm>." |
| 1607 |
|
| 1608 |
#. type: Plain text |
| 1609 |
#: opensuse-leap-15-6 |
| 1610 |
msgid "" |
| 1611 |
"The macro E<.Nm TAILQ_LAST> returns the last item on the tail queue. If the " |
| 1612 |
"tail queue is empty the return value is E<.Dv NULL>." |
| 1613 |
msgstr "" |
| 1614 |
|
| 1615 |
#. type: Plain text |
| 1616 |
#: opensuse-leap-15-6 |
| 1617 |
#, fuzzy |
| 1618 |
#| msgid "" |
| 1619 |
#| "The macro E<.Nm TAILQ_REMOVE> removes the element E<.Fa elm> from the " |
| 1620 |
#| "tail queue." |
| 1621 |
msgid "" |
| 1622 |
"The macro E<.Nm TAILQ_NEXT> returns the next item on the tail queue, or NULL " |
| 1623 |
"if this item is the last." |
| 1624 |
msgstr "" |
| 1625 |
"La macro E<.Nm TAILQ_REMOVE> elimina el elemento E<.Fa elm> de la cola." |
| 1626 |
|
| 1627 |
#. type: Plain text |
| 1628 |
#: opensuse-leap-15-6 |
| 1629 |
#, fuzzy |
| 1630 |
#| msgid "" |
| 1631 |
#| "The macro E<.Nm TAILQ_REMOVE> removes the element E<.Fa elm> from the " |
| 1632 |
#| "tail queue." |
| 1633 |
msgid "" |
| 1634 |
"The macro E<.Nm TAILQ_PREV> returns the previous item on the tail queue, or " |
| 1635 |
"NULL if this item is the first." |
| 1636 |
msgstr "" |
| 1637 |
"La macro E<.Nm TAILQ_REMOVE> elimina el elemento E<.Fa elm> de la cola." |
| 1638 |
|
| 1639 |
#. type: Plain text |
| 1640 |
#: opensuse-leap-15-6 |
| 1641 |
msgid "" |
| 1642 |
"The macro E<.Nm TAILQ_REMOVE> removes the element E<.Fa elm> from the tail " |
| 1643 |
"queue." |
| 1644 |
msgstr "" |
| 1645 |
"La macro E<.Nm TAILQ_REMOVE> elimina el elemento E<.Fa elm> de la cola." |
| 1646 |
|
| 1647 |
#. type: Plain text |
| 1648 |
#: opensuse-leap-15-6 |
| 1649 |
#, fuzzy |
| 1650 |
#| msgid "" |
| 1651 |
#| "The macro E<.Nm TAILQ_INSERT_AFTER> inserts the new element E<.Fa elm> " |
| 1652 |
#| "after the element E<.Fa listelm>." |
| 1653 |
msgid "" |
| 1654 |
"The macro E<.Nm TAILQ_SWAP> swaps the contents of E<.Fa head1> and E<.Fa " |
| 1655 |
"head2>." |
| 1656 |
msgstr "" |
| 1657 |
"La macro E<.Nm TAILQ_INSERT_AFTER> inserta el nuevo elemento E<.Fa elm> " |
| 1658 |
"después del elemento E<.Fa listelm>." |
| 1659 |
|
| 1660 |
#. type: Ss |
| 1661 |
#: opensuse-leap-15-6 |
| 1662 |
#, no-wrap |
| 1663 |
msgid "Tail queue example" |
| 1664 |
msgstr "" |
| 1665 |
|
| 1666 |
#. type: Plain text |
| 1667 |
#: opensuse-leap-15-6 |
| 1668 |
#, fuzzy, no-wrap |
| 1669 |
#| msgid "" |
| 1670 |
#| "TAILQ_HEAD(tailhead, entry) head;\n" |
| 1671 |
#| "struct tailhead *headp;\t\t/* Tail queue head. */\n" |
| 1672 |
#| "struct entry {\n" |
| 1673 |
#| "\t...\n" |
| 1674 |
#| "\tTAILQ_ENTRY(entry) entries;\t/* Tail queue. */\n" |
| 1675 |
#| "\t...\n" |
| 1676 |
#| "} *n1, *n2, *np;\n" |
| 1677 |
msgid "" |
| 1678 |
"TAILQ_HEAD(tailhead, entry) head =\n" |
| 1679 |
" TAILQ_HEAD_INITIALIZER(head);\n" |
| 1680 |
"struct tailhead *headp;\t\t\t/* Tail queue head. */\n" |
| 1681 |
"struct entry {\n" |
| 1682 |
"\t...\n" |
| 1683 |
"\tTAILQ_ENTRY(entry) entries;\t/* Tail queue. */\n" |
| 1684 |
"\t...\n" |
| 1685 |
"} *n1, *n2, *n3, *np;\n" |
| 1686 |
msgstr "" |
| 1687 |
"TAILQ_HEAD(tailhead, entry) head;\n" |
| 1688 |
"struct tailhead *headp;\t\t/* Cabeza de la cola. */\n" |
| 1689 |
"struct entry {\n" |
| 1690 |
"\t...\n" |
| 1691 |
"\tTAILQ_ENTRY(entry) entries;\t/* Cola. */\n" |
| 1692 |
"\t...\n" |
| 1693 |
"} *n1, *n2, *np;\n" |
| 1694 |
|
| 1695 |
#. type: Plain text |
| 1696 |
#: opensuse-leap-15-6 |
| 1697 |
#, no-wrap |
| 1698 |
msgid "TAILQ_INIT(&head);\t\t\t/* Initialize the queue. */\n" |
| 1699 |
msgstr "TAILQ_INIT(&head);\t\t\t/* Inicializa la cola. */\n" |
| 1700 |
|
| 1701 |
#. type: Plain text |
| 1702 |
#: opensuse-leap-15-6 |
| 1703 |
#, no-wrap |
| 1704 |
msgid "" |
| 1705 |
"n1 = malloc(sizeof(struct entry));\t/* Insert at the head. */\n" |
| 1706 |
"TAILQ_INSERT_HEAD(&head, n1, entries);\n" |
| 1707 |
msgstr "" |
| 1708 |
"n1 = malloc(sizeof(struct entry));\t/* Inserta en la cabeza. */\n" |
| 1709 |
"TAILQ_INSERT_HEAD(&head, n1, entries);\n" |
| 1710 |
|
| 1711 |
#. type: Plain text |
| 1712 |
#: opensuse-leap-15-6 |
| 1713 |
#, no-wrap |
| 1714 |
msgid "" |
| 1715 |
"n1 = malloc(sizeof(struct entry));\t/* Insert at the tail. */\n" |
| 1716 |
"TAILQ_INSERT_TAIL(&head, n1, entries);\n" |
| 1717 |
msgstr "" |
| 1718 |
"n1 = malloc(sizeof(struct entry));\t/* Inserta en el final. */\n" |
| 1719 |
"TAILQ_INSERT_TAIL(&head, n1, entries);\n" |
| 1720 |
|
| 1721 |
#. type: Plain text |
| 1722 |
#: opensuse-leap-15-6 |
| 1723 |
#, no-wrap |
| 1724 |
msgid "" |
| 1725 |
"n2 = malloc(sizeof(struct entry));\t/* Insert after. */\n" |
| 1726 |
"TAILQ_INSERT_AFTER(&head, n1, n2, entries);\n" |
| 1727 |
msgstr "" |
| 1728 |
"n2 = malloc(sizeof(struct entry));\t/* Inserta después. */\n" |
| 1729 |
"TAILQ_INSERT_AFTER(&head, n1, n2, entries);\n" |
| 1730 |
|
| 1731 |
#. type: Plain text |
| 1732 |
#: opensuse-leap-15-6 |
| 1733 |
#, fuzzy, no-wrap |
| 1734 |
#| msgid "" |
| 1735 |
#| "n1 = malloc(sizeof(struct entry));\t/* Insert at the head. */\n" |
| 1736 |
#| "TAILQ_INSERT_HEAD(&head, n1, entries);\n" |
| 1737 |
msgid "" |
| 1738 |
"n3 = malloc(sizeof(struct entry));\t/* Insert before. */\n" |
| 1739 |
"TAILQ_INSERT_BEFORE(n2, n3, entries);\n" |
| 1740 |
msgstr "" |
| 1741 |
"n1 = malloc(sizeof(struct entry));\t/* Inserta en la cabeza. */\n" |
| 1742 |
"TAILQ_INSERT_HEAD(&head, n1, entries);\n" |
| 1743 |
|
| 1744 |
#. /* Safe forward traversal. */ |
| 1745 |
#. TAILQ_FOREACH_SAFE(np, &head, entries, np_temp) { |
| 1746 |
#. np\->do_stuff(); |
| 1747 |
#. ... |
| 1748 |
#. TAILQ_REMOVE(&head, np, entries); |
| 1749 |
#. free(np); |
| 1750 |
#. } |
| 1751 |
#. type: Plain text |
| 1752 |
#: opensuse-leap-15-6 |
| 1753 |
#, no-wrap |
| 1754 |
msgid "" |
| 1755 |
"TAILQ_REMOVE(&head, n2, entries);\t/* Deletion. */\n" |
| 1756 |
"free(n2);\n" |
| 1757 |
"\t\t\t\t\t/* Forward traversal. */\n" |
| 1758 |
"TAILQ_FOREACH(np, &head, entries)\n" |
| 1759 |
"\tnp\\-E<gt> ...\n" |
| 1760 |
"\t\t\t\t\t/* Reverse traversal. */\n" |
| 1761 |
"TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)\n" |
| 1762 |
"\tnp\\-E<gt> ...\n" |
| 1763 |
"\t\t\t\t\t/* TailQ Deletion. */\n" |
| 1764 |
"while (!TAILQ_EMPTY(&head)) {\n" |
| 1765 |
"\tn1 = TAILQ_FIRST(&head);\n" |
| 1766 |
"\tTAILQ_REMOVE(&head, n1, entries);\n" |
| 1767 |
"\tfree(n1);\n" |
| 1768 |
"}\n" |
| 1769 |
"\t\t\t\t\t/* Faster TailQ Deletion. */\n" |
| 1770 |
"n1 = TAILQ_FIRST(&head);\n" |
| 1771 |
"while (n1 != NULL) {\n" |
| 1772 |
"\tn2 = TAILQ_NEXT(n1, entries);\n" |
| 1773 |
"\tfree(n1);\n" |
| 1774 |
"\tn1 = n2;\n" |
| 1775 |
"}\n" |
| 1776 |
msgstr "" |
| 1777 |
|
| 1778 |
#. type: Plain text |
| 1779 |
#: opensuse-leap-15-6 |
| 1780 |
#, fuzzy, no-wrap |
| 1781 |
#| msgid "" |
| 1782 |
#| "n2 = malloc(sizeof(struct entry));\t/* Insert before. */\n" |
| 1783 |
#| "CIRCLEQ_INSERT_BEFORE(&head, n1, n2, entries);\n" |
| 1784 |
#| "\t\t\t\t\t/* Forward traversal. */\n" |
| 1785 |
#| "for (np = head.cqh_first; np != (void *)&head; np = np-E<gt>entries.cqe_next)\n" |
| 1786 |
#| "\tnp-E<gt> ...\n" |
| 1787 |
#| "\t\t\t\t\t/* Reverse traversal. */\n" |
| 1788 |
#| "for (np = head.cqh_last; np != (void *)&head; np = np-E<gt>entries.cqe_prev)\n" |
| 1789 |
#| "\tnp-E<gt> ...\n" |
| 1790 |
#| "\t\t\t\t\t/* Delete. */\n" |
| 1791 |
#| "while (head.cqh_first != (void *)&head)\n" |
| 1792 |
#| "\tCIRCLEQ_REMOVE(&head, head.cqh_first, entries);\n" |
| 1793 |
msgid "" |
| 1794 |
"TAILQ_INIT(&head);\n" |
| 1795 |
"n2 = malloc(sizeof(struct entry)); /* Insert before. */\n" |
| 1796 |
"CIRCLEQ_INSERT_BEFORE(&head, n1, n2, entries);\n" |
| 1797 |
" /* Forward traversal. */\n" |
| 1798 |
"for (np = head.cqh_first; np != (void *)&head;\n" |
| 1799 |
" np = np\\-E<gt>entries.cqe_next)\n" |
| 1800 |
" np\\-E<gt> ...\n" |
| 1801 |
" /* Reverse traversal. */\n" |
| 1802 |
"for (np = head.cqh_last; np != (void *)&head; np = np\\-E<gt>entries.cqe_prev)\n" |
| 1803 |
" np\\-E<gt> ...\n" |
| 1804 |
" /* Delete. */\n" |
| 1805 |
"while (head.cqh_first != (void *)&head)\n" |
| 1806 |
" CIRCLEQ_REMOVE(&head, head.cqh_first, entries);\n" |
| 1807 |
msgstr "" |
| 1808 |
"n2 = malloc(sizeof(struct entry));\t/* Inserta antes. */\n" |
| 1809 |
"CIRCLEQ_INSERT_BEFORE(&head, n1, n2, entries);\n" |
| 1810 |
"\t\t\t\t\t/* Recorrido hacia delante. */\n" |
| 1811 |
"for (np = head.cqh_first; np != (void *)&head; np = np-E<gt>entries.cqe_next)\n" |
| 1812 |
"\tnp-E<gt> ...\n" |
| 1813 |
"\t\t\t\t\t/* Recorrido hacia atrás. */\n" |
| 1814 |
"for (np = head.cqh_last; np != (void *)&head; np = np-E<gt>entries.cqe_prev)\n" |
| 1815 |
"\tnp-E<gt> ...\n" |
| 1816 |
"\t\t\t\t\t/* Elimina. */\n" |
| 1817 |
"while (head.cqh_first != (void *)&head)\n" |
| 1818 |
"\tCIRCLEQ_REMOVE(&head, head.cqh_first, entries);\n" |
| 1819 |
|
| 1820 |
#. type: Sh |
| 1821 |
#: opensuse-leap-15-6 |
| 1822 |
#, no-wrap |
| 1823 |
msgid "CONFORMING TO" |
| 1824 |
msgstr "CONFORME A" |
| 1825 |
|
| 1826 |
#. type: Plain text |
| 1827 |
#: opensuse-leap-15-6 |
| 1828 |
#, fuzzy |
| 1829 |
#| msgid "The E<.Nm queue> functions first appeared in E<.Bx 4.4>." |
| 1830 |
msgid "" |
| 1831 |
"Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs. E<.Nm " |
| 1832 |
"queue> functions first appeared in E<.Bx 4.4>." |
| 1833 |
msgstr "Las funciones E<.Nm queue> aparecieron por primera vez en E<.Bx 4.4>." |
| 1834 |
|
| 1835 |
#. type: Sh |
| 1836 |
#: opensuse-leap-15-6 |
| 1837 |
#, no-wrap |
| 1838 |
msgid "SEE ALSO" |
| 1839 |
msgstr "VÉASE TAMBIÉN" |
| 1840 |
|
| 1841 |
#. .Xr tree 3 |
| 1842 |
#. type: Plain text |
| 1843 |
#: opensuse-leap-15-6 |
| 1844 |
msgid "E<.Xr insque 3>" |
| 1845 |
msgstr "E<.Xr insque 3>" |
| 1846 |
|
| 1847 |
#. type: Sh |
| 1848 |
#: opensuse-leap-15-6 |
| 1849 |
#, no-wrap |
| 1850 |
msgid "COLOPHON" |
| 1851 |
msgstr "COLOFÓN" |
| 1852 |
|
| 1853 |
#. type: Plain text |
| 1854 |
#: opensuse-leap-15-6 |
| 1855 |
#, fuzzy |
| 1856 |
#| msgid "" |
| 1857 |
#| "This page is part of release 5.04 of the Linux E<.Em man-pages> project. " |
| 1858 |
#| "A description of the project, information about reporting bugs, and the " |
| 1859 |
#| "latest version of this page, can be found at \\%https://www.kernel.org/" |
| 1860 |
#| "doc/man\\-pages/." |
| 1861 |
msgid "" |
| 1862 |
"This page is part of release 4.16 of the Linux E<.Em man-pages> project. A " |
| 1863 |
"description of the project, information about reporting bugs, and the latest " |
| 1864 |
"version of this page, can be found at \\%https://www.kernel.org/doc/man\\-" |
| 1865 |
"pages/." |
| 1866 |
msgstr "" |
| 1867 |
"Esta página es parte de la versión 5.04 del proyecto Linux E<.Em man-pages>. " |
| 1868 |
"Puede encontrar una descripción del proyecto, información sobre cómo " |
| 1869 |
"informar errores y la última versión de esta página en \\%https://www.kernel." |
| 1870 |
"org/doc/man\\-pages/." |