| 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:43+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 "SLIST" |
| 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 |
#. SLIST_FOREACH_FROM, |
| 47 |
#. SLIST_FOREACH_FROM_SAFE, |
| 48 |
#. SLIST_FOREACH_SAFE, |
| 49 |
#. SLIST_REMOVE_AFTER, |
| 50 |
#. SLIST_SWAP |
| 51 |
#. type: Plain text |
| 52 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 53 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 54 |
msgid "" |
| 55 |
"SLIST_EMPTY, SLIST_ENTRY, SLIST_FIRST, SLIST_FOREACH, SLIST_HEAD, " |
| 56 |
"SLIST_HEAD_INITIALIZER, SLIST_INIT, SLIST_INSERT_AFTER, SLIST_INSERT_HEAD, " |
| 57 |
"SLIST_NEXT, SLIST_REMOVE, SLIST_REMOVE_HEAD - implementation of a singly " |
| 58 |
"linked list" |
| 59 |
msgstr "" |
| 60 |
|
| 61 |
#. type: SH |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
#, no-wrap |
| 65 |
msgid "LIBRARY" |
| 66 |
msgstr "" |
| 67 |
|
| 68 |
#. type: Plain text |
| 69 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 70 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 71 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 72 |
msgstr "" |
| 73 |
|
| 74 |
#. type: SH |
| 75 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 76 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 77 |
#, no-wrap |
| 78 |
msgid "SYNOPSIS" |
| 79 |
msgstr "" |
| 80 |
|
| 81 |
#. type: Plain text |
| 82 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 83 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 84 |
#, no-wrap |
| 85 |
msgid "B<#include E<lt>sys/queue.hE<gt>>\n" |
| 86 |
msgstr "" |
| 87 |
|
| 88 |
#. type: Plain text |
| 89 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 90 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 91 |
#, no-wrap |
| 92 |
msgid "B<SLIST_ENTRY(TYPE);>\n" |
| 93 |
msgstr "" |
| 94 |
|
| 95 |
#. type: Plain text |
| 96 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 97 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 98 |
#, no-wrap |
| 99 |
msgid "" |
| 100 |
"B<SLIST_HEAD(HEADNAME, TYPE);>\n" |
| 101 |
"B<SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD >I<head>B<);>\n" |
| 102 |
"B<void SLIST_INIT(SLIST_HEAD *>I<head>B<);>\n" |
| 103 |
msgstr "" |
| 104 |
|
| 105 |
#. type: Plain text |
| 106 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 107 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 108 |
#, no-wrap |
| 109 |
msgid "B<int SLIST_EMPTY(SLIST_HEAD *>I<head>B<);>\n" |
| 110 |
msgstr "" |
| 111 |
|
| 112 |
#. type: Plain text |
| 113 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 114 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 115 |
#, no-wrap |
| 116 |
msgid "" |
| 117 |
"B<void SLIST_INSERT_HEAD(SLIST_HEAD *>I<head>B<,>\n" |
| 118 |
"B< struct TYPE *>I<elm>B<, SLIST_ENTRY >I<NAME>B<);>\n" |
| 119 |
"B<void SLIST_INSERT_AFTER(struct TYPE *>I<listelm>B<,>\n" |
| 120 |
"B< struct TYPE *>I<elm>B<, SLIST_ENTRY >I<NAME>B<);>\n" |
| 121 |
msgstr "" |
| 122 |
|
| 123 |
#. type: Plain text |
| 124 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 125 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 126 |
#, no-wrap |
| 127 |
msgid "" |
| 128 |
"B<struct TYPE *SLIST_FIRST(SLIST_HEAD *>I<head>B<);>\n" |
| 129 |
"B<struct TYPE *SLIST_NEXT(struct TYPE *>I<elm>B<, SLIST_ENTRY >I<NAME>B<);>\n" |
| 130 |
msgstr "" |
| 131 |
|
| 132 |
#. .BI "SLIST_FOREACH_FROM(struct TYPE *" var ", SLIST_HEAD *" head , |
| 133 |
#. .BI " SLIST_ENTRY " NAME ); |
| 134 |
#. .P |
| 135 |
#. .BI "SLIST_FOREACH_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , |
| 136 |
#. .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); |
| 137 |
#. .BI "SLIST_FOREACH_FROM_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , |
| 138 |
#. .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); |
| 139 |
#. type: Plain text |
| 140 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 141 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 142 |
#, no-wrap |
| 143 |
msgid "B<SLIST_FOREACH(struct TYPE *>I<var>B<, SLIST_HEAD *>I<head>B<, SLIST_ENTRY >I<NAME>B<);>\n" |
| 144 |
msgstr "" |
| 145 |
|
| 146 |
#. .BI "void SLIST_REMOVE_AFTER(struct TYPE *" elm , |
| 147 |
#. .BI " SLIST_ENTRY " NAME ); |
| 148 |
#. .P |
| 149 |
#. .BI "void SLIST_SWAP(SLIST_HEAD *" head1 ", SLIST_HEAD *" head2 , |
| 150 |
#. .BI " SLIST_ENTRY " NAME ); |
| 151 |
#. type: Plain text |
| 152 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 153 |
#: opensuse-tumbleweed |
| 154 |
#, no-wrap |
| 155 |
msgid "" |
| 156 |
"B<void SLIST_REMOVE(SLIST_HEAD *>I<head>B<, struct TYPE *>I<elm>B<, TYPE,>\n" |
| 157 |
"B< SLIST_ENTRY >I<NAME>B<);>\n" |
| 158 |
"B<void SLIST_REMOVE_HEAD(SLIST_HEAD *>I<head>B<,>\n" |
| 159 |
"B< SLIST_ENTRY >I<NAME>B<);>\n" |
| 160 |
msgstr "" |
| 161 |
|
| 162 |
#. type: SH |
| 163 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 164 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 165 |
#, no-wrap |
| 166 |
msgid "DESCRIPTION" |
| 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 |
msgid "These macros define and operate on singly linked lists." |
| 173 |
msgstr "" |
| 174 |
|
| 175 |
#. type: Plain text |
| 176 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 177 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 178 |
msgid "" |
| 179 |
"In the macro definitions, I<TYPE> is the name of a user-defined structure, " |
| 180 |
"that must contain a field of type I<SLIST_ENTRY>, named I<NAME>. The " |
| 181 |
"argument I<HEADNAME> is the name of a user-defined structure that must be " |
| 182 |
"declared using the macro B<SLIST_HEAD>()." |
| 183 |
msgstr "" |
| 184 |
|
| 185 |
#. type: SS |
| 186 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 187 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 188 |
#, no-wrap |
| 189 |
msgid "Creation" |
| 190 |
msgstr "" |
| 191 |
|
| 192 |
#. type: Plain text |
| 193 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 194 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 195 |
msgid "" |
| 196 |
"A singly linked list is headed by a structure defined by the " |
| 197 |
"B<SLIST_HEAD>() macro. This structure contains a single pointer to the " |
| 198 |
"first element on the list. The elements are singly linked for minimum space " |
| 199 |
"and pointer manipulation overhead at the expense of O(n) removal for " |
| 200 |
"arbitrary elements. New elements can be added to the list after an existing " |
| 201 |
"element or at the head of the list. An I<SLIST_HEAD> structure is declared " |
| 202 |
"as follows:" |
| 203 |
msgstr "" |
| 204 |
|
| 205 |
#. type: Plain text |
| 206 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 207 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 208 |
#, no-wrap |
| 209 |
msgid "SLIST_HEAD(HEADNAME, TYPE) head;\n" |
| 210 |
msgstr "" |
| 211 |
|
| 212 |
#. type: Plain text |
| 213 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 214 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 215 |
msgid "" |
| 216 |
"where I<struct HEADNAME> is the structure to be defined, and I<struct TYPE> " |
| 217 |
"is the type of the elements to be linked into the list. A pointer to the " |
| 218 |
"head of the list can later be declared as:" |
| 219 |
msgstr "" |
| 220 |
|
| 221 |
#. type: Plain text |
| 222 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 223 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 224 |
#, no-wrap |
| 225 |
msgid "struct HEADNAME *headp;\n" |
| 226 |
msgstr "" |
| 227 |
|
| 228 |
#. type: Plain text |
| 229 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 230 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 231 |
msgid "(The names I<head> and I<headp> are user selectable.)" |
| 232 |
msgstr "" |
| 233 |
|
| 234 |
#. type: Plain text |
| 235 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 236 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 237 |
msgid "" |
| 238 |
"B<SLIST_ENTRY>() declares a structure that connects the elements in the " |
| 239 |
"list." |
| 240 |
msgstr "" |
| 241 |
|
| 242 |
#. type: Plain text |
| 243 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 244 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 245 |
msgid "" |
| 246 |
"B<SLIST_HEAD_INITIALIZER>() evaluates to an initializer for the list " |
| 247 |
"I<head>." |
| 248 |
msgstr "" |
| 249 |
|
| 250 |
#. type: Plain text |
| 251 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 252 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 253 |
msgid "B<SLIST_INIT>() initializes the list referenced by I<head>." |
| 254 |
msgstr "" |
| 255 |
|
| 256 |
#. type: Plain text |
| 257 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 258 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 259 |
msgid "" |
| 260 |
"B<SLIST_EMPTY>() evaluates to true if there are no elements in the list." |
| 261 |
msgstr "" |
| 262 |
|
| 263 |
#. type: SS |
| 264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 265 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 266 |
#, no-wrap |
| 267 |
msgid "Insertion" |
| 268 |
msgstr "" |
| 269 |
|
| 270 |
#. type: Plain text |
| 271 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 272 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 273 |
msgid "" |
| 274 |
"B<SLIST_INSERT_HEAD>() inserts the new element I<elm> at the head of the " |
| 275 |
"list." |
| 276 |
msgstr "" |
| 277 |
|
| 278 |
#. type: Plain text |
| 279 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 280 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 281 |
msgid "" |
| 282 |
"B<SLIST_INSERT_AFTER>() inserts the new element I<elm> after the element " |
| 283 |
"I<listelm>." |
| 284 |
msgstr "" |
| 285 |
|
| 286 |
#. type: SS |
| 287 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 288 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 289 |
#, no-wrap |
| 290 |
msgid "Traversal" |
| 291 |
msgstr "" |
| 292 |
|
| 293 |
#. type: Plain text |
| 294 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 295 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 296 |
msgid "" |
| 297 |
"B<SLIST_FIRST>() returns the first element in the list, or NULL if the list " |
| 298 |
"is empty." |
| 299 |
msgstr "" |
| 300 |
|
| 301 |
#. type: Plain text |
| 302 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 303 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 304 |
msgid "B<SLIST_NEXT>() returns the next element in the list." |
| 305 |
msgstr "" |
| 306 |
|
| 307 |
#. .P |
| 308 |
#. .BR SLIST_FOREACH_FROM () |
| 309 |
#. behaves identically to |
| 310 |
#. .BR SLIST_FOREACH () |
| 311 |
#. when |
| 312 |
#. .I var |
| 313 |
#. is NULL, else it treats |
| 314 |
#. .I var |
| 315 |
#. as a previously found SLIST element and begins the loop at |
| 316 |
#. .I var |
| 317 |
#. instead of the first element in the SLIST referenced by |
| 318 |
#. .IR head . |
| 319 |
#. .Pp |
| 320 |
#. .BR SLIST_FOREACH_SAFE () |
| 321 |
#. traverses the list referenced by |
| 322 |
#. .I head |
| 323 |
#. in the forward direction, assigning each element in |
| 324 |
#. turn to |
| 325 |
#. .IR var . |
| 326 |
#. However, unlike |
| 327 |
#. .BR SLIST_FOREACH () |
| 328 |
#. here it is permitted to both remove |
| 329 |
#. .I var |
| 330 |
#. as well as free it from within the loop safely without interfering with the |
| 331 |
#. traversal. |
| 332 |
#. .P |
| 333 |
#. .BR SLIST_FOREACH_FROM_SAFE () |
| 334 |
#. behaves identically to |
| 335 |
#. .BR SLIST_FOREACH_SAFE () |
| 336 |
#. when |
| 337 |
#. .I var |
| 338 |
#. is NULL, else it treats |
| 339 |
#. .I var |
| 340 |
#. as a previously found SLIST element and begins the loop at |
| 341 |
#. .I var |
| 342 |
#. instead of the first element in the SLIST referenced by |
| 343 |
#. .IR head . |
| 344 |
#. type: Plain text |
| 345 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 346 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 347 |
msgid "" |
| 348 |
"B<SLIST_FOREACH>() traverses the list referenced by I<head> in the forward " |
| 349 |
"direction, assigning each element in turn to I<var>." |
| 350 |
msgstr "" |
| 351 |
|
| 352 |
#. type: SS |
| 353 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 354 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 355 |
#, no-wrap |
| 356 |
msgid "Removal" |
| 357 |
msgstr "" |
| 358 |
|
| 359 |
#. type: Plain text |
| 360 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 361 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 362 |
msgid "B<SLIST_REMOVE>() removes the element I<elm> from the list." |
| 363 |
msgstr "" |
| 364 |
|
| 365 |
#. .P |
| 366 |
#. .BR SLIST_REMOVE_AFTER () |
| 367 |
#. removes the element after |
| 368 |
#. .I elm |
| 369 |
#. from the list. |
| 370 |
#. Unlike |
| 371 |
#. .IR SLIST_REMOVE , |
| 372 |
#. this macro does not traverse the entire list. |
| 373 |
#. .SS Other features |
| 374 |
#. .BR SLIST_SWAP () |
| 375 |
#. swaps the contents of |
| 376 |
#. .I head1 |
| 377 |
#. and |
| 378 |
#. .IR head2 . |
| 379 |
#. type: Plain text |
| 380 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 381 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 382 |
msgid "" |
| 383 |
"B<SLIST_REMOVE_HEAD>() removes the element I<elm> from the head of the " |
| 384 |
"list. For optimum efficiency, elements being removed from the head of the " |
| 385 |
"list should explicitly use this macro instead of the generic " |
| 386 |
"B<SLIST_REMOVE>()." |
| 387 |
msgstr "" |
| 388 |
|
| 389 |
#. type: SH |
| 390 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 391 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 392 |
#, no-wrap |
| 393 |
msgid "RETURN VALUE" |
| 394 |
msgstr "" |
| 395 |
|
| 396 |
#. type: Plain text |
| 397 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 398 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 399 |
msgid "" |
| 400 |
"B<SLIST_EMPTY>() returns nonzero if the list is empty, and zero if the list " |
| 401 |
"contains at least one entry." |
| 402 |
msgstr "" |
| 403 |
|
| 404 |
#. type: Plain text |
| 405 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 406 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 407 |
msgid "" |
| 408 |
"B<SLIST_FIRST>(), and B<SLIST_NEXT>() return a pointer to the first or next " |
| 409 |
"I<TYPE> structure, respectively." |
| 410 |
msgstr "" |
| 411 |
|
| 412 |
#. type: Plain text |
| 413 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 414 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 415 |
msgid "" |
| 416 |
"B<SLIST_HEAD_INITIALIZER>() returns an initializer that can be assigned to " |
| 417 |
"the list I<head>." |
| 418 |
msgstr "" |
| 419 |
|
| 420 |
#. type: SH |
| 421 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 422 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 423 |
#, no-wrap |
| 424 |
msgid "STANDARDS" |
| 425 |
msgstr "" |
| 426 |
|
| 427 |
#. type: Plain text |
| 428 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 429 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 430 |
msgid "BSD." |
| 431 |
msgstr "" |
| 432 |
|
| 433 |
#. type: SH |
| 434 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 435 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 436 |
#, no-wrap |
| 437 |
msgid "HISTORY" |
| 438 |
msgstr "" |
| 439 |
|
| 440 |
#. type: Plain text |
| 441 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 442 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 443 |
msgid "4.4BSD." |
| 444 |
msgstr "" |
| 445 |
|
| 446 |
#. type: SH |
| 447 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 448 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 449 |
#, no-wrap |
| 450 |
msgid "BUGS" |
| 451 |
msgstr "" |
| 452 |
|
| 453 |
#. type: Plain text |
| 454 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 455 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 456 |
msgid "" |
| 457 |
"B<SLIST_FOREACH>() doesn't allow I<var> to be removed or freed within the " |
| 458 |
"loop, as it would interfere with the traversal. B<SLIST_FOREACH_SAFE>(), " |
| 459 |
"which is present on the BSDs but is not present in glibc, fixes this " |
| 460 |
"limitation by allowing I<var> to safely be removed from the list and freed " |
| 461 |
"from within the loop without interfering with the traversal." |
| 462 |
msgstr "" |
| 463 |
|
| 464 |
#. type: SH |
| 465 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 466 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 467 |
#, no-wrap |
| 468 |
msgid "EXAMPLES" |
| 469 |
msgstr "" |
| 470 |
|
| 471 |
#. type: Plain text |
| 472 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 473 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 474 |
#, no-wrap |
| 475 |
msgid "" |
| 476 |
"#include E<lt>stddef.hE<gt>\n" |
| 477 |
"#include E<lt>stdio.hE<gt>\n" |
| 478 |
"#include E<lt>stdlib.hE<gt>\n" |
| 479 |
"#include E<lt>sys/queue.hE<gt>\n" |
| 480 |
"\\&\n" |
| 481 |
"struct entry {\n" |
| 482 |
" int data;\n" |
| 483 |
" SLIST_ENTRY(entry) entries; /* Singly linked list */\n" |
| 484 |
"};\n" |
| 485 |
"\\&\n" |
| 486 |
"SLIST_HEAD(slisthead, entry);\n" |
| 487 |
"\\&\n" |
| 488 |
"int\n" |
| 489 |
"main(void)\n" |
| 490 |
"{\n" |
| 491 |
" struct entry *n1, *n2, *n3, *np;\n" |
| 492 |
" struct slisthead head; /* Singly linked list\n" |
| 493 |
" head */\n" |
| 494 |
"\\&\n" |
| 495 |
" SLIST_INIT(&head); /* Initialize the queue */\n" |
| 496 |
"\\&\n" |
| 497 |
" n1 = malloc(sizeof(struct entry)); /* Insert at the head */\n" |
| 498 |
" SLIST_INSERT_HEAD(&head, n1, entries);\n" |
| 499 |
"\\&\n" |
| 500 |
" n2 = malloc(sizeof(struct entry)); /* Insert after */\n" |
| 501 |
" SLIST_INSERT_AFTER(n1, n2, entries);\n" |
| 502 |
"\\&\n" |
| 503 |
" SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */\n" |
| 504 |
" free(n2);\n" |
| 505 |
"\\&\n" |
| 506 |
" n3 = SLIST_FIRST(&head);\n" |
| 507 |
" SLIST_REMOVE_HEAD(&head, entries); /* Deletion from the head */\n" |
| 508 |
" free(n3);\n" |
| 509 |
"\\&\n" |
| 510 |
" for (unsigned int i = 0; i E<lt> 5; i++) {\n" |
| 511 |
" n1 = malloc(sizeof(struct entry));\n" |
| 512 |
" SLIST_INSERT_HEAD(&head, n1, entries);\n" |
| 513 |
" n1-E<gt>data = i;\n" |
| 514 |
" }\n" |
| 515 |
"\\&\n" |
| 516 |
" /* Forward traversal */\n" |
| 517 |
" SLIST_FOREACH(np, &head, entries)\n" |
| 518 |
" printf(\"%i\\[rs]n\", np-E<gt>data);\n" |
| 519 |
"\\&\n" |
| 520 |
" while (!SLIST_EMPTY(&head)) { /* List deletion */\n" |
| 521 |
" n1 = SLIST_FIRST(&head);\n" |
| 522 |
" SLIST_REMOVE_HEAD(&head, entries);\n" |
| 523 |
" free(n1);\n" |
| 524 |
" }\n" |
| 525 |
" SLIST_INIT(&head);\n" |
| 526 |
"\\&\n" |
| 527 |
" exit(EXIT_SUCCESS);\n" |
| 528 |
"}\n" |
| 529 |
msgstr "" |
| 530 |
|
| 531 |
#. SRC END |
| 532 |
#. type: SH |
| 533 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 534 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 535 |
#, no-wrap |
| 536 |
msgid "SEE ALSO" |
| 537 |
msgstr "" |
| 538 |
|
| 539 |
#. type: Plain text |
| 540 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 541 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 542 |
msgid "B<insque>(3), B<queue>(7)" |
| 543 |
msgstr "" |
| 544 |
|
| 545 |
#. type: TH |
| 546 |
#: debian-trixie |
| 547 |
#, no-wrap |
| 548 |
msgid "2024-06-15" |
| 549 |
msgstr "" |
| 550 |
|
| 551 |
#. type: TH |
| 552 |
#: debian-trixie |
| 553 |
#, no-wrap |
| 554 |
msgid "Linux man-pages 6.9.1" |
| 555 |
msgstr "" |
| 556 |
|
| 557 |
#. type: Plain text |
| 558 |
#: debian-trixie |
| 559 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 560 |
msgstr "" |
| 561 |
|
| 562 |
#. .BI "void SLIST_REMOVE_AFTER(struct TYPE *" elm , |
| 563 |
#. .BI " SLIST_ENTRY " NAME ); |
| 564 |
#. .P |
| 565 |
#. .BI "void SLIST_SWAP(SLIST_HEAD *" head1 ", SLIST_HEAD *" head2 , |
| 566 |
#. .BI " SLIST_ENTRY " NAME ); |
| 567 |
#. type: Plain text |
| 568 |
#: debian-trixie fedora-44 fedora-rawhide |
| 569 |
#, no-wrap |
| 570 |
msgid "" |
| 571 |
"B<void SLIST_REMOVE(SLIST_HEAD *>I<head>B<, struct TYPE *>I<elm>B<,>\n" |
| 572 |
"B< SLIST_ENTRY >I<NAME>B<);>\n" |
| 573 |
"B<void SLIST_REMOVE_HEAD(SLIST_HEAD *>I<head>B<,>\n" |
| 574 |
"B< SLIST_ENTRY >I<NAME>B<);>\n" |
| 575 |
msgstr "" |
| 576 |
|
| 577 |
#. type: TH |
| 578 |
#: fedora-44 fedora-rawhide |
| 579 |
#, no-wrap |
| 580 |
msgid "2024-07-23" |
| 581 |
msgstr "" |
| 582 |
|
| 583 |
#. type: TH |
| 584 |
#: fedora-44 fedora-rawhide |
| 585 |
#, no-wrap |
| 586 |
msgid "Linux man-pages 6.13" |
| 587 |
msgstr "" |
| 588 |
|
| 589 |
#. type: TH |
| 590 |
#: mageia-cauldron |
| 591 |
#, no-wrap |
| 592 |
msgid "Linux man-pages 6.17" |
| 593 |
msgstr "" |
| 594 |
|
| 595 |
#. type: TH |
| 596 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 597 |
#, no-wrap |
| 598 |
msgid "Linux man-pages (unreleased)" |
| 599 |
msgstr "" |