| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:48+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "TAILQ" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2025-05-17" |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "" |
| 45 |
|
| 46 |
#. TAILQ_FOREACH_FROM, |
| 47 |
#. TAILQ_FOREACH_FROM_SAFE, |
| 48 |
#. TAILQ_FOREACH_REVERSE_FROM, |
| 49 |
#. TAILQ_FOREACH_REVERSE_FROM_SAFE, |
| 50 |
#. TAILQ_FOREACH_REVERSE_SAFE, |
| 51 |
#. TAILQ_FOREACH_SAFE, |
| 52 |
#. TAILQ_SWAP |
| 53 |
#. type: Plain text |
| 54 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 55 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 56 |
msgid "" |
| 57 |
"TAILQ_CONCAT, TAILQ_EMPTY, TAILQ_ENTRY, TAILQ_FIRST, TAILQ_FOREACH, " |
| 58 |
"TAILQ_FOREACH_REVERSE, TAILQ_HEAD, TAILQ_HEAD_INITIALIZER, TAILQ_INIT, " |
| 59 |
"TAILQ_INSERT_AFTER, TAILQ_INSERT_BEFORE, TAILQ_INSERT_HEAD, " |
| 60 |
"TAILQ_INSERT_TAIL, TAILQ_LAST, TAILQ_NEXT, TAILQ_PREV, TAILQ_REMOVE - " |
| 61 |
"implementation of a doubly linked tail queue" |
| 62 |
msgstr "" |
| 63 |
|
| 64 |
#. type: SH |
| 65 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 66 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 67 |
#, no-wrap |
| 68 |
msgid "LIBRARY" |
| 69 |
msgstr "" |
| 70 |
|
| 71 |
#. type: Plain text |
| 72 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 73 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 74 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 75 |
msgstr "" |
| 76 |
|
| 77 |
#. type: SH |
| 78 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 79 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 80 |
#, no-wrap |
| 81 |
msgid "SYNOPSIS" |
| 82 |
msgstr "" |
| 83 |
|
| 84 |
#. type: Plain text |
| 85 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 86 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 87 |
#, no-wrap |
| 88 |
msgid "B<#include E<lt>sys/queue.hE<gt>>\n" |
| 89 |
msgstr "" |
| 90 |
|
| 91 |
#. type: Plain text |
| 92 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 93 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
#, no-wrap |
| 95 |
msgid "B<TAILQ_ENTRY(TYPE);>\n" |
| 96 |
msgstr "" |
| 97 |
|
| 98 |
#. type: Plain text |
| 99 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 100 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 101 |
#, no-wrap |
| 102 |
msgid "" |
| 103 |
"B<TAILQ_HEAD(HEADNAME, TYPE);>\n" |
| 104 |
"B<TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD >I<head>B<);>\n" |
| 105 |
"B<void TAILQ_INIT(TAILQ_HEAD *>I<head>B<);>\n" |
| 106 |
msgstr "" |
| 107 |
|
| 108 |
#. type: Plain text |
| 109 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 110 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 111 |
#, no-wrap |
| 112 |
msgid "B<int TAILQ_EMPTY(TAILQ_HEAD *>I<head>B<);>\n" |
| 113 |
msgstr "" |
| 114 |
|
| 115 |
#. type: Plain text |
| 116 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 117 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 118 |
#, no-wrap |
| 119 |
msgid "" |
| 120 |
"B<void TAILQ_INSERT_HEAD(TAILQ_HEAD *>I<head>B<,>\n" |
| 121 |
"B< struct TYPE *>I<elm>B<, TAILQ_ENTRY >I<NAME>B<);>\n" |
| 122 |
"B<void TAILQ_INSERT_TAIL(TAILQ_HEAD *>I<head>B<,>\n" |
| 123 |
"B< struct TYPE *>I<elm>B<, TAILQ_ENTRY >I<NAME>B<);>\n" |
| 124 |
"B<void TAILQ_INSERT_BEFORE(struct TYPE *>I<listelm>B<,>\n" |
| 125 |
"B< struct TYPE *>I<elm>B<, TAILQ_ENTRY >I<NAME>B<);>\n" |
| 126 |
"B<void TAILQ_INSERT_AFTER(TAILQ_HEAD *>I<head>B<, struct TYPE *>I<listelm>B<,>\n" |
| 127 |
"B< struct TYPE *>I<elm>B<, TAILQ_ENTRY >I<NAME>B<);>\n" |
| 128 |
msgstr "" |
| 129 |
|
| 130 |
#. type: Plain text |
| 131 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 132 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 133 |
#, no-wrap |
| 134 |
msgid "" |
| 135 |
"B<struct TYPE *TAILQ_FIRST(TAILQ_HEAD *>I<head>B<);>\n" |
| 136 |
"B<struct TYPE *TAILQ_LAST(TAILQ_HEAD *>I<head>B<, HEADNAME);>\n" |
| 137 |
"B<struct TYPE *TAILQ_PREV(struct TYPE *>I<elm>B<, HEADNAME, TAILQ_ENTRY >I<NAME>B<);>\n" |
| 138 |
"B<struct TYPE *TAILQ_NEXT(struct TYPE *>I<elm>B<, TAILQ_ENTRY >I<NAME>B<);>\n" |
| 139 |
msgstr "" |
| 140 |
|
| 141 |
#. .BI "TAILQ_FOREACH_FROM(struct TYPE *" var ", TAILQ_HEAD *" head , |
| 142 |
#. .BI " TAILQ_ENTRY " NAME ); |
| 143 |
#. .BI "TAILQ_FOREACH_REVERSE_FROM(struct TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME," |
| 144 |
#. .BI " TAILQ_ENTRY " NAME ); |
| 145 |
#. .P |
| 146 |
#. .BI "TAILQ_FOREACH_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , |
| 147 |
#. .BI " TAILQ_ENTRY " NAME , |
| 148 |
#. .BI " struct TYPE *" temp_var ); |
| 149 |
#. .BI "TAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , |
| 150 |
#. .BI " TAILQ_ENTRY " NAME , |
| 151 |
#. .BI " struct TYPE *" temp_var ); |
| 152 |
#. .BI "TAILQ_FOREACH_REVERSE_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , |
| 153 |
#. .BI " HEADNAME, TAILQ_ENTRY " NAME , |
| 154 |
#. .BI " struct TYPE *" temp_var ); |
| 155 |
#. .BI "TAILQ_FOREACH_REVERSE_FROM_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , |
| 156 |
#. .BI " HEADNAME, TAILQ_ENTRY " NAME , |
| 157 |
#. .BI " struct TYPE *" temp_var ); |
| 158 |
#. type: Plain text |
| 159 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 160 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 161 |
#, no-wrap |
| 162 |
msgid "" |
| 163 |
"B<TAILQ_FOREACH(struct TYPE *>I<var>B<, TAILQ_HEAD *>I<head>B<,>\n" |
| 164 |
"B< TAILQ_ENTRY >I<NAME>B<);>\n" |
| 165 |
"B<TAILQ_FOREACH_REVERSE(struct TYPE *>I<var>B<, TAILQ_HEAD *>I<head>B<, HEADNAME,>\n" |
| 166 |
"B< TAILQ_ENTRY >I<NAME>B<);>\n" |
| 167 |
msgstr "" |
| 168 |
|
| 169 |
#. type: Plain text |
| 170 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 171 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 172 |
#, no-wrap |
| 173 |
msgid "" |
| 174 |
"B<void TAILQ_REMOVE(TAILQ_HEAD *>I<head>B<, struct TYPE *>I<elm>B<,>\n" |
| 175 |
"B< TAILQ_ENTRY >I<NAME>B<);>\n" |
| 176 |
msgstr "" |
| 177 |
|
| 178 |
#. .BI "void TAILQ_SWAP(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 ", TYPE," |
| 179 |
#. .BI " TAILQ_ENTRY " NAME ); |
| 180 |
#. type: Plain text |
| 181 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 182 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 183 |
#, no-wrap |
| 184 |
msgid "" |
| 185 |
"B<void TAILQ_CONCAT(TAILQ_HEAD *>I<head1>B<, TAILQ_HEAD *>I<head2>B<,>\n" |
| 186 |
"B< TAILQ_ENTRY >I<NAME>B<);>\n" |
| 187 |
msgstr "" |
| 188 |
|
| 189 |
#. type: SH |
| 190 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 191 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 192 |
#, no-wrap |
| 193 |
msgid "DESCRIPTION" |
| 194 |
msgstr "" |
| 195 |
|
| 196 |
#. type: Plain text |
| 197 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 198 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 199 |
msgid "These macros define and operate on doubly linked tail queues." |
| 200 |
msgstr "" |
| 201 |
|
| 202 |
#. type: Plain text |
| 203 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 204 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 205 |
msgid "" |
| 206 |
"In the macro definitions, I<TYPE> is the name of a user defined structure, " |
| 207 |
"that must contain a field of type I<TAILQ_ENTRY>, named I<NAME>. The " |
| 208 |
"argument I<HEADNAME> is the name of a user defined structure that must be " |
| 209 |
"declared using the macro B<TAILQ_HEAD>()." |
| 210 |
msgstr "" |
| 211 |
|
| 212 |
#. type: SS |
| 213 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 214 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 215 |
#, no-wrap |
| 216 |
msgid "Creation" |
| 217 |
msgstr "" |
| 218 |
|
| 219 |
#. type: Plain text |
| 220 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 221 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 222 |
msgid "" |
| 223 |
"A tail queue is headed by a structure defined by the B<TAILQ_HEAD>() " |
| 224 |
"macro. This structure contains a pair of pointers, one to the first element " |
| 225 |
"in the queue and the other to the last element in the queue. The elements " |
| 226 |
"are doubly linked so that an arbitrary element can be removed without " |
| 227 |
"traversing the queue. New elements can be added to the queue after an " |
| 228 |
"existing element, before an existing element, at the head of the queue, or " |
| 229 |
"at the end of the queue. A I<TAILQ_HEAD> structure is declared as follows:" |
| 230 |
msgstr "" |
| 231 |
|
| 232 |
#. type: Plain text |
| 233 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 234 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 235 |
#, no-wrap |
| 236 |
msgid "TAILQ_HEAD(HEADNAME, TYPE) head;\n" |
| 237 |
msgstr "" |
| 238 |
|
| 239 |
#. type: Plain text |
| 240 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 241 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 242 |
msgid "" |
| 243 |
"where I<struct HEADNAME> is the structure to be defined, and I<struct TYPE> " |
| 244 |
"is the type of the elements to be linked into the queue. A pointer to the " |
| 245 |
"head of the queue can later be declared as:" |
| 246 |
msgstr "" |
| 247 |
|
| 248 |
#. type: Plain text |
| 249 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 250 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 251 |
#, no-wrap |
| 252 |
msgid "struct HEADNAME *headp;\n" |
| 253 |
msgstr "" |
| 254 |
|
| 255 |
#. type: Plain text |
| 256 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 257 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 258 |
msgid "(The names I<head> and I<headp> are user selectable.)" |
| 259 |
msgstr "" |
| 260 |
|
| 261 |
#. type: Plain text |
| 262 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 263 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 264 |
msgid "" |
| 265 |
"B<TAILQ_ENTRY>() declares a structure that connects the elements in the " |
| 266 |
"queue." |
| 267 |
msgstr "" |
| 268 |
|
| 269 |
#. type: Plain text |
| 270 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 271 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 272 |
msgid "" |
| 273 |
"B<TAILQ_HEAD_INITIALIZER>() evaluates to an initializer for the queue " |
| 274 |
"I<head>." |
| 275 |
msgstr "" |
| 276 |
|
| 277 |
#. type: Plain text |
| 278 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 279 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 280 |
msgid "B<TAILQ_INIT>() initializes the queue referenced by" |
| 281 |
msgstr "" |
| 282 |
|
| 283 |
#. type: Plain text |
| 284 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 285 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 286 |
msgid "" |
| 287 |
"B<TAILQ_EMPTY>() evaluates to true if there are no items on the queue. " |
| 288 |
"I<head>." |
| 289 |
msgstr "" |
| 290 |
|
| 291 |
#. type: SS |
| 292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 294 |
#, no-wrap |
| 295 |
msgid "Insertion" |
| 296 |
msgstr "" |
| 297 |
|
| 298 |
#. type: Plain text |
| 299 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 300 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 301 |
msgid "" |
| 302 |
"B<TAILQ_INSERT_HEAD>() inserts the new element I<elm> at the head of the " |
| 303 |
"queue." |
| 304 |
msgstr "" |
| 305 |
|
| 306 |
#. type: Plain text |
| 307 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 308 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 309 |
msgid "" |
| 310 |
"B<TAILQ_INSERT_TAIL>() inserts the new element I<elm> at the end of the " |
| 311 |
"queue." |
| 312 |
msgstr "" |
| 313 |
|
| 314 |
#. type: Plain text |
| 315 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 316 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 317 |
msgid "" |
| 318 |
"B<TAILQ_INSERT_BEFORE>() inserts the new element I<elm> before the element " |
| 319 |
"I<listelm>." |
| 320 |
msgstr "" |
| 321 |
|
| 322 |
#. type: Plain text |
| 323 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 324 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 325 |
msgid "" |
| 326 |
"B<TAILQ_INSERT_AFTER>() inserts the new element I<elm> after the element " |
| 327 |
"I<listelm>." |
| 328 |
msgstr "" |
| 329 |
|
| 330 |
#. type: SS |
| 331 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 332 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 333 |
#, no-wrap |
| 334 |
msgid "Traversal" |
| 335 |
msgstr "" |
| 336 |
|
| 337 |
#. type: Plain text |
| 338 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 339 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 340 |
msgid "" |
| 341 |
"B<TAILQ_FIRST>() returns the first item on the queue, or NULL if the queue " |
| 342 |
"is empty." |
| 343 |
msgstr "" |
| 344 |
|
| 345 |
#. type: Plain text |
| 346 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 347 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 348 |
msgid "" |
| 349 |
"B<TAILQ_LAST>() returns the last item on the queue. If the queue is empty " |
| 350 |
"the return value is NULL." |
| 351 |
msgstr "" |
| 352 |
|
| 353 |
#. type: Plain text |
| 354 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 355 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 356 |
msgid "" |
| 357 |
"B<TAILQ_PREV>() returns the previous item on the queue, or NULL if this " |
| 358 |
"item is the first." |
| 359 |
msgstr "" |
| 360 |
|
| 361 |
#. type: Plain text |
| 362 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 363 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 364 |
msgid "" |
| 365 |
"B<TAILQ_NEXT>() returns the next item on the queue, or NULL if this item is " |
| 366 |
"the last." |
| 367 |
msgstr "" |
| 368 |
|
| 369 |
#. .P |
| 370 |
#. .BR TAILQ_FOREACH_FROM () |
| 371 |
#. behaves identically to |
| 372 |
#. .BR TAILQ_FOREACH () |
| 373 |
#. when |
| 374 |
#. .I var |
| 375 |
#. is NULL, else it treats |
| 376 |
#. .I var |
| 377 |
#. as a previously found TAILQ element and begins the loop at |
| 378 |
#. .I var |
| 379 |
#. instead of the first element in the TAILQ referenced by |
| 380 |
#. .IR head . |
| 381 |
#. type: Plain text |
| 382 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 383 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 384 |
msgid "" |
| 385 |
"B<TAILQ_FOREACH>() traverses the queue referenced by I<head> in the forward " |
| 386 |
"direction, assigning each element in turn to I<var>. I<var> is set to NULL " |
| 387 |
"if the loop completes normally, or if there were no elements." |
| 388 |
msgstr "" |
| 389 |
|
| 390 |
#. .P |
| 391 |
#. .BR TAILQ_FOREACH_REVERSE_FROM () |
| 392 |
#. behaves identically to |
| 393 |
#. .BR TAILQ_FOREACH_REVERSE () |
| 394 |
#. when |
| 395 |
#. .I var |
| 396 |
#. is NULL, else it treats |
| 397 |
#. .I var |
| 398 |
#. as a previously found TAILQ element and begins the reverse loop at |
| 399 |
#. .I var |
| 400 |
#. instead of the last element in the TAILQ referenced by |
| 401 |
#. .IR head . |
| 402 |
#. .P |
| 403 |
#. .BR TAILQ_FOREACH_SAFE () |
| 404 |
#. and |
| 405 |
#. .BR TAILQ_FOREACH_REVERSE_SAFE () |
| 406 |
#. traverse the list referenced by |
| 407 |
#. .I head |
| 408 |
#. in the forward or reverse direction respectively, |
| 409 |
#. assigning each element in turn to |
| 410 |
#. .IR var . |
| 411 |
#. However, unlike their unsafe counterparts, |
| 412 |
#. .BR TAILQ_FOREACH () |
| 413 |
#. and |
| 414 |
#. .BR TAILQ_FOREACH_REVERSE () |
| 415 |
#. permit to both remove |
| 416 |
#. .I var |
| 417 |
#. as well as free it from within the loop safely without interfering with the |
| 418 |
#. traversal. |
| 419 |
#. .P |
| 420 |
#. .BR TAILQ_FOREACH_FROM_SAFE () |
| 421 |
#. behaves identically to |
| 422 |
#. .BR TAILQ_FOREACH_SAFE () |
| 423 |
#. when |
| 424 |
#. .I var |
| 425 |
#. is NULL, else it treats |
| 426 |
#. .I var |
| 427 |
#. as a previously found TAILQ element and begins the loop at |
| 428 |
#. .I var |
| 429 |
#. instead of the first element in the TAILQ referenced by |
| 430 |
#. .IR head . |
| 431 |
#. .P |
| 432 |
#. .BR TAILQ_FOREACH_REVERSE_FROM_SAFE () |
| 433 |
#. behaves identically to |
| 434 |
#. .BR TAILQ_FOREACH_REVERSE_SAFE () |
| 435 |
#. when |
| 436 |
#. .I var |
| 437 |
#. is NULL, else it treats |
| 438 |
#. .I var |
| 439 |
#. as a previously found TAILQ element and begins the reverse loop at |
| 440 |
#. .I var |
| 441 |
#. instead of the last element in the TAILQ referenced by |
| 442 |
#. .IR head . |
| 443 |
#. type: Plain text |
| 444 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 445 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 446 |
msgid "" |
| 447 |
"B<TAILQ_FOREACH_REVERSE>() traverses the queue referenced by I<head> in the " |
| 448 |
"reverse direction, assigning each element in turn to I<var>." |
| 449 |
msgstr "" |
| 450 |
|
| 451 |
#. type: SS |
| 452 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 453 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 454 |
#, no-wrap |
| 455 |
msgid "Removal" |
| 456 |
msgstr "" |
| 457 |
|
| 458 |
#. type: Plain text |
| 459 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 460 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 461 |
msgid "B<TAILQ_REMOVE>() removes the element I<elm> from the queue." |
| 462 |
msgstr "" |
| 463 |
|
| 464 |
#. type: SS |
| 465 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 466 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 467 |
#, no-wrap |
| 468 |
msgid "Other features" |
| 469 |
msgstr "" |
| 470 |
|
| 471 |
#. .BR TAILQ_SWAP () |
| 472 |
#. swaps the contents of |
| 473 |
#. .I head1 |
| 474 |
#. and |
| 475 |
#. .IR head2 . |
| 476 |
#. .P |
| 477 |
#. type: Plain text |
| 478 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 479 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 480 |
msgid "" |
| 481 |
"B<TAILQ_CONCAT>() concatenates the queue headed by I<head2> onto the end of " |
| 482 |
"the one headed by I<head1> removing all entries from the former." |
| 483 |
msgstr "" |
| 484 |
|
| 485 |
#. type: SH |
| 486 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 487 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 488 |
#, no-wrap |
| 489 |
msgid "RETURN VALUE" |
| 490 |
msgstr "" |
| 491 |
|
| 492 |
#. type: Plain text |
| 493 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 494 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 495 |
msgid "" |
| 496 |
"B<TAILQ_EMPTY>() returns nonzero if the queue is empty, and zero if the " |
| 497 |
"queue contains at least one entry." |
| 498 |
msgstr "" |
| 499 |
|
| 500 |
#. type: Plain text |
| 501 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 502 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 503 |
msgid "" |
| 504 |
"B<TAILQ_FIRST>(), B<TAILQ_LAST>(), B<TAILQ_PREV>(), and B<TAILQ_NEXT>() " |
| 505 |
"return a pointer to the first, last, previous, or next I<TYPE> structure, " |
| 506 |
"respectively." |
| 507 |
msgstr "" |
| 508 |
|
| 509 |
#. type: Plain text |
| 510 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 511 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 512 |
msgid "" |
| 513 |
"B<TAILQ_HEAD_INITIALIZER>() returns an initializer that can be assigned to " |
| 514 |
"the queue I<head>." |
| 515 |
msgstr "" |
| 516 |
|
| 517 |
#. type: SH |
| 518 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 519 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 520 |
#, no-wrap |
| 521 |
msgid "STANDARDS" |
| 522 |
msgstr "" |
| 523 |
|
| 524 |
#. type: Plain text |
| 525 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 526 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 527 |
msgid "BSD." |
| 528 |
msgstr "" |
| 529 |
|
| 530 |
#. type: SH |
| 531 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 532 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 533 |
#, no-wrap |
| 534 |
msgid "HISTORY" |
| 535 |
msgstr "" |
| 536 |
|
| 537 |
#. type: Plain text |
| 538 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 539 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 540 |
msgid "4.4BSD." |
| 541 |
msgstr "" |
| 542 |
|
| 543 |
#. type: SH |
| 544 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 545 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 546 |
#, no-wrap |
| 547 |
msgid "CAVEATS" |
| 548 |
msgstr "" |
| 549 |
|
| 550 |
#. type: Plain text |
| 551 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 552 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 553 |
msgid "" |
| 554 |
"B<TAILQ_FOREACH>() and B<TAILQ_FOREACH_REVERSE>() don't allow I<var> to be " |
| 555 |
"removed or freed within the loop, as it would interfere with the traversal. " |
| 556 |
"B<TAILQ_FOREACH_SAFE>() and B<TAILQ_FOREACH_REVERSE_SAFE>(), which are " |
| 557 |
"present on the BSDs but are not present in glibc, fix this limitation by " |
| 558 |
"allowing I<var> to safely be removed from the list and freed from within the " |
| 559 |
"loop without interfering with the traversal." |
| 560 |
msgstr "" |
| 561 |
|
| 562 |
#. type: SH |
| 563 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 564 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 565 |
#, no-wrap |
| 566 |
msgid "EXAMPLES" |
| 567 |
msgstr "" |
| 568 |
|
| 569 |
#. type: Plain text |
| 570 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 571 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 572 |
#, no-wrap |
| 573 |
msgid "" |
| 574 |
"#include E<lt>stddef.hE<gt>\n" |
| 575 |
"#include E<lt>stdio.hE<gt>\n" |
| 576 |
"#include E<lt>stdlib.hE<gt>\n" |
| 577 |
"#include E<lt>sys/queue.hE<gt>\n" |
| 578 |
"\\&\n" |
| 579 |
"struct entry {\n" |
| 580 |
" int data;\n" |
| 581 |
" TAILQ_ENTRY(entry) entries; /* Tail queue */\n" |
| 582 |
"};\n" |
| 583 |
"\\&\n" |
| 584 |
"TAILQ_HEAD(tailhead, entry);\n" |
| 585 |
"\\&\n" |
| 586 |
"int\n" |
| 587 |
"main(void)\n" |
| 588 |
"{\n" |
| 589 |
" struct entry *n1, *n2, *n3, *np;\n" |
| 590 |
" struct tailhead head; /* Tail queue head */\n" |
| 591 |
" int i;\n" |
| 592 |
"\\&\n" |
| 593 |
" TAILQ_INIT(&head); /* Initialize the queue */\n" |
| 594 |
"\\&\n" |
| 595 |
" n1 = malloc(sizeof(struct entry)); /* Insert at the head */\n" |
| 596 |
" TAILQ_INSERT_HEAD(&head, n1, entries);\n" |
| 597 |
"\\&\n" |
| 598 |
" n1 = malloc(sizeof(struct entry)); /* Insert at the tail */\n" |
| 599 |
" TAILQ_INSERT_TAIL(&head, n1, entries);\n" |
| 600 |
"\\&\n" |
| 601 |
" n2 = malloc(sizeof(struct entry)); /* Insert after */\n" |
| 602 |
" TAILQ_INSERT_AFTER(&head, n1, n2, entries);\n" |
| 603 |
"\\&\n" |
| 604 |
" n3 = malloc(sizeof(struct entry)); /* Insert before */\n" |
| 605 |
" TAILQ_INSERT_BEFORE(n2, n3, entries);\n" |
| 606 |
"\\&\n" |
| 607 |
" TAILQ_REMOVE(&head, n2, entries); /* Deletion */\n" |
| 608 |
" free(n2);\n" |
| 609 |
" /* Forward traversal */\n" |
| 610 |
" i = 0;\n" |
| 611 |
" TAILQ_FOREACH(np, &head, entries)\n" |
| 612 |
" np-E<gt>data = i++;\n" |
| 613 |
" /* Reverse traversal */\n" |
| 614 |
" TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries)\n" |
| 615 |
" printf(\"%i\\[rs]n\", np-E<gt>data);\n" |
| 616 |
" /* TailQ deletion */\n" |
| 617 |
" n1 = TAILQ_FIRST(&head);\n" |
| 618 |
" while (n1 != NULL) {\n" |
| 619 |
" n2 = TAILQ_NEXT(n1, entries);\n" |
| 620 |
" free(n1);\n" |
| 621 |
" n1 = n2;\n" |
| 622 |
" }\n" |
| 623 |
" TAILQ_INIT(&head);\n" |
| 624 |
"\\&\n" |
| 625 |
" exit(EXIT_SUCCESS);\n" |
| 626 |
"}\n" |
| 627 |
msgstr "" |
| 628 |
|
| 629 |
#. SRC END |
| 630 |
#. type: SH |
| 631 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 632 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 633 |
#, no-wrap |
| 634 |
msgid "SEE ALSO" |
| 635 |
msgstr "" |
| 636 |
|
| 637 |
#. type: Plain text |
| 638 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 639 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 640 |
msgid "B<insque>(3), B<queue>(7)" |
| 641 |
msgstr "" |
| 642 |
|
| 643 |
#. type: TH |
| 644 |
#: debian-trixie |
| 645 |
#, no-wrap |
| 646 |
msgid "2024-06-15" |
| 647 |
msgstr "" |
| 648 |
|
| 649 |
#. type: TH |
| 650 |
#: debian-trixie |
| 651 |
#, no-wrap |
| 652 |
msgid "Linux man-pages 6.9.1" |
| 653 |
msgstr "" |
| 654 |
|
| 655 |
#. type: Plain text |
| 656 |
#: debian-trixie |
| 657 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 658 |
msgstr "" |
| 659 |
|
| 660 |
#. type: TH |
| 661 |
#: fedora-44 fedora-rawhide |
| 662 |
#, no-wrap |
| 663 |
msgid "2024-07-23" |
| 664 |
msgstr "" |
| 665 |
|
| 666 |
#. type: TH |
| 667 |
#: fedora-44 fedora-rawhide |
| 668 |
#, no-wrap |
| 669 |
msgid "Linux man-pages 6.13" |
| 670 |
msgstr "" |
| 671 |
|
| 672 |
#. type: TH |
| 673 |
#: mageia-cauldron |
| 674 |
#, no-wrap |
| 675 |
msgid "Linux man-pages 6.17" |
| 676 |
msgstr "" |
| 677 |
|
| 678 |
#. type: TH |
| 679 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 680 |
#, no-wrap |
| 681 |
msgid "Linux man-pages (unreleased)" |
| 682 |
msgstr "" |