Remove the unused debug option.
This commit is contained in:
parent
10a75649cd
commit
d0caefd9d7
|
@ -31,36 +31,24 @@
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
::fprintf(stderr, "Usage: P25Parrot [-d|--debug] <port>\n");
|
::fprintf(stderr, "Usage: P25Parrot <port>\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int n = 1U;
|
unsigned int port = ::atoi(argv[1U]);
|
||||||
|
|
||||||
bool debug = false;
|
|
||||||
bool log = true;
|
|
||||||
|
|
||||||
for (; n < argc-1; n++) {
|
|
||||||
if (::strcmp(argv[n], "-d") == 0 || ::strcmp(argv[n], "--debug") == 0) {
|
|
||||||
debug = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int port = ::atoi(argv[n]);
|
|
||||||
if (port == 0U) {
|
if (port == 0U) {
|
||||||
::fprintf(stderr, "P25Parrot: invalid port number - %s\n", argv[n]);
|
::fprintf(stderr, "P25Parrot: invalid port number - %s\n", argv[1U]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CP25Parrot parrot(port, debug);
|
CP25Parrot parrot(port);
|
||||||
parrot.run();
|
parrot.run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CP25Parrot::CP25Parrot(unsigned int port, bool debug) :
|
CP25Parrot::CP25Parrot(unsigned int port) :
|
||||||
m_port(port),
|
m_port(port)
|
||||||
m_debug(debug)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,13 @@
|
||||||
class CP25Parrot
|
class CP25Parrot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CP25Parrot(unsigned int port, bool debug);
|
CP25Parrot(unsigned int port);
|
||||||
~CP25Parrot();
|
~CP25Parrot();
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int m_port;
|
unsigned int m_port;
|
||||||
bool m_debug;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue