diff options
author | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-05-07 17:55:42 +0000 |
---|---|---|
committer | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-05-07 17:55:42 +0000 |
commit | cf56e76be90d3541155b4d5fea4c335701f1de3a (patch) | |
tree | a9108ed6903c08b1d6d62590849e9b8d2196324e /tools/make-dissector-reg | |
parent | a38b44a6470d1e92b1bd0cb396d096675e5d2392 (diff) |
Updated splash screen for Wireshark that shows the initialisation progress.
The splash screen shows a progress bar and a percentage complete - like the progress dialog.
As dissectors are initialised and handed off the name is shown. However, the names of plugin dissectors are not shown.
The update to the make-dissector-reg shell script has been tested, though I think generally the python version is used.
svn path=/trunk/; revision=21716
Diffstat (limited to 'tools/make-dissector-reg')
-rwxr-xr-x | tools/make-dissector-reg | 71 |
1 files changed, 62 insertions, 9 deletions
diff --git a/tools/make-dissector-reg b/tools/make-dissector-reg index d4c6739777..6bf9a28adf 100755 --- a/tools/make-dissector-reg +++ b/tools/make-dissector-reg @@ -54,15 +54,36 @@ G_MODULE_EXPORT void plugin_register (void) { EOF +# +# Build code to call all the protocol registration routines. +# +for f in "$@" +do + if [ -f $f ] + then + srcfile=$f + else + srcfile=$srcdir/$f + fi + grep '^proto_register_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';' +done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp +for f in "$@" +do + if [ -f $f ] + then + srcfile=$f + else + srcfile=$srcdir/$f + fi + grep '^void proto_register_[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 else cat <<"EOF" >>${outfile}-tmp #include "register.h" void -register_all_protocols(void) +register_all_protocols(register_cb cb, gpointer client_data) { EOF -fi - # # Build code to call all the protocol registration routines. # @@ -75,7 +96,7 @@ do srcfile=$srcdir/$f fi grep '^proto_register_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';' -done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp +done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_REGISTER, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp for f in "$@" do if [ -f $f ] @@ -85,9 +106,12 @@ do srcfile=$srcdir/$f fi grep '^void proto_register_[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 +done | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_REGISTER, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp + +fi echo '}' >>${outfile}-tmp + # # Build code to call all the protocol handoff registration routines. # @@ -98,13 +122,32 @@ G_MODULE_EXPORT void plugin_reg_handoff(void) { EOF +for f in "$@" +do + if [ -f $f ] + then + srcfile=$f + else + srcfile=$srcdir/$f + fi + grep '^proto_reg_handoff_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';' +done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp +for f in "$@" +do + if [ -f $f ] + then + srcfile=$f + else + srcfile=$srcdir/$f + fi + 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 else cat <<"EOF" >>${outfile}-tmp void -register_all_protocol_handoffs(void) +register_all_protocol_handoffs(register_cb cb, gpointer client_data) { EOF -fi for f in "$@" do if [ -f $f ] @@ -114,7 +157,7 @@ do srcfile=$srcdir/$f fi grep '^proto_reg_handoff_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';' -done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); \1 ();}/' >>${outfile}-tmp +done | sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_HANDOFF, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp for f in "$@" do if [ -f $f ] @@ -124,10 +167,20 @@ do srcfile=$srcdir/$f fi 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 +done | sed -e 's/^.*://' -e 's/^void \([a-z_0-9A-Z]*\).*/ {extern void \1 (void); if(cb) (*cb)(RA_HANDOFF, \"\1\", client_data); \1 ();}/' >>${outfile}-tmp +fi echo '}' >>${outfile}-tmp if [ "$registertype" = plugin ] then echo '#endif' >>${outfile}-tmp +else + cat <<"EOF" >>${outfile}-tmp +gulong register_count(void) +{ +EOF + proto_regs=`grep RA_REGISTER ${outfile}-tmp | wc -l` + handoff_regs=`grep RA_HANDOFF ${outfile}-tmp | wc -l` + echo " return $proto_regs + $handoff_regs;" >>${outfile}-tmp + echo '}' >>${outfile}-tmp fi mv ${outfile}-tmp ${outfile} |