bifcl: Change file extension of auto-generated script files

Changed ".bro" file extension to ".zeek".
This commit is contained in:
Daniel Thayer 2019-04-04 01:12:47 -05:00 committed by Tim Wojtulewicz
parent c3f6c8a4a0
commit a95808bc6b
3 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,7 @@ Bro BIF Compiler
================ ================
The ``bifcl`` program simply takes a ``.bif`` file as input and The ``bifcl`` program simply takes a ``.bif`` file as input and
generates C++ header/source files along with a ``.bro`` script generates C++ header/source files along with a ``.zeek`` script
that all-together provide the declaration and implementation of Bro_ that all-together provide the declaration and implementation of Bro_
Built-In-Functions (BIFs), which can then be compiled and shipped Built-In-Functions (BIFs), which can then be compiled and shipped
as part of a Bro plugin. as part of a Bro plugin.

View file

@ -188,7 +188,7 @@ void usage()
void init_alternative_mode() void init_alternative_mode()
{ {
fp_bro_init = open_output_file("bro"); fp_bro_init = open_output_file("zeek");
fp_func_h = open_output_file("h"); fp_func_h = open_output_file("h");
fp_func_def = open_output_file("cc"); fp_func_def = open_output_file("cc");
fp_func_init = open_output_file("init.cc"); fp_func_init = open_output_file("init.cc");
@ -335,7 +335,7 @@ int main(int argc, char* argv[])
if ( ! alternative_mode ) if ( ! alternative_mode )
{ {
fp_bro_init = open_output_file("bro"); fp_bro_init = open_output_file("zeek");
fp_func_h = open_output_file("func_h"); fp_func_h = open_output_file("func_h");
fp_func_def = open_output_file("func_def"); fp_func_def = open_output_file("func_def");
fp_func_init = open_output_file("func_init"); fp_func_init = open_output_file("func_init");
@ -409,7 +409,7 @@ void err_exit(void)
{ {
close_all_output_files(); close_all_output_files();
/* clean up. remove all output files we've generated so far */ /* clean up. remove all output files we've generated so far */
remove_file("bro"); remove_file("zeek");
remove_file("func_h"); remove_file("func_h");
remove_file("func_def"); remove_file("func_def");
remove_file("func_init"); remove_file("func_init");

View file

@ -50,7 +50,7 @@ struct decl_struct {
string c_namespace_end; // closing "}" for all the above namespaces string c_namespace_end; // closing "}" for all the above namespaces
string c_fullname; // fully qualified name (namespace::....) for use in netvar_init string c_fullname; // fully qualified name (namespace::....) for use in netvar_init
string bro_fullname; // fully qualified bro name, for netvar (and lookup_ID()) string bro_fullname; // fully qualified bro name, for netvar (and lookup_ID())
string bro_name; // the name as we read it from input. What we write into the .bro file string bro_name; // the name as we read it from input. What we write into the .zeek file
// special cases for events. Events have an EventHandlerPtr // special cases for events. Events have an EventHandlerPtr
// and a generate_* function. This name is for the generate_* function // and a generate_* function. This name is for the generate_* function
@ -338,7 +338,7 @@ module_def: TOK_MODULE opt_ws TOK_ID opt_ws ';'
// XXX: Add the netvar glue so that the event engine knows about // XXX: Add the netvar glue so that the event engine knows about
// the type. One still has to define the type in bro.init. // the type. One still has to define the type in bro.init.
// Would be nice, if we could just define the record type here // Would be nice, if we could just define the record type here
// and then copy to the .bif.bro file, but type declarations in // and then copy to the .bif.zeek file, but type declarations in
// Bro can be quite powerful. Don't know whether it's worth it // Bro can be quite powerful. Don't know whether it's worth it
// extend the bif-language to be able to handle that all.... // extend the bif-language to be able to handle that all....
// Or we just support a simple form of record type definitions // Or we just support a simple form of record type definitions