[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:
parent
b457c60f75
commit
485f69d1e5
19
src/main.h
19
src/main.h
@ -7,21 +7,12 @@ typedef long double price_t;
|
|||||||
typedef long double wattage_t;
|
typedef long double wattage_t;
|
||||||
typedef unsigned long interval_t;
|
typedef unsigned long interval_t;
|
||||||
|
|
||||||
typedef struct {
|
int parse_arguments(int argc, char **argv, price_t *price, wattage_t *wattage, interval_t *interval);
|
||||||
price_t price;
|
|
||||||
wattage_t wattage;
|
|
||||||
interval_t interval;
|
|
||||||
} arguments_t;
|
|
||||||
|
|
||||||
arguments_t *parse_arguments(int argc, char **argv);
|
inline interval_t interval_to_seconds(char *interval);
|
||||||
|
inline price_t to_wattspersecond(price_t price);
|
||||||
|
|
||||||
interval_t to_seconds(char *interval);
|
|
||||||
inline price_t to_wattpersecond(price_t price);
|
|
||||||
|
|
||||||
|
|
||||||
void print_version();
|
|
||||||
void print_usage();
|
|
||||||
|
|
||||||
|
inline void print_version();
|
||||||
|
inline void print_usage();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user