forked from lei.chen/myxce
save work status
This commit is contained in:
parent
89fc15b926
commit
123b656dcf
5 changed files with 93 additions and 54 deletions
|
|
@ -56,30 +56,6 @@ static error_t parse_opt(int key, char* arg, struct argp_state* state)
|
|||
|
||||
static struct argp argp = { options, parse_opt, args_doc, doc };
|
||||
|
||||
static char* verbose_to_loglevel(int verbose)
|
||||
{
|
||||
char* loglevel = "info";
|
||||
|
||||
switch (verbose) {
|
||||
case 1:
|
||||
loglevel = "debug";
|
||||
break;
|
||||
case 2:
|
||||
loglevel = "debug2";
|
||||
break;
|
||||
case 3:
|
||||
loglevel = "debug3";
|
||||
break;
|
||||
default:
|
||||
if (verbose > 3) {
|
||||
loglevel = "debug3";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return loglevel;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
struct arguments arguments;
|
||||
|
|
|
|||
|
|
@ -232,30 +232,6 @@ static error_t parse_opt(int key, char* arg, struct argp_state* state)
|
|||
|
||||
static struct argp argp = { options, parse_opt, args_doc, doc };
|
||||
|
||||
static char* verbose_to_loglevel(int verbose)
|
||||
{
|
||||
char* loglevel = "info";
|
||||
|
||||
switch (verbose) {
|
||||
case 1:
|
||||
loglevel = "debug";
|
||||
break;
|
||||
case 2:
|
||||
loglevel = "debug2";
|
||||
break;
|
||||
case 3:
|
||||
loglevel = "debug3";
|
||||
break;
|
||||
default:
|
||||
if (verbose > 3) {
|
||||
loglevel = "debug3";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return loglevel;
|
||||
}
|
||||
|
||||
void sigbreak(int signo) { break_out = 1; }
|
||||
|
||||
static char* get_setting(char* key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue