You should read the discussion about adding code in the gawk
documentation.
See the section Making Additions to gawk
, in the online documentation
for a discussion of the general procedure. In particular, pay attention to the
coding style guidelines in
the section Adding New Features, also in the online documentation.