Add missing options to show configuration

This commit is contained in:
Martin Lund 2024-04-20 14:51:45 +02:00
parent 51bfa68bdd
commit b05f38abd0
6 changed files with 64 additions and 11 deletions

View file

@ -19,6 +19,7 @@
* 02110-1301, USA.
*/
#include "alert.h"
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
@ -28,9 +29,9 @@
#include "print.h"
#include "options.h"
enum alert_t alert_option_parse(const char *arg)
alert_t alert_option_parse(const char *arg)
{
enum alert_t alert = option.alert; // Default
alert_t alert = option.alert; // Default
if (arg != NULL)
{
@ -108,3 +109,18 @@ void alert_disconnect(void)
break;
}
}
const char *alert_state_to_string(alert_t state)
{
switch (state)
{
case ALERT_NONE:
return "none";
case ALERT_BELL:
return "bell";
case ALERT_BLINK:
return "blink";
default:
return "Unknown";
}
}