Skip to contentSkip to conversation

Document regoff_t (and a few minor patches)

PATCH In review Alejandro Colomar 2 participants 10 messages Sep 18, 2020 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

cover Document regoff_t (and a few minor patches)

Hi Michael,

Documentation for regoff_t + a few minor patches.
(apply after ptrdiff_t patches)

I removed the reference from ptrdiff_t to regoff_t, as it is not really relevant to ptrdiff_t.

I see this is fast, so maybe I'll start sending bigger patchsets. That way it'll be easier for you to apply them sorted.

Cheers,

Alex.

Alejandro Colomar (4):
system_data_types.7: wfix
system_data_types.7: Document regoff_t
regoff_t.3: New link to new documented type in system_data_types(7) system_data_types.7: srcfix: Add FIXME notes

 man3/regoff_t.3          |  1 +
 man7/system_data_types.7 | 38 +++++++++++++++++++++++++++++++++-----
 2 files changed, 34 insertions(+), 5 deletions(-)
 create mode 100644 man3/regoff_t.3
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/4 system_data_types.7: wfix

---
 man7/system_data_types.7 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man7/system_data_types.7 +2 -2
index dba80cf6f..8969ee966 100644
@@ -350,7 +350,7 @@ struct timespec {
 };
 .EE
 .IP
-Describes times in seconds and nanoseconds.
+Describes elapsed time in seconds and nanoseconds.
 .IP
 Conforming to: C11 and later; POSIX.1-2001 and later.
 .IP
@@ -379,7 +379,7 @@ struct timeval {
 };
 .EE
 .IP
-Describes times in seconds and microseconds.
+Describes elapsed time in seconds and microseconds.
 .IP
 Conforming to: POSIX.1-2001 and later.
 .IP
Signature · 1 line
2.28.0
#2 lore raw

Re: [PATCH 1/4] system_data_types.7: wfix

Hello Alex,

Quoted 19 lines · Alejandro Colomar
---
 man7/system_data_types.7 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man7/system_data_types.7 +1 -1
index dba80cf6f..8969ee966 100644
@@ -350,7 +350,7 @@ struct timespec {
 };
 .EE
 .IP
-Describes times in seconds and nanoseconds.
+Describes elapsed time in seconds and nanoseconds.
 .IP
 Conforming to: C11 and later; POSIX.1-2001 and later.
 .IP

man7/system_data_types.7 struct timeval { · line 385

Quoted 8 lines
man7/system_data_types.7 +1 -1
@@ -379,7 +379,7 @@ struct timeval {
 };
 .EE
 .IP
-Describes times in seconds and microseconds.
+Describes elapsed time in seconds and microseconds.
 .IP
 Conforming to: POSIX.1-2001 and later.
 .IP

I don;t think this patch is correct. At the least, it needs more explanation. As far as I can see, 'timespec' is not just about elapsed time. It really is just time, expressed as secs + nanosecs. For example, see utimensat(2), which set file timestamps with nanosec precision.

For the moment, I'm not applying this (and I hope not doing so doesn't break any following patch).

Thanks,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#3 lore raw

Re: [PATCH 1/4] system_data_types.7: wfix

Hello Michael,

Quoted 11 lines · Michael Kerrisk (man-pages)

man7/system_data_types.7 struct timeval { · line 385

Quoted 5 lines
man7/system_data_types.7 +1 -1
-Describes times in seconds and microseconds.
+Describes elapsed time in seconds and microseconds.
  .IP
  Conforming to: POSIX.1-2001 and later.
  .IP

I don;t think this patch is correct. At the least, it needs more explanation. As far as I can see, 'timespec' is not just about elapsed time. It really is just time, expressed as secs + nanosecs. For example, see utimensat(2), which set file timestamps with nanosec precision.

I took that wording from timeval.3bsd. But I think you're correct.

Quoted 3 lines

For the moment, I'm not applying this (and I hope not doing so doesn't break any following patch).

That's fine. It shouldn't break anything.

Quoted 5 lines

Thanks,

Michael

Cheers,

Alex

#4 lore raw

PATCH 2/4 system_data_types.7: Document regoff_t

In reply to Alejandro Colomar
---
 man7/system_data_types.7 | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
man7/system_data_types.7 +29 -1
index 8969ee966..d96703b1d 100644
@@ -77,12 +77,40 @@ capable of storing values in the range
 Conforming to: C99 and later; POSIX.1-2001 and later.
 .IP
 See also the
-.\".I regoff_t ,	FIXME: uncomment when regoff_t is documented.
 .I size_t
 and
 .I ssize_t
 types in this page.
 .TP
+.I regoff_t
+.IP
+Include:
+.I <regex.h>.
+.IP
+According to POSIX, it shall be a signed integer type
+capable of storing the largest value that can be stored in either a
+.I ptrdiff_t
+type or a
+.I ssize_t
+type.
+.IP
+Conforming to: POSIX.1-2001 and later.
+.IP
+Notes: Prior to POSIX.1-2008, the type was capable of storing
+the largest value that can be stored in either an
+.I off_t
+type or a
+.I ssize_t
+type.
+.IP
+See also the
+.\".I regmatch_t	FIXME
+.\"structure and the
+.I ptrdiff_t
+and
+.I ssize_t
+types in this page.
+.TP
 .I sigval
 .IP
 Include:
Signature · 1 line
2.28.0
#5 lore raw

Re: [PATCH 2/4] system_data_types.7: Document regoff_t

Hello Alex,

Quoted 1 line · Alejandro Colomar

Thanks. Patch applied.

Cheers,

Michael

Quoted 51 lines
---
 man7/system_data_types.7 | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
man7/system_data_types.7 +29 -1
index 8969ee966..d96703b1d 100644
@@ -77,12 +77,40 @@ capable of storing values in the range
 Conforming to: C99 and later; POSIX.1-2001 and later.
 .IP
 See also the
-.\".I regoff_t ,	FIXME: uncomment when regoff_t is documented.
 .I size_t
 and
 .I ssize_t
 types in this page.
 .TP
+.I regoff_t
+.IP
+Include:
+.I <regex.h>.
+.IP
+According to POSIX, it shall be a signed integer type
+capable of storing the largest value that can be stored in either a
+.I ptrdiff_t
+type or a
+.I ssize_t
+type.
+.IP
+Conforming to: POSIX.1-2001 and later.
+.IP
+Notes: Prior to POSIX.1-2008, the type was capable of storing
+the largest value that can be stored in either an
+.I off_t
+type or a
+.I ssize_t
+type.
+.IP
+See also the
+.\".I regmatch_t	FIXME
+.\"structure and the
+.I ptrdiff_t
+and
+.I ssize_t
+types in this page.
+.TP
 .I sigval
 .IP
 Include:
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#7 lore raw

Re: [PATCH 3/4] regoff_t.3: New link to new documented type in system_data_types(7)

Hi Alex,

Quoted 1 line · Alejandro Colomar

Thanks. Patch applied.

Cheers,

Michael

Quoted 13 lines
---
 man3/regoff_t.3 | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 man3/regoff_t.3
man3/regoff_t.3 new file +1 -0
new file mode 100644
index 000000000..db50c0f09
@@ -0,0 +1 @@
+.so man7/system_data_types.7
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#8 lore raw

PATCH 4/4 system_data_types.7: srcfix: Add FIXME notes

In reply to Alejandro Colomar
---
 man7/system_data_types.7 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man7/system_data_types.7 +2 -2
index d96703b1d..16dcb7d66 100644
@@ -133,9 +133,9 @@ See also:
 .BR sigevent (7)
 .\".IP
 .\"See also the
-.\".I sigevent
+.\".I sigevent	FIXME
 .\"structure and the
-.\".I siginfo_t
+.\".I siginfo_t	FIXME
 .\"type in this page.
 .TP
 .I size_t
Signature · 1 line
2.28.0
#9 lore raw

Re: [PATCH 4/4] system_data_types.7: srcfix: Add FIXME notes

Quoted 1 line · Alejandro Colomar

Thanks, Alex. Patch applied.

Cheers,

Michael

Quoted 21 lines
---
 man7/system_data_types.7 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man7/system_data_types.7 +2 -2
index d96703b1d..16dcb7d66 100644
@@ -133,9 +133,9 @@ See also:
 .BR sigevent (7)
 .\".IP
 .\"See also the
-.\".I sigevent
+.\".I sigevent	FIXME
 .\"structure and the
-.\".I siginfo_t
+.\".I siginfo_t	FIXME
 .\"type in this page.
 .TP
 .I size_t
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/