aboutsummaryrefslogtreecommitdiff
path: root/src/info.c
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2015-05-22 21:15:45 -0400
committerFranklin Wei <git@fwei.tk>2015-05-22 21:15:45 -0400
commit06d3b96728f44c32a918eac21c6ec2995bf62a94 (patch)
tree4a9c01d4161642af2eb10a699f03c2472a89ccdf /src/info.c
parent5f5e9ba46eea80c589b6675bf6d4f11f74af7d77 (diff)
downloadmarket-sim-06d3b96728f44c32a918eac21c6ec2995bf62a94.zip
market-sim-06d3b96728f44c32a918eac21c6ec2995bf62a94.tar.gz
market-sim-06d3b96728f44c32a918eac21c6ec2995bf62a94.tar.bz2
market-sim-06d3b96728f44c32a918eac21c6ec2995bf62a94.tar.xz
ncurse-ify the whole thing
Diffstat (limited to 'src/info.c')
-rw-r--r--src/info.c16
1 files changed, 8 insertions, 8 deletions
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);
}