From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 CDBA93858D35 for ; Sun, 18 Oct 2020 09:10:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CDBA93858D35 Received: by mail-wr1-x442.google.com with SMTP id j7so3966317wrt.9 for ; Sun, 18 Oct 2020 02:10:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BcLarS+kDVXlhVSKCUK2Pz7vchvXw9XxNRt/B8x8N1g=; b=lFiYy+Qroyu9iRvdJnqDFgqq847CPWhA53AGUAgtHXij9Owf+q2Hn7oqWX+Wyu/4Oc Dkucds8fIRSPcOwyph3KJnJu66v8Fo4Kobrq2CWcG9qEVigqAaxNI9uNqlggHv1hy6Yx e50ETQUftYCrtCeoUDNr1V+3SAa7I50V702bAYiCdq7TJPg0OPuQHgW17aZLPW+fI5sy r/eguuJhLctjzH/NwGYTfMg2YdP7SnSGuU/q0VbSAy0Fb6TQxZ6hs7sjTd0zZy8peYcy tOOh7KXctQYD4zetDR+qNFiYusakaCyIWQHAymI6NVUAGvzAMSEvjGJUsd0G7zZbDbWY 8Jbg== X-Gm-Message-State: AOAM530HSBzwCFHwp8h863yDFNZvHFkR5FsUxHDX2Sx3u1VV2PGLa0se 2BYHjxk/r+NeGxuhcbqw/BVKB7ZxCkA= X-Google-Smtp-Source: ABdhPJyoTfZkZk3diz6IynoZulwPo6DXbr2+3uaEYNMVnf/iR5Hp6hCU6Xk4GZsEKZFuyuGDvHHRYg== X-Received: by 2002:a5d:6cae:: with SMTP id a14mr14520960wra.187.1603012205353; Sun, 18 Oct 2020 02:10:05 -0700 (PDT) Received: from [192.168.1.143] ([170.253.60.68]) by smtp.gmail.com with ESMTPSA id x65sm11839407wmg.1.2020.10.18.02.10.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Oct 2020 02:10:04 -0700 (PDT) Subject: Re: [PATCH 2/3] system_data_types.7: Add 'clock_t' To: "Michael Kerrisk (man-pages)" Cc: linux-man@vger.kernel.org, libc-alpha@sourceware.org References: <20201017213758.9270-1-colomar.6.4.3@gmail.com> <20201017213758.9270-2-colomar.6.4.3@gmail.com> From: Alejandro Colomar Message-ID: Date: Sun, 18 Oct 2020 11:10:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.3 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_ASCII_DIVIDERS, NICE_REPLY_A, 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-List-Received-Date: Sun, 18 Oct 2020 09:10:08 -0000 Hi Michael, On 2020-10-18 07:56, Michael Kerrisk (man-pages) wrote: > Hi Alex, > > On 10/17/20 11:37 PM, Alejandro Colomar wrote: >> Signed-off-by: Alejandro Colomar >> --- >> >> Hi Michael, >> >> Does that dash (in "real-floating") need to be escaped? > > No. > >> In my terminal I see it correctly, >> but I've seen you escaping some of them and don't know the reason why. > > See man-pages(7): > > Real minus character > Where a real minus character is required (e.g., for numbers such > as -1, for man page cross references such as utf-8(7), or when > writing options that have a leading dash, such as in ls -l), use > the following form in the man page source: > > \- > > This guideline applies also to code examples. > > The point is that a real-minux sign is needed to that code snippets > can be cut and pasted. > >> Should they be escaped always, or is it only sometimes, and when? > > In normal text, no escape is needed. Thanks. > >> man7/system_data_types.7 | 22 ++++++++++++++++++++++ >> 1 file changed, 22 insertions(+) > > >> diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 >> index dc5f65c0d..6a1442ccd 100644 >> --- a/man7/system_data_types.7 >> +++ b/man7/system_data_types.7 >> @@ -85,6 +85,28 @@ See also: >> .BR aio_write (3), >> .BR lio_listio (3) >> .RE >> +.\"------------------------------------- clock_t ----------------------/ >> +.TP >> +.I clock_t >> +.RS >> +Include: >> +.I >> +or >> +.IR . >> +Alternatively, >> +.IR . >> +.PP >> +Used for system time in clock ticks. > > Please make it: > "Used for system time either in clock ticks or CLOCKS_PER_SEC" > > This type has a strange history. In my book, I note: > > Although the clock_t return type of clock() is the same > data type that is used in the times() call, the units of > measurement employed by these two interfaces are > different. This is the result of historically conflicting > definitions of clock_t in POSIX.1 and the C programming > language standard. Ahhh now I get it. So CLOCKS_PER_SEC doesn't mean CLOCK_TICKS_PER_SEC, right? I always thought that it really was that, and clock() simply returned clock ticks. But it looks like it returns an arbitrary division of the second called CLOCKS_PER_SEC. I'll add " or CLOCKS_PER_SEC" > >> +According to POSIX, >> +it shall be an integer type or a real-floating type. >> +.PP >> +Conforming to: >> +C99 and later; POSIX.1-2001 and later. >> +.PP >> +See also: >> +.BR times (2), >> +.BR clock (3) >> +.RE >> .\"------------------------------------- div_t ------------------------/ >> .TP >> .I div_t > > Cheers, > > Michael > > > Thanks, Alex