diff --git a/src/parse.y b/src/parse.y index 5c54706168..90babf3467 100644 --- a/src/parse.y +++ b/src/parse.y @@ -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); diff --git a/src/scan.l b/src/scan.l index babe036027..8da74b3da6 100644 --- a/src/scan.l +++ b/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 @@ -555,7 +550,7 @@ YYLTYPE GetCurrentLocation() static int load_files(const char* orig_file) { // Whether we pushed on a FileInfo that will restore the - // current module after the final file has been scanned. + // current module after the final file has been scanned. bool did_module_restore = false; const char* full_filename = ""; @@ -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 )