Commit Graph

10 Commits

Author SHA1 Message Date
Alexander Andreev 8556f85781
[main.{c,h}] Let's put some safety into this code! xD 2022-01-06 04:23:20 +04:00
Alexander Andreev 485f69d1e5
[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.
2021-12-25 23:29:38 +04:00
Alexander Andreev b457c60f75
[main.c] Structure arguments_t removed. Use ptrs to vars instead. `parse_arguments` now returns status codes instead of printing stuff and closing program.
`to_wattpersecond` is now `to_wattspersecond`.
Fixed typo in usage, capitalised `options` word. Rephrased `print_version` text.
Removed unnecessary check from `interval_to_seconds` (former `to_seconds`) function.
2021-12-25 23:27:53 +04:00
Alexander Andreev e61890310f
kwh-calc renamed to more suitable name kwh-cost. 2021-12-24 23:54:31 +04:00
Alexander Andreev 5ab493e7cc
Replaced printf in print_version() and print_usage() with puts. 2021-12-24 01:45:13 +04:00
Alexander Andreev 8b301c7038
All this text was replaced by just an info on where to look for a license. 2021-12-24 01:37:34 +04:00
Alexander Andreev 54aa50779f
Fixed KWh to be as it should be -- kWh. Another retarded moment fixed. :) 2021-12-24 01:25:33 +04:00
Alexander Andreev 24d19fa6ee
Added newlines at the end of source files to be compatible with clang. 2021-12-24 01:01:43 +04:00
Alexander Andreev 6d58dc3813
Removed debug printf. 2021-12-24 00:25:51 +04:00
Alexander Andreev 7d03901e24
Source files. 2021-12-23 23:59:00 +04:00