Message ID | 20201017213758.9270-2-colomar.6.4.3@gmail.com |
---|---|
State | Not applicable |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> 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 78DD7385781A; Sat, 17 Oct 2020 21:38:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78DD7385781A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1602970702; bh=kKAUeoB+cdfp4+NQD8qQL9T1YCqT3DEF4Z3WHUFmPmA=; 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=ic1zBSx5oicnFgM3slRgsxXMzgZti4rmnjrANZHEupF0C/nIxfFdxuf8ts3yhd5b7 yKJiqWx6/CmH5kIDKJvvjXErF1gyVqBoFrctONpDjzjaeciZeg1MZElohlNY8rJISK dycuQJRO+j6o7O0XinNt3OcxSs1K0CjfBu0/Sb1s= 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 C80123857819 for <libc-alpha@sourceware.org>; Sat, 17 Oct 2020 21:38:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C80123857819 Received: by mail-wr1-x441.google.com with SMTP id n6so7215223wrm.13 for <libc-alpha@sourceware.org>; Sat, 17 Oct 2020 14:38:19 -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=kKAUeoB+cdfp4+NQD8qQL9T1YCqT3DEF4Z3WHUFmPmA=; b=ay2KHV/97DgIHNLqgjG73vmHEmcqRIcKVPGioAlUwAi4N01+RwQhQDUhmDwAZ4YwKg YMK5UyGQs7kVPeYB/kO58xZbBCt1fF0UxJi3KGJ5HMi27a/hzyyAWAo2otGL37oOv7oM GA/Aq9tCAFtt4k8k1qrOuzNC6ZovPEWpdXkuN402sqCyWoF/rY3hcRra4E9Pco8IttnU 7bjp4+ih7v+YfEGpcj6j1DSZkqWKdml4gBfOSuCHF9Qa+suG+tP/fae3aH0bY8jpL0iJ pX8QXLlYvY/rZuvPL5gh7J8grbBfJ7GgXP39UCxbCeRdSALh7AlzgfncwzU13We5az5B /RiQ== X-Gm-Message-State: AOAM530sjPNKxP9ZgEJllDyYqSzn+U0gFAhyBIZoPiyKap4HfIsydd5y VZpu1GA26c7NBvYiiLdhIo0= X-Google-Smtp-Source: ABdhPJwDau49bzP0gsQ81loNUbobJq4hNHw2SgyejQod5dGWwB9e+fvWC1popr/F27PcGbQRJQWMrg== X-Received: by 2002:adf:ba85:: with SMTP id p5mr12174203wrg.64.1602970698826; Sat, 17 Oct 2020 14:38:18 -0700 (PDT) Received: from localhost.localdomain ([170.253.60.68]) by smtp.googlemail.com with ESMTPSA id p21sm8975324wmc.28.2020.10.17.14.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 14:38:18 -0700 (PDT) To: mtk.manpages@gmail.com Subject: [PATCH 2/3] system_data_types.7: Add 'clock_t' Date: Sat, 17 Oct 2020 23:37:58 +0200 Message-Id: <20201017213758.9270-2-colomar.6.4.3@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201017213758.9270-1-colomar.6.4.3@gmail.com> References: <20201017213758.9270-1-colomar.6.4.3@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Alejandro Colomar <colomar.6.4.3@gmail.com> Cc: Alejandro Colomar <colomar.6.4.3@gmail.com>, linux-man@vger.kernel.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
[1/3] system_data_types.7: time_t: Add Versions note
|
|
Commit Message
Alejandro Colomar
Oct. 17, 2020, 9:37 p.m. UTC
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
Hi Michael,
Does that dash (in "real-floating") need to be escaped?
In my terminal I see it correctly,
but I've seen you escaping some of them and don't know the reason why.
Should they be escaped always, or is it only sometimes, and when?
Thanks,
Alex
man7/system_data_types.7 | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
Comments
Hi Alex, On 10/17/20 11:37 PM, Alejandro Colomar wrote: > Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com> > --- > > 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. > 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 <time.h> > +or > +.IR <sys/types.h> . > +Alternatively, > +.IR <sys/time.h> . > +.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. > +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
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 <colomar.6.4.3@gmail.com> >> --- >> >> 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 <time.h> >> +or >> +.IR <sys/types.h> . >> +Alternatively, >> +.IR <sys/time.h> . >> +.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
Hello Alex, >> 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. More or less. But the standard also says (in the <time.h> spec): The value of CLOCKS_PER_SEC shall be 1 million on XSI-conformant systems. (Yes, it is odd.) Thanks, 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 <colomar.6.4.3@gmail.com> >> --- >> >> 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. Hi Michael, Then, in the following code (taken from printf.3) the escape is wrong (unneeded) by those guidelines?: [[ .SH NAME printf, fprintf, dprintf, sprintf, snprintf, vprintf, vfprintf, vdprintf, vsprintf, vsnprintf \- formatted output conversion ]] Thanks, Alex
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 <time.h> +or +.IR <sys/types.h> . +Alternatively, +.IR <sys/time.h> . +.PP +Used for system time in clock ticks. +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