diff options
| author | Christopher Davis <loafier@gmail.com> | 2006-08-12 22:16:53 +0000 |
|---|---|---|
| committer | Christopher Davis <loafier@gmail.com> | 2006-08-12 22:16:53 +0000 |
| commit | 3a028090359e5d5d24ccbfc11d9b6ff5681aab4f (patch) | |
| tree | 0cfb8ec1eb8a49366fc663bef00bf4dfb1f7c307 /sig2code.awk | |
| parent | f13ea25509e932d426ebd69d90368fe9b1d4c1ab (diff) | |
| download | irssi-python-3a028090359e5d5d24ccbfc11d9b6ff5681aab4f.tar.gz irssi-python-3a028090359e5d5d24ccbfc11d9b6ff5681aab4f.tar.xz irssi-python-3a028090359e5d5d24ccbfc11d9b6ff5681aab4f.zip | |
directory structure change
git-svn-id: http://svn.irssi.org/repos/irssi-python@4312 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'sig2code.awk')
| -rw-r--r-- | sig2code.awk | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/sig2code.awk b/sig2code.awk deleted file mode 100644 index d6bdb0d..0000000 --- a/sig2code.awk +++ /dev/null @@ -1,61 +0,0 @@ -BEGIN { - FS = "[ \t]*->[ \t]*"; - - #read in codes - while (getline < "sig2code.txt") - { - sub(/^[ \t]*/, ""); - if (NF < 2) - continue; - - #print $1, $2 - sigmap[$2] = $1 - } - - close("sig2code.txt"); - - FS = "[ \t]*,[ \t]*"; - - print "/* Include in your C module */"; - print "static PY_SIGNAL_SPEC_REC py_sigmap[] = {"; -} - -function match_type(t) -{ - for (type in sigmap) - { - if (index(t, type) != 0) - return sigmap[type]; - } - - return "?"; -} - -$1 ~ /^[ \t]*"/ && $1 !~ /"script error"/ { - sub(/^[ \t]*/, ""); - - signal = $1 - if (signal ~ /.*<cmd>$/) - { - varsig = 1; - sub(/<cmd>/, "", signal); - } - else - varsig = 0; - - args = ""; - for (i = 2; i <= NF; i++) - { - args = args""match_type($i); - } - - printf(" {%s, \"%s\", 0, 0, %d},\n", signal, args, varsig); -} - -END { - print " {NULL}" ; - print "};"; - print ""; - print "#define py_sigmap_len() (sizeof(py_sigmap) / sizeof(py_sigmap[0]) - 1)"; -} - |
