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.py | |
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.py')
-rw-r--r-- | tools/make-dissector-reg.py | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/tools/make-dissector-reg.py b/tools/make-dissector-reg.py index 0b9776b42b..f9745bb384 100644 --- a/tools/make-dissector-reg.py +++ b/tools/make-dissector-reg.py @@ -169,12 +169,15 @@ else: reg_code.write(""" #include "register.h" void -register_all_protocols(void) +register_all_protocols(register_cb cb, gpointer client_data) { """); for symbol in regs['proto_reg']: - line = " {extern void %s (void); %s ();}\n" % (symbol, symbol) + if registertype == "plugin": + line = " {extern void %s (void); %s ();}\n" % (symbol, symbol) + else: + line = " {extern void %s (void); if(cb) (*cb)(RA_REGISTER, \"%s\", client_data); %s ();}\n" % (symbol, symbol, symbol) reg_code.write(line) reg_code.write("}\n") @@ -190,18 +193,34 @@ plugin_reg_handoff(void) else: reg_code.write(""" void -register_all_protocol_handoffs(void) +register_all_protocol_handoffs(register_cb cb, gpointer client_data) { """); for symbol in regs['handoff_reg']: - line = " {extern void %s (void); %s ();}\n" % (symbol, symbol) + if registertype == "plugin": + line = " {extern void %s (void); %s ();}\n" % (symbol, symbol) + else: + line = " {extern void %s (void); if(cb) (*cb)(RA_HANDOFF, \"%s\", client_data); %s ();}\n" % (symbol, symbol, symbol) reg_code.write(line) reg_code.write("}\n") if registertype == "plugin": reg_code.write("#endif\n"); +else: + reg_code.write(""" +gulong register_count(void) +{ +"""); + + line = " return %d + %d;\n" % (len(regs['proto_reg']), len(regs['handoff_reg'])) + reg_code.write(line) + + reg_code.write(""" +} +"""); + # Close the file reg_code.close() |