From 06d3b96728f44c32a918eac21c6ec2995bf62a94 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Fri, 22 May 2015 21:15:45 -0400 Subject: ncurse-ify the whole thing --- src/info.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/info.c') diff --git a/src/info.c b/src/info.c index bde4bf4..c40d729 100644 --- a/src/info.c +++ b/src/info.c @@ -3,32 +3,32 @@ void info_handler(struct player_t *player) { char *sym; - printf("Enter the ticker symbol of the stock to get information for: "); + output("Enter the ticker symbol of the stock to get information for: "); sym = read_ticker(); struct stock_t *stock = find_stock(player, sym); if(!stock) { - printf("Couldn't find '%s' in portfolio.\n", sym); + output("Couldn't find '%s' in portfolio.\n", sym); free(sym); return; } - printf("Updating price data...\n"); + output("Updating price data...\n"); if(!get_stock_info(sym, &stock->current_price, &stock->fullname)) { - printf("Failed to update prices.\n"); + output("Failed to update prices.\n"); return; } free(sym); - printf("Transaction history for '%s':\n", stock->symbol); - printf("================================================================================\n"); + output("Transaction history for '%s':\n", stock->symbol); + output("================================================================================\n"); print_history(stock); - printf("================================================================================\n"); + output("================================================================================\n"); - printf("Current price: $%llu.%02llu\n", stock->current_price.cents / 100, stock->current_price.cents % 100); + output("Current price: $%llu.%02llu\n", stock->current_price.cents / 100, stock->current_price.cents % 100); } -- cgit v1.1