mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add support for "disable" keyword in config file
This commit is contained in:
parent
0a892006ea
commit
9b55f18c07
1 changed files with 18 additions and 0 deletions
|
|
@ -128,13 +128,22 @@ static int data_handler(void *user, const char *section, const char *name,
|
|||
{
|
||||
option.no_autoconnect = true;
|
||||
}
|
||||
else if (!strcmp(value, "disable"))
|
||||
{
|
||||
option.no_autoconnect = false;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(name, "log"))
|
||||
{
|
||||
printf("Parsing log \n");
|
||||
if (!strcmp(value, "enable"))
|
||||
{
|
||||
option.log = true;
|
||||
}
|
||||
else if (!strcmp(value, "disable"))
|
||||
{
|
||||
option.log = false;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(name, "local-echo"))
|
||||
{
|
||||
|
|
@ -142,6 +151,11 @@ static int data_handler(void *user, const char *section, const char *name,
|
|||
{
|
||||
option.local_echo = true;
|
||||
}
|
||||
else if (!strcmp(value, "disable"))
|
||||
{
|
||||
option.local_echo = false;
|
||||
}
|
||||
|
||||
}
|
||||
else if (!strcmp(name, "timestamp"))
|
||||
{
|
||||
|
|
@ -149,6 +163,10 @@ static int data_handler(void *user, const char *section, const char *name,
|
|||
{
|
||||
option.timestamp = TIMESTAMP_24HOUR;
|
||||
}
|
||||
else if (!strcmp(value, "disable"))
|
||||
{
|
||||
option.timestamp = TIMESTAMP_NONE;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(name, "timestamp-format"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue