21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

284 <strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong>Appendix C Implementation NotesThis appendix contains information mainly of interest to implementors and maintainers ofgawk. Everything in it applies specifically to gawk and not to other implementations.C.1 Downward Compatibility and DebuggingSee Section A.5 [Extensions in gawk Not in POSIX awk], page 260, for a summary of theGNU extensions to the awk language and program. All of these features can be turned offby invoking gawk with the ‘--traditional’ option or with the ‘--posix’ option.If gawk is compiled for debugging with ‘-DDEBUG’, then there is one more option availableon the command line:-W parsedebug--parsedebugPrints out the parse stack information as the program is being parsed.This option is intended only for serious gawk developers and not for the casual user.It probably has not even been compiled into your version of gawk, since it slows downexecution.C.2 Making Additions to gawkIf you find that you want to enhance gawk in a significant fashion, you are perfectly free todo so. That is the point of having free software; the source code is available and you arefree to change it as you want (see [GNU General Public License], page 316).This section discusses the ways you might want to change gawk as well as any considerationsyou should bear in mind.C.2.1 Adding New FeaturesYou are free to add any new features you like to gawk. However, if you want your changesto be incorporated into the gawk distribution, there are several steps that you need to takein order to make it possible for me to include your changes:1. Before building the new feature into gawk itself, consider writing it as an extensionmodule (see Section C.3 [Adding New Built-in Functions to gawk], page 287). If that’snot possible, continue with the rest of the steps in this list.2. Get the latest version. It is much easier for me to integrate changes if they are relativeto the most recent distributed version of gawk. If your version of gawk is very old, I maynot be able to integrate them at all. (See Section B.1.1 [Getting the gawk Distribution],page 265, for information on getting the latest version of gawk.)3. Follow the GNU Coding Standards. This document describes how GNU software shouldbe written. If you haven’t read it, please do so, preferably before starting to modifygawk. (The GNU Coding Standards are available from the GNU Project’s ftp site, atftp://ftp.gnu.org/gnu/GNUinfo/standards.text. An HTML version, suitable forreading with a WWW browser, is available at http://www.gnu.org/prep/standards_toc.html. Texinfo, Info, and DVI versions are also available.)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!