From 3a028090359e5d5d24ccbfc11d9b6ff5681aab4f Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Sat, 12 Aug 2006 22:16:53 +0000 Subject: directory structure change git-svn-id: http://svn.irssi.org/repos/irssi-python@4312 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- sig2code.awk | 61 ------------------------------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 sig2code.awk (limited to 'sig2code.awk') 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 ~ /.*$/) - { - varsig = 1; - sub(//, "", 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)"; -} - -- cgit