summaryrefslogtreecommitdiff
path: root/src/perl
diff options
context:
space:
mode:
Diffstat (limited to 'src/perl')
-rwxr-xr-xsrc/perl/get-signals.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/perl/get-signals.pl b/src/perl/get-signals.pl
index 1a686edd..1f410dad 100755
--- a/src/perl/get-signals.pl
+++ b/src/perl/get-signals.pl
@@ -9,7 +9,7 @@ print "static PERL_SIGNAL_ARGS_REC perl_signal_args[] =\n{\n";
while (<STDIN>) {
chomp;
- next if (!/^ "([^"]*)"(<.*>)?,\s*(.*)/);
+ next if (!/^ "([^"]*)"(<.*>)?(?:,\s*(.*))?/);
next if (/\.\.\./);
next if (/\(/);
@@ -60,7 +60,11 @@ while (<STDIN>) {
s/PERL_SCRIPT_REC[^,]*/Irssi::Script/g;
s/([\w\*:]+)(,|$)/"\1"\2/g;
- print " { \"$signal\", { $_, NULL } },\n";
+ if ($_ eq "") {
+ print " { \"$signal\", { NULL } },\n";
+ } else {
+ print " { \"$signal\", { $_, NULL } },\n";
+ }
}
print "\n { NULL }\n};\n";