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