From patchwork Tue Oct 20 21:30:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40785 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 201283951848; Tue, 20 Oct 2020 21:31:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 201283951848 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229512; bh=KBmDSg7Kmagr47rya0Pnkx9S4aBnm/Fm6xh1MWNJ6UE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VMcXxfCnDPE+2Kcm3QA0qX7RBEEybelkJYa6nqvny2sJsyQ2bBRQjAaIO7aVy2GWK xU22Z1Zyy2Eud8UCmtf7qPTEVISnI4Q0jDNXLAOAwI7m/XQflpxuScthDt0Zv0dz75 Bxj6wP96obB1sDQdLWGCmKMj98/8d7FkeNoszGSA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by sourceware.org (Postfix) with ESMTPS id 4730E3857C7D for ; Tue, 20 Oct 2020 21:31:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4730E3857C7D Received: by mail-wr1-x441.google.com with SMTP id h5so4471098wrv.7 for ; Tue, 20 Oct 2020 14:31:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KBmDSg7Kmagr47rya0Pnkx9S4aBnm/Fm6xh1MWNJ6UE=; b=W/13RiG3AjLiXEjF4WMIi7dwHz9qVlOIJ0rikPDgEx+wYbz7JEsjNW2foFpGeMxq/G Zj+EApAoktKd/XwGmz3pNKR3uXEDO/xsQ8B0MxL1ofCPTwQ6Qqa4M22Xavb2vAyZfZfZ c0nHthcjuddBYxWJ97lgnAcwMytswAJlB+Et+IhSpnnv+NiYxiR3BADDE1ilTIAstB4f wCbmTzd8TNcHwqQxhxYjkXlHyLQfFRAv8Z3dfeH9ANFBANdMKib0F1w47/sqsj1Brc3y XJA9KfsxZ9VL0eO68hnw/hgBecGasoA/GsShDdZTyL6xrg9FZKPCXherWTJ6teiSc6FE JEow== X-Gm-Message-State: AOAM5321qixDHRICyrgpqvOwmTHgN+azj7ve6izpj21f1O019Y+zz1ZD +nBDKoN+XoswcA0ZKq7+YJA= X-Google-Smtp-Source: ABdhPJyO7rvliCAnjEdV815+21dv6uwuIVHR9Igmng9ApoVUtK1S4bjv+Q/uwd58+mbEd6Acl0ejeQ== X-Received: by 2002:a5d:6551:: with SMTP id z17mr392623wrv.266.1603229509428; Tue, 20 Oct 2020 14:31:49 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:48 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 01/10] list.3: New page that will hold the (list) contents of queue.3 Date: Tue, 20 Oct 2020 23:30:59 +0200 Message-Id: <20201020213107.83837-2-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/list.3 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 man3/list.3 diff --git a/man3/list.3 b/man3/list.3 new file mode 100644 index 000000000..127c391f1 --- /dev/null +++ b/man3/list.3 @@ -0,0 +1,40 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" and Copyright (c) 2020 by Alejandro Colomar +.\" +.\" %%%LICENSE_START(BSD_3_CLAUSE_UCB) +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" %%%LICENSE_END +.\" +.\" +.TH LIST 3 2020-10-19 "GNU" "Linux Programmer's Manual" +.SH NAME +.SH SYNOPSIS +.SH DESCRIPTION +.SH RETURN VALUE +.SH CONFORMING TO +.SH BUGS +.SH EXAMPLES +.SH SEE ALSO From patchwork Tue Oct 20 21:31:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40786 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 387A9395185F; Tue, 20 Oct 2020 21:31:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 387A9395185F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229514; bh=UG0rXrw3CBsfE3f/zeHuA1mFbFHv3bshR6MacpsGi50=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=XYnMVvILpTfBjrd5V3r0K3xX+sHK6ryLkYdw8pGU6N/3HSGxaPXnKYQJHwm+QaYHF UwgC8mny1BKhB9oOYE9mtPE0K5H+fBqVtRfVcwtQrO7T4wIEvAFWl7j9TGJKa2QL81 0SiDMeeh0AvGxPM3lptw/kdEHWQ28QcfHBaa07Og= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 5BFC7385DC37 for ; Tue, 20 Oct 2020 21:31:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5BFC7385DC37 Received: by mail-wr1-x430.google.com with SMTP id x7so4488725wrl.3 for ; Tue, 20 Oct 2020 14:31:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UG0rXrw3CBsfE3f/zeHuA1mFbFHv3bshR6MacpsGi50=; b=CkZ9e47TcDR3dsdx8NsQdGTf1TRJAH1uUL9myBKh+djFHy1su1oNojr2sGkwCc4w+F NSSzx2l8HucEl0+PxNltNMY/WPUpLwI/7QaxZpD0IA6ls6w8ZOdB+XxoTngw8DKsNsf2 tlh8kkCjj2UGL1SJ/vHG2x8mJRVXEzfEK9NXtlR/d7UoYh7kjy7naCZu8lhuZp/kX1/0 cPh9/Af8rBpa7kHr77MnHvgZnkgApQhlM4kS5OW2bD3Nj7QxYj+POvF0aW8IY5vaxOhz 6pl/P5VxB03/SNnJ043gDID/Ue7dw7xbut8abdW4Ax9OqE84tfG6a1qdzIki6lTPenXw Ee9w== X-Gm-Message-State: AOAM532AbqvFGkF0v5UHqYZwKfbuLbc6beAAbc6cWk/ifaWGY/UaGmJD ox6baUjucWWLYooYn27ftyA= X-Google-Smtp-Source: ABdhPJxA4t1sXfkjWQA3EomL35mY15EfMsemx586dBSqmxD6RnulMV8GfriIe5hv+ZXzldaXPdzrLQ== X-Received: by 2002:a1c:a485:: with SMTP id n127mr5650wme.44.1603229510540; Tue, 20 Oct 2020 14:31:50 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:50 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 02/10] list.3, queue.3: NAME: Move code from queue.3 to list.3 Date: Tue, 20 Oct 2020 23:31:00 +0200 Message-Id: <20201020213107.83837-3-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/list.3 | 17 +++++++++++++++++ man3/queue.3 | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/man3/list.3 b/man3/list.3 index 127c391f1..340b24f7c 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -31,6 +31,23 @@ .\" .TH LIST 3 2020-10-19 "GNU" "Linux Programmer's Manual" .SH NAME +.Nm LIST_EMPTY , +.Nm LIST_ENTRY , +.Nm LIST_FIRST , +.Nm LIST_FOREACH , +.\" .Nm LIST_FOREACH_FROM , +.\" .Nm LIST_FOREACH_SAFE , +.\" .Nm LIST_FOREACH_FROM_SAFE , +.Nm LIST_HEAD , +.Nm LIST_HEAD_INITIALIZER , +.Nm LIST_INIT , +.Nm LIST_INSERT_AFTER , +.Nm LIST_INSERT_BEFORE , +.Nm LIST_INSERT_HEAD , +.Nm LIST_NEXT , +.\" .Nm LIST_PREV , +.Nm LIST_REMOVE , +.\" .Nm LIST_SWAP , .SH SYNOPSIS .SH DESCRIPTION .SH RETURN VALUE diff --git a/man3/queue.3 b/man3/queue.3 index c48b4ba9f..17adfcf3b 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -71,23 +71,6 @@ .Nm STAILQ_REMOVE_HEAD , .Nm STAILQ_REMOVE , .\" .Nm STAILQ_SWAP , -.Nm LIST_EMPTY , -.Nm LIST_ENTRY , -.Nm LIST_FIRST , -.Nm LIST_FOREACH , -.\" .Nm LIST_FOREACH_FROM , -.\" .Nm LIST_FOREACH_SAFE , -.\" .Nm LIST_FOREACH_FROM_SAFE , -.Nm LIST_HEAD , -.Nm LIST_HEAD_INITIALIZER , -.Nm LIST_INIT , -.Nm LIST_INSERT_AFTER , -.Nm LIST_INSERT_BEFORE , -.Nm LIST_INSERT_HEAD , -.Nm LIST_NEXT , -.\" .Nm LIST_PREV , -.Nm LIST_REMOVE , -.\" .Nm LIST_SWAP , .Nm TAILQ_CONCAT , .Nm TAILQ_EMPTY , .Nm TAILQ_ENTRY , From patchwork Tue Oct 20 21:31:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40787 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C50CC3857C7D; Tue, 20 Oct 2020 21:31:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C50CC3857C7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229514; bh=a3/ILDRPOl4O79/1OT1aRKaDkEjrDlJzrhy5z8s3IKY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=FyILUSeMkPrF2snl9UhqSixwinofKA1MvXBHl9FOinHAHLYg/zqG2QtonhhhCaBtf 0W/4HCLvbqGeN5awQtN5pYfkSTnECTXAlUcG7msnOHebed4OqNWlyXWPZy1lA8lx8l p0ZyVZ8Wl8zjVccL1n1Xl3wW0eK9lovqIVNjMvZY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 6E4603857C7D for ; Tue, 20 Oct 2020 21:31:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E4603857C7D Received: by mail-wr1-x433.google.com with SMTP id g12so4467934wrp.10 for ; Tue, 20 Oct 2020 14:31:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a3/ILDRPOl4O79/1OT1aRKaDkEjrDlJzrhy5z8s3IKY=; b=OesgK0goh0jhyfjnxtJuUQuwqYNPxfi57BND3fJejWqr9TpITuvSATUCcK/lGdntJb fMfQqu1gnjgtqOXgl7g1O8gaXkMtTYo+TZNfpe8scVSL7GWQKLF6yyARRDus+gyyq+zC n09k4owkH/O/8KNovegteUbp5K0fLv4D1R+iV9JS4wVzdsywEic23IrF8QWN7olwK2Xx fyIR3auJKVQ3TrJ7wAFhy8CxKyvmKbT/i9RricFk/oZif3k3Fjbb6lWDKLAci/CYqUuu G363QPoKJMDkdWm0lucJxYeRvYR/qVXYrPEkcaETaIKqSvw02ttWTaIvJpL2cTrKzlFz 4VWg== X-Gm-Message-State: AOAM533XcxcDl0SyLMRPp5JDOK6b82YAjNquzScxArgKwqe6qFOxIoVi RGCU0ZOlpDpGQ9Bgf5H6xp0= X-Google-Smtp-Source: ABdhPJxWRKp8c9hW7wWq/bKyD8nchkpOpib+mYB7WKGFD9FmzGJap9Vj3kV5yVnGQM8Iz6RbHiJihQ== X-Received: by 2002:a1c:9a93:: with SMTP id c141mr131640wme.168.1603229511613; Tue, 20 Oct 2020 14:31:51 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:51 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 03/10] list.3, queue.3: SYNOPSIS: Move code from queue.3 to list.3 Date: Tue, 20 Oct 2020 23:31:01 +0200 Message-Id: <20201020213107.83837-4-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/list.3 | 18 ++++++++++++++++++ man3/queue.3 | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/man3/list.3 b/man3/list.3 index 340b24f7c..020f66200 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -49,6 +49,24 @@ .Nm LIST_REMOVE , .\" .Nm LIST_SWAP , .SH SYNOPSIS +.Fn LIST_EMPTY "LIST_HEAD *head" +.Fn LIST_ENTRY "TYPE" +.Fn LIST_FIRST "LIST_HEAD *head" +.Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" +.\" .Fn LIST_FOREACH_FROM "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" +.\" .Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" +.\" .Fn LIST_FOREACH_FROM_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" +.Fn LIST_HEAD "HEADNAME" "TYPE" +.Fn LIST_HEAD_INITIALIZER "LIST_HEAD head" +.Fn LIST_INIT "LIST_HEAD *head" +.Fn LIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_INSERT_BEFORE "TYPE *listelm" "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_INSERT_HEAD "LIST_HEAD *head" "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME" +.\" .Fn LIST_PREV "TYPE *elm" "LIST_HEAD *head" "TYPE" "LIST_ENTRY NAME" +.Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" +.\" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" +.\" .SH DESCRIPTION .SH RETURN VALUE .SH CONFORMING TO diff --git a/man3/queue.3 b/man3/queue.3 index 17adfcf3b..a3a2eb2b0 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -157,24 +157,6 @@ lists, tail queues, and circular queues .Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .\" .Fn STAILQ_SWAP "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" "STAILQ_ENTRY NAME" .\" -.Fn LIST_EMPTY "LIST_HEAD *head" -.Fn LIST_ENTRY "TYPE" -.Fn LIST_FIRST "LIST_HEAD *head" -.Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" -.\" .Fn LIST_FOREACH_FROM "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" -.\" .Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" -.\" .Fn LIST_FOREACH_FROM_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" -.Fn LIST_HEAD "HEADNAME" "TYPE" -.Fn LIST_HEAD_INITIALIZER "LIST_HEAD head" -.Fn LIST_INIT "LIST_HEAD *head" -.Fn LIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "LIST_ENTRY NAME" -.Fn LIST_INSERT_BEFORE "TYPE *listelm" "TYPE *elm" "LIST_ENTRY NAME" -.Fn LIST_INSERT_HEAD "LIST_HEAD *head" "TYPE *elm" "LIST_ENTRY NAME" -.Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME" -.\" .Fn LIST_PREV "TYPE *elm" "LIST_HEAD *head" "TYPE" "LIST_ENTRY NAME" -.Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" -.\" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" -.\" .Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME" .Fn TAILQ_EMPTY "TAILQ_HEAD *head" .Fn TAILQ_ENTRY "TYPE" From patchwork Tue Oct 20 21:31:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40788 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D15F3951868; Tue, 20 Oct 2020 21:31:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D15F3951868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229516; bh=q4AS660V4urS33qYPQDnrnkRG5Ie/2E14T39OsVAMRY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ZDvalwPH5H04BBiq+tNpk4hTFzMUJr7YFeISrmEdsXb4qi8s1IQFxA+vLR8iMY0qB zpFPp5Fjj3q52vXR6hPmyKXH7LqAEr12DdnfUP0YMkgAi3WjIAJ1kdnhgfpd4cFiPE cVb9shRwR2m9y3Ly//QWLicAd/hCrGaQGY0I44Jc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id CFF9B3951868 for ; Tue, 20 Oct 2020 21:31:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CFF9B3951868 Received: by mail-wr1-x435.google.com with SMTP id g12so4468054wrp.10 for ; Tue, 20 Oct 2020 14:31:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q4AS660V4urS33qYPQDnrnkRG5Ie/2E14T39OsVAMRY=; b=ARVdiQN3TvVwM1WGwJUV9p4Ie2t7PnYv5RZel7UITGzwE2rJtJP4cZAzFRuDw/nBzk Reoj0qEUJBjgUsOwpyf2bO0k8vaYHGIP5OI7EoduqeFbhMY6KZuV1AVfq7CGnwO1SnQj BxyxiMKcvIJOrLVIGruZoOgds33KriN1HwmeVz1XyrWl9vVxVFLV1zywg4jjNj6Kcfzs JtL8QSs5ULsBopJJythEwWvvHUPMa5vwJaGZj5kiAPO/O0c0MRRaos/9vbjOc2dPeRTI HKAGBGd8aTuNdsm28mSS47az6lIpH+RYMtapN5b9Vr2MsZ1dyK9omJYCs6D030Farzsr Qzkg== X-Gm-Message-State: AOAM530h80EMcRLt/jHnB52DEKyu841EEPCDyg9TD9+cVTyqIhqXgFrV Ob7Gymid9N0zkflTLK1JkV839YwCOuw= X-Google-Smtp-Source: ABdhPJyfhaqLDzE1zivlgjQjNJzTolBLZX6rmuLnvFxvU9f3yb3G+kXg4LgpUj/knEo11KE4k7VmoQ== X-Received: by 2002:a1c:2601:: with SMTP id m1mr9944wmm.12.1603229512713; Tue, 20 Oct 2020 14:31:52 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:52 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 04/10] list.3, queue.3: DESCRIPTION: Move list specific code from queue.3 to list.3 Date: Tue, 20 Oct 2020 23:31:02 +0200 Message-Id: <20201020213107.83837-5-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/list.3 | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++ man3/queue.3 | 149 --------------------------------------------------- 2 files changed, 149 insertions(+), 149 deletions(-) diff --git a/man3/list.3 b/man3/list.3 index 020f66200..1a197fe31 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -68,6 +68,155 @@ .\" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" .SH DESCRIPTION +.Ss Lists +A list is headed by a structure defined by the +.Nm LIST_HEAD +macro. +This structure contains a single pointer to the first element +on the list. +The elements are doubly linked so that an arbitrary element can be +removed without traversing the list. +New elements can be added to the list after an existing element, +before an existing element, or at the head of the list. +A +.Fa LIST_HEAD +structure is declared as follows: +.Bd -literal -offset indent +LIST_HEAD(HEADNAME, TYPE) head; +.Ed +.Pp +where +.Fa HEADNAME +is the name of the structure to be defined, and +.Fa TYPE +is the type of the elements to be linked into the list. +A pointer to the head of the list can later be declared as: +.Bd -literal -offset indent +struct HEADNAME *headp; +.Ed +.Pp +(The names +.Li head +and +.Li headp +are user selectable.) +.Pp +The macro +.Nm LIST_HEAD_INITIALIZER +evaluates to an initializer for the list +.Fa head . +.Pp +The macro +.Nm LIST_EMPTY +evaluates to true if there are no elements in the list. +.Pp +The macro +.Nm LIST_ENTRY +declares a structure that connects the elements in +the list. +.Pp +The macro +.Nm LIST_FIRST +returns the first element in the list or NULL if the list +is empty. +.Pp +The macro +.Nm LIST_FOREACH +traverses the list referenced by +.Fa head +in the forward direction, assigning each element in turn to +.Fa var . +.\" .Pp +.\" The macro +.\" .Nm LIST_FOREACH_FROM +.\" behaves identically to +.\" .Nm LIST_FOREACH +.\" when +.\" .Fa var +.\" is NULL, else it treats +.\" .Fa var +.\" as a previously found LIST element and begins the loop at +.\" .Fa var +.\" instead of the first element in the LIST referenced by +.\" .Fa head . +.\" .Pp +.\" The macro +.\" .Nm LIST_FOREACH_SAFE +.\" traverses the list referenced by +.\" .Fa head +.\" in the forward direction, assigning each element in turn to +.\" .Fa var . +.\" However, unlike +.\" .Fn LIST_FOREACH +.\" here it is permitted to both remove +.\" .Fa var +.\" as well as free it from within the loop safely without interfering with the +.\" traversal. +.\" .Pp +.\" The macro +.\" .Nm LIST_FOREACH_FROM_SAFE +.\" behaves identically to +.\" .Nm LIST_FOREACH_SAFE +.\" when +.\" .Fa var +.\" is NULL, else it treats +.\" .Fa var +.\" as a previously found LIST element and begins the loop at +.\" .Fa var +.\" instead of the first element in the LIST referenced by +.\" .Fa head . +.Pp +The macro +.Nm LIST_INIT +initializes the list referenced by +.Fa head . +.Pp +The macro +.Nm LIST_INSERT_HEAD +inserts the new element +.Fa elm +at the head of the list. +.Pp +The macro +.Nm LIST_INSERT_AFTER +inserts the new element +.Fa elm +after the element +.Fa listelm . +.Pp +The macro +.Nm LIST_INSERT_BEFORE +inserts the new element +.Fa elm +before the element +.Fa listelm . +.Pp +The macro +.Nm LIST_NEXT +returns the next element in the list, or NULL if this is the last. +.\" .Pp +.\" The macro +.\" .Nm LIST_PREV +.\" returns the previous element in the list, or NULL if this is the first. +.\" List +.\" .Fa head +.\" must contain element +.\" .Fa elm . +.Pp +The macro +.Nm LIST_REMOVE +removes the element +.Fa elm +from the list. +.\" .Pp +.\" The macro +.\" .Nm LIST_SWAP +.\" swaps the contents of +.\" .Fa head1 +.\" and +.\" .Fa head2 . +.Pp +See the EXAMPLES section below for an example program using a linked list. .SH RETURN VALUE .SH CONFORMING TO .SH BUGS diff --git a/man3/queue.3 b/man3/queue.3 index a3a2eb2b0..6ee793e25 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -689,155 +689,6 @@ from the tail queue. .Pp See the EXAMPLES section below for an example program using a singly-linked tail queue. -.Ss Lists -A list is headed by a structure defined by the -.Nm LIST_HEAD -macro. -This structure contains a single pointer to the first element -on the list. -The elements are doubly linked so that an arbitrary element can be -removed without traversing the list. -New elements can be added to the list after an existing element, -before an existing element, or at the head of the list. -A -.Fa LIST_HEAD -structure is declared as follows: -.Bd -literal -offset indent -LIST_HEAD(HEADNAME, TYPE) head; -.Ed -.Pp -where -.Fa HEADNAME -is the name of the structure to be defined, and -.Fa TYPE -is the type of the elements to be linked into the list. -A pointer to the head of the list can later be declared as: -.Bd -literal -offset indent -struct HEADNAME *headp; -.Ed -.Pp -(The names -.Li head -and -.Li headp -are user selectable.) -.Pp -The macro -.Nm LIST_HEAD_INITIALIZER -evaluates to an initializer for the list -.Fa head . -.Pp -The macro -.Nm LIST_EMPTY -evaluates to true if there are no elements in the list. -.Pp -The macro -.Nm LIST_ENTRY -declares a structure that connects the elements in -the list. -.Pp -The macro -.Nm LIST_FIRST -returns the first element in the list or NULL if the list -is empty. -.Pp -The macro -.Nm LIST_FOREACH -traverses the list referenced by -.Fa head -in the forward direction, assigning each element in turn to -.Fa var . -.\" .Pp -.\" The macro -.\" .Nm LIST_FOREACH_FROM -.\" behaves identically to -.\" .Nm LIST_FOREACH -.\" when -.\" .Fa var -.\" is NULL, else it treats -.\" .Fa var -.\" as a previously found LIST element and begins the loop at -.\" .Fa var -.\" instead of the first element in the LIST referenced by -.\" .Fa head . -.\" .Pp -.\" The macro -.\" .Nm LIST_FOREACH_SAFE -.\" traverses the list referenced by -.\" .Fa head -.\" in the forward direction, assigning each element in turn to -.\" .Fa var . -.\" However, unlike -.\" .Fn LIST_FOREACH -.\" here it is permitted to both remove -.\" .Fa var -.\" as well as free it from within the loop safely without interfering with the -.\" traversal. -.\" .Pp -.\" The macro -.\" .Nm LIST_FOREACH_FROM_SAFE -.\" behaves identically to -.\" .Nm LIST_FOREACH_SAFE -.\" when -.\" .Fa var -.\" is NULL, else it treats -.\" .Fa var -.\" as a previously found LIST element and begins the loop at -.\" .Fa var -.\" instead of the first element in the LIST referenced by -.\" .Fa head . -.Pp -The macro -.Nm LIST_INIT -initializes the list referenced by -.Fa head . -.Pp -The macro -.Nm LIST_INSERT_HEAD -inserts the new element -.Fa elm -at the head of the list. -.Pp -The macro -.Nm LIST_INSERT_AFTER -inserts the new element -.Fa elm -after the element -.Fa listelm . -.Pp -The macro -.Nm LIST_INSERT_BEFORE -inserts the new element -.Fa elm -before the element -.Fa listelm . -.Pp -The macro -.Nm LIST_NEXT -returns the next element in the list, or NULL if this is the last. -.\" .Pp -.\" The macro -.\" .Nm LIST_PREV -.\" returns the previous element in the list, or NULL if this is the first. -.\" List -.\" .Fa head -.\" must contain element -.\" .Fa elm . -.Pp -The macro -.Nm LIST_REMOVE -removes the element -.Fa elm -from the list. -.\" .Pp -.\" The macro -.\" .Nm LIST_SWAP -.\" swaps the contents of -.\" .Fa head1 -.\" and -.\" .Fa head2 . -.Pp -See the EXAMPLES section below for an example program using a linked list. .Ss Tail queues A tail queue is headed by a structure defined by the .Nm TAILQ_HEAD From patchwork Tue Oct 20 21:31:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40789 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE4F23951887; Tue, 20 Oct 2020 21:31:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE4F23951887 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229517; bh=o7z1FCNthgNoAzkV5wfpZDd/T+Vo5OuZ65brpIH8Q64=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=j9z8AnaKJsR/o2igY3amkWpDbCCi9AJXYu9N9opyEnr+ft2yePFA8mn6caZoZeHXK z7F9L22tmhKOCvw7N41Zh/4KL4T6q3gM6ND6Ztx0MLEEyUOCLSwI/GaRpsF4iuUm2H R4fwF7rEfIZz4gYWgwqb7JVXa7Jo5jgwv+yvgkbE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id D54E9395187A for ; Tue, 20 Oct 2020 21:31:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D54E9395187A Received: by mail-wr1-x436.google.com with SMTP id y12so4474613wrp.6 for ; Tue, 20 Oct 2020 14:31:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o7z1FCNthgNoAzkV5wfpZDd/T+Vo5OuZ65brpIH8Q64=; b=OqzTiIOzmzKGuLBJmyaiodGwAgMjOAvc6rU63Au73tbyPeRVdb2Q4oKCIKQVhgMRW0 m6EFzmpde8Mki8agxmMBpCGjrlJCYhb6Dkg/o3WlV3NF4KydBsQDh7jG6dUi6wwLeUbM yf07gDPIZrCJNDTcRo9e5L6IJcaxxcgr/DqdEN3PkpbclM0b+aVvplRonomg7byHFAAx 9vI5gt9N8DOH/PXkKOWHLMKzKC6qmu26u9guDZJdm5xR92h9KN+XYxR8X8/+HBx4LbQY jw3VJVJs5e7WrKgyyNKpYIwhGIV0Jp+uXRTw4xnD91Nfnkk8FHCJfg2r1UZvbVXCJa1n HVjQ== X-Gm-Message-State: AOAM530rq9ed1Zl8tLwPUkk5HEYd+nwnHf1/6Wn0zKikvpoESxQk5i3Z sj8maSTIH3g/C4WwiNFSE8dStg8wRG0= X-Google-Smtp-Source: ABdhPJwLSc0ZuEKPrbr18y/3vgn4ljXgMhTiWQE8TxgqwV/skgqH18+UcZR5QM+8PARVo0vIB+0IQA== X-Received: by 2002:a1c:2681:: with SMTP id m123mr124038wmm.138.1603229513979; Tue, 20 Oct 2020 14:31:53 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:53 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 05/10] list.3, queue.3: EXAMPLES: Move example program from queue.3 to list.3 Date: Tue, 20 Oct 2020 23:31:03 +0200 Message-Id: <20201020213107.83837-6-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/list.3 | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ man3/queue.3 | 53 ---------------------------------------------------- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/man3/list.3 b/man3/list.3 index 1a197fe31..6252aaf6a 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -221,4 +221,57 @@ See the EXAMPLES section below for an example program using a linked list. .SH CONFORMING TO .SH BUGS .SH EXAMPLES +.Ss List example +.Bd -literal +#include +#include +#include +#include + +struct entry { + int data; + LIST_ENTRY(entry) entries; /* List. */ +}; + +LIST_HEAD(listhead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct listhead head; /* List head. */ + int i; + + LIST_INIT(&head); /* Initialize the list. */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ + LIST_INSERT_HEAD(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after. */ + LIST_INSERT_AFTER(n1, n2, entries); + + n3 = malloc(sizeof(struct entry)); /* Insert before. */ + LIST_INSERT_BEFORE(n2, n3, entries); + + i = 0; /* Forward traversal. */ + LIST_FOREACH(np, &head, entries) + np->data = i++; + + LIST_REMOVE(n2, entries); /* Deletion. */ + free(n2); + /* Forward traversal. */ + LIST_FOREACH(np, &head, entries) + printf("%i\en", np->data); + /* List Deletion. */ + n1 = LIST_FIRST(&head); + while (n1 != NULL) { + n2 = LIST_NEXT(n1, entries); + free(n1); + n1 = n2; + } + LIST_INIT(&head); + + exit(EXIT_SUCCESS); +} +.Ed .SH SEE ALSO diff --git a/man3/queue.3 b/man3/queue.3 index 6ee793e25..0f55a899e 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -1155,59 +1155,6 @@ main(void) exit(EXIT_SUCCESS); } .Ed -.Ss List example -.Bd -literal -#include -#include -#include -#include - -struct entry { - int data; - LIST_ENTRY(entry) entries; /* List. */ -}; - -LIST_HEAD(listhead, entry); - -int -main(void) -{ - struct entry *n1, *n2, *n3, *np; - struct listhead head; /* List head. */ - int i; - - LIST_INIT(&head); /* Initialize the list. */ - - n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ - LIST_INSERT_HEAD(&head, n1, entries); - - n2 = malloc(sizeof(struct entry)); /* Insert after. */ - LIST_INSERT_AFTER(n1, n2, entries); - - n3 = malloc(sizeof(struct entry)); /* Insert before. */ - LIST_INSERT_BEFORE(n2, n3, entries); - - i = 0; /* Forward traversal. */ - LIST_FOREACH(np, &head, entries) - np->data = i++; - - LIST_REMOVE(n2, entries); /* Deletion. */ - free(n2); - /* Forward traversal. */ - LIST_FOREACH(np, &head, entries) - printf("%i\en", np->data); - /* List Deletion. */ - n1 = LIST_FIRST(&head); - while (n1 != NULL) { - n2 = LIST_NEXT(n1, entries); - free(n1); - n1 = n2; - } - LIST_INIT(&head); - - exit(EXIT_SUCCESS); -} -.Ed .Ss Tail queue example .Bd -literal #include From patchwork Tue Oct 20 21:31:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40790 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 72679395188E; Tue, 20 Oct 2020 21:31:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72679395188E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229519; bh=Vx6KFeycH91N/4puf7JS4dZTFcKzQA5T9i2Qjnzua6g=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=dCbwCeShoIkTE1OBOUMR+DJyo9K3XS3ilF6FQfMIFf8iiZZfil4aXC/QbYL2cLtEI s5FWi4cRtJ4q7uFdb37rHkInPStmkvYWU9Z5d/f1OWPwIutL+7gJ4lQgf0xd08d0nL vHQH3Le83fLZDZrAoIfVM5O6ru30qugjR61MYtkQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id E6EC13951866 for ; Tue, 20 Oct 2020 21:31:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E6EC13951866 Received: by mail-wr1-x442.google.com with SMTP id n15so4496663wrq.2 for ; Tue, 20 Oct 2020 14:31:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vx6KFeycH91N/4puf7JS4dZTFcKzQA5T9i2Qjnzua6g=; b=mv4fKxNb3HFa21ghSIG6jFZwLpfG8/5pOl/fi+l4ut3m3csNo41khts3SYLITkwzDa khivFYJE85jKPnQ/lDMT6+ElQi9XOkUP22qc+Eee5/lWVOfN9gV++8qMbGU+wNzm4uzP yHbj2nM0Ewc8CZyViOIjwLBhlddCtcLOR8Iw9kNNgYWViGcueJdGesbLhaOd0ROsZ405 Bp9ubyF6pll6FOd/oqhlFh3cOqSDXgqFRt2i1dV+UVluuN5irVDUXSdTHc/VVYDnky1r 2sRivADLsnhToEUJ/e8jDbyS2E5QmQILEyLjwUGOeYrUa6higiigiXVFVzSTGJBfzCPQ LSyg== X-Gm-Message-State: AOAM533fRdbsoPjMUz+b6IIZSan1+uhgaDC2NQFCkKmFirmTrlDO/ldT TmMA8nKgqFpnOrc7i3TAdzk= X-Google-Smtp-Source: ABdhPJySOD6YzuTJVgv3gbmb/oQqds8jw9MIttz3BWSD5CfrBb2qmosEDygrQliBs5wWOI0RtXPjdw== X-Received: by 2002:a1c:cc07:: with SMTP id h7mr116601wmb.55.1603229515102; Tue, 20 Oct 2020 14:31:55 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:54 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 06/10] list.3: Copy and adapt code from queue.3 Date: Tue, 20 Oct 2020 23:31:04 +0200 Message-Id: <20201020213107.83837-7-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" list.3: SYNOPSIS: Copy include from queue.3 list.3: DESCRIPTION: Copy description about naming of macros from queue.3 list.3: DESCRIPTION: Remove unrelated code to adapt to this page list.3: DESCRIPTION: Remove lines pointing to the EXAMPLES list.3: CONFORMING TO: Copy from queue.3 list.3: CONFORMING TO: Adapt to this page Signed-off-by: Alejandro Colomar --- man3/list.3 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/man3/list.3 b/man3/list.3 index 6252aaf6a..4c36b0846 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -49,6 +49,8 @@ .Nm LIST_REMOVE , .\" .Nm LIST_SWAP , .SH SYNOPSIS +.In sys/queue.h +.\" .Fn LIST_EMPTY "LIST_HEAD *head" .Fn LIST_ENTRY "TYPE" .Fn LIST_FIRST "LIST_HEAD *head" @@ -68,6 +70,18 @@ .\" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" .SH DESCRIPTION +In the macro definitions, +.Fa TYPE +is the name of a user defined structure, +that must contain a field of type +.Li LIST_ENTRY , +named +.Fa NAME . +The argument +.Fa HEADNAME +is the name of a user defined structure that must be declared +using the macro +.Li LIST_HEAD . .Ss Lists A list is headed by a structure defined by the .Nm LIST_HEAD @@ -215,10 +229,12 @@ from the list. .\" .Fa head1 .\" and .\" .Fa head2 . -.Pp -See the EXAMPLES section below for an example program using a linked list. .SH RETURN VALUE .SH CONFORMING TO +Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. +Present on the BSDs +(LIST macros first appeared in +.Bx 4.4 ). .SH BUGS .SH EXAMPLES .Ss List example From patchwork Tue Oct 20 21:31:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40791 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03DF139518B8; Tue, 20 Oct 2020 21:32:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03DF139518B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229520; bh=Ku781uqUtjCpRHjD5gWfId78Gr8KlUZxznoUiGGC1gI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=casMvOjCbi/tiKpi2R8jWzvV5e6oegtcERYv7cVs5RpONKFjWY9p7K7ivSIIvvEZk rLJ2l1rQ059lXIotT32/14E4LjpTGbN4SoYhh629T/hazAcSwTih7T5lSlydNLxx1b InLqBtOmyjjmjg5rAcJDlVs8fzQWim7d/pKU+WmY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by sourceware.org (Postfix) with ESMTPS id 1FB82395188A for ; Tue, 20 Oct 2020 21:31:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1FB82395188A Received: by mail-wr1-x441.google.com with SMTP id h7so4479880wre.4 for ; Tue, 20 Oct 2020 14:31:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ku781uqUtjCpRHjD5gWfId78Gr8KlUZxznoUiGGC1gI=; b=uO51SjhcrQyeyuUgGNk3yQqt5dgNag5MFHUhgA448Z6o0vTgZ3wyUWtzcgtf01GL+5 bepQeaijWEq9KhWTTfCiNbKGsltUQPBG96DbQXIZz1i29KjXIWKwYzVJSJodkl12RkFF SVaCtYR1hXUWdEJZ2R0HRFeuv5Z2VI89SpmLQYccJWbvBa4J+53SHgca+zBajSHgvatH ZEfGOrim7g80Iny1LTuBt5qczL9jIj5TxrbsA2r1tNZWbQkt1yjj4bs6i1cnZevmxQQ0 eP983aKS8wHMSyOrMgLOWLPLIMHxWKymhS/WHFQci6pdgFjlZDJ7i4IKFJ0PdWJcDrr3 Imag== X-Gm-Message-State: AOAM530kMzn7gY6ybhqWgBkST0+U53V/bjK+lL+nd77H3BZdkADhmV6R HWgzus4Df7aGD7xSQ+61R2evTo8IoMU= X-Google-Smtp-Source: ABdhPJyibwaE1PkU2T2vJGQ29UGetS8LQmHZnDRCkdd2Nqm/++aZQ3ce3yv87JZchGvz8UxjL4hGeA== X-Received: by 2002:a1c:9e0e:: with SMTP id h14mr10621wme.18.1603229516199; Tue, 20 Oct 2020 14:31:56 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:55 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 07/10] list.3: ffix: Use man markup Date: Tue, 20 Oct 2020 23:31:05 +0200 Message-Id: <20201020213107.83837-8-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" list.3: NAME: ffix: Use man markup list.3: SYNOPSIS: ffix: Use man markup list.3: DESCRIPTION: ffix: Use man markup list.3: DESCRIPTION: ffix: Use man markup list.3: CONFORMING TO: ffix: Use man markup list.3: EXAMPLES: ffix: Use man markup Signed-off-by: Alejandro Colomar --- man3/list.3 | 261 ++++++++++++++++++++++++++++------------------------ 1 file changed, 141 insertions(+), 120 deletions(-) diff --git a/man3/list.3 b/man3/list.3 index 4c36b0846..0f9b20d26 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -31,60 +31,77 @@ .\" .TH LIST 3 2020-10-19 "GNU" "Linux Programmer's Manual" .SH NAME -.Nm LIST_EMPTY , -.Nm LIST_ENTRY , -.Nm LIST_FIRST , -.Nm LIST_FOREACH , -.\" .Nm LIST_FOREACH_FROM , -.\" .Nm LIST_FOREACH_SAFE , -.\" .Nm LIST_FOREACH_FROM_SAFE , -.Nm LIST_HEAD , -.Nm LIST_HEAD_INITIALIZER , -.Nm LIST_INIT , -.Nm LIST_INSERT_AFTER , -.Nm LIST_INSERT_BEFORE , -.Nm LIST_INSERT_HEAD , -.Nm LIST_NEXT , -.\" .Nm LIST_PREV , -.Nm LIST_REMOVE , -.\" .Nm LIST_SWAP , +LIST_EMPTY, +LIST_ENTRY, +LIST_FIRST, +LIST_FOREACH, +.\"LIST_FOREACH_FROM, +.\"LIST_FOREACH_SAFE, +.\"LIST_FOREACH_FROM_SAFE, +LIST_HEAD, +LIST_HEAD_INITIALIZER, +LIST_INIT, +LIST_INSERT_AFTER, +LIST_INSERT_BEFORE, +LIST_INSERT_HEAD, +LIST_NEXT, +LIST_PREV, +LIST_REMOVE +.\"LIST_SWAP .SH SYNOPSIS -.In sys/queue.h -.\" -.Fn LIST_EMPTY "LIST_HEAD *head" -.Fn LIST_ENTRY "TYPE" -.Fn LIST_FIRST "LIST_HEAD *head" -.Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" -.\" .Fn LIST_FOREACH_FROM "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" -.\" .Fn LIST_FOREACH_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" -.\" .Fn LIST_FOREACH_FROM_SAFE "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" "TYPE *temp_var" -.Fn LIST_HEAD "HEADNAME" "TYPE" -.Fn LIST_HEAD_INITIALIZER "LIST_HEAD head" -.Fn LIST_INIT "LIST_HEAD *head" -.Fn LIST_INSERT_AFTER "TYPE *listelm" "TYPE *elm" "LIST_ENTRY NAME" -.Fn LIST_INSERT_BEFORE "TYPE *listelm" "TYPE *elm" "LIST_ENTRY NAME" -.Fn LIST_INSERT_HEAD "LIST_HEAD *head" "TYPE *elm" "LIST_ENTRY NAME" -.Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME" -.\" .Fn LIST_PREV "TYPE *elm" "LIST_HEAD *head" "TYPE" "LIST_ENTRY NAME" -.Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" -.\" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" -.\" +.nf +.B #include +.PP +.BI "int LIST_EMPTY(LIST_HEAD *" head ");" +.PP +.B LIST_ENTRY(TYPE); +.PP +.BI "LIST_ENTRY *LIST_FIRST(LIST_HEAD *" head ");" +.PP +.BI "LIST_FOREACH(TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ");" +.\".PP +.\".BI "LIST_FOREACH_FROM(TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ");" +.\".PP +.\".BI "LIST_FOREACH_SAFE(TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ", TYPE *" temp_var ");" +.\".PP +.\".BI "LIST_FOREACH_FROM_SAFE(TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ", TYPE *" temp_var ");" +.PP +.B LIST_HEAD(HEADNAME, TYPE); +.PP +.BI "LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD " head ");" +.PP +.BI "void LIST_INIT(LIST_HEAD *" head ");" +.PP +.BI "void LIST_INSERT_AFTER(TYPE *" listelm ", TYPE *" elm ", LIST_ENTRY " NAME ");" +.PP +.BI "void LIST_INSERT_BEFORE(TYPE *" listelm ", TYPE *" elm ", LIST_ENTRY " NAME ");" +.PP +.BI "void LIST_INSERT_HEAD(LIST_HEAD *" head ", TYPE *" elm ", LIST_ENTRY " NAME ");" +.PP +.BI "LIST_ENTRY *LIST_NEXT(TYPE *" elm ", LIST_ENTRY " NAME ");" +.\".PP +.\".BI "LIST_ENTRY LIST_PREV(TYPE *" elm ", LIST_HEAD *" head ", TYPE, LIST_ENTRY " NAME ");" +.PP +.BI "void LIST_REMOVE(TYPE *" elm ", LIST_ENTRY " NAME ");" +.\".PP +.\".BI "void LIST_SWAP(LIST_HEAD *" head1 ", LIST_HEAD *" head2 ", TYPE, LIST_ENTRY " NAME ");" +.fi .SH DESCRIPTION In the macro definitions, -.Fa TYPE +.I TYPE is the name of a user defined structure, that must contain a field of type -.Li LIST_ENTRY , +.IR LIST_ENTRY , named -.Fa NAME . +.IR NAME . The argument -.Fa HEADNAME +.IR HEADNAME is the name of a user defined structure that must be declared using the macro -.Li LIST_HEAD . -.Ss Lists +.BR LIST_HEAD (). +.PP A list is headed by a structure defined by the -.Nm LIST_HEAD +.BR LIST_HEAD () macro. This structure contains a single pointer to the first element on the list. @@ -93,152 +110,156 @@ removed without traversing the list. New elements can be added to the list after an existing element, before an existing element, or at the head of the list. A -.Fa LIST_HEAD +.I LIST_HEAD structure is declared as follows: -.Bd -literal -offset indent +.PP +.in +4 +.EX LIST_HEAD(HEADNAME, TYPE) head; -.Ed -.Pp +.EE +.in +.PP where -.Fa HEADNAME +.I HEADNAME is the name of the structure to be defined, and -.Fa TYPE +.I TYPE is the type of the elements to be linked into the list. A pointer to the head of the list can later be declared as: -.Bd -literal -offset indent +.PP +.in +4 +.EX struct HEADNAME *headp; -.Ed -.Pp +.EE +.in +.PP (The names -.Li head +.I head and -.Li headp +.I headp are user selectable.) -.Pp +.PP The macro -.Nm LIST_HEAD_INITIALIZER +.BR LIST_HEAD_INITIALIZER () evaluates to an initializer for the list -.Fa head . -.Pp +.IR head . +.PP The macro -.Nm LIST_EMPTY +.BR LIST_EMPTY () evaluates to true if there are no elements in the list. -.Pp +.PP The macro -.Nm LIST_ENTRY +.BR LIST_ENTRY () declares a structure that connects the elements in the list. -.Pp +.PP The macro -.Nm LIST_FIRST +.BR LIST_FIRST () returns the first element in the list or NULL if the list is empty. -.Pp +.PP The macro -.Nm LIST_FOREACH +.BR LIST_FOREACH () traverses the list referenced by -.Fa head +.I head in the forward direction, assigning each element in turn to -.Fa var . -.\" .Pp +.IR var . +.\" .PP .\" The macro -.\" .Nm LIST_FOREACH_FROM +.\" .BR LIST_FOREACH_FROM () .\" behaves identically to -.\" .Nm LIST_FOREACH +.\" .BR LIST_FOREACH () .\" when -.\" .Fa var +.\" .I var .\" is NULL, else it treats -.\" .Fa var +.\" .I var .\" as a previously found LIST element and begins the loop at -.\" .Fa var +.\" .I var .\" instead of the first element in the LIST referenced by -.\" .Fa head . -.\" .Pp +.\" .IR head . +.\" .PP .\" The macro -.\" .Nm LIST_FOREACH_SAFE +.\" .BR LIST_FOREACH_SAFE () .\" traverses the list referenced by -.\" .Fa head +.\" .I head .\" in the forward direction, assigning each element in turn to -.\" .Fa var . +.\" .IR var . .\" However, unlike -.\" .Fn LIST_FOREACH +.\" .BR LIST_FOREACH () .\" here it is permitted to both remove -.\" .Fa var +.\" .I var .\" as well as free it from within the loop safely without interfering with the .\" traversal. -.\" .Pp +.\" .PP .\" The macro -.\" .Nm LIST_FOREACH_FROM_SAFE +.\" .BR LIST_FOREACH_FROM_SAFE () .\" behaves identically to -.\" .Nm LIST_FOREACH_SAFE +.\" .BR LIST_FOREACH_SAFE () .\" when -.\" .Fa var +.\" .I var .\" is NULL, else it treats -.\" .Fa var +.\" .I var .\" as a previously found LIST element and begins the loop at -.\" .Fa var +.\" .I var .\" instead of the first element in the LIST referenced by -.\" .Fa head . -.Pp +.\" .IR head . +.PP The macro -.Nm LIST_INIT +.BR LIST_INIT () initializes the list referenced by -.Fa head . -.Pp +.IR head . +.PP The macro -.Nm LIST_INSERT_HEAD +.BR LIST_INSERT_HEAD () inserts the new element -.Fa elm +.I elm at the head of the list. -.Pp +.PP The macro -.Nm LIST_INSERT_AFTER +.BR LIST_INSERT_AFTER () inserts the new element -.Fa elm +.I elm after the element -.Fa listelm . -.Pp +.IR listelm . +.PP The macro -.Nm LIST_INSERT_BEFORE +.BR LIST_INSERT_BEFORE () inserts the new element -.Fa elm +.I elm before the element -.Fa listelm . -.Pp +.IR listelm . +.PP The macro -.Nm LIST_NEXT +.BR LIST_NEXT () returns the next element in the list, or NULL if this is the last. -.\" .Pp +.\" .PP .\" The macro -.\" .Nm LIST_PREV +.\" .BR LIST_PREV () .\" returns the previous element in the list, or NULL if this is the first. .\" List -.\" .Fa head +.\" .I head .\" must contain element -.\" .Fa elm . -.Pp +.\" .IR elm . +.PP The macro -.Nm LIST_REMOVE +.BR LIST_REMOVE () removes the element -.Fa elm +.I elm from the list. -.\" .Pp +.\" .PP .\" The macro -.\" .Nm LIST_SWAP +.\" .BR LIST_SWAP () .\" swaps the contents of -.\" .Fa head1 +.\" .I head1 .\" and -.\" .Fa head2 . +.\" .IR head2 . .SH RETURN VALUE .SH CONFORMING TO Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs -(LIST macros first appeared in -.Bx 4.4 ). +(LIST macros first appeared in 4.4BSD). .SH BUGS .SH EXAMPLES -.Ss List example -.Bd -literal +.EX #include #include #include @@ -289,5 +310,5 @@ main(void) exit(EXIT_SUCCESS); } -.Ed +.EE .SH SEE ALSO From patchwork Tue Oct 20 21:31:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40792 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 04BDD3954430; Tue, 20 Oct 2020 21:32:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04BDD3954430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229523; bh=zeE3eUJsgtOl8itXfGQx1CTaT1qQcCvBm/X582QC+1c=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=f9mqqm4JYTt2GEi8i645PB0zER/NzqR4EkSAcTNYg015mVAJJPvP7ZXOIogE+69ry 0IARR896yXmpnmxWmqF0coJMzQytpPIp7mI+0AyKwdt39GFZrvFt6BUjoyJ0sImcpa 4kOil0zCD6fR1yJbyyPxxnzHyURZXe83LI8T30Lw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id 0D083395188E for ; Tue, 20 Oct 2020 21:31:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0D083395188E Received: by mail-wr1-x442.google.com with SMTP id e17so4458709wru.12 for ; Tue, 20 Oct 2020 14:31:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zeE3eUJsgtOl8itXfGQx1CTaT1qQcCvBm/X582QC+1c=; b=tYmFhZ4Vr+iAYJj3hS/bAOF/Li5cio+zH6P8E4H+kg+SMvzJt+TQA/zrtL9OdjMj34 gKGUt9VxKaeZt0CRbni3ztcj8LHZApo3h/V7WWzJZC51Yu0fw6v02RNrs+OS4xI03aXc ctCwVtN9DXzDSAUsl3LHwL8xXiS60aqtnsHIxgcZ9wWsqGGAPOoA4rvkw3mF5uYNlzBl 2FUUWQFWpaGcEyVJVRbVg9u1bQdx5gSQUY92fRtN5Kh9ricKpQzQDGzj3j5Eo9rKs7EJ sN288bcvXP1eC+du8oYD4jbuHL/wdXbFeMpD8972JU0UrU50lDGUdeY2aySyuE/b6bWL LmNA== X-Gm-Message-State: AOAM531xR1XKkFWZJUWv1kdiC0XF72wS+SAGa9LieMG64pw22qdCrqPm p/4ZXZFMFBhwLgF+7PX0Fug= X-Google-Smtp-Source: ABdhPJyGefQGBkB5O+dJQkZJ1JFnfJkZ5fmgQFECYzaPUpgS2WbR4SfwoFhtpXErFBacUC0fzt56MA== X-Received: by 2002:adf:f643:: with SMTP id x3mr408224wrp.180.1603229517198; Tue, 20 Oct 2020 14:31:57 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:56 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 08/10] list.3: Add details Date: Tue, 20 Oct 2020 23:31:06 +0200 Message-Id: <20201020213107.83837-9-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" list.3: NAME: Add description list.3: DESCRIPTION: Add short description list.3: SEE ALSO: Add insque(3) and queue(3) list.3: BUGS: Note LIST_FOREACH() limitations list.3: RETURN VALUE: Add details about the return value of those macros that "return" a value Signed-off-by: Alejandro Colomar --- man3/list.3 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/man3/list.3 b/man3/list.3 index 0f9b20d26..8233c3b3e 100644 --- a/man3/list.3 +++ b/man3/list.3 @@ -48,6 +48,7 @@ LIST_NEXT, LIST_PREV, LIST_REMOVE .\"LIST_SWAP +\- implementation of a doubly-linked list .SH SYNOPSIS .nf .B #include @@ -87,6 +88,8 @@ LIST_REMOVE .\".BI "void LIST_SWAP(LIST_HEAD *" head1 ", LIST_HEAD *" head2 ", TYPE, LIST_ENTRY " NAME ");" .fi .SH DESCRIPTION +These macros define and operate on doubly-linked lists. +.PP In the macro definitions, .I TYPE is the name of a user defined structure, @@ -253,11 +256,39 @@ from the list. .\" and .\" .IR head2 . .SH RETURN VALUE +.BR LIST_EMPTY () +returns non-zero if the list is empty, +and zero if the list contains at least one entry. +.PP +.BR LIST_FIRST (), +and +.BR LIST_NEXT () +return a pointer to the first or next +.I LIST_ENTRY +structre, respectively. +.PP +.BR LIST_HEAD_INITIALIZER () +returns an initializer that can be assigned to the list +.IR head . .SH CONFORMING TO Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008. Present on the BSDs (LIST macros first appeared in 4.4BSD). .SH BUGS +The macro +.BR LIST_FOREACH () +doesn't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +The macro +.BR LIST_FOREACH_SAFE (), +which is not present in glibc, +solves this bug by +allowing to both remove +.I var +as well as free it from within the loop safely +without interfering with the traversal. .SH EXAMPLES .EX #include @@ -312,3 +343,5 @@ main(void) } .EE .SH SEE ALSO +.BR insque (3), +.BR queue (3) From patchwork Tue Oct 20 21:31:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40793 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 87683396ECE9; Tue, 20 Oct 2020 21:32:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87683396ECE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229523; bh=mX+MH2xG4807IYOP98T4Bey9D7LruGYmV5RGewiStec=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GDDrYEWiVAGlVUQERi7NoqL3GvZKa3AK0KhaURaHILM0oI5kQdRa6t11S2gNBCRoZ /PeqdnXnTid1fGVwFOC3yfXNXURRttMcstjaJck4CnlBx24F6dEfU1D2csjd/8r4DS WtStIv48a1O1vDaqotc/KLpnAlKctM0FpUdhk/JA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 2EB753951866 for ; Tue, 20 Oct 2020 21:31:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2EB753951866 Received: by mail-wr1-x42c.google.com with SMTP id b8so4499775wrn.0 for ; Tue, 20 Oct 2020 14:31:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mX+MH2xG4807IYOP98T4Bey9D7LruGYmV5RGewiStec=; b=XvLmc+693swe/o6PJEO2cQtQ3EqtLuk8SOTSTmmbZZ97OMH9i7VPkTqY9vcBhfHPmw GglTpp7F43acZN/7IrCrcwX6nGnfZ0wi3EsqR94qeRz+ZsEyo2dnBjfJsGv3eQXPxkg/ vhlP29xJdhD57+069aQjLhRkepFz+v2PRMsPlsIkKeEzH9KDoplKRDczhaggYFI4K4VJ 4cM9sKdeob9svr/tRBbh/cQs/komhAmoKVMEiZx3Xf0X/MUs9zjVHPe55Aoywr52Z4/H ekT+eGXUJHV/5pNgIYtLeRRTIrmE8IJonmIxfD6fLXW83mCmGXAy/Z+3ZPSzQE0F7B0i 8EPg== X-Gm-Message-State: AOAM533hrgDZ4tI5gZ/YzWTAAOUcs1kym7roPtZ5Mrusvqw/io3X+o6A 29au37vUL29mpruJ07dxtbo= X-Google-Smtp-Source: ABdhPJye3/Bzt4pgoxQLqOBgNZte3p4haw0baa7WkK2W0+7Ywwp6gI30Ptq6LmvLZHoSSQzCgFoQvg== X-Received: by 2002:adf:e4c4:: with SMTP id v4mr361279wrm.79.1603229518344; Tue, 20 Oct 2020 14:31:58 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:57 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 09/10] LIST_EMPTY.3, LIST_ENTRY.3, LIST_FIRST.3, LIST_FOREACH.3, LIST_HEAD.3, LIST_HEAD_INITIALIZER.3, LIST_INIT.3, LIST_INSERT_AFTER.3, LIST_INSERT_BEFORE.3, LIST_INSERT_HEAD.3, LIST_NEXT.3, LIST_REMOVE.3: Link to the new list.3 page instead of queue.3 Date: Tue, 20 Oct 2020 23:31:07 +0200 Message-Id: <20201020213107.83837-10-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/LIST_EMPTY.3 | 2 +- man3/LIST_ENTRY.3 | 2 +- man3/LIST_FIRST.3 | 2 +- man3/LIST_FOREACH.3 | 2 +- man3/LIST_HEAD.3 | 2 +- man3/LIST_HEAD_INITIALIZER.3 | 2 +- man3/LIST_INIT.3 | 2 +- man3/LIST_INSERT_AFTER.3 | 2 +- man3/LIST_INSERT_BEFORE.3 | 2 +- man3/LIST_INSERT_HEAD.3 | 2 +- man3/LIST_NEXT.3 | 2 +- man3/LIST_REMOVE.3 | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/man3/LIST_EMPTY.3 b/man3/LIST_EMPTY.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_EMPTY.3 +++ b/man3/LIST_EMPTY.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_ENTRY.3 b/man3/LIST_ENTRY.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_ENTRY.3 +++ b/man3/LIST_ENTRY.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_FIRST.3 b/man3/LIST_FIRST.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_FIRST.3 +++ b/man3/LIST_FIRST.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_FOREACH.3 b/man3/LIST_FOREACH.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_FOREACH.3 +++ b/man3/LIST_FOREACH.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_HEAD.3 b/man3/LIST_HEAD.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_HEAD.3 +++ b/man3/LIST_HEAD.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_HEAD_INITIALIZER.3 b/man3/LIST_HEAD_INITIALIZER.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_HEAD_INITIALIZER.3 +++ b/man3/LIST_HEAD_INITIALIZER.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_INIT.3 b/man3/LIST_INIT.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_INIT.3 +++ b/man3/LIST_INIT.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_INSERT_AFTER.3 b/man3/LIST_INSERT_AFTER.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_INSERT_AFTER.3 +++ b/man3/LIST_INSERT_AFTER.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_INSERT_BEFORE.3 b/man3/LIST_INSERT_BEFORE.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_INSERT_BEFORE.3 +++ b/man3/LIST_INSERT_BEFORE.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_INSERT_HEAD.3 b/man3/LIST_INSERT_HEAD.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_INSERT_HEAD.3 +++ b/man3/LIST_INSERT_HEAD.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_NEXT.3 b/man3/LIST_NEXT.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_NEXT.3 +++ b/man3/LIST_NEXT.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 diff --git a/man3/LIST_REMOVE.3 b/man3/LIST_REMOVE.3 index c2956c9fc..dfafea85d 100644 --- a/man3/LIST_REMOVE.3 +++ b/man3/LIST_REMOVE.3 @@ -1 +1 @@ -.so man3/queue.3 +.so man3/list.3 From patchwork Tue Oct 20 21:31:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 40794 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 18118396ECFF; Tue, 20 Oct 2020 21:32:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18118396ECFF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603229524; bh=nzKSSoJZKqHUBfJ6ZLDZnMwADX64oPb1gvyEPaS2uOs=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=i+7ljRwEYqfVQuXKQYrYYV3uUNALV+aPm3aahMcX3/ilBcz6jPg/VeYvmlvmRojTZ r6OhD9XvlxfQ1OQNYcYdP8QbuC6oJ4wob5Z/cMdz117O2n37W9iiWt+gFf3hulrH2j GUlrTyqNsXED4h4jLCfS8aG6y/HK8EM4usGqYDJ0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 46A7F3954430 for ; Tue, 20 Oct 2020 21:32:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 46A7F3954430 Received: by mail-wr1-x429.google.com with SMTP id y12so4475082wrp.6 for ; Tue, 20 Oct 2020 14:32:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nzKSSoJZKqHUBfJ6ZLDZnMwADX64oPb1gvyEPaS2uOs=; b=VfR/397QLAl+MTEpWWRVeLRy1avKmTICIb+2vyyKfcq/XAW006SNVUqkxVta8BGX0v HzS5Gd+5EUxpR9gRMgVrGmDzHJTUk6+nAWuorzrIRYXrkOSCaGuaveWBUIjOAN3exYcb Gjrqcl1uMtFQZZcJWcHP7UHQcyzuDGVtji2aGJAENgN0oCL2XvDE/JMIsU0fSc86I4xK /xzgHvVxVbozdmMNPoM1PXj6f7SySkNyE3Fe/VEDx5Z41T54b+CDH4UgxAItQVMoCxe8 bnu10+vgXqGhlKQHAzb7e+CDkYzaDlI3XKkjmunj8EdIbQ7K/tOTNW1179hJBw8OZQEj 3JkA== X-Gm-Message-State: AOAM532V3PKHtpwRi7Au09389Ib6zx4inYfyI8p1GKomtCWiUVFuJwua H6P1Hr8oyKZbVIV/jMsFqn0= X-Google-Smtp-Source: ABdhPJyqjEjfa/drJPb7GU6gn6BhTl2I3et05WHVpxW05hr2NBpR5M4yO49Lbx5P+82nLc2ctIdC0Q== X-Received: by 2002:a5d:4d8a:: with SMTP id b10mr386082wru.5.1603229519349; Tue, 20 Oct 2020 14:31:59 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id y4sm35387wrp.74.2020.10.20.14.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 14:31:58 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH v2 10/10] queue.3: SEE ALSO: Add list(3) Date: Tue, 20 Oct 2020 23:31:08 +0200 Message-Id: <20201020213107.83837-11-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020142146.61837-23-colomar.6.4.3@gmail.com> References: <20201020142146.61837-23-colomar.6.4.3@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alejandro Colomar via Libc-alpha From: Alejandro Colomar Reply-To: Alejandro Colomar Cc: Alejandro Colomar , linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Signed-off-by: Alejandro Colomar --- man3/queue.3 | 1 + 1 file changed, 1 insertion(+) diff --git a/man3/queue.3 b/man3/queue.3 index 0f55a899e..90fd3db0e 100644 --- a/man3/queue.3 +++ b/man3/queue.3 @@ -1275,4 +1275,5 @@ functions first appeared in .Bx 4.4 . .Sh SEE ALSO .Xr insque 3 +.Xr list 3 .\" .Xr tree 3