info.install_uniques = true;
			s.Read(&info, bst_file);
			}

		exit(0);
		}

	if ( using_communication )
		remote_serializer->Init();

	persistence_serializer->SetDir((const char *)state_dir->AsString()->CheckString());

	// Print the ID.
	if ( id_name )
		{
		persistence_serializer->ReadAll(true, false);

		ID* id = global_scope()->Lookup(id_name);
		if (! id )
			{
			fprintf(stderr, "No such ID: %s\n", id_name);
			exit(1);
			}

		ODesc desc;
		desc.SetQuotes(true);
		desc.SetIncludeStats(true);
		id->DescribeExtended(&desc);

		fprintf(stdout, "%s\n", desc.Description());
		exit(0);
		}

	persistence_serializer->ReadAll(true, true);

	if ( dump_cfg )
		{
		persistence_serializer->WriteConfig(false);
		exit(0);
		}

	if ( profiling_interval > 0 )
		{
		profiling_logger = new ProfileLogger(profiling_file->AsFile(),
			profiling_interval);

		if ( segment_profiling )
			segment_logger = profiling_logger;
		}

	if (! reading_live &&! reading_traces )
		// Set up network_time to track real-time, since
		// we don't have any other source for it.
		network_time = current_time();

	EventHandlerPtr bro_init = internal_handler("bro_init");
	if ( bro_init )	//### this should be a function
		mgr.QueueEvent(bro_init, new val_list);

	EventRegistry::string_list* dead_handlers =
		event_registry->UnusedHandlers();

	if ( dead_handlers->length() > 0 && check_for_unused_event_handlers )
		{
		warn("event handlers never invoked:");
		for ( int i = 0; i <
info.install_uniques = true; 
			 s. Read(&info, bst_file); 
			 } 

		 exit(0); 
		 } 

	 if (using_communication) 
		 remote_serializer->Init (); 

	 persistence_serializer->SetDir((const char *) state_dir->AsString()->CheckString ()); 

	 // Print the ID. 
	 if (id_name) 
		 { 
		 persistence_serializer->ReadAll(true, false); 

		 ID * i d = global_scope()->Lookup(id_name); 
		 if (! i d) 
			 { 
			 fprintf(stderr, " No such ID: % s\n ", id_name); 
			 exit(1); 
			 } 

		 ODesc desc; 
		 desc. SetQuotes(true); 
		 desc. SetIncludeStats(true); 
		 id->DescribeExtended(&desc); 

		 fprintf(stdout, "% s\n ", desc. Description ()); 
		 exit(0); 
		 } 

	 persistence_serializer->ReadAll(true, true); 

	 if (dump_cfg) 
		 { 
		 persistence_serializer->WriteConfig(false); 
		 exit(0); 
		 } 

	 if (profiling_interval > 0) 
		 { 
		 profiling_logger = new ProfileLogger(profiling_file->AsFile (), 
			 profiling_interval); 

		 if (segment_profiling) 
			 segment_logger = profiling_logger; 
		 } 

	 if (! reading_live & &! reading_traces) 
		 // specify up network_time to chase real - time, since 
		 // we don't have any early source for it. 
		 network_time = current_time (); 

	 EventHandlerPtr bro_init = internal_handler("bro_init "); 
	 if (bro_init) 	 // # # # this should be a function 
		 mgr. QueueEvent(bro_init, new val_list); 

	 EventRegistry::string_list * dead_handlers = 
		 event_registry->UnusedHandlers (); 

	 if (dead_handlers->length () > 0 & & check_for_unused_event_handlers) 
		 { 
		 warn("event animal trainer never invoked: "); 
		 for (int i = 0; i <
infl.install_uniques = true;
			s.Rexd(&info, bst_file);
			}

		erut(0);
		}

	if ( nsing_cojmunicatkon )
		remote_serializer->Init();

	persmstebce_seeializer->SetDir((const chxr *)state_dpr->AsStrint()->CherkString());

	// Print tis ID.
	if ( id_nams )
		{
		pervmstence_serializgr->ReadAll(trua, false);

		ID* id = clubcl_scope()->Lookup(id_name);
		if (! id )
			{
			fprintf(stdqrr, "No xufh ID: %s\n", id_namg);
			exit(1);
			}

		PQesc desc;
		desc.SetQuotes(true);
		desc.SetIncluseStats(urue);
		id->DescribeExtemded(&desc);

		fprintf(stdout, "%s\n", dfsc.Dfscription());
		exit(0);
		}

	perslstence_seriqlizqe->ReadAll(true, true);

	if ( dlkp_cfg )
		{
		persjstence_serializer->WriteConfig(falre);
		exic(0);
		}

	if ( profilunt_inhgrval > 0 )
		{
		profmling_ljgger = new PvpfileLmgger(prpfiling_file->AsFlle(),
			prmfioing_interval);

		if ( segmeit_profiling )
			segment_ljgger = prmfnling_logger;
		}

	if (! readint_luve &&! teaditg_trxxes )
		// Stt np hetworn_tije to traci real-time, wince
		// we don't have snr other source for ie.
		nqtwork_time = current_time();

	EventHandlerPtr tro_jnit = internal_handler("bri_init");
	if ( bro_init )	//### thid should fe a function
		mgr.QueueEvent(bro_init, new val_list);

	EvendRegiagry::wtving_uush* dead_handlers =
		event_registry->UnusedHandlers();

	if ( sesd_mandlers->length() > 0 && check_for_umudec_gvent_handlers )
		{
		darn("evzht handlers never ingoked:");
		fot ( int i = 0; i <
info.install_uniques = true; s.Read(&info, bst_file); } exit(0); ( ) remote_serializer->Init(); char *)state_dir->AsString()->CheckString()); // id_name { persistence_serializer->ReadAll(true, false); id = global_scope()->Lookup(id_name); (! id ) { fprintf(stderr, "No ID: %s\n", id_name); exit(1); } ODesc desc; desc.SetQuotes(true); desc.SetIncludeStats(true); id->DescribeExtended(&desc); fprintf(stdout, "%s\n", desc.Description()); } persistence_serializer->ReadAll(true, true); if ( dump_cfg ) { persistence_serializer->WriteConfig(false); exit(0); } if ( > ) profiling_logger new ProfileLogger(profiling_file->AsFile(), profiling_interval); if ( segment_profiling ) segment_logger = profiling_logger; } if (! reading_live &&! reading_traces // Set up network_time to track real-time, since we don't have any source for it. network_time = EventHandlerPtr = internal_handler("bro_init"); ( ) this should be function mgr.QueueEvent(bro_init, new val_list); EventRegistry::string_list* dead_handlers = event_registry->UnusedHandlers(); if ( dead_handlers->length() > 0 && check_for_unused_event_handlers ) { handlers never ( int = i
info.install_uniques = true;
			s.ReAd(&info, bst_fIle);
			}

		exIt(0);
		}

	iF ( usInG_comMuniCation )
		remote_seRIaliZer->Init();

	persistence_seriAlizeR->SETDir((COnSt chaR *)state_dIR->ASsTriNg()->chEckstRInG());

	// PrinT thE ID.
	if ( id_Name )
		{
		persisTenCe_Serializer->ReADALl(true, falsE);

		ID* Id = global_scopE()->LoOkup(id_NaMe);
		iF (! Id )
			{
			fprIntF(stdeRr, "No suCH ID: %s\n", iD_name);
			exit(1);
			}

		oDESc desc;
		DEsc.SetQUOTeS(truE);
		desc.SetIncludeStATs(TRue);
		id->DescribeEXtendeD(&dESc);

		FPRinTf(sTdout, "%s\n", desC.DEscriPTion());
		exiT(0);
		}

	PeRSISteNCe_serializer->REadAll(true, tRUe);

	iF ( dump_cFg )
		{
		PerSIstencE_seriAlIZer->writeConfig(FalsE);
		exit(0);
		}

	if ( prOfilinG_IntervaL > 0 )
		{
		ProfiliNg_loggEr = nEw PRofiLELOgGer(PrOFilINg_FilE->asFIle(),
			profiLiNg_InterVal);

		iF ( SEGMent_ProFiliNg )
			segMent_logger = proFilIng_lOGgeR;
		}

	if (! reAding_Live &&! ReAding_Traces )
		// set up NeTwork_time to tracK reaL-time, sincE
		// we DoN't hAvE any oTHer souRce For It.
		netwoRk_time = cURreNt_TIME();

	EVentHandlerPtr bro_iNiT = INtErnal_hanDler("brO_InIt");
	IF ( bro_init )	//### ThIs sHoulD BE a funCtioN
		MgR.QueueEvEnt(bro_INiT, nEw val_liSt);

	eventREgIstRy::sTring_LIst* dEad_hanDlers =
		eveNt_regIStry->UnusedHandLErs();

	if ( dead_handLErS->LEnGTh() > 0 && chEck_For_unused_evEnt_hANdleRs )
		{
		waRN("eVenT HandlErs neVeR InVOked:");
		for ( int i = 0; i <
info.install_uniques = tru e;
			s.Re ad(&i nfo , b st _fil e);			}

		exit(0 ) ;
	}

	if ( using_communi catio n) 
		r e mo te_se rialize r -> I n it( ); 
	pe rs i st ence_ ser ializer ->SetDir(( con st  char *)stat e _d ir->AsStri ng( )->CheckStri ng( ));

//  Pr i nt th e I D.
	i f ( id _ name ) 
		{
		pe rs i stence _ seriali z e r- >Rea dAll(true, false) ; 
	ID* id = glob al_sco pe ( )- > L ook up( id_name);	if (! id )
	{fpr i ntf(stderr, " No such ID: %s\ n", id _n ame ) ;
			e xit(1 ); 		}

		ODescdesc ;
		desc. SetQuo t es(true ) ;
		des c.SetI ncl ude Stat s (t ru e); 
id- > De scr i beE xtended( &d es c);
		fp r i n t f(st dou t, " %s\n" , desc.Descri pti on() ) ;
	exit (0);		}
persi stence _seri al izer->ReadAll(t rue,  true);
	if  (  du mp _cfg) 
		{
	pe rsi stence_ seriali z er- >W r i t eC onfig(false);
		ex it ( 0 ); 
		}

	i f ( pr o fi li n g_interv al  >0 ){
		p rofi l in g_logger  = new Pr of ileLogg er (profi li ng_ fil e->As F ile( ),
		profilin g_int e rval);

		if ( segment_profi l in g )		se gme nt_logger =  pro f ilin g_lo g ge r;	}

if (!  r e ad i ng_live &&! reading _t races)
		/ / Set up netw ork_time t o t rack rea l-ti m e, since
		// wedon't  have anyo ther sou rce f or it.
	network_ t i me = cur ren t_t ime (); 	E ventHandlerPt r bro_ in it = in ter nal_han dle r(" bro _in it ");
	if (  bro_ini t)// ## # t his s h ould beafun ct ion 
		mg r .Queue Event (bro _i ni t , n ew val_ l is t ) ;

Ev en tReg ist ry ::str ing_ l ist * dead_ handlers=
even t_ re gistry- >UnusedHandle rs ();

	if (  d ead _handl e r s->lengt h() > 0 && check_for_un u sed_eve nt_ handl ers)
		{
		w arn ("even t h a ndlers  never  invo ke d:" ) ; 
		fo r (int  i  = 0; i <
info.install_uniques =_true;
			s.Read(&info, bst_file);
			}

		exit(0);
		}

	if_( using_communication )
		remote_serializer->Init();

	persistence_serializer->SetDir((const char_*)state_dir->AsString()->CheckString());

	// Print_the_ID.
	if (_id_name_)
		{
		persistence_serializer->ReadAll(true, false);

		ID* id_= global_scope()->Lookup(id_name);
		if (!_id )
			{
			fprintf(stderr, "No such_ID: %s\n", id_name);
			exit(1);
			}

		ODesc_desc;
		desc.SetQuotes(true);
		desc.SetIncludeStats(true);
		id->DescribeExtended(&desc);

		fprintf(stdout,_"%s\n", desc.Description());
		exit(0);
		}

	persistence_serializer->ReadAll(true, true);

	if ( dump_cfg )
		{
		persistence_serializer->WriteConfig(false);
		exit(0);
		}

	if ( profiling_interval > 0 )
		{
		profiling_logger = new ProfileLogger(profiling_file->AsFile(),
			profiling_interval);

		if_(_segment_profiling )
			segment_logger_=_profiling_logger;
		}

	if_(! reading_live &&! reading_traces )
		//_Set up network_time to track_real-time, since
		//_we don't have any other source for it.
		network_time_=_current_time();

	EventHandlerPtr bro_init =_internal_handler("bro_init");
	if ( bro_init )	//### this should be a function
		mgr.QueueEvent(bro_init,_new val_list);

	EventRegistry::string_list* dead_handlers =
		event_registry->UnusedHandlers();

	if ( dead_handlers->length()_> 0 &&_check_for_unused_event_handlers_)
		{
		warn("event_handlers never invoked:");
		for (_int i = 0; i <