mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Removing Broxygen's dpd_config magic.
The table doesn't exist anymore. The functionality has been replaced with a function call but I can't really see how to get it out of there. We could get it from the analyzer manager, however then we can't tie it back to a script anymore. What we could do eventually is add this to the information about the analyzer plugin.
This commit is contained in:
parent
ea9fd74fc5
commit
7b50f97d39
2 changed files with 2 additions and 63 deletions
|
@ -1081,8 +1081,7 @@ decl:
|
|||
add_global($2, $3, $4, $5, $6, VAR_REDEF);
|
||||
|
||||
if ( generate_documentation &&
|
||||
! streq("capture_filters", $2->Name()) &&
|
||||
! streq("dpd_config", $2->Name()) )
|
||||
! streq("capture_filters", $2->Name()) )
|
||||
{
|
||||
ID* fake_id = create_dummy_id($2, $2->Type());
|
||||
BroDocObj* o = new BroDocObj(fake_id, reST_doc_comments, true);
|
||||
|
|
60
src/scan.l
60
src/scan.l
|
@ -69,11 +69,6 @@ void clear_reST_doc_comments();
|
|||
// Adds changes to capture_filter to the current script's reST documentation.
|
||||
static void check_capture_filter_changes();
|
||||
|
||||
#if 0
|
||||
// Adds changes to dpd_config to the current script's reST documentation.
|
||||
static void check_dpd_config_changes();
|
||||
#endif
|
||||
|
||||
static const char* canon_doc_comment(const char* comment)
|
||||
{
|
||||
// "##Text" and "## Text" are treated the same in order to be able
|
||||
|
@ -825,9 +820,6 @@ int yywrap()
|
|||
while ( input_files.length() > 0 )
|
||||
{
|
||||
check_capture_filter_changes();
|
||||
#if 0
|
||||
check_dpd_config_changes();
|
||||
#endif
|
||||
|
||||
if ( load_files(input_files[0]) )
|
||||
{
|
||||
|
@ -843,9 +835,6 @@ int yywrap()
|
|||
}
|
||||
|
||||
check_capture_filter_changes();
|
||||
#if 0
|
||||
check_dpd_config_changes();
|
||||
#endif
|
||||
|
||||
// For each file scanned so far, and for each @prefix, look for a
|
||||
// prefixed and flattened version of the loaded file in BROPATH. The
|
||||
|
@ -1010,55 +999,6 @@ static void check_capture_filter_changes()
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void check_dpd_config_changes()
|
||||
{
|
||||
if ( ! generate_documentation )
|
||||
return;
|
||||
|
||||
// Lookup the "dpd_config" identifier, if it has any defined value,
|
||||
// add it to the script's documentation, and clear the table so that
|
||||
// it doesn't taint the documentation for subsequent scripts.
|
||||
ID* dpd_config = global_scope()->Lookup("dpd_config");
|
||||
if ( ! dpd_config )
|
||||
return;
|
||||
|
||||
TableVal* dpd_table = dpd_config->ID_Val()->AsTableVal();
|
||||
ListVal* dpd_list = dpd_table->ConvertToList();
|
||||
|
||||
for ( int i = 0; i < dpd_list->Length(); ++i )
|
||||
{
|
||||
Val* key = dpd_list->Index(i);
|
||||
if ( ! key )
|
||||
continue;
|
||||
|
||||
Val* v = dpd_table->Lookup(key);
|
||||
if ( ! v )
|
||||
continue;
|
||||
|
||||
int tag = key->AsListVal()->Index(0)->AsCount();
|
||||
ODesc valdesc;
|
||||
valdesc.SetIndentSpaces(4);
|
||||
valdesc.PushIndent();
|
||||
v->Describe(&valdesc);
|
||||
|
||||
#if 0
|
||||
if ( tag < AnalyzerTag::Error || tag > AnalyzerTag::LastAnalyzer )
|
||||
{
|
||||
fprintf(stderr, "Warning: skipped bad analyzer tag: %i\n", tag);
|
||||
continue;
|
||||
}
|
||||
|
||||
last_reST_doc->AddPortAnalysis(
|
||||
Analyzer::GetTagName((AnalyzerTag)tag),
|
||||
valdesc.Description());
|
||||
#endif
|
||||
}
|
||||
|
||||
dpd_table->RemoveAll();
|
||||
}
|
||||
#endif
|
||||
|
||||
void print_current_reST_doc_comments()
|
||||
{
|
||||
if ( ! reST_doc_comments )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue