From nobody Mon Feb 9 15:45:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1668589929; cv=none; d=zohomail.com; s=zohoarc; b=IcFjMCnGPvw0Y1HN+IxE+JM0x/yXLa7Wb1XFYc0NJKCx5hCi5XzB68K7OGPiTU8Ci13NrSDMwm20covt745wynRrFB6EQv6+p47cvxjlRhV3aYcB7SFFAgA5o2fqkqmiMudELwUz3SRKpyyOn2UwHP/3acT5kBEfOGnHokpQPdk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668589929; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nh+OxNoQzcP8ThjGLQdQ7DFQkc7VYGzePSAMRLiPjXA=; b=LXDP/dyImUxNfLv0F5P65xwGH7O9Vrz1MUZWEn4QN8yYz3mJFjdUFsFx2mrkQ7wcYjUT+Ufcq7Z+HAPqpcWm8JwvIcDYjvAH37NSzKW8/Oma+kzayET7aPjbHuKgR0su1K56xeAENh7Ogh4oTi1s4kZrrvY27O1c5S2aXF+AwTE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1668589929037987.3131666446482; Wed, 16 Nov 2022 01:12:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-297-a-WAXwfhNL64s-KMUFBy5Q-1; Wed, 16 Nov 2022 04:12:02 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E5732833B02; Wed, 16 Nov 2022 09:11:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D21D517595; Wed, 16 Nov 2022 09:11:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C2A531946A6C; Wed, 16 Nov 2022 09:11:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5156419465A2 for ; Wed, 16 Nov 2022 09:11:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4348E40C83DA; Wed, 16 Nov 2022 09:11:48 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC51940C83D9 for ; Wed, 16 Nov 2022 09:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668589927; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nh+OxNoQzcP8ThjGLQdQ7DFQkc7VYGzePSAMRLiPjXA=; b=VgIiqXLW5tItwrm2AtMZp3FtDshNIgZC9ckUo0kbxhCSIaunIW0Tkl9h8XUv3ChDnbLdXZ YcWb+er380mgBxIWh+NBx1hBDm67peHZUtiP0vTmWLy0tWU9XioReTh/mcyaO/pExeYUQE nC14Zv14p6zmAnGNyBFb0l+YAAmRbDo= X-MC-Unique: a-WAXwfhNL64s-KMUFBy5Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/7] docs: Fill missing docs on STRCASEPREFIX() and STRSKIP() Date: Wed, 16 Nov 2022 10:11:40 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1668589930804100001 Content-Type: text/plain; charset="utf-8"; x-default="true" We document use of our STR*() macros, but somehow missed STRCASEPREFIX() and STRSKIP(). Signed-off-by: Michal Privoznik --- docs/coding-style.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index d4c9d3b8ab..1faaf681e4 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -735,6 +735,21 @@ use one of the following semantically named macros =20 STRPREFIX(a, b) =20 +- For case insensitive equality of a prefix: + + :: + + STRCASEPREFIX(a, b) + +- For skipping prefix: + + :: + + /* Instead of: + * STRPREFIX(a, b) ? a + strlen(b) : NULL + * use: */ + STRSKIP(a, b) + - To avoid having to check if a or b are NULL: =20 :: --=20 2.37.4