-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathconfig_rmw.h
55 lines (38 loc) · 1.74 KB
/
config_rmw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
This file is part of rmw<https://theimpossibleastronaut.github.io/rmw-website/>
Copyright (C) 2012-2023 Andy Alt ([email protected])
Other authors: https://github.com/theimpossibleastronaut/rmw/blob/master/AUTHORS.md
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 3 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, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "trashinfo.h"
#include "parse_cli_options.h"
#include "messages.h"
#include "canfigger.h"
#include "main.h"
#define ENV_RMW_FAKE_HOME "RMW_FAKE_HOME"
extern const char *expire_age_str;
typedef struct
{
st_waste *st_waste_folder_props_head; // Pointer with high alignment requirements
int expire_age; // 4-byte alignment, placed next
bool force_required; // Minimal alignment, placed after the int
char uid[10]; // Character array, lower alignment, placed last
} st_config;
void print_config(FILE * restrict stream);
void
parse_config_file(const rmw_options * cli_user_options,
st_config * st_config_data, const st_loc * st_location);
void init_config_data(st_config * x);
void
show_folder_line(const char *folder, const bool is_r, const bool is_attached);
int validate_path(const char *path, struct pathconf_limits *pathconf_limits);