diff options
author | Antony Kellermann | 2018-06-25 10:52:50 -0400 |
---|---|---|
committer | Antony Kellermann | 2018-06-25 10:52:50 -0400 |
commit | 71b4f6194f0e776c0139d0f531f430da8383dd68 (patch) | |
tree | 7af13a0aae9ceac6b5a8c250992da252061d5c0c /api.h | |
parent | 4b02268aaf2081bf37e4c48a908d73b729019809 (diff) | |
download | aur-71b4f6194f0e776c0139d0f531f430da8383dd68.tar.gz |
Changed Info_Array to use Info for totals
Diffstat (limited to 'api.h')
-rw-r--r-- | api.h | 31 |
1 files changed, 7 insertions, 24 deletions
@@ -126,30 +126,7 @@ struct info { struct info_array { Info** array; size_t length; - - double total_spent; // Total USD spent - double current_value; // Total USD value - - char ftotal_spent[CELL_MAX_LENGTH]; // Total USD spent - char fcurrent_value[CELL_MAX_LENGTH]; // Total USD value - - double profit_total; // Total profit - double profit_total_percent; // Total profit % - double profit_last_close; // Profit since last close - double profit_last_close_percent; // Profit since last close % - double profit_7d; // Profit since seven days ago - double profit_7d_percent; // Profit since seven days ago % - double profit_30d; // Profit since thirty days ago - double profit_30d_percent; // Profit since thirty days ago % - - char fprofit_total[CELL_MAX_LENGTH]; // Total profit - char fprofit_total_percent[CELL_MAX_LENGTH]; // Total profit % - char fprofit_last_close[CELL_MAX_LENGTH]; // Profit since last close - char fprofit_last_close_percent[CELL_MAX_LENGTH]; // Profit since last close % - char fprofit_7d[CELL_MAX_LENGTH]; // Profit since seven days ago - char fprofit_7d_percent[CELL_MAX_LENGTH]; // Profit since seven days ago % - char fprofit_30d[CELL_MAX_LENGTH]; // Profit since thirty days ago - char fprofit_30d_percent[CELL_MAX_LENGTH]; // Profit since thirty days ago % + Info* totals; }; /** @@ -172,6 +149,12 @@ Info* api_info_init(void); Info_Array* api_info_array_init(void); /** + * Adds up values of Info array and sets values in totals. + * @param pInfo_Array + */ +void info_array_calculate_totals(Info_Array* pInfo_Array); + +/** * writefunction for cURL HTTP GET/POST * stolen from a nice man on stackoverflow */ |