2000-04-26 04:10:09 -04:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
print "static PERL_SIGNAL_ARGS_REC perl_signal_args[] =\n{\n";
|
|
|
|
|
|
|
|
while (<STDIN>) {
|
|
|
|
chomp;
|
|
|
|
|
|
|
|
next if (!/^ "([^"]*)"(<.*>)?,\s*(.*)/);
|
|
|
|
next if (/\.\.\./);
|
|
|
|
next if (/\(/);
|
|
|
|
|
|
|
|
$signal = $1;
|
|
|
|
$_ = $3;
|
|
|
|
|
|
|
|
s/char \*[^,]*/string/g;
|
|
|
|
s/ulong \*[^,]*/ulongptr/g;
|
|
|
|
s/int[^,]*/int/g;
|
|
|
|
s/GSList of (\w+)s/gslist_\1/g;
|
|
|
|
|
2000-10-18 18:45:26 -04:00
|
|
|
# core
|
|
|
|
s/CHATNET_REC[^,]*/iobject/g;
|
2000-10-17 21:32:14 -04:00
|
|
|
s/SERVER_REC[^,]*/iobject/g;
|
|
|
|
s/RECONNECT_REC[^,]*/iobject/g;
|
|
|
|
s/CHANNEL_REC[^,]*/iobject/g;
|
|
|
|
s/QUERY_REC[^,]*/iobject/g;
|
2000-04-28 04:07:42 -04:00
|
|
|
s/COMMAND_REC[^,]*/Irssi::Command/g;
|
|
|
|
s/NICK_REC[^,]*/Irssi::Nick/g;
|
2000-10-18 18:45:26 -04:00
|
|
|
s/LOG_REC[^,]*/Irssi::Log/g;
|
|
|
|
s/RAWLOG_REC[^,]*/Irssi::Rawlog/g;
|
|
|
|
s/IGNORE_REC[^,]*/Irssi::Ignore/g;
|
|
|
|
s/MODULE_REC[^,]*/Irssi::Module/g;
|
|
|
|
|
|
|
|
# irc
|
2000-12-09 15:54:47 -05:00
|
|
|
s/BAN_REC[^,]*/Irssi::Irc::Ban/g;
|
|
|
|
s/NETSPLIT_REC[^,]*/Irssi::Irc::Netsplit/g;
|
|
|
|
s/NETSPLIT_SERVER_REC[^,]*/Irssi::Irc::Netsplitserver/g;
|
2000-10-18 18:45:26 -04:00
|
|
|
|
|
|
|
# irc modules
|
2000-12-09 15:54:47 -05:00
|
|
|
s/DCC_REC[^,]*/Irssi::Irc::Dcc/g;
|
|
|
|
s/AUTOIGNORE_REC[^,]*/Irssi::Irc::Autoignore/g;
|
|
|
|
s/NOTIFYLIST_REC[^,]*/Irssi::Irc::Notifylist/g;
|
2000-10-18 18:45:26 -04:00
|
|
|
|
|
|
|
# fe-common
|
|
|
|
s/THEME_REC[^,]*/Irssi::Theme/g;
|
|
|
|
s/KEYINFO_REC[^,]*/Irssi::Keyinfo/g;
|
2001-02-13 14:26:43 -05:00
|
|
|
s/PROCESS_REC[^,]*/Irssi::Process/g;
|
2000-04-28 04:07:42 -04:00
|
|
|
s/WINDOW_REC[^,]*/Irssi::Window/g;
|
2000-10-17 21:32:14 -04:00
|
|
|
s/WI_ITEM_REC[^,]*/iobject/g;
|
2000-04-26 04:10:09 -04:00
|
|
|
|
|
|
|
s/([\w:]+)(,|$)/"\1"\2/g;
|
2001-01-10 16:12:39 -05:00
|
|
|
print " { \"$signal\", { $_, NULL } },\n";
|
2000-04-26 04:10:09 -04:00
|
|
|
}
|
|
|
|
|
2001-01-10 16:12:39 -05:00
|
|
|
print "\n { NULL }\n};\n";
|