diff options
author | Antony Kellermann | 2018-08-20 18:06:01 -0400 |
---|---|---|
committer | Antony Kellermann | 2018-08-20 18:06:01 -0400 |
commit | 018d295b256750ad56f2b08d08e1628c1b1676e6 (patch) | |
tree | 9d0adc08665466bb7b7f8f2eeabb73ea1ebb39f0 /curses_win.c | |
parent | 5e771a0ae5a8e5716b3c84dd4c48fda843262dd3 (diff) | |
download | aur-018d295b256750ad56f2b08d08e1628c1b1676e6.tar.gz |
Moved code from main to curses_win.c
Diffstat (limited to 'curses_win.c')
-rw-r--r-- | curses_win.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/curses_win.c b/curses_win.c index 7621a6ed67eb..6f1db2fca085 100644 --- a/curses_win.c +++ b/curses_win.c @@ -2,6 +2,20 @@ int zoom_months[] = {60, 48, 36, 24, 12, 9, 6, 3, 1}, zoom_change_x_months[] = {12, 12, 12, 12, 12, 3, 3, 3, 2}; +void portfolio_printw(void) { + String* pString = portfolio_ncurses_get_plaintext_string(NULL); + if (pString != NULL) { + Info_Array* portfolio_data = portfolio_info_array_init_from_portfolio_string( + pString); + if (portfolio_data != NULL) { + api_info_array_store_data_batch(portfolio_data, CHECK); + info_array_portfolio_printw(portfolio_data); + api_info_array_destroy(&portfolio_data); + } + string_destroy(&pString); + } +} + void info_array_portfolio_printw(Info_Array* portfolio_data) { if (portfolio_data == NULL) return; |