aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawktexi.in
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-24 22:10:37 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-03-24 22:10:37 +0200
commit02856054ac25477e5913bdee1632d8cb11a184cd (patch)
treec7ea1797786c7ab052890cadfff9598c556d4da8 /doc/gawktexi.in
parent59514868fde1190f719e78d4c4b91bd14a321541 (diff)
parent981e106b111672aac520fbb397ee82c64f3c4f2a (diff)
downloadegawk-02856054ac25477e5913bdee1632d8cb11a184cd.tar.gz
egawk-02856054ac25477e5913bdee1632d8cb11a184cd.tar.bz2
egawk-02856054ac25477e5913bdee1632d8cb11a184cd.zip
Merge branch 'gawk-4.1-stable' into feature/fix-indirect-call
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r--doc/gawktexi.in22
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index 08a9f7c3..cf669976 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -14284,7 +14284,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"]
@@ -14336,7 +14336,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
@@ -34208,6 +34208,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