Home
Name Modified Size InfoDownloads / Week
gawkbug 2022-12-29
README.txt 2023-01-06 2.4 kB
alt_getopt.awk 2023-01-06 4.4 kB
isPOSIX.awk 2023-01-06 1.3 kB
COPYING.txt 2022-12-29 35.8 kB
Totals: 5 Items   44.0 kB 0
gawk apps library -- Library of GNU Awk functions useful for porting or
developing gawk apps for the MS-Windows environment. 

GNU Awk (gawk) Version 5+ allows writing awk code that takes the operating
system / platform into account. Some gawk scripts have to be ported from the
free OSes in order to function under MS-Windows. The library is also intended
to be a useful model for developing multi-platform gawk applications. 

ALL scripts and library functions are free software (GPL v3) that is intended
to work specifically with the GNU version of awk. The common URL dependency is
to https://www.gnu.org/software/gawk/manual/.

Here is a short description of the contents of this collection:

gawkbug

   gawkbug: gawkbug.awk is a port of the GNU Awk 5.2 gawkbug.in bash script to
   execute in the MS-Windows environment. Gawkbug is used to report bugs to
   the Gawk maintainers for "when Gawk doesn't behave like you'd like, or
   expect." Email defaults to bug-gawk@gnu.org. The gawkbug report complies
   with `Reporting Problems and Bugs' in the User’s Guide for GNU Awk. This
   same information may be found at
       https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.  

isPOSIX()

   isPOSIX() reports the mode in which Gawk is currently running.
   Returns boolean 1 == "Posix" mode; 0 == Gawk specific mode.
   "Posix" is generic for "compatability" modes --traditional or --posix that
   disable GNU awk extensions and specific features.

   isPOSIX() may be useful to gracefully exit a program before a fatal
   execution error. Also, similar to #IFDEF, some differences in more
   may excute different code: if(isPOSIX()) { do something } else { ... }
   For example, in posix mode, the file "/dev/stderr" is not special.

alt_getopt()

   proposed changes to getopt() to print to stderr in either --posix mode OR
      gawk mode on mingw(win32) or unix.)
   When run in --posix mode, getopt() has a fatal error:

   gawk: getopt.awk:42: fatal: cannot redirect to `/dev/stderr': No such file
       or directory

   My "portable" solution is a small change to the code and
      add two small functions, printerr(str) and isPOSIX(). The main code is
      a copy of the GNU awk library function distribution with my proposed
      changes clearly shown. Any copyright of my contibuted code or writing
      is copyright FSF and they have the signed paperwork.

#  2023_0106


Source: README.txt, updated 2023-01-06