diff options
Diffstat (limited to '')
-rw-r--r-- | templates/man3/stailq.3.pot | 1301 |
1 files changed, 1301 insertions, 0 deletions
diff --git a/templates/man3/stailq.3.pot b/templates/man3/stailq.3.pot new file mode 100644 index 00000000..2fe4bb9e --- /dev/null +++ b/templates/man3/stailq.3.pot @@ -0,0 +1,1301 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2024-03-01 17:09+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: TH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STAILQ" +msgstr "" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "2023-10-31" +msgstr "" + +#. type: TH +#: archlinux fedora-40 fedora-rawhide mageia-cauldron +#, no-wrap +msgid "Linux man-pages 6.06" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "NAME" +msgstr "" + +#. SIMPLEQ_CONCAT, +#. SIMPLEQ_FOREACH_FROM, +#. SIMPLEQ_FOREACH_FROM_SAFE, +#. SIMPLEQ_FOREACH_SAFE, +#. SIMPLEQ_LAST, +#. SIMPLEQ_REMOVE_AFTER, +#. SIMPLEQ_SWAP, +#. STAILQ_FOREACH_FROM, +#. STAILQ_FOREACH_FROM_SAFE, +#. STAILQ_FOREACH_SAFE, +#. STAILQ_LAST, +#. STAILQ_REMOVE_AFTER, +#. STAILQ_SWAP +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"SIMPLEQ_EMPTY, SIMPLEQ_ENTRY, SIMPLEQ_FIRST, SIMPLEQ_FOREACH, SIMPLEQ_HEAD, " +"SIMPLEQ_HEAD_INITIALIZER, SIMPLEQ_INIT, SIMPLEQ_INSERT_AFTER, " +"SIMPLEQ_INSERT_HEAD, SIMPLEQ_INSERT_TAIL, SIMPLEQ_NEXT, SIMPLEQ_REMOVE, " +"SIMPLEQ_REMOVE_HEAD, STAILQ_CONCAT, STAILQ_EMPTY, STAILQ_ENTRY, " +"STAILQ_FIRST, STAILQ_FOREACH, STAILQ_HEAD, STAILQ_HEAD_INITIALIZER, " +"STAILQ_INIT, STAILQ_INSERT_AFTER, STAILQ_INSERT_HEAD, STAILQ_INSERT_TAIL, " +"STAILQ_NEXT, STAILQ_REMOVE, STAILQ_REMOVE_HEAD, - implementation of a singly " +"linked tail queue" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "LIBRARY" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "Standard C library (I<libc>, I<-lc>)" +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SYNOPSIS" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<#include E<lt>sys/queue.hE<gt>>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<STAILQ_ENTRY(TYPE);>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<STAILQ_HEAD(HEADNAME, TYPE);>\n" +"B<STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD >I<head>B<);>\n" +"B<void STAILQ_INIT(STAILQ_HEAD *>I<head>B<);>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<int STAILQ_EMPTY(STAILQ_HEAD *>I<head>B<);>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<void STAILQ_INSERT_HEAD(STAILQ_HEAD *>I<head>B<,>\n" +"B< struct TYPE *>I<elm>B<, STAILQ_ENTRY >I<NAME>B<);>\n" +"B<void STAILQ_INSERT_TAIL(STAILQ_HEAD *>I<head>B<,>\n" +"B< struct TYPE *>I<elm>B<, STAILQ_ENTRY >I<NAME>B<);>\n" +"B<void STAILQ_INSERT_AFTER(STAILQ_HEAD *>I<head>B<, struct TYPE *>I<listelm>B<,>\n" +"B< struct TYPE *>I<elm>B<, STAILQ_ENTRY >I<NAME>B<);>\n" +msgstr "" + +#. .BI "struct TYPE *STAILQ_LAST(STAILQ_HEAD *" head ", struct TYPE *" elm , +#. .BI " STAILQ_ENTRY " NAME ); +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<struct TYPE *STAILQ_FIRST(STAILQ_HEAD *>I<head>B<);>\n" +"B<struct TYPE *STAILQ_NEXT(struct TYPE *>I<elm>B<, STAILQ_ENTRY >I<NAME>B<);>\n" +msgstr "" + +#. #-#-#-#-# archlinux: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .P +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#. #-#-#-#-# debian-bookworm: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .PP +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#. #-#-#-#-# debian-unstable: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .PP +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#. #-#-#-#-# fedora-40: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .P +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#. #-#-#-#-# fedora-rawhide: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .P +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#. #-#-#-#-# mageia-cauldron: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .P +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#. #-#-#-#-# opensuse-leap-15-6: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .PP +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#. #-#-#-#-# opensuse-tumbleweed: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ); +#. .PP +#. .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +#. .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<STAILQ_FOREACH(struct TYPE *>I<var>B<, STAILQ_HEAD *>I<head>B<, STAILQ_ENTRY >I<NAME>B<);>\n" +msgstr "" + +#. .BI "void STAILQ_REMOVE_AFTER(STAILQ_HEAD *" head ", struct TYPE *" elm , +#. .BI " STAILQ_ENTRY " NAME ); +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "" +"B<void STAILQ_REMOVE(STAILQ_HEAD *>I<head>B<, struct TYPE *>I<elm>B<, TYPE,>\n" +"B< STAILQ_ENTRY >I<NAME>B<);>\n" +"B<void STAILQ_REMOVE_HEAD(STAILQ_HEAD *>I<head>B<,>\n" +"B< STAILQ_ENTRY >I<NAME>B<);>\n" +msgstr "" + +#. .BI "void STAILQ_SWAP(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 , +#. .BI " STAILQ_ENTRY " NAME ); +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "B<void STAILQ_CONCAT(STAILQ_HEAD *>I<head1>B<, STAILQ_HEAD *>I<head2>B<);>\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"I<Note>: Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see " +"NOTES." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "DESCRIPTION" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "These macros define and operate on singly linked tail queues." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"In the macro definitions, I<TYPE> is the name of a user-defined structure, " +"that must contain a field of type I<STAILQ_ENTRY>, named I<NAME>. The " +"argument I<HEADNAME> is the name of a user-defined structure that must be " +"declared using the macro B<STAILQ_HEAD>()." +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Creation" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"A singly linked tail queue is headed by a structure defined by the " +"B<STAILQ_HEAD>() macro. This structure contains a pair of pointers, one to " +"the first element in the tail queue and the other to the last element in the " +"tail queue. The elements are singly linked for minimum space and pointer " +"manipulation overhead at the expense of O(n) removal for arbitrary " +"elements. New elements can be added to the tail queue after an existing " +"element, at the head of the tail queue, or at the end of the tail queue. A " +"I<STAILQ_HEAD> structure is declared as follows:" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STAILQ_HEAD(HEADNAME, TYPE) head;\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"where I<struct HEADNAME> is the structure to be defined, and I<struct TYPE> " +"is the type of the elements to be linked into the tail queue. A pointer to " +"the head of the tail queue can later be declared as:" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "struct HEADNAME *headp;\n" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "(The names I<head> and I<headp> are user selectable.)" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_ENTRY>() declares a structure that connects the elements in the " +"tail queue." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_HEAD_INITIALIZER>() evaluates to an initializer for the tail queue " +"I<head>." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "B<STAILQ_INIT>() initializes the tail queue referenced by I<head>." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_EMPTY>() evaluates to true if there are no items on the tail queue." +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Insertion" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_INSERT_HEAD>() inserts the new element I<elm> at the head of the " +"tail queue." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_INSERT_TAIL>() inserts the new element I<elm> at the end of the " +"tail queue." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_INSERT_AFTER>() inserts the new element I<elm> after the element " +"I<listelm>." +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Traversal" +msgstr "" + +#. #-#-#-#-# archlinux: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#. #-#-#-#-# debian-bookworm: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#. #-#-#-#-# debian-unstable: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#. #-#-#-#-# fedora-40: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#. #-#-#-#-# fedora-rawhide: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#. #-#-#-#-# mageia-cauldron: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#. #-#-#-#-# opensuse-leap-15-6: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#. #-#-#-#-# opensuse-tumbleweed: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_LAST () +#. returns the last item on the tail queue. +#. If the tail queue is empty the return value is NULL . +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_FIRST>() returns the first item on the tail queue or NULL if the " +"tail queue is empty." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_NEXT>() returns the next item on the tail queue, or NULL this item " +"is the last." +msgstr "" + +#. #-#-#-#-# archlinux: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .P +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .P +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#. #-#-#-#-# debian-bookworm: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .PP +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .PP +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#. #-#-#-#-# debian-unstable: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .PP +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .PP +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#. #-#-#-#-# fedora-40: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .P +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .P +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#. #-#-#-#-# fedora-rawhide: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .P +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .P +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#. #-#-#-#-# mageia-cauldron: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .P +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .P +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#. #-#-#-#-# opensuse-leap-15-6: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .PP +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .PP +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#. #-#-#-#-# opensuse-tumbleweed: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_FOREACH_FROM () +#. behaves identically to +#. .BR STAILQ_FOREACH () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. .PP +#. .BR STAILQ_FOREACH_SAFE () +#. traverses the tail queue referenced by +#. .I head +#. in the forward direction, assigning each element +#. in turn to +#. .IR var . +#. However, unlike +#. .BR STAILQ_FOREACH () +#. here it is permitted to both remove +#. .I var +#. as well as free it from within the loop safely without interfering with the +#. traversal. +#. .PP +#. .BR STAILQ_FOREACH_FROM_SAFE () +#. behaves identically to +#. .BR STAILQ_FOREACH_SAFE () +#. when +#. .I var +#. is NULL, else it treats +#. .I var +#. as a previously found STAILQ element and begins the loop at +#. .I var +#. instead of the first element in the STAILQ referenced by +#. .IR head . +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_FOREACH>() traverses the tail queue referenced by I<head> in the " +"forward direction, assigning each element in turn to I<var>." +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Removal" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "B<STAILQ_REMOVE>() removes the element I<elm> from the tail queue." +msgstr "" + +#. #-#-#-#-# archlinux: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#. #-#-#-#-# debian-bookworm: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#. #-#-#-#-# debian-unstable: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#. #-#-#-#-# fedora-40: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#. #-#-#-#-# fedora-rawhide: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#. #-#-#-#-# mageia-cauldron: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#. #-#-#-#-# opensuse-leap-15-6: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#. #-#-#-#-# opensuse-tumbleweed: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_REMOVE_AFTER () +#. removes the element after +#. .I elm +#. from the tail queue. +#. Unlike +#. .BR STAILQ_REMOVE (), +#. this macro does not traverse the entire tail queue. +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_REMOVE_HEAD>() removes the element at the head of the tail queue. " +"For optimum efficiency, elements being removed from the head of the tail " +"queue should use this macro explicitly rather than the generic " +"B<STAILQ_REMOVE>() macro." +msgstr "" + +#. type: SS +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "Other features" +msgstr "" + +#. #-#-#-#-# archlinux: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#. #-#-#-#-# debian-bookworm: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#. #-#-#-#-# debian-unstable: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#. #-#-#-#-# fedora-40: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#. #-#-#-#-# fedora-rawhide: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#. #-#-#-#-# mageia-cauldron: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .P +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#. #-#-#-#-# opensuse-leap-15-6: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#. #-#-#-#-# opensuse-tumbleweed: stailq.3.pot (PACKAGE VERSION) #-#-#-#-# +#. .PP +#. .BR STAILQ_SWAP () +#. swaps the contents of +#. .I head1 +#. and +#. .IR head2 . +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_CONCAT>() concatenates the tail queue headed by I<head2> onto the " +"end of the one headed by I<head1> removing all entries from the former." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "RETURN VALUE" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_EMPTY>() returns nonzero if the queue is empty, and zero if the " +"queue contains at least one entry." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_FIRST>(), and B<STAILQ_NEXT>() return a pointer to the first or " +"next I<TYPE> structure, respectively." +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_HEAD_INITIALIZER>() returns an initializer that can be assigned to " +"the queue I<head>." +msgstr "" + +#. type: SH +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "VERSIONS" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"Some BSDs provide SIMPLEQ instead of STAILQ. They are identical, but for " +"historical reasons they were named differently on different BSDs. STAILQ " +"originated on FreeBSD, and SIMPLEQ originated on NetBSD. For compatibility " +"reasons, some systems provide both sets of macros. glibc provides both " +"STAILQ and SIMPLEQ, which are identical except for a missing SIMPLEQ " +"equivalent to B<STAILQ_CONCAT>()." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "BUGS" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "" +"B<STAILQ_FOREACH>() doesn't allow I<var> to be removed or freed within the " +"loop, as it would interfere with the traversal. B<STAILQ_FOREACH_SAFE>(), " +"which is present on the BSDs but is not present in glibc, fixes this " +"limitation by allowing I<var> to safely be removed from the list and freed " +"from within the loop without interfering with the traversal." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "STANDARDS" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "BSD." +msgstr "" + +#. type: SH +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "HISTORY" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-leap-15-6 opensuse-tumbleweed +msgid "4.4BSD." +msgstr "" + +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "EXAMPLES" +msgstr "" + +#. type: Plain text +#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron +#: opensuse-tumbleweed +#, no-wrap +msgid "" +"#include E<lt>stddef.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>sys/queue.hE<gt>\n" +"\\&\n" +"struct entry {\n" +" int data;\n" +" STAILQ_ENTRY(entry) entries; /* Singly linked tail queue */\n" +"};\n" +"\\&\n" +"STAILQ_HEAD(stailhead, entry);\n" +"\\&\n" +"int\n" +"main(void)\n" +"{\n" +" struct entry *n1, *n2, *n3, *np;\n" +" struct stailhead head; /* Singly linked tail queue\n" +" head */\n" +"\\&\n" +" STAILQ_INIT(&head); /* Initialize the queue */\n" +"\\&\n" +" n1 = malloc(sizeof(struct entry)); /* Insert at the head */\n" +" STAILQ_INSERT_HEAD(&head, n1, entries);\n" +"\\&\n" +" n1 = malloc(sizeof(struct entry)); /* Insert at the tail */\n" +" STAILQ_INSERT_TAIL(&head, n1, entries);\n" +"\\&\n" +" n2 = malloc(sizeof(struct entry)); /* Insert after */\n" +" STAILQ_INSERT_AFTER(&head, n1, n2, entries);\n" +"\\&\n" +" STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */\n" +" free(n2);\n" +"\\&\n" +" n3 = STAILQ_FIRST(&head);\n" +" STAILQ_REMOVE_HEAD(&head, entries); /* Deletion from the head */\n" +" free(n3);\n" +"\\&\n" +" n1 = STAILQ_FIRST(&head);\n" +" n1-E<gt>data = 0;\n" +" for (unsigned int i = 1; i E<lt> 5; i++) {\n" +" n1 = malloc(sizeof(struct entry));\n" +" STAILQ_INSERT_HEAD(&head, n1, entries);\n" +" n1-E<gt>data = i;\n" +" }\n" +" /* Forward traversal */\n" +" STAILQ_FOREACH(np, &head, entries)\n" +" printf(\"%i\\en\", np-E<gt>data);\n" +" /* TailQ deletion */\n" +" n1 = STAILQ_FIRST(&head);\n" +" while (n1 != NULL) {\n" +" n2 = STAILQ_NEXT(n1, entries);\n" +" free(n1);\n" +" n1 = n2;\n" +" }\n" +" STAILQ_INIT(&head);\n" +"\\&\n" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. SRC END +#. type: SH +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +#, no-wrap +msgid "SEE ALSO" +msgstr "" + +#. type: Plain text +#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide +#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed +msgid "B<insque>(3), B<queue>(7)" +msgstr "" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "2023-02-05" +msgstr "" + +#. type: TH +#: debian-bookworm +#, no-wrap +msgid "Linux man-pages 6.03" +msgstr "" + +#. type: Plain text +#: debian-bookworm +msgid "" +"Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs (STAILQ " +"macros first appeared in 4.4BSD)." +msgstr "" + +#. type: SH +#: debian-bookworm +#, no-wrap +msgid "NOTES" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"#include E<lt>stddef.hE<gt>\n" +"#include E<lt>stdio.hE<gt>\n" +"#include E<lt>stdlib.hE<gt>\n" +"#include E<lt>sys/queue.hE<gt>\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"struct entry {\n" +" int data;\n" +" STAILQ_ENTRY(entry) entries; /* Singly linked tail queue */\n" +"};\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "STAILQ_HEAD(stailhead, entry);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +"int\n" +"main(void)\n" +"{\n" +" struct entry *n1, *n2, *n3, *np;\n" +" struct stailhead head; /* Singly linked tail queue\n" +" head */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid " STAILQ_INIT(&head); /* Initialize the queue */\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" n1 = malloc(sizeof(struct entry)); /* Insert at the head */\n" +" STAILQ_INSERT_HEAD(&head, n1, entries);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" n1 = malloc(sizeof(struct entry)); /* Insert at the tail */\n" +" STAILQ_INSERT_TAIL(&head, n1, entries);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" n2 = malloc(sizeof(struct entry)); /* Insert after */\n" +" STAILQ_INSERT_AFTER(&head, n1, n2, entries);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */\n" +" free(n2);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" n3 = STAILQ_FIRST(&head);\n" +" STAILQ_REMOVE_HEAD(&head, entries); /* Deletion from the head */\n" +" free(n3);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" n1 = STAILQ_FIRST(&head);\n" +" n1-E<gt>data = 0;\n" +" for (unsigned int i = 1; i E<lt> 5; i++) {\n" +" n1 = malloc(sizeof(struct entry));\n" +" STAILQ_INSERT_HEAD(&head, n1, entries);\n" +" n1-E<gt>data = i;\n" +" }\n" +" /* Forward traversal */\n" +" STAILQ_FOREACH(np, &head, entries)\n" +" printf(\"%i\\en\", np-E<gt>data);\n" +" /* TailQ deletion */\n" +" n1 = STAILQ_FIRST(&head);\n" +" while (n1 != NULL) {\n" +" n2 = STAILQ_NEXT(n1, entries);\n" +" free(n1);\n" +" n1 = n2;\n" +" }\n" +" STAILQ_INIT(&head);\n" +msgstr "" + +#. type: Plain text +#: debian-bookworm opensuse-leap-15-6 +#, no-wrap +msgid "" +" exit(EXIT_SUCCESS);\n" +"}\n" +msgstr "" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "2023-05-03" +msgstr "" + +#. type: TH +#: debian-unstable opensuse-tumbleweed +#, no-wrap +msgid "Linux man-pages 6.05.01" +msgstr "" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "2023-03-30" +msgstr "" + +#. type: TH +#: opensuse-leap-15-6 +#, no-wrap +msgid "Linux man-pages 6.04" +msgstr "" |