aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-04-19 10:21:55 +0000
committerGuy Harris <guy@alum.mit.edu>2006-04-19 10:21:55 +0000
commit5dda39524229dcd771a83a37b68df4bc224fbc94 (patch)
tree3ffbe205ce26d938688ac3455e5a4d101ec068e1 /tools
parent0c873b006a429833220602791e7d6be72b4d5977 (diff)
Fix bugs in the previous checkin.
svn path=/trunk/; revision=17905
Diffstat (limited to 'tools')
-rwxr-xr-xtools/make-reg-dotc6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/make-reg-dotc b/tools/make-reg-dotc
index b1b57e0ce2..19706dada5 100755
--- a/tools/make-reg-dotc
+++ b/tools/make-reg-dotc
@@ -21,6 +21,7 @@ if [ "$registertype" = plugin ]
then
outfile="plugin.c"
elif [ "$registertype" = dissectors ]
+then
outfile="register.c"
else
echo "Unknown output type '$registertype'" 1>&2
@@ -104,6 +105,7 @@ void
register_all_protocol_handoffs(void)
{
EOF
+fi
for f in "$@"
do
if [ -f $f ]
@@ -125,4 +127,8 @@ do
grep '^void proto_reg_handoff_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';'
done | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp
echo '}' >>${outfile}-tmp
+if [ "$registertype" = plugin ]
+then
+ echo '#endif' >>${outfile}-tmp
+fi
mv ${outfile}-tmp ${outfile}