Browse Source

whitespace removal

master
Jon Foster 1 month ago
parent
commit
71d9743d23
1 changed files with 21 additions and 21 deletions
  1. +21
    -21
      iptraffic.cpp

+ 21
- 21
iptraffic.cpp View File

@@ -65,9 +65,9 @@ struct IPtraffic: public cBaseApp {
dns_del.push_back("NODATA-");
dns_del.push_back("NXDOMAIN-");
}
~IPtraffic() { if(log && log!=&cin) delete(log); }


@@ -86,16 +86,16 @@ struct IPtraffic: public cBaseApp {
"iptraffic -c {config file} [-o {output file}] [{input file} [...]]\n";
ExitCode = 1;
}
unsigned do_switch(const char *sw) {
if((sw[0]=='c' || sw[0]=='o') && sw[1]==0) return 1;
throw CLIerror("Unrecognized Switch");
}
void do_switch_arg(const char *sw, const std::string &val) {
switch(*sw) {
case 'c':
@@ -105,25 +105,25 @@ struct IPtraffic: public cBaseApp {
"appropriate values"
);
break;
case 'o':
if(out!=&cout)
if(out!=&cout)
throw CLIerror("Output file has already been specified");
out = new ofstream(val.c_str()); // c_str(), really?!?!
}
}
void do_arg(const char *fname) {
if(log && log!=&cin) delete(log);
log = 0;
log = new ifstream(fname);
ExitCode = do_log();
}
// NOTE: the return values isn't really used yet but the channel is here if
// it can be of use.
int do_log() {
@@ -189,7 +189,7 @@ struct IPtraffic: public cBaseApp {



int main() {
int main() {
try {
cBaseApp::main();
if(!log) {
@@ -203,9 +203,9 @@ struct IPtraffic: public cBaseApp {
}
return ExitCode;
}
};




Loading…
Cancel
Save