diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-24 22:17:26 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-24 22:17:26 +0200 |
commit | 0bb831721d3feeac20977e5a14be6b5bbf13e52a (patch) | |
tree | e335c38496b5cb46c8fed03a02ad7cfc1d0ed9b2 /doc/gawk.texi | |
parent | a31a42403b841ef05ca9143a431c8b6f1021a958 (diff) | |
parent | 56e848ab0b55cc98f206ab7e187ba8269f2e8e4c (diff) | |
download | egawk-0bb831721d3feeac20977e5a14be6b5bbf13e52a.tar.gz egawk-0bb831721d3feeac20977e5a14be6b5bbf13e52a.tar.bz2 egawk-0bb831721d3feeac20977e5a14be6b5bbf13e52a.zip |
Merge branch 'master' into select
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index 68d35876..ff730b21 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -15093,7 +15093,7 @@ while the program runs. The value of the @code{getgid()} system call. @item PROCINFO["pgrpid"] -@cindex process group idIDof @command{gawk} process +@cindex process group ID of @command{gawk} process The process group ID of the current process. @item PROCINFO["pid"] @@ -15145,7 +15145,7 @@ The version of the GNU MP library. The maximum precision supported by MPFR. @item PROCINFO["prec_min"] -@cindex minimum precision supported by MPFR library +@cindex minimum precision required by MPFR library The minimum precision required by MPFR. @end table @@ -35465,6 +35465,24 @@ Add functions to implement system calls such as @code{chown()}, @code{chmod()}, and @code{umask()} to the file operations extension presented in @ref{Internal File Ops}. +@c Idea from comp.lang.awk, February 2015 +@item +Write an input parser that prints a prompt if the input is +a from a ``terminal'' device. You can use the @code{isatty()} +function to tell if the input file is a terminal. (Hint: this function +is usually expensive to call; try to call it just once.) +The content of the prompt should come from a variable settable +by @command{awk}-level code. +You can write the prompt to stanard error. However, +for best results, open a new file descriptor (or file pointer) +on @file{/dev/tty} and print the prompt there, in case standard +error has been redirected. + +Why is standard error a better +choice than standard output for writing the prompt? +Which reading mechanism should you replace, the one to get +a record, or the one to read raw bytes? + @item (Hard.) How would you provide namespaces in @command{gawk}, so that the |