From b4463015b97912658d630377fafbf630f7588d1e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 21 May 2025 22:01:35 -0500 Subject: moving arch dotfiles into archsetup --- dotfiles/system/.zsh/modules/Src/signames1.awk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dotfiles/system/.zsh/modules/Src/signames1.awk (limited to 'dotfiles/system/.zsh/modules/Src/signames1.awk') diff --git a/dotfiles/system/.zsh/modules/Src/signames1.awk b/dotfiles/system/.zsh/modules/Src/signames1.awk new file mode 100644 index 0000000..27d21ac --- /dev/null +++ b/dotfiles/system/.zsh/modules/Src/signames1.awk @@ -0,0 +1,19 @@ +# This is an awk script which finds out what the possibilities for +# the signal 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 \n\n" } + +/^[\t ]*#[\t ]*define[\t _]*SIG[A-Z][A-Z0-9]*[\t ][\t ]*[^(\t ]/ { + sigindex = index($0, "SIG") + sigtail = substr($0, sigindex, 80) + split(sigtail, tmp) + signam = substr(tmp[1], 4, 20) + if (substr($0, sigindex-1, 1) == "_") + printf("XXNAMES XXSIG%s _SIG%s\n", signam, signam) + else + printf("XXNAMES XXSIG%s SIG%s\n", signam, signam) +} -- cgit v1.2.3