aboutsummaryrefslogtreecommitdiffstats
path: root/cppawk.1
diff options
context:
space:
mode:
Diffstat (limited to 'cppawk.1')
-rw-r--r--cppawk.165
1 files changed, 64 insertions, 1 deletions
diff --git a/cppawk.1 b/cppawk.1
index 3416fc4..33627e6 100644
--- a/cppawk.1
+++ b/cppawk.1
@@ -110,6 +110,69 @@ is then invoked on this file. The file is deleted when
.I awk
terminates.
+.IP "\fB\-E\fR \fIfilename\fR"
+The
+.B -E
+option is inspired by that of GNU Awk;
+.B cppawk
+implements a form of this option itself, for all Awk back-ends,
+and does not pass it through to GNU Awk.
+This option combines the semantics of the
+.B -f
+and
+.B --
+options. Arrangements are made for the awk program to be read from
+a file exactly as described above for the
+.B -f
+option. Then, no more options are processed. Any remaining option-like
+arguments are ordinary arguments.
+
+Note that unlike GNU Awk's
+.B -E
+options,
+.BR cppawk 's
+.B -E
+option doesn't suppress the processing of arguments which look like
+variable assignments.
+
+Instead, the program may specify the following preprocessing directive, outside
+of any Awk block or function:
+
+.ft B
+ #include <safearg.h>
+.ft R
+
+this directive produces a
+.B BEGIN
+clause which prepares an associate array named
+.B argv
+that contains the same key/value pairs as the standard
+.BR ARGV .
+The
+.B ARGV
+array is then deleted. Consequently, Awk will not process
+and perform the command line variable assignments, which normally
+occurs after the
+.B BEGIN
+clauses are processed.
+The effects of
+.B "<safearg.h>" are not visible to
+.B BEGIN
+clauses which are placed earlier than the inclusion of
+.BR "<safearg.h>" .
+Those earlier clauses have access to the original
+.B ARGV
+array.
+
+However, the combination of
+.B -E
+option and
+.B "<safearg.h>"
+is still not equivalent to GNU Awk's
+.B -E
+option, because no filename arguments are available for implicit
+use in the Awk pattern processing loop.
+
.IP "\fB--nobash\fR"
Pretend that the shell which executes
.I cppawk
@@ -148,7 +211,7 @@ message and failed termination. The intent is that the
family of options that are supported by GNU cpp are not supported by
.IR cppawk .
-.IP "\fB-F\fR, \fB-v\fR, \fB-E\fR, \fB-i\fR, \fB-l\fR, \fB-L\fR"
+.IP "\fB-F\fR, \fB-v\fR, \fB-i\fR, \fB-l\fR, \fB-L\fR"
These standard and GNU Awk options are recognized by
.I cppawk
as requiring an argument. They are validated for the presence of the