public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH][BZ #17787] Fix exponents in manual.
@ 2015-01-05 12:11 Ondřej Bílka
  2015-01-05 14:15 ` Andreas Schwab
  0 siblings, 1 reply; 20+ messages in thread
From: Ondřej Bílka @ 2015-01-05 12:11 UTC (permalink / raw)
  To: libc-alpha

Hi,

As in bug report complains exponents were wrong in pdf. This fixes
these, however it changes .info lines like following.

files larger than 2^{31} bytes on 32-bit systems

Is this ok to commit or is there trick to also handle info?


	* manual/filesys.texi: Fix exponents.
	* manual/llio.texi: Likewise.
	* manual/stdio.texi: Likewise.

diff --git a/manual/filesys.texi b/manual/filesys.texi
index 7d55b43..f121b96 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -1833,7 +1833,7 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
 @end deftp
 
 The extensions for the Large File Support (LFS) require, even on 32-bit
-machines, types which can handle file sizes up to @math{2^63}.
+machines, types which can handle file sizes up to @math{2^{63}}.
 Therefore a new definition of @code{struct stat} is necessary.
 
 @comment sys/stat.h
@@ -2023,7 +2023,7 @@ replaces the normal implementation.
 @deftypefun int stat64 (const char *@var{filename}, struct stat64 *@var{buf})
 @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
 This function is similar to @code{stat} but it is also able to work on
-files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
+files larger than @math{2^{31}} bytes on 32-bit systems.  To be able to do
 this the result is stored in a variable of type @code{struct stat64} to
 which @var{buf} must point.
 
@@ -2096,7 +2096,7 @@ replaces the normal implementation.
 @c Direct system call through lxstat64, sometimes with an xstat conv
 @c call afterwards.
 This function is similar to @code{lstat} but it is also able to work on
-files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
+files larger than @math{2^{31}} bytes on 32-bit systems.  To be able to do
 this the result is stored in a variable of type @code{struct stat64} to
 which @var{buf} must point.
 
@@ -3072,7 +3072,7 @@ systems do not support this feature and will leave the file unchanged.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{truncate} function is in fact @code{truncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@math{2^{63}} bytes in length.
 
 The return value is @math{0} for success, or @math{-1} for an error.  In
 addition to the usual file name errors, the following errors may occur:
@@ -3109,7 +3109,7 @@ The operation was interrupted by a signal.
 This function is similar to the @code{truncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines, which allows the handling of files with sizes up to
-@math{2^63} bytes.
+@math{2^{63}} bytes.
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
@@ -3143,7 +3143,7 @@ The example below shows how this works.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{ftruncate} function is in fact @code{ftruncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@math{2^{63}} bytes in length.
 
 The return value is @math{0} for success, or @math{-1} for an error.  The
 following errors may occur:
@@ -3189,7 +3189,7 @@ The operation was interrupted by a signal.
 This function is similar to the @code{ftruncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines which allows the handling of files with sizes up to
-@math{2^63} bytes.
+@math{2^{63}} bytes.
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
@@ -3336,7 +3336,7 @@ interface transparently replaces the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 This function is similar to @code{tmpfile}, but the stream it returns a
 pointer to was opened using @code{tmpfile64}.  Therefore this stream can
-be used for files larger than @math{2^31} bytes on 32-bit machines.
+be used for files larger than @math{2^{31}} bytes on 32-bit machines.
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
diff --git a/manual/llio.texi b/manual/llio.texi
index 4f3fada..0a5de88 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -150,8 +150,8 @@ or @code{O_CREAT} is set and the file does not already exist.
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
 descriptor opened in the large file mode which enables the file handling
-functions to use files up to @math{2^63} bytes in size and offset from
-@math{-2^63} to @math{2^63}.  This happens transparently for the user
+functions to use files up to @math{2^{63}} bytes in size and offset from
+@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
 since all of the lowlevel file handling functions are equally replaced.
 
 This function is a cancellation point in multi-threaded programs.  This
@@ -201,8 +201,8 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
 descriptor opened in the large file mode which enables the file handling
-functions to use files up to @math{2^63} in size and offset from
-@math{-2^63} to @math{2^63}.  This happens transparently for the user
+functions to use files up to @math{2^{63}} in size and offset from
+@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
 since all of the lowlevel file handling functions are equally replaced.
 @end deftypefn
 
@@ -422,7 +422,7 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pread} function is in fact @code{pread64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@math{2^{63}} bytes in length.
 
 The return value of @code{pread} describes the number of bytes read.
 In the error case it returns @math{-1} like @code{read} does and the
@@ -451,7 +451,7 @@ version 2.
 This function is similar to the @code{pread} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -623,7 +623,7 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pwrite} function is in fact @code{pwrite64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@math{2^{63}} bytes in length.
 
 The return value of @code{pwrite} describes the number of written bytes.
 In the error case it returns @math{-1} like @code{write} does and the
@@ -652,7 +652,7 @@ version 2.
 This function is similar to the @code{pwrite} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -752,7 +752,7 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{lseek} function is in fact @code{lseek64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@math{2^{63}} bytes in length.
 
 This function is a cancellation point in multi-threaded programs.  This
 is a problem if the thread allocates some resources (like memory, file
@@ -775,7 +775,7 @@ descriptors.
 This function is similar to the @code{lseek} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -848,7 +848,7 @@ is transparently replaced by @code{off64_t}.
 This type is used similar to @code{off_t}.  The difference is that even
 on 32 bit machines, where the @code{off_t} type would have 32 bits,
 @code{off64_t} has 64 bits and so is able to address files up to
-@math{2^63} bytes in length.
+@math{2^{63}} bytes in length.
 
 When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
 available under the name @code{off_t}.
diff --git a/manual/stdio.texi b/manual/stdio.texi
index e407170..bff1033 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -270,7 +270,7 @@ Locks}.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 This function is similar to @code{fopen} but the stream it returns a
 pointer for is opened using @code{open64}.  Therefore this stream can be
-used even on files larger than @math{2^31} bytes on 32 bit machines.
+used even on files larger than @math{2^{31}} bytes on 32 bit machines.
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
@@ -336,7 +336,7 @@ interface replaces transparently the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
 This function is similar to @code{freopen}.  The only difference is that
 on 32 bit machine the stream returned is able to read beyond the
-@math{2^31} bytes limits imposed by the normal interface.  It should be
+@math{2^{31}} bytes limits imposed by the normal interface.  It should be
 noted that the stream pointed to by @var{stream} need not be opened
 using @code{fopen64} or @code{freopen64} since its mode is not important
 for this function.
@@ -4412,7 +4412,7 @@ This function is similar to @code{ftello} with the only difference that
 the return value is of type @code{off64_t}.  This also requires that the
 stream @var{stream} was opened using either @code{fopen64},
 @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
-file operations to position the file pointer beyond the @math{2^31}
+file operations to position the file pointer beyond the @math{2^{31}}
 bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
@@ -4473,7 +4473,7 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
 requires that the stream @var{stream} was opened using either
 @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
 the underlying file operations to position the file pointer beyond the
-@math{2^31} bytes limit might fail.
+@math{2^{31}} bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
 bits machine this function is available under the name @code{fseeko}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH][BZ #17787] Fix exponents in manual.
  2015-01-05 12:11 [PATCH][BZ #17787] Fix exponents in manual Ondřej Bílka
@ 2015-01-05 14:15 ` Andreas Schwab
  2015-01-06 11:57   ` Ondřej Bílka
  0 siblings, 1 reply; 20+ messages in thread
From: Andreas Schwab @ 2015-01-05 14:15 UTC (permalink / raw)
  To: Ondřej Bílka; +Cc: libc-alpha

Ondřej Bílka <neleai@seznam.cz> writes:

> Is this ok to commit or is there trick to also handle info?

Use different renditions for @iftex and @ifnottex (html output will also
be verbatim like info output).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH][BZ #17787] Fix exponents in manual.
  2015-01-05 14:15 ` Andreas Schwab
@ 2015-01-06 11:57   ` Ondřej Bílka
  2015-01-06 14:20     ` Andreas Schwab
  2015-06-16 19:28     ` [PING][PATCH][BZ " Ondřej Bílka
  0 siblings, 2 replies; 20+ messages in thread
From: Ondřej Bílka @ 2015-01-06 11:57 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
> Ondřej Bílka <neleai@seznam.cz> writes:
> 
> > Is this ok to commit or is there trick to also handle info?
> 
> Use different renditions for @iftex and @ifnottex (html output will also
> be verbatim like info output).
> 
That makes patch look bit ugly but does job. Ok with this?

        * manual/filesys.texi: Fix exponents.
        * manual/llio.texi: Likewise.
        * manual/stdio.texi: Likewise.

diff --git a/manual/filesys.texi b/manual/filesys.texi
index 7d55b43..936ac2d 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -1833,7 +1833,12 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
 @end deftp
 
 The extensions for the Large File Support (LFS) require, even on 32-bit
+@iftex
+machines, types which can handle file sizes up to @math{2^{63}}.
+@end iftex
+@ifnottex
 machines, types which can handle file sizes up to @math{2^63}.
+@end ifnottex
 Therefore a new definition of @code{struct stat} is necessary.
 
 @comment sys/stat.h
@@ -3072,7 +3077,12 @@ systems do not support this feature and will leave the file unchanged.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{truncate} function is in fact @code{truncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 The return value is @math{0} for success, or @math{-1} for an error.  In
 addition to the usual file name errors, the following errors may occur:
@@ -3109,7 +3119,12 @@ The operation was interrupted by a signal.
 This function is similar to the @code{truncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines, which allows the handling of files with sizes up to
-@math{2^63} bytes.
+@iftex
+@math{2^{63}} bytes.
+@end iftex
+@ifnottex
+@math{2^{63}} bytes.
+@end ifnottex
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
@@ -3143,7 +3158,12 @@ The example below shows how this works.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{ftruncate} function is in fact @code{ftruncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 The return value is @math{0} for success, or @math{-1} for an error.  The
 following errors may occur:
@@ -3189,7 +3209,12 @@ The operation was interrupted by a signal.
 This function is similar to the @code{ftruncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines which allows the handling of files with sizes up to
+@iftex
+@math{2^{63}} bytes.
+@end iftex
+@ifnottex
 @math{2^63} bytes.
+@end ifnottex
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
diff --git a/manual/llio.texi b/manual/llio.texi
index 4f3fada..60662f7 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -150,8 +150,18 @@ or @code{O_CREAT} is set and the file does not already exist.
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
 descriptor opened in the large file mode which enables the file handling
+@iftex
+functions to use files up to @math{2^{63}} bytes in size and offset from
+@end iftex
+@ifnottex
 functions to use files up to @math{2^63} bytes in size and offset from
+@end ifnottex
+@iftex
+@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
+@end iftex
+@ifnottex
 @math{-2^63} to @math{2^63}.  This happens transparently for the user
+@end ifnottex
 since all of the lowlevel file handling functions are equally replaced.
 
 This function is a cancellation point in multi-threaded programs.  This
@@ -201,8 +211,18 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
 descriptor opened in the large file mode which enables the file handling
+@iftex
+functions to use files up to @math{2^{63}} in size and offset from
+@end iftex
+@ifnottex
 functions to use files up to @math{2^63} in size and offset from
+@end ifnottex
+@iftex
+@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
+@end iftex
+@ifnottex
 @math{-2^63} to @math{2^63}.  This happens transparently for the user
+@end ifnottex
 since all of the lowlevel file handling functions are equally replaced.
 @end deftypefn
 
@@ -422,7 +442,12 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pread} function is in fact @code{pread64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 The return value of @code{pread} describes the number of bytes read.
 In the error case it returns @math{-1} like @code{read} does and the
@@ -451,7 +476,12 @@ version 2.
 This function is similar to the @code{pread} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
+@iftex
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
+@end iftex
+@ifnottex
 files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+@end ifnottex
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -623,7 +653,12 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pwrite} function is in fact @code{pwrite64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 The return value of @code{pwrite} describes the number of written bytes.
 In the error case it returns @math{-1} like @code{write} does and the
@@ -652,7 +687,12 @@ version 2.
 This function is similar to the @code{pwrite} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
+@iftex
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
+@end iftex
+@ifnottex
 files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+@end ifnottex
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -752,7 +792,12 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{lseek} function is in fact @code{lseek64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 This function is a cancellation point in multi-threaded programs.  This
 is a problem if the thread allocates some resources (like memory, file
@@ -775,7 +820,12 @@ descriptors.
 This function is similar to the @code{lseek} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
+@iftex
+files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
+@end iftex
+@ifnottex
 files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+@end ifnottex
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -848,7 +898,12 @@ is transparently replaced by @code{off64_t}.
 This type is used similar to @code{off_t}.  The difference is that even
 on 32 bit machines, where the @code{off_t} type would have 32 bits,
 @code{off64_t} has 64 bits and so is able to address files up to
+@iftex
+@math{2^{63}} bytes in length.
+@end iftex
+@ifnottex
 @math{2^63} bytes in length.
+@end ifnottex
 
 When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
 available under the name @code{off_t}.
diff --git a/manual/stdio.texi b/manual/stdio.texi
index e407170..b50b27e 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -270,7 +270,12 @@ Locks}.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 This function is similar to @code{fopen} but the stream it returns a
 pointer for is opened using @code{open64}.  Therefore this stream can be
+@iftex
+used even on files larger than @math{2^{31}} bytes on 32 bit machines.
+@end iftex
+@ifnottex
 used even on files larger than @math{2^31} bytes on 32 bit machines.
+@end ifnottex
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
@@ -336,7 +341,12 @@ interface replaces transparently the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
 This function is similar to @code{freopen}.  The only difference is that
 on 32 bit machine the stream returned is able to read beyond the
+@iftex
+@math{2^{31}} bytes limits imposed by the normal interface.  It should be
+@end iftex
+@ifnottex
 @math{2^31} bytes limits imposed by the normal interface.  It should be
+@end ifnottex
 noted that the stream pointed to by @var{stream} need not be opened
 using @code{fopen64} or @code{freopen64} since its mode is not important
 for this function.
@@ -4412,7 +4422,12 @@ This function is similar to @code{ftello} with the only difference that
 the return value is of type @code{off64_t}.  This also requires that the
 stream @var{stream} was opened using either @code{fopen64},
 @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
+@iftex
+file operations to position the file pointer beyond the @math{2^{31}}
+@end iftex
+@ifnottex
 file operations to position the file pointer beyond the @math{2^31}
+@end ifnottex
 bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
@@ -4473,7 +4488,12 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
 requires that the stream @var{stream} was opened using either
 @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
 the underlying file operations to position the file pointer beyond the
+@iftex
+@math{2^{31}} bytes limit might fail.
+@end iftex
+@ifnottex
 @math{2^31} bytes limit might fail.
+@end ifnottex
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
 bits machine this function is available under the name @code{fseeko}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH][BZ #17787] Fix exponents in manual.
  2015-01-06 11:57   ` Ondřej Bílka
@ 2015-01-06 14:20     ` Andreas Schwab
  2015-01-06 18:02       ` Ondřej Bílka
  2015-06-16 19:28     ` [PING][PATCH][BZ " Ondřej Bílka
  1 sibling, 1 reply; 20+ messages in thread
From: Andreas Schwab @ 2015-01-06 14:20 UTC (permalink / raw)
  To: Ondřej Bílka; +Cc: libc-alpha

Ondřej Bílka <neleai@seznam.cz> writes:

> On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
>> Ondřej Bílka <neleai@seznam.cz> writes:
>> 
>> > Is this ok to commit or is there trick to also handle info?
>> 
>> Use different renditions for @iftex and @ifnottex (html output will also
>> be verbatim like info output).
>> 
> That makes patch look bit ugly but does job. Ok with this?

You can make it prettier by defining a macro.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH][BZ #17787] Fix exponents in manual.
  2015-01-06 14:20     ` Andreas Schwab
@ 2015-01-06 18:02       ` Ondřej Bílka
  2015-01-06 18:09         ` Andreas Schwab
  0 siblings, 1 reply; 20+ messages in thread
From: Ondřej Bílka @ 2015-01-06 18:02 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

On Tue, Jan 06, 2015 at 03:20:32PM +0100, Andreas Schwab wrote:
> Ondřej Bílka <neleai@seznam.cz> writes:
> 
> > On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
> >> Ondřej Bílka <neleai@seznam.cz> writes:
> >> 
> >> > Is this ok to commit or is there trick to also handle info?
> >> 
> >> Use different renditions for @iftex and @ifnottex (html output will also
> >> be verbatim like info output).
> >> 
> > That makes patch look bit ugly but does job. Ok with this?
> 
> You can make it prettier by defining a macro.
> 
I did not find easy way to make that decision inline, what I could come
with is put four arguments start line, tex, notex, end line which is
about as ugly as this one.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH][BZ #17787] Fix exponents in manual.
  2015-01-06 18:02       ` Ondřej Bílka
@ 2015-01-06 18:09         ` Andreas Schwab
  2015-01-06 21:32           ` Ondřej Bílka
  0 siblings, 1 reply; 20+ messages in thread
From: Andreas Schwab @ 2015-01-06 18:09 UTC (permalink / raw)
  To: Ondřej Bílka; +Cc: libc-alpha

Ondřej Bílka <neleai@seznam.cz> writes:

> On Tue, Jan 06, 2015 at 03:20:32PM +0100, Andreas Schwab wrote:
>> Ondřej Bílka <neleai@seznam.cz> writes:
>> 
>> > On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
>> >> Ondřej Bílka <neleai@seznam.cz> writes:
>> >> 
>> >> > Is this ok to commit or is there trick to also handle info?
>> >> 
>> >> Use different renditions for @iftex and @ifnottex (html output will also
>> >> be verbatim like info output).
>> >> 
>> > That makes patch look bit ugly but does job. Ok with this?
>> 
>> You can make it prettier by defining a macro.
>> 
> I did not find easy way to make that decision inline,

Why inline?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH][BZ #17787] Fix exponents in manual.
  2015-01-06 18:09         ` Andreas Schwab
@ 2015-01-06 21:32           ` Ondřej Bílka
  0 siblings, 0 replies; 20+ messages in thread
From: Ondřej Bílka @ 2015-01-06 21:32 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

On Tue, Jan 06, 2015 at 07:09:26PM +0100, Andreas Schwab wrote:
> Ondřej Bílka <neleai@seznam.cz> writes:
> 
> > On Tue, Jan 06, 2015 at 03:20:32PM +0100, Andreas Schwab wrote:
> >> Ondřej Bílka <neleai@seznam.cz> writes:
> >> 
> >> > On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
> >> >> Ondřej Bílka <neleai@seznam.cz> writes:
> >> >> 
> >> >> > Is this ok to commit or is there trick to also handle info?
> >> >> 
> >> >> Use different renditions for @iftex and @ifnottex (html output will also
> >> >> be verbatim like info output).
> >> >> 
> >> > That makes patch look bit ugly but does job. Ok with this?
> >> 
> >> You can make it prettier by defining a macro.
> >> 
> > I did not find easy way to make that decision inline,
> 
> Why inline?
> 
As I do not know how to do that without having line that contain only
2^63

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PING][PATCH][BZ #17787] Fix exponents in manual.
  2015-01-06 11:57   ` Ondřej Bílka
  2015-01-06 14:20     ` Andreas Schwab
@ 2015-06-16 19:28     ` Ondřej Bílka
  2015-06-16 19:54       ` Carlos O'Donell
  2015-06-16 20:24       ` Joseph Myers
  1 sibling, 2 replies; 20+ messages in thread
From: Ondřej Bílka @ 2015-06-16 19:28 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

Ping, if you have better idea I would like it.
On Tue, Jan 06, 2015 at 12:57:20PM +0100, Ondřej Bílka wrote:
> On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
> > Ondřej Bílka <neleai@seznam.cz> writes:
> > 
> > > Is this ok to commit or is there trick to also handle info?
> > 
> > Use different renditions for @iftex and @ifnottex (html output will also
> > be verbatim like info output).
> > 
> That makes patch look bit ugly but does job. Ok with this?
> 
>         * manual/filesys.texi: Fix exponents.
>         * manual/llio.texi: Likewise.
>         * manual/stdio.texi: Likewise.
> 
> diff --git a/manual/filesys.texi b/manual/filesys.texi
> index 7d55b43..936ac2d 100644
> --- a/manual/filesys.texi
> +++ b/manual/filesys.texi
> @@ -1833,7 +1833,12 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
>  @end deftp
>  
>  The extensions for the Large File Support (LFS) require, even on 32-bit
> +@iftex
> +machines, types which can handle file sizes up to @math{2^{63}}.
> +@end iftex
> +@ifnottex
>  machines, types which can handle file sizes up to @math{2^63}.
> +@end ifnottex
>  Therefore a new definition of @code{struct stat} is necessary.
>  
>  @comment sys/stat.h
> @@ -3072,7 +3077,12 @@ systems do not support this feature and will leave the file unchanged.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{truncate} function is in fact @code{truncate64} and the type
>  @code{off_t} has 64 bits which makes it possible to handle files up to
> +@iftex
> +@math{2^{63}} bytes in length.
> +@end iftex
> +@ifnottex
>  @math{2^63} bytes in length.
> +@end ifnottex
>  
>  The return value is @math{0} for success, or @math{-1} for an error.  In
>  addition to the usual file name errors, the following errors may occur:
> @@ -3109,7 +3119,12 @@ The operation was interrupted by a signal.
>  This function is similar to the @code{truncate} function.  The
>  difference is that the @var{length} argument is 64 bits wide even on 32
>  bits machines, which allows the handling of files with sizes up to
> -@math{2^63} bytes.
> +@iftex
> +@math{2^{63}} bytes.
> +@end iftex
> +@ifnottex
> +@math{2^{63}} bytes.
> +@end ifnottex
>  
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
>  32 bits machine this function is actually available under the name
> @@ -3143,7 +3158,12 @@ The example below shows how this works.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{ftruncate} function is in fact @code{ftruncate64} and the type
>  @code{off_t} has 64 bits which makes it possible to handle files up to
> +@iftex
> +@math{2^{63}} bytes in length.
> +@end iftex
> +@ifnottex
>  @math{2^63} bytes in length.
> +@end ifnottex
>  
>  The return value is @math{0} for success, or @math{-1} for an error.  The
>  following errors may occur:
> @@ -3189,7 +3209,12 @@ The operation was interrupted by a signal.
>  This function is similar to the @code{ftruncate} function.  The
>  difference is that the @var{length} argument is 64 bits wide even on 32
>  bits machines which allows the handling of files with sizes up to
> +@iftex
> +@math{2^{63}} bytes.
> +@end iftex
> +@ifnottex
>  @math{2^63} bytes.
> +@end ifnottex
>  
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
>  32 bits machine this function is actually available under the name
> diff --git a/manual/llio.texi b/manual/llio.texi
> index 4f3fada..60662f7 100644
> --- a/manual/llio.texi
> +++ b/manual/llio.texi
> @@ -150,8 +150,18 @@ or @code{O_CREAT} is set and the file does not already exist.
>  If on a 32 bit machine the sources are translated with
>  @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
>  descriptor opened in the large file mode which enables the file handling
> +@iftex
> +functions to use files up to @math{2^{63}} bytes in size and offset from
> +@end iftex
> +@ifnottex
>  functions to use files up to @math{2^63} bytes in size and offset from
> +@end ifnottex
> +@iftex
> +@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
> +@end iftex
> +@ifnottex
>  @math{-2^63} to @math{2^63}.  This happens transparently for the user
> +@end ifnottex
>  since all of the lowlevel file handling functions are equally replaced.
>  
>  This function is a cancellation point in multi-threaded programs.  This
> @@ -201,8 +211,18 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
>  If on a 32 bit machine the sources are translated with
>  @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
>  descriptor opened in the large file mode which enables the file handling
> +@iftex
> +functions to use files up to @math{2^{63}} in size and offset from
> +@end iftex
> +@ifnottex
>  functions to use files up to @math{2^63} in size and offset from
> +@end ifnottex
> +@iftex
> +@math{-2^{63}} to @math{2^{63}}.  This happens transparently for the user
> +@end iftex
> +@ifnottex
>  @math{-2^63} to @math{2^63}.  This happens transparently for the user
> +@end ifnottex
>  since all of the lowlevel file handling functions are equally replaced.
>  @end deftypefn
>  
> @@ -422,7 +442,12 @@ not affected by the operation.  The value is the same as before the call.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{pread} function is in fact @code{pread64} and the type
>  @code{off_t} has 64 bits, which makes it possible to handle files up to
> +@iftex
> +@math{2^{63}} bytes in length.
> +@end iftex
> +@ifnottex
>  @math{2^63} bytes in length.
> +@end ifnottex
>  
>  The return value of @code{pread} describes the number of bytes read.
>  In the error case it returns @math{-1} like @code{read} does and the
> @@ -451,7 +476,12 @@ version 2.
>  This function is similar to the @code{pread} function.  The difference
>  is that the @var{offset} parameter is of type @code{off64_t} instead of
>  @code{off_t} which makes it possible on 32 bit machines to address
> +@iftex
> +files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
> +@end iftex
> +@ifnottex
>  files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> +@end ifnottex
>  file descriptor @code{filedes} must be opened using @code{open64} since
>  otherwise the large offsets possible with @code{off64_t} will lead to
>  errors with a descriptor in small file mode.
> @@ -623,7 +653,12 @@ not affected by the operation.  The value is the same as before the call.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{pwrite} function is in fact @code{pwrite64} and the type
>  @code{off_t} has 64 bits, which makes it possible to handle files up to
> +@iftex
> +@math{2^{63}} bytes in length.
> +@end iftex
> +@ifnottex
>  @math{2^63} bytes in length.
> +@end ifnottex
>  
>  The return value of @code{pwrite} describes the number of written bytes.
>  In the error case it returns @math{-1} like @code{write} does and the
> @@ -652,7 +687,12 @@ version 2.
>  This function is similar to the @code{pwrite} function.  The difference
>  is that the @var{offset} parameter is of type @code{off64_t} instead of
>  @code{off_t} which makes it possible on 32 bit machines to address
> +@iftex
> +files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
> +@end iftex
> +@ifnottex
>  files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> +@end ifnottex
>  file descriptor @code{filedes} must be opened using @code{open64} since
>  otherwise the large offsets possible with @code{off64_t} will lead to
>  errors with a descriptor in small file mode.
> @@ -752,7 +792,12 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{lseek} function is in fact @code{lseek64} and the type
>  @code{off_t} has 64 bits which makes it possible to handle files up to
> +@iftex
> +@math{2^{63}} bytes in length.
> +@end iftex
> +@ifnottex
>  @math{2^63} bytes in length.
> +@end ifnottex
>  
>  This function is a cancellation point in multi-threaded programs.  This
>  is a problem if the thread allocates some resources (like memory, file
> @@ -775,7 +820,12 @@ descriptors.
>  This function is similar to the @code{lseek} function.  The difference
>  is that the @var{offset} parameter is of type @code{off64_t} instead of
>  @code{off_t} which makes it possible on 32 bit machines to address
> +@iftex
> +files larger than @math{2^{31}} bytes and up to @math{2^{63}} bytes.  The
> +@end iftex
> +@ifnottex
>  files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> +@end ifnottex
>  file descriptor @code{filedes} must be opened using @code{open64} since
>  otherwise the large offsets possible with @code{off64_t} will lead to
>  errors with a descriptor in small file mode.
> @@ -848,7 +898,12 @@ is transparently replaced by @code{off64_t}.
>  This type is used similar to @code{off_t}.  The difference is that even
>  on 32 bit machines, where the @code{off_t} type would have 32 bits,
>  @code{off64_t} has 64 bits and so is able to address files up to
> +@iftex
> +@math{2^{63}} bytes in length.
> +@end iftex
> +@ifnottex
>  @math{2^63} bytes in length.
> +@end ifnottex
>  
>  When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
>  available under the name @code{off_t}.
> diff --git a/manual/stdio.texi b/manual/stdio.texi
> index e407170..b50b27e 100644
> --- a/manual/stdio.texi
> +++ b/manual/stdio.texi
> @@ -270,7 +270,12 @@ Locks}.
>  @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
>  This function is similar to @code{fopen} but the stream it returns a
>  pointer for is opened using @code{open64}.  Therefore this stream can be
> +@iftex
> +used even on files larger than @math{2^{31}} bytes on 32 bit machines.
> +@end iftex
> +@ifnottex
>  used even on files larger than @math{2^31} bytes on 32 bit machines.
> +@end ifnottex
>  
>  Please note that the return type is still @code{FILE *}.  There is no
>  special @code{FILE} type for the LFS interface.
> @@ -336,7 +341,12 @@ interface replaces transparently the old interface.
>  @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
>  This function is similar to @code{freopen}.  The only difference is that
>  on 32 bit machine the stream returned is able to read beyond the
> +@iftex
> +@math{2^{31}} bytes limits imposed by the normal interface.  It should be
> +@end iftex
> +@ifnottex
>  @math{2^31} bytes limits imposed by the normal interface.  It should be
> +@end ifnottex
>  noted that the stream pointed to by @var{stream} need not be opened
>  using @code{fopen64} or @code{freopen64} since its mode is not important
>  for this function.
> @@ -4412,7 +4422,12 @@ This function is similar to @code{ftello} with the only difference that
>  the return value is of type @code{off64_t}.  This also requires that the
>  stream @var{stream} was opened using either @code{fopen64},
>  @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
> +@iftex
> +file operations to position the file pointer beyond the @math{2^{31}}
> +@end iftex
> +@ifnottex
>  file operations to position the file pointer beyond the @math{2^31}
> +@end ifnottex
>  bytes limit might fail.
>  
>  If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
> @@ -4473,7 +4488,12 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
>  requires that the stream @var{stream} was opened using either
>  @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
>  the underlying file operations to position the file pointer beyond the
> +@iftex
> +@math{2^{31}} bytes limit might fail.
> +@end iftex
> +@ifnottex
>  @math{2^31} bytes limit might fail.
> +@end ifnottex
>  
>  If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
>  bits machine this function is available under the name @code{fseeko}

-- 

The mouse escaped.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PING][PATCH][BZ #17787] Fix exponents in manual.
  2015-06-16 19:28     ` [PING][PATCH][BZ " Ondřej Bílka
@ 2015-06-16 19:54       ` Carlos O'Donell
  2015-06-16 20:24       ` Joseph Myers
  1 sibling, 0 replies; 20+ messages in thread
From: Carlos O'Donell @ 2015-06-16 19:54 UTC (permalink / raw)
  To: Ondřej Bílka, Andreas Schwab; +Cc: libc-alpha

On 06/16/2015 01:57 PM, Ondřej Bílka wrote:
> Ping, if you have better idea I would like it.
> On Tue, Jan 06, 2015 at 12:57:20PM +0100, Ondřej Bílka wrote:
>> On Mon, Jan 05, 2015 at 03:15:24PM +0100, Andreas Schwab wrote:
>>> Ondřej Bílka <neleai@seznam.cz> writes:
>>>
>>>> Is this ok to commit or is there trick to also handle info?
>>>
>>> Use different renditions for @iftex and @ifnottex (html output will also
>>> be verbatim like info output).
>>>
>> That makes patch look bit ugly but does job. Ok with this?
>>
>>         * manual/filesys.texi: Fix exponents.
>>         * manual/llio.texi: Likewise.
>>         * manual/stdio.texi: Likewise.
>>

This looks good to me, thanks for fixing this, it has annoyed me
that the PDF looks wrong.

OK to checkin if you verified `make pdf` produces PDF with 2^63
rendered correctly, and the info file also continue to render
2^63 correctly.

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PING][PATCH][BZ #17787] Fix exponents in manual.
  2015-06-16 19:28     ` [PING][PATCH][BZ " Ondřej Bílka
  2015-06-16 19:54       ` Carlos O'Donell
@ 2015-06-16 20:24       ` Joseph Myers
  2015-06-16 21:42         ` Carlos O'Donell
  1 sibling, 1 reply; 20+ messages in thread
From: Joseph Myers @ 2015-06-16 20:24 UTC (permalink / raw)
  To: Ondřej Bílka; +Cc: Andreas Schwab, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 703 bytes --]

On Tue, 16 Jun 2015, Ondřej Bílka wrote:

> Ping, if you have better idea I would like it.

I've looked back at the previous discussion.  It seems clear enough that:

* It's a bad idea to duplicate parts of sentences that don't need 
duplicating.  Conditionals in the main manual should be around lines with 
nothing more than the single word using @math.

* It should be possible to use a Texinfo macro for this and so avoid any 
conditionals at all in the main manual.  Something like (untested)

@iftex
@macro twoexp{exp}
2^{\exp\}
@end macro
@end iftex
@ifnottex
@macro twoexp{exp}
2^{exp}
@end macro
@end itnottex

(and then use @twoexp{63} etc.).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PING][PATCH][BZ #17787] Fix exponents in manual.
  2015-06-16 20:24       ` Joseph Myers
@ 2015-06-16 21:42         ` Carlos O'Donell
  2015-06-18 15:26           ` [PATCH v3][BZ " Ondřej Bílka
  0 siblings, 1 reply; 20+ messages in thread
From: Carlos O'Donell @ 2015-06-16 21:42 UTC (permalink / raw)
  To: Joseph Myers, Ondřej Bílka; +Cc: Andreas Schwab, libc-alpha

On 06/16/2015 04:07 PM, Joseph Myers wrote:
> On Tue, 16 Jun 2015, Ondřej Bílka wrote:
> 
>> Ping, if you have better idea I would like it.
> 
> I've looked back at the previous discussion.  It seems clear enough that:
> 
> * It's a bad idea to duplicate parts of sentences that don't need 
> duplicating.  Conditionals in the main manual should be around lines with 
> nothing more than the single word using @math.

It's bad, but it's not terrible. I would rather see the manual get updated
than nit pick over the exact ways that this can get fixed.

> * It should be possible to use a Texinfo macro for this and so avoid any 
> conditionals at all in the main manual.  Something like (untested)
> 
> @iftex
> @macro twoexp{exp}
> 2^{\exp\}
> @end macro
> @end iftex
> @ifnottex
> @macro twoexp{exp}
> 2^{exp}
> @end macro
> @end itnottex
> 
> (and then use @twoexp{63} etc.).

That's a good suggestion.

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v3][BZ #17787] Fix exponents in manual.
  2015-06-16 21:42         ` Carlos O'Donell
@ 2015-06-18 15:26           ` Ondřej Bílka
  2015-06-18 15:50             ` Joseph Myers
  2015-06-18 15:54             ` [PATCH v3][BZ " Carlos O'Donell
  0 siblings, 2 replies; 20+ messages in thread
From: Ondřej Bílka @ 2015-06-18 15:26 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: Joseph Myers, Andreas Schwab, libc-alpha

On Tue, Jun 16, 2015 at 04:24:52PM -0400, Carlos O'Donell wrote:
> On 06/16/2015 04:07 PM, Joseph Myers wrote:
> > On Tue, 16 Jun 2015, Ondřej Bílka wrote:
> > 
> >> Ping, if you have better idea I would like it.
> > 
> > I've looked back at the previous discussion.  It seems clear enough that:
> > 
> > * It's a bad idea to duplicate parts of sentences that don't need 
> > duplicating.  Conditionals in the main manual should be around lines with 
> > nothing more than the single word using @math.
> 
> It's bad, but it's not terrible. I would rather see the manual get updated
> than nit pick over the exact ways that this can get fixed.
> 
> > * It should be possible to use a Texinfo macro for this and so avoid any 
> > conditionals at all in the main manual.  Something like (untested)
> > 
> > @iftex
> > @macro twoexp{exp}
> > 2^{\exp\}
> > @end macro
> > @end iftex
> > @ifnottex
> > @macro twoexp{exp}
> > 2^{exp}
> > @end macro
> > @end itnottex
> > 
> > (and then use @twoexp{63} etc.).
> 
> That's a good suggestion.
> 
> Cheers,
> Carlos.

Thanks that works after fixing two typos. Here I use twoexp.

        * manual/filesys.texi: Fix exponents.
        * manual/llio.texi: Likewise.
        * manual/stdio.texi: Likewise.

diff --git a/manual/filesys.texi b/manual/filesys.texi
index 0f2e3dc..181de76 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -2,6 +2,18 @@
 @c %MENU% Functions for manipulating files
 @chapter File System Interface
 
+@iftex
+@macro twoexp{exp}
+@math{2^{{\exp\}}}
+@end macro
+@end iftex
+@ifnottex
+@macro twoexp{exp}
+2^\exp\
+@end macro
+@end ifnottex
+
+
 This chapter describes @theglibc{}'s functions for manipulating
 files.  Unlike the input and output functions (@pxref{I/O on Streams};
 @pxref{Low-Level I/O}), these functions are concerned with operating
@@ -1834,7 +1846,7 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
 @end deftp
 
 The extensions for the Large File Support (LFS) require, even on 32-bit
-machines, types which can handle file sizes up to @math{2^63}.
+machines, types which can handle file sizes up to @twoexp{63}.
 Therefore a new definition of @code{struct stat} is necessary.
 
 @comment sys/stat.h
@@ -2024,7 +2036,7 @@ replaces the normal implementation.
 @deftypefun int stat64 (const char *@var{filename}, struct stat64 *@var{buf})
 @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
 This function is similar to @code{stat} but it is also able to work on
-files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
+files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
 this the result is stored in a variable of type @code{struct stat64} to
 which @var{buf} must point.
 
@@ -2097,7 +2109,7 @@ replaces the normal implementation.
 @c Direct system call through lxstat64, sometimes with an xstat conv
 @c call afterwards.
 This function is similar to @code{lstat} but it is also able to work on
-files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
+files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
 this the result is stored in a variable of type @code{struct stat64} to
 which @var{buf} must point.
 
@@ -3073,7 +3085,7 @@ systems do not support this feature and will leave the file unchanged.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{truncate} function is in fact @code{truncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value is @math{0} for success, or @math{-1} for an error.  In
 addition to the usual file name errors, the following errors may occur:
@@ -3110,7 +3122,7 @@ The operation was interrupted by a signal.
 This function is similar to the @code{truncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines, which allows the handling of files with sizes up to
-@math{2^63} bytes.
+@twoexp{63} bytes.
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
@@ -3144,7 +3156,7 @@ The example below shows how this works.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{ftruncate} function is in fact @code{ftruncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value is @math{0} for success, or @math{-1} for an error.  The
 following errors may occur:
@@ -3190,7 +3202,7 @@ The operation was interrupted by a signal.
 This function is similar to the @code{ftruncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines which allows the handling of files with sizes up to
-@math{2^63} bytes.
+@twoexp{63} bytes.
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
@@ -3430,7 +3442,7 @@ interface transparently replaces the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 This function is similar to @code{tmpfile}, but the stream it returns a
 pointer to was opened using @code{tmpfile64}.  Therefore this stream can
-be used for files larger than @math{2^31} bytes on 32-bit machines.
+be used for files larger than @twoexp{31} bytes on 32-bit machines.
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
diff --git a/manual/llio.texi b/manual/llio.texi
index 4f3fada..6e36f97 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -2,6 +2,18 @@
 @c %MENU% Low-level, less portable I/O
 @chapter Low-Level Input/Output
 
+@iftex
+@macro twoexp{exp}
+@math{2^{{\exp\}}}
+@end macro
+@end iftex
+@ifnottex
+@macro twoexp{exp}
+2^\exp\
+@end macro
+@end ifnottex
+
+
 This chapter describes functions for performing low-level input/output
 operations on file descriptors.  These functions include the primitives
 for the higher-level I/O functions described in @ref{I/O on Streams}, as
@@ -150,8 +162,8 @@ or @code{O_CREAT} is set and the file does not already exist.
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
 descriptor opened in the large file mode which enables the file handling
-functions to use files up to @math{2^63} bytes in size and offset from
-@math{-2^63} to @math{2^63}.  This happens transparently for the user
+functions to use files up to @twoexp{63} bytes in size and offset from
+-@twoexp{63} to @twoexp{63}.  This happens transparently for the user
 since all of the lowlevel file handling functions are equally replaced.
 
 This function is a cancellation point in multi-threaded programs.  This
@@ -201,8 +213,8 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
 descriptor opened in the large file mode which enables the file handling
-functions to use files up to @math{2^63} in size and offset from
-@math{-2^63} to @math{2^63}.  This happens transparently for the user
+functions to use files up to @twoexp{63} in size and offset from
+-2@twoexp{63} to @twoexp{63}.  This happens transparently for the user
 since all of the lowlevel file handling functions are equally replaced.
 @end deftypefn
 
@@ -422,7 +434,7 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pread} function is in fact @code{pread64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value of @code{pread} describes the number of bytes read.
 In the error case it returns @math{-1} like @code{read} does and the
@@ -451,7 +463,7 @@ version 2.
 This function is similar to the @code{pread} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -623,7 +635,7 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pwrite} function is in fact @code{pwrite64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value of @code{pwrite} describes the number of written bytes.
 In the error case it returns @math{-1} like @code{write} does and the
@@ -652,7 +664,7 @@ version 2.
 This function is similar to the @code{pwrite} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -752,7 +764,7 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{lseek} function is in fact @code{lseek64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 This function is a cancellation point in multi-threaded programs.  This
 is a problem if the thread allocates some resources (like memory, file
@@ -775,7 +787,7 @@ descriptors.
 This function is similar to the @code{lseek} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -848,7 +860,7 @@ is transparently replaced by @code{off64_t}.
 This type is used similar to @code{off_t}.  The difference is that even
 on 32 bit machines, where the @code{off_t} type would have 32 bits,
 @code{off64_t} has 64 bits and so is able to address files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
 available under the name @code{off_t}.
diff --git a/manual/stdio.texi b/manual/stdio.texi
index e407170..7d62829 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -6,6 +6,18 @@
 \hyphenation{which-ever}
 @end tex
 
+@iftex
+@macro twoexp{exp}
+@math{2^{{\exp\}}}
+@end macro
+@end iftex
+@ifnottex
+@macro twoexp{exp}
+2^\exp\
+@end macro
+@end ifnottex
+
+
 This chapter describes the functions for creating streams and performing
 input and output operations on them.  As discussed in @ref{I/O
 Overview}, a stream is a fairly abstract, high-level concept
@@ -270,7 +282,7 @@ Locks}.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 This function is similar to @code{fopen} but the stream it returns a
 pointer for is opened using @code{open64}.  Therefore this stream can be
-used even on files larger than @math{2^31} bytes on 32 bit machines.
+used even on files larger than @twoexp{31} bytes on 32 bit machines.
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
@@ -336,7 +348,7 @@ interface replaces transparently the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
 This function is similar to @code{freopen}.  The only difference is that
 on 32 bit machine the stream returned is able to read beyond the
-@math{2^31} bytes limits imposed by the normal interface.  It should be
+@twoexp{31} bytes limits imposed by the normal interface.  It should be
 noted that the stream pointed to by @var{stream} need not be opened
 using @code{fopen64} or @code{freopen64} since its mode is not important
 for this function.
@@ -4412,7 +4424,7 @@ This function is similar to @code{ftello} with the only difference that
 the return value is of type @code{off64_t}.  This also requires that the
 stream @var{stream} was opened using either @code{fopen64},
 @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
-file operations to position the file pointer beyond the @math{2^31}
+file operations to position the file pointer beyond the @twoexp{31}
 bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
@@ -4473,7 +4485,7 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
 requires that the stream @var{stream} was opened using either
 @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
 the underlying file operations to position the file pointer beyond the
-@math{2^31} bytes limit might fail.
+@twoexp{31} bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
 bits machine this function is available under the name @code{fseeko}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3][BZ #17787] Fix exponents in manual.
  2015-06-18 15:26           ` [PATCH v3][BZ " Ondřej Bílka
@ 2015-06-18 15:50             ` Joseph Myers
  2015-06-18 16:05               ` Carlos O'Donell
  2015-06-18 15:54             ` [PATCH v3][BZ " Carlos O'Donell
  1 sibling, 1 reply; 20+ messages in thread
From: Joseph Myers @ 2015-06-18 15:50 UTC (permalink / raw)
  To: Ondřej Bílka; +Cc: Carlos O'Donell, Andreas Schwab, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

On Thu, 18 Jun 2015, Ondřej Bílka wrote:

> diff --git a/manual/filesys.texi b/manual/filesys.texi
> index 0f2e3dc..181de76 100644
> --- a/manual/filesys.texi
> +++ b/manual/filesys.texi
> @@ -2,6 +2,18 @@
>  @c %MENU% Functions for manipulating files
>  @chapter File System Interface
>  
> +@iftex
> +@macro twoexp{exp}
> +@math{2^{{\exp\}}}
> +@end macro
> +@end iftex
> +@ifnottex
> +@macro twoexp{exp}
> +2^\exp\
> +@end macro
> +@end ifnottex

The macro definitions should go in macros.texi, rather than being 
duplicated in each file using it.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3][BZ #17787] Fix exponents in manual.
  2015-06-18 15:26           ` [PATCH v3][BZ " Ondřej Bílka
  2015-06-18 15:50             ` Joseph Myers
@ 2015-06-18 15:54             ` Carlos O'Donell
  1 sibling, 0 replies; 20+ messages in thread
From: Carlos O'Donell @ 2015-06-18 15:54 UTC (permalink / raw)
  To: Ondřej Bílka; +Cc: Joseph Myers, Andreas Schwab, libc-alpha

On 06/18/2015 10:29 AM, Ondřej Bílka wrote:
> On Tue, Jun 16, 2015 at 04:24:52PM -0400, Carlos O'Donell wrote:
>> On 06/16/2015 04:07 PM, Joseph Myers wrote:
>>> On Tue, 16 Jun 2015, Ondřej Bílka wrote:
>>>
>>>> Ping, if you have better idea I would like it.
>>>
>>> I've looked back at the previous discussion.  It seems clear enough that:
>>>
>>> * It's a bad idea to duplicate parts of sentences that don't need 
>>> duplicating.  Conditionals in the main manual should be around lines with 
>>> nothing more than the single word using @math.
>>
>> It's bad, but it's not terrible. I would rather see the manual get updated
>> than nit pick over the exact ways that this can get fixed.
>>
>>> * It should be possible to use a Texinfo macro for this and so avoid any 
>>> conditionals at all in the main manual.  Something like (untested)
>>>
>>> @iftex
>>> @macro twoexp{exp}
>>> 2^{\exp\}
>>> @end macro
>>> @end iftex
>>> @ifnottex
>>> @macro twoexp{exp}
>>> 2^{exp}
>>> @end macro
>>> @end itnottex
>>>
>>> (and then use @twoexp{63} etc.).
>>
>> That's a good suggestion.
>>
>> Cheers,
>> Carlos.
> 
> Thanks that works after fixing two typos. Here I use twoexp.
> 
>         * manual/filesys.texi: Fix exponents.
>         * manual/llio.texi: Likewise.
>         * manual/stdio.texi: Likewise.

Looks good to me.

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3][BZ #17787] Fix exponents in manual.
  2015-06-18 15:50             ` Joseph Myers
@ 2015-06-18 16:05               ` Carlos O'Donell
  2015-06-18 16:20                 ` Joseph Myers
  0 siblings, 1 reply; 20+ messages in thread
From: Carlos O'Donell @ 2015-06-18 16:05 UTC (permalink / raw)
  To: Joseph Myers, Ondřej Bílka; +Cc: Andreas Schwab, libc-alpha

On 06/18/2015 10:34 AM, Joseph Myers wrote:
> On Thu, 18 Jun 2015, Ondřej Bílka wrote:
> 
>> diff --git a/manual/filesys.texi b/manual/filesys.texi
>> index 0f2e3dc..181de76 100644
>> --- a/manual/filesys.texi
>> +++ b/manual/filesys.texi
>> @@ -2,6 +2,18 @@
>>  @c %MENU% Functions for manipulating files
>>  @chapter File System Interface
>>  
>> +@iftex
>> +@macro twoexp{exp}
>> +@math{2^{{\exp\}}}
>> +@end macro
>> +@end iftex
>> +@ifnottex
>> +@macro twoexp{exp}
>> +2^\exp\
>> +@end macro
>> +@end ifnottex
> 
> The macro definitions should go in macros.texi, rather than being 
> duplicated in each file using it.

It would also seem sensible to keep such macros near their uses,
and move them to macros.texi only if globally useful or repeated
more than some nominal number of times.

What if the macro was only used in one place? Would we still put
it into macros.texi?

Cheers,
Carlos.
 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v3][BZ #17787] Fix exponents in manual.
  2015-06-18 16:05               ` Carlos O'Donell
@ 2015-06-18 16:20                 ` Joseph Myers
  2015-07-12  9:33                   ` [PATCH v4][BZ " Ondřej Bílka
  0 siblings, 1 reply; 20+ messages in thread
From: Joseph Myers @ 2015-06-18 16:20 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: Ondřej Bílka, Andreas Schwab, libc-alpha

On Thu, 18 Jun 2015, Carlos O'Donell wrote:

> > The macro definitions should go in macros.texi, rather than being 
> > duplicated in each file using it.
> 
> It would also seem sensible to keep such macros near their uses,
> and move them to macros.texi only if globally useful or repeated
> more than some nominal number of times.
> 
> What if the macro was only used in one place? Would we still put
> it into macros.texi?

If it were only used in one source file, it might be reasonable to define 
it there, but this macro is used in three source files.

Another issue with this patch: where it has "-@twoexp{63}" replacing 
"@math{-2^63}", the minus sign being outside @math will make it a hyphen 
rather than a minus sign (use @minus{} instead).  And one typo, 
"-2@twoexp{63}" has a stray "2" in there (should be 
"@minus{}@twoexp{63}").

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v4][BZ #17787] Fix exponents in manual.
  2015-06-18 16:20                 ` Joseph Myers
@ 2015-07-12  9:33                   ` Ondřej Bílka
  2015-08-12 20:26                     ` [PING][PATCH " Ondřej Bílka
  0 siblings, 1 reply; 20+ messages in thread
From: Ondřej Bílka @ 2015-07-12  9:33 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Carlos O'Donell, Andreas Schwab, libc-alpha

On Thu, Jun 18, 2015 at 04:01:09PM +0000, Joseph Myers wrote:
> On Thu, 18 Jun 2015, Carlos O'Donell wrote:
> 
> > > The macro definitions should go in macros.texi, rather than being 
> > > duplicated in each file using it.
> > 
> > It would also seem sensible to keep such macros near their uses,
> > and move them to macros.texi only if globally useful or repeated
> > more than some nominal number of times.
> > 
> > What if the macro was only used in one place? Would we still put
> > it into macros.texi?
> 
> If it were only used in one source file, it might be reasonable to define 
> it there, but this macro is used in three source files.
> 
Ok, here is new version.
	
	* manual/macros.texi: Add twoexp macro.
	* manual/filesys.texi: Fix exponents.
	* manual/llio.texi: Likewise.
	* manual/stdio.texi: Likewise.

diff --git a/manual/filesys.texi b/manual/filesys.texi
index 0f2e3dc..ed4f5fd 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -1834,7 +1834,7 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
 @end deftp
 
 The extensions for the Large File Support (LFS) require, even on 32-bit
-machines, types which can handle file sizes up to @math{2^63}.
+machines, types which can handle file sizes up to @twoexp{63}.
 Therefore a new definition of @code{struct stat} is necessary.
 
 @comment sys/stat.h
@@ -2024,7 +2024,7 @@ replaces the normal implementation.
 @deftypefun int stat64 (const char *@var{filename}, struct stat64 *@var{buf})
 @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
 This function is similar to @code{stat} but it is also able to work on
-files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
+files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
 this the result is stored in a variable of type @code{struct stat64} to
 which @var{buf} must point.
 
@@ -2097,7 +2097,7 @@ replaces the normal implementation.
 @c Direct system call through lxstat64, sometimes with an xstat conv
 @c call afterwards.
 This function is similar to @code{lstat} but it is also able to work on
-files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
+files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
 this the result is stored in a variable of type @code{struct stat64} to
 which @var{buf} must point.
 
@@ -3073,7 +3073,7 @@ systems do not support this feature and will leave the file unchanged.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{truncate} function is in fact @code{truncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value is @math{0} for success, or @math{-1} for an error.  In
 addition to the usual file name errors, the following errors may occur:
@@ -3110,7 +3110,7 @@ The operation was interrupted by a signal.
 This function is similar to the @code{truncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines, which allows the handling of files with sizes up to
-@math{2^63} bytes.
+@twoexp{63} bytes.
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
@@ -3144,7 +3144,7 @@ The example below shows how this works.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{ftruncate} function is in fact @code{ftruncate64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value is @math{0} for success, or @math{-1} for an error.  The
 following errors may occur:
@@ -3190,7 +3190,7 @@ The operation was interrupted by a signal.
 This function is similar to the @code{ftruncate} function.  The
 difference is that the @var{length} argument is 64 bits wide even on 32
 bits machines which allows the handling of files with sizes up to
-@math{2^63} bytes.
+@twoexp{63} bytes.
 
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
 32 bits machine this function is actually available under the name
@@ -3430,7 +3430,7 @@ interface transparently replaces the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 This function is similar to @code{tmpfile}, but the stream it returns a
 pointer to was opened using @code{tmpfile64}.  Therefore this stream can
-be used for files larger than @math{2^31} bytes on 32-bit machines.
+be used for files larger than @twoexp{31} bytes on 32-bit machines.
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
diff --git a/manual/llio.texi b/manual/llio.texi
index 4f3fada..019dea2 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -150,8 +150,8 @@ or @code{O_CREAT} is set and the file does not already exist.
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
 descriptor opened in the large file mode which enables the file handling
-functions to use files up to @math{2^63} bytes in size and offset from
-@math{-2^63} to @math{2^63}.  This happens transparently for the user
+functions to use files up to @twoexp{63} bytes in size and offset from
+@minus{}@twoexp{63} to @twoexp{63}.  This happens transparently for the user
 since all of the lowlevel file handling functions are equally replaced.
 
 This function is a cancellation point in multi-threaded programs.  This
@@ -201,8 +201,8 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
 If on a 32 bit machine the sources are translated with
 @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
 descriptor opened in the large file mode which enables the file handling
-functions to use files up to @math{2^63} in size and offset from
-@math{-2^63} to @math{2^63}.  This happens transparently for the user
+functions to use files up to @twoexp{63} in size and offset from
+@minus{}@twoexp{63} to @twoexp{63}.  This happens transparently for the user
 since all of the lowlevel file handling functions are equally replaced.
 @end deftypefn
 
@@ -422,7 +422,7 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pread} function is in fact @code{pread64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value of @code{pread} describes the number of bytes read.
 In the error case it returns @math{-1} like @code{read} does and the
@@ -451,7 +451,7 @@ version 2.
 This function is similar to the @code{pread} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -623,7 +623,7 @@ not affected by the operation.  The value is the same as before the call.
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{pwrite} function is in fact @code{pwrite64} and the type
 @code{off_t} has 64 bits, which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 The return value of @code{pwrite} describes the number of written bytes.
 In the error case it returns @math{-1} like @code{write} does and the
@@ -652,7 +652,7 @@ version 2.
 This function is similar to the @code{pwrite} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -752,7 +752,7 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
 When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
 @code{lseek} function is in fact @code{lseek64} and the type
 @code{off_t} has 64 bits which makes it possible to handle files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 This function is a cancellation point in multi-threaded programs.  This
 is a problem if the thread allocates some resources (like memory, file
@@ -775,7 +775,7 @@ descriptors.
 This function is similar to the @code{lseek} function.  The difference
 is that the @var{offset} parameter is of type @code{off64_t} instead of
 @code{off_t} which makes it possible on 32 bit machines to address
-files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
+files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
 file descriptor @code{filedes} must be opened using @code{open64} since
 otherwise the large offsets possible with @code{off64_t} will lead to
 errors with a descriptor in small file mode.
@@ -848,7 +848,7 @@ is transparently replaced by @code{off64_t}.
 This type is used similar to @code{off_t}.  The difference is that even
 on 32 bit machines, where the @code{off_t} type would have 32 bits,
 @code{off64_t} has 64 bits and so is able to address files up to
-@math{2^63} bytes in length.
+@twoexp{63} bytes in length.
 
 When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
 available under the name @code{off_t}.
diff --git a/manual/macros.texi b/manual/macros.texi
index f32c86d..9cf8031 100644
--- a/manual/macros.texi
+++ b/manual/macros.texi
@@ -256,4 +256,15 @@ cwd\comments\
 !posix\comments\
 @end macro
 
+@iftex
+@macro twoexp{exp}
+@math{2^{{\exp\}}}
+@end macro
+@end iftex
+@ifnottex
+@macro twoexp{exp}
+2^\exp\
+@end macro
+@end ifnottex
+
 @end ifclear
diff --git a/manual/stdio.texi b/manual/stdio.texi
index e407170..5d31774 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -270,7 +270,7 @@ Locks}.
 @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
 This function is similar to @code{fopen} but the stream it returns a
 pointer for is opened using @code{open64}.  Therefore this stream can be
-used even on files larger than @math{2^31} bytes on 32 bit machines.
+used even on files larger than @twoexp{31} bytes on 32 bit machines.
 
 Please note that the return type is still @code{FILE *}.  There is no
 special @code{FILE} type for the LFS interface.
@@ -336,7 +336,7 @@ interface replaces transparently the old interface.
 @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
 This function is similar to @code{freopen}.  The only difference is that
 on 32 bit machine the stream returned is able to read beyond the
-@math{2^31} bytes limits imposed by the normal interface.  It should be
+@twoexp{31} bytes limits imposed by the normal interface.  It should be
 noted that the stream pointed to by @var{stream} need not be opened
 using @code{fopen64} or @code{freopen64} since its mode is not important
 for this function.
@@ -4412,7 +4412,7 @@ This function is similar to @code{ftello} with the only difference that
 the return value is of type @code{off64_t}.  This also requires that the
 stream @var{stream} was opened using either @code{fopen64},
 @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
-file operations to position the file pointer beyond the @math{2^31}
+file operations to position the file pointer beyond the @twoexp{31}
 bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
@@ -4473,7 +4473,7 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
 requires that the stream @var{stream} was opened using either
 @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
 the underlying file operations to position the file pointer beyond the
-@math{2^31} bytes limit might fail.
+@twoexp{31} bytes limit might fail.
 
 If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
 bits machine this function is available under the name @code{fseeko}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PING][PATCH v4][BZ #17787] Fix exponents in manual.
  2015-07-12  9:33                   ` [PATCH v4][BZ " Ondřej Bílka
@ 2015-08-12 20:26                     ` Ondřej Bílka
  2015-08-19  6:33                       ` [PING^2][PATCH " Ondřej Bílka
  0 siblings, 1 reply; 20+ messages in thread
From: Ondřej Bílka @ 2015-08-12 20:26 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Carlos O'Donell, Andreas Schwab, libc-alpha

ping, is that ok now.
On Sun, Jul 12, 2015 at 11:32:56AM +0200, Ondřej Bílka wrote:
> On Thu, Jun 18, 2015 at 04:01:09PM +0000, Joseph Myers wrote:
> > On Thu, 18 Jun 2015, Carlos O'Donell wrote:
> > 
> > > > The macro definitions should go in macros.texi, rather than being 
> > > > duplicated in each file using it.
> > > 
> > > It would also seem sensible to keep such macros near their uses,
> > > and move them to macros.texi only if globally useful or repeated
> > > more than some nominal number of times.
> > > 
> > > What if the macro was only used in one place? Would we still put
> > > it into macros.texi?
> > 
> > If it were only used in one source file, it might be reasonable to define 
> > it there, but this macro is used in three source files.
> > 
> Ok, here is new version.
> 	
> 	* manual/macros.texi: Add twoexp macro.
> 	* manual/filesys.texi: Fix exponents.
> 	* manual/llio.texi: Likewise.
> 	* manual/stdio.texi: Likewise.
> 
> diff --git a/manual/filesys.texi b/manual/filesys.texi
> index 0f2e3dc..ed4f5fd 100644
> --- a/manual/filesys.texi
> +++ b/manual/filesys.texi
> @@ -1834,7 +1834,7 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
>  @end deftp
>  
>  The extensions for the Large File Support (LFS) require, even on 32-bit
> -machines, types which can handle file sizes up to @math{2^63}.
> +machines, types which can handle file sizes up to @twoexp{63}.
>  Therefore a new definition of @code{struct stat} is necessary.
>  
>  @comment sys/stat.h
> @@ -2024,7 +2024,7 @@ replaces the normal implementation.
>  @deftypefun int stat64 (const char *@var{filename}, struct stat64 *@var{buf})
>  @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
>  This function is similar to @code{stat} but it is also able to work on
> -files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
> +files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
>  this the result is stored in a variable of type @code{struct stat64} to
>  which @var{buf} must point.
>  
> @@ -2097,7 +2097,7 @@ replaces the normal implementation.
>  @c Direct system call through lxstat64, sometimes with an xstat conv
>  @c call afterwards.
>  This function is similar to @code{lstat} but it is also able to work on
> -files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
> +files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
>  this the result is stored in a variable of type @code{struct stat64} to
>  which @var{buf} must point.
>  
> @@ -3073,7 +3073,7 @@ systems do not support this feature and will leave the file unchanged.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{truncate} function is in fact @code{truncate64} and the type
>  @code{off_t} has 64 bits which makes it possible to handle files up to
> -@math{2^63} bytes in length.
> +@twoexp{63} bytes in length.
>  
>  The return value is @math{0} for success, or @math{-1} for an error.  In
>  addition to the usual file name errors, the following errors may occur:
> @@ -3110,7 +3110,7 @@ The operation was interrupted by a signal.
>  This function is similar to the @code{truncate} function.  The
>  difference is that the @var{length} argument is 64 bits wide even on 32
>  bits machines, which allows the handling of files with sizes up to
> -@math{2^63} bytes.
> +@twoexp{63} bytes.
>  
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
>  32 bits machine this function is actually available under the name
> @@ -3144,7 +3144,7 @@ The example below shows how this works.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{ftruncate} function is in fact @code{ftruncate64} and the type
>  @code{off_t} has 64 bits which makes it possible to handle files up to
> -@math{2^63} bytes in length.
> +@twoexp{63} bytes in length.
>  
>  The return value is @math{0} for success, or @math{-1} for an error.  The
>  following errors may occur:
> @@ -3190,7 +3190,7 @@ The operation was interrupted by a signal.
>  This function is similar to the @code{ftruncate} function.  The
>  difference is that the @var{length} argument is 64 bits wide even on 32
>  bits machines which allows the handling of files with sizes up to
> -@math{2^63} bytes.
> +@twoexp{63} bytes.
>  
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
>  32 bits machine this function is actually available under the name
> @@ -3430,7 +3430,7 @@ interface transparently replaces the old interface.
>  @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
>  This function is similar to @code{tmpfile}, but the stream it returns a
>  pointer to was opened using @code{tmpfile64}.  Therefore this stream can
> -be used for files larger than @math{2^31} bytes on 32-bit machines.
> +be used for files larger than @twoexp{31} bytes on 32-bit machines.
>  
>  Please note that the return type is still @code{FILE *}.  There is no
>  special @code{FILE} type for the LFS interface.
> diff --git a/manual/llio.texi b/manual/llio.texi
> index 4f3fada..019dea2 100644
> --- a/manual/llio.texi
> +++ b/manual/llio.texi
> @@ -150,8 +150,8 @@ or @code{O_CREAT} is set and the file does not already exist.
>  If on a 32 bit machine the sources are translated with
>  @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
>  descriptor opened in the large file mode which enables the file handling
> -functions to use files up to @math{2^63} bytes in size and offset from
> -@math{-2^63} to @math{2^63}.  This happens transparently for the user
> +functions to use files up to @twoexp{63} bytes in size and offset from
> +@minus{}@twoexp{63} to @twoexp{63}.  This happens transparently for the user
>  since all of the lowlevel file handling functions are equally replaced.
>  
>  This function is a cancellation point in multi-threaded programs.  This
> @@ -201,8 +201,8 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
>  If on a 32 bit machine the sources are translated with
>  @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
>  descriptor opened in the large file mode which enables the file handling
> -functions to use files up to @math{2^63} in size and offset from
> -@math{-2^63} to @math{2^63}.  This happens transparently for the user
> +functions to use files up to @twoexp{63} in size and offset from
> +@minus{}@twoexp{63} to @twoexp{63}.  This happens transparently for the user
>  since all of the lowlevel file handling functions are equally replaced.
>  @end deftypefn
>  
> @@ -422,7 +422,7 @@ not affected by the operation.  The value is the same as before the call.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{pread} function is in fact @code{pread64} and the type
>  @code{off_t} has 64 bits, which makes it possible to handle files up to
> -@math{2^63} bytes in length.
> +@twoexp{63} bytes in length.
>  
>  The return value of @code{pread} describes the number of bytes read.
>  In the error case it returns @math{-1} like @code{read} does and the
> @@ -451,7 +451,7 @@ version 2.
>  This function is similar to the @code{pread} function.  The difference
>  is that the @var{offset} parameter is of type @code{off64_t} instead of
>  @code{off_t} which makes it possible on 32 bit machines to address
> -files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> +files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
>  file descriptor @code{filedes} must be opened using @code{open64} since
>  otherwise the large offsets possible with @code{off64_t} will lead to
>  errors with a descriptor in small file mode.
> @@ -623,7 +623,7 @@ not affected by the operation.  The value is the same as before the call.
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{pwrite} function is in fact @code{pwrite64} and the type
>  @code{off_t} has 64 bits, which makes it possible to handle files up to
> -@math{2^63} bytes in length.
> +@twoexp{63} bytes in length.
>  
>  The return value of @code{pwrite} describes the number of written bytes.
>  In the error case it returns @math{-1} like @code{write} does and the
> @@ -652,7 +652,7 @@ version 2.
>  This function is similar to the @code{pwrite} function.  The difference
>  is that the @var{offset} parameter is of type @code{off64_t} instead of
>  @code{off_t} which makes it possible on 32 bit machines to address
> -files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> +files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
>  file descriptor @code{filedes} must be opened using @code{open64} since
>  otherwise the large offsets possible with @code{off64_t} will lead to
>  errors with a descriptor in small file mode.
> @@ -752,7 +752,7 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
>  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
>  @code{lseek} function is in fact @code{lseek64} and the type
>  @code{off_t} has 64 bits which makes it possible to handle files up to
> -@math{2^63} bytes in length.
> +@twoexp{63} bytes in length.
>  
>  This function is a cancellation point in multi-threaded programs.  This
>  is a problem if the thread allocates some resources (like memory, file
> @@ -775,7 +775,7 @@ descriptors.
>  This function is similar to the @code{lseek} function.  The difference
>  is that the @var{offset} parameter is of type @code{off64_t} instead of
>  @code{off_t} which makes it possible on 32 bit machines to address
> -files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> +files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
>  file descriptor @code{filedes} must be opened using @code{open64} since
>  otherwise the large offsets possible with @code{off64_t} will lead to
>  errors with a descriptor in small file mode.
> @@ -848,7 +848,7 @@ is transparently replaced by @code{off64_t}.
>  This type is used similar to @code{off_t}.  The difference is that even
>  on 32 bit machines, where the @code{off_t} type would have 32 bits,
>  @code{off64_t} has 64 bits and so is able to address files up to
> -@math{2^63} bytes in length.
> +@twoexp{63} bytes in length.
>  
>  When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
>  available under the name @code{off_t}.
> diff --git a/manual/macros.texi b/manual/macros.texi
> index f32c86d..9cf8031 100644
> --- a/manual/macros.texi
> +++ b/manual/macros.texi
> @@ -256,4 +256,15 @@ cwd\comments\
>  !posix\comments\
>  @end macro
>  
> +@iftex
> +@macro twoexp{exp}
> +@math{2^{{\exp\}}}
> +@end macro
> +@end iftex
> +@ifnottex
> +@macro twoexp{exp}
> +2^\exp\
> +@end macro
> +@end ifnottex
> +
>  @end ifclear
> diff --git a/manual/stdio.texi b/manual/stdio.texi
> index e407170..5d31774 100644
> --- a/manual/stdio.texi
> +++ b/manual/stdio.texi
> @@ -270,7 +270,7 @@ Locks}.
>  @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
>  This function is similar to @code{fopen} but the stream it returns a
>  pointer for is opened using @code{open64}.  Therefore this stream can be
> -used even on files larger than @math{2^31} bytes on 32 bit machines.
> +used even on files larger than @twoexp{31} bytes on 32 bit machines.
>  
>  Please note that the return type is still @code{FILE *}.  There is no
>  special @code{FILE} type for the LFS interface.
> @@ -336,7 +336,7 @@ interface replaces transparently the old interface.
>  @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
>  This function is similar to @code{freopen}.  The only difference is that
>  on 32 bit machine the stream returned is able to read beyond the
> -@math{2^31} bytes limits imposed by the normal interface.  It should be
> +@twoexp{31} bytes limits imposed by the normal interface.  It should be
>  noted that the stream pointed to by @var{stream} need not be opened
>  using @code{fopen64} or @code{freopen64} since its mode is not important
>  for this function.
> @@ -4412,7 +4412,7 @@ This function is similar to @code{ftello} with the only difference that
>  the return value is of type @code{off64_t}.  This also requires that the
>  stream @var{stream} was opened using either @code{fopen64},
>  @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
> -file operations to position the file pointer beyond the @math{2^31}
> +file operations to position the file pointer beyond the @twoexp{31}
>  bytes limit might fail.
>  
>  If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
> @@ -4473,7 +4473,7 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
>  requires that the stream @var{stream} was opened using either
>  @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
>  the underlying file operations to position the file pointer beyond the
> -@math{2^31} bytes limit might fail.
> +@twoexp{31} bytes limit might fail.
>  
>  If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
>  bits machine this function is available under the name @code{fseeko}

-- 

Change your language to Finnish.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PING^2][PATCH v4][BZ #17787] Fix exponents in manual.
  2015-08-12 20:26                     ` [PING][PATCH " Ondřej Bílka
@ 2015-08-19  6:33                       ` Ondřej Bílka
  2015-08-19 12:57                         ` Joseph Myers
  0 siblings, 1 reply; 20+ messages in thread
From: Ondřej Bílka @ 2015-08-19  6:33 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Carlos O'Donell, Andreas Schwab, libc-alpha

On Wed, Aug 12, 2015 at 10:26:40PM +0200, Ondřej Bílka wrote:
> ping, is that ok now.
> On Sun, Jul 12, 2015 at 11:32:56AM +0200, Ondřej Bílka wrote:
> > On Thu, Jun 18, 2015 at 04:01:09PM +0000, Joseph Myers wrote:
> > > On Thu, 18 Jun 2015, Carlos O'Donell wrote:
> > > 
> > > > > The macro definitions should go in macros.texi, rather than being 
> > > > > duplicated in each file using it.
> > > > 
> > > > It would also seem sensible to keep such macros near their uses,
> > > > and move them to macros.texi only if globally useful or repeated
> > > > more than some nominal number of times.
> > > > 
> > > > What if the macro was only used in one place? Would we still put
> > > > it into macros.texi?
> > > 
> > > If it were only used in one source file, it might be reasonable to define 
> > > it there, but this macro is used in three source files.
> > > 
> > Ok, here is new version.
> > 	
> > 	* manual/macros.texi: Add twoexp macro.
> > 	* manual/filesys.texi: Fix exponents.
> > 	* manual/llio.texi: Likewise.
> > 	* manual/stdio.texi: Likewise.
> > 
> > diff --git a/manual/filesys.texi b/manual/filesys.texi
> > index 0f2e3dc..ed4f5fd 100644
> > --- a/manual/filesys.texi
> > +++ b/manual/filesys.texi
> > @@ -1834,7 +1834,7 @@ writing the file.  (This is unrelated to @code{st_blocks}.)
> >  @end deftp
> >  
> >  The extensions for the Large File Support (LFS) require, even on 32-bit
> > -machines, types which can handle file sizes up to @math{2^63}.
> > +machines, types which can handle file sizes up to @twoexp{63}.
> >  Therefore a new definition of @code{struct stat} is necessary.
> >  
> >  @comment sys/stat.h
> > @@ -2024,7 +2024,7 @@ replaces the normal implementation.
> >  @deftypefun int stat64 (const char *@var{filename}, struct stat64 *@var{buf})
> >  @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
> >  This function is similar to @code{stat} but it is also able to work on
> > -files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
> > +files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
> >  this the result is stored in a variable of type @code{struct stat64} to
> >  which @var{buf} must point.
> >  
> > @@ -2097,7 +2097,7 @@ replaces the normal implementation.
> >  @c Direct system call through lxstat64, sometimes with an xstat conv
> >  @c call afterwards.
> >  This function is similar to @code{lstat} but it is also able to work on
> > -files larger than @math{2^31} bytes on 32-bit systems.  To be able to do
> > +files larger than @twoexp{31} bytes on 32-bit systems.  To be able to do
> >  this the result is stored in a variable of type @code{struct stat64} to
> >  which @var{buf} must point.
> >  
> > @@ -3073,7 +3073,7 @@ systems do not support this feature and will leave the file unchanged.
> >  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
> >  @code{truncate} function is in fact @code{truncate64} and the type
> >  @code{off_t} has 64 bits which makes it possible to handle files up to
> > -@math{2^63} bytes in length.
> > +@twoexp{63} bytes in length.
> >  
> >  The return value is @math{0} for success, or @math{-1} for an error.  In
> >  addition to the usual file name errors, the following errors may occur:
> > @@ -3110,7 +3110,7 @@ The operation was interrupted by a signal.
> >  This function is similar to the @code{truncate} function.  The
> >  difference is that the @var{length} argument is 64 bits wide even on 32
> >  bits machines, which allows the handling of files with sizes up to
> > -@math{2^63} bytes.
> > +@twoexp{63} bytes.
> >  
> >  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
> >  32 bits machine this function is actually available under the name
> > @@ -3144,7 +3144,7 @@ The example below shows how this works.
> >  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
> >  @code{ftruncate} function is in fact @code{ftruncate64} and the type
> >  @code{off_t} has 64 bits which makes it possible to handle files up to
> > -@math{2^63} bytes in length.
> > +@twoexp{63} bytes in length.
> >  
> >  The return value is @math{0} for success, or @math{-1} for an error.  The
> >  following errors may occur:
> > @@ -3190,7 +3190,7 @@ The operation was interrupted by a signal.
> >  This function is similar to the @code{ftruncate} function.  The
> >  difference is that the @var{length} argument is 64 bits wide even on 32
> >  bits machines which allows the handling of files with sizes up to
> > -@math{2^63} bytes.
> > +@twoexp{63} bytes.
> >  
> >  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} on a
> >  32 bits machine this function is actually available under the name
> > @@ -3430,7 +3430,7 @@ interface transparently replaces the old interface.
> >  @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
> >  This function is similar to @code{tmpfile}, but the stream it returns a
> >  pointer to was opened using @code{tmpfile64}.  Therefore this stream can
> > -be used for files larger than @math{2^31} bytes on 32-bit machines.
> > +be used for files larger than @twoexp{31} bytes on 32-bit machines.
> >  
> >  Please note that the return type is still @code{FILE *}.  There is no
> >  special @code{FILE} type for the LFS interface.
> > diff --git a/manual/llio.texi b/manual/llio.texi
> > index 4f3fada..019dea2 100644
> > --- a/manual/llio.texi
> > +++ b/manual/llio.texi
> > @@ -150,8 +150,8 @@ or @code{O_CREAT} is set and the file does not already exist.
> >  If on a 32 bit machine the sources are translated with
> >  @code{_FILE_OFFSET_BITS == 64} the function @code{open} returns a file
> >  descriptor opened in the large file mode which enables the file handling
> > -functions to use files up to @math{2^63} bytes in size and offset from
> > -@math{-2^63} to @math{2^63}.  This happens transparently for the user
> > +functions to use files up to @twoexp{63} bytes in size and offset from
> > +@minus{}@twoexp{63} to @twoexp{63}.  This happens transparently for the user
> >  since all of the lowlevel file handling functions are equally replaced.
> >  
> >  This function is a cancellation point in multi-threaded programs.  This
> > @@ -201,8 +201,8 @@ open (@var{filename}, O_WRONLY | O_CREAT | O_TRUNC, @var{mode})
> >  If on a 32 bit machine the sources are translated with
> >  @code{_FILE_OFFSET_BITS == 64} the function @code{creat} returns a file
> >  descriptor opened in the large file mode which enables the file handling
> > -functions to use files up to @math{2^63} in size and offset from
> > -@math{-2^63} to @math{2^63}.  This happens transparently for the user
> > +functions to use files up to @twoexp{63} in size and offset from
> > +@minus{}@twoexp{63} to @twoexp{63}.  This happens transparently for the user
> >  since all of the lowlevel file handling functions are equally replaced.
> >  @end deftypefn
> >  
> > @@ -422,7 +422,7 @@ not affected by the operation.  The value is the same as before the call.
> >  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
> >  @code{pread} function is in fact @code{pread64} and the type
> >  @code{off_t} has 64 bits, which makes it possible to handle files up to
> > -@math{2^63} bytes in length.
> > +@twoexp{63} bytes in length.
> >  
> >  The return value of @code{pread} describes the number of bytes read.
> >  In the error case it returns @math{-1} like @code{read} does and the
> > @@ -451,7 +451,7 @@ version 2.
> >  This function is similar to the @code{pread} function.  The difference
> >  is that the @var{offset} parameter is of type @code{off64_t} instead of
> >  @code{off_t} which makes it possible on 32 bit machines to address
> > -files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> > +files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
> >  file descriptor @code{filedes} must be opened using @code{open64} since
> >  otherwise the large offsets possible with @code{off64_t} will lead to
> >  errors with a descriptor in small file mode.
> > @@ -623,7 +623,7 @@ not affected by the operation.  The value is the same as before the call.
> >  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
> >  @code{pwrite} function is in fact @code{pwrite64} and the type
> >  @code{off_t} has 64 bits, which makes it possible to handle files up to
> > -@math{2^63} bytes in length.
> > +@twoexp{63} bytes in length.
> >  
> >  The return value of @code{pwrite} describes the number of written bytes.
> >  In the error case it returns @math{-1} like @code{write} does and the
> > @@ -652,7 +652,7 @@ version 2.
> >  This function is similar to the @code{pwrite} function.  The difference
> >  is that the @var{offset} parameter is of type @code{off64_t} instead of
> >  @code{off_t} which makes it possible on 32 bit machines to address
> > -files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> > +files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
> >  file descriptor @code{filedes} must be opened using @code{open64} since
> >  otherwise the large offsets possible with @code{off64_t} will lead to
> >  errors with a descriptor in small file mode.
> > @@ -752,7 +752,7 @@ only for pipes and FIFOs, but on @gnusystems{}, you always get
> >  When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the
> >  @code{lseek} function is in fact @code{lseek64} and the type
> >  @code{off_t} has 64 bits which makes it possible to handle files up to
> > -@math{2^63} bytes in length.
> > +@twoexp{63} bytes in length.
> >  
> >  This function is a cancellation point in multi-threaded programs.  This
> >  is a problem if the thread allocates some resources (like memory, file
> > @@ -775,7 +775,7 @@ descriptors.
> >  This function is similar to the @code{lseek} function.  The difference
> >  is that the @var{offset} parameter is of type @code{off64_t} instead of
> >  @code{off_t} which makes it possible on 32 bit machines to address
> > -files larger than @math{2^31} bytes and up to @math{2^63} bytes.  The
> > +files larger than @twoexp{31} bytes and up to @twoexp{63} bytes.  The
> >  file descriptor @code{filedes} must be opened using @code{open64} since
> >  otherwise the large offsets possible with @code{off64_t} will lead to
> >  errors with a descriptor in small file mode.
> > @@ -848,7 +848,7 @@ is transparently replaced by @code{off64_t}.
> >  This type is used similar to @code{off_t}.  The difference is that even
> >  on 32 bit machines, where the @code{off_t} type would have 32 bits,
> >  @code{off64_t} has 64 bits and so is able to address files up to
> > -@math{2^63} bytes in length.
> > +@twoexp{63} bytes in length.
> >  
> >  When compiling with @code{_FILE_OFFSET_BITS == 64} this type is
> >  available under the name @code{off_t}.
> > diff --git a/manual/macros.texi b/manual/macros.texi
> > index f32c86d..9cf8031 100644
> > --- a/manual/macros.texi
> > +++ b/manual/macros.texi
> > @@ -256,4 +256,15 @@ cwd\comments\
> >  !posix\comments\
> >  @end macro
> >  
> > +@iftex
> > +@macro twoexp{exp}
> > +@math{2^{{\exp\}}}
> > +@end macro
> > +@end iftex
> > +@ifnottex
> > +@macro twoexp{exp}
> > +2^\exp\
> > +@end macro
> > +@end ifnottex
> > +
> >  @end ifclear
> > diff --git a/manual/stdio.texi b/manual/stdio.texi
> > index e407170..5d31774 100644
> > --- a/manual/stdio.texi
> > +++ b/manual/stdio.texi
> > @@ -270,7 +270,7 @@ Locks}.
> >  @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@acsmem{} @acsfd{} @aculock{}}}
> >  This function is similar to @code{fopen} but the stream it returns a
> >  pointer for is opened using @code{open64}.  Therefore this stream can be
> > -used even on files larger than @math{2^31} bytes on 32 bit machines.
> > +used even on files larger than @twoexp{31} bytes on 32 bit machines.
> >  
> >  Please note that the return type is still @code{FILE *}.  There is no
> >  special @code{FILE} type for the LFS interface.
> > @@ -336,7 +336,7 @@ interface replaces transparently the old interface.
> >  @safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{} @acsfd{}}}
> >  This function is similar to @code{freopen}.  The only difference is that
> >  on 32 bit machine the stream returned is able to read beyond the
> > -@math{2^31} bytes limits imposed by the normal interface.  It should be
> > +@twoexp{31} bytes limits imposed by the normal interface.  It should be
> >  noted that the stream pointed to by @var{stream} need not be opened
> >  using @code{fopen64} or @code{freopen64} since its mode is not important
> >  for this function.
> > @@ -4412,7 +4412,7 @@ This function is similar to @code{ftello} with the only difference that
> >  the return value is of type @code{off64_t}.  This also requires that the
> >  stream @var{stream} was opened using either @code{fopen64},
> >  @code{freopen64}, or @code{tmpfile64} since otherwise the underlying
> > -file operations to position the file pointer beyond the @math{2^31}
> > +file operations to position the file pointer beyond the @twoexp{31}
> >  bytes limit might fail.
> >  
> >  If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
> > @@ -4473,7 +4473,7 @@ the @var{offset} parameter is of type @code{off64_t}.  This also
> >  requires that the stream @var{stream} was opened using either
> >  @code{fopen64}, @code{freopen64}, or @code{tmpfile64} since otherwise
> >  the underlying file operations to position the file pointer beyond the
> > -@math{2^31} bytes limit might fail.
> > +@twoexp{31} bytes limit might fail.
> >  
> >  If the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a 32
> >  bits machine this function is available under the name @code{fseeko}
> 
> -- 
> 
> Change your language to Finnish.

-- 

boss forgot system password

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PING^2][PATCH v4][BZ #17787] Fix exponents in manual.
  2015-08-19  6:33                       ` [PING^2][PATCH " Ondřej Bílka
@ 2015-08-19 12:57                         ` Joseph Myers
  0 siblings, 0 replies; 20+ messages in thread
From: Joseph Myers @ 2015-08-19 12:57 UTC (permalink / raw)
  To: Ondřej Bílka; +Cc: Carlos O'Donell, Andreas Schwab, libc-alpha

This patch is OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-08-19 12:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05 12:11 [PATCH][BZ #17787] Fix exponents in manual Ondřej Bílka
2015-01-05 14:15 ` Andreas Schwab
2015-01-06 11:57   ` Ondřej Bílka
2015-01-06 14:20     ` Andreas Schwab
2015-01-06 18:02       ` Ondřej Bílka
2015-01-06 18:09         ` Andreas Schwab
2015-01-06 21:32           ` Ondřej Bílka
2015-06-16 19:28     ` [PING][PATCH][BZ " Ondřej Bílka
2015-06-16 19:54       ` Carlos O'Donell
2015-06-16 20:24       ` Joseph Myers
2015-06-16 21:42         ` Carlos O'Donell
2015-06-18 15:26           ` [PATCH v3][BZ " Ondřej Bílka
2015-06-18 15:50             ` Joseph Myers
2015-06-18 16:05               ` Carlos O'Donell
2015-06-18 16:20                 ` Joseph Myers
2015-07-12  9:33                   ` [PATCH v4][BZ " Ondřej Bílka
2015-08-12 20:26                     ` [PING][PATCH " Ondřej Bílka
2015-08-19  6:33                       ` [PING^2][PATCH " Ondřej Bílka
2015-08-19 12:57                         ` Joseph Myers
2015-06-18 15:54             ` [PATCH v3][BZ " Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).