diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-08-30 19:06:06 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-08-30 19:06:06 +0000 |
commit | c9c5f9da9366d1587c588507433cec35ef243579 (patch) | |
tree | 99d69de0866c36adf40dc516c8ab3ab64ad480ce /Src/Modules/errnames1.awk | |
parent | c016b2dcdc7faade5b279c279b2d506b9ea22bf7 (diff) | |
download | zsh-c9c5f9da9366d1587c588507433cec35ef243579.tar.gz zsh-c9c5f9da9366d1587c588507433cec35ef243579.tar.xz zsh-c9c5f9da9366d1587c588507433cec35ef243579.zip |
18980: new zsh/system module
Diffstat (limited to 'Src/Modules/errnames1.awk')
-rw-r--r-- | Src/Modules/errnames1.awk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Src/Modules/errnames1.awk b/Src/Modules/errnames1.awk new file mode 100644 index 000000000..5c41197cb --- /dev/null +++ b/Src/Modules/errnames1.awk @@ -0,0 +1,18 @@ +# Edited version of Src/signames1.awk. +# +# This is an awk script which finds out what the possibilities for +# the error names are, and dumps them out so that cpp can turn them +# into numbers. Since we don't need to decide here what the +# real signals are, we can afford to be generous about definitions, +# in case the definitions are in terms of other definitions. +# However, we need to avoid definitions with parentheses, which will +# mess up the syntax. +BEGIN { printf "#include <errno.h>\n\n" } + +/^[\t ]*#[\t ]*define[\t ]*E[A-Z0-9]*[\t ][\t ]*[^(\t ]/ { + eindex = index($0, "E") + etail = substr($0, eindex, 80) + split(etail, tmp) + enam = substr(tmp[1], 2, 20) + printf("XXNAMES XXE%s E%s\n", enam, enam) +} |