From patchwork Sun Mar 30 14:32:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 41034 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 448C427BBE9; Sun, 30 Mar 2025 16:52:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 67D3E27BBE2 for ; Sun, 30 Mar 2025 16:52:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tyuwr-0003P0-4b; Sun, 30 Mar 2025 11:51:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tyuwD-0003Ms-Fh for guix-patches@gnu.org; Sun, 30 Mar 2025 11:51:09 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tyuwC-00028G-SA; Sun, 30 Mar 2025 11:51:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=t96MmNdEdMDhyCwll8S1Y4AAwglQBlqeJl7Mq5jnfOE=; b=oX/l+BPvu8eFJv7lO1N0I/5Q/52zDIodnyTYuWnBgpijR0H4MdSNnpJMTA7w6ep36akBID5rDe6zAym24r8dIR7R1zpjK8Gs13pZv5z6hvufcGPiV2lLuwW6JaMEbHKYObvyjJzYobCiNe38d7Hf3xIyLe97RiYqMbOzK++s9C/qVUEZ4U2FjQdwvmITSnu+VktcKSvkiMCU8vC+aN+M061DetP/M7mm6MHvD+1arSylR/4gIMricD1HqJd12jV3vLTZozzTYzOs4RB97tqPLQVKajiEULcw8CwQVZUo8LAo55S6RyWTmIrjc9GyrwrVjX+yoG1oy30fbGR9+qM6mQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tyuw9-0007Ov-Sw; Sun, 30 Mar 2025 11:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77387] [PATCH 1/2] man-db: Parse man macro arguments better. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 30 Mar 2025 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77387 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77387@debbugs.gnu.org Cc: Sergey Trofimov , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 77387-submit@debbugs.gnu.org id=B77387.174334983728401 (code B ref 77387); Sun, 30 Mar 2025 15:51:01 +0000 Received: (at 77387) by debbugs.gnu.org; 30 Mar 2025 15:50:37 +0000 Received: from localhost ([127.0.0.1]:37819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tyuvk-0007O1-E8 for submit@debbugs.gnu.org; Sun, 30 Mar 2025 11:50:36 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:56421) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tyuvh-0007Ng-BW for 77387@debbugs.gnu.org; Sun, 30 Mar 2025 11:50:34 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-ac2bdea5a38so612505366b.0 for <77387@debbugs.gnu.org>; Sun, 30 Mar 2025 08:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1743349826; x=1743954626; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t96MmNdEdMDhyCwll8S1Y4AAwglQBlqeJl7Mq5jnfOE=; b=sIBKmVhJzVJHLVkS4hLla2lnst4nwt54e6oD6H54s70IexaMu3xomoDtFsoJ5ocFT8 xf/dFwyhNMbq2P2GEoQWdYehP27ZoPgacIBEgAvPTlsiQiw2t3RctXmQBnmlvXBC4Kc5 YorHYHR1+7mP6CpHu8tlDdBcifOw0BsoFLK116PF8Nbg5TecmUogg3JvHb9C+GN3ag/m /VFyoZDRxZPaInlOtEORaEoG5sMXjNdGV1GjF16V1t1CP9YOC+ZNF7GkxiGVEXjDQD8k L+0XGcHoSCdloZxUGUo3weohoSOwB3d55M+1l2vlDLbrg5upSokKgoMOr6fjmyxghvL0 AorA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743349826; x=1743954626; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t96MmNdEdMDhyCwll8S1Y4AAwglQBlqeJl7Mq5jnfOE=; b=k7jmT/6AM3f/uBx92JwaEGNA/fW1RaiAEkVUJc5ND5pJnuuXkUEThEQPBdi47r61tt vDhIxddJsGut7cv9umLL1vx9m8rGJ/GghmvD/Kfl01M/Nry2lQ50Orj1moeEqFvu281y t5bVXy1cFFGyWyk2h86ATlbGhihf5YpdHLw97WQJmVJhH6utLta0jbuBGUz9KPPUaCE5 JT692A+Ve/teA6pg68pfYDY7yU3wJFCCyr/0pdEA7erYKv2MNdHY7IBGwLBYspi55ixb u4qjGfattc9hCw5EfIknvisSLf/KTyzu8yGtXC98ykaLqZB0eFeCSG3BmXZGKz+ORJM8 16Vg== X-Gm-Message-State: AOJu0YyqZru8yuQAY5IrcaAyoOwNXvhVF+xjnJ5dL6K1bzInb6UoDImr xcPHOaA2spw+iQtcxtbIsSE8pxwGH4ARO1/CLxnn59JypfvNMu0LdwwP5XiJDsm3muKK1EVKV7W pwB0= X-Gm-Gg: ASbGnctaoOlN4yetAkIL6NpfbVfpVDUksEZp/oBkTYMdRNCJQFEbRvZfLvnuDOVzrws zq5fZzjeXpp6JlmExiiGY22eXLvzPD6C3fpWhgOty+y7hAwXiJMP/9h52azuY9aQbh4kK+cWosp xE3CVZsG2uKex7URCsZOUPPopPmUKKRr8oDqmxKLvHNnl6W3ITeq3e1F087zApMGWR13Mn72F1s cBI5/yHVwssPMYGZeWFA8dbOaXpVarjo1TvV3MJa187vBQYrGREntEt9l8iA8CR0U9CgWE0kLzm 675eX//TGrz2L/5qiU9abc7cPU+zIh9bdVbI7bMlFQ== X-Google-Smtp-Source: AGHT+IHvNbYf7df6BsEix2t5VBrZtoNQSXlrk0ifDr2L6MfeUhdYaosxNMsV/iYXTIcWFlf/9KMaZA== X-Received: by 2002:a17:907:948b:b0:abf:6db5:c9a9 with SMTP id a640c23a62f3a-ac738bbe871mr479144566b.39.1743349825836; Sun, 30 Mar 2025 08:50:25 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5edc16d4f4bsm4419215a12.30.2025.03.30.08.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 08:50:25 -0700 (PDT) Date: Sun, 30 Mar 2025 16:32:54 +0200 Message-ID: <7068d5eb173f3d0c7cb69ae9592cb61b2dd84281.1743343624.git.sarg@sarg.org.ru> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Sergey Trofimov X-ACL-Warn: , Sergey Trofimov via Guix-patches X-Patchwork-Original-From: Sergey Trofimov via Guix-patches via From: Sergey Trofimov Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/man-db.scm (man-macro-tokenize): New procedure to parse man macros. (man-page->entry): Parse macro line using man-macro-tokenize. Change-Id: Iea0ffbc65290757df746138e0a6174646b5a3eb8 --- guix/man-db.scm | 52 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/guix/man-db.scm b/guix/man-db.scm index bba90ed473..44c01ac298 100644 --- a/guix/man-db.scm +++ b/guix/man-db.scm @@ -161,16 +161,50 @@ (define (read-synopsis port) (line (loop (cons line lines)))))) +(define (man-macro-tokenize input) + (let loop ((pos 0) + (tokens '()) + (current '()) + (in-string? #f)) + (if (>= pos (string-length input)) + ;; End of input + (unless in-string? + (reverse (if (null? current) + tokens + (cons (list->string (reverse current)) tokens)))) + (let ((c (string-ref input pos))) + (cond + ;; Inside a string + (in-string? + (if (char=? c #\") + (if (and (< (+ pos 1) (string-length input)) + (char=? (string-ref input (+ pos 1)) #\")) + ;; Double quote inside string + (loop (+ pos 2) tokens (cons #\" current) #t) + ;; End of string + (loop (+ pos 1) (cons (list->string (reverse current)) tokens) '() #f)) + ;; Regular character in string + (loop (+ pos 1) tokens (cons c current) #t))) + + ;; Whitespace outside string + ((char-whitespace? c) + (if (null? current) + (loop (+ pos 1) tokens '() #f) + (loop (+ pos 1) (cons (list->string (reverse current)) tokens) '() #f))) + + ;; Start of string + ((char=? c #\") + (if (null? current) + (loop (+ pos 1) tokens '() #t) + (loop pos (cons (list->string (reverse current)) tokens) '() #f))) + + ;; Symbol character + (else + (loop (+ pos 1) tokens (cons c current) #f))))))) + (define* (man-page->entry file #:optional (resolve identity)) "Parse FILE, a gzip or zstd compressed man page, and return a for it." - (define (string->number* str) - (if (and (string-prefix? "\"" str) - (> (string-length str) 1) - (string-suffix? "\"" str)) - (string->number (string-drop (string-drop-right str 1) 1)) - (string->number str))) - (define call-with-input-port* (cond ((gzip-compressed? file) call-with-gzip-input-port) @@ -189,8 +223,8 @@ (define* (man-page->entry file #:optional (resolve identity)) (if (eof-object? line) (mandb-entry file name (or section 0) (or synopsis "") kind) - (match (string-tokenize line) - ((".TH" name (= string->number* section) _ ...) + (match (if (string-prefix? "." line) (man-macro-tokenize line) #f) + ((".TH" name (= string->number section) _ ...) (loop name section synopsis kind)) ((".SH" (or "NAME" "\"NAME\"")) (loop name section (read-synopsis port) kind)) From patchwork Sun Mar 30 14:32:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 41035 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0420A27BBE9; Sun, 30 Mar 2025 16:52:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 76AB827BBEB for ; Sun, 30 Mar 2025 16:52:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tyuxB-0003Ro-Fd; Sun, 30 Mar 2025 11:52:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tyuwJ-0003NS-Hz for guix-patches@gnu.org; Sun, 30 Mar 2025 11:51:12 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tyuwG-00029h-9R; Sun, 30 Mar 2025 11:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=+v61YczsJiy0hyAaMtUpc1cPgjb+r21CvSHSPhJsarw=; b=edRu6AvFVM8/4lvOPqIjncEG05XPuw3EnhE0nfsjcbjW4zWkiSmDRmh6zkajbp5oq6E3XSaCg7rhqPAb4zTzu67ISxqmnJMLuq5bMP5EHFAFTPXzXQC1UuECPXYcOfLVBACgxYXsIRfZAz7a2+SuPa+BoALDNBvFNnF5F/rXJDmdi6/7EJt+oLwQfVoJbSmvSDX92JgAgs6c5uUvSPcJo8Oz/hTZklfhFZ0vbDPqkfu0G++zt8ZD/mbM452Sgb8A6IaExizSpoVeMrkwaCWQPKjkEq+BBbd/5j3slSwb4mRm1lTl7e2zBO+AfX3GwUPtztEGe8HYuCnTuuXshCCAkw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tyuwA-0007P1-Bo; Sun, 30 Mar 2025 11:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77387] [PATCH 2/2] man-db: Support mdoc-formatted man pages. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sun, 30 Mar 2025 15:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77387 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77387@debbugs.gnu.org Cc: Sergey Trofimov , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 77387-submit@debbugs.gnu.org id=B77387.174334983728409 (code B ref 77387); Sun, 30 Mar 2025 15:51:02 +0000 Received: (at 77387) by debbugs.gnu.org; 30 Mar 2025 15:50:37 +0000 Received: from localhost ([127.0.0.1]:37821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tyuvl-0007O8-2o for submit@debbugs.gnu.org; Sun, 30 Mar 2025 11:50:37 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:50646) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tyuvi-0007Ni-RB for 77387@debbugs.gnu.org; Sun, 30 Mar 2025 11:50:35 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-ac339f53df9so674377066b.1 for <77387@debbugs.gnu.org>; Sun, 30 Mar 2025 08:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1743349828; x=1743954628; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+v61YczsJiy0hyAaMtUpc1cPgjb+r21CvSHSPhJsarw=; b=cAAVIsqmUtQs8iNK9R3tgx3BagcAB9twET1rXhrYXK+brlPzWCTn2LQMoIu2ulI/0M vOa0mhynTONTcUImZ6YQeettcdx5c2iYeme+a3QCiOYDTyKE5MQbimd/x2mcwSOE03Az R2Yk/V11TpxNMK7m8Y4tfs3Z1zKOUBszUqfomEGHkDg2qd5GlP+oA9hSMPY/hlnbAdJx 0K381TS/Kr5csLauq5a8Qibtls62OSKg0vDh+mQRZ0cL56weZxN/f2vA0+cNfMowLOmt dsaMAdnCdHHPr4zcq4gOXWv8zhbZbNcYLE0PGRTaepVeKiKOSYbtlj5ZbIv64yFzSIEV ik9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743349828; x=1743954628; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+v61YczsJiy0hyAaMtUpc1cPgjb+r21CvSHSPhJsarw=; b=j9YCuz8AliNHO7vD0f11iKlbYjrw41C4wkRSjq0BtLupzL4MEOE13lYO9g43t0yLUI QRAWdu+hKHqxEzcwSMDvHKvBi8HAe7rDxxAsz0YgxXA+jIG1Suq+l4iR39zmOahY7nkn +AjD33OVVT8+PeYAqmx8HN5AXdRVaDmg4Mjb62vtc2alyMLf5BbeF3sKQwosSN5+SbOU a+i6GfHSoAu62pVPuBtGK/v1FTYVS01I8weTB3TyqzJDcMTN+U0tWTyD1YWMtTII5BKn KOrIFLo4BMX2dzTtZFpQEhsxE5v9xBepd6uBGZY144412oBwvtOBb+H94YD71P2EKA7S B2dA== X-Gm-Message-State: AOJu0Yxmp1EmxcOSHYjv2aL+STOE/5HvTX/Y+1fPeLJQouLI76ywg9rz 0WexUyVRhwGYwCp5vkdqaNVC8DFTlO1CVt7KjseIwCjAXzgO1agbcZlucH0U6xmL5aY8d+j2/Jc aBEw= X-Gm-Gg: ASbGncs7qcMIuHYDSkWgkm+DEZuaL+VpNTZgtmHbF2thQRNO05/tMcV/OhHxuhJVrxS haIwrvvUJQA6phsPOdvdaM9l87qcPdOdaaXQ5mHFJ3i3W811hXEdjX/0Oq/6lEb2UQKR8kOfpsh YWqgXI5LuQdNCbzRtNFwJYJej0Sd1oh3u/86kLRWhvyGWheWJWKKfn2rvVTYg8wXCUUFDriojLy QbTQ0fSOPqEQlU1f71KIgC+MYoBDFZkDuhcH+9jAPzFd73VK6d+wYXZjxJFAlqF2QWXtnS9uw9x XxjR9vVAeFDV5/M7xGTCZJQH5WpkaqexqWyGeqMqvg== X-Google-Smtp-Source: AGHT+IEwY8isAsHwZNFvlpcPk+BjZlptC5xsEBDAlvvrRV+sMl9YBAWnRXVLKLXwavH7VXYo793qGA== X-Received: by 2002:a17:907:d14:b0:ac3:9587:f2ac with SMTP id a640c23a62f3a-ac738a8db2bmr559568866b.33.1743349827462; Sun, 30 Mar 2025 08:50:27 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac71922ba02sm500642166b.10.2025.03.30.08.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 08:50:27 -0700 (PDT) Date: Sun, 30 Mar 2025 16:32:55 +0200 Message-ID: <43b006e62f2034b3acdd611e72029c9664922618.1743349817.git.sarg@sarg.org.ru> X-Mailer: git-send-email 2.49.0 In-Reply-To: <7068d5eb173f3d0c7cb69ae9592cb61b2dd84281.1743349817.git.sarg@sarg.org.ru> References: <7068d5eb173f3d0c7cb69ae9592cb61b2dd84281.1743349817.git.sarg@sarg.org.ru> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Sergey Trofimov X-ACL-Warn: , Sergey Trofimov via Guix-patches X-Patchwork-Original-From: Sergey Trofimov via Guix-patches via From: Sergey Trofimov Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/man-db.scm (man-page->entry): Extract man name and section from .Dt macro. Change-Id: I02dc99d73dceecdb077315805025efad9a650e91 --- guix/man-db.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/man-db.scm b/guix/man-db.scm index 44c01ac298..44668a3ebf 100644 --- a/guix/man-db.scm +++ b/guix/man-db.scm @@ -224,7 +224,7 @@ (define* (man-page->entry file #:optional (resolve identity)) (mandb-entry file name (or section 0) (or synopsis "") kind) (match (if (string-prefix? "." line) (man-macro-tokenize line) #f) - ((".TH" name (= string->number section) _ ...) + (((or ".TH" ".Dt") name (= string->number section) _ ...) (loop name section synopsis kind)) ((".SH" (or "NAME" "\"NAME\"")) (loop name section (read-synopsis port) kind))