summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-05 09:38:08 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-05 09:38:08 +0000
commit1dc07c42bd2f8977181671fd5bb75bd00ac52bfa (patch)
treee4823a5f8f17f77d6ba78b22c97e47b3e6ff37c2
parent19d111eff42e2a2d8424383994e9962f611fd912 (diff)
downloadirssi-1dc07c42bd2f8977181671fd5bb75bd00ac52bfa.zip
docs generator updates
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1074 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rwxr-xr-xautogen.sh6
-rw-r--r--docs/help/Makefile.am.gen4
-rw-r--r--docs/help/in/Makefile.am.gen4
-rw-r--r--docs/signals.txt2
-rwxr-xr-xfindsyntax.pl8
-rwxr-xr-xsyntax.pl18
6 files changed, 33 insertions, 9 deletions
diff --git a/autogen.sh b/autogen.sh
index 7600e24a..b9673927 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -24,11 +24,11 @@ find src -name '*.c'|grep -v 'src/perl/.*/' > po/POTFILES.in
# create help files
perl syntax.pl
-files=`echo docs/help/in/*.in|sed -e 's/docs\/help\/in\///g' -e 's/Makefile.in //'`
-cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g" > docs/help/in/Makefile.am
+files=`echo docs/help/in/*.in|sed -e 's,docs/help/in/Makefile.in ,,' -e 's,docs/help/in/,!,g' -e 's/\.in /.in ?/g'`
+cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '\!?' '\t\n' > docs/help/in/Makefile.am
files=`echo $files|sed 's/\.in//g'`
-cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g" > docs/help/Makefile.am
+cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '\!?' '\t\n' > docs/help/Makefile.am
# *********** a bit modified GNOME's macros/autogen.sh **********
diff --git a/docs/help/Makefile.am.gen b/docs/help/Makefile.am.gen
index 41d5bbe0..abf824b4 100644
--- a/docs/help/Makefile.am.gen
+++ b/docs/help/Makefile.am.gen
@@ -1,7 +1,9 @@
+# Makefile.am is autogenerated by autogen.sh from Makefile.am.gen
+
helpdir = $(datadir)/irssi/help
help_DATA = \
- @HELPFILES@
+@HELPFILES@
EXTRA_DIST = \
Makefile.am.gen \
diff --git a/docs/help/in/Makefile.am.gen b/docs/help/in/Makefile.am.gen
index 4bdc64ea..9b0f2aaa 100644
--- a/docs/help/in/Makefile.am.gen
+++ b/docs/help/in/Makefile.am.gen
@@ -1,3 +1,5 @@
+# Makefile.am is autogenerated by autogen.sh from Makefile.am.gen
+
EXTRA_DIST = \
Makefile.am.gen \
- @HELPFILES@
+@HELPFILES@
diff --git a/docs/signals.txt b/docs/signals.txt
index 35e5682e..7aea8658 100644
--- a/docs/signals.txt
+++ b/docs/signals.txt
@@ -178,7 +178,7 @@ dcc*.c:
"dcc connected", DCC_REC
"dcc rejecting", DCC_REC
"dcc closed", DCC_REC
- "dcc request", DCC_REC
+ "dcc request", DCC_REC, char *sendaddr
"dcc chat message", DCC_REC, char *msg
"dcc transfer update", DCC_REC
"dcc get receive", DCC_REC
diff --git a/findsyntax.pl b/findsyntax.pl
index 5389302c..e24d50f0 100755
--- a/findsyntax.pl
+++ b/findsyntax.pl
@@ -2,8 +2,12 @@
while(<>) {
if(m!/\*.SYNTAX\:! || $tt) {
- s!^\s+! !;
- if (m#\*/#) {
+ s/^\s+/ /;
+ if (/^ [A-Z]+/) {
+ print "\n";
+ s/^ //;
+ }
+ if (m!\*/!) {
$tt=0;
} else {
$tt=1;
diff --git a/syntax.pl b/syntax.pl
index 7760457b..0694ea22 100755
--- a/syntax.pl
+++ b/syntax.pl
@@ -12,20 +12,36 @@ $SRC_PATH='src';
$FOO = `find src -name '*.c' -exec ./findsyntax.pl \{\} \\; | sed 's/.*SYNTAX: //' > irssi_syntax`;
-
while (<docs/help/in/*.in>) {
+ next if (/Makefile/);
+
open (FILE, "$_");
@data = <FILE>;
close (FILE);
+ $count = 0;
foreach $DATARIVI (@data) {
if ($DATARIVI =~ /\@SYNTAX\:(.+)\@/) {
$etsittava = "\U$1 ";
$SYNTAX = `grep \'^$etsittava\' irssi_syntax`;
$SYNTAX =~ s/\*\///g;
$SYNTAX =~ s/ *$//; $SYNTAX =~ s/ *\n/\n/g;
+
+ # add %| after "COMMAND SUB " so parameters will indent correctly
+ $SYNTAX =~ s/^([A-Z ]+)/\1%|/;
+ $SYNTAX =~ s/(\n[A-Z ]+)/\1%|/g;
+ # no need for this if there's no parameters
+ $SYNTAX =~ s/%\|$//;
$DATARIVI = $SYNTAX;
+ } elsif ($DATARIVI =~ /^\S+/) {
+ chomp $DATARIVI if ($data[$count+1] =~ /^\S+/);
}
+ $count++;
}
+
+ # must always end with empty line
+ push @data, "\n" if ($data[@data-1] ne "\n");
+ push @data, "\n" if ($data[@data-2] !~ /\n$/);
+
$newfilename = $_; $newfilename =~ s/\.in$//;
$newfilename =~ s/\/in\//\//;
open (NEWFILE, ">$newfilename");