mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Replace inih with glib key file parser
After including the use of glib we might as well replace inih with the glib key file parser. All configuraiton file parsing has been reworked and also the options parsing has been cleaned up, resulting in better and stricter configuration file and option value checks. Compared to old, configuration files now requires any default configurations to be put in a group/section named [default]. Configuration file keywords such as "enable", "disable", "on", "off", "yes", "no", "0", "1" have been retired. Now only "true" and "false" apply to boolean configuration options. This is done to simplify things and avoid any confusion. The pattern option feature has been reworked so now the user can now access the full match string and any matching subexpression using the %mN syntax. For example: [usb devices] pattern = usb([0-9]*) device = /dev/ttyUSB%m1 Then when using tio: $ tio usb12 %m0 = 'usb12' // Full match string %m1 = 12 // First match subexpression Which results in device = /dev/ttyUSB12
This commit is contained in:
parent
68d3b845b2
commit
65c5a068d8
23 changed files with 969 additions and 723 deletions
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
extern bool error_normal;
|
||||
|
||||
#define TIO_SUCCESS 0
|
||||
#define TIO_ERROR 1
|
||||
|
||||
|
|
@ -28,3 +32,4 @@ void tio_error_printf(const char *format, ...);
|
|||
void tio_error_printf_silent(const char *format, ...);
|
||||
void error_exit(void);
|
||||
void error_enter_session_mode(void);
|
||||
void switch_error_output_mode(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue