[main.h] Renoved struct arguments_t.

Changed definition of `parse_arguments`.
`to_seconds` -> `interval_to_seconds`, and inlined.
`print_version` and `print_usage` are inlined.
This commit is contained in:
Alexander Andreev 2021-12-25 23:29:38 +04:00
parent b457c60f75
commit 485f69d1e5
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -7,21 +7,12 @@ typedef long double price_t;
typedef long double wattage_t;
typedef unsigned long interval_t;
typedef struct {
price_t price;
wattage_t wattage;
interval_t interval;
} arguments_t;
int parse_arguments(int argc, char **argv, price_t *price, wattage_t *wattage, interval_t *interval);
arguments_t *parse_arguments(int argc, char **argv);
interval_t to_seconds(char *interval);
inline price_t to_wattpersecond(price_t price);
void print_version();
void print_usage();
inline interval_t interval_to_seconds(char *interval);
inline price_t to_wattspersecond(price_t price);
inline void print_version();
inline void print_usage();
#endif