rem: cout << "Processing finished.\n";
context: int main(int argc, char *argv[]){  struct sigaction es_handler;  es_handler.sa_handler = ecanormalize_signal_handler;  sigemptyset(&es_handler.sa_mask);  es_handler.sa_flags = 0;  sigaction(SIGTERM, &es_handler, 0);  sigaction(SIGINT, &es_handler, 0);  sigaction(SIGQUIT, &es_handler, 0);  sigaction(SIGABRT, &es_handler, 0);  COMMAND_LINE cline = COMMAND_LINE (argc, argv);  if (cline.size() < 2) {    ecanormalize_print_usage();    return(1);  }  try {    string filename;    double multiplier = 1.0f;        TEMPORARY_FILE_DIRECTORY tempfile_dir_rep;    string tmpdir ("ecatools-");    char* tmp_p = getenv("USER");    if (tmp_p != NULL) {      tmpdir += string(tmp_p);      tempfile_dir_rep.reserve_directory(tmpdir);    }    if (tempfile_dir_rep.is_valid() != true) {      cerr << "---\nError while creating temporary directory \"" << tmpdir << "\". Exiting...\n";      return(0);    }    ecatools_normalize_tempfile = tempfile_dir_rep.create_filename("normalize-tmp", ".wav");    ECA_CONTROL_INTERFACE eci;    cline.begin();    cline.next(); // skip the program name    while(cline.end() == false) {      filename = cline.current();      for(int m = 0; m < 2; m++) {	eci.command("cs-add default");	eci.command("c-add default");	if (m == 0) {	  cout << "Analyzing file \"" << filename << "\".\n";	  string format;	  if (ecicpp_add_input(&eci, filename, &format) < 0) break;	  cout << "Using audio format -f:" << format << "\n";	  cout << "Opening temp file \"" << ecatools_normalize_tempfile << "\".\n";	  if (ecicpp_add_output(&eci, ecatools_normalize_tempfile, format) < 0) break;	  eci.command("cop-add -ev");	  eci.command("cop-list");	  if (eci.last_string_list().size() != 1) {	    cerr << eci.last_error() << endl;	    cerr << "---\nError while adding -ev chainop. Exiting...\n";	    break;	  }	}	else {	  string format;	  if (ecicpp_add_input(&eci, ecatools_normalize_tempfile, &format) < 0) break;	  cout << "Using audio format -f:" << format << "\n";	  if (ecicpp_add_output(&eci, filename, format) < 0) break;	  eci.command("cop-add -ea:" + kvu_numtostr(multiplier * 100.0f));	  eci.command("cop-list");	  if (eci.last_string_list().size() != 1) {	    cerr << eci.last_error() << endl;	    cerr << "---\nError while adding -ev chainop. Exiting...\n";	    break;	  }	}	cout << "Starting processing...\n";		if (ecicpp_connect_chainsetup(&eci, "default") < 0) {	  break;	}	else {	  // blocks until processing is done	  eci.command("run");	}	if (m == 0) {	  eci.command("cop-select 1");	  eci.command("copp-select 2"); /* 2nd param of -ev, first one	                                 * sets the mode */	  eci.command("copp-get");	  multiplier = eci.last_float(); 	  if (multiplier <= 1.0) {	    cout << "File \"" << filename << "\" is already normalized.\n";	    eci.command("cs-disconnect");	    eci.command("cs-select default");	    eci.command("cs-remove");	    break;	  }	  else {	    cout << "Normalizing file \"" << filename << "\" (amp-%: ";	    cout << multiplier * 100.0 << ").\n";	  }	}	cout << "Processing finished.\n";	eci.command("cs-disconnect");	eci.command("cs-select default");	eci.command("cs-remove");      }      cout << "Removing temp file \"" << ecatools_normalize_tempfile << "\".\n";      remove(ecatools_normalize_tempfile.c_str());      cline.next();    }  }  catch(...) {    cerr << "\nCaught an unknown exception.\n";  }  return(0);}