mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
add support for a configuration file
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
This commit is contained in:
parent
2795ef6c79
commit
2e5c1ff20c
6 changed files with 274 additions and 1 deletions
42
src/conffile.h
Normal file
42
src/conffile.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* tio - a simple TTY terminal I/O application
|
||||
*
|
||||
* Copyright (c) 2020 Liam Beguin
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef CONFFILE_H
|
||||
#define CONFFILE_H
|
||||
|
||||
struct conf_data {
|
||||
const char *user;
|
||||
|
||||
char *path;
|
||||
char *section_name;
|
||||
char *match;
|
||||
|
||||
char *tty;
|
||||
char *flow;
|
||||
char *parity;
|
||||
char *log_filename;
|
||||
char *map;
|
||||
};
|
||||
|
||||
void conf_parse_file(const int argc, char *argv[]);
|
||||
void conf_exit(void);
|
||||
|
||||
#endif /* CONFFILE_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue